diff --git a/CHANGELOG.md b/CHANGELOG.md index 8460e71cf..209166d22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,49 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Bug Fixes + +- Widget panel fixes ([#2227](https://github.com/deephaven/web-client-ui/issues/2227)) ([c985e12](https://github.com/deephaven/web-client-ui/commit/c985e1274097860dcbf4690ac8412c9f84831209)) + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Features + +- Pass through additional actions from WidgetPanel ([#2224](https://github.com/deephaven/web-client-ui/issues/2224)) ([bc720d1](https://github.com/deephaven/web-client-ui/commit/bc720d1789a5e28c99b06d496e58187fb4b26038)) + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +### Features + +- Add clickOutside prop to Modal ([#2214](https://github.com/deephaven/web-client-ui/issues/2214)) ([d78ad6d](https://github.com/deephaven/web-client-ui/commit/d78ad6d0e883a4c4c76078ae8b09c611fab35ae9)) + +### Bug Fixes + +- ChartBuilderPlugin fixes for charts built from PPQs in Enterprise ([#2167](https://github.com/deephaven/web-client-ui/issues/2167)) ([99b8d59](https://github.com/deephaven/web-client-ui/commit/99b8d5952ba325bf74d2d16ed39eb7a2e897d196)) +- Publish WidgetPanelProps ([#2210](https://github.com/deephaven/web-client-ui/issues/2210)) ([7331976](https://github.com/deephaven/web-client-ui/commit/7331976004ed9b33fca9d97919d359dd881e8d0a)), closes [/github.com/deephaven-ent/iris/pull/2114/files#diff-536d6ac232028a4ebbafc5ca79bb1a22844488a4b628196e43056379f9326a90R17](https://github.com/deephaven//github.com/deephaven-ent/iris/pull/2114/files/issues/diff-536d6ac232028a4ebbafc5ca79bb1a22844488a4b628196e43056379f9326a90R17) +- Use correct offset in snapshot ([#2217](https://github.com/deephaven/web-client-ui/issues/2217)) ([a479d6c](https://github.com/deephaven/web-client-ui/commit/a479d6c5f907f53aaa6500845ea168ab0eb9bb09)) + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) ### Features diff --git a/jest.setup.ts b/jest.setup.ts index 8db731f81..3aeec7e36 100644 --- a/jest.setup.ts +++ b/jest.setup.ts @@ -4,7 +4,7 @@ import { performance } from 'perf_hooks'; import 'jest-canvas-mock'; import './__mocks__/dh-core'; import Log from '@deephaven/log'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; let logLevel = parseInt(process.env.DH_LOG_LEVEL ?? '', 10); if (!Number.isFinite(logLevel)) { diff --git a/lerna.json b/lerna.json index 4ad3f8e89..fed2c3ceb 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "useNx": false, - "version": "0.92.0", + "version": "0.95.0", "command": { "publish": { "distTag": "latest" diff --git a/package-lock.json b/package-lock.json index d257e08c5..55cdb195f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,6 +57,7 @@ "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/redux": "file:../redux", "@deephaven/stylelint-config": "file:../stylelint-config", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/tsconfig": "file:../tsconfig", "@deephaven/utils": "file:../utils", "@fortawesome/fontawesome-common-types": "^6.1.1", @@ -128,7 +129,7 @@ "sass": "^1.39.0", "source-map-explorer": "^2.5.2", "stylelint": "^14.5.1", - "typescript": "~4.9.4", + "typescript": "~5.6.2", "vite": "^5.4.2" }, "engines": { @@ -2151,6 +2152,10 @@ "resolved": "packages/stylelint-config", "link": true }, + "node_modules/@deephaven/test-utils": { + "resolved": "packages/test-utils", + "link": true + }, "node_modules/@deephaven/tsconfig": { "resolved": "packages/tsconfig", "link": true @@ -3995,21 +4000,6 @@ "node": ">=8" } }, - "node_modules/@lerna/create/node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "dev": true, - "optional": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/@lerna/create/node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -10123,15 +10113,6 @@ "node": ">= 8.0.0" } }, - "node_modules/agentkeepalive/node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -10511,12 +10492,12 @@ } }, "node_modules/axios": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", - "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dev": true, "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -10892,31 +10873,27 @@ "dev": true }, "node_modules/body-parser": { - "version": "1.19.2", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dev": true, - "license": "MIT", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.8.1", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.9.7", - "raw-body": "2.4.3", - "type-is": "~1.6.18" + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.8" - } - }, - "node_modules/body-parser/node_modules/bytes": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, "node_modules/body-parser/node_modules/debug": { @@ -10932,15 +10909,16 @@ "dev": true, "license": "MIT" }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.9.7", + "node_modules/body-parser/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.6" + "dependencies": { + "ee-first": "1.1.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.8" } }, "node_modules/boolbase": { @@ -11372,6 +11350,15 @@ "node": ">=12.17" } }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/cacache": { "version": "17.1.3", "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.3.tgz", @@ -12177,9 +12164,10 @@ "dev": true }, "node_modules/content-type": { - "version": "1.0.4", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -13226,11 +13214,12 @@ "dev": true }, "node_modules/depd": { - "version": "1.1.2", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "dev": true, - "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/deprecation": { @@ -13282,6 +13271,16 @@ "minimalistic-assert": "^1.0.0" } }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, "node_modules/detect-indent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", @@ -13601,9 +13600,9 @@ } }, "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "version": "6.5.7", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz", + "integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==", "dev": true, "dependencies": { "bn.js": "^4.11.9", @@ -16473,18 +16472,28 @@ "dev": true }, "node_modules/http-errors": { - "version": "1.8.1", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, - "license": "MIT", "dependencies": { - "depd": "~1.1.2", + "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", + "statuses": "2.0.1", "toidentifier": "1.0.1" }, "engines": { - "node": ">= 0.6" + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" } }, "node_modules/http-proxy": { @@ -21781,11 +21790,12 @@ ] }, "node_modules/micromatch": { - "version": "4.0.4", - "license": "MIT", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.3", + "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" @@ -23458,9 +23468,12 @@ } }, "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -24241,8 +24254,9 @@ } }, "node_modules/path-to-regexp": { - "version": "1.8.0", - "license": "MIT", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", + "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", "dependencies": { "isarray": "0.0.1" } @@ -24900,6 +24914,21 @@ "node": ">=0.9" } }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", @@ -24994,12 +25023,13 @@ } }, "node_modules/raw-body": { - "version": "2.4.3", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, - "license": "MIT", "dependencies": { "bytes": "3.1.2", - "http-errors": "1.8.1", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" }, @@ -25007,14 +25037,6 @@ "node": ">= 0.8" } }, - "node_modules/raw-body/node_modules/bytes": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/react": { "version": "17.0.2", "license": "MIT", @@ -26278,8 +26300,9 @@ }, "node_modules/setprototypeof": { "version": "1.2.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true }, "node_modules/sha.js": { "version": "2.4.11", @@ -26342,12 +26365,17 @@ "license": "MIT" }, "node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -27937,8 +27965,9 @@ }, "node_modules/toidentifier": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.6" } @@ -28148,15 +28177,15 @@ } }, "node_modules/typescript": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/ua-parser-js": { @@ -29248,7 +29277,7 @@ }, "packages/app-utils": { "name": "@deephaven/app-utils", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@adobe/react-spectrum": "3.35.1", @@ -29282,6 +29311,7 @@ "lodash.throttle": "^4.1.1" }, "devDependencies": { + "@deephaven/test-utils": "file:../test-utils", "react": "^17.x", "react-dom": "^17.x", "react-redux": "^7.x", @@ -29342,7 +29372,7 @@ }, "packages/auth-plugins": { "name": "@deephaven/auth-plugins", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -29357,6 +29387,7 @@ "js-cookie": "^3.0.5" }, "devDependencies": { + "@deephaven/test-utils": "file:../test-utils", "@types/react": "^17.0.2" }, "engines": { @@ -29369,7 +29400,7 @@ }, "packages/babel-preset": { "name": "@deephaven/babel-preset", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@babel/core": "^7.20.0", @@ -29384,7 +29415,7 @@ }, "packages/chart": { "name": "@deephaven/chart", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -29407,6 +29438,7 @@ "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils", "@types/plotly.js": "^2.12.11" }, "engines": { @@ -29441,7 +29473,7 @@ }, "packages/code-studio": { "name": "@deephaven/code-studio", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@adobe/react-spectrum": "3.35.1", @@ -29499,6 +29531,7 @@ "@deephaven/mocks": "file:../mocks", "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/stylelint-config": "file:../stylelint-config", + "@deephaven/test-utils": "file:../test-utils", "autoprefixer": "^10.4.8" } }, @@ -29536,7 +29569,7 @@ }, "packages/components": { "name": "@deephaven/components", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@adobe/react-spectrum": "3.35.1", @@ -29569,6 +29602,7 @@ }, "devDependencies": { "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils", "react-redux": "^7.2.4" }, "engines": { @@ -29582,7 +29616,7 @@ }, "packages/console": { "name": "@deephaven/console", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@astral-sh/ruff-wasm-web": "0.6.4", @@ -29611,7 +29645,8 @@ }, "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/mocks": "file:../mocks" + "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils" }, "engines": { "node": ">=16" @@ -29623,7 +29658,7 @@ }, "packages/dashboard": { "name": "@deephaven/dashboard", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -29640,6 +29675,7 @@ }, "devDependencies": { "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils", "@types/lodash.ismatch": "^4.4.0" }, "engines": { @@ -29653,7 +29689,7 @@ }, "packages/dashboard-core-plugins": { "name": "@deephaven/dashboard-core-plugins", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/chart": "file:../chart", @@ -29695,7 +29731,8 @@ }, "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/mocks": "file:../mocks" + "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils" }, "engines": { "node": ">=16" @@ -30084,17 +30121,17 @@ }, "packages/embed-chart": { "name": "@deephaven/embed-chart", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0" }, "packages/embed-grid": { "name": "@deephaven/embed-grid", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0" }, "packages/embed-widget": { "name": "@deephaven/embed-widget", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/app-utils": "file:../app-utils", @@ -30125,7 +30162,7 @@ }, "packages/eslint-config": { "name": "@deephaven/eslint-config", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "eslint-config-airbnb": "^19.0.4", @@ -30144,7 +30181,7 @@ }, "packages/file-explorer": { "name": "@deephaven/file-explorer", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -30159,7 +30196,8 @@ "prop-types": "^15.7.2" }, "devDependencies": { - "@deephaven/mocks": "file:../mocks" + "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils" }, "engines": { "node": ">=16" @@ -30170,7 +30208,7 @@ }, "packages/filters": { "name": "@deephaven/filters", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "engines": { "node": ">=16" @@ -30178,7 +30216,7 @@ }, "packages/golden-layout": { "name": "@deephaven/golden-layout", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -30198,7 +30236,7 @@ }, "packages/grid": { "name": "@deephaven/grid", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/utils": "file:../utils", @@ -30220,7 +30258,7 @@ }, "packages/icons": { "name": "@deephaven/icons", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@fortawesome/fontawesome-common-types": "^6.1.1" @@ -30237,7 +30275,7 @@ }, "packages/iris-grid": { "name": "@deephaven/iris-grid", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -30272,6 +30310,7 @@ "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils", "deep-equal": "2.2.3" }, "engines": { @@ -30284,7 +30323,7 @@ }, "packages/jsapi-bootstrap": { "name": "@deephaven/jsapi-bootstrap", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -30294,6 +30333,7 @@ "@deephaven/utils": "file:../utils" }, "devDependencies": { + "@deephaven/test-utils": "file:../test-utils", "react": "^17.x" }, "engines": { @@ -30305,7 +30345,7 @@ }, "packages/jsapi-components": { "name": "@deephaven/jsapi-components", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -30323,6 +30363,7 @@ }, "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", + "@deephaven/test-utils": "file:../test-utils", "react-test-renderer": "^17.0.2" }, "engines": { @@ -30334,7 +30375,7 @@ }, "packages/jsapi-shim": { "name": "@deephaven/jsapi-shim", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", @@ -30355,7 +30396,7 @@ }, "packages/jsapi-utils": { "name": "@deephaven/jsapi-utils", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/filters": "file:../filters", @@ -30366,7 +30407,8 @@ "nanoid": "^5.0.7" }, "devDependencies": { - "@deephaven/jsapi-shim": "file:../jsapi-shim" + "@deephaven/jsapi-shim": "file:../jsapi-shim", + "@deephaven/test-utils": "file:../test-utils" }, "engines": { "node": ">=16" @@ -30374,7 +30416,7 @@ }, "packages/log": { "name": "@deephaven/log", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "event-target-shim": "^6.0.2" @@ -30385,7 +30427,7 @@ }, "packages/mocks": { "name": "@deephaven/mocks", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "peerDependencies": { "jest": "29.x" @@ -30393,7 +30435,7 @@ }, "packages/plugin": { "name": "@deephaven/plugin", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/components": "file:../components", @@ -30444,7 +30486,7 @@ }, "packages/pouch-storage": { "name": "@deephaven/pouch-storage", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/console": "file:../console", @@ -30465,7 +30507,7 @@ }, "packages/prettier-config": { "name": "@deephaven/prettier-config", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "peerDependencies": { "prettier": "^3.0.0" @@ -30473,7 +30515,7 @@ }, "packages/react-hooks": { "name": "@deephaven/react-hooks", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@adobe/react-spectrum": "3.35.1", @@ -30483,6 +30525,9 @@ "lodash.throttle": "^4.1.1", "nanoid": "^5.0.7" }, + "devDependencies": { + "@deephaven/test-utils": "file:../test-utils" + }, "engines": { "node": ">=16" }, @@ -30492,7 +30537,7 @@ }, "packages/redux": { "name": "@deephaven/redux", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", @@ -30512,7 +30557,7 @@ }, "packages/storage": { "name": "@deephaven/storage", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "@deephaven/filters": "file:../filters", @@ -30528,7 +30573,7 @@ }, "packages/stylelint-config": { "name": "@deephaven/stylelint-config", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", "dependencies": { "stylelint-config-prettier-scss": "^0.0.1", @@ -30538,16 +30583,27 @@ "stylelint": "^14.5.1" } }, + "packages/test-utils": { + "name": "@deephaven/test-utils", + "version": "0.95.0", + "license": "Apache-2.0", + "engines": { + "node": ">=16" + } + }, "packages/tsconfig": { "name": "@deephaven/tsconfig", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0" }, "packages/util": {}, "packages/utils": { "name": "@deephaven/utils", - "version": "0.92.0", + "version": "0.95.0", "license": "Apache-2.0", + "devDependencies": { + "@deephaven/test-utils": "file:../test-utils" + }, "engines": { "node": ">=16" } @@ -31833,6 +31889,7 @@ "@deephaven/react-hooks": "file:../react-hooks", "@deephaven/redux": "file:../redux", "@deephaven/storage": "file:../storage", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "@fontsource/fira-mono": "5.0.13", "@fontsource/fira-sans": "5.0.20", @@ -31858,6 +31915,7 @@ "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/redux": "file:../redux", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "@types/react": "^17.0.2", "classnames": "^2.3.1", @@ -31888,6 +31946,7 @@ "@deephaven/log": "file:../log", "@deephaven/mocks": "file:../mocks", "@deephaven/react-hooks": "file:../react-hooks", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "@types/plotly.js": "^2.12.11", "buffer": "^6.0.3", @@ -31944,6 +32003,7 @@ "@deephaven/redux": "file:../redux", "@deephaven/storage": "file:../storage", "@deephaven/stylelint-config": "file:../stylelint-config", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/react-fontawesome": "^0.2.0", @@ -31993,6 +32053,7 @@ "@deephaven/log": "file:../log", "@deephaven/mocks": "file:../mocks", "@deephaven/react-hooks": "file:../react-hooks", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/react-fontawesome": "^0.2.0", @@ -32033,6 +32094,7 @@ "@deephaven/mocks": "file:../mocks", "@deephaven/react-hooks": "file:../react-hooks", "@deephaven/storage": "file:../storage", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "@fortawesome/react-fontawesome": "^0.2.0", "classnames": "^2.3.1", @@ -32058,6 +32120,7 @@ "@deephaven/mocks": "file:../mocks", "@deephaven/react-hooks": "file:../react-hooks", "@deephaven/redux": "file:../redux", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "@types/lodash.ismatch": "^4.4.0", "fast-deep-equal": "^3.1.3", @@ -32103,6 +32166,7 @@ "@deephaven/react-hooks": "file:../react-hooks", "@deephaven/redux": "file:../redux", "@deephaven/storage": "file:../storage", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "@fortawesome/react-fontawesome": "^0.2.0", "classnames": "^2.3.1", @@ -32441,6 +32505,7 @@ "@deephaven/log": "file:../log", "@deephaven/mocks": "file:../mocks", "@deephaven/storage": "file:../storage", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "@fortawesome/fontawesome-svg-core": "^6.2.1", "@fortawesome/react-fontawesome": "^0.2.0", @@ -32503,6 +32568,7 @@ "@deephaven/mocks": "file:../mocks", "@deephaven/react-hooks": "file:../react-hooks", "@deephaven/storage": "file:../storage", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "@dnd-kit/core": "^6.1.0", "@dnd-kit/sortable": "^7.0.2", @@ -32530,6 +32596,7 @@ "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "react": "^17.x" } @@ -32544,6 +32611,7 @@ "@deephaven/jsapi-utils": "file:../jsapi-utils", "@deephaven/log": "file:../log", "@deephaven/react-hooks": "file:../react-hooks", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "@types/js-cookie": "^3.0.3", "classnames": "^2.3.2", @@ -32572,6 +32640,7 @@ "@deephaven/jsapi-shim": "file:../jsapi-shim", "@deephaven/jsapi-types": "^1.0.0-dev0.34.0", "@deephaven/log": "file:../log", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "lodash.clamp": "^4.0.3", "nanoid": "^5.0.7" @@ -32624,6 +32693,7 @@ "requires": { "@adobe/react-spectrum": "3.35.1", "@deephaven/log": "file:../log", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/utils": "file:../utils", "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1", @@ -32657,11 +32727,17 @@ "stylelint-config-standard-scss": "^3.0.0" } }, + "@deephaven/test-utils": { + "version": "file:packages/test-utils" + }, "@deephaven/tsconfig": { "version": "file:packages/tsconfig" }, "@deephaven/utils": { - "version": "file:packages/utils" + "version": "file:packages/utils", + "requires": { + "@deephaven/test-utils": "file:../test-utils" + } }, "@dnd-kit/accessibility": { "version": "3.1.0", @@ -33899,14 +33975,6 @@ "has-flag": "^4.0.0" } }, - "typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", - "dev": true, - "optional": true, - "peer": true - }, "uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -38576,14 +38644,6 @@ "debug": "^4.1.0", "depd": "^2.0.0", "humanize-ms": "^1.2.1" - }, - "dependencies": { - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true - } } }, "aggregate-error": { @@ -38870,12 +38930,12 @@ "integrity": "sha512-lCZN5XRuOnpG4bpMq8v0khrWtUOn+i8lZSb6wHZH56ZfbIEv6XwJV84AAueh9/zi7qPVJ/E4yz6fmsiyOmXR4w==" }, "axios": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", - "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dev": true, "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -39154,25 +39214,25 @@ "dev": true }, "body-parser": { - "version": "1.19.2", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dev": true, "requires": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.8.1", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.9.7", - "raw-body": "2.4.3", - "type-is": "~1.6.18" + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "dependencies": { - "bytes": { - "version": "3.1.2", - "dev": true - }, "debug": { "version": "2.6.9", "dev": true, @@ -39184,9 +39244,14 @@ "version": "2.0.0", "dev": true }, - "qs": { - "version": "6.9.7", - "dev": true + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } } } }, @@ -39532,6 +39597,12 @@ "integrity": "sha512-tUkzZWK0M/qdoLEqikxBWe4kumyuwjl3HO6zHTr4yEI23EojPtLYXdG1+AQY7MN0cGyNDvEaJ8wiYQm6P2bPxg==", "dev": true }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true + }, "cacache": { "version": "17.1.3", "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.3.tgz", @@ -40132,7 +40203,9 @@ "dev": true }, "content-type": { - "version": "1.0.4", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true }, "conventional-changelog-angular": { @@ -40935,7 +41008,9 @@ "dev": true }, "depd": { - "version": "1.1.2", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "dev": true }, "deprecation": { @@ -40983,6 +41058,12 @@ "minimalistic-assert": "^1.0.0" } }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true + }, "detect-indent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", @@ -41227,9 +41308,9 @@ } }, "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "version": "6.5.7", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz", + "integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==", "dev": true, "requires": { "bn.js": "^4.11.9", @@ -43299,14 +43380,24 @@ "dev": true }, "http-errors": { - "version": "1.8.1", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, "requires": { - "depd": "~1.1.2", + "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", + "statuses": "2.0.1", "toidentifier": "1.0.1" + }, + "dependencies": { + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true + } } }, "http-proxy": { @@ -46930,10 +47021,12 @@ "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==" }, "micromatch": { - "version": "4.0.4", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.3", + "picomatch": "^2.3.1" } }, "miller-rabin": { @@ -48206,9 +48299,9 @@ "version": "4.1.1" }, "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==" }, "object-is": { "version": "1.1.6", @@ -48757,7 +48850,9 @@ } }, "path-to-regexp": { - "version": "1.8.0", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", + "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", "requires": { "isarray": "0.0.1" }, @@ -49250,6 +49345,15 @@ "version": "1.2.0", "dev": true }, + "qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, + "requires": { + "side-channel": "^1.0.6" + } + }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", @@ -49313,19 +49417,15 @@ "dev": true }, "raw-body": { - "version": "2.4.3", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "requires": { "bytes": "3.1.2", - "http-errors": "1.8.1", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" - }, - "dependencies": { - "bytes": { - "version": "3.1.2", - "dev": true - } } }, "react": { @@ -50259,6 +50359,8 @@ }, "setprototypeof": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, "sha.js": { @@ -50307,11 +50409,14 @@ "version": "1.7.3" }, "side-channel": { - "version": "1.0.4", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" } }, "signal-exit": { @@ -51488,6 +51593,8 @@ }, "toidentifier": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true }, "topojson-client": { @@ -51639,9 +51746,9 @@ } }, "typescript": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==" + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==" }, "ua-parser-js": { "version": "0.7.33", diff --git a/package.json b/package.json index 529803769..9c78c5689 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "build:profile": "lerna run build --stream --profile", "build:necessary": "lerna run build --scope=@deephaven/icons", "analyze": "lerna run analyze", + "lint:packages": "eslint \"packages/*/src/**/*.{ts,tsx,js,jsx}\"", "preview": "lerna run --scope=@deephaven/{code-studio,embed-widget} preview --stream", "preview:app": "lerna run --scope=@deephaven/code-studio preview --stream", "prestart": "npm run build:necessary", @@ -66,6 +67,7 @@ "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/redux": "file:../redux", "@deephaven/stylelint-config": "file:../stylelint-config", + "@deephaven/test-utils": "file:../test-utils", "@deephaven/tsconfig": "file:../tsconfig", "@deephaven/utils": "file:../utils", "@fortawesome/fontawesome-common-types": "^6.1.1", @@ -137,7 +139,7 @@ "sass": "^1.39.0", "source-map-explorer": "^2.5.2", "stylelint": "^14.5.1", - "typescript": "~4.9.4", + "typescript": "~5.6.2", "vite": "^5.4.2" }, "prettier": "@deephaven/prettier-config", diff --git a/packages/app-utils/CHANGELOG.md b/packages/app-utils/CHANGELOG.md index 94f2db212..acc82ec32 100644 --- a/packages/app-utils/CHANGELOG.md +++ b/packages/app-utils/CHANGELOG.md @@ -3,6 +3,35 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +### Bug Fixes + +- ChartBuilderPlugin fixes for charts built from PPQs in Enterprise ([#2167](https://github.com/deephaven/web-client-ui/issues/2167)) ([99b8d59](https://github.com/deephaven/web-client-ui/commit/99b8d5952ba325bf74d2d16ed39eb7a2e897d196)) + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) ### Features diff --git a/packages/app-utils/package.json b/packages/app-utils/package.json index 5a080940b..bb424de70 100644 --- a/packages/app-utils/package.json +++ b/packages/app-utils/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/app-utils", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven App Utils", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -22,6 +22,7 @@ "build:babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward" }, "devDependencies": { + "@deephaven/test-utils": "file:../test-utils", "react": "^17.x", "react-dom": "^17.x", "react-redux": "^7.x", diff --git a/packages/app-utils/src/components/AppBootstrap.test.tsx b/packages/app-utils/src/components/AppBootstrap.test.tsx index 1b8b8cfe9..835c48c11 100644 --- a/packages/app-utils/src/components/AppBootstrap.test.tsx +++ b/packages/app-utils/src/components/AppBootstrap.test.tsx @@ -2,14 +2,14 @@ import React, { useContext } from 'react'; import { act, render, screen } from '@testing-library/react'; import { AUTH_HANDLER_TYPE_ANONYMOUS } from '@deephaven/auth-plugins'; import { ApiContext } from '@deephaven/jsapi-bootstrap'; -import { PluginModuleMap, PluginsContext } from '@deephaven/plugin'; +import { type PluginModuleMap, PluginsContext } from '@deephaven/plugin'; import { BROADCAST_LOGIN_MESSAGE } from '@deephaven/jsapi-utils'; import type { CoreClient, IdeConnection, dh as DhType, } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import AppBootstrap from './AppBootstrap'; const { asMock } = TestUtils; diff --git a/packages/app-utils/src/components/AppDashboards.tsx b/packages/app-utils/src/components/AppDashboards.tsx index 7a7f8dcba..18d91e802 100644 --- a/packages/app-utils/src/components/AppDashboards.tsx +++ b/packages/app-utils/src/components/AppDashboards.tsx @@ -2,17 +2,15 @@ import React, { useCallback } from 'react'; import classNames from 'classnames'; import { DashboardUtils, - DehydratedDashboardPanelProps, + type DehydratedDashboardPanelProps, LazyDashboard, } from '@deephaven/dashboard'; +import { useObjectFetcher } from '@deephaven/jsapi-bootstrap'; import { - sanitizeVariableDescriptor, - useObjectFetcher, -} from '@deephaven/jsapi-bootstrap'; -import LayoutManager, { - ItemConfig, - Settings as LayoutSettings, + type ItemConfig, + type Settings as LayoutSettings, } from '@deephaven/golden-layout'; +import type LayoutManager from '@deephaven/golden-layout'; import { LoadingOverlay } from '@deephaven/components'; interface AppDashboardsProps { @@ -44,9 +42,8 @@ export function AppDashboards({ const { metadata } = hydrateProps; try { if (metadata != null) { - const widget = sanitizeVariableDescriptor(metadata); return { - fetch: async () => fetchObject(widget), + fetch: async () => fetchObject(metadata), ...hydrateProps, localDashboardId: id, }; diff --git a/packages/app-utils/src/components/AuthBootstrap.tsx b/packages/app-utils/src/components/AuthBootstrap.tsx index 38c9ce769..2fd03942e 100644 --- a/packages/app-utils/src/components/AuthBootstrap.tsx +++ b/packages/app-utils/src/components/AuthBootstrap.tsx @@ -1,6 +1,6 @@ import React, { useContext, useEffect, useMemo, useState } from 'react'; import { - AuthConfigMap, + type AuthConfigMap, AuthPluginAnonymous, AuthPluginParent, AuthPluginPsk, diff --git a/packages/app-utils/src/components/ConnectionBootstrap.tsx b/packages/app-utils/src/components/ConnectionBootstrap.tsx index cc320e99a..c0e8a55b9 100644 --- a/packages/app-utils/src/components/ConnectionBootstrap.tsx +++ b/packages/app-utils/src/components/ConnectionBootstrap.tsx @@ -8,7 +8,7 @@ import { } from '@deephaven/components'; import { ObjectFetcherContext, - ObjectFetchManager, + type ObjectFetchManager, ObjectFetchManagerContext, sanitizeVariableDescriptor, useApi, diff --git a/packages/app-utils/src/plugins/PluginUtils.test.ts b/packages/app-utils/src/plugins/PluginUtils.test.ts index f21a2ebeb..15d805c51 100644 --- a/packages/app-utils/src/plugins/PluginUtils.test.ts +++ b/packages/app-utils/src/plugins/PluginUtils.test.ts @@ -1,4 +1,4 @@ -import { LegacyPlugin, Plugin, PluginType } from '@deephaven/plugin'; +import { type LegacyPlugin, type Plugin, PluginType } from '@deephaven/plugin'; import { getPluginModuleValue } from './PluginUtils'; describe('getPluginModuleValue', () => { diff --git a/packages/app-utils/src/plugins/PluginUtils.tsx b/packages/app-utils/src/plugins/PluginUtils.tsx index 4ae7ee408..0e88c5a7f 100644 --- a/packages/app-utils/src/plugins/PluginUtils.tsx +++ b/packages/app-utils/src/plugins/PluginUtils.tsx @@ -4,13 +4,13 @@ import { type AuthPlugin, type AuthPluginComponent, isAuthPlugin, - LegacyAuthPlugin, - LegacyPlugin, - Plugin, + type LegacyAuthPlugin, + type LegacyPlugin, + type Plugin, PluginType, isLegacyAuthPlugin, isLegacyPlugin, - PluginModule, + type PluginModule, isPlugin, } from '@deephaven/plugin'; import loadRemoteModule from './loadRemoteModule'; diff --git a/packages/app-utils/src/plugins/remote-component.config.ts b/packages/app-utils/src/plugins/remote-component.config.ts index 9fa7bebb9..e81e1da48 100644 --- a/packages/app-utils/src/plugins/remote-component.config.ts +++ b/packages/app-utils/src/plugins/remote-component.config.ts @@ -19,6 +19,7 @@ import * as DeephavenIrisGrid from '@deephaven/iris-grid'; import * as DeephavenJsapiBootstrap from '@deephaven/jsapi-bootstrap'; import * as DeephavenJsapiComponents from '@deephaven/jsapi-components'; import * as DeephavenJsapiUtils from '@deephaven/jsapi-utils'; +import * as DeephavenConsole from '@deephaven/console'; import DeephavenLog from '@deephaven/log'; import * as DeephavenReactHooks from '@deephaven/react-hooks'; import * as DeephavenPlugin from '@deephaven/plugin'; @@ -33,6 +34,7 @@ export const resolve = { '@deephaven/auth-plugins': DeephavenAuthPlugins, '@deephaven/chart': DeephavenChart, '@deephaven/components': DeephavenComponents, + '@deephaven/console': DeephavenConsole, '@deephaven/dashboard': DeephavenDashboard, '@deephaven/dashboard-core-plugins': DeephavenDashboardCorePlugins, '@deephaven/icons': DeephavenIcons, diff --git a/packages/app-utils/src/storage/LayoutStorage.ts b/packages/app-utils/src/storage/LayoutStorage.ts index 406269640..b2f2a50c6 100644 --- a/packages/app-utils/src/storage/LayoutStorage.ts +++ b/packages/app-utils/src/storage/LayoutStorage.ts @@ -1,6 +1,6 @@ import type { ItemConfig } from '@deephaven/golden-layout'; -import { FilterSet, Link } from '@deephaven/dashboard-core-plugins'; -import { PluginDataMap } from '@deephaven/redux'; +import { type FilterSet, type Link } from '@deephaven/dashboard-core-plugins'; +import { type PluginDataMap } from '@deephaven/redux'; /** * Have a different version to support legacy layout exports diff --git a/packages/app-utils/src/storage/LocalWorkspaceStorage.ts b/packages/app-utils/src/storage/LocalWorkspaceStorage.ts index f9159d943..10f0c25af 100644 --- a/packages/app-utils/src/storage/LocalWorkspaceStorage.ts +++ b/packages/app-utils/src/storage/LocalWorkspaceStorage.ts @@ -1,11 +1,11 @@ import Log from '@deephaven/log'; import { - WorkspaceStorage, - WorkspaceStorageLoadOptions, - CustomizableWorkspaceData, - CustomizableWorkspace, - WorkspaceSettings, - ServerConfigValues, + type WorkspaceStorage, + type WorkspaceStorageLoadOptions, + type CustomizableWorkspaceData, + type CustomizableWorkspace, + type WorkspaceSettings, + type ServerConfigValues, } from '@deephaven/redux'; import { DateTimeColumnFormatter, @@ -14,7 +14,7 @@ import { } from '@deephaven/jsapi-utils'; import merge from 'lodash.merge'; import UserLayoutUtils from './UserLayoutUtils'; -import LayoutStorage from './LayoutStorage'; +import type LayoutStorage from './LayoutStorage'; const log = Log.module('LocalWorkspaceStorage'); diff --git a/packages/app-utils/src/storage/UserLayoutUtils.test.ts b/packages/app-utils/src/storage/UserLayoutUtils.test.ts index 7b8041e3a..362b0bdbf 100644 --- a/packages/app-utils/src/storage/UserLayoutUtils.test.ts +++ b/packages/app-utils/src/storage/UserLayoutUtils.test.ts @@ -1,10 +1,11 @@ -import { FilterSet, Link } from '@deephaven/dashboard-core-plugins'; +import { type FilterSet, type Link } from '@deephaven/dashboard-core-plugins'; import type { ItemConfig } from '@deephaven/golden-layout'; -import LayoutStorage, { - ExportedLayout, - ExportedLayoutV1, - ExportedLayoutV2, +import { + type ExportedLayout, + type ExportedLayoutV1, + type ExportedLayoutV2, } from './LayoutStorage'; +import type LayoutStorage from './LayoutStorage'; import UserLayoutUtils, { DEFAULT_LAYOUT_CONFIG, DEFAULT_LAYOUT_CONFIG_NO_CONSOLE, diff --git a/packages/app-utils/src/storage/UserLayoutUtils.ts b/packages/app-utils/src/storage/UserLayoutUtils.ts index ece3351a6..9fbf1502b 100644 --- a/packages/app-utils/src/storage/UserLayoutUtils.ts +++ b/packages/app-utils/src/storage/UserLayoutUtils.ts @@ -5,13 +5,14 @@ import { LogPanel, } from '@deephaven/dashboard-core-plugins'; import Log from '@deephaven/log'; -import { CustomizableWorkspaceData } from '@deephaven/redux'; -import LayoutStorage, { - ExportedLayout, - ExportedLayoutV2, +import { type CustomizableWorkspaceData } from '@deephaven/redux'; +import { + type ExportedLayout, + type ExportedLayoutV2, isLayoutV1, isLayoutV2, } from './LayoutStorage'; +import type LayoutStorage from './LayoutStorage'; const log = Log.module('UserLayoutUtils'); diff --git a/packages/app-utils/src/storage/grpc/GrpcFileStorage.ts b/packages/app-utils/src/storage/grpc/GrpcFileStorage.ts index 9eee39be2..fb331b832 100644 --- a/packages/app-utils/src/storage/grpc/GrpcFileStorage.ts +++ b/packages/app-utils/src/storage/grpc/GrpcFileStorage.ts @@ -1,10 +1,10 @@ import throttle from 'lodash.throttle'; import { FileNotFoundError, - FileStorage, - File, - FileStorageItem, - FileStorageTable, + type FileStorage, + type File, + type FileStorageItem, + type FileStorageTable, FileUtils, isFileType, } from '@deephaven/file-explorer'; diff --git a/packages/app-utils/src/storage/grpc/GrpcFileStorageTable.ts b/packages/app-utils/src/storage/grpc/GrpcFileStorageTable.ts index ef56f52ea..d4b8214e5 100644 --- a/packages/app-utils/src/storage/grpc/GrpcFileStorageTable.ts +++ b/packages/app-utils/src/storage/grpc/GrpcFileStorageTable.ts @@ -2,21 +2,21 @@ import Log from '@deephaven/log'; import { - StorageTableViewport, - StorageListenerRemover, - ViewportUpdateCallback, - ViewportData, - IndexRange, - StorageSnapshot, + type StorageTableViewport, + type StorageListenerRemover, + type ViewportUpdateCallback, + type ViewportData, + type IndexRange, + type StorageSnapshot, } from '@deephaven/storage'; import { - CancelablePromise, + type CancelablePromise, CanceledPromiseError, PromiseUtils, } from '@deephaven/utils'; import { - FileStorageItem, - FileStorageTable, + type FileStorageItem, + type FileStorageTable, FileUtils, } from '@deephaven/file-explorer'; import type { dh } from '@deephaven/jsapi-types'; diff --git a/packages/app-utils/src/storage/grpc/GrpcLayoutStorage.ts b/packages/app-utils/src/storage/grpc/GrpcLayoutStorage.ts index 049488271..1b9961c02 100644 --- a/packages/app-utils/src/storage/grpc/GrpcLayoutStorage.ts +++ b/packages/app-utils/src/storage/grpc/GrpcLayoutStorage.ts @@ -1,5 +1,6 @@ import type { dh } from '@deephaven/jsapi-types'; -import LayoutStorage, { ExportedLayout } from '../LayoutStorage'; +import { type ExportedLayout } from '../LayoutStorage'; +import type LayoutStorage from '../LayoutStorage'; export class GrpcLayoutStorage implements LayoutStorage { readonly storageService: dh.storage.StorageService; diff --git a/packages/app-utils/tsconfig.json b/packages/app-utils/tsconfig.json index ce80fdb65..302b81a30 100644 --- a/packages/app-utils/tsconfig.json +++ b/packages/app-utils/tsconfig.json @@ -21,6 +21,7 @@ { "path": "../plugin" }, { "path": "../react-hooks" }, { "path": "../redux" }, + { "path": "../test-utils" }, { "path": "../utils" } ] } diff --git a/packages/auth-plugins/CHANGELOG.md b/packages/auth-plugins/CHANGELOG.md index 7e986ef98..1360abf69 100644 --- a/packages/auth-plugins/CHANGELOG.md +++ b/packages/auth-plugins/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/auth-plugins + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/auth-plugins diff --git a/packages/auth-plugins/package.json b/packages/auth-plugins/package.json index 5df462e6b..6301f948c 100644 --- a/packages/auth-plugins/package.json +++ b/packages/auth-plugins/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/auth-plugins", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Auth Plugins", "keywords": [ "Deephaven", @@ -45,6 +45,7 @@ "js-cookie": "^3.0.5" }, "devDependencies": { + "@deephaven/test-utils": "file:../test-utils", "@types/react": "^17.0.2" }, "peerDependencies": { diff --git a/packages/auth-plugins/src/AuthPlugin.ts b/packages/auth-plugins/src/AuthPlugin.ts index 44f6f25f6..c82057b62 100644 --- a/packages/auth-plugins/src/AuthPlugin.ts +++ b/packages/auth-plugins/src/AuthPlugin.ts @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; /** * Map from auth config keys to their values diff --git a/packages/auth-plugins/src/AuthPluginAnonymous.test.tsx b/packages/auth-plugins/src/AuthPluginAnonymous.test.tsx index a4f5e4487..26cd5762f 100644 --- a/packages/auth-plugins/src/AuthPluginAnonymous.test.tsx +++ b/packages/auth-plugins/src/AuthPluginAnonymous.test.tsx @@ -5,7 +5,7 @@ import { dh } from '@deephaven/jsapi-shim'; import type { CoreClient } from '@deephaven/jsapi-types'; import AuthPluginAnonymous from './AuthPluginAnonymous'; import { AUTH_HANDLER_TYPE_ANONYMOUS as AUTH_TYPE } from './AuthHandlerTypes'; -import { AuthConfigMap } from './AuthPlugin'; +import { type AuthConfigMap } from './AuthPlugin'; const mockChildText = 'Mock Auth Anonymous Child'; const mockChild =
{mockChildText}
; diff --git a/packages/auth-plugins/src/AuthPluginAnonymous.tsx b/packages/auth-plugins/src/AuthPluginAnonymous.tsx index d3c4fa6d0..69db57380 100644 --- a/packages/auth-plugins/src/AuthPluginAnonymous.tsx +++ b/packages/auth-plugins/src/AuthPluginAnonymous.tsx @@ -1,10 +1,10 @@ import React, { useCallback } from 'react'; import { useApi } from '@deephaven/jsapi-bootstrap'; import { AUTH_HANDLER_TYPE_ANONYMOUS } from './AuthHandlerTypes'; -import { AuthPlugin, AuthPluginProps } from './AuthPlugin'; +import { type AuthPlugin, type AuthPluginProps } from './AuthPlugin'; import AuthPluginBase from './AuthPluginBase'; import { - UserPermissionsOverride, + type UserPermissionsOverride, UserPermissionsOverrideContext, } from './UserContexts'; diff --git a/packages/auth-plugins/src/AuthPluginBase.test.tsx b/packages/auth-plugins/src/AuthPluginBase.test.tsx index 77440b2b8..f48c9d434 100644 --- a/packages/auth-plugins/src/AuthPluginBase.test.tsx +++ b/packages/auth-plugins/src/AuthPluginBase.test.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { act, render, screen } from '@testing-library/react'; import { ClientContext } from '@deephaven/jsapi-bootstrap'; import type { CoreClient } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import AuthPluginBase from './AuthPluginBase'; const mockChildText = 'Mock Auth Base Child'; diff --git a/packages/auth-plugins/src/AuthPluginParent.test.tsx b/packages/auth-plugins/src/AuthPluginParent.test.tsx index f4c18b506..9415cc261 100644 --- a/packages/auth-plugins/src/AuthPluginParent.test.tsx +++ b/packages/auth-plugins/src/AuthPluginParent.test.tsx @@ -3,9 +3,9 @@ import { act, render, screen } from '@testing-library/react'; import { ApiContext, ClientContext } from '@deephaven/jsapi-bootstrap'; import { dh } from '@deephaven/jsapi-shim'; import type { CoreClient, LoginOptions } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import AuthPluginParent from './AuthPluginParent'; -import { AuthConfigMap } from './AuthPlugin'; +import { type AuthConfigMap } from './AuthPlugin'; let mockParentResponse: Promise; jest.mock('@deephaven/jsapi-utils', () => ({ diff --git a/packages/auth-plugins/src/AuthPluginParent.tsx b/packages/auth-plugins/src/AuthPluginParent.tsx index dc121711b..d8f01e3e2 100644 --- a/packages/auth-plugins/src/AuthPluginParent.tsx +++ b/packages/auth-plugins/src/AuthPluginParent.tsx @@ -6,10 +6,10 @@ import { requestParentResponse, } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; -import { AuthPlugin, AuthPluginProps } from './AuthPlugin'; +import { type AuthPlugin, type AuthPluginProps } from './AuthPlugin'; import AuthPluginBase from './AuthPluginBase'; import { - UserPermissionsOverride, + type UserPermissionsOverride, UserPermissionsOverrideContext, } from './UserContexts'; diff --git a/packages/auth-plugins/src/AuthPluginPsk.test.tsx b/packages/auth-plugins/src/AuthPluginPsk.test.tsx index f0dc97ba7..f6affb60d 100644 --- a/packages/auth-plugins/src/AuthPluginPsk.test.tsx +++ b/packages/auth-plugins/src/AuthPluginPsk.test.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import React, { type ReactNode } from 'react'; import Cookies from 'js-cookie'; import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; @@ -8,7 +8,7 @@ import { dh } from '@deephaven/jsapi-shim'; import type { CoreClient } from '@deephaven/jsapi-types'; import AuthPluginPsk from './AuthPluginPsk'; import { AUTH_HANDLER_TYPE_PSK as AUTH_TYPE } from './AuthHandlerTypes'; -import { AuthConfigMap } from './AuthPlugin'; +import { type AuthConfigMap } from './AuthPlugin'; let mockOnBroadcastLogin = jest.fn(); let mockOnBroadcastLogout = jest.fn(); diff --git a/packages/auth-plugins/src/AuthPluginPsk.tsx b/packages/auth-plugins/src/AuthPluginPsk.tsx index b11ef5ebc..71638e05b 100644 --- a/packages/auth-plugins/src/AuthPluginPsk.tsx +++ b/packages/auth-plugins/src/AuthPluginPsk.tsx @@ -5,7 +5,7 @@ import { useBroadcastLoginListener } from '@deephaven/jsapi-components'; import Log from '@deephaven/log'; import { getErrorMessage } from '@deephaven/utils'; import Cookies from 'js-cookie'; -import { AuthPlugin, AuthPluginProps } from './AuthPlugin'; +import { type AuthPlugin, type AuthPluginProps } from './AuthPlugin'; import LoginForm from './LoginForm'; import Login from './Login'; import AuthenticationError from './AuthenticationError'; diff --git a/packages/auth-plugins/src/LoginForm.tsx b/packages/auth-plugins/src/LoginForm.tsx index cd2a68f97..ba8826865 100644 --- a/packages/auth-plugins/src/LoginForm.tsx +++ b/packages/auth-plugins/src/LoginForm.tsx @@ -1,6 +1,6 @@ import { LoadingSpinner } from '@deephaven/components'; import classNames from 'classnames'; -import React, { FormEventHandler } from 'react'; +import React, { type FormEventHandler } from 'react'; import './LoginForm.scss'; export interface LoginFormProps { diff --git a/packages/auth-plugins/src/UserContexts.ts b/packages/auth-plugins/src/UserContexts.ts index 9276c5ca7..e3bcf2f31 100644 --- a/packages/auth-plugins/src/UserContexts.ts +++ b/packages/auth-plugins/src/UserContexts.ts @@ -1,5 +1,5 @@ import { createContext } from 'react'; -import { User, UserPermissions } from '@deephaven/redux'; +import { type User, type UserPermissions } from '@deephaven/redux'; export type UserOverride = Partial>; diff --git a/packages/auth-plugins/src/UserUtils.ts b/packages/auth-plugins/src/UserUtils.ts index a79d5d1df..2d6cd908c 100644 --- a/packages/auth-plugins/src/UserUtils.ts +++ b/packages/auth-plugins/src/UserUtils.ts @@ -1,4 +1,4 @@ -import { User, UserPermissions } from '@deephaven/redux'; +import { type User, type UserPermissions } from '@deephaven/redux'; import Log from '@deephaven/log'; const log = Log.module('UserUtils'); diff --git a/packages/auth-plugins/tsconfig.json b/packages/auth-plugins/tsconfig.json index 3e22eed94..cf0a8bf86 100644 --- a/packages/auth-plugins/tsconfig.json +++ b/packages/auth-plugins/tsconfig.json @@ -13,6 +13,7 @@ { "path": "../jsapi-utils" }, { "path": "../log" }, { "path": "../redux" }, + { "path": "../test-utils" }, { "path": "../utils" } ] } diff --git a/packages/babel-preset/CHANGELOG.md b/packages/babel-preset/CHANGELOG.md index 44bea0bc2..dcfdb96b8 100644 --- a/packages/babel-preset/CHANGELOG.md +++ b/packages/babel-preset/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +**Note:** Version bump only for package @deephaven/babel-preset + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/babel-preset + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/babel-preset + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/babel-preset diff --git a/packages/babel-preset/package.json b/packages/babel-preset/package.json index b6aca19e2..ee3f9312b 100644 --- a/packages/babel-preset/package.json +++ b/packages/babel-preset/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/babel-preset", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Babel preset", "repository": { "type": "git", diff --git a/packages/chart/CHANGELOG.md b/packages/chart/CHANGELOG.md index 61ecda3bf..fc13b5e8a 100644 --- a/packages/chart/CHANGELOG.md +++ b/packages/chart/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/chart + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/chart diff --git a/packages/chart/package.json b/packages/chart/package.json index fc10752a2..c0f543c9d 100644 --- a/packages/chart/package.json +++ b/packages/chart/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/chart", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Chart", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -50,6 +50,7 @@ "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils", "@types/plotly.js": "^2.12.11" }, "files": [ diff --git a/packages/chart/src/Chart.tsx b/packages/chart/src/Chart.tsx index 2b389233e..e8db80b79 100644 --- a/packages/chart/src/Chart.tsx +++ b/packages/chart/src/Chart.tsx @@ -1,31 +1,31 @@ -import React, { Component, ReactElement, RefObject } from 'react'; +import React, { Component, type ReactElement, type RefObject } from 'react'; import deepEqual from 'fast-deep-equal'; import memoize from 'memoize-one'; import { vsLoading, dhGraphLineDown, dhWarningFilled, - IconDefinition, + type IconDefinition, } from '@deephaven/icons'; import { Formatter, FormatterUtils, DateUtils, - DateTimeColumnFormatterOptions, - DecimalColumnFormatterOptions, - IntegerColumnFormatterOptions, - FormattingRule, - ColumnFormatSettings, - DateTimeFormatSettings, + type DateTimeColumnFormatterOptions, + type DecimalColumnFormatterOptions, + type IntegerColumnFormatterOptions, + type FormattingRule, + type ColumnFormatSettings, + type DateTimeFormatSettings, } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; import { - Config as PlotlyConfig, - Layout, - Icon, - Data, - PlotData, - ModeBarButtonAny, + type Config as PlotlyConfig, + type Layout, + type Icon, + type Data, + type PlotData, + type ModeBarButtonAny, } from 'plotly.js'; import type { PlotParams } from 'react-plotly.js'; import { mergeRefs } from '@deephaven/react-hooks'; @@ -34,8 +34,8 @@ import createPlotlyComponent from './plotly/createPlotlyComponent'; import Plotly from './plotly/Plotly'; import ChartModel from './ChartModel'; import ChartErrorOverlay from './ChartErrorOverlay'; -import { ChartTheme } from './ChartTheme'; -import ChartUtils, { ChartModelSettings } from './ChartUtils'; +import { type ChartTheme } from './ChartTheme'; +import ChartUtils, { type ChartModelSettings } from './ChartUtils'; import './Chart.scss'; import DownsamplingError from './DownsamplingError'; import useChartTheme from './useChartTheme'; diff --git a/packages/chart/src/ChartErrorOverlay.tsx b/packages/chart/src/ChartErrorOverlay.tsx index 4a5693dfc..36c22cd42 100644 --- a/packages/chart/src/ChartErrorOverlay.tsx +++ b/packages/chart/src/ChartErrorOverlay.tsx @@ -1,4 +1,4 @@ -import { ReactElement } from 'react'; +import { type ReactElement } from 'react'; import { CopyButton, Button } from '@deephaven/components'; import './ChartErrorOverlay.scss'; diff --git a/packages/chart/src/ChartModel.ts b/packages/chart/src/ChartModel.ts index 0cf03815a..f1cce72b8 100644 --- a/packages/chart/src/ChartModel.ts +++ b/packages/chart/src/ChartModel.ts @@ -2,9 +2,9 @@ /* eslint no-unused-vars: "off" */ import type { dh as DhType } from '@deephaven/jsapi-types'; -import { Formatter } from '@deephaven/jsapi-utils'; +import { type Formatter } from '@deephaven/jsapi-utils'; import type { Layout, Data } from 'plotly.js'; -import { FilterColumnMap, FilterMap } from './ChartUtils'; +import { type FilterColumnMap, type FilterMap } from './ChartUtils'; export type ChartEvent = CustomEvent; diff --git a/packages/chart/src/ChartModelFactory.test.ts b/packages/chart/src/ChartModelFactory.test.ts index 6cabb6332..f431adc29 100644 --- a/packages/chart/src/ChartModelFactory.test.ts +++ b/packages/chart/src/ChartModelFactory.test.ts @@ -1,5 +1,5 @@ import dh from '@deephaven/jsapi-shim'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import ChartModelFactory from './ChartModelFactory'; import type { ChartTheme } from './ChartTheme'; import FigureChartModel from './FigureChartModel'; diff --git a/packages/chart/src/ChartModelFactory.ts b/packages/chart/src/ChartModelFactory.ts index 34606f5a8..65d158bf4 100644 --- a/packages/chart/src/ChartModelFactory.ts +++ b/packages/chart/src/ChartModelFactory.ts @@ -1,7 +1,7 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; -import ChartUtils, { ChartModelSettings } from './ChartUtils'; +import ChartUtils, { type ChartModelSettings } from './ChartUtils'; import FigureChartModel from './FigureChartModel'; -import ChartModel from './ChartModel'; +import type ChartModel from './ChartModel'; class ChartModelFactory { /** diff --git a/packages/chart/src/ChartTheme.test.ts b/packages/chart/src/ChartTheme.test.ts index f7c638794..ce5340972 100644 --- a/packages/chart/src/ChartTheme.test.ts +++ b/packages/chart/src/ChartTheme.test.ts @@ -1,6 +1,6 @@ /// -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { resolveCssVariablesInRecord } from '@deephaven/components'; import { defaultChartTheme } from './ChartTheme'; import chartThemeRaw from './ChartTheme.module.scss'; diff --git a/packages/chart/src/ChartThemeProvider.tsx b/packages/chart/src/ChartThemeProvider.tsx index 0cd0eeabf..4a41a608b 100644 --- a/packages/chart/src/ChartThemeProvider.tsx +++ b/packages/chart/src/ChartThemeProvider.tsx @@ -1,6 +1,6 @@ -import { createContext, ReactNode, useMemo } from 'react'; +import { createContext, type ReactNode, useMemo } from 'react'; import { useTheme } from '@deephaven/components'; -import defaultChartTheme, { ChartTheme } from './ChartTheme'; +import defaultChartTheme, { type ChartTheme } from './ChartTheme'; export type ChartThemeContextValue = ChartTheme; diff --git a/packages/chart/src/ChartUtils.test.ts b/packages/chart/src/ChartUtils.test.ts index 67c41a4f5..38a3fb8dd 100644 --- a/packages/chart/src/ChartUtils.test.ts +++ b/packages/chart/src/ChartUtils.test.ts @@ -1,6 +1,6 @@ import dh from '@deephaven/jsapi-shim'; import { Formatter } from '@deephaven/jsapi-utils'; -import { Layout } from 'plotly.js'; +import { type Layout } from 'plotly.js'; import ChartUtils from './ChartUtils'; import ChartTestUtils from './ChartTestUtils'; import type { ChartTheme } from './ChartTheme'; diff --git a/packages/chart/src/ChartUtils.ts b/packages/chart/src/ChartUtils.ts index ce66ae77e..efb0f78cb 100644 --- a/packages/chart/src/ChartUtils.ts +++ b/packages/chart/src/ChartUtils.ts @@ -1,8 +1,8 @@ import Log from '@deephaven/log'; import { - DateTimeColumnFormatter, - Formatter, - TableColumnFormatter, + type DateTimeColumnFormatter, + type Formatter, + type TableColumnFormatter, TableUtils, } from '@deephaven/jsapi-utils'; import type { dh as DhType } from '@deephaven/jsapi-types'; @@ -18,8 +18,8 @@ import type { MarkerSymbol, Template, } from 'plotly.js'; -import { assertNotNull, bindAllMethods, Range } from '@deephaven/utils'; -import { ChartTheme } from './ChartTheme'; +import { assertNotNull, bindAllMethods, type Range } from '@deephaven/utils'; +import { type ChartTheme } from './ChartTheme'; export type FilterColumnMap = Map< string, diff --git a/packages/chart/src/FigureChartModel.test.ts b/packages/chart/src/FigureChartModel.test.ts index 4cb6b1689..af3df563f 100644 --- a/packages/chart/src/FigureChartModel.test.ts +++ b/packages/chart/src/FigureChartModel.test.ts @@ -1,5 +1,5 @@ import dh from '@deephaven/jsapi-shim'; -import { Data } from 'plotly.js'; +import { type Data } from 'plotly.js'; import ChartTestUtils from './ChartTestUtils'; import FigureChartModel from './FigureChartModel'; diff --git a/packages/chart/src/FigureChartModel.ts b/packages/chart/src/FigureChartModel.ts index a96cf03de..95c4531f2 100644 --- a/packages/chart/src/FigureChartModel.ts +++ b/packages/chart/src/FigureChartModel.ts @@ -4,7 +4,7 @@ import debounce from 'lodash.debounce'; import set from 'lodash.set'; import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; -import { Range } from '@deephaven/utils'; +import { type Range } from '@deephaven/utils'; import type { Annotations, Layout, @@ -17,12 +17,12 @@ import type { DateTimeColumnFormatter, Formatter, } from '@deephaven/jsapi-utils'; -import ChartModel, { ChartEvent, RenderOptions } from './ChartModel'; +import ChartModel, { type ChartEvent, type RenderOptions } from './ChartModel'; import ChartUtils, { - AxisTypeMap, - ChartModelSettings, - FilterColumnMap, - FilterMap, + type AxisTypeMap, + type ChartModelSettings, + type FilterColumnMap, + type FilterMap, } from './ChartUtils'; const log = Log.module('FigureChartModel'); diff --git a/packages/chart/src/MockChartModel.ts b/packages/chart/src/MockChartModel.ts index 0cf67434c..5ea18ce2f 100644 --- a/packages/chart/src/MockChartModel.ts +++ b/packages/chart/src/MockChartModel.ts @@ -4,7 +4,7 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; import type { Datum, Layout, PlotData } from 'plotly.js'; import ChartModel from './ChartModel'; -import { ChartTheme, defaultChartTheme } from './ChartTheme'; +import { type ChartTheme, defaultChartTheme } from './ChartTheme'; import ChartUtils from './ChartUtils'; interface Series { diff --git a/packages/chart/src/isFigureChartModel.ts b/packages/chart/src/isFigureChartModel.ts index 208535fc0..e7bd2a9c3 100644 --- a/packages/chart/src/isFigureChartModel.ts +++ b/packages/chart/src/isFigureChartModel.ts @@ -1,5 +1,5 @@ -import ChartModel from './ChartModel'; -import FigureChartModel from './FigureChartModel'; +import type ChartModel from './ChartModel'; +import type FigureChartModel from './FigureChartModel'; export default function isFigureChartModel( model: ChartModel diff --git a/packages/chart/src/useChartTheme.tsx b/packages/chart/src/useChartTheme.tsx index c3a6eb000..cd115e39f 100644 --- a/packages/chart/src/useChartTheme.tsx +++ b/packages/chart/src/useChartTheme.tsx @@ -2,7 +2,7 @@ import { useContextOrThrow } from '@deephaven/react-hooks'; import { ChartThemeContext, - ChartThemeContextValue, + type ChartThemeContextValue, } from './ChartThemeProvider'; /** diff --git a/packages/chart/tsconfig.json b/packages/chart/tsconfig.json index a062e3e23..0533a1ffe 100644 --- a/packages/chart/tsconfig.json +++ b/packages/chart/tsconfig.json @@ -12,6 +12,7 @@ { "path": "../jsapi-utils" }, { "path": "../log" }, { "path": "../react-hooks" }, + { "path": "../test-utils" }, { "path": "../utils" } ] } diff --git a/packages/code-studio/CHANGELOG.md b/packages/code-studio/CHANGELOG.md index 8dd73a642..d071bbe04 100644 --- a/packages/code-studio/CHANGELOG.md +++ b/packages/code-studio/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/code-studio + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) ### Features diff --git a/packages/code-studio/package.json b/packages/code-studio/package.json index e60f30a95..648b088d8 100644 --- a/packages/code-studio/package.json +++ b/packages/code-studio/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/code-studio", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Code Studio", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -78,6 +78,7 @@ "@deephaven/mocks": "file:../mocks", "@deephaven/prettier-config": "file:../prettier-config", "@deephaven/stylelint-config": "file:../stylelint-config", + "@deephaven/test-utils": "file:../test-utils", "autoprefixer": "^10.4.8" }, "publishConfig": { diff --git a/packages/code-studio/src/components/DateInput.tsx b/packages/code-studio/src/components/DateInput.tsx index 3e88abb72..7f12dc7af 100644 --- a/packages/code-studio/src/components/DateInput.tsx +++ b/packages/code-studio/src/components/DateInput.tsx @@ -1,8 +1,8 @@ -import React, { useState, ReactElement } from 'react'; +import React, { useState, type ReactElement } from 'react'; import dh from '@deephaven/jsapi-shim'; import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; -import { MaskedInput, SelectionSegment } from '@deephaven/components'; +import { MaskedInput, type SelectionSegment } from '@deephaven/components'; const log = Log.module('DateInput'); diff --git a/packages/code-studio/src/log/LogInit.ts b/packages/code-studio/src/log/LogInit.ts index 6e2d6decf..7779de1dd 100644 --- a/packages/code-studio/src/log/LogInit.ts +++ b/packages/code-studio/src/log/LogInit.ts @@ -1,4 +1,4 @@ -import { LogProxy, LogHistory, Logger, Log } from '@deephaven/log'; +import { LogProxy, LogHistory, type Logger, Log } from '@deephaven/log'; declare global { interface Window { diff --git a/packages/code-studio/src/main/App.tsx b/packages/code-studio/src/main/App.tsx index c9a717d0b..027e837ad 100644 --- a/packages/code-studio/src/main/App.tsx +++ b/packages/code-studio/src/main/App.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement } from 'react'; +import React, { type ReactElement } from 'react'; import { ContextMenuRoot } from '@deephaven/components'; import AppMainContainer from './AppMainContainer'; diff --git a/packages/code-studio/src/main/AppControlsMenu.tsx b/packages/code-studio/src/main/AppControlsMenu.tsx index 17d7355ea..914ba3879 100644 --- a/packages/code-studio/src/main/AppControlsMenu.tsx +++ b/packages/code-studio/src/main/AppControlsMenu.tsx @@ -4,12 +4,12 @@ import React, { useCallback, useState, useMemo, - ReactNode, - ReactElement, + type ReactNode, + type ReactElement, } from 'react'; import classNames from 'classnames'; import { - DropdownAction, + type DropdownAction, DropdownMenu, GLOBAL_SHORTCUTS, } from '@deephaven/components'; diff --git a/packages/code-studio/src/main/AppInit.tsx b/packages/code-studio/src/main/AppInit.tsx index b785e88f6..6a5662e59 100644 --- a/packages/code-studio/src/main/AppInit.tsx +++ b/packages/code-studio/src/main/AppInit.tsx @@ -17,7 +17,7 @@ import Log from '@deephaven/log'; import { PouchCommandHistoryStorage } from '@deephaven/pouch-storage'; import { getWorkspace, - RootState, + type RootState, setActiveTool, setApi, setCommandHistoryStorage, diff --git a/packages/code-studio/src/main/AppMainContainer.test.tsx b/packages/code-studio/src/main/AppMainContainer.test.tsx index 564f3643c..b48dd74e9 100644 --- a/packages/code-studio/src/main/AppMainContainer.test.tsx +++ b/packages/code-studio/src/main/AppMainContainer.test.tsx @@ -5,12 +5,12 @@ import { act, render, screen } from '@testing-library/react'; import { ConnectionContext, LocalWorkspaceStorage, - LayoutStorage, + type LayoutStorage, } from '@deephaven/app-utils'; import { ToolType } from '@deephaven/dashboard-core-plugins'; import { ApiContext, - ObjectFetcher, + type ObjectFetcher, ObjectFetcherContext, } from '@deephaven/jsapi-bootstrap'; import dh from '@deephaven/jsapi-shim'; @@ -19,8 +19,8 @@ import type { IdeSession, VariableChanges, } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; -import { Workspace, createMockStore } from '@deephaven/redux'; +import { TestUtils } from '@deephaven/test-utils'; +import { type Workspace, createMockStore } from '@deephaven/redux'; import userEvent from '@testing-library/user-event'; import { DEFAULT_DASHBOARD_ID } from '@deephaven/dashboard'; import { AppMainContainer } from './AppMainContainer'; diff --git a/packages/code-studio/src/main/AppMainContainer.tsx b/packages/code-studio/src/main/AppMainContainer.tsx index fd2c6000b..d80063a93 100644 --- a/packages/code-studio/src/main/AppMainContainer.tsx +++ b/packages/code-studio/src/main/AppMainContainer.tsx @@ -1,21 +1,21 @@ import React, { - ClipboardEvent, - ChangeEvent, + type ClipboardEvent, + type ChangeEvent, Component, - ReactElement, - RefObject, + type ReactElement, + type RefObject, } from 'react'; import classNames from 'classnames'; import memoize from 'memoize-one'; import { connect } from 'react-redux'; -import { RouteComponentProps, withRouter } from 'react-router-dom'; +import { type RouteComponentProps, withRouter } from 'react-router-dom'; import { nanoid } from 'nanoid'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { ContextActions, GLOBAL_SHORTCUTS, Popper, - ContextAction, + type ContextAction, Button, Logo, BasicModal, @@ -26,10 +26,10 @@ import { } from '@deephaven/components'; import { SHORTCUTS as IRIS_GRID_SHORTCUTS } from '@deephaven/iris-grid'; import { - CreateDashboardPayload, + type CreateDashboardPayload, DashboardUtils, DEFAULT_DASHBOARD_ID, - DehydratedDashboardPanelProps, + type DehydratedDashboardPanelProps, emitPanelOpen, getAllDashboardsData, getDashboardData, @@ -55,7 +55,7 @@ import { vsGear, dhShapes, dhPanels, vsTerminal } from '@deephaven/icons'; import { getVariableDescriptor } from '@deephaven/jsapi-bootstrap'; import dh from '@deephaven/jsapi-shim'; import type { dh as DhType } from '@deephaven/jsapi-types'; -import { SessionConfig } from '@deephaven/jsapi-utils'; +import { type SessionConfig } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; import { getActiveTool, @@ -64,12 +64,12 @@ import { setActiveTool as setActiveToolAction, updateWorkspaceData as updateWorkspaceDataAction, getPlugins, - WorkspaceData, - RootState, - User, - ServerConfigValues, - CustomizableWorkspace, - DashboardData, + type WorkspaceData, + type RootState, + type User, + type ServerConfigValues, + type CustomizableWorkspace, + type DashboardData, } from '@deephaven/redux'; import { bindAllMethods, @@ -78,12 +78,12 @@ import { EMPTY_ARRAY, assertNotNull, } from '@deephaven/utils'; -import GoldenLayout, { EventHub } from '@deephaven/golden-layout'; -import type { ItemConfig } from '@deephaven/golden-layout'; +import type GoldenLayout from '@deephaven/golden-layout'; +import type { ItemConfig, EventHub } from '@deephaven/golden-layout'; import { type PluginModuleMap, getDashboardPlugins } from '@deephaven/plugin'; import { AppDashboards, - LayoutStorage, + type LayoutStorage, UserLayoutUtils, } from '@deephaven/app-utils'; import JSZip from 'jszip'; @@ -91,7 +91,7 @@ import SettingsMenu from '../settings/SettingsMenu'; import AppControlsMenu from './AppControlsMenu'; import { getLayoutStorage, getServerConfigValues } from '../redux'; import './AppMainContainer.scss'; -import WidgetList, { WindowMouseEvent } from './WidgetList'; +import WidgetList, { type WindowMouseEvent } from './WidgetList'; import { getFormattedVersionInfo } from '../settings/SettingsUtils'; import EmptyDashboard from './EmptyDashboard'; diff --git a/packages/code-studio/src/main/AppRouter.tsx b/packages/code-studio/src/main/AppRouter.tsx index a5b0e9730..cb053ab0f 100644 --- a/packages/code-studio/src/main/AppRouter.tsx +++ b/packages/code-studio/src/main/AppRouter.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement } from 'react'; +import React, { type ReactElement } from 'react'; import { BrowserRouter as Router, Route, diff --git a/packages/code-studio/src/main/WidgetList.tsx b/packages/code-studio/src/main/WidgetList.tsx index 243b0e95d..4a444a4a1 100644 --- a/packages/code-studio/src/main/WidgetList.tsx +++ b/packages/code-studio/src/main/WidgetList.tsx @@ -1,6 +1,6 @@ import React, { - ChangeEvent, - MouseEvent, + type ChangeEvent, + type MouseEvent, useCallback, useMemo, useRef, diff --git a/packages/code-studio/src/redux/selectors.ts b/packages/code-studio/src/redux/selectors.ts index 68bce68ce..ef9b187ea 100644 --- a/packages/code-studio/src/redux/selectors.ts +++ b/packages/code-studio/src/redux/selectors.ts @@ -1,4 +1,4 @@ -import { RootState } from '@deephaven/redux'; +import { type RootState } from '@deephaven/redux'; import type { LayoutStorage } from '@deephaven/app-utils'; /** diff --git a/packages/code-studio/src/settings/ColumnSpecificSectionContent.test.tsx b/packages/code-studio/src/settings/ColumnSpecificSectionContent.test.tsx index 54463459a..c08822a3c 100644 --- a/packages/code-studio/src/settings/ColumnSpecificSectionContent.test.tsx +++ b/packages/code-studio/src/settings/ColumnSpecificSectionContent.test.tsx @@ -3,16 +3,16 @@ import { render, waitForElementToBeRemoved, } from '@testing-library/react'; -import { WorkspaceSettings } from '@deephaven/redux'; +import { type WorkspaceSettings } from '@deephaven/redux'; import userEvent from '@testing-library/user-event'; import React from 'react'; import { Formatter } from '@deephaven/jsapi-utils'; import { ApiContext } from '@deephaven/jsapi-bootstrap'; import dh from '@deephaven/jsapi-shim'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { ColumnSpecificSectionContent, - ColumnSpecificSectionContentProps, + type ColumnSpecificSectionContentProps, } from './ColumnSpecificSectionContent'; const DEFAULT_DECIMAL_STRING = '###,#00.00'; diff --git a/packages/code-studio/src/settings/ColumnSpecificSectionContent.tsx b/packages/code-studio/src/settings/ColumnSpecificSectionContent.tsx index b01142547..a39bc625c 100644 --- a/packages/code-studio/src/settings/ColumnSpecificSectionContent.tsx +++ b/packages/code-studio/src/settings/ColumnSpecificSectionContent.tsx @@ -1,8 +1,8 @@ import React, { - ChangeEvent, + type ChangeEvent, PureComponent, - ReactElement, - RefObject, + type ReactElement, + type RefObject, } from 'react'; import { connect } from 'react-redux'; import { dhNewCircleLargeFilled, vsTrash } from '@deephaven/icons'; @@ -16,8 +16,8 @@ import { IntegerColumnFormatter, DecimalColumnFormatter, TableUtils, - TableColumnFormat, - FormattingRule, + type TableColumnFormat, + type FormattingRule, } from '@deephaven/jsapi-utils'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { @@ -29,8 +29,8 @@ import { getShowTimeZone, getShowTSeparator, updateSettings as updateSettingsAction, - RootState, - WorkspaceSettings, + type RootState, + type WorkspaceSettings, } from '@deephaven/redux'; import { assertNotNull } from '@deephaven/utils'; import './FormattingSectionContent.scss'; @@ -41,7 +41,7 @@ import { isValidFormat, removeFormatRuleExtraProps, isFormatRuleValidForSave, - ValidFormatterItem, + type ValidFormatterItem, } from './SettingsUtils'; import type { FormatterItem, FormatOption } from './SettingsUtils'; import ColumnTypeOptions from './ColumnTypeOptions'; diff --git a/packages/code-studio/src/settings/ColumnTypeOptions.tsx b/packages/code-studio/src/settings/ColumnTypeOptions.tsx index 26cc34a63..96d525e86 100644 --- a/packages/code-studio/src/settings/ColumnTypeOptions.tsx +++ b/packages/code-studio/src/settings/ColumnTypeOptions.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement } from 'react'; +import React, { type ReactElement } from 'react'; import { TableUtils } from '@deephaven/jsapi-utils'; const columnTypesArray = [ diff --git a/packages/code-studio/src/settings/DateTimeOptions.tsx b/packages/code-studio/src/settings/DateTimeOptions.tsx index e797a3572..223ba7754 100644 --- a/packages/code-studio/src/settings/DateTimeOptions.tsx +++ b/packages/code-studio/src/settings/DateTimeOptions.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement, useMemo } from 'react'; +import React, { type ReactElement, useMemo } from 'react'; import { Formatter, DateTimeColumnFormatter, diff --git a/packages/code-studio/src/settings/FormattingSectionContent.test.tsx b/packages/code-studio/src/settings/FormattingSectionContent.test.tsx index 86b92c1f3..09a2ab601 100644 --- a/packages/code-studio/src/settings/FormattingSectionContent.test.tsx +++ b/packages/code-studio/src/settings/FormattingSectionContent.test.tsx @@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event'; import { ApiContext } from '@deephaven/jsapi-bootstrap'; import dh from '@deephaven/jsapi-shim'; import { DateTimeColumnFormatter } from '@deephaven/jsapi-utils'; -import { WorkspaceSettings } from '@deephaven/redux'; +import { type WorkspaceSettings } from '@deephaven/redux'; import { assertNotNull } from '@deephaven/utils'; import { FormattingSectionContent } from './FormattingSectionContent'; diff --git a/packages/code-studio/src/settings/FormattingSectionContent.tsx b/packages/code-studio/src/settings/FormattingSectionContent.tsx index 0f2bcfcd2..18a077516 100644 --- a/packages/code-studio/src/settings/FormattingSectionContent.tsx +++ b/packages/code-studio/src/settings/FormattingSectionContent.tsx @@ -1,8 +1,8 @@ import React, { - ChangeEvent, + type ChangeEvent, PureComponent, - ReactElement, - RefObject, + type ReactElement, + type RefObject, } from 'react'; import { connect } from 'react-redux'; import { vsRefresh } from '@deephaven/icons'; @@ -30,8 +30,8 @@ import { getShowNullStrings, getShowExtraGroupColumn, updateSettings as updateSettingsAction, - RootState, - WorkspaceSettings, + type RootState, + type WorkspaceSettings, getDefaultSettings, } from '@deephaven/redux'; import './FormattingSectionContent.scss'; diff --git a/packages/code-studio/src/settings/LegalNotice.tsx b/packages/code-studio/src/settings/LegalNotice.tsx index 6fc01041c..14cbd9947 100644 --- a/packages/code-studio/src/settings/LegalNotice.tsx +++ b/packages/code-studio/src/settings/LegalNotice.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement, useState } from 'react'; +import React, { type ReactElement, useState } from 'react'; import { Button, Modal, ModalBody, ModalHeader } from '@deephaven/components'; import { vsLaw } from '@deephaven/icons'; diff --git a/packages/code-studio/src/settings/SettingsMenu.tsx b/packages/code-studio/src/settings/SettingsMenu.tsx index 9041188f3..c68bfd5ae 100644 --- a/packages/code-studio/src/settings/SettingsMenu.tsx +++ b/packages/code-studio/src/settings/SettingsMenu.tsx @@ -1,4 +1,9 @@ -import React, { Component, Fragment, ReactElement, RefObject } from 'react'; +import React, { + Component, + Fragment, + type ReactElement, + type RefObject, +} from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { vsClose, @@ -19,13 +24,13 @@ import { Logo, Tooltip, } from '@deephaven/components'; -import { ServerConfigValues, User } from '@deephaven/redux'; +import { type ServerConfigValues, type User } from '@deephaven/redux'; import { BROADCAST_CHANNEL_NAME, BROADCAST_LOGOUT_MESSAGE, makeMessage, } from '@deephaven/jsapi-utils'; -import { PluginModuleMap } from '@deephaven/plugin'; +import { type PluginModuleMap } from '@deephaven/plugin'; import FormattingSectionContent from './FormattingSectionContent'; import LegalNotice from './LegalNotice'; import SettingsMenuSection from './SettingsMenuSection'; diff --git a/packages/code-studio/src/settings/SettingsMenuSection.tsx b/packages/code-studio/src/settings/SettingsMenuSection.tsx index 5ea551316..caf4b0a39 100644 --- a/packages/code-studio/src/settings/SettingsMenuSection.tsx +++ b/packages/code-studio/src/settings/SettingsMenuSection.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement, ReactNode } from 'react'; +import React, { type ReactElement, type ReactNode } from 'react'; import PropTypes from 'prop-types'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button, Collapse } from '@deephaven/components'; diff --git a/packages/code-studio/src/settings/SettingsUtils.tsx b/packages/code-studio/src/settings/SettingsUtils.tsx index 653f82d20..a05da3544 100644 --- a/packages/code-studio/src/settings/SettingsUtils.tsx +++ b/packages/code-studio/src/settings/SettingsUtils.tsx @@ -3,14 +3,14 @@ import { DateTimeColumnFormatter, IntegerColumnFormatter, DecimalColumnFormatter, - TableColumnFormat, - FormattingRule, + type TableColumnFormat, + type FormattingRule, } from '@deephaven/jsapi-utils'; import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; import type { ServerConfigValues } from '@deephaven/redux'; import Bowser from 'bowser'; -import { PluginModuleMap } from '@deephaven/plugin'; +import { type PluginModuleMap } from '@deephaven/plugin'; const log = Log.module('SettingsUtils'); diff --git a/packages/code-studio/src/settings/ShortcutsSectionContent.tsx b/packages/code-studio/src/settings/ShortcutsSectionContent.tsx index 2b8cc5ec3..1de5667aa 100644 --- a/packages/code-studio/src/settings/ShortcutsSectionContent.tsx +++ b/packages/code-studio/src/settings/ShortcutsSectionContent.tsx @@ -3,9 +3,9 @@ import { connect } from 'react-redux'; import { Shortcut, ShortcutRegistry } from '@deephaven/components'; import { getShortcutOverrides, - RootState, + type RootState, updateSettings as updateSettingsAction, - WorkspaceSettings, + type WorkspaceSettings, } from '@deephaven/redux'; import ShortcutItem from './ShortcutItem'; diff --git a/packages/code-studio/src/settings/ThemeSectionContent.tsx b/packages/code-studio/src/settings/ThemeSectionContent.tsx index 0293c3497..ed7fdbcc3 100644 --- a/packages/code-studio/src/settings/ThemeSectionContent.tsx +++ b/packages/code-studio/src/settings/ThemeSectionContent.tsx @@ -1,7 +1,7 @@ import React, { useCallback } from 'react'; import { Item, - ItemKey, + type ItemKey, Picker, ThemePicker, useTheme, diff --git a/packages/code-studio/src/styleguide/Buttons.tsx b/packages/code-studio/src/styleguide/Buttons.tsx index c02a27f4c..6fb3c5c9e 100644 --- a/packages/code-studio/src/styleguide/Buttons.tsx +++ b/packages/code-studio/src/styleguide/Buttons.tsx @@ -1,4 +1,4 @@ -import React, { Component, ReactElement } from 'react'; +import React, { Component, type ReactElement } from 'react'; import { Button, SocketedButton, diff --git a/packages/code-studio/src/styleguide/Charts.tsx b/packages/code-studio/src/styleguide/Charts.tsx index 86a02d4b1..289e1bd0f 100644 --- a/packages/code-studio/src/styleguide/Charts.tsx +++ b/packages/code-studio/src/styleguide/Charts.tsx @@ -1,5 +1,5 @@ -import React, { ReactElement, useState } from 'react'; -import { Chart, ChartModel, MockChartModel } from '@deephaven/chart'; +import React, { type ReactElement, useState } from 'react'; +import { Chart, type ChartModel, MockChartModel } from '@deephaven/chart'; import { useApi } from '@deephaven/jsapi-bootstrap'; import { useSeededRandomNumberCallback } from './utils'; import SampleSection from './SampleSection'; diff --git a/packages/code-studio/src/styleguide/ContextMenus.tsx b/packages/code-studio/src/styleguide/ContextMenus.tsx index f8b75f263..4918079ed 100644 --- a/packages/code-studio/src/styleguide/ContextMenus.tsx +++ b/packages/code-studio/src/styleguide/ContextMenus.tsx @@ -6,14 +6,14 @@ import { ContextActions, KEY, MODIFIER, - ResolvableContextAction, + type ResolvableContextAction, Shortcut, } from '@deephaven/components'; import { vsBell, dhFilePrint, vsQuestion, - IconDefinition, + type IconDefinition, } from '@deephaven/icons'; import SampleSection from './SampleSection'; diff --git a/packages/code-studio/src/styleguide/Dialog.tsx b/packages/code-studio/src/styleguide/Dialog.tsx index c456f93bc..8ed0fdc17 100644 --- a/packages/code-studio/src/styleguide/Dialog.tsx +++ b/packages/code-studio/src/styleguide/Dialog.tsx @@ -4,7 +4,7 @@ import React, { Component } from 'react'; import { HierarchicalCheckboxMenu, Popper, - HierarchicalCheckboxValueMap, + type HierarchicalCheckboxValueMap, Button, } from '@deephaven/components'; import SampleSection from './SampleSection'; diff --git a/packages/code-studio/src/styleguide/DraggableListInput.tsx b/packages/code-studio/src/styleguide/DraggableListInput.tsx index b3f4ff527..cb467c8d7 100644 --- a/packages/code-studio/src/styleguide/DraggableListInput.tsx +++ b/packages/code-studio/src/styleguide/DraggableListInput.tsx @@ -1,9 +1,9 @@ /* eslint no-console: "off" */ import React, { PureComponent } from 'react'; -import PropTypes from 'prop-types'; +import type PropTypes from 'prop-types'; import memoize from 'memoize-one'; import { DraggableItemList } from '@deephaven/components'; -import { Range } from '@deephaven/utils'; +import { type Range } from '@deephaven/utils'; interface DraggableListInputProps { draggablePrefix: string; diff --git a/packages/code-studio/src/styleguide/DraggableLists.tsx b/packages/code-studio/src/styleguide/DraggableLists.tsx index a1be4ec29..9ef488da7 100644 --- a/packages/code-studio/src/styleguide/DraggableLists.tsx +++ b/packages/code-studio/src/styleguide/DraggableLists.tsx @@ -2,12 +2,16 @@ import React, { Component } from 'react'; import { DragDropContext, - DragStart, - DragUpdate, - DropResult, + type DragStart, + type DragUpdate, + type DropResult, } from 'react-beautiful-dnd'; import memoize from 'memoizee'; -import { DragUtils, DraggableItemList, Range } from '@deephaven/components'; +import { + DragUtils, + DraggableItemList, + type Range, +} from '@deephaven/components'; import DraggableListInput from './DraggableListInput'; import SampleSection from './SampleSection'; diff --git a/packages/code-studio/src/styleguide/DropdownMenus.tsx b/packages/code-studio/src/styleguide/DropdownMenus.tsx index b82be5af3..df3801bc6 100644 --- a/packages/code-studio/src/styleguide/DropdownMenus.tsx +++ b/packages/code-studio/src/styleguide/DropdownMenus.tsx @@ -8,7 +8,7 @@ import { KEY, MODIFIER, Shortcut, - DropdownAction, + type DropdownAction, Button, } from '@deephaven/components'; import { diff --git a/packages/code-studio/src/styleguide/ErrorViews.tsx b/packages/code-studio/src/styleguide/ErrorViews.tsx index 46f95e4a5..a26f068e4 100644 --- a/packages/code-studio/src/styleguide/ErrorViews.tsx +++ b/packages/code-studio/src/styleguide/ErrorViews.tsx @@ -1,5 +1,5 @@ /* eslint no-alert: "off" */ -import React, { CSSProperties } from 'react'; +import React, { type CSSProperties } from 'react'; import { ErrorView } from '@deephaven/components'; import SampleSection from './SampleSection'; diff --git a/packages/code-studio/src/styleguide/Grids.tsx b/packages/code-studio/src/styleguide/Grids.tsx index 348197cdd..9afe14772 100644 --- a/packages/code-studio/src/styleguide/Grids.tsx +++ b/packages/code-studio/src/styleguide/Grids.tsx @@ -1,7 +1,7 @@ -import React, { ReactElement, useState } from 'react'; +import React, { type ReactElement, useState } from 'react'; import { Grid, - GridThemeType, + type GridThemeType, MockGridModel, MockTreeGridModel, ThemeContext, diff --git a/packages/code-studio/src/styleguide/Icons.tsx b/packages/code-studio/src/styleguide/Icons.tsx index 27e982845..1fec8de74 100644 --- a/packages/code-studio/src/styleguide/Icons.tsx +++ b/packages/code-studio/src/styleguide/Icons.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import { dh, - IconDefinition, + type IconDefinition, vsOrganization, dhSquareFilled, dhAddSmall, diff --git a/packages/code-studio/src/styleguide/ItemListInput.tsx b/packages/code-studio/src/styleguide/ItemListInput.tsx index a757eb55f..36cc47f92 100644 --- a/packages/code-studio/src/styleguide/ItemListInput.tsx +++ b/packages/code-studio/src/styleguide/ItemListInput.tsx @@ -1,6 +1,6 @@ /* eslint no-console: "off" */ import React, { PureComponent } from 'react'; -import PropTypes from 'prop-types'; +import type PropTypes from 'prop-types'; import { ItemList } from '@deephaven/components'; interface ItemListInput { diff --git a/packages/code-studio/src/styleguide/ListViews.tsx b/packages/code-studio/src/styleguide/ListViews.tsx index fc97ced5c..a463b29fa 100644 --- a/packages/code-studio/src/styleguide/ListViews.tsx +++ b/packages/code-studio/src/styleguide/ListViews.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode, useCallback, useState } from 'react'; +import React, { type ReactNode, useCallback, useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import type { BoxAlignmentStyleProps, StyleProps } from '@react-types/shared'; import { @@ -8,11 +8,11 @@ import { LIST_VIEW_ROW_HEIGHTS, ListView, ListViewNormalized, - ItemKey, + type ItemKey, Text, Flex, Checkbox, - ListViewProps, + type ListViewProps, RadioGroup, Radio, useSpectrumThemeProvider, diff --git a/packages/code-studio/src/styleguide/MockIrisGridTreeModel.ts b/packages/code-studio/src/styleguide/MockIrisGridTreeModel.ts index 83cd31792..3284f120c 100644 --- a/packages/code-studio/src/styleguide/MockIrisGridTreeModel.ts +++ b/packages/code-studio/src/styleguide/MockIrisGridTreeModel.ts @@ -1,25 +1,25 @@ /* eslint class-methods-use-this: "off" */ /* eslint no-unused-vars: "off" */ /* eslint no-empty-function: "off" */ -import { EventTarget, Event } from 'event-target-shim'; +import { type EventTarget, type Event } from 'event-target-shim'; import memoize from 'memoize-one'; import { - EditableGridModel, - EditOperation, - ExpandableGridModel, + type EditableGridModel, + type EditOperation, + type ExpandableGridModel, GridRange, MockTreeGridModel, - ModelIndex, - MoveOperation, + type ModelIndex, + type MoveOperation, } from '@deephaven/grid'; import { IrisGridModel, - PendingDataMap, - UITreeRow, - ColumnHeaderGroup, + type PendingDataMap, + type UITreeRow, + type ColumnHeaderGroup, } from '@deephaven/iris-grid'; import type { dh as DhType } from '@deephaven/jsapi-types'; -import { Formatter } from '@deephaven/jsapi-utils'; +import { type Formatter } from '@deephaven/jsapi-utils'; // We need to cast our CustomEvent so it's happy with event-target-shim type CustomEventType = EventTarget.EventData< diff --git a/packages/code-studio/src/styleguide/Navigations.tsx b/packages/code-studio/src/styleguide/Navigations.tsx index 96e5bfb53..a73172e97 100644 --- a/packages/code-studio/src/styleguide/Navigations.tsx +++ b/packages/code-studio/src/styleguide/Navigations.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { vsFile, dhTruck, vsListUnordered } from '@deephaven/icons'; -import { IconProp } from '@fortawesome/fontawesome-svg-core'; +import { type IconProp } from '@fortawesome/fontawesome-svg-core'; import { Menu, NavTabList, diff --git a/packages/code-studio/src/styleguide/Pickers.tsx b/packages/code-studio/src/styleguide/Pickers.tsx index 40838ab50..3161241ab 100644 --- a/packages/code-studio/src/styleguide/Pickers.tsx +++ b/packages/code-studio/src/styleguide/Pickers.tsx @@ -6,7 +6,7 @@ import { Flex, Icon, Item, - ItemKey, + type ItemKey, PICKER_ITEM_HEIGHTS, PICKER_TOP_OFFSET, Picker, diff --git a/packages/code-studio/src/styleguide/SampleSection.tsx b/packages/code-studio/src/styleguide/SampleSection.tsx index 05617cc2b..f0b843267 100644 --- a/packages/code-studio/src/styleguide/SampleSection.tsx +++ b/packages/code-studio/src/styleguide/SampleSection.tsx @@ -1,6 +1,6 @@ -import { Flex, Grid, View } from '@deephaven/components'; +import { type Flex, type Grid, type View } from '@deephaven/components'; import type { StyleProps } from '@react-types/shared'; -import React, { CSSProperties, ReactNode } from 'react'; +import React, { type CSSProperties, type ReactNode } from 'react'; import { getSectionIdFromName, sampleSectionIdAndClasses, diff --git a/packages/code-studio/src/styleguide/SamplesMenu.tsx b/packages/code-studio/src/styleguide/SamplesMenu.tsx index 3f6bcdd70..8e97d026a 100644 --- a/packages/code-studio/src/styleguide/SamplesMenu.tsx +++ b/packages/code-studio/src/styleguide/SamplesMenu.tsx @@ -1,4 +1,4 @@ -import React, { Key, useCallback, useEffect, useState } from 'react'; +import React, { type Key, useCallback, useEffect, useState } from 'react'; // eslint-disable-next-line no-restricted-imports import { ActionButton, diff --git a/packages/code-studio/src/styleguide/SpectrumComparison.tsx b/packages/code-studio/src/styleguide/SpectrumComparison.tsx index 97778a6fb..95ab5d5d5 100644 --- a/packages/code-studio/src/styleguide/SpectrumComparison.tsx +++ b/packages/code-studio/src/styleguide/SpectrumComparison.tsx @@ -10,7 +10,7 @@ import { Icon, Item, Picker, - SpectrumButtonProps, + type SpectrumButtonProps, TextField, } from '@adobe/react-spectrum'; import { diff --git a/packages/code-studio/src/styleguide/StyleGuide.test.tsx b/packages/code-studio/src/styleguide/StyleGuide.test.tsx index 28355f263..7fb563ad2 100644 --- a/packages/code-studio/src/styleguide/StyleGuide.test.tsx +++ b/packages/code-studio/src/styleguide/StyleGuide.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import { ChartThemeProvider } from '@deephaven/chart'; -import { ThemeData, ThemeProvider } from '@deephaven/components'; +import { type ThemeData, ThemeProvider } from '@deephaven/components'; import { dh } from '@deephaven/jsapi-shim'; import { ApiContext } from '@deephaven/jsapi-bootstrap'; import StyleGuide from './StyleGuide'; diff --git a/packages/code-studio/src/styleguide/StyleGuideInit.tsx b/packages/code-studio/src/styleguide/StyleGuideInit.tsx index 34ae9809a..2b367d389 100644 --- a/packages/code-studio/src/styleguide/StyleGuideInit.tsx +++ b/packages/code-studio/src/styleguide/StyleGuideInit.tsx @@ -2,10 +2,10 @@ import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { - CustomizableWorkspace, + type CustomizableWorkspace, getWorkspace, - PayloadActionCreator, - RootState, + type PayloadActionCreator, + type RootState, setWorkspace as setWorkspaceAction, } from '@deephaven/redux'; import { diff --git a/packages/code-studio/src/styleguide/Swatch.tsx b/packages/code-studio/src/styleguide/Swatch.tsx index abfef13c2..415d2c32f 100644 --- a/packages/code-studio/src/styleguide/Swatch.tsx +++ b/packages/code-studio/src/styleguide/Swatch.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode, useMemo } from 'react'; +import React, { type ReactNode, useMemo } from 'react'; import { Tooltip } from '@deephaven/components'; import { INVALID_COLOR_BORDER_STYLE } from './colorUtils'; import { useContrastFgColorRef, useDhColorFromPseudoContent } from './hooks'; diff --git a/packages/code-studio/src/styleguide/grid-examples/AsyncExample.tsx b/packages/code-studio/src/styleguide/grid-examples/AsyncExample.tsx index 5aa264d25..a44c5835b 100644 --- a/packages/code-studio/src/styleguide/grid-examples/AsyncExample.tsx +++ b/packages/code-studio/src/styleguide/grid-examples/AsyncExample.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; -import { Grid, GridMetrics, ViewportDataGridModel } from '@deephaven/grid'; +import { Grid, type GridMetrics, ViewportDataGridModel } from '@deephaven/grid'; /** * An example showing data loading asnychronously for a grid. diff --git a/packages/code-studio/src/styleguide/utils.ts b/packages/code-studio/src/styleguide/utils.ts index baf676f44..aa2afb857 100644 --- a/packages/code-studio/src/styleguide/utils.ts +++ b/packages/code-studio/src/styleguide/utils.ts @@ -1,6 +1,10 @@ import { createElement, useCallback, useEffect, useState } from 'react'; import cl from 'classnames'; -import { Item, ItemElement, NormalizedItem } from '@deephaven/components'; +import { + Item, + type ItemElement, + type NormalizedItem, +} from '@deephaven/components'; import { dh as dhIcons } from '@deephaven/icons'; export const ISOLATED_SECTION_QUERY_CLASS = 'isolated-section-query'; diff --git a/packages/code-studio/tsconfig.json b/packages/code-studio/tsconfig.json index ab01ecd77..80a30194e 100644 --- a/packages/code-studio/tsconfig.json +++ b/packages/code-studio/tsconfig.json @@ -32,6 +32,7 @@ { "path": "../redux" }, { "path": "../storage" }, { "path": "../utils" }, - { "path": "../filters" } + { "path": "../filters" }, + { "path": "../test-utils" } ] } diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index eda52e58b..cfea20e16 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -3,6 +3,39 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Bug Fixes + +- Widget panel fixes ([#2227](https://github.com/deephaven/web-client-ui/issues/2227)) ([c985e12](https://github.com/deephaven/web-client-ui/commit/c985e1274097860dcbf4690ac8412c9f84831209)) + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +### Features + +- Add clickOutside prop to Modal ([#2214](https://github.com/deephaven/web-client-ui/issues/2214)) ([d78ad6d](https://github.com/deephaven/web-client-ui/commit/d78ad6d0e883a4c4c76078ae8b09c611fab35ae9)) + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) ### Features diff --git a/packages/components/package.json b/packages/components/package.json index 5ebbbac74..bfc460be2 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/components", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven React component library", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -59,6 +59,7 @@ }, "devDependencies": { "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils", "react-redux": "^7.2.4" }, "files": [ diff --git a/packages/components/src/AutoCompleteInput.tsx b/packages/components/src/AutoCompleteInput.tsx index e44a1a1ef..8379f1c99 100644 --- a/packages/components/src/AutoCompleteInput.tsx +++ b/packages/components/src/AutoCompleteInput.tsx @@ -21,7 +21,7 @@ import PropTypes from 'prop-types'; import memoize from 'memoizee'; import classNames from 'classnames'; import debounce from 'lodash.debounce'; -import { PopperOptions } from 'popper.js'; +import { type PopperOptions } from 'popper.js'; import { Popper } from './popper'; import './AutoCompleteInput.scss'; diff --git a/packages/components/src/BasicModal.test.tsx b/packages/components/src/BasicModal.test.tsx index 419dfd573..b58c4bb33 100644 --- a/packages/components/src/BasicModal.test.tsx +++ b/packages/components/src/BasicModal.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import userEvent from '@testing-library/user-event'; import { render } from '@testing-library/react'; -import BasicModal, { BasicModalProps } from './BasicModal'; +import BasicModal, { type BasicModalProps } from './BasicModal'; const DEFAULT_BODY_TEXT = 'DEFAULT_TEXT'; const DEFAULT_TEST_ID = 'DEFAULT_TEST_ID'; diff --git a/packages/components/src/BulkActionBar.tsx b/packages/components/src/BulkActionBar.tsx index df6d03551..123585274 100644 --- a/packages/components/src/BulkActionBar.tsx +++ b/packages/components/src/BulkActionBar.tsx @@ -1,7 +1,13 @@ -import type { StyleProps } from '@react-types/shared'; +import type { ItemElement, StyleProps } from '@react-types/shared'; import { ActionBar } from './spectrum'; import commonStyles from './SpectrumComponent.module.scss'; +// The action bar will still show the item count + a clear selection button +// even if there are no actions. Our only consumer is currently the ACL Editor, +// but group action functionality has not yet been prioritized (see DH-15221). +// For now we'll just pass it an empty action items array. +const noActions: ItemElement[] = []; + export interface BulkActionBarProps { styleProps?: StyleProps; selectedItemCount: 'all' | number; @@ -22,7 +28,7 @@ export function BulkActionBar({ selectedItemCount={selectedItemCount} onClearSelection={onClearSelection} > - {/* */} + {noActions} ); } diff --git a/packages/components/src/Button.tsx b/packages/components/src/Button.tsx index a516ed59a..57e5014d1 100644 --- a/packages/components/src/Button.tsx +++ b/packages/components/src/Button.tsx @@ -3,7 +3,7 @@ import { useSlotProps } from '@react-spectrum/utils'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { IconDefinition } from '@fortawesome/fontawesome-svg-core'; +import { type IconDefinition } from '@fortawesome/fontawesome-svg-core'; import { Tooltip } from './popper'; const BUTTON_KINDS = [ diff --git a/packages/components/src/CardFlip.tsx b/packages/components/src/CardFlip.tsx index c1d7ec134..d2537d8ed 100644 --- a/packages/components/src/CardFlip.tsx +++ b/packages/components/src/CardFlip.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode, useCallback, useEffect, useRef } from 'react'; +import React, { type ReactNode, useCallback, useEffect, useRef } from 'react'; import classNames from 'classnames'; import './CardFlip.scss'; diff --git a/packages/components/src/ComponentUtils.test.tsx b/packages/components/src/ComponentUtils.test.tsx index bd347b81a..c16dcc942 100644 --- a/packages/components/src/ComponentUtils.test.tsx +++ b/packages/components/src/ComponentUtils.test.tsx @@ -1,4 +1,4 @@ -import React, { PropsWithChildren } from 'react'; +import React, { type PropsWithChildren } from 'react'; // We only use react-redux from tests in @deephaven/components, so it is only added as a devDependency import { connect } from 'react-redux'; import { diff --git a/packages/components/src/ComponentUtils.ts b/packages/components/src/ComponentUtils.ts index c63e66372..3de334fde 100644 --- a/packages/components/src/ComponentUtils.ts +++ b/packages/components/src/ComponentUtils.ts @@ -1,8 +1,9 @@ -import React, { - ComponentType, - ForwardRefExoticComponent, - RefAttributes, +import { + type ComponentType, + type ForwardRefExoticComponent, + type RefAttributes, } from 'react'; +import type React from 'react'; import { ForwardRef } from 'react-is'; export type Props = Record | RefAttributes; diff --git a/packages/components/src/CopyButton.tsx b/packages/components/src/CopyButton.tsx index b3ffedd1c..c6b34ea4c 100644 --- a/packages/components/src/CopyButton.tsx +++ b/packages/components/src/CopyButton.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { vsPassFilled, vsCopy } from '@deephaven/icons'; import { useCopyToClipboard } from '@deephaven/react-hooks'; -import Button, { ButtonKind } from './Button'; +import Button, { type ButtonKind } from './Button'; type CopyButtonProps = { /** The value to copy when clicked, accepts string or function returning a string. */ diff --git a/packages/components/src/CustomTimeSelect.tsx b/packages/components/src/CustomTimeSelect.tsx index 3dacf2490..b932b1276 100644 --- a/packages/components/src/CustomTimeSelect.tsx +++ b/packages/components/src/CustomTimeSelect.tsx @@ -1,10 +1,10 @@ import React, { Component } from 'react'; -import { PopperOptions } from 'popper.js'; +import { type PopperOptions } from 'popper.js'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { vsCheck, IconDefinition } from '@deephaven/icons'; +import { vsCheck, type IconDefinition } from '@deephaven/icons'; import { TimeUtils } from '@deephaven/utils'; import classNames from 'classnames'; -import TimeInput, { TimeInputElement } from './TimeInput'; +import TimeInput, { type TimeInputElement } from './TimeInput'; import DropdownMenu from './menu-actions/DropdownMenu'; import './CustomTimeSelect.scss'; diff --git a/packages/components/src/DateInput.tsx b/packages/components/src/DateInput.tsx index e3bdad97a..2da4791d3 100644 --- a/packages/components/src/DateInput.tsx +++ b/packages/components/src/DateInput.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useState } from 'react'; import classNames from 'classnames'; import Log from '@deephaven/log'; -import MaskedInput, { SelectionSegment } from './MaskedInput'; +import MaskedInput, { type SelectionSegment } from './MaskedInput'; import { getNextSegmentValue } from './DateInputUtils'; const log = Log.module('DateInput'); diff --git a/packages/components/src/DateInputUtils.ts b/packages/components/src/DateInputUtils.ts index d941f3b42..900c0d0a2 100644 --- a/packages/components/src/DateInputUtils.ts +++ b/packages/components/src/DateInputUtils.ts @@ -1,4 +1,4 @@ -import { SelectionSegment } from './MaskedInput'; +import { type SelectionSegment } from './MaskedInput'; export function getNextNumberSegmentValue( delta: number, diff --git a/packages/components/src/DateTimeInput.tsx b/packages/components/src/DateTimeInput.tsx index 9a0f31288..0acb02d55 100644 --- a/packages/components/src/DateTimeInput.tsx +++ b/packages/components/src/DateTimeInput.tsx @@ -1,7 +1,7 @@ -import React, { KeyboardEvent, useCallback, useState } from 'react'; +import React, { type KeyboardEvent, useCallback, useState } from 'react'; import classNames from 'classnames'; import Log from '@deephaven/log'; -import MaskedInput, { SelectionSegment } from './MaskedInput'; +import MaskedInput, { type SelectionSegment } from './MaskedInput'; import { getNextSegmentValue } from './DateInputUtils'; import { addSeparators } from './DateTimeInputUtils'; diff --git a/packages/components/src/DraggableItemList.tsx b/packages/components/src/DraggableItemList.tsx index 41e858139..816a2d045 100644 --- a/packages/components/src/DraggableItemList.tsx +++ b/packages/components/src/DraggableItemList.tsx @@ -1,14 +1,18 @@ import React, { PureComponent } from 'react'; import classNames from 'classnames'; import memoize from 'memoizee'; -import { Draggable, Droppable, DraggableChildrenFn } from 'react-beautiful-dnd'; +import { + Draggable, + Droppable, + type DraggableChildrenFn, +} from 'react-beautiful-dnd'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { vsGripper } from '@deephaven/icons'; -import { RangeUtils, Range } from '@deephaven/utils'; +import { RangeUtils, type Range } from '@deephaven/utils'; import ItemList, { - RenderItemProps, - DefaultListItem, - ItemListProps, + type RenderItemProps, + type DefaultListItem, + type ItemListProps, } from './ItemList'; import { Tooltip } from './popper'; import './DraggableItemList.scss'; diff --git a/packages/components/src/EditableItemList.test.tsx b/packages/components/src/EditableItemList.test.tsx index 8436aab80..d3b3da560 100644 --- a/packages/components/src/EditableItemList.test.tsx +++ b/packages/components/src/EditableItemList.test.tsx @@ -1,7 +1,9 @@ import React from 'react'; import { fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import EditableItemList, { EditableItemListProps } from './EditableItemList'; +import EditableItemList, { + type EditableItemListProps, +} from './EditableItemList'; const INVALID_INPUT_CLASS = 'is-invalid'; diff --git a/packages/components/src/EditableItemList.tsx b/packages/components/src/EditableItemList.tsx index 1c6f448d7..3a847078a 100644 --- a/packages/components/src/EditableItemList.tsx +++ b/packages/components/src/EditableItemList.tsx @@ -1,6 +1,6 @@ import React, { - ChangeEvent, - KeyboardEvent, + type ChangeEvent, + type KeyboardEvent, useCallback, useMemo, useState, @@ -8,7 +8,7 @@ import React, { import classNames from 'classnames'; import clamp from 'lodash.clamp'; import { vsAdd, vsTrash } from '@deephaven/icons'; -import { Range, RangeUtils } from '@deephaven/utils'; +import { type Range, RangeUtils } from '@deephaven/utils'; import Button from './Button'; import ItemList from './ItemList'; diff --git a/packages/components/src/ErrorBoundary.test.tsx b/packages/components/src/ErrorBoundary.test.tsx index 9bacb698e..5d6015e6f 100644 --- a/packages/components/src/ErrorBoundary.test.tsx +++ b/packages/components/src/ErrorBoundary.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TestUtils } from '@deephaven/utils'; -import ErrorBoundary, { ErrorBoundaryProps } from './ErrorBoundary'; +import { TestUtils } from '@deephaven/test-utils'; +import ErrorBoundary, { type ErrorBoundaryProps } from './ErrorBoundary'; function ThrowComponent(): JSX.Element { throw new Error('Test error'); diff --git a/packages/components/src/ErrorBoundary.tsx b/packages/components/src/ErrorBoundary.tsx index cbf803cf0..1053dc084 100644 --- a/packages/components/src/ErrorBoundary.tsx +++ b/packages/components/src/ErrorBoundary.tsx @@ -1,5 +1,5 @@ import Log from '@deephaven/log'; -import React, { Component, ReactNode } from 'react'; +import React, { Component, type ReactNode } from 'react'; import LoadingOverlay from './LoadingOverlay'; const log = Log.module('ErrorBoundary'); diff --git a/packages/components/src/HierarchicalCheckboxMenu.tsx b/packages/components/src/HierarchicalCheckboxMenu.tsx index 5327e3c7a..0fbcd0485 100644 --- a/packages/components/src/HierarchicalCheckboxMenu.tsx +++ b/packages/components/src/HierarchicalCheckboxMenu.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { IconDefinition } from '@deephaven/icons'; +import { type IconDefinition } from '@deephaven/icons'; import classNames from 'classnames'; import Checkbox from './Checkbox'; import Popper from './popper/Popper'; diff --git a/packages/components/src/ItemList.test.tsx b/packages/components/src/ItemList.test.tsx index 64ffae022..35259c6af 100644 --- a/packages/components/src/ItemList.test.tsx +++ b/packages/components/src/ItemList.test.tsx @@ -1,5 +1,6 @@ import React from 'react'; -import { Range, TestUtils, ClickOptions } from '@deephaven/utils'; +import { type Range } from '@deephaven/utils'; +import { type ClickOptions, TestUtils } from '@deephaven/test-utils'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import ItemList from './ItemList'; diff --git a/packages/components/src/ItemList.tsx b/packages/components/src/ItemList.tsx index ed4364d2d..1859e3649 100644 --- a/packages/components/src/ItemList.tsx +++ b/packages/components/src/ItemList.tsx @@ -3,12 +3,12 @@ import React, { PureComponent } from 'react'; import memoize from 'memoizee'; import { FixedSizeList as List, - ListOnItemsRenderedProps, - ListOnScrollProps, + type ListOnItemsRenderedProps, + type ListOnScrollProps, } from 'react-window'; -import AutoSizer, { Size } from 'react-virtualized-auto-sizer'; +import AutoSizer, { type Size } from 'react-virtualized-auto-sizer'; import Log from '@deephaven/log'; -import { RangeUtils, Range } from '@deephaven/utils'; +import { RangeUtils, type Range } from '@deephaven/utils'; import ItemListItem from './ItemListItem'; import { ContextActionUtils } from './context-actions'; import './ItemList.scss'; diff --git a/packages/components/src/MaskedInput.tsx b/packages/components/src/MaskedInput.tsx index e5ffb4475..8d2f7e213 100644 --- a/packages/components/src/MaskedInput.tsx +++ b/packages/components/src/MaskedInput.tsx @@ -1,4 +1,9 @@ -import React, { useMemo, useEffect, useCallback, KeyboardEvent } from 'react'; +import React, { + useMemo, + useEffect, + useCallback, + type KeyboardEvent, +} from 'react'; import classNames from 'classnames'; import Log from '@deephaven/log'; import { useForwardedRef } from '@deephaven/react-hooks'; diff --git a/packages/components/src/Option.tsx b/packages/components/src/Option.tsx index 0d85d7048..e7a8f9b15 100644 --- a/packages/components/src/Option.tsx +++ b/packages/components/src/Option.tsx @@ -1,4 +1,4 @@ -import React, { OptionHTMLAttributes } from 'react'; +import React, { type OptionHTMLAttributes } from 'react'; export type OptionProps = OptionHTMLAttributes & { children: React.ReactNode; diff --git a/packages/components/src/SearchableCombobox.tsx b/packages/components/src/SearchableCombobox.tsx index ddb5f23b1..7f74c8818 100644 --- a/packages/components/src/SearchableCombobox.tsx +++ b/packages/components/src/SearchableCombobox.tsx @@ -1,7 +1,7 @@ /* eslint-disable react/jsx-props-no-spreading */ -import { Key, useCallback } from 'react'; +import { type Key, useCallback } from 'react'; import type { DOMRefValue, FocusableRef } from '@react-types/shared'; -import { SpectrumComboBox, Item, SpectrumComboBoxProps } from './spectrum'; +import { SpectrumComboBox, Item, type SpectrumComboBoxProps } from './spectrum'; import TextWithTooltip from './TextWithTooltip'; export interface SearchableComboboxProps diff --git a/packages/components/src/TextWithTooltip.tsx b/packages/components/src/TextWithTooltip.tsx index ef83d7af0..399615bed 100644 --- a/packages/components/src/TextWithTooltip.tsx +++ b/packages/components/src/TextWithTooltip.tsx @@ -1,7 +1,7 @@ import { useMemo } from 'react'; import { Text } from './spectrum'; import stylesCommon from './SpectrumComponent.module.scss'; -import { PopperOptions, Tooltip } from './popper'; +import { type PopperOptions, Tooltip } from './popper'; export interface TextWithTooltipProps { text?: string | null; diff --git a/packages/components/src/TimeInput.test.tsx b/packages/components/src/TimeInput.test.tsx index 6926e0bce..1e1e2e6df 100644 --- a/packages/components/src/TimeInput.test.tsx +++ b/packages/components/src/TimeInput.test.tsx @@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { TimeUtils } from '@deephaven/utils'; import type { SelectionSegment } from './MaskedInput'; -import TimeInput, { TimeInputElement } from './TimeInput'; +import TimeInput, { type TimeInputElement } from './TimeInput'; type SelectionDirection = SelectionSegment['selectionDirection']; diff --git a/packages/components/src/TimeInput.tsx b/packages/components/src/TimeInput.tsx index 3176c7251..12c5671da 100644 --- a/packages/components/src/TimeInput.tsx +++ b/packages/components/src/TimeInput.tsx @@ -7,7 +7,7 @@ import React, { } from 'react'; import Log from '@deephaven/log'; import { TimeUtils } from '@deephaven/utils'; -import MaskedInput, { SelectionSegment } from './MaskedInput'; +import MaskedInput, { type SelectionSegment } from './MaskedInput'; import { DEFAULT_GET_PREFERRED_REPLACEMENT_STRING } from './MaskedInputUtils'; export type { SelectionSegment } from './MaskedInput'; diff --git a/packages/components/src/TimeSlider.tsx b/packages/components/src/TimeSlider.tsx index 397947138..76232d4b9 100644 --- a/packages/components/src/TimeSlider.tsx +++ b/packages/components/src/TimeSlider.tsx @@ -9,7 +9,10 @@ import React, { useEffect, } from 'react'; import classNames from 'classnames'; -import TimeInput, { SelectionSegment, TimeInputElement } from './TimeInput'; +import TimeInput, { + type SelectionSegment, + type TimeInputElement, +} from './TimeInput'; import StyleExports from './TimeSlider.module.scss'; import './TimeSlider.scss'; diff --git a/packages/components/src/UISwitch.test.tsx b/packages/components/src/UISwitch.test.tsx index 6be0b9180..d3aa6ae49 100644 --- a/packages/components/src/UISwitch.test.tsx +++ b/packages/components/src/UISwitch.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import UISwitch, { UISwitchProps } from './UISwitch'; +import UISwitch, { type UISwitchProps } from './UISwitch'; function makeUISwitch({ 'data-testid': dataTestId = 'TestUISwitch', diff --git a/packages/components/src/XComponent.tsx b/packages/components/src/XComponent.tsx index 0f1c9c0cb..9fb84c1e5 100644 --- a/packages/components/src/XComponent.tsx +++ b/packages/components/src/XComponent.tsx @@ -1,6 +1,6 @@ -import React, { ComponentType, forwardRef } from 'react'; +import React, { type ComponentType, forwardRef } from 'react'; import { canHaveRef } from './ComponentUtils'; -import { useXComponent, XComponentType } from './XComponentMap'; +import { useXComponent, type XComponentType } from './XComponentMap'; /** * Helper function that will wrap the provided component, and return an ExtendableComponent type. diff --git a/packages/components/src/actions/ConfirmActionButton.tsx b/packages/components/src/actions/ConfirmActionButton.tsx index 4c096ad33..c8d7c6dcf 100644 --- a/packages/components/src/actions/ConfirmActionButton.tsx +++ b/packages/components/src/actions/ConfirmActionButton.tsx @@ -1,4 +1,4 @@ -import { ReactElement, ReactNode, useCallback } from 'react'; +import { type ReactElement, type ReactNode, useCallback } from 'react'; import type { SpectrumLabelableProps } from '@react-types/shared'; import { vsTrash } from '@deephaven/icons'; import { ActionButtonDialogTrigger, ConfirmationDialog } from '../dialogs'; diff --git a/packages/components/src/actions/IconActionButton.tsx b/packages/components/src/actions/IconActionButton.tsx index 43ae0fbd5..6d8353c46 100644 --- a/packages/components/src/actions/IconActionButton.tsx +++ b/packages/components/src/actions/IconActionButton.tsx @@ -1,7 +1,7 @@ /* eslint-disable react/jsx-props-no-spreading */ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import type { IconProp } from '@fortawesome/fontawesome-svg-core'; -import { ActionButton, Icon, ActionButtonProps } from '../spectrum'; +import { ActionButton, Icon, type ActionButtonProps } from '../spectrum'; import { Tooltip } from '../popper'; import { ACTION_ICON_HEIGHT } from '../UIConstants'; diff --git a/packages/components/src/context-actions/ContextActionUtils.ts b/packages/components/src/context-actions/ContextActionUtils.ts index 49c187227..f71671f20 100644 --- a/packages/components/src/context-actions/ContextActionUtils.ts +++ b/packages/components/src/context-actions/ContextActionUtils.ts @@ -1,5 +1,5 @@ -import { IconDefinition } from '@deephaven/icons'; -import React from 'react'; +import { type IconDefinition } from '@deephaven/icons'; +import type React from 'react'; import type { Shortcut } from '../shortcuts'; export type ResolvableContextAction = @@ -10,11 +10,11 @@ export type ResolvableContextAction = export type MenuItem = ContextAction | Promise; export interface ContextAction { - title?: string; + title?: string | JSX.Element; description?: string; action?: (event: Event) => void; actions?: ResolvableContextAction[]; - icon?: IconDefinition | React.ReactElement; + icon?: IconDefinition | React.ReactElement; iconColor?: string; shortcut?: Shortcut; diff --git a/packages/components/src/context-actions/ContextActions.tsx b/packages/components/src/context-actions/ContextActions.tsx index ab4527549..bfabf54f3 100644 --- a/packages/components/src/context-actions/ContextActions.tsx +++ b/packages/components/src/context-actions/ContextActions.tsx @@ -4,7 +4,7 @@ import React, { Component } from 'react'; import Log from '@deephaven/log'; import ContextActionUtils, { - ResolvableContextAction, + type ResolvableContextAction, isPromise, } from './ContextActionUtils'; import type { ContextAction, ContextActionEvent } from './ContextActionUtils'; diff --git a/packages/components/src/context-actions/ContextMenu.tsx b/packages/components/src/context-actions/ContextMenu.tsx index b3276a78f..0d756638a 100644 --- a/packages/components/src/context-actions/ContextMenu.tsx +++ b/packages/components/src/context-actions/ContextMenu.tsx @@ -1,10 +1,10 @@ import React, { PureComponent } from 'react'; import classNames from 'classnames'; import Log from '@deephaven/log'; -import { PromiseUtils, CancelablePromise } from '@deephaven/utils'; +import { PromiseUtils, type CancelablePromise } from '@deephaven/utils'; import ContextActionUtils, { - ContextAction, - ResolvableContextAction, + type ContextAction, + type ResolvableContextAction, } from './ContextActionUtils'; import ContextMenuItem from './ContextMenuItem'; import LoadingSpinner from '../LoadingSpinner'; diff --git a/packages/components/src/context-actions/ContextMenuItem.tsx b/packages/components/src/context-actions/ContextMenuItem.tsx index 9af75cfef..7e51efa05 100644 --- a/packages/components/src/context-actions/ContextMenuItem.tsx +++ b/packages/components/src/context-actions/ContextMenuItem.tsx @@ -1,7 +1,7 @@ import React from 'react'; import classNames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { vsChevronRight, IconDefinition } from '@deephaven/icons'; +import { vsChevronRight, type IconDefinition } from '@deephaven/icons'; import type { ContextAction } from './ContextActionUtils'; interface ContextMenuItemProps { diff --git a/packages/components/src/context-actions/ContextMenuRoot.tsx b/packages/components/src/context-actions/ContextMenuRoot.tsx index 93d3f54c9..c754220e1 100644 --- a/packages/components/src/context-actions/ContextMenuRoot.tsx +++ b/packages/components/src/context-actions/ContextMenuRoot.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import classNames from 'classnames'; import ContextMenu from './ContextMenu'; -import ContextActionUtils, { MenuItem } from './ContextActionUtils'; +import ContextActionUtils, { type MenuItem } from './ContextActionUtils'; type ContextMenuRootProps = Record & { 'data-testid'?: string; diff --git a/packages/components/src/dialogs/ActionButtonDialogTrigger.tsx b/packages/components/src/dialogs/ActionButtonDialogTrigger.tsx index 130d3f020..97c706c63 100644 --- a/packages/components/src/dialogs/ActionButtonDialogTrigger.tsx +++ b/packages/components/src/dialogs/ActionButtonDialogTrigger.tsx @@ -1,4 +1,4 @@ -import { ReactElement } from 'react'; +import { type ReactElement } from 'react'; import type { SpectrumDialogClose } from '@react-types/dialog'; import type { StyleProps } from '@react-types/shared'; import type { IconDefinition } from '@fortawesome/fontawesome-common-types'; diff --git a/packages/components/src/dialogs/ConfirmationDialog.tsx b/packages/components/src/dialogs/ConfirmationDialog.tsx index e5e0bcba4..356485f2a 100644 --- a/packages/components/src/dialogs/ConfirmationDialog.tsx +++ b/packages/components/src/dialogs/ConfirmationDialog.tsx @@ -1,5 +1,5 @@ /* eslint-disable react/jsx-props-no-spreading */ -import { ReactElement, ReactNode } from 'react'; +import { type ReactElement, type ReactNode } from 'react'; import type { SpectrumLabelableProps } from '@react-types/shared'; import { useFormWithDetachedSubmitButton } from '@deephaven/react-hooks'; import { diff --git a/packages/components/src/menu-actions/DropdownMenu.tsx b/packages/components/src/menu-actions/DropdownMenu.tsx index fc7586981..e7b0b4af2 100644 --- a/packages/components/src/menu-actions/DropdownMenu.tsx +++ b/packages/components/src/menu-actions/DropdownMenu.tsx @@ -30,10 +30,10 @@ */ import React, { PureComponent } from 'react'; import classNames from 'classnames'; -import { PopperOptions } from 'popper.js'; +import { type PopperOptions } from 'popper.js'; import { Popper } from '../popper'; -import Menu, { MenuOptions } from './Menu'; -import { ContextAction } from '../context-actions/ContextActionUtils'; +import Menu, { type MenuOptions } from './Menu'; +import { type ContextAction } from '../context-actions/ContextActionUtils'; import './DropdownMenu.scss'; export type DropdownAction = ContextAction & { actions?: never }; diff --git a/packages/components/src/menu-actions/Menu.tsx b/packages/components/src/menu-actions/Menu.tsx index c2af839d2..bf3e2c903 100644 --- a/packages/components/src/menu-actions/Menu.tsx +++ b/packages/components/src/menu-actions/Menu.tsx @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react'; import ContextActionUtils, { - ContextAction, + type ContextAction, } from '../context-actions/ContextActionUtils'; import ContextMenuItem from '../context-actions/ContextMenuItem'; diff --git a/packages/components/src/modal/InfoModal.tsx b/packages/components/src/modal/InfoModal.tsx index 9259fae40..05fbaa40d 100644 --- a/packages/components/src/modal/InfoModal.tsx +++ b/packages/components/src/modal/InfoModal.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { IconProp } from '@fortawesome/fontawesome-svg-core'; +import { type IconProp } from '@fortawesome/fontawesome-svg-core'; import Modal from './Modal'; import ModalBody from './ModalBody'; import './InfoModal.scss'; diff --git a/packages/components/src/modal/Modal.tsx b/packages/components/src/modal/Modal.tsx index 5385821be..de5dcddaf 100644 --- a/packages/components/src/modal/Modal.tsx +++ b/packages/components/src/modal/Modal.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; import React, { - ReactNode, + type ReactNode, useCallback, useEffect, useRef, diff --git a/packages/components/src/modal/ModalBody.tsx b/packages/components/src/modal/ModalBody.tsx index 9a531acea..499761dc3 100644 --- a/packages/components/src/modal/ModalBody.tsx +++ b/packages/components/src/modal/ModalBody.tsx @@ -1,4 +1,8 @@ -import React, { CSSProperties, ReactElement, ReactNode } from 'react'; +import React, { + type CSSProperties, + type ReactElement, + type ReactNode, +} from 'react'; import classNames from 'classnames'; interface ModalBodyProps { diff --git a/packages/components/src/modal/ModalFooter.tsx b/packages/components/src/modal/ModalFooter.tsx index 8a20be419..6c97b77e1 100644 --- a/packages/components/src/modal/ModalFooter.tsx +++ b/packages/components/src/modal/ModalFooter.tsx @@ -1,4 +1,4 @@ -import React, { ReactElement, ReactNode } from 'react'; +import React, { type ReactElement, type ReactNode } from 'react'; import classNames from 'classnames'; interface ModalFooterProps { diff --git a/packages/components/src/modal/ModalHeader.tsx b/packages/components/src/modal/ModalHeader.tsx index 0e8b5602d..ce0439120 100644 --- a/packages/components/src/modal/ModalHeader.tsx +++ b/packages/components/src/modal/ModalHeader.tsx @@ -1,4 +1,8 @@ -import React, { CSSProperties, ReactElement, ReactNode } from 'react'; +import React, { + type CSSProperties, + type ReactElement, + type ReactNode, +} from 'react'; import classNames from 'classnames'; interface ModalHeaderProps { diff --git a/packages/components/src/navigation/Menu.tsx b/packages/components/src/navigation/Menu.tsx index 4a8249a46..c140dfea7 100644 --- a/packages/components/src/navigation/Menu.tsx +++ b/packages/components/src/navigation/Menu.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import MenuItem, { MenuItemDef } from './MenuItem'; +import MenuItem, { type MenuItemDef } from './MenuItem'; import './Menu.scss'; export type MenuSelectCallback = (itemIndex: number) => void; diff --git a/packages/components/src/navigation/MenuItem.tsx b/packages/components/src/navigation/MenuItem.tsx index 7529a6393..ff66f83b6 100644 --- a/packages/components/src/navigation/MenuItem.tsx +++ b/packages/components/src/navigation/MenuItem.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react'; -import { IconProp } from '@fortawesome/fontawesome-svg-core'; +import { type IconProp } from '@fortawesome/fontawesome-svg-core'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { vsChevronRight } from '@deephaven/icons'; import './MenuItem.scss'; diff --git a/packages/components/src/navigation/NavTab.test.tsx b/packages/components/src/navigation/NavTab.test.tsx index c327b6b1c..992d29abe 100644 --- a/packages/components/src/navigation/NavTab.test.tsx +++ b/packages/components/src/navigation/NavTab.test.tsx @@ -3,9 +3,9 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { DragDropContext, - DropResult, + type DropResult, Droppable, - ResponderProvided, + type ResponderProvided, } from 'react-beautiful-dnd'; import NavTab from './NavTab'; diff --git a/packages/components/src/navigation/NavTab.tsx b/packages/components/src/navigation/NavTab.tsx index 69bf8456f..67804ecf4 100644 --- a/packages/components/src/navigation/NavTab.tsx +++ b/packages/components/src/navigation/NavTab.tsx @@ -1,12 +1,12 @@ import React, { memo } from 'react'; import classNames from 'classnames'; import { Draggable } from 'react-beautiful-dnd'; -import { IconDefinition, vsClose } from '@deephaven/icons'; +import { type IconDefinition, vsClose } from '@deephaven/icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import type { NavTabItem } from './NavTabList'; import Button from '../Button'; import ContextActions from '../context-actions/ContextActions'; -import { ResolvableContextAction } from '../context-actions'; +import { type ResolvableContextAction } from '../context-actions'; interface NavTabProps { tab: NavTabItem; diff --git a/packages/components/src/navigation/NavTabList.tsx b/packages/components/src/navigation/NavTabList.tsx index e6847207e..5baaf2215 100644 --- a/packages/components/src/navigation/NavTabList.tsx +++ b/packages/components/src/navigation/NavTabList.tsx @@ -10,17 +10,20 @@ import clamp from 'lodash.clamp'; import { DragDropContext, Droppable, - OnDragEndResponder, + type OnDragEndResponder, } from 'react-beautiful-dnd'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { IconDefinition } from '@fortawesome/fontawesome-svg-core'; +import { type IconDefinition } from '@fortawesome/fontawesome-svg-core'; import { vsChevronRight, vsChevronLeft } from '@deephaven/icons'; import { useResizeObserver } from '@deephaven/react-hooks'; import DragUtils from '../DragUtils'; import Button from '../Button'; import NavTab from './NavTab'; import './NavTabList.scss'; -import { ContextAction, ResolvableContextAction } from '../context-actions'; +import { + type ContextAction, + type ResolvableContextAction, +} from '../context-actions'; // mouse hold timeout to act as hold instead of click const CLICK_TIMEOUT = 500; diff --git a/packages/components/src/popper/Popper.tsx b/packages/components/src/popper/Popper.tsx index 56331abbc..6c94c7fdf 100644 --- a/packages/components/src/popper/Popper.tsx +++ b/packages/components/src/popper/Popper.tsx @@ -19,7 +19,7 @@ import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import classNames from 'classnames'; import { CSSTransition } from 'react-transition-group'; -import PopperJs, { PopperOptions, ReferenceObject } from 'popper.js'; +import PopperJs, { type PopperOptions, type ReferenceObject } from 'popper.js'; import PropTypes from 'prop-types'; import ThemeExport from '../ThemeExport'; import './Popper.scss'; diff --git a/packages/components/src/popper/Tooltip.tsx b/packages/components/src/popper/Tooltip.tsx index 02d8e3d4b..cd84ec6b8 100644 --- a/packages/components/src/popper/Tooltip.tsx +++ b/packages/components/src/popper/Tooltip.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import classNames from 'classnames'; import Log from '@deephaven/log'; -import Popper, { PopperOptions, ReferenceObject } from './Popper'; +import Popper, { type PopperOptions, type ReferenceObject } from './Popper'; const log = Log.module('Tooltip'); diff --git a/packages/components/src/shortcuts/Shortcut.ts b/packages/components/src/shortcuts/Shortcut.ts index 57618a960..549202963 100644 --- a/packages/components/src/shortcuts/Shortcut.ts +++ b/packages/components/src/shortcuts/Shortcut.ts @@ -1,8 +1,8 @@ /* eslint-disable no-underscore-dangle */ import { EventTarget } from 'event-target-shim'; -import React from 'react'; +import type React from 'react'; import { Log } from '@deephaven/log'; -import { CustomEventMap, EventShimCustomEvent } from '@deephaven/utils'; +import { type CustomEventMap, EventShimCustomEvent } from '@deephaven/utils'; import { ContextActionUtils } from '../context-actions'; const log = Log.module('Shortcut'); diff --git a/packages/components/src/shortcuts/ShortcutRegistry.ts b/packages/components/src/shortcuts/ShortcutRegistry.ts index 3a9e39d20..2ec72854c 100644 --- a/packages/components/src/shortcuts/ShortcutRegistry.ts +++ b/packages/components/src/shortcuts/ShortcutRegistry.ts @@ -1,8 +1,8 @@ /* eslint-disable max-classes-per-file */ import { EventTarget } from 'event-target-shim'; import { Log } from '@deephaven/log'; -import { CustomEventMap, EventShimCustomEvent } from '@deephaven/utils'; -import Shortcut, { KeyState } from './Shortcut'; +import { type CustomEventMap, EventShimCustomEvent } from '@deephaven/utils'; +import Shortcut, { type KeyState } from './Shortcut'; const log = Log.module('ShortcutRegistry'); diff --git a/packages/components/src/spectrum/ActionGroup.tsx b/packages/components/src/spectrum/ActionGroup.tsx index 456b87769..5e1772285 100644 --- a/packages/components/src/spectrum/ActionGroup.tsx +++ b/packages/components/src/spectrum/ActionGroup.tsx @@ -1,11 +1,11 @@ import { useMemo } from 'react'; import { ActionGroup as SpectrumActionGroup, - SpectrumActionGroupProps, + type SpectrumActionGroupProps, } from '@adobe/react-spectrum'; import cl from 'classnames'; -import { ItemsOrPrimitiveChildren } from './shared'; -import { MultipleItemSelectionProps, wrapItemChildren } from './utils'; +import { type ItemsOrPrimitiveChildren } from './shared'; +import { type MultipleItemSelectionProps, wrapItemChildren } from './utils'; export type ActionGroupProps = Omit< SpectrumActionGroupProps, diff --git a/packages/components/src/spectrum/ActionMenu.tsx b/packages/components/src/spectrum/ActionMenu.tsx index b629a0de1..9c6885f6f 100644 --- a/packages/components/src/spectrum/ActionMenu.tsx +++ b/packages/components/src/spectrum/ActionMenu.tsx @@ -1,11 +1,11 @@ import { useMemo } from 'react'; import { ActionMenu as SpectrumActionMenu, - SpectrumActionMenuProps, + type SpectrumActionMenuProps, } from '@adobe/react-spectrum'; import cl from 'classnames'; -import { ItemsOrPrimitiveChildren } from './shared'; -import { ItemKey, wrapItemChildren } from './utils'; +import { type ItemsOrPrimitiveChildren } from './shared'; +import { type ItemKey, wrapItemChildren } from './utils'; export type ActionMenuProps = Omit< SpectrumActionMenuProps, diff --git a/packages/components/src/spectrum/ItemContent.tsx b/packages/components/src/spectrum/ItemContent.tsx index f11e6c963..e8fc03956 100644 --- a/packages/components/src/spectrum/ItemContent.tsx +++ b/packages/components/src/spectrum/ItemContent.tsx @@ -2,14 +2,14 @@ import { Children, cloneElement, isValidElement, - ReactNode, + type ReactNode, useState, } from 'react'; import cl from 'classnames'; import { isElementOfType, useCheckOverflow } from '@deephaven/react-hooks'; import { NON_BREAKING_SPACE } from '@deephaven/utils'; import { Text } from './Text'; -import { TooltipOptions } from './utils'; +import { type TooltipOptions } from './utils'; import ItemTooltip from './ItemTooltip'; import stylesCommon from '../SpectrumComponent.module.scss'; diff --git a/packages/components/src/spectrum/ItemTooltip.tsx b/packages/components/src/spectrum/ItemTooltip.tsx index a86588d2f..454daaa9b 100644 --- a/packages/components/src/spectrum/ItemTooltip.tsx +++ b/packages/components/src/spectrum/ItemTooltip.tsx @@ -1,6 +1,6 @@ -import { ReactNode } from 'react'; +import { type ReactNode } from 'react'; import { isElementOfType } from '@deephaven/react-hooks'; -import { TooltipOptions } from './utils'; +import { type TooltipOptions } from './utils'; import { Tooltip } from '../popper'; import { Flex } from './layout'; import { Text } from './Text'; diff --git a/packages/components/src/spectrum/ListActionGroup.tsx b/packages/components/src/spectrum/ListActionGroup.tsx index d1882ad56..612d548bd 100644 --- a/packages/components/src/spectrum/ListActionGroup.tsx +++ b/packages/components/src/spectrum/ListActionGroup.tsx @@ -1,5 +1,5 @@ -import { ActionGroupProps } from './ActionGroup'; -import { ItemKey, ItemSelection } from './utils'; +import { type ActionGroupProps } from './ActionGroup'; +import { type ItemKey, type ItemSelection } from './utils'; export interface ListActionGroupProps extends Omit< diff --git a/packages/components/src/spectrum/ListActionMenu.tsx b/packages/components/src/spectrum/ListActionMenu.tsx index c5ebfa419..7bbe46f01 100644 --- a/packages/components/src/spectrum/ListActionMenu.tsx +++ b/packages/components/src/spectrum/ListActionMenu.tsx @@ -1,5 +1,5 @@ -import { ActionMenuProps } from './ActionMenu'; -import { ItemKey } from './utils'; +import { type ActionMenuProps } from './ActionMenu'; +import { type ItemKey } from './utils'; export interface ListActionMenuProps extends Omit, 'onAction' | 'onOpenChange'> { diff --git a/packages/components/src/spectrum/View.tsx b/packages/components/src/spectrum/View.tsx index 7ab0633d9..1e5eee99e 100644 --- a/packages/components/src/spectrum/View.tsx +++ b/packages/components/src/spectrum/View.tsx @@ -1,5 +1,5 @@ /* eslint-disable react/jsx-props-no-spreading */ -import { CSSProperties, forwardRef, useMemo } from 'react'; +import { type CSSProperties, forwardRef, useMemo } from 'react'; import { useLocale, View as SpectrumView, diff --git a/packages/components/src/spectrum/comboBox/ComboBox.tsx b/packages/components/src/spectrum/comboBox/ComboBox.tsx index 3681174ee..3898d6574 100644 --- a/packages/components/src/spectrum/comboBox/ComboBox.tsx +++ b/packages/components/src/spectrum/comboBox/ComboBox.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { ComboBox as SpectrumComboBox, - SpectrumComboBoxProps, + type SpectrumComboBoxProps, } from '@adobe/react-spectrum'; import type { DOMRef } from '@react-types/shared'; import cl from 'classnames'; import { useMergeRef } from '@deephaven/react-hooks'; import type { NormalizedItem } from '../utils'; -import { PickerPropsT, usePickerProps } from '../picker'; +import { type PickerPropsT, usePickerProps } from '../picker'; export type ComboBoxProps = PickerPropsT>; diff --git a/packages/components/src/spectrum/comboBox/ComboBoxNormalized.tsx b/packages/components/src/spectrum/comboBox/ComboBoxNormalized.tsx index b963803a4..1b1890854 100644 --- a/packages/components/src/spectrum/comboBox/ComboBoxNormalized.tsx +++ b/packages/components/src/spectrum/comboBox/ComboBoxNormalized.tsx @@ -1,8 +1,11 @@ import { ComboBox as SpectrumComboBox } from '@adobe/react-spectrum'; -import { FocusableRef } from '@react-types/shared'; +import { type FocusableRef } from '@react-types/shared'; import cl from 'classnames'; -import { PickerNormalizedPropsT, usePickerNormalizedProps } from '../picker'; -import { ComboBoxProps } from './ComboBox'; +import { + type PickerNormalizedPropsT, + usePickerNormalizedProps, +} from '../picker'; +import { type ComboBoxProps } from './ComboBox'; export type ComboBoxNormalizedProps = PickerNormalizedPropsT; diff --git a/packages/components/src/spectrum/dateAndTime.ts b/packages/components/src/spectrum/dateAndTime.ts index 4e4c164be..858f8c53b 100644 --- a/packages/components/src/spectrum/dateAndTime.ts +++ b/packages/components/src/spectrum/dateAndTime.ts @@ -1,7 +1,7 @@ import { - CalendarDate, - CalendarDateTime, - ZonedDateTime, + type CalendarDate, + type CalendarDateTime, + type ZonedDateTime, } from '@internationalized/date'; export { diff --git a/packages/components/src/spectrum/listView/ListView.tsx b/packages/components/src/spectrum/listView/ListView.tsx index 21b68c752..5f5796e92 100644 --- a/packages/components/src/spectrum/listView/ListView.tsx +++ b/packages/components/src/spectrum/listView/ListView.tsx @@ -1,16 +1,16 @@ import { useMemo } from 'react'; -import { SpectrumListViewProps } from '@adobe/react-spectrum'; +import { type SpectrumListViewProps } from '@adobe/react-spectrum'; import cl from 'classnames'; import { EMPTY_FUNCTION } from '@deephaven/utils'; import { - MultipleItemSelectionProps, - NormalizedItem, + type MultipleItemSelectionProps, + type NormalizedItem, normalizeTooltipOptions, - TooltipOptions, + type TooltipOptions, wrapItemChildren, } from '../utils'; -import { ListViewWrapper, ListViewWrapperProps } from './ListViewWrapper'; -import { ItemElementOrPrimitive } from '../shared'; +import { ListViewWrapper, type ListViewWrapperProps } from './ListViewWrapper'; +import { type ItemElementOrPrimitive } from '../shared'; export type ListViewProps = MultipleItemSelectionProps & { children: ItemElementOrPrimitive | ItemElementOrPrimitive[]; diff --git a/packages/components/src/spectrum/listView/ListViewNormalized.tsx b/packages/components/src/spectrum/listView/ListViewNormalized.tsx index e5301bccb..ee47e8940 100644 --- a/packages/components/src/spectrum/listView/ListViewNormalized.tsx +++ b/packages/components/src/spectrum/listView/ListViewNormalized.tsx @@ -1,8 +1,8 @@ import { useMemo } from 'react'; import cl from 'classnames'; import { - ListActions, - NormalizedItem, + type ListActions, + type NormalizedItem, normalizeTooltipOptions, useRenderNormalizedItem, useStringifiedMultiSelection, diff --git a/packages/components/src/spectrum/listView/ListViewWrapper.tsx b/packages/components/src/spectrum/listView/ListViewWrapper.tsx index b08f98e87..e14c3d5b3 100644 --- a/packages/components/src/spectrum/listView/ListViewWrapper.tsx +++ b/packages/components/src/spectrum/listView/ListViewWrapper.tsx @@ -1,6 +1,6 @@ import { ListView as SpectrumListView, - SpectrumListViewProps, + type SpectrumListViewProps, } from '@adobe/react-spectrum'; import { extractSpectrumHTMLElement, diff --git a/packages/components/src/spectrum/picker/Picker.tsx b/packages/components/src/spectrum/picker/Picker.tsx index f449b169f..521e30da5 100644 --- a/packages/components/src/spectrum/picker/Picker.tsx +++ b/packages/components/src/spectrum/picker/Picker.tsx @@ -1,6 +1,6 @@ import { Picker as SpectrumPicker, - SpectrumPickerProps, + type SpectrumPickerProps, } from '@adobe/react-spectrum'; import type { DOMRef } from '@react-types/shared'; import cl from 'classnames'; diff --git a/packages/components/src/spectrum/picker/usePickerItemScale.test.ts b/packages/components/src/spectrum/picker/usePickerItemScale.test.ts index ae00cd5f8..f5a56a0c2 100644 --- a/packages/components/src/spectrum/picker/usePickerItemScale.test.ts +++ b/packages/components/src/spectrum/picker/usePickerItemScale.test.ts @@ -1,4 +1,4 @@ -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import type { ProviderContext } from '@react-types/provider'; import { renderHook } from '@testing-library/react-hooks'; import { useSpectrumThemeProvider } from '../../theme'; diff --git a/packages/components/src/spectrum/picker/usePickerNormalizedProps.tsx b/packages/components/src/spectrum/picker/usePickerNormalizedProps.tsx index 01c2d7938..fc36eccf6 100644 --- a/packages/components/src/spectrum/picker/usePickerNormalizedProps.tsx +++ b/packages/components/src/spectrum/picker/usePickerNormalizedProps.tsx @@ -1,16 +1,16 @@ -import { Key, useCallback, useMemo } from 'react'; +import { type Key, useCallback, useMemo } from 'react'; import { EMPTY_FUNCTION } from '@deephaven/utils'; import type { DOMRef } from '@react-types/shared'; import { getItemKey, isNormalizedSection, - NormalizedItem, - NormalizedSection, + type NormalizedItem, + type NormalizedSection, normalizeTooltipOptions, useRenderNormalizedItem, useStringifiedSelection, } from '../utils'; -import { PickerNormalizedPropsT } from './PickerProps'; +import { type PickerNormalizedPropsT } from './PickerProps'; import { usePickerScrollOnOpen } from './usePickerScrollOnOpen'; import { Section } from '../shared'; diff --git a/packages/components/src/spectrum/picker/usePickerProps.ts b/packages/components/src/spectrum/picker/usePickerProps.ts index ba6eef1b5..ec34c06d1 100644 --- a/packages/components/src/spectrum/picker/usePickerProps.ts +++ b/packages/components/src/spectrum/picker/usePickerProps.ts @@ -1,5 +1,5 @@ import { EMPTY_FUNCTION, ensureArray } from '@deephaven/utils'; -import { DOMRef } from '@react-types/shared'; +import { type DOMRef } from '@react-types/shared'; import { useMemo } from 'react'; import { PICKER_TOP_OFFSET } from '../../UIConstants'; import { @@ -7,9 +7,9 @@ import { wrapItemChildren, useOnChangeTrackUncontrolled, useStaticItemInitialScrollPosition, - ItemKey, - SectionElement, - ItemElement, + type ItemKey, + type SectionElement, + type ItemElement, } from '../utils'; import type { PickerPropsT } from './PickerProps'; import usePickerItemScale from './usePickerItemScale'; diff --git a/packages/components/src/spectrum/picker/usePickerScrollOnOpen.test.ts b/packages/components/src/spectrum/picker/usePickerScrollOnOpen.test.ts index fa829ce5d..e09cef195 100644 --- a/packages/components/src/spectrum/picker/usePickerScrollOnOpen.test.ts +++ b/packages/components/src/spectrum/picker/usePickerScrollOnOpen.test.ts @@ -1,9 +1,9 @@ import { renderHook } from '@testing-library/react-hooks'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { findSpectrumPickerScrollArea, usePopoverOnScrollRef, - UsePopoverOnScrollRefResult, + type UsePopoverOnScrollRefResult, } from '@deephaven/react-hooks'; import { usePickerScrollOnOpen } from './usePickerScrollOnOpen'; diff --git a/packages/components/src/spectrum/utils/itemUtils.test.tsx b/packages/components/src/spectrum/utils/itemUtils.test.tsx index a09c8fc02..3705954a0 100644 --- a/packages/components/src/spectrum/utils/itemUtils.test.tsx +++ b/packages/components/src/spectrum/utils/itemUtils.test.tsx @@ -6,18 +6,18 @@ import { isNormalizedSection, isItemOrSection, isSectionElement, - NormalizedItem, - NormalizedSection, + type NormalizedItem, + type NormalizedSection, normalizeTooltipOptions, - ItemOrSection, - SectionElement, + type ItemOrSection, + type SectionElement, itemSelectionToStringSet, getPositionOfSelectedItemElement, isItemElementWithDescription, getItemTextValue, ITEM_EMPTY_STRING_TEXT_VALUE, } from './itemUtils'; -import { Item, ItemElementOrPrimitive, Section } from '../shared'; +import { Item, type ItemElementOrPrimitive, Section } from '../shared'; import { Text } from '../Text'; import ItemContent from '../ItemContent'; diff --git a/packages/components/src/spectrum/utils/itemUtils.ts b/packages/components/src/spectrum/utils/itemUtils.ts index a0e15bb07..880e78aa1 100644 --- a/packages/components/src/spectrum/utils/itemUtils.ts +++ b/packages/components/src/spectrum/utils/itemUtils.ts @@ -1,15 +1,15 @@ -import { Key, ReactElement, ReactNode } from 'react'; +import { type Key, type ReactElement, type ReactNode } from 'react'; import type { ItemRenderer } from '@react-types/shared'; import { isElementOfType } from '@deephaven/react-hooks'; -import { ensureArray, KeyedItem, SelectionT } from '@deephaven/utils'; +import { ensureArray, type KeyedItem, type SelectionT } from '@deephaven/utils'; import { Item, - ItemElementOrPrimitive, - ItemProps, + type ItemElementOrPrimitive, + type ItemProps, Section, - SectionProps, + type SectionProps, } from '../shared'; -import { PopperOptions } from '../../popper'; +import { type PopperOptions } from '../../popper'; import { Text } from '../Text'; import ItemContent from '../ItemContent'; @@ -256,7 +256,9 @@ export function isNormalizedItemsWithKeysList< return true; } - return !isItemOrSection(node[0]) && 'key' in node[0]; + return ( + !isItemOrSection(node[0]) && typeof node[0] === 'object' && 'key' in node[0] + ); } /** diff --git a/packages/components/src/spectrum/utils/itemWrapperUtils.tsx b/packages/components/src/spectrum/utils/itemWrapperUtils.tsx index 0435f0650..31816a2ee 100644 --- a/packages/components/src/spectrum/utils/itemWrapperUtils.tsx +++ b/packages/components/src/spectrum/utils/itemWrapperUtils.tsx @@ -1,4 +1,4 @@ -import { cloneElement, ReactNode } from 'react'; +import { cloneElement, type ReactNode } from 'react'; import { Item } from '@adobe/react-spectrum'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { dh as dhIcons } from '@deephaven/icons'; @@ -8,12 +8,12 @@ import { getItemTextValue, isItemElement, isSectionElement, - ItemElement, - ItemIconSlot, - ItemOrSection, + type ItemElement, + type ItemIconSlot, + type ItemOrSection, ITEM_EMPTY_STRING_TEXT_VALUE, - SectionElement, - TooltipOptions, + type SectionElement, + type TooltipOptions, } from './itemUtils'; import { ItemContent } from '../ItemContent'; import { Icon } from '../icons'; diff --git a/packages/components/src/spectrum/utils/propUtils.test.ts b/packages/components/src/spectrum/utils/propUtils.test.ts index 356bc1f8b..9ce7b0f74 100644 --- a/packages/components/src/spectrum/utils/propUtils.test.ts +++ b/packages/components/src/spectrum/utils/propUtils.test.ts @@ -1,4 +1,4 @@ -import { AriaLabelingProps, StyleProps } from '@react-types/shared'; +import { type AriaLabelingProps, type StyleProps } from '@react-types/shared'; import { separateSpectrumProps } from './propsUtils'; describe('separateSpectrumProps', () => { diff --git a/packages/components/src/spectrum/utils/useOnChangeTrackUncontrolled.test.ts b/packages/components/src/spectrum/utils/useOnChangeTrackUncontrolled.test.ts index 5815e201d..0bb0336b7 100644 --- a/packages/components/src/spectrum/utils/useOnChangeTrackUncontrolled.test.ts +++ b/packages/components/src/spectrum/utils/useOnChangeTrackUncontrolled.test.ts @@ -1,8 +1,8 @@ import { act, renderHook } from '@testing-library/react-hooks'; -import { ItemKey } from './itemUtils'; +import { type ItemKey } from './itemUtils'; import { useOnChangeTrackUncontrolled, - UseOnChangeTrackUncontrolledOptions, + type UseOnChangeTrackUncontrolledOptions, } from './useOnChangeTrackUncontrolled'; beforeEach(() => { diff --git a/packages/components/src/spectrum/utils/useOnChangeTrackUncontrolled.ts b/packages/components/src/spectrum/utils/useOnChangeTrackUncontrolled.ts index 9cf62ec6b..9c2169cb8 100644 --- a/packages/components/src/spectrum/utils/useOnChangeTrackUncontrolled.ts +++ b/packages/components/src/spectrum/utils/useOnChangeTrackUncontrolled.ts @@ -1,5 +1,5 @@ import { useCallback, useState } from 'react'; -import { ItemKey } from './itemUtils'; +import { type ItemKey } from './itemUtils'; export interface UseOnChangeTrackUncontrolledOptions { defaultSelectedKey?: ItemKey; diff --git a/packages/components/src/spectrum/utils/useRenderNormalizedItem.test.tsx b/packages/components/src/spectrum/utils/useRenderNormalizedItem.test.tsx index 18e7433af..db5529332 100644 --- a/packages/components/src/spectrum/utils/useRenderNormalizedItem.test.tsx +++ b/packages/components/src/spectrum/utils/useRenderNormalizedItem.test.tsx @@ -1,11 +1,11 @@ -import React, { Key } from 'react'; +import React, { type Key } from 'react'; import { Item } from '@adobe/react-spectrum'; import { renderHook } from '@testing-library/react-hooks'; import { isElementOfType } from '@deephaven/react-hooks'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { ItemContent } from '../ItemContent'; import { useRenderNormalizedItem } from './useRenderNormalizedItem'; -import { getItemKey, NormalizedItem } from './itemUtils'; +import { getItemKey, type NormalizedItem } from './itemUtils'; import { wrapIcon, wrapPrimitiveWithText } from './itemWrapperUtils'; import { ListActionGroup } from '../ListActionGroup'; import { ActionGroup } from '../ActionGroup'; diff --git a/packages/components/src/spectrum/utils/useRenderNormalizedItem.tsx b/packages/components/src/spectrum/utils/useRenderNormalizedItem.tsx index 1a14cc6fa..c7fba27e9 100644 --- a/packages/components/src/spectrum/utils/useRenderNormalizedItem.tsx +++ b/packages/components/src/spectrum/utils/useRenderNormalizedItem.tsx @@ -1,17 +1,17 @@ import { isElementOfType } from '@deephaven/react-hooks'; -import { Key, ReactElement, useCallback } from 'react'; +import { type Key, type ReactElement, useCallback } from 'react'; import ActionGroup from '../ActionGroup'; import ActionMenu from '../ActionMenu'; import { ItemContent } from '../ItemContent'; -import { ListActionGroup, ListActionGroupProps } from '../ListActionGroup'; -import { ListActionMenu, ListActionMenuProps } from '../ListActionMenu'; +import { ListActionGroup, type ListActionGroupProps } from '../ListActionGroup'; +import { ListActionMenu, type ListActionMenuProps } from '../ListActionMenu'; import { Item } from '../shared'; import { getItemKey, ITEM_EMPTY_STRING_TEXT_VALUE, - ItemIconSlot, - NormalizedItem, - TooltipOptions, + type ItemIconSlot, + type NormalizedItem, + type TooltipOptions, } from './itemUtils'; import { wrapIcon, wrapPrimitiveWithText } from './itemWrapperUtils'; diff --git a/packages/components/src/spectrum/utils/useStaticItemInitialScrollPosition.test.tsx b/packages/components/src/spectrum/utils/useStaticItemInitialScrollPosition.test.tsx index dab7444f3..ee7633f77 100644 --- a/packages/components/src/spectrum/utils/useStaticItemInitialScrollPosition.test.tsx +++ b/packages/components/src/spectrum/utils/useStaticItemInitialScrollPosition.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { renderHook } from '@testing-library/react-hooks'; import { Item, Section } from '../shared'; -import { ItemElement } from './itemUtils'; +import { type ItemElement } from './itemUtils'; import { useStaticItemInitialScrollPosition } from './useStaticItemInitialScrollPosition'; beforeEach(() => { diff --git a/packages/components/src/spectrum/utils/useStaticItemInitialScrollPosition.ts b/packages/components/src/spectrum/utils/useStaticItemInitialScrollPosition.ts index 8f0f390de..6e94d486c 100644 --- a/packages/components/src/spectrum/utils/useStaticItemInitialScrollPosition.ts +++ b/packages/components/src/spectrum/utils/useStaticItemInitialScrollPosition.ts @@ -3,9 +3,9 @@ import { getPositionOfSelectedItemElement, isItemElementWithDescription, isSectionElement, - ItemElement, - ItemKey, - SectionElement, + type ItemElement, + type ItemKey, + type SectionElement, } from './itemUtils'; export interface UseStaticItemInitialScrollPositionOptions { diff --git a/packages/components/src/spectrum/utils/useStringifiedMultiSelection.test.ts b/packages/components/src/spectrum/utils/useStringifiedMultiSelection.test.ts index 8f5c4e89d..58e32d016 100644 --- a/packages/components/src/spectrum/utils/useStringifiedMultiSelection.test.ts +++ b/packages/components/src/spectrum/utils/useStringifiedMultiSelection.test.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks'; -import { NormalizedItem } from './itemUtils'; +import { type NormalizedItem } from './itemUtils'; import { useStringifiedMultiSelection } from './useStringifiedMultiSelection'; beforeEach(() => { diff --git a/packages/components/src/spectrum/utils/useStringifiedMultiSelection.ts b/packages/components/src/spectrum/utils/useStringifiedMultiSelection.ts index 843d847a9..b3c13d497 100644 --- a/packages/components/src/spectrum/utils/useStringifiedMultiSelection.ts +++ b/packages/components/src/spectrum/utils/useStringifiedMultiSelection.ts @@ -1,10 +1,10 @@ -import { Key, useCallback, useMemo } from 'react'; +import { type Key, useCallback, useMemo } from 'react'; import { getItemKey, - ItemKey, - ItemSelection, + type ItemKey, + type ItemSelection, itemSelectionToStringSet, - NormalizedItem, + type NormalizedItem, } from './itemUtils'; export interface UseStringifiedMultiSelectionOptions { diff --git a/packages/components/src/spectrum/utils/useStringifiedSelection.test.ts b/packages/components/src/spectrum/utils/useStringifiedSelection.test.ts index 3d442397b..ad26804ab 100644 --- a/packages/components/src/spectrum/utils/useStringifiedSelection.test.ts +++ b/packages/components/src/spectrum/utils/useStringifiedSelection.test.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks'; -import { NormalizedItem } from './itemUtils'; +import { type NormalizedItem } from './itemUtils'; import { useStringifiedSelection } from './useStringifiedSelection'; describe('useStringifiedSelection', () => { diff --git a/packages/components/src/spectrum/utils/useStringifiedSelection.ts b/packages/components/src/spectrum/utils/useStringifiedSelection.ts index d954760c7..5087a560f 100644 --- a/packages/components/src/spectrum/utils/useStringifiedSelection.ts +++ b/packages/components/src/spectrum/utils/useStringifiedSelection.ts @@ -1,10 +1,10 @@ -import { Key, useCallback, useMemo } from 'react'; +import { type Key, useCallback, useMemo } from 'react'; import { getItemKey, - ItemKey, + type ItemKey, itemSelectionToStringSet, - NormalizedItem, - NormalizedSection, + type NormalizedItem, + type NormalizedSection, } from './itemUtils'; export interface UseStringifiedSelectionOptions { diff --git a/packages/components/src/theme/SpectrumThemeProvider.tsx b/packages/components/src/theme/SpectrumThemeProvider.tsx index a127a1cd5..ff51a9b3a 100644 --- a/packages/components/src/theme/SpectrumThemeProvider.tsx +++ b/packages/components/src/theme/SpectrumThemeProvider.tsx @@ -1,4 +1,4 @@ -import { ReactNode, useState } from 'react'; +import { type ReactNode, useState } from 'react'; import { Provider } from '@adobe/react-spectrum'; import type { Theme } from '@react-types/provider'; import { nanoid } from 'nanoid'; diff --git a/packages/components/src/theme/ThemePicker.tsx b/packages/components/src/theme/ThemePicker.tsx index 916975228..87737ecf7 100644 --- a/packages/components/src/theme/ThemePicker.tsx +++ b/packages/components/src/theme/ThemePicker.tsx @@ -1,4 +1,4 @@ -import { Key, useCallback } from 'react'; +import { type Key, useCallback } from 'react'; import { Item, Picker } from '@adobe/react-spectrum'; import useTheme from './useTheme'; diff --git a/packages/components/src/theme/ThemeProvider.test.tsx b/packages/components/src/theme/ThemeProvider.test.tsx index fdc4438d9..6a075381b 100644 --- a/packages/components/src/theme/ThemeProvider.test.tsx +++ b/packages/components/src/theme/ThemeProvider.test.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { act, render } from '@testing-library/react'; -import { assertNotNull, TestUtils } from '@deephaven/utils'; -import { ThemeContextValue, ThemeProvider } from './ThemeProvider'; -import { DEFAULT_LIGHT_THEME_KEY, ThemeData } from './ThemeModel'; +import { assertNotNull } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; +import { type ThemeContextValue, ThemeProvider } from './ThemeProvider'; +import { DEFAULT_LIGHT_THEME_KEY, type ThemeData } from './ThemeModel'; import { calculatePreloadStyleContent, getActiveThemes, diff --git a/packages/components/src/theme/ThemeProvider.tsx b/packages/components/src/theme/ThemeProvider.tsx index 2f687fb78..e483d1654 100644 --- a/packages/components/src/theme/ThemeProvider.tsx +++ b/packages/components/src/theme/ThemeProvider.tsx @@ -1,6 +1,12 @@ -import { createContext, ReactNode, useEffect, useMemo, useState } from 'react'; +import { + createContext, + type ReactNode, + useEffect, + useMemo, + useState, +} from 'react'; import Log from '@deephaven/log'; -import { DEFAULT_PRELOAD_DATA_VARIABLES, ThemeData } from './ThemeModel'; +import { DEFAULT_PRELOAD_DATA_VARIABLES, type ThemeData } from './ThemeModel'; import { calculatePreloadStyleContent, getActiveThemes, diff --git a/packages/components/src/theme/ThemeUtils.test.ts b/packages/components/src/theme/ThemeUtils.test.ts index 42b17c2dc..1052cdb51 100644 --- a/packages/components/src/theme/ThemeUtils.test.ts +++ b/packages/components/src/theme/ThemeUtils.test.ts @@ -1,14 +1,15 @@ import fs from 'fs'; import path from 'path'; -import { ColorUtils, TestUtils } from '@deephaven/utils'; +import { ColorUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { DEFAULT_DARK_THEME_KEY, DEFAULT_PRELOAD_DATA_VARIABLES, SVG_ICON_MANUAL_COLOR_MAP, - ThemeData, - ThemePreloadColorVariable, - ThemeRegistrationData, + type ThemeData, + type ThemePreloadColorVariable, + type ThemeRegistrationData, THEME_CACHE_LOCAL_STORAGE_KEY, THEME_KEY_OVERRIDE_QUERY_PARAM, } from './ThemeModel'; diff --git a/packages/components/src/theme/ThemeUtils.ts b/packages/components/src/theme/ThemeUtils.ts index 659fbf05e..e40f24b2a 100644 --- a/packages/components/src/theme/ThemeUtils.ts +++ b/packages/components/src/theme/ThemeUtils.ts @@ -6,15 +6,15 @@ import { DEFAULT_DARK_THEME_KEY, DEFAULT_LIGHT_THEME_KEY, DEFAULT_PRELOAD_DATA_VARIABLES, - ThemeData, - ThemePreloadData, - CssVariableStyleContent, - ThemePreloadColorVariable, - ThemeRegistrationData, + type ThemeData, + type ThemePreloadData, + type CssVariableStyleContent, + type ThemePreloadColorVariable, + type ThemeRegistrationData, THEME_CACHE_LOCAL_STORAGE_KEY, SVG_ICON_MANUAL_COLOR_MAP, - ThemeCssVariableName, - ThemeIconsRequiringManualColorChanges, + type ThemeCssVariableName, + type ThemeIconsRequiringManualColorChanges, THEME_KEY_OVERRIDE_QUERY_PARAM, } from './ThemeModel'; diff --git a/packages/components/src/theme/colorUtils.ts b/packages/components/src/theme/colorUtils.ts index 9f8f5bbed..793f30222 100644 --- a/packages/components/src/theme/colorUtils.ts +++ b/packages/components/src/theme/colorUtils.ts @@ -1,4 +1,4 @@ -import { CSSProperties } from 'react'; +import { type CSSProperties } from 'react'; /** * Color values for the DH color palette exposed to end users in spectrum components. diff --git a/packages/components/src/theme/useTheme.test.ts b/packages/components/src/theme/useTheme.test.ts index 60a9329d3..78de6024e 100644 --- a/packages/components/src/theme/useTheme.test.ts +++ b/packages/components/src/theme/useTheme.test.ts @@ -1,6 +1,6 @@ import { useContext } from 'react'; import { renderHook } from '@testing-library/react-hooks'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { useTheme } from './useTheme'; const { asMock } = TestUtils; diff --git a/packages/components/src/theme/useTheme.ts b/packages/components/src/theme/useTheme.ts index aaf96fda0..d1a8a62cd 100644 --- a/packages/components/src/theme/useTheme.ts +++ b/packages/components/src/theme/useTheme.ts @@ -1,5 +1,5 @@ import { useContextOrThrow } from '@deephaven/react-hooks'; -import { ThemeContext, ThemeContextValue } from './ThemeProvider'; +import { ThemeContext, type ThemeContextValue } from './ThemeProvider'; /** * Hook to get the current `ThemeContextValue`. diff --git a/packages/components/tsconfig.json b/packages/components/tsconfig.json index a3f2bd3c2..740b29b6f 100644 --- a/packages/components/tsconfig.json +++ b/packages/components/tsconfig.json @@ -9,6 +9,7 @@ "references": [ { "path": "../log" }, { "path": "../react-hooks" }, + { "path": "../test-utils" }, { "path": "../utils" } ] } diff --git a/packages/console/CHANGELOG.md b/packages/console/CHANGELOG.md index cf84d51c0..e536cab65 100644 --- a/packages/console/CHANGELOG.md +++ b/packages/console/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/console + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/console diff --git a/packages/console/package.json b/packages/console/package.json index 4f8eca150..ac0c0af41 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/console", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Console", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -53,7 +53,8 @@ }, "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/mocks": "file:../mocks" + "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils" }, "files": [ "dist" diff --git a/packages/console/src/Console.test.tsx b/packages/console/src/Console.test.tsx index 838c1fbb9..f7d113164 100644 --- a/packages/console/src/Console.test.tsx +++ b/packages/console/src/Console.test.tsx @@ -3,7 +3,7 @@ import dh from '@deephaven/jsapi-shim'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { Console } from './Console'; -import { CommandHistoryStorage } from './command-history'; +import { type CommandHistoryStorage } from './command-history'; function makeMockCommandHistoryStorage(): CommandHistoryStorage { return { diff --git a/packages/console/src/Console.tsx b/packages/console/src/Console.tsx index 9ccb4ebe5..940fa5458 100644 --- a/packages/console/src/Console.tsx +++ b/packages/console/src/Console.tsx @@ -2,16 +2,16 @@ * Console display for use in the Iris environment. */ import React, { - DragEvent, + type DragEvent, PureComponent, - ReactElement, - ReactNode, - RefObject, + type ReactElement, + type ReactNode, + type RefObject, } from 'react'; import { ContextActions, - DropdownAction, - ResolvableContextAction, + type DropdownAction, + type ResolvableContextAction, } from '@deephaven/components'; import { vsCheck } from '@deephaven/icons'; import classNames from 'classnames'; @@ -22,7 +22,7 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; import { assertNotNull, Pending, PromiseUtils } from '@deephaven/utils'; import ConsoleHistory from './console-history/ConsoleHistory'; -import { ConsoleHistoryActionItem } from './console-history/ConsoleHistoryTypes'; +import { type ConsoleHistoryActionItem } from './console-history/ConsoleHistoryTypes'; import SHORTCUTS from './ConsoleShortcuts'; import LogLevel from './log/LogLevel'; import ConsoleInput from './ConsoleInput'; @@ -31,8 +31,8 @@ import CsvInputBar from './csv/CsvInputBar'; import './Console.scss'; import ConsoleStatusBar from './ConsoleStatusBar'; import { - CommandHistoryStorage, - CommandHistoryStorageItem, + type CommandHistoryStorage, + type CommandHistoryStorageItem, } from './command-history'; import ConsoleObjectsMenu from './ConsoleObjectsMenu'; diff --git a/packages/console/src/ConsoleInput.tsx b/packages/console/src/ConsoleInput.tsx index a2fca76de..99e14c627 100644 --- a/packages/console/src/ConsoleInput.tsx +++ b/packages/console/src/ConsoleInput.tsx @@ -1,18 +1,18 @@ -import React, { PureComponent, ReactElement, RefObject } from 'react'; +import React, { PureComponent, type ReactElement, type RefObject } from 'react'; import classNames from 'classnames'; import * as monaco from 'monaco-editor'; import Log from '@deephaven/log'; import { assertNotNull, - CancelablePromise, + type CancelablePromise, PromiseUtils, } from '@deephaven/utils'; -import { ViewportData } from '@deephaven/storage'; +import { type ViewportData } from '@deephaven/storage'; import type { dh } from '@deephaven/jsapi-types'; import { - CommandHistoryStorage, - CommandHistoryStorageItem, - CommandHistoryTable, + type CommandHistoryStorage, + type CommandHistoryStorageItem, + type CommandHistoryTable, } from './command-history'; import { MonacoProviders, MonacoTheme, MonacoUtils } from './monaco'; import './ConsoleInput.scss'; diff --git a/packages/console/src/ConsoleObjectsMenu.tsx b/packages/console/src/ConsoleObjectsMenu.tsx index fa5a12439..faff22804 100644 --- a/packages/console/src/ConsoleObjectsMenu.tsx +++ b/packages/console/src/ConsoleObjectsMenu.tsx @@ -1,5 +1,5 @@ import React, { - ReactElement, + type ReactElement, useCallback, useMemo, useRef, @@ -8,7 +8,7 @@ import React, { import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button, - DropdownActions, + type DropdownActions, DropdownMenu, SearchInput, } from '@deephaven/components'; diff --git a/packages/console/src/ConsoleStatusBar.test.tsx b/packages/console/src/ConsoleStatusBar.test.tsx index 8d668c3a7..90f9a2590 100644 --- a/packages/console/src/ConsoleStatusBar.test.tsx +++ b/packages/console/src/ConsoleStatusBar.test.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import dh from '@deephaven/jsapi-shim'; -import { ContextActions, DropdownActions } from '@deephaven/components'; +import { ContextActions, type DropdownActions } from '@deephaven/components'; import { vsCheck } from '@deephaven/icons'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import userEvent from '@testing-library/user-event'; import ConsoleStatusBar from './ConsoleStatusBar'; diff --git a/packages/console/src/ConsoleStatusBar.tsx b/packages/console/src/ConsoleStatusBar.tsx index b95a6ea28..d80942328 100644 --- a/packages/console/src/ConsoleStatusBar.tsx +++ b/packages/console/src/ConsoleStatusBar.tsx @@ -1,6 +1,6 @@ import React, { - ReactElement, - ReactNode, + type ReactElement, + type ReactNode, useCallback, useEffect, useState, @@ -10,9 +10,9 @@ import { vsKebabVertical } from '@deephaven/icons'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { Button, - DropdownActions, + type DropdownActions, DropdownMenu, - PopperOptions, + type PopperOptions, Tooltip, } from '@deephaven/components'; import './ConsoleStatusBar.scss'; diff --git a/packages/console/src/HeapUsage.tsx b/packages/console/src/HeapUsage.tsx index 9883aa2c2..cdb5f98d4 100644 --- a/packages/console/src/HeapUsage.tsx +++ b/packages/console/src/HeapUsage.tsx @@ -1,4 +1,4 @@ -import { useState, ReactElement, useRef, useCallback } from 'react'; +import { useState, type ReactElement, useRef, useCallback } from 'react'; import classNames from 'classnames'; import { Tooltip } from '@deephaven/components'; import type { dh } from '@deephaven/jsapi-types'; diff --git a/packages/console/src/command-history/CommandHistory.test.tsx b/packages/console/src/command-history/CommandHistory.test.tsx index 247585c2f..762bf5fa9 100644 --- a/packages/console/src/command-history/CommandHistory.test.tsx +++ b/packages/console/src/command-history/CommandHistory.test.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import CommandHistory from './CommandHistory'; -import { CommandHistoryTable } from './CommandHistoryStorage'; +import { type CommandHistoryTable } from './CommandHistoryStorage'; jest.mock('pouchdb-browser'); diff --git a/packages/console/src/command-history/CommandHistory.tsx b/packages/console/src/command-history/CommandHistory.tsx index 0d2e0e825..455d297a1 100644 --- a/packages/console/src/command-history/CommandHistory.tsx +++ b/packages/console/src/command-history/CommandHistory.tsx @@ -1,13 +1,18 @@ -import React, { ChangeEvent, Component, ReactElement, RefObject } from 'react'; +import React, { + type ChangeEvent, + Component, + type ReactElement, + type RefObject, +} from 'react'; import debounce from 'lodash.debounce'; import { ContextActions, ItemList, SearchInput, GLOBAL_SHORTCUTS, - RenderItemProps, + type RenderItemProps, } from '@deephaven/components'; -import { ViewportData } from '@deephaven/storage'; +import { type ViewportData } from '@deephaven/storage'; import { vsFileCode, vsFiles, @@ -15,7 +20,7 @@ import { vsPlay, vsTerminal, } from '@deephaven/icons'; -import { copyToClipboard, Pending, Range } from '@deephaven/utils'; +import { copyToClipboard, Pending, type Range } from '@deephaven/utils'; import Log from '@deephaven/log'; import CommandHistoryItem from './CommandHistoryItem'; import CommandHistoryActions from './CommandHistoryActions'; @@ -24,11 +29,12 @@ import ConsoleConstants from '../common/ConsoleConstants'; import './CommandHistory.scss'; import CommandHistoryViewportUpdater from './CommandHistoryViewportUpdater'; import SHORTCUTS from '../ConsoleShortcuts'; -import CommandHistoryStorage, { - CommandHistoryStorageItem, - CommandHistoryTable, +import { + type CommandHistoryStorageItem, + type CommandHistoryTable, } from './CommandHistoryStorage'; -import { ItemAction, HistoryAction } from './CommandHistoryTypes'; +import type CommandHistoryStorage from './CommandHistoryStorage'; +import { type ItemAction, type HistoryAction } from './CommandHistoryTypes'; const log = Log.module('CommandHistory'); diff --git a/packages/console/src/command-history/CommandHistoryActions.test.tsx b/packages/console/src/command-history/CommandHistoryActions.test.tsx index d54433fe4..7395cb64a 100644 --- a/packages/console/src/command-history/CommandHistoryActions.test.tsx +++ b/packages/console/src/command-history/CommandHistoryActions.test.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import CommandHistoryActions from './CommandHistoryActions'; const { asMock } = TestUtils; diff --git a/packages/console/src/command-history/CommandHistoryActions.tsx b/packages/console/src/command-history/CommandHistoryActions.tsx index ebebf07ea..4c963d0e9 100644 --- a/packages/console/src/command-history/CommandHistoryActions.tsx +++ b/packages/console/src/command-history/CommandHistoryActions.tsx @@ -1,10 +1,10 @@ -import React, { Component, ReactElement } from 'react'; +import React, { Component, type ReactElement } from 'react'; import classNames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button } from '@deephaven/components'; import { vsArrowLeft, vsCircleLargeFilled } from '@deephaven/icons'; import './CommandHistoryActions.scss'; -import { HistoryAction } from './CommandHistoryTypes'; +import { type HistoryAction } from './CommandHistoryTypes'; interface CommandHistoryActionsProps { actions: HistoryAction[]; diff --git a/packages/console/src/command-history/CommandHistoryItem.tsx b/packages/console/src/command-history/CommandHistoryItem.tsx index 02a88498c..92bf510e9 100644 --- a/packages/console/src/command-history/CommandHistoryItem.tsx +++ b/packages/console/src/command-history/CommandHistoryItem.tsx @@ -1,12 +1,11 @@ -import React, { useRef, useCallback, ReactElement } from 'react'; +import React, { useRef, useCallback, type ReactElement } from 'react'; import classNames from 'classnames'; import { Tooltip } from '@deephaven/components'; import './CommandHistoryItem.scss'; import CommandHistoryItemTooltip from './CommandHistoryItemTooltip'; -import CommandHistoryStorage, { - CommandHistoryStorageItem, -} from './CommandHistoryStorage'; +import { type CommandHistoryStorageItem } from './CommandHistoryStorage'; +import type CommandHistoryStorage from './CommandHistoryStorage'; interface CommandHistoryItemProps { item: CommandHistoryStorageItem; diff --git a/packages/console/src/command-history/CommandHistoryItemTooltip.test.tsx b/packages/console/src/command-history/CommandHistoryItemTooltip.test.tsx index 15fcab1c4..5e5131862 100644 --- a/packages/console/src/command-history/CommandHistoryItemTooltip.test.tsx +++ b/packages/console/src/command-history/CommandHistoryItemTooltip.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import { CommandHistoryItemTooltip } from './CommandHistoryItemTooltip'; -import { CommandHistoryStorageItem } from './CommandHistoryStorage'; +import { type CommandHistoryStorageItem } from './CommandHistoryStorage'; jest.mock('../common/Code', () => () => 'Code'); diff --git a/packages/console/src/command-history/CommandHistoryItemTooltip.tsx b/packages/console/src/command-history/CommandHistoryItemTooltip.tsx index 1e5c66ced..504c63268 100644 --- a/packages/console/src/command-history/CommandHistoryItemTooltip.tsx +++ b/packages/console/src/command-history/CommandHistoryItemTooltip.tsx @@ -1,17 +1,18 @@ -import React, { Component, ReactElement } from 'react'; +import React, { Component, type ReactElement } from 'react'; import debounce from 'lodash.debounce'; import memoize from 'memoizee'; import { LoadingSpinner } from '@deephaven/components'; import { TimeUtils } from '@deephaven/utils'; -import { StorageListenerRemover } from '@deephaven/storage'; +import { type StorageListenerRemover } from '@deephaven/storage'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { vsWarning } from '@deephaven/icons'; import Code from '../common/Code'; import './CommandHistoryItemTooltip.scss'; -import CommandHistoryStorage, { - CommandHistoryStorageData, - CommandHistoryStorageItem, +import { + type CommandHistoryStorageData, + type CommandHistoryStorageItem, } from './CommandHistoryStorage'; +import type CommandHistoryStorage from './CommandHistoryStorage'; interface CommandHistoryItemTooltipProps { item: CommandHistoryStorageItem; diff --git a/packages/console/src/command-history/CommandHistoryStorage.ts b/packages/console/src/command-history/CommandHistoryStorage.ts index a956758e2..f2d123116 100644 --- a/packages/console/src/command-history/CommandHistoryStorage.ts +++ b/packages/console/src/command-history/CommandHistoryStorage.ts @@ -1,9 +1,9 @@ import { - StorageTable, - StorageItem, - StorageItemListener, - StorageListenerRemover, - StorageErrorListener, + type StorageTable, + type StorageItem, + type StorageItemListener, + type StorageListenerRemover, + type StorageErrorListener, } from '@deephaven/storage'; export interface CommandHistoryStorageData { diff --git a/packages/console/src/command-history/CommandHistoryTypes.tsx b/packages/console/src/command-history/CommandHistoryTypes.tsx index b9a4b44de..cc8c8f99c 100644 --- a/packages/console/src/command-history/CommandHistoryTypes.tsx +++ b/packages/console/src/command-history/CommandHistoryTypes.tsx @@ -1,5 +1,5 @@ -import { ContextAction } from '@deephaven/components'; -import { IconDefinition } from '@deephaven/icons'; +import { type ContextAction } from '@deephaven/components'; +import { type IconDefinition } from '@deephaven/icons'; export type ItemAction = ContextAction & { title: string; diff --git a/packages/console/src/command-history/CommandHistoryViewportUpdater.tsx b/packages/console/src/command-history/CommandHistoryViewportUpdater.tsx index 7adcbe1cc..45879e0b4 100644 --- a/packages/console/src/command-history/CommandHistoryViewportUpdater.tsx +++ b/packages/console/src/command-history/CommandHistoryViewportUpdater.tsx @@ -1,14 +1,14 @@ import { useEffect, useMemo } from 'react'; import throttle from 'lodash.throttle'; import { - StorageTableViewport, - ViewportData, - ViewportUpdateCallback, + type StorageTableViewport, + type ViewportData, + type ViewportUpdateCallback, } from '@deephaven/storage'; import Log from '@deephaven/log'; import { - CommandHistoryStorageItem, - CommandHistoryTable, + type CommandHistoryStorageItem, + type CommandHistoryTable, } from './CommandHistoryStorage'; export type CommandHistoryViewportUpdaterProps = { diff --git a/packages/console/src/common/Code.tsx b/packages/console/src/common/Code.tsx index 373c7de5c..878620788 100644 --- a/packages/console/src/common/Code.tsx +++ b/packages/console/src/common/Code.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState, ReactNode } from 'react'; +import React, { useEffect, useState, type ReactNode } from 'react'; import * as monaco from 'monaco-editor'; import { useTheme } from '@deephaven/components'; diff --git a/packages/console/src/common/ConsoleUtils.ts b/packages/console/src/common/ConsoleUtils.ts index 7a862b0ea..2b1da396e 100644 --- a/packages/console/src/common/ConsoleUtils.ts +++ b/packages/console/src/common/ConsoleUtils.ts @@ -1,4 +1,4 @@ -import ShellQuote, { ParseEntry, ControlOperator } from 'shell-quote'; +import ShellQuote, { type ParseEntry, type ControlOperator } from 'shell-quote'; import type { dh as DhType } from '@deephaven/jsapi-types'; class ConsoleUtils { diff --git a/packages/console/src/console-history/ConsoleHistory.tsx b/packages/console/src/console-history/ConsoleHistory.tsx index caf259350..e239fec97 100644 --- a/packages/console/src/console-history/ConsoleHistory.tsx +++ b/packages/console/src/console-history/ConsoleHistory.tsx @@ -6,7 +6,7 @@ import type { dh } from '@deephaven/jsapi-types'; import ConsoleHistoryItem from './ConsoleHistoryItem'; import './ConsoleHistory.scss'; -import { ConsoleHistoryActionItem } from './ConsoleHistoryTypes'; +import { type ConsoleHistoryActionItem } from './ConsoleHistoryTypes'; interface ConsoleHistoryProps { items: ConsoleHistoryActionItem[]; diff --git a/packages/console/src/console-history/ConsoleHistoryItem.tsx b/packages/console/src/console-history/ConsoleHistoryItem.tsx index 60c0f8710..7718e4572 100644 --- a/packages/console/src/console-history/ConsoleHistoryItem.tsx +++ b/packages/console/src/console-history/ConsoleHistoryItem.tsx @@ -1,7 +1,7 @@ /** * Console display for use in the Iris environment. */ -import React, { PureComponent, ReactElement } from 'react'; +import React, { PureComponent, type ReactElement } from 'react'; import { Button } from '@deephaven/components'; import Log from '@deephaven/log'; import type { dh } from '@deephaven/jsapi-types'; @@ -11,7 +11,7 @@ import ConsoleHistoryItemResult from './ConsoleHistoryItemResult'; import ConsoleHistoryResultInProgress from './ConsoleHistoryResultInProgress'; import ConsoleHistoryResultErrorMessage from './ConsoleHistoryResultErrorMessage'; import './ConsoleHistoryItem.scss'; -import { ConsoleHistoryActionItem } from './ConsoleHistoryTypes'; +import { type ConsoleHistoryActionItem } from './ConsoleHistoryTypes'; const log = Log.module('ConsoleHistoryItem'); diff --git a/packages/console/src/console-history/ConsoleHistoryItemResult.tsx b/packages/console/src/console-history/ConsoleHistoryItemResult.tsx index 81a0e1b52..d941eec1f 100644 --- a/packages/console/src/console-history/ConsoleHistoryItemResult.tsx +++ b/packages/console/src/console-history/ConsoleHistoryItemResult.tsx @@ -1,7 +1,7 @@ /** * Console display for use in the Iris environment. */ -import React, { ReactElement, ReactNode } from 'react'; +import React, { type ReactElement, type ReactNode } from 'react'; import PropTypes from 'prop-types'; function ConsoleHistoryItemResult({ diff --git a/packages/console/src/console-history/ConsoleHistoryResultErrorMessage.tsx b/packages/console/src/console-history/ConsoleHistoryResultErrorMessage.tsx index ade57b555..6167ebe29 100644 --- a/packages/console/src/console-history/ConsoleHistoryResultErrorMessage.tsx +++ b/packages/console/src/console-history/ConsoleHistoryResultErrorMessage.tsx @@ -2,10 +2,10 @@ * Error message that can be expanded */ import React, { - KeyboardEvent, - MouseEvent, + type KeyboardEvent, + type MouseEvent, PureComponent, - ReactElement, + type ReactElement, } from 'react'; import classNames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; diff --git a/packages/console/src/console-history/ConsoleHistoryResultInProgress.tsx b/packages/console/src/console-history/ConsoleHistoryResultInProgress.tsx index 967979041..26a219657 100644 --- a/packages/console/src/console-history/ConsoleHistoryResultInProgress.tsx +++ b/packages/console/src/console-history/ConsoleHistoryResultInProgress.tsx @@ -1,4 +1,4 @@ -import React, { Component, ReactElement } from 'react'; +import React, { Component, type ReactElement } from 'react'; import classNames from 'classnames'; import { Button, LoadingSpinner } from '@deephaven/components'; import { vsClose } from '@deephaven/icons'; diff --git a/packages/console/src/console-history/ConsoleHistoryTypes.tsx b/packages/console/src/console-history/ConsoleHistoryTypes.tsx index a9a883deb..0659e3bd9 100644 --- a/packages/console/src/console-history/ConsoleHistoryTypes.tsx +++ b/packages/console/src/console-history/ConsoleHistoryTypes.tsx @@ -1,4 +1,4 @@ -import { CancelablePromise } from '@deephaven/utils'; +import { type CancelablePromise } from '@deephaven/utils'; import type { dh } from '@deephaven/jsapi-types'; export type ConsoleHistoryError = diff --git a/packages/console/src/csv/CsvInputBar.tsx b/packages/console/src/csv/CsvInputBar.tsx index 5bc67eae3..a7f25fe21 100644 --- a/packages/console/src/csv/CsvInputBar.tsx +++ b/packages/console/src/csv/CsvInputBar.tsx @@ -1,9 +1,9 @@ import React, { - ChangeEvent, + type ChangeEvent, Component, - FormEvent, - ReactElement, - RefObject, + type FormEvent, + type ReactElement, + type RefObject, } from 'react'; import classNames from 'classnames'; import type { JSZipObject } from 'jszip'; diff --git a/packages/console/src/csv/CsvOverlay.tsx b/packages/console/src/csv/CsvOverlay.tsx index ab63104cb..067c5b540 100644 --- a/packages/console/src/csv/CsvOverlay.tsx +++ b/packages/console/src/csv/CsvOverlay.tsx @@ -1,16 +1,16 @@ import React, { - ChangeEvent, + type ChangeEvent, Component, - DragEvent, - MouseEvent, - ReactElement, - RefObject, + type DragEvent, + type MouseEvent, + type ReactElement, + type RefObject, } from 'react'; import memoize from 'memoize-one'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button, - ContextAction, + type ContextAction, ContextActions, GLOBAL_SHORTCUTS, } from '@deephaven/components'; @@ -18,7 +18,7 @@ import { dhFileCsv, dhFileDownload, dhFileSpreadsheet, - IconDefinition, + type IconDefinition, vsClippy, vsFileZip, vsTrash, diff --git a/packages/console/src/csv/CsvParser.ts b/packages/console/src/csv/CsvParser.ts index 32bef38b0..1b1e7d0e2 100644 --- a/packages/console/src/csv/CsvParser.ts +++ b/packages/console/src/csv/CsvParser.ts @@ -1,10 +1,14 @@ -import Papa, { ParseLocalConfig, Parser, ParseResult } from 'papaparse'; +import Papa, { + type ParseLocalConfig, + type Parser, + type ParseResult, +} from 'papaparse'; import Log from '@deephaven/log'; import { assertNotNull, DbNameValidator } from '@deephaven/utils'; import type { dh } from '@deephaven/jsapi-types'; import type { JSZipObject } from 'jszip'; import CsvTypeParser from './CsvTypeParser'; -import { CsvTypes } from './CsvFormats'; +import { type CsvTypes } from './CsvFormats'; import makeZipStreamHelper from './ZipStreamHelper'; const log = Log.module('CsvParser'); diff --git a/packages/console/src/csv/CsvTypeParser.ts b/packages/console/src/csv/CsvTypeParser.ts index b332a8059..4a3e87b3b 100644 --- a/packages/console/src/csv/CsvTypeParser.ts +++ b/packages/console/src/csv/CsvTypeParser.ts @@ -1,6 +1,10 @@ import type { JSZipObject } from 'jszip'; import { assertNotNull } from '@deephaven/utils'; -import Papa, { Parser, ParseResult, ParseLocalConfig } from 'papaparse'; +import Papa, { + type Parser, + type ParseResult, + type ParseLocalConfig, +} from 'papaparse'; // Intentionally using isNaN rather than Number.isNaN /* eslint-disable no-restricted-globals */ import NewTableColumnTypes from './NewTableColumnTypes'; diff --git a/packages/console/src/index.ts b/packages/console/src/index.ts index 541f60210..d0388e104 100644 --- a/packages/console/src/index.ts +++ b/packages/console/src/index.ts @@ -5,7 +5,9 @@ export { Console }; export { default as ConsoleInput } from './ConsoleInput'; export { default as SHORTCUTS } from './ConsoleShortcuts'; export { default as ConsoleStatusBar } from './ConsoleStatusBar'; -export { default as Editor } from './notebook/Editor'; +export * from './monaco/MonacoThemeProvider'; +export { default as MonacoUtils } from './monaco/MonacoUtils'; +export { default as Editor, type EditorProps } from './notebook/Editor'; export { default as ScriptEditor } from './notebook/ScriptEditor'; export { default as ScriptEditorUtils } from './notebook/ScriptEditorUtils'; export * from './common'; diff --git a/packages/console/src/log/LogLevelMenuItem.tsx b/packages/console/src/log/LogLevelMenuItem.tsx index ce1a4e428..764dd5565 100644 --- a/packages/console/src/log/LogLevelMenuItem.tsx +++ b/packages/console/src/log/LogLevelMenuItem.tsx @@ -1,5 +1,5 @@ // Port of https://github.com/react-bootstrap/react-bootstrap/blob/master/src/Collapse.js -import React, { PureComponent, ReactElement } from 'react'; +import React, { PureComponent, type ReactElement } from 'react'; import classNames from 'classnames'; import { UISwitch } from '@deephaven/components'; import './LogLevelMenuItem.scss'; diff --git a/packages/console/src/log/LogView.tsx b/packages/console/src/log/LogView.tsx index befc394f4..ee7b79b25 100644 --- a/packages/console/src/log/LogView.tsx +++ b/packages/console/src/log/LogView.tsx @@ -1,9 +1,13 @@ -import React, { PureComponent, ReactElement } from 'react'; -import { Button, DropdownActions, DropdownMenu } from '@deephaven/components'; +import React, { PureComponent, type ReactElement } from 'react'; +import { + Button, + type DropdownActions, + DropdownMenu, +} from '@deephaven/components'; import { vsGear, dhTrashUndo } from '@deephaven/icons'; import { assertNotNull } from '@deephaven/utils'; import type { dh } from '@deephaven/jsapi-types'; -import { Placement } from 'popper.js'; +import { type Placement } from 'popper.js'; import * as monaco from 'monaco-editor'; import ConsoleUtils from '../common/ConsoleUtils'; import LogLevel from './LogLevel'; diff --git a/packages/console/src/monaco/MonacoThemeProvider.tsx b/packages/console/src/monaco/MonacoThemeProvider.tsx index 84e5da629..27c2dd1ba 100644 --- a/packages/console/src/monaco/MonacoThemeProvider.tsx +++ b/packages/console/src/monaco/MonacoThemeProvider.tsx @@ -1,4 +1,4 @@ -import { ReactNode, useEffect } from 'react'; +import { type ReactNode, useEffect } from 'react'; import { useTheme } from '@deephaven/components'; import MonacoUtils from './MonacoUtils'; diff --git a/packages/console/src/monaco/MonacoUtils.test.ts b/packages/console/src/monaco/MonacoUtils.test.ts index 85cdea53b..915334197 100644 --- a/packages/console/src/monaco/MonacoUtils.test.ts +++ b/packages/console/src/monaco/MonacoUtils.test.ts @@ -1,7 +1,7 @@ /* eslint-disable no-bitwise */ import * as monaco from 'monaco-editor'; import { Shortcut, KEY, MODIFIER } from '@deephaven/components'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import MonacoUtils from './MonacoUtils'; const { asMock, createMockProxy } = TestUtils; diff --git a/packages/console/src/monaco/MonacoUtils.ts b/packages/console/src/monaco/MonacoUtils.ts index 3d0e7f7c1..b2477f81e 100644 --- a/packages/console/src/monaco/MonacoUtils.ts +++ b/packages/console/src/monaco/MonacoUtils.ts @@ -3,7 +3,10 @@ import { nanoid } from 'nanoid'; /** * Exports a function for initializing monaco with the deephaven theme/config */ -import { resolveCssVariablesInRecord, Shortcut } from '@deephaven/components'; +import { + resolveCssVariablesInRecord, + type Shortcut, +} from '@deephaven/components'; import type { dh } from '@deephaven/jsapi-types'; import { assertNotNull } from '@deephaven/utils'; import { find as linkifyFind } from 'linkifyjs'; @@ -18,7 +21,7 @@ import GroovyLang from './lang/groovy'; import ScalaLang from './lang/scala'; import DbLang from './lang/db'; import LogLang from './lang/log'; -import { Language } from './lang/Language'; +import { type Language } from './lang/Language'; import MonacoProviders from './MonacoProviders'; const log = Log.module('MonacoUtils'); diff --git a/packages/console/src/monaco/lang/Language.ts b/packages/console/src/monaco/lang/Language.ts index 6a7aaea94..ecbf522fa 100644 --- a/packages/console/src/monaco/lang/Language.ts +++ b/packages/console/src/monaco/lang/Language.ts @@ -1,4 +1,4 @@ -import * as monaco from 'monaco-editor'; +import type * as monaco from 'monaco-editor'; export type Language = { id: string; diff --git a/packages/console/src/monaco/lang/db.ts b/packages/console/src/monaco/lang/db.ts index 2b1b898f8..a9f4a29ff 100644 --- a/packages/console/src/monaco/lang/db.ts +++ b/packages/console/src/monaco/lang/db.ts @@ -1,5 +1,5 @@ -import * as monaco from 'monaco-editor'; -import { Language } from './Language'; +import type * as monaco from 'monaco-editor'; +import { type Language } from './Language'; /* eslint no-useless-escape: "off" */ const id = 'deephavenDb'; diff --git a/packages/console/src/monaco/lang/groovy.ts b/packages/console/src/monaco/lang/groovy.ts index d9c191f13..d2ce72dd4 100644 --- a/packages/console/src/monaco/lang/groovy.ts +++ b/packages/console/src/monaco/lang/groovy.ts @@ -1,5 +1,5 @@ -import * as monaco from 'monaco-editor'; -import { Language } from './Language'; +import type * as monaco from 'monaco-editor'; +import { type Language } from './Language'; const id = 'groovy'; diff --git a/packages/console/src/monaco/lang/log.ts b/packages/console/src/monaco/lang/log.ts index 892fdb70a..50c04f0b8 100644 --- a/packages/console/src/monaco/lang/log.ts +++ b/packages/console/src/monaco/lang/log.ts @@ -1,6 +1,6 @@ /* eslint no-useless-escape: "off" */ -import * as monaco from 'monaco-editor'; -import { Language } from './Language'; +import type * as monaco from 'monaco-editor'; +import { type Language } from './Language'; const id = 'log'; diff --git a/packages/console/src/monaco/lang/python.ts b/packages/console/src/monaco/lang/python.ts index 2ee3718b8..2463d5e56 100644 --- a/packages/console/src/monaco/lang/python.ts +++ b/packages/console/src/monaco/lang/python.ts @@ -1,5 +1,5 @@ -import * as monaco from 'monaco-editor'; -import { Language } from './Language'; +import type * as monaco from 'monaco-editor'; +import { type Language } from './Language'; const id = 'python'; diff --git a/packages/console/src/monaco/lang/scala.ts b/packages/console/src/monaco/lang/scala.ts index 7e718477b..eb2b8923e 100644 --- a/packages/console/src/monaco/lang/scala.ts +++ b/packages/console/src/monaco/lang/scala.ts @@ -26,8 +26,8 @@ * - https://github.com/microsoft/monaco-languages/blob/main/src/scala/scala.ts *--------------------------------------------------------------------------------------------*/ -import * as monaco from 'monaco-editor'; -import { Language } from './Language'; +import type * as monaco from 'monaco-editor'; +import { type Language } from './Language'; const id = 'scala'; diff --git a/packages/console/src/notebook/Editor.tsx b/packages/console/src/notebook/Editor.tsx index 2b1292bb5..f3762ccbc 100644 --- a/packages/console/src/notebook/Editor.tsx +++ b/packages/console/src/notebook/Editor.tsx @@ -1,14 +1,14 @@ /** * Editor editor for large blocks of code */ -import React, { Component, ReactElement } from 'react'; +import React, { Component, type ReactElement } from 'react'; import classNames from 'classnames'; import * as monaco from 'monaco-editor'; import { assertNotNull } from '@deephaven/utils'; import MonacoUtils from '../monaco/MonacoUtils'; import './Editor.scss'; -interface EditorProps { +export interface EditorProps { className: string; onEditorInitialized: (editor: monaco.editor.IStandaloneCodeEditor) => void; onEditorWillDestroy: (editor: monaco.editor.IStandaloneCodeEditor) => void; diff --git a/packages/console/src/notebook/ScriptEditor.tsx b/packages/console/src/notebook/ScriptEditor.tsx index aea6a44fd..43cccf275 100644 --- a/packages/console/src/notebook/ScriptEditor.tsx +++ b/packages/console/src/notebook/ScriptEditor.tsx @@ -1,7 +1,7 @@ /** * Script editor for large blocks of code */ -import React, { Component, ReactElement, RefObject } from 'react'; +import React, { Component, type ReactElement, type RefObject } from 'react'; import { LoadingOverlay, ShortcutRegistry } from '@deephaven/components'; import Log from '@deephaven/log'; import type { dh } from '@deephaven/jsapi-types'; diff --git a/packages/console/tsconfig.json b/packages/console/tsconfig.json index 8d62af0f0..a1c28753d 100644 --- a/packages/console/tsconfig.json +++ b/packages/console/tsconfig.json @@ -13,6 +13,7 @@ { "path": "../jsapi-shim" }, { "path": "../log" }, { "path": "../storage" }, + { "path": "../test-utils" }, { "path": "../utils" } ] } diff --git a/packages/dashboard-core-plugins/CHANGELOG.md b/packages/dashboard-core-plugins/CHANGELOG.md index ac7426be7..6ee80f8be 100644 --- a/packages/dashboard-core-plugins/CHANGELOG.md +++ b/packages/dashboard-core-plugins/CHANGELOG.md @@ -3,6 +3,44 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Bug Fixes + +- Widget panel fixes ([#2227](https://github.com/deephaven/web-client-ui/issues/2227)) ([c985e12](https://github.com/deephaven/web-client-ui/commit/c985e1274097860dcbf4690ac8412c9f84831209)) + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Features + +- Pass through additional actions from WidgetPanel ([#2224](https://github.com/deephaven/web-client-ui/issues/2224)) ([bc720d1](https://github.com/deephaven/web-client-ui/commit/bc720d1789a5e28c99b06d496e58187fb4b26038)) + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +### Bug Fixes + +- ChartBuilderPlugin fixes for charts built from PPQs in Enterprise ([#2167](https://github.com/deephaven/web-client-ui/issues/2167)) ([99b8d59](https://github.com/deephaven/web-client-ui/commit/99b8d5952ba325bf74d2d16ed39eb7a2e897d196)) +- Publish WidgetPanelProps ([#2210](https://github.com/deephaven/web-client-ui/issues/2210)) ([7331976](https://github.com/deephaven/web-client-ui/commit/7331976004ed9b33fca9d97919d359dd881e8d0a)), closes [/github.com/deephaven-ent/iris/pull/2114/files#diff-536d6ac232028a4ebbafc5ca79bb1a22844488a4b628196e43056379f9326a90R17](https://github.com/deephaven//github.com/deephaven-ent/iris/pull/2114/files/issues/diff-536d6ac232028a4ebbafc5ca79bb1a22844488a4b628196e43056379f9326a90R17) + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) ### Bug Fixes diff --git a/packages/dashboard-core-plugins/package.json b/packages/dashboard-core-plugins/package.json index 376805ed1..10c17894a 100644 --- a/packages/dashboard-core-plugins/package.json +++ b/packages/dashboard-core-plugins/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/dashboard-core-plugins", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Dashboard Core Plugins", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -66,7 +66,8 @@ }, "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", - "@deephaven/mocks": "file:../mocks" + "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils" }, "files": [ "dist", diff --git a/packages/dashboard-core-plugins/src/ChartBuilderPlugin.tsx b/packages/dashboard-core-plugins/src/ChartBuilderPlugin.tsx index 488862e44..01d4d4d82 100644 --- a/packages/dashboard-core-plugins/src/ChartBuilderPlugin.tsx +++ b/packages/dashboard-core-plugins/src/ChartBuilderPlugin.tsx @@ -1,17 +1,11 @@ import { useCallback } from 'react'; -import { - ChartModel, - ChartModelFactory, - ChartModelSettings, - ChartUtils, -} from '@deephaven/chart'; +import { type ChartModelSettings, ChartUtils } from '@deephaven/chart'; import { assertIsDashboardPluginProps, - DashboardPluginComponentProps, + type DashboardPluginComponentProps, LayoutUtils, useListener, } from '@deephaven/dashboard'; -import { useApi } from '@deephaven/jsapi-bootstrap'; import type { dh } from '@deephaven/jsapi-types'; import { nanoid } from 'nanoid'; import { IrisGridEvent } from './events'; @@ -28,7 +22,6 @@ export function ChartBuilderPlugin( ): JSX.Element | null { assertIsDashboardPluginProps(props); const { id, layout } = props; - const dh = useApi(); const handleCreateChart = useCallback( ({ @@ -45,8 +38,7 @@ export function ChartBuilderPlugin( table: dh.Table; }) => { const { settings } = metadata; - const makeModel = (): Promise => - ChartModelFactory.makeModelFromSettings(dh, settings, table); + const fetchTable = async () => table; const title = ChartUtils.titleFromSettings(settings); const config = { @@ -56,7 +48,7 @@ export function ChartBuilderPlugin( localDashboardId: id, id: panelId, metadata, - makeModel, + fetch: fetchTable, }, title, id: panelId, @@ -65,7 +57,7 @@ export function ChartBuilderPlugin( const { root } = layout; LayoutUtils.openComponent({ root, config }); }, - [dh, id, layout] + [id, layout] ); useListener(layout.eventHub, IrisGridEvent.CREATE_CHART, handleCreateChart); diff --git a/packages/dashboard-core-plugins/src/ChartBuilderPluginConfig.ts b/packages/dashboard-core-plugins/src/ChartBuilderPluginConfig.ts index 220a3ac62..09930ffde 100644 --- a/packages/dashboard-core-plugins/src/ChartBuilderPluginConfig.ts +++ b/packages/dashboard-core-plugins/src/ChartBuilderPluginConfig.ts @@ -1,4 +1,4 @@ -import { PluginType, DashboardPlugin } from '@deephaven/plugin'; +import { PluginType, type DashboardPlugin } from '@deephaven/plugin'; import ChartBuilderPlugin from './ChartBuilderPlugin'; const ChartBuilderPluginConfig: DashboardPlugin = { diff --git a/packages/dashboard-core-plugins/src/ChartPanelPlugin.tsx b/packages/dashboard-core-plugins/src/ChartPanelPlugin.tsx index 92d9e8751..09b620196 100644 --- a/packages/dashboard-core-plugins/src/ChartPanelPlugin.tsx +++ b/packages/dashboard-core-plugins/src/ChartPanelPlugin.tsx @@ -1,19 +1,15 @@ -import { forwardRef, useMemo } from 'react'; -import { - ObjectFetcher, - useApi, - useObjectFetcher, -} from '@deephaven/jsapi-bootstrap'; -import { ChartModel, ChartModelFactory } from '@deephaven/chart'; +import { forwardRef, useCallback } from 'react'; +import { useDeferredApi } from '@deephaven/jsapi-bootstrap'; +import { type ChartModel, ChartModelFactory } from '@deephaven/chart'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { IrisGridUtils } from '@deephaven/iris-grid'; import { getTimeZone, store } from '@deephaven/redux'; -import { WidgetPanelProps } from '@deephaven/plugin'; +import { type WidgetPanelProps } from '@deephaven/plugin'; +import { assertNotNull } from '@deephaven/utils'; import { - ChartPanelMetadata, - GLChartPanelState, + type ChartPanelMetadata, + type GLChartPanelState, isChartPanelDehydratedProps, - isChartPanelFigureMetadata, isChartPanelTableMetadata, } from './panels'; import ConnectedChartPanel, { @@ -23,28 +19,18 @@ import ConnectedChartPanel, { async function createChartModel( dh: typeof DhType, - fetchObject: ObjectFetcher, metadata: ChartPanelMetadata, - fetchFigure: () => Promise, + panelFetch: () => Promise, panelState?: GLChartPanelState ): Promise { - let settings; - let tableName; - let figureName; - let tableSettings; + let settings = {}; + let tableName = ''; + let tableSettings = {}; if (isChartPanelTableMetadata(metadata)) { settings = metadata.settings; tableName = metadata.table; - figureName = undefined; tableSettings = metadata.tableSettings; - } else { - settings = {}; - tableName = ''; - figureName = isChartPanelFigureMetadata(metadata) - ? metadata.figure - : metadata.name; - tableSettings = {}; } if (panelState != null) { if (panelState.tableSettings != null) { @@ -53,9 +39,6 @@ async function createChartModel( if (panelState.table != null) { tableName = panelState.table; } - if (panelState.figure != null) { - figureName = panelState.figure; - } if (panelState.settings != null) { settings = { ...settings, @@ -64,83 +47,59 @@ async function createChartModel( } } - if (figureName == null && tableName == null) { - const figure = await fetchFigure(); - - return ChartModelFactory.makeModel(dh, settings, figure); - } - - if (figureName != null) { - let figure: DhType.plot.Figure; - - if (metadata.type === dh.VariableType.FIGURE) { - const descriptor = { - ...metadata, - name: figureName, - type: dh.VariableType.FIGURE, - }; - figure = await fetchObject(descriptor); - } else { - figure = await fetchFigure(); - } + if (tableName != null && tableName !== '') { + const table = (await panelFetch()) as DhType.Table; + new IrisGridUtils(dh).applyTableSettings( + table, + tableSettings, + getTimeZone(store.getState()) + ); - return ChartModelFactory.makeModel(dh, settings, figure); + return ChartModelFactory.makeModelFromSettings(dh, settings, table); } - const descriptor = { - ...metadata, - name: tableName, - type: dh.VariableType.TABLE, - }; - const table = await fetchObject(descriptor); - new IrisGridUtils(dh).applyTableSettings( - table, - tableSettings, - getTimeZone(store.getState()) - ); + const figure = (await panelFetch()) as DhType.plot.Figure; - return ChartModelFactory.makeModelFromSettings( - dh, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - settings as any, - table - ); + return ChartModelFactory.makeModel(dh, settings, figure); } export const ChartPanelPlugin = forwardRef( (props: WidgetPanelProps, ref: React.Ref) => { - const dh = useApi(); - const fetchObject = useObjectFetcher(); - const panelState = isChartPanelDehydratedProps(props) ? (props as unknown as ChartPanelProps).panelState : undefined; const { fetch: panelFetch, metadata, localDashboardId } = props; - - const hydratedProps = useMemo( - () => ({ - metadata: metadata as ChartPanelMetadata, - localDashboardId, - makeModel: () => { - if (metadata == null) { - throw new Error('Metadata is required for chart panel'); - } - - return createChartModel( - dh, - fetchObject, - metadata as ChartPanelMetadata, - panelFetch, - panelState - ); - }, - }), - [metadata, localDashboardId, dh, fetchObject, panelFetch, panelState] + assertNotNull(metadata); + const [dh, error] = useDeferredApi(metadata); + + const makeModel = useCallback(async () => { + if (error != null) { + throw error; + } + if (dh == null) { + return new Promise(() => { + // We don't have the API yet, just return an unresolved promise so it shows as loading + }); + } + return createChartModel( + dh, + metadata as ChartPanelMetadata, + panelFetch, + panelState + ); + }, [dh, error, metadata, panelFetch, panelState]); + + return ( + ); - - // eslint-disable-next-line react/jsx-props-no-spreading - return ; } ); diff --git a/packages/dashboard-core-plugins/src/ChartWidgetPlugin.tsx b/packages/dashboard-core-plugins/src/ChartWidgetPlugin.tsx index 990e7400d..28d9b5707 100644 --- a/packages/dashboard-core-plugins/src/ChartWidgetPlugin.tsx +++ b/packages/dashboard-core-plugins/src/ChartWidgetPlugin.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; import { useApi } from '@deephaven/jsapi-bootstrap'; -import { Chart, ChartModel, ChartModelFactory } from '@deephaven/chart'; +import { Chart, type ChartModel, ChartModelFactory } from '@deephaven/chart'; import type { dh } from '@deephaven/jsapi-types'; import { type WidgetComponentProps } from '@deephaven/plugin'; diff --git a/packages/dashboard-core-plugins/src/ConsolePlugin.tsx b/packages/dashboard-core-plugins/src/ConsolePlugin.tsx index 9e9a59985..eae350836 100644 --- a/packages/dashboard-core-plugins/src/ConsolePlugin.tsx +++ b/packages/dashboard-core-plugins/src/ConsolePlugin.tsx @@ -1,18 +1,18 @@ -import { MonacoProviders, ScriptEditor } from '@deephaven/console'; +import { MonacoProviders, type ScriptEditor } from '@deephaven/console'; import { assertIsDashboardPluginProps, - DashboardPluginComponentProps, + type DashboardPluginComponentProps, DashboardUtils, - DehydratedDashboardPanelProps, + type DehydratedDashboardPanelProps, LayoutUtils, - PanelComponent, - PanelHydrateFunction, + type PanelComponent, + type PanelHydrateFunction, useAppSelector, useListener, usePanelRegistration, } from '@deephaven/dashboard'; import { FileUtils } from '@deephaven/file-explorer'; -import { CloseOptions, isComponent } from '@deephaven/golden-layout'; +import { type CloseOptions, isComponent } from '@deephaven/golden-layout'; import Log from '@deephaven/log'; import { getNotebookSettings } from '@deephaven/redux'; import { useCallback, useEffect, useRef, useState } from 'react'; diff --git a/packages/dashboard-core-plugins/src/FilterPlugin.tsx b/packages/dashboard-core-plugins/src/FilterPlugin.tsx index 3ee7e2917..0da346985 100644 --- a/packages/dashboard-core-plugins/src/FilterPlugin.tsx +++ b/packages/dashboard-core-plugins/src/FilterPlugin.tsx @@ -1,9 +1,9 @@ -import { Component, useCallback, useEffect, useState } from 'react'; +import { type Component, useCallback, useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; import { nanoid } from 'nanoid'; import { assertIsDashboardPluginProps, - DashboardPluginComponentProps, + type DashboardPluginComponentProps, LayoutUtils, PanelEvent, updateDashboardData, diff --git a/packages/dashboard-core-plugins/src/FilterPluginConfig.ts b/packages/dashboard-core-plugins/src/FilterPluginConfig.ts index 2eff1ac26..ae6c946ed 100644 --- a/packages/dashboard-core-plugins/src/FilterPluginConfig.ts +++ b/packages/dashboard-core-plugins/src/FilterPluginConfig.ts @@ -1,4 +1,4 @@ -import { PluginType, DashboardPlugin } from '@deephaven/plugin'; +import { PluginType, type DashboardPlugin } from '@deephaven/plugin'; import FilterPlugin from './FilterPlugin'; const FilterPluginConfig: DashboardPlugin = { diff --git a/packages/dashboard-core-plugins/src/GridPanelPlugin.tsx b/packages/dashboard-core-plugins/src/GridPanelPlugin.tsx index df50cfb3b..dc70ac9e2 100644 --- a/packages/dashboard-core-plugins/src/GridPanelPlugin.tsx +++ b/packages/dashboard-core-plugins/src/GridPanelPlugin.tsx @@ -1,5 +1,5 @@ import { forwardRef } from 'react'; -import { WidgetPanelProps } from '@deephaven/plugin'; +import { type WidgetPanelProps } from '@deephaven/plugin'; import { type dh } from '@deephaven/jsapi-types'; import useHydrateGrid from './useHydrateGrid'; import ConnectedIrisGridPanel, { diff --git a/packages/dashboard-core-plugins/src/GridPluginConfig.ts b/packages/dashboard-core-plugins/src/GridPluginConfig.ts index e57dd35cc..a1d1dd16d 100644 --- a/packages/dashboard-core-plugins/src/GridPluginConfig.ts +++ b/packages/dashboard-core-plugins/src/GridPluginConfig.ts @@ -1,6 +1,6 @@ import { PluginType, type WidgetPlugin } from '@deephaven/plugin'; import { dhTable } from '@deephaven/icons'; -import { dh } from '@deephaven/jsapi-types'; +import { type dh } from '@deephaven/jsapi-types'; import { GridWidgetPlugin } from './GridWidgetPlugin'; import { GridPanelPlugin } from './GridPanelPlugin'; diff --git a/packages/dashboard-core-plugins/src/GridWidgetPlugin.tsx b/packages/dashboard-core-plugins/src/GridWidgetPlugin.tsx index dd12853d9..d2406d792 100644 --- a/packages/dashboard-core-plugins/src/GridWidgetPlugin.tsx +++ b/packages/dashboard-core-plugins/src/GridWidgetPlugin.tsx @@ -2,7 +2,7 @@ import { type WidgetComponentProps } from '@deephaven/plugin'; import { type dh } from '@deephaven/jsapi-types'; import { IrisGrid } from '@deephaven/iris-grid'; import { useSelector } from 'react-redux'; -import { getSettings, RootState } from '@deephaven/redux'; +import { getSettings, type RootState } from '@deephaven/redux'; import { LoadingOverlay } from '@deephaven/components'; import { getErrorMessage } from '@deephaven/utils'; import { useIrisGridModel } from './useIrisGridModel'; diff --git a/packages/dashboard-core-plugins/src/LinkerPlugin.tsx b/packages/dashboard-core-plugins/src/LinkerPlugin.tsx index 20a71a402..94fa40b19 100644 --- a/packages/dashboard-core-plugins/src/LinkerPlugin.tsx +++ b/packages/dashboard-core-plugins/src/LinkerPlugin.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { assertIsDashboardPluginProps, - DashboardPluginComponentProps, + type DashboardPluginComponentProps, } from '@deephaven/dashboard'; import Linker from './linker/Linker'; diff --git a/packages/dashboard-core-plugins/src/LinkerPluginConfig.ts b/packages/dashboard-core-plugins/src/LinkerPluginConfig.ts index 8a0384052..c72d31b13 100644 --- a/packages/dashboard-core-plugins/src/LinkerPluginConfig.ts +++ b/packages/dashboard-core-plugins/src/LinkerPluginConfig.ts @@ -1,4 +1,4 @@ -import { PluginType, DashboardPlugin } from '@deephaven/plugin'; +import { PluginType, type DashboardPlugin } from '@deephaven/plugin'; import LinkerPlugin from './LinkerPlugin'; const LinkerPluginConfig: DashboardPlugin = { diff --git a/packages/dashboard-core-plugins/src/MarkdownPlugin.tsx b/packages/dashboard-core-plugins/src/MarkdownPlugin.tsx index 1da0eebb1..a99e8c324 100644 --- a/packages/dashboard-core-plugins/src/MarkdownPlugin.tsx +++ b/packages/dashboard-core-plugins/src/MarkdownPlugin.tsx @@ -2,7 +2,7 @@ import { useCallback, useEffect } from 'react'; import { nanoid } from 'nanoid'; import { assertIsDashboardPluginProps, - DashboardPluginComponentProps, + type DashboardPluginComponentProps, LayoutUtils, useListener, } from '@deephaven/dashboard'; diff --git a/packages/dashboard-core-plugins/src/MarkdownPluginConfig.ts b/packages/dashboard-core-plugins/src/MarkdownPluginConfig.ts index d1f52354c..2eef78a36 100644 --- a/packages/dashboard-core-plugins/src/MarkdownPluginConfig.ts +++ b/packages/dashboard-core-plugins/src/MarkdownPluginConfig.ts @@ -1,4 +1,4 @@ -import { PluginType, DashboardPlugin } from '@deephaven/plugin'; +import { PluginType, type DashboardPlugin } from '@deephaven/plugin'; import MarkdownPlugin from './MarkdownPlugin'; const MarkdownPluginConfig: DashboardPlugin = { diff --git a/packages/dashboard-core-plugins/src/PandasPanelPlugin.tsx b/packages/dashboard-core-plugins/src/PandasPanelPlugin.tsx index 5ffdc3c14..a5b10d10c 100644 --- a/packages/dashboard-core-plugins/src/PandasPanelPlugin.tsx +++ b/packages/dashboard-core-plugins/src/PandasPanelPlugin.tsx @@ -1,5 +1,5 @@ import { forwardRef } from 'react'; -import { WidgetPanelProps } from '@deephaven/plugin'; +import { type WidgetPanelProps } from '@deephaven/plugin'; import { type dh } from '@deephaven/jsapi-types'; import { PandasPanel } from './panels'; import useHydrateGrid from './useHydrateGrid'; diff --git a/packages/dashboard-core-plugins/src/PandasPluginConfig.ts b/packages/dashboard-core-plugins/src/PandasPluginConfig.ts index a21798fc7..59a156083 100644 --- a/packages/dashboard-core-plugins/src/PandasPluginConfig.ts +++ b/packages/dashboard-core-plugins/src/PandasPluginConfig.ts @@ -1,4 +1,4 @@ -import { PluginType, WidgetPlugin } from '@deephaven/plugin'; +import { PluginType, type WidgetPlugin } from '@deephaven/plugin'; import { dhPandas } from '@deephaven/icons'; import type { dh } from '@deephaven/jsapi-types'; import { PandasWidgetPlugin } from './PandasWidgetPlugin'; diff --git a/packages/dashboard-core-plugins/src/PandasWidgetPlugin.tsx b/packages/dashboard-core-plugins/src/PandasWidgetPlugin.tsx index 8b43a0ec4..d7c3c9848 100644 --- a/packages/dashboard-core-plugins/src/PandasWidgetPlugin.tsx +++ b/packages/dashboard-core-plugins/src/PandasWidgetPlugin.tsx @@ -1,4 +1,4 @@ -import { WidgetComponentProps } from '@deephaven/plugin'; +import { type WidgetComponentProps } from '@deephaven/plugin'; import { type dh } from '@deephaven/jsapi-types'; import IrisGrid from '@deephaven/iris-grid'; import { LoadingOverlay } from '@deephaven/components'; diff --git a/packages/dashboard-core-plugins/src/WidgetLoaderPlugin.tsx b/packages/dashboard-core-plugins/src/WidgetLoaderPlugin.tsx index d4e951287..e846cd771 100644 --- a/packages/dashboard-core-plugins/src/WidgetLoaderPlugin.tsx +++ b/packages/dashboard-core-plugins/src/WidgetLoaderPlugin.tsx @@ -3,11 +3,11 @@ import type { ReactComponentConfig } from '@deephaven/golden-layout'; import { nanoid } from 'nanoid'; import { assertIsDashboardPluginProps, - DashboardPluginComponentProps, - DehydratedDashboardPanelProps, - PanelOpenEventDetail, + type DashboardPluginComponentProps, + type DehydratedDashboardPanelProps, + type PanelOpenEventDetail, LayoutUtils, - PanelProps, + type PanelProps, canHaveRef, usePanelOpenListener, } from '@deephaven/dashboard'; @@ -18,7 +18,7 @@ import { type WidgetPlugin, } from '@deephaven/plugin'; import { WidgetPanel } from './panels'; -import { WidgetPanelDescriptor } from './panels/WidgetPanelTypes'; +import { type WidgetPanelDescriptor } from './panels/WidgetPanelTypes'; const log = Log.module('WidgetLoaderPlugin'); diff --git a/packages/dashboard-core-plugins/src/WidgetLoaderPluginConfig.ts b/packages/dashboard-core-plugins/src/WidgetLoaderPluginConfig.ts index 707e396c6..3c74122cf 100644 --- a/packages/dashboard-core-plugins/src/WidgetLoaderPluginConfig.ts +++ b/packages/dashboard-core-plugins/src/WidgetLoaderPluginConfig.ts @@ -1,4 +1,4 @@ -import { PluginType, DashboardPlugin } from '@deephaven/plugin'; +import { PluginType, type DashboardPlugin } from '@deephaven/plugin'; import WidgetLoaderPlugin from './WidgetLoaderPlugin'; const WidgetLoaderPluginConfig: DashboardPlugin = { diff --git a/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.test.tsx b/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.test.tsx index c806cb152..7bf6dd671 100644 --- a/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.test.tsx +++ b/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.test.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { IrisGridTestUtils } from '@deephaven/iris-grid'; -import DropdownFilter, { DropdownFilterProps } from './DropdownFilter'; -import { LinkPoint } from '../../linker/LinkerUtils'; +import DropdownFilter, { type DropdownFilterProps } from './DropdownFilter'; +import { type LinkPoint } from '../../linker/LinkerUtils'; type MakeContainerProps = Partial & { ref?: React.RefObject; diff --git a/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.tsx b/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.tsx index 1d0e4e00a..034df0675 100644 --- a/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.tsx +++ b/packages/dashboard-core-plugins/src/controls/dropdown-filter/DropdownFilter.tsx @@ -4,10 +4,10 @@ import React, { Component, - KeyboardEvent, - MouseEvent, - ReactElement, - RefObject, + type KeyboardEvent, + type MouseEvent, + type ReactElement, + type RefObject, } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { @@ -25,7 +25,7 @@ import debounce from 'lodash.debounce'; import { nanoid } from 'nanoid'; import Log from '@deephaven/log'; import './DropdownFilter.scss'; -import { LinkPoint } from '../../linker/LinkerUtils'; +import { type LinkPoint } from '../../linker/LinkerUtils'; const log = Log.module('DropdownFilter'); const UPDATE_DEBOUNCE = 150; diff --git a/packages/dashboard-core-plugins/src/controls/input-filter/InputFilter.tsx b/packages/dashboard-core-plugins/src/controls/input-filter/InputFilter.tsx index b92190f14..37a3c67df 100644 --- a/packages/dashboard-core-plugins/src/controls/input-filter/InputFilter.tsx +++ b/packages/dashboard-core-plugins/src/controls/input-filter/InputFilter.tsx @@ -3,12 +3,12 @@ // background click is just a convience method, not an actual a11y issue import React, { - ChangeEvent, + type ChangeEvent, Component, - RefObject, - MouseEvent, - KeyboardEvent, - ReactElement, + type RefObject, + type MouseEvent, + type KeyboardEvent, + type ReactElement, } from 'react'; import { Button, CardFlip, Select } from '@deephaven/components'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; diff --git a/packages/dashboard-core-plugins/src/controls/markdown/MarkdownContainer.tsx b/packages/dashboard-core-plugins/src/controls/markdown/MarkdownContainer.tsx index 0f173a6cc..6db2d3184 100644 --- a/packages/dashboard-core-plugins/src/controls/markdown/MarkdownContainer.tsx +++ b/packages/dashboard-core-plugins/src/controls/markdown/MarkdownContainer.tsx @@ -1,8 +1,8 @@ import React, { - MouseEventHandler, + type MouseEventHandler, PureComponent, - ReactElement, - ReactNode, + type ReactElement, + type ReactNode, } from 'react'; import classNames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; diff --git a/packages/dashboard-core-plugins/src/controls/markdown/MarkdownEditor.tsx b/packages/dashboard-core-plugins/src/controls/markdown/MarkdownEditor.tsx index 19c775354..5dcab749f 100644 --- a/packages/dashboard-core-plugins/src/controls/markdown/MarkdownEditor.tsx +++ b/packages/dashboard-core-plugins/src/controls/markdown/MarkdownEditor.tsx @@ -1,6 +1,6 @@ -import React, { PureComponent, ReactElement } from 'react'; +import React, { PureComponent, type ReactElement } from 'react'; import Markdown from 'react-markdown'; -import { CodeComponent } from 'react-markdown/lib/ast-to-react'; +import { type CodeComponent } from 'react-markdown/lib/ast-to-react'; import remarkMath from 'remark-math'; import rehypeMathjax from 'rehype-mathjax'; import { Code, Editor } from '@deephaven/console'; diff --git a/packages/dashboard-core-plugins/src/controls/markdown/MarkdownStartPage.tsx b/packages/dashboard-core-plugins/src/controls/markdown/MarkdownStartPage.tsx index 30e401933..627ac9ce2 100644 --- a/packages/dashboard-core-plugins/src/controls/markdown/MarkdownStartPage.tsx +++ b/packages/dashboard-core-plugins/src/controls/markdown/MarkdownStartPage.tsx @@ -1,8 +1,8 @@ import React, { - Key, - MouseEventHandler, + type Key, + type MouseEventHandler, PureComponent, - ReactElement, + type ReactElement, } from 'react'; import { Button, diff --git a/packages/dashboard-core-plugins/src/controls/markdown/MarkdownUtils.ts b/packages/dashboard-core-plugins/src/controls/markdown/MarkdownUtils.ts index 6751dcf9e..eea3c376d 100644 --- a/packages/dashboard-core-plugins/src/controls/markdown/MarkdownUtils.ts +++ b/packages/dashboard-core-plugins/src/controls/markdown/MarkdownUtils.ts @@ -1,4 +1,4 @@ -import { ClosedPanels } from '@deephaven/dashboard'; +import { type ClosedPanels } from '@deephaven/dashboard'; import memoize from 'memoize-one'; class MarkdownUtils { diff --git a/packages/dashboard-core-plugins/src/events/IrisGridEvent.ts b/packages/dashboard-core-plugins/src/events/IrisGridEvent.ts index 36234a241..05a754d84 100644 --- a/packages/dashboard-core-plugins/src/events/IrisGridEvent.ts +++ b/packages/dashboard-core-plugins/src/events/IrisGridEvent.ts @@ -1,5 +1,5 @@ -import { RowDataMap } from '@deephaven/jsapi-utils'; -import { IrisGridPanel } from '../panels/IrisGridPanel'; +import { type RowDataMap } from '@deephaven/jsapi-utils'; +import { type IrisGridPanel } from '../panels/IrisGridPanel'; export type IrisGridDataSelectedEventCallback = ( panel: IrisGridPanel, diff --git a/packages/dashboard-core-plugins/src/events/TabEventMap.ts b/packages/dashboard-core-plugins/src/events/TabEventMap.ts index ce371f55b..b3fcc94bf 100644 --- a/packages/dashboard-core-plugins/src/events/TabEventMap.ts +++ b/packages/dashboard-core-plugins/src/events/TabEventMap.ts @@ -1,5 +1,5 @@ -import { ValueOf } from '@deephaven/utils'; -import TabEvent from './TabEvent'; +import { type ValueOf } from '@deephaven/utils'; +import type TabEvent from './TabEvent'; export type TabEventType = ValueOf; diff --git a/packages/dashboard-core-plugins/src/linker/ColumnSelectionValidator.ts b/packages/dashboard-core-plugins/src/linker/ColumnSelectionValidator.ts index 88dd0d2e4..0de1c6d58 100644 --- a/packages/dashboard-core-plugins/src/linker/ColumnSelectionValidator.ts +++ b/packages/dashboard-core-plugins/src/linker/ColumnSelectionValidator.ts @@ -1,5 +1,5 @@ -import { PanelComponent } from '@deephaven/dashboard'; -import { LinkColumn } from './LinkerUtils'; +import { type PanelComponent } from '@deephaven/dashboard'; +import { type LinkColumn } from './LinkerUtils'; export type ColumnSelectionValidator = ( panel: PanelComponent, diff --git a/packages/dashboard-core-plugins/src/linker/Linker.test.tsx b/packages/dashboard-core-plugins/src/linker/Linker.test.tsx index 27bec4644..e3feae2bc 100644 --- a/packages/dashboard-core-plugins/src/linker/Linker.test.tsx +++ b/packages/dashboard-core-plugins/src/linker/Linker.test.tsx @@ -1,16 +1,16 @@ import React from 'react'; import { render, screen, fireEvent } from '@testing-library/react'; import { - OpenedPanelMap, - PanelComponent, + type OpenedPanelMap, + type PanelComponent, PanelManager, } from '@deephaven/dashboard'; -import GoldenLayout, { Config } from '@deephaven/golden-layout'; +import GoldenLayout, { type Config } from '@deephaven/golden-layout'; import dh from '@deephaven/jsapi-shim'; -import { TypeValue as FilterTypeValue } from '@deephaven/filters'; +import { type TypeValue as FilterTypeValue } from '@deephaven/filters'; import ToolType from './ToolType'; import { Linker } from './Linker'; -import { Link, LinkPoint, LinkType } from './LinkerUtils'; +import { type Link, type LinkPoint, type LinkType } from './LinkerUtils'; function makeLayout() { return new GoldenLayout({} as Config, undefined); diff --git a/packages/dashboard-core-plugins/src/linker/Linker.tsx b/packages/dashboard-core-plugins/src/linker/Linker.tsx index a2a199605..5dea8b455 100644 --- a/packages/dashboard-core-plugins/src/linker/Linker.tsx +++ b/packages/dashboard-core-plugins/src/linker/Linker.tsx @@ -1,19 +1,19 @@ -import React, { Component, ErrorInfo } from 'react'; -import { connect, ConnectedProps } from 'react-redux'; +import React, { Component, type ErrorInfo } from 'react'; +import { connect, type ConnectedProps } from 'react-redux'; import { nanoid } from 'nanoid'; import memoize from 'memoize-one'; import { FadeTransition } from '@deephaven/components'; import { LayoutUtils, - PanelComponent, + type PanelComponent, PanelEvent, - PanelManager, + type PanelManager, } from '@deephaven/dashboard'; import type GoldenLayout from '@deephaven/golden-layout'; import { DateTimeColumnFormatter, DateUtils, - RowDataMap, + type RowDataMap, TableUtils, } from '@deephaven/jsapi-utils'; import type { dh as DhType } from '@deephaven/jsapi-types'; @@ -24,7 +24,7 @@ import { getApi, getTimeZone, setActiveTool as setActiveToolAction, - RootState, + type RootState, } from '@deephaven/redux'; import { getIsolatedLinkerPanelIdForDashboard, @@ -40,10 +40,10 @@ import { ChartEvent, IrisGridEvent, InputFilterEvent } from '../events'; import LinkerOverlayContent from './LinkerOverlayContent'; import LinkerUtils, { isLinkablePanel, - Link, - LinkColumn, - LinkFilterMap, - LinkType, + type Link, + type LinkColumn, + type LinkFilterMap, + type LinkType, isLinkableColumn, } from './LinkerUtils'; diff --git a/packages/dashboard-core-plugins/src/linker/LinkerLink.tsx b/packages/dashboard-core-plugins/src/linker/LinkerLink.tsx index 39ccd4ab8..b84aed1bd 100644 --- a/packages/dashboard-core-plugins/src/linker/LinkerLink.tsx +++ b/packages/dashboard-core-plugins/src/linker/LinkerLink.tsx @@ -1,12 +1,16 @@ -import React, { Component, MouseEvent } from 'react'; +import React, { Component, type MouseEvent } from 'react'; import memoize from 'memoize-one'; import classNames from 'classnames'; -import { Button, DropdownAction, DropdownMenu } from '@deephaven/components'; +import { + Button, + type DropdownAction, + DropdownMenu, +} from '@deephaven/components'; import { vsTrash, vsTriangleDown } from '@deephaven/icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Type as FilterType, - TypeValue as FilterTypeValue, + type TypeValue as FilterTypeValue, getLabelForNumberFilter, getLabelForTextFilter, getLabelForDateFilter, @@ -14,7 +18,7 @@ import { import Log from '@deephaven/log'; import { TableUtils } from '@deephaven/jsapi-utils'; import './LinkerLink.scss'; -import { LinkType } from './LinkerUtils'; +import { type LinkType } from './LinkerUtils'; const log = Log.module('LinkerLink'); diff --git a/packages/dashboard-core-plugins/src/linker/LinkerOverlayContent.test.tsx b/packages/dashboard-core-plugins/src/linker/LinkerOverlayContent.test.tsx index 9c8cd0c39..c12782eda 100644 --- a/packages/dashboard-core-plugins/src/linker/LinkerOverlayContent.test.tsx +++ b/packages/dashboard-core-plugins/src/linker/LinkerOverlayContent.test.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { render, screen, fireEvent } from '@testing-library/react'; import { - OpenedPanelMap, - PanelComponent, + type OpenedPanelMap, + type PanelComponent, PanelManager, } from '@deephaven/dashboard'; -import GoldenLayout, { Config } from '@deephaven/golden-layout'; +import GoldenLayout, { type Config } from '@deephaven/golden-layout'; import LinkerOverlayContent from './LinkerOverlayContent'; const LINKER_OVERLAY_MESSAGE = 'TEST_MESSAGE'; diff --git a/packages/dashboard-core-plugins/src/linker/LinkerOverlayContent.tsx b/packages/dashboard-core-plugins/src/linker/LinkerOverlayContent.tsx index 7ecc550cf..0c0a3e3fe 100644 --- a/packages/dashboard-core-plugins/src/linker/LinkerOverlayContent.tsx +++ b/packages/dashboard-core-plugins/src/linker/LinkerOverlayContent.tsx @@ -1,4 +1,4 @@ -import React, { Component, ErrorInfo } from 'react'; +import React, { Component, type ErrorInfo } from 'react'; import classNames from 'classnames'; import { Button, @@ -6,18 +6,18 @@ import { GLOBAL_SHORTCUTS, Tooltip, } from '@deephaven/components'; -import { LayoutUtils, PanelManager } from '@deephaven/dashboard'; +import { LayoutUtils, type PanelManager } from '@deephaven/dashboard'; import Log from '@deephaven/log'; import type { Container } from '@deephaven/golden-layout'; import { vsGripper } from '@deephaven/icons'; -import { TypeValue as FilterTypeValue } from '@deephaven/filters'; +import { type TypeValue as FilterTypeValue } from '@deephaven/filters'; import clamp from 'lodash.clamp'; import { isLinkableFromPanel, - Link, - LinkerCoordinate, - LinkPoint, - LinkType, + type Link, + type LinkerCoordinate, + type LinkPoint, + type LinkType, } from './LinkerUtils'; import LinkerLink from './LinkerLink'; import './LinkerOverlayContent.scss'; diff --git a/packages/dashboard-core-plugins/src/linker/LinkerUtils.test.tsx b/packages/dashboard-core-plugins/src/linker/LinkerUtils.test.tsx index 5172347d5..15ea1b0ee 100644 --- a/packages/dashboard-core-plugins/src/linker/LinkerUtils.test.tsx +++ b/packages/dashboard-core-plugins/src/linker/LinkerUtils.test.tsx @@ -1,10 +1,10 @@ -import { PanelComponent } from '@deephaven/dashboard'; -import { TypeValue as FilterTypeValue } from '@deephaven/filters'; +import { type PanelComponent } from '@deephaven/dashboard'; +import { type TypeValue as FilterTypeValue } from '@deephaven/filters'; import LinkerUtils, { - Link, - LinkType, - LinkPoint, - LinkColumn, + type Link, + type LinkType, + type LinkPoint, + type LinkColumn, isLinkableColumn, isLinkableFromPanel, isLinkablePanel, diff --git a/packages/dashboard-core-plugins/src/linker/LinkerUtils.ts b/packages/dashboard-core-plugins/src/linker/LinkerUtils.ts index 770bef84f..afe379cbb 100644 --- a/packages/dashboard-core-plugins/src/linker/LinkerUtils.ts +++ b/packages/dashboard-core-plugins/src/linker/LinkerUtils.ts @@ -1,7 +1,7 @@ import { nanoid } from 'nanoid'; -import { LayoutUtils, PanelComponent } from '@deephaven/dashboard'; +import { LayoutUtils, type PanelComponent } from '@deephaven/dashboard'; import { TableUtils } from '@deephaven/jsapi-utils'; -import { TypeValue as FilterTypeValue } from '@deephaven/filters'; +import { type TypeValue as FilterTypeValue } from '@deephaven/filters'; import Log from '@deephaven/log'; import { ChartPanel, IrisGridPanel, DropdownFilterPanel } from '../panels'; diff --git a/packages/dashboard-core-plugins/src/panels/ChartColumnSelectorOverlay.tsx b/packages/dashboard-core-plugins/src/panels/ChartColumnSelectorOverlay.tsx index a94daa3ab..05c5fa641 100644 --- a/packages/dashboard-core-plugins/src/panels/ChartColumnSelectorOverlay.tsx +++ b/packages/dashboard-core-plugins/src/panels/ChartColumnSelectorOverlay.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, ReactElement } from 'react'; +import React, { type MouseEventHandler, type ReactElement } from 'react'; import classNames from 'classnames'; import { SocketedButton } from '@deephaven/components'; import './ChartColumnSelectorOverlay.scss'; diff --git a/packages/dashboard-core-plugins/src/panels/ChartFilterOverlay.test.tsx b/packages/dashboard-core-plugins/src/panels/ChartFilterOverlay.test.tsx index 373359cee..f79eeb7ad 100644 --- a/packages/dashboard-core-plugins/src/panels/ChartFilterOverlay.test.tsx +++ b/packages/dashboard-core-plugins/src/panels/ChartFilterOverlay.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; -import { InputFilter } from '@deephaven/iris-grid'; -import ChartFilterOverlay, { ColumnMap } from './ChartFilterOverlay'; +import { type InputFilter } from '@deephaven/iris-grid'; +import ChartFilterOverlay, { type ColumnMap } from './ChartFilterOverlay'; const emptyTestMap = new Map([]); diff --git a/packages/dashboard-core-plugins/src/panels/ChartFilterOverlay.tsx b/packages/dashboard-core-plugins/src/panels/ChartFilterOverlay.tsx index 259a59cf1..ac772fd03 100644 --- a/packages/dashboard-core-plugins/src/panels/ChartFilterOverlay.tsx +++ b/packages/dashboard-core-plugins/src/panels/ChartFilterOverlay.tsx @@ -1,11 +1,16 @@ -import React, { MouseEvent, ReactElement, useCallback, useMemo } from 'react'; +import React, { + type MouseEvent, + type ReactElement, + useCallback, + useMemo, +} from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button } from '@deephaven/components'; import { vsPass, vsWarning } from '@deephaven/icons'; import { TextUtils } from '@deephaven/utils'; -import { ColumnName, InputFilter } from '@deephaven/iris-grid'; +import { type ColumnName, type InputFilter } from '@deephaven/iris-grid'; import './ChartFilterOverlay.scss'; export type ColumnMap = Map; diff --git a/packages/dashboard-core-plugins/src/panels/ChartPanel.test.tsx b/packages/dashboard-core-plugins/src/panels/ChartPanel.test.tsx index dfc828fe9..06432c1de 100644 --- a/packages/dashboard-core-plugins/src/panels/ChartPanel.test.tsx +++ b/packages/dashboard-core-plugins/src/panels/ChartPanel.test.tsx @@ -5,8 +5,8 @@ import { act, render, screen } from '@testing-library/react'; import dh from '@deephaven/jsapi-shim'; import { MockChartModel } from '@deephaven/chart'; import type { Container } from '@deephaven/golden-layout'; -import { PanelComponent } from '@deephaven/dashboard'; -import { ChartPanel, ChartPanelMetadata } from './ChartPanel'; +import { type PanelComponent } from '@deephaven/dashboard'; +import { ChartPanel, type ChartPanelMetadata } from './ChartPanel'; import ChartColumnSelectorOverlay from './ChartColumnSelectorOverlay'; const DASHBOARD_ID = 'TEST_DASHBOARD_ID'; diff --git a/packages/dashboard-core-plugins/src/panels/ChartPanel.tsx b/packages/dashboard-core-plugins/src/panels/ChartPanel.tsx index 717d2d2a2..e71f79c46 100644 --- a/packages/dashboard-core-plugins/src/panels/ChartPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/ChartPanel.tsx @@ -1,30 +1,30 @@ -import React, { Component, ReactElement, RefObject } from 'react'; +import React, { Component, type ReactElement, type RefObject } from 'react'; import classNames from 'classnames'; import memoize from 'memoize-one'; import { connect } from 'react-redux'; import debounce from 'lodash.debounce'; import { Chart, - ChartModel, - ChartModelSettings, - ChartUtils, - FilterMap, + type ChartModel, + ChartModelFactory, + type ChartModelSettings, + type FilterMap, isFigureChartModel, } from '@deephaven/chart'; import type PlotlyType from 'plotly.js'; import { - DashboardPanelProps, + type DashboardPanelProps, getOpenedPanelMapForDashboard, LayoutUtils, - PanelComponent, - PanelMetadata, - PanelProps, + type PanelComponent, + type PanelMetadata, + type PanelProps, } from '@deephaven/dashboard'; import { IrisGridUtils, - InputFilter, - ColumnName, - TableSettings, + type InputFilter, + type ColumnName, + type TableSettings, } from '@deephaven/iris-grid'; import type { dh } from '@deephaven/jsapi-types'; import { FadeTransition } from '@deephaven/components'; @@ -32,9 +32,9 @@ import Log from '@deephaven/log'; import { getActiveTool, getSettings, - RootState, + type RootState, setActiveTool as setActiveToolAction, - WorkspaceSettings, + type WorkspaceSettings, } from '@deephaven/redux'; import { assertNotNull, @@ -53,19 +53,19 @@ import { getTableMapForDashboard, setDashboardIsolatedLinkerPanelId as setDashboardIsolatedLinkerPanelIdAction, } from '../redux'; -import ChartFilterOverlay, { ColumnMap } from './ChartFilterOverlay'; +import ChartFilterOverlay, { type ColumnMap } from './ChartFilterOverlay'; import ChartColumnSelectorOverlay, { - SelectorColumn, + type SelectorColumn, } from './ChartColumnSelectorOverlay'; import './ChartPanel.scss'; -import { Link, LinkFilterMap } from '../linker/LinkerUtils'; -import { PanelState as IrisGridPanelState } from './IrisGridPanel'; +import { type Link, type LinkFilterMap } from '../linker/LinkerUtils'; +import { type PanelState as IrisGridPanelState } from './IrisGridPanel'; import { isChartPanelFigureMetadata, isChartPanelTableMetadata, } from './ChartPanelUtils'; -import { ColumnSelectionValidator } from '../linker/ColumnSelectionValidator'; -import { WidgetPanelDescriptor } from './WidgetPanelTypes'; +import { type ColumnSelectionValidator } from '../linker/ColumnSelectionValidator'; +import { type WidgetPanelDescriptor } from './WidgetPanelTypes'; const log = Log.module('ChartPanel'); const UPDATE_MODEL_DEBOUNCE = 150; @@ -286,14 +286,14 @@ export class ChartPanel extends Component { const { columnMap, model, filterMap, filterValueMap, isLinked, settings } = this.state; - if (!model) { - return; - } - if (makeModel !== prevProps.makeModel) { this.initModel(); } + if (model == null) { + return; + } + if (columnMap !== prevState.columnMap) { this.pruneFilterMaps(); } @@ -348,10 +348,17 @@ export class ChartPanel extends Component { pending: Pending; initModel(): void { - this.setState({ isLoading: true, isLoaded: false, error: undefined }); + this.setState({ + isLoading: true, + isLoaded: false, + error: undefined, + isDisconnected: false, + }); const { makeModel } = this.props; + this.pending.cancel(); + this.pending .add(makeModel(), resolved => { resolved.close(); @@ -651,12 +658,8 @@ export class ChartPanel extends Component { const { settings } = metadata; this.pending .add( - dh.plot.Figure.create( - new ChartUtils(dh).makeFigureSettings( - settings, - source - ) as unknown as dh.plot.FigureDescriptor - ) + ChartModelFactory.makeFigureFromSettings(dh, settings, source), + resolved => resolved.close() ) .then(figure => { if (isFigureChartModel(model)) { diff --git a/packages/dashboard-core-plugins/src/panels/ChartPanelUtils.ts b/packages/dashboard-core-plugins/src/panels/ChartPanelUtils.ts index af29c8e06..aeb55d1f2 100644 --- a/packages/dashboard-core-plugins/src/panels/ChartPanelUtils.ts +++ b/packages/dashboard-core-plugins/src/panels/ChartPanelUtils.ts @@ -1,4 +1,4 @@ -import { DehydratedDashboardPanelProps } from '@deephaven/dashboard'; +import { type DehydratedDashboardPanelProps } from '@deephaven/dashboard'; import type { ChartPanelMetadata, ChartPanelTableMetadata, diff --git a/packages/dashboard-core-plugins/src/panels/CommandHistoryPanel.tsx b/packages/dashboard-core-plugins/src/panels/CommandHistoryPanel.tsx index e0599635e..c98919693 100644 --- a/packages/dashboard-core-plugins/src/panels/CommandHistoryPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/CommandHistoryPanel.tsx @@ -1,16 +1,16 @@ -import React, { Component, RefObject } from 'react'; +import React, { Component, type RefObject } from 'react'; import { connect } from 'react-redux'; -import { ContextAction, ContextActions } from '@deephaven/components'; +import { type ContextAction, ContextActions } from '@deephaven/components'; import { CommandHistory, - CommandHistoryStorage, + type CommandHistoryStorage, SHORTCUTS, - CommandHistorySettings, - CommandHistoryTable, + type CommandHistorySettings, + type CommandHistoryTable, } from '@deephaven/console'; -import { DashboardPanelProps } from '@deephaven/dashboard'; +import { type DashboardPanelProps } from '@deephaven/dashboard'; import Log from '@deephaven/log'; -import { getCommandHistoryStorage, RootState } from '@deephaven/redux'; +import { getCommandHistoryStorage, type RootState } from '@deephaven/redux'; import { assertNotNull, Pending } from '@deephaven/utils'; import type { dh } from '@deephaven/jsapi-types'; import { ConsoleEvent, NotebookEvent } from '../events'; diff --git a/packages/dashboard-core-plugins/src/panels/ConsolePanel.test.tsx b/packages/dashboard-core-plugins/src/panels/ConsolePanel.test.tsx index 66159d6e3..adc4cb141 100644 --- a/packages/dashboard-core-plugins/src/panels/ConsolePanel.test.tsx +++ b/packages/dashboard-core-plugins/src/panels/ConsolePanel.test.tsx @@ -1,11 +1,14 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { CommandHistoryStorage } from '@deephaven/console'; +import { type CommandHistoryStorage } from '@deephaven/console'; import type { Container, EventEmitter } from '@deephaven/golden-layout'; import type { IdeConnection, IdeSession } from '@deephaven/jsapi-types'; import { dh } from '@deephaven/jsapi-shim'; -import { SessionConfig, SessionWrapper } from '@deephaven/jsapi-utils'; -import { TestUtils } from '@deephaven/utils'; +import { + type SessionConfig, + type SessionWrapper, +} from '@deephaven/jsapi-utils'; +import { TestUtils } from '@deephaven/test-utils'; import { ConsolePanel } from './ConsolePanel'; type IdeSessionConstructor = new (language: string) => IdeSession; diff --git a/packages/dashboard-core-plugins/src/panels/ConsolePanel.tsx b/packages/dashboard-core-plugins/src/panels/ConsolePanel.tsx index b99cd541d..7299fa1e9 100644 --- a/packages/dashboard-core-plugins/src/panels/ConsolePanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/ConsolePanel.tsx @@ -1,19 +1,19 @@ // Wrapper for the Console for use in a golden layout container // Will probably need to handle window popping out from golden layout here. -import React, { PureComponent, ReactElement, RefObject } from 'react'; +import React, { PureComponent, type ReactElement, type RefObject } from 'react'; import { nanoid } from 'nanoid'; import debounce from 'lodash.debounce'; import { connect } from 'react-redux'; import { LoadingOverlay } from '@deephaven/components'; import { - CommandHistoryStorage, + type CommandHistoryStorage, Console, ConsoleConstants, HeapUsage, ObjectIcon, } from '@deephaven/console'; import { - DashboardPanelProps, + type DashboardPanelProps, emitPanelOpen, LayoutManagerContext, LayoutUtils, @@ -21,13 +21,13 @@ import { } from '@deephaven/dashboard'; import type { dh } from '@deephaven/jsapi-types'; import { getVariableDescriptor } from '@deephaven/jsapi-bootstrap'; -import { SessionWrapper } from '@deephaven/jsapi-utils'; +import { type SessionWrapper } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; import { getCommandHistoryStorage, getPlugins, getTimeZone, - RootState, + type RootState, } from '@deephaven/redux'; import { assertNotNull } from '@deephaven/utils'; import { diff --git a/packages/dashboard-core-plugins/src/panels/DropdownFilterPanel.test.tsx b/packages/dashboard-core-plugins/src/panels/DropdownFilterPanel.test.tsx index a7edd436e..dd63094b5 100644 --- a/packages/dashboard-core-plugins/src/panels/DropdownFilterPanel.test.tsx +++ b/packages/dashboard-core-plugins/src/panels/DropdownFilterPanel.test.tsx @@ -4,7 +4,7 @@ import type { Container, EventHub } from '@deephaven/golden-layout'; import dh from '@deephaven/jsapi-shim'; import { DropdownFilterPanel, - DropdownFilterPanelProps, + type DropdownFilterPanelProps, } from './DropdownFilterPanel'; import DropdownFilter from '../controls/dropdown-filter/DropdownFilter'; diff --git a/packages/dashboard-core-plugins/src/panels/DropdownFilterPanel.tsx b/packages/dashboard-core-plugins/src/panels/DropdownFilterPanel.tsx index 52b4005a9..8d26da592 100644 --- a/packages/dashboard-core-plugins/src/panels/DropdownFilterPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/DropdownFilterPanel.tsx @@ -1,15 +1,15 @@ -import React, { Component, RefObject } from 'react'; -import { connect, ConnectedProps } from 'react-redux'; +import React, { Component, type RefObject } from 'react'; +import { connect, type ConnectedProps } from 'react-redux'; import debounce from 'lodash.debounce'; import deepEqual from 'fast-deep-equal'; import memoize from 'memoizee'; -import { DashboardPanelProps, LayoutUtils } from '@deephaven/dashboard'; +import { type DashboardPanelProps, LayoutUtils } from '@deephaven/dashboard'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { DateTimeColumnFormatter, Formatter, FormatterUtils, - FormattingRule, + type FormattingRule, TableUtils, } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; @@ -17,11 +17,11 @@ import { getActiveTool, getApi, getSettings, - RootState, + type RootState, } from '@deephaven/redux'; import { EMPTY_ARRAY, Pending, PromiseUtils } from '@deephaven/utils'; import DropdownFilter, { - DropdownFilterColumn, + type DropdownFilterColumn, } from '../controls/dropdown-filter/DropdownFilter'; import { InputFilterEvent } from '../events'; import { @@ -35,8 +35,8 @@ import './DropdownFilterPanel.scss'; import ToolType from '../linker/ToolType'; import WidgetPanel from './WidgetPanel'; import type { Link, LinkPoint } from '../linker/LinkerUtils'; -import { ColumnSelectionValidator } from '../linker/ColumnSelectionValidator'; -import { PanelState as InputFilterPanelState } from './InputFilterPanel'; +import { type ColumnSelectionValidator } from '../linker/ColumnSelectionValidator'; +import { type PanelState as InputFilterPanelState } from './InputFilterPanel'; const log = Log.module('DropdownFilterPanel'); diff --git a/packages/dashboard-core-plugins/src/panels/FileExplorerPanel.test.tsx b/packages/dashboard-core-plugins/src/panels/FileExplorerPanel.test.tsx index 81dfa0d14..cf4371d63 100644 --- a/packages/dashboard-core-plugins/src/panels/FileExplorerPanel.test.tsx +++ b/packages/dashboard-core-plugins/src/panels/FileExplorerPanel.test.tsx @@ -8,12 +8,15 @@ import { } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { - DirectoryStorageItem, - FileStorageItem, + type DirectoryStorageItem, + type FileStorageItem, } from '@deephaven/file-explorer'; import type { Container } from '@deephaven/golden-layout'; -import { TestUtils } from '@deephaven/utils'; -import { FileExplorerPanel, FileExplorerPanelProps } from './FileExplorerPanel'; +import { TestUtils } from '@deephaven/test-utils'; +import { + FileExplorerPanel, + type FileExplorerPanelProps, +} from './FileExplorerPanel'; import MockFileStorage from './MockFileStorage'; function makeFileName(index = 0): string { diff --git a/packages/dashboard-core-plugins/src/panels/FileExplorerPanel.tsx b/packages/dashboard-core-plugins/src/panels/FileExplorerPanel.tsx index 47b0d251f..bfeb2821a 100644 --- a/packages/dashboard-core-plugins/src/panels/FileExplorerPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/FileExplorerPanel.tsx @@ -1,16 +1,16 @@ -import { DashboardPanelProps } from '@deephaven/dashboard'; +import { type DashboardPanelProps } from '@deephaven/dashboard'; import Log from '@deephaven/log'; -import { getFileStorage, RootState } from '@deephaven/redux'; +import { getFileStorage, type RootState } from '@deephaven/redux'; import FileExplorer, { FileExplorerToolbar, - FileStorage, - FileStorageItem, + type FileStorage, + type FileStorageItem, FileUtils, NewItemModal, isDirectory, } from '@deephaven/file-explorer'; -import React, { ReactNode } from 'react'; -import { connect, ConnectedProps } from 'react-redux'; +import React, { type ReactNode } from 'react'; +import { connect, type ConnectedProps } from 'react-redux'; import type { dh } from '@deephaven/jsapi-types'; import Panel from './Panel'; import { NotebookEvent } from '../events'; diff --git a/packages/dashboard-core-plugins/src/panels/FilterSetManager.tsx b/packages/dashboard-core-plugins/src/panels/FilterSetManager.tsx index 23c86ca0e..4e8dbba29 100644 --- a/packages/dashboard-core-plugins/src/panels/FilterSetManager.tsx +++ b/packages/dashboard-core-plugins/src/panels/FilterSetManager.tsx @@ -3,11 +3,11 @@ // background click is just a convenience method, not an actual a11y issue import React, { - ChangeEvent, + type ChangeEvent, Component, - ReactNode, - KeyboardEvent, - MouseEvent, + type ReactNode, + type KeyboardEvent, + type MouseEvent, } from 'react'; import memoizeOne from 'memoize-one'; import { nanoid } from 'nanoid'; diff --git a/packages/dashboard-core-plugins/src/panels/FilterSetManagerPanel.tsx b/packages/dashboard-core-plugins/src/panels/FilterSetManagerPanel.tsx index 4a9cc59a7..d1b8df678 100644 --- a/packages/dashboard-core-plugins/src/panels/FilterSetManagerPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/FilterSetManagerPanel.tsx @@ -1,21 +1,21 @@ -import React, { Component, ReactElement } from 'react'; +import React, { Component, type ReactElement } from 'react'; import { connect } from 'react-redux'; import { getOpenedPanelMapForDashboard, LayoutUtils, - PanelComponent, + type PanelComponent, } from '@deephaven/dashboard'; import Log from '@deephaven/log'; import type { Container, EventEmitter } from '@deephaven/golden-layout'; import type { dh } from '@deephaven/jsapi-types'; -import { RootState } from '@deephaven/redux'; +import { type RootState } from '@deephaven/redux'; import { - AdvancedFilter, - ColumnName, - DehydratedIrisGridState, - QuickFilter, + type AdvancedFilter, + type ColumnName, + type DehydratedIrisGridState, + type QuickFilter, } from '@deephaven/iris-grid'; -import { GridState } from '@deephaven/grid'; +import { type GridState } from '@deephaven/grid'; import { getFilterSetsForDashboard, getInputFiltersForDashboard, @@ -24,17 +24,17 @@ import { } from '../redux'; import Panel from './Panel'; import FilterSetManager, { - ChangeHandlerArgs, - FilterSet, - FilterSetPanel, + type ChangeHandlerArgs, + type FilterSet, + type FilterSetPanel, } from './FilterSetManager'; import { IrisGridPanel } from './IrisGridPanel'; import DropdownFilterPanel from './DropdownFilterPanel'; import InputFilterPanel, { - PanelState as InputFilterPanelState, + type PanelState as InputFilterPanelState, } from './InputFilterPanel'; import './FilterSetManagerPanel.scss'; -import { FilterChangeEvent } from '../FilterPlugin'; +import { type FilterChangeEvent } from '../FilterPlugin'; const log = Log.module('FilterSetManagerPanel'); interface IrisGridState { diff --git a/packages/dashboard-core-plugins/src/panels/InputFilterPanel.tsx b/packages/dashboard-core-plugins/src/panels/InputFilterPanel.tsx index 991da3957..9553fcd4f 100644 --- a/packages/dashboard-core-plugins/src/panels/InputFilterPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/InputFilterPanel.tsx @@ -1,11 +1,11 @@ -import React, { Component, RefObject } from 'react'; +import React, { Component, type RefObject } from 'react'; import { connect } from 'react-redux'; import debounce from 'lodash.debounce'; import type { Container, EventEmitter } from '@deephaven/golden-layout'; -import { RootState } from '@deephaven/redux'; +import { type RootState } from '@deephaven/redux'; import Panel from './Panel'; import InputFilter, { - InputFilterColumn, + type InputFilterColumn, } from '../controls/input-filter/InputFilter'; import { InputFilterEvent } from '../events'; import { getColumnsForDashboard } from '../redux'; diff --git a/packages/dashboard-core-plugins/src/panels/IrisGridPanel.test.tsx b/packages/dashboard-core-plugins/src/panels/IrisGridPanel.test.tsx index ea4d107fe..cb3e882b5 100644 --- a/packages/dashboard-core-plugins/src/panels/IrisGridPanel.test.tsx +++ b/packages/dashboard-core-plugins/src/panels/IrisGridPanel.test.tsx @@ -4,9 +4,9 @@ import React from 'react'; import { render, screen, waitFor } from '@testing-library/react'; import { IrisGridModelFactory } from '@deephaven/iris-grid'; import dh from '@deephaven/jsapi-shim'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import type { Container } from '@deephaven/golden-layout'; -import { Workspace } from '@deephaven/redux'; +import { type Workspace } from '@deephaven/redux'; import { IrisGridPanel } from './IrisGridPanel'; const MockIrisGrid: React.FC & jest.Mock = jest.fn(() => null); diff --git a/packages/dashboard-core-plugins/src/panels/IrisGridPanel.tsx b/packages/dashboard-core-plugins/src/panels/IrisGridPanel.tsx index 1b68ea5bd..d697f4710 100644 --- a/packages/dashboard-core-plugins/src/panels/IrisGridPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/IrisGridPanel.tsx @@ -2,19 +2,19 @@ // Will probably need to handle window popping out from golden layout here. import React, { PureComponent, - ReactElement, - ReactNode, - RefObject, + type ReactElement, + type ReactNode, + type RefObject, } from 'react'; import memoize from 'memoize-one'; import { connect } from 'react-redux'; import debounce from 'lodash.debounce'; import { - DashboardPanelProps, + type DashboardPanelProps, DEFAULT_DASHBOARD_ID, LayoutUtils, - PanelComponent, - PanelMetadata, + type PanelComponent, + type PanelMetadata, } from '@deephaven/dashboard'; import { AdvancedSettings, @@ -23,54 +23,55 @@ import { IrisGridModel, IrisGridUtils, isIrisGridTableModelTemplate, - ColumnName, - PendingDataMap, - InputFilter, - IrisGridThemeType, - ReadonlyAdvancedFilterMap, - AggregationSettings, - AdvancedSettingsType, - UIRollupConfig, - UIRow, - ReadonlyQuickFilterMap, - FilterMap, - QuickFilter, - AdvancedFilter, - SidebarFormattingRule, - IrisGridState, - ChartBuilderSettings, - DehydratedIrisGridState, - DehydratedIrisGridPanelState, - ColumnHeaderGroup, - IrisGridContextMenuData, - PartitionConfig, + type ColumnName, + type PendingDataMap, + type InputFilter, + type IrisGridThemeType, + type ReadonlyAdvancedFilterMap, + type AggregationSettings, + type AdvancedSettingsType, + type UIRollupConfig, + type UIRow, + type ReadonlyQuickFilterMap, + type FilterMap, + type QuickFilter, + type AdvancedFilter, + type SidebarFormattingRule, + type IrisGridState, + type ChartBuilderSettings, + type DehydratedIrisGridState, + type DehydratedIrisGridPanelState, + type ColumnHeaderGroup, + type IrisGridContextMenuData, + type PartitionConfig, } from '@deephaven/iris-grid'; import { - AdvancedFilterOptions, - FormattingRule, - ReverseType, + type AdvancedFilterOptions, + type FormattingRule, + type ReverseType, TableUtils, } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; import { getSettings, getUser, - RootState, - User, - WorkspaceSettings, + type RootState, + type User, + type WorkspaceSettings, } from '@deephaven/redux'; import { assertNotNull, - CancelablePromise, + type CancelablePromise, + type EventT, PromiseUtils, } from '@deephaven/utils'; -import { ResolvableContextAction } from '@deephaven/components'; +import { type ResolvableContextAction } from '@deephaven/components'; import type { dh } from '@deephaven/jsapi-types'; import { - GridState, - ModelIndex, - ModelSizeMap, - MoveOperation, + type GridState, + type ModelIndex, + type ModelSizeMap, + type MoveOperation, } from '@deephaven/grid'; import type { TablePluginComponent, @@ -84,13 +85,13 @@ import { } from '../redux'; import WidgetPanel from './WidgetPanel'; import './IrisGridPanel.scss'; -import { Link, LinkColumn } from '../linker/LinkerUtils'; +import { type Link, type LinkColumn } from '../linker/LinkerUtils'; import IrisGridPanelTooltip from './IrisGridPanelTooltip'; import { isIrisGridPanelMetadata, isLegacyIrisGridPanelMetadata, } from './IrisGridPanelTypes'; -import { WidgetPanelDescriptor } from './WidgetPanelTypes'; +import { type WidgetPanelDescriptor } from './WidgetPanelTypes'; const log = Log.module('IrisGridPanel'); @@ -562,7 +563,12 @@ export class IrisGridPanel extends PureComponent< ); initModel(): void { - this.setState({ isModelReady: false, isLoading: true, error: null }); + this.setState({ + isModelReady: false, + isLoading: true, + error: null, + isDisconnected: false, + }); const { makeModel } = this.props; if (this.modelPromise != null) { this.modelPromise.cancel(); @@ -703,7 +709,7 @@ export class IrisGridPanel extends PureComponent< } } - handleColumnsChanged(event: Event): void { + handleColumnsChanged(event: EventT): void { const { isModelReady, model, modelQueue } = this.state; if (isModelReady) { this.sendColumnsChange((event as CustomEvent).detail); @@ -713,7 +719,7 @@ export class IrisGridPanel extends PureComponent< } } - handleTableChanged(event: Event): void { + handleTableChanged(event: EventT): void { log.debug('handleTableChanged', event); const { glEventHub } = this.props; const { detail: table } = event as CustomEvent; diff --git a/packages/dashboard-core-plugins/src/panels/IrisGridPanelTooltip.tsx b/packages/dashboard-core-plugins/src/panels/IrisGridPanelTooltip.tsx index 2c71e3a00..31b1cbceb 100644 --- a/packages/dashboard-core-plugins/src/panels/IrisGridPanelTooltip.tsx +++ b/packages/dashboard-core-plugins/src/panels/IrisGridPanelTooltip.tsx @@ -1,7 +1,7 @@ -import React, { ReactElement } from 'react'; -import { IrisGridModel } from '@deephaven/iris-grid'; +import React, { type ReactElement } from 'react'; +import { type IrisGridModel } from '@deephaven/iris-grid'; import WidgetPanelTooltip from './WidgetPanelTooltip'; -import { WidgetPanelTooltipProps } from './WidgetPanelTypes'; +import { type WidgetPanelTooltipProps } from './WidgetPanelTypes'; type IrisGridPanelTooltipProps = WidgetPanelTooltipProps & { model?: IrisGridModel; diff --git a/packages/dashboard-core-plugins/src/panels/IrisGridPanelTypes.ts b/packages/dashboard-core-plugins/src/panels/IrisGridPanelTypes.ts index 61b7e4152..aa41d6643 100644 --- a/packages/dashboard-core-plugins/src/panels/IrisGridPanelTypes.ts +++ b/packages/dashboard-core-plugins/src/panels/IrisGridPanelTypes.ts @@ -1,4 +1,4 @@ -import { PanelMetadata } from '@deephaven/dashboard'; +import { type PanelMetadata } from '@deephaven/dashboard'; /** * @deprecated use `IrisGridPanelMetadata` instead diff --git a/packages/dashboard-core-plugins/src/panels/LogPanel.tsx b/packages/dashboard-core-plugins/src/panels/LogPanel.tsx index 536d228ec..03c34ff7f 100644 --- a/packages/dashboard-core-plugins/src/panels/LogPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/LogPanel.tsx @@ -4,9 +4,9 @@ import React, { PureComponent } from 'react'; import { connect } from 'react-redux'; import { LogView } from '@deephaven/console'; import type { dh } from '@deephaven/jsapi-types'; -import { DashboardPanelProps } from '@deephaven/dashboard'; +import { type DashboardPanelProps } from '@deephaven/dashboard'; import Log from '@deephaven/log'; -import { RootState } from '@deephaven/redux'; +import { type RootState } from '@deephaven/redux'; import './LogPanel.scss'; import Panel from './Panel'; import { getDashboardSessionWrapper } from '../redux'; diff --git a/packages/dashboard-core-plugins/src/panels/MarkdownNotebook.tsx b/packages/dashboard-core-plugins/src/panels/MarkdownNotebook.tsx index 6d362d191..120c46873 100644 --- a/packages/dashboard-core-plugins/src/panels/MarkdownNotebook.tsx +++ b/packages/dashboard-core-plugins/src/panels/MarkdownNotebook.tsx @@ -1,12 +1,12 @@ import React, { PureComponent, - ReactElement, - RefObject, - MouseEvent, - MouseEventHandler, + type ReactElement, + type RefObject, + type MouseEvent, + type MouseEventHandler, } from 'react'; import classNames from 'classnames'; -import Markdown, { Options } from 'react-markdown'; +import Markdown, { type Options } from 'react-markdown'; import remarkGfm from 'remark-gfm'; import remarkMath from 'remark-math'; import rehypeMathjax from 'rehype-mathjax'; @@ -14,7 +14,7 @@ import { Button } from '@deephaven/components'; import { Code } from '@deephaven/console'; import { vsPlay } from '@deephaven/icons'; import './MarkdownNotebook.scss'; -import { ReactMarkdownProps } from 'react-markdown/lib/ast-to-react'; +import { type ReactMarkdownProps } from 'react-markdown/lib/ast-to-react'; import { assertNotNull } from '@deephaven/utils'; interface MarkdownNotebookProps { diff --git a/packages/dashboard-core-plugins/src/panels/MarkdownPanel.tsx b/packages/dashboard-core-plugins/src/panels/MarkdownPanel.tsx index 37d06627d..9c9823457 100644 --- a/packages/dashboard-core-plugins/src/panels/MarkdownPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/MarkdownPanel.tsx @@ -1,16 +1,16 @@ import React, { Component, - FocusEvent, - MouseEvent, - ReactElement, + type FocusEvent, + type MouseEvent, + type ReactElement, Suspense, lazy, } from 'react'; import memoize from 'memoize-one'; import { connect } from 'react-redux'; import { - ClosedPanel, - DashboardPanelProps, + type ClosedPanel, + type DashboardPanelProps, getClosedPanelsForDashboard, LayoutUtils, PanelEvent, @@ -19,7 +19,7 @@ import Log from '@deephaven/log'; import type { ReactComponentConfig } from '@deephaven/golden-layout'; import type * as monaco from 'monaco-editor'; import { assertNotNull } from '@deephaven/utils'; -import { RootState } from '@deephaven/redux'; +import { type RootState } from '@deephaven/redux'; import { LoadingOverlay } from '@deephaven/components'; import Panel from './Panel'; import MarkdownContainer from '../controls/markdown/MarkdownContainer'; diff --git a/packages/dashboard-core-plugins/src/panels/MockFileStorage.ts b/packages/dashboard-core-plugins/src/panels/MockFileStorage.ts index f1e6d98be..8f1244ca1 100644 --- a/packages/dashboard-core-plugins/src/panels/MockFileStorage.ts +++ b/packages/dashboard-core-plugins/src/panels/MockFileStorage.ts @@ -1,9 +1,9 @@ import { - File, + type File, FileNotFoundError, - FileStorage, - FileStorageItem, - FileStorageTable, + type FileStorage, + type FileStorageItem, + type FileStorageTable, FileUtils, } from '@deephaven/file-explorer'; import MockFileStorageTable from './MockFileStorageTable'; diff --git a/packages/dashboard-core-plugins/src/panels/MockFileStorageTable.ts b/packages/dashboard-core-plugins/src/panels/MockFileStorageTable.ts index 9f0c09f1e..5f8ae4c0c 100644 --- a/packages/dashboard-core-plugins/src/panels/MockFileStorageTable.ts +++ b/packages/dashboard-core-plugins/src/panels/MockFileStorageTable.ts @@ -1,17 +1,17 @@ import { - FileStorageItem, - FileStorageTable, + type FileStorageItem, + type FileStorageTable, isDirectory, } from '@deephaven/file-explorer'; import { - ViewportData, - IndexRange, - StorageSnapshot, - StorageTableViewport, - FilterConfig, - SortConfig, - ViewportUpdateCallback, - StorageListenerRemover, + type ViewportData, + type IndexRange, + type StorageSnapshot, + type StorageTableViewport, + type FilterConfig, + type SortConfig, + type ViewportUpdateCallback, + type StorageListenerRemover, } from '@deephaven/storage'; export class MockFileStorageTable implements FileStorageTable { diff --git a/packages/dashboard-core-plugins/src/panels/NotebookPanel.tsx b/packages/dashboard-core-plugins/src/panels/NotebookPanel.tsx index 053828605..732a0d221 100644 --- a/packages/dashboard-core-plugins/src/panels/NotebookPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/NotebookPanel.tsx @@ -1,5 +1,5 @@ // Wrapper for the Notebook for use in a golden layout container -import React, { Component, ReactElement, Suspense, lazy } from 'react'; +import React, { Component, type ReactElement, Suspense, lazy } from 'react'; import ReactDOM from 'react-dom'; import memoize from 'memoize-one'; import { connect } from 'react-redux'; @@ -12,15 +12,15 @@ import { Tooltip, GLOBAL_SHORTCUTS, Button, - DropdownAction, + type DropdownAction, LoadingOverlay, } from '@deephaven/components'; import { ScriptEditor, ScriptEditorUtils, SHORTCUTS } from '@deephaven/console'; import { - FileStorage, + type FileStorage, FileUtils, NewItemModal, - File, + type File, } from '@deephaven/file-explorer'; import { vsSave, @@ -36,16 +36,16 @@ import { import { getFileStorage, updateNotebookSettings as updateNotebookSettingsAction, - RootState, - WorkspaceSettings, + type RootState, + type WorkspaceSettings, getNotebookSettings, } from '@deephaven/redux'; import classNames from 'classnames'; import debounce from 'lodash.debounce'; import { - DashboardPanelProps, + type DashboardPanelProps, PanelEvent, - PanelMetadata, + type PanelMetadata, } from '@deephaven/dashboard'; import Log from '@deephaven/log'; import { assertNotNull, Pending, PromiseUtils } from '@deephaven/utils'; diff --git a/packages/dashboard-core-plugins/src/panels/PandasPanel.tsx b/packages/dashboard-core-plugins/src/panels/PandasPanel.tsx index 9ca0cd34a..9ed31245d 100644 --- a/packages/dashboard-core-plugins/src/panels/PandasPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/PandasPanel.tsx @@ -1,6 +1,6 @@ /* eslint-disable react/jsx-props-no-spreading */ /* eslint-disable react/no-unused-state */ -import React, { Component, ReactElement, RefObject } from 'react'; +import React, { Component, type ReactElement, type RefObject } from 'react'; import ConnectedIrisGridPanel, { type IrisGridPanel, type OwnProps as IrisGridPanelOwnProps, diff --git a/packages/dashboard-core-plugins/src/panels/Panel.tsx b/packages/dashboard-core-plugins/src/panels/Panel.tsx index c30b4c02f..86ec51328 100644 --- a/packages/dashboard-core-plugins/src/panels/Panel.tsx +++ b/packages/dashboard-core-plugins/src/panels/Panel.tsx @@ -1,20 +1,26 @@ import React, { - FocusEvent, - FocusEventHandler, + type FocusEvent, + type FocusEventHandler, PureComponent, - ReactElement, - ReactNode, + type ReactElement, + type ReactNode, } from 'react'; import ReactDOM from 'react-dom'; import classNames from 'classnames'; import memoize from 'memoize-one'; import { - ContextAction, + type ContextAction, ContextActions, + createXComponent, LoadingOverlay, + type ResolvableContextAction, Tooltip, } from '@deephaven/components'; -import { LayoutUtils, PanelComponent, PanelEvent } from '@deephaven/dashboard'; +import { + LayoutUtils, + type PanelComponent, + PanelEvent, +} from '@deephaven/dashboard'; import type { Container, EventEmitter, @@ -31,7 +37,7 @@ import './Panel.scss'; const log = Log.module('Panel'); -interface PanelProps { +export type CorePanelProps = { /** * Reference to the component panel. * Will wait until it is set before emitting mount/unmount events. @@ -59,13 +65,13 @@ interface PanelProps { onTabBlur?: (...args: unknown[]) => void; onTabFocus?: (...args: unknown[]) => void; renderTabTooltip?: () => ReactNode; - additionalActions?: ContextAction[]; + additionalActions?: ResolvableContextAction[]; errorMessage?: string; isLoading?: boolean; isLoaded?: boolean; isClonable?: boolean; isRenamable?: boolean; -} +}; interface PanelState { title?: string | null; @@ -77,8 +83,8 @@ interface PanelState { * Also wires up some triggers for common events: * Focus, Resize, Show, Session open/close, client disconnect/reconnect. */ -class Panel extends PureComponent { - constructor(props: PanelProps) { +class Panel extends PureComponent { + constructor(props: CorePanelProps) { super(props); this.handleClearAllFilters = this.handleClearAllFilters.bind(this); @@ -292,7 +298,7 @@ class Panel extends PureComponent { getAdditionalActions = memoize( ( - actions: readonly ContextAction[], + actions: readonly ResolvableContextAction[], isClonable: boolean, isRenamable: boolean ) => { @@ -379,4 +385,6 @@ class Panel extends PureComponent { } } -export default Panel; +const XPanel = createXComponent(Panel); + +export default XPanel; diff --git a/packages/dashboard-core-plugins/src/panels/PanelContextMenu.tsx b/packages/dashboard-core-plugins/src/panels/PanelContextMenu.tsx index 46223d207..97d2f4cf8 100644 --- a/packages/dashboard-core-plugins/src/panels/PanelContextMenu.tsx +++ b/packages/dashboard-core-plugins/src/panels/PanelContextMenu.tsx @@ -1,17 +1,24 @@ -import React, { PureComponent, ReactElement } from 'react'; -import { ContextAction, ContextActions } from '@deephaven/components'; +import React, { PureComponent, type ReactElement } from 'react'; +import { + ContextActions, + type ResolvableContextAction, +} from '@deephaven/components'; import type { Container, EventEmitter, Tab } from '@deephaven/golden-layout'; import { - CustomizableWorkspace, - RootState, + type CustomizableWorkspace, + type RootState, getWorkspace, setWorkspace as setWorkspaceAction, } from '@deephaven/redux'; import { connect } from 'react-redux'; -import { ClosedPanel, LayoutUtils, PanelEvent } from '@deephaven/dashboard'; +import { + type ClosedPanel, + LayoutUtils, + PanelEvent, +} from '@deephaven/dashboard'; interface PanelContextMenuProps { - additionalActions: ContextAction[]; + additionalActions: ResolvableContextAction[]; glContainer: Container; glEventHub: EventEmitter; workspace: CustomizableWorkspace; @@ -132,9 +139,7 @@ class PanelContextMenu extends PureComponent< render(): ReactElement { const { additionalActions, glContainer } = this.props; - const contextActions: (ContextAction | (() => ContextAction))[] = [ - ...additionalActions, - ]; + const contextActions = [...additionalActions]; contextActions.push(() => ({ title: 'Re-open closed panel', diff --git a/packages/dashboard-core-plugins/src/panels/RenameDialog.tsx b/packages/dashboard-core-plugins/src/panels/RenameDialog.tsx index 79282a99c..371e0fe76 100644 --- a/packages/dashboard-core-plugins/src/panels/RenameDialog.tsx +++ b/packages/dashboard-core-plugins/src/panels/RenameDialog.tsx @@ -1,9 +1,9 @@ import React, { - ChangeEvent, - FormEvent, + type ChangeEvent, + type FormEvent, PureComponent, - ReactElement, - RefObject, + type ReactElement, + type RefObject, } from 'react'; import classNames from 'classnames'; import { Button, Popper } from '@deephaven/components'; diff --git a/packages/dashboard-core-plugins/src/panels/WidgetPanel.tsx b/packages/dashboard-core-plugins/src/panels/WidgetPanel.tsx index 219ca633a..b8832b038 100644 --- a/packages/dashboard-core-plugins/src/panels/WidgetPanel.tsx +++ b/packages/dashboard-core-plugins/src/panels/WidgetPanel.tsx @@ -1,46 +1,22 @@ -import React, { PureComponent, ReactElement, ReactNode } from 'react'; +import React, { PureComponent, type ReactElement } from 'react'; import classNames from 'classnames'; import memoize from 'memoize-one'; -import { PanelComponent } from '@deephaven/dashboard'; -import type { Container, EventEmitter } from '@deephaven/golden-layout'; -import { ContextActions, createXComponent } from '@deephaven/components'; -import { copyToClipboard } from '@deephaven/utils'; -import Panel from './Panel'; +import { + ContextActions, + createXComponent, + type ResolvableContextAction, +} from '@deephaven/components'; +import type { dh } from '@deephaven/jsapi-types'; +import { copyToClipboard, EMPTY_ARRAY } from '@deephaven/utils'; +import Panel, { type CorePanelProps } from './Panel'; import WidgetPanelTooltip from './WidgetPanelTooltip'; import './WidgetPanel.scss'; -import { WidgetPanelDescriptor } from './WidgetPanelTypes'; - -export type WidgetPanelProps = { - children: ReactNode; +import { type WidgetPanelDescriptor } from './WidgetPanelTypes'; +export type WidgetPanelProps = CorePanelProps & { descriptor: WidgetPanelDescriptor; - componentPanel?: PanelComponent; - - glContainer: Container; - glEventHub: EventEmitter; - - className?: string; - errorMessage?: string; - isClonable?: boolean; - isDisconnected?: boolean; - isLoading?: boolean; - isLoaded?: boolean; - isRenamable?: boolean; showTabTooltip?: boolean; - - renderTabTooltip?: () => ReactNode; - - onFocus?: () => void; - onBlur?: () => void; - onHide?: () => void; - onClearAllFilters?: () => void; - onResize?: () => void; - onSessionClose?: (...args: unknown[]) => void; - onSessionOpen?: (...args: unknown[]) => void; - onShow?: () => void; - onTabBlur?: () => void; - onTabFocus?: () => void; - onTabClicked?: () => void; + isDisconnected?: boolean; }; interface WidgetPanelState { @@ -68,7 +44,6 @@ class WidgetPanel extends PureComponent { super(props); this.handleSessionClosed = this.handleSessionClosed.bind(this); - this.handleSessionOpened = this.handleSessionOpened.bind(this); this.handleCopyName = this.handleCopyName.bind(this); this.state = { @@ -119,28 +94,29 @@ class WidgetPanel extends PureComponent { : undefined ); - getCachedActions = memoize((descriptor: WidgetPanelDescriptor) => [ - { - title: `Copy ${descriptor.displayType ?? descriptor.type} Name`, - group: ContextActions.groups.medium, - order: 20, - action: this.handleCopyName, - }, - ]); + getCachedActions = memoize( + ( + descriptor: WidgetPanelDescriptor, + propsAdditionalActions: readonly ResolvableContextAction[] = EMPTY_ARRAY + ) => [ + ...propsAdditionalActions, + { + title: `Copy ${descriptor.displayType ?? descriptor.type} Name`, + group: ContextActions.groups.medium, + order: 20, + action: this.handleCopyName, + }, + ] + ); - handleSessionClosed(...args: unknown[]): void { + handleSessionClosed(session: dh.IdeSession): void { const { onSessionClose } = this.props; // The session has closed and we won't be able to reconnect, as this widget isn't persisted this.setState({ isPanelDisconnected: true, isWaitingForReconnect: false, }); - onSessionClose?.(...args); - } - - handleSessionOpened(...args: unknown[]): void { - const { onSessionOpen } = this.props; - onSessionOpen?.(...args); + onSessionClose?.(session); } render(): ReactElement { @@ -164,10 +140,13 @@ class WidgetPanel extends PureComponent { onFocus, onBlur, onResize, + onSessionOpen, onShow, onTabBlur, onTabFocus, onTabClicked, + + additionalActions: propsAdditionalActions, } = this.props; const { isPanelDisconnected, isWidgetDisconnected, isPanelInactive } = @@ -177,7 +156,10 @@ class WidgetPanel extends PureComponent { renderTabTooltip ?? this.getCachedRenderTabTooltip(showTabTooltip, descriptor); - const additionalActions = this.getCachedActions(descriptor); + const additionalActions = this.getCachedActions( + descriptor, + propsAdditionalActions + ); return ( { onResize={onResize} onShow={onShow} onSessionClose={this.handleSessionClosed} - onSessionOpen={this.handleSessionOpened} + onSessionOpen={onSessionOpen} onTabBlur={onTabBlur} onTabFocus={onTabFocus} onTabClicked={onTabClicked} @@ -215,6 +197,6 @@ class WidgetPanel extends PureComponent { } } -const XWidgetPanel = createXComponent(WidgetPanel); +const XWidgetPanel = createXComponent(WidgetPanel); export default XWidgetPanel; diff --git a/packages/dashboard-core-plugins/src/panels/WidgetPanelTooltip.scss b/packages/dashboard-core-plugins/src/panels/WidgetPanelTooltip.scss index e8f3bd291..cfbd454bf 100644 --- a/packages/dashboard-core-plugins/src/panels/WidgetPanelTooltip.scss +++ b/packages/dashboard-core-plugins/src/panels/WidgetPanelTooltip.scss @@ -16,7 +16,7 @@ $tooltip-container-width: 300px; .tab-tooltip-name-wrapper { display: flex; flex-wrap: nowrap; - align-items: first baseline; + align-items: center; gap: $spacer-1; } diff --git a/packages/dashboard-core-plugins/src/panels/WidgetPanelTooltip.tsx b/packages/dashboard-core-plugins/src/panels/WidgetPanelTooltip.tsx index 1c9896ea9..61344f044 100644 --- a/packages/dashboard-core-plugins/src/panels/WidgetPanelTooltip.tsx +++ b/packages/dashboard-core-plugins/src/panels/WidgetPanelTooltip.tsx @@ -1,7 +1,7 @@ -import React, { ReactElement } from 'react'; +import React, { type ReactElement } from 'react'; import { CopyButton, createXComponent } from '@deephaven/components'; import './WidgetPanelTooltip.scss'; -import { WidgetPanelTooltipProps } from './WidgetPanelTypes'; +import { type WidgetPanelTooltipProps } from './WidgetPanelTypes'; function WidgetPanelTooltip(props: WidgetPanelTooltipProps): ReactElement { const { children, descriptor } = props; diff --git a/packages/dashboard-core-plugins/src/panels/WidgetPanelTypes.ts b/packages/dashboard-core-plugins/src/panels/WidgetPanelTypes.ts index c370d7beb..4708e8376 100644 --- a/packages/dashboard-core-plugins/src/panels/WidgetPanelTypes.ts +++ b/packages/dashboard-core-plugins/src/panels/WidgetPanelTypes.ts @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import { type ReactNode } from 'react'; export type WidgetPanelDescriptor = { /** Type of the widget. */ diff --git a/packages/dashboard-core-plugins/src/redux/actions.ts b/packages/dashboard-core-plugins/src/redux/actions.ts index 701d5472d..47e00db2e 100644 --- a/packages/dashboard-core-plugins/src/redux/actions.ts +++ b/packages/dashboard-core-plugins/src/redux/actions.ts @@ -1,14 +1,14 @@ import deepEqual from 'fast-deep-equal'; -import { ThunkAction } from 'redux-thunk'; +import { type ThunkAction } from 'redux-thunk'; import { updateDashboardData } from '@deephaven/dashboard'; -import { SessionWrapper } from '@deephaven/jsapi-utils'; -import { RootState } from '@deephaven/redux'; -import { Action } from 'redux'; +import { type SessionWrapper } from '@deephaven/jsapi-utils'; +import { type RootState } from '@deephaven/redux'; +import { type Action } from 'redux'; import type { dh } from '@deephaven/jsapi-types'; import { getLinksForDashboard } from './selectors'; -import { FilterSet } from '../panels'; -import { Link } from '../linker/LinkerUtils'; -import { ColumnSelectionValidator } from '../linker/ColumnSelectionValidator'; +import { type FilterSet } from '../panels'; +import { type Link } from '../linker/LinkerUtils'; +import { type ColumnSelectionValidator } from '../linker/ColumnSelectionValidator'; /** * Set the connection for the dashboard specified diff --git a/packages/dashboard-core-plugins/src/redux/selectors.ts b/packages/dashboard-core-plugins/src/redux/selectors.ts index fef299bc1..f815a4128 100644 --- a/packages/dashboard-core-plugins/src/redux/selectors.ts +++ b/packages/dashboard-core-plugins/src/redux/selectors.ts @@ -1,11 +1,11 @@ import { getDashboardData } from '@deephaven/dashboard'; import type { dh } from '@deephaven/jsapi-types'; -import { SessionWrapper } from '@deephaven/jsapi-utils'; -import { RootState } from '@deephaven/redux'; -import { FilterChangeEvent } from '../FilterPlugin'; -import { Link } from '../linker/LinkerUtils'; -import { FilterSet } from '../panels'; -import { ColumnSelectionValidator } from '../linker/ColumnSelectionValidator'; +import { type SessionWrapper } from '@deephaven/jsapi-utils'; +import { type RootState } from '@deephaven/redux'; +import { type FilterChangeEvent } from '../FilterPlugin'; +import { type Link } from '../linker/LinkerUtils'; +import { type FilterSet } from '../panels'; +import { type ColumnSelectionValidator } from '../linker/ColumnSelectionValidator'; const EMPTY_OBJECT = Object.freeze({}); diff --git a/packages/dashboard-core-plugins/src/useIrisGridModel.test.ts b/packages/dashboard-core-plugins/src/useIrisGridModel.test.ts index 2dc200264..6e336ce73 100644 --- a/packages/dashboard-core-plugins/src/useIrisGridModel.test.ts +++ b/packages/dashboard-core-plugins/src/useIrisGridModel.test.ts @@ -1,11 +1,11 @@ -import { IrisGridModel } from '@deephaven/iris-grid'; +import { type IrisGridModel } from '@deephaven/iris-grid'; import { type dh } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { renderHook } from '@testing-library/react-hooks'; import { act } from 'react-test-renderer'; import { - IrisGridModelFetchErrorResult, - IrisGridModelFetchSuccessResult, + type IrisGridModelFetchErrorResult, + type IrisGridModelFetchSuccessResult, useIrisGridModel, } from './useIrisGridModel'; diff --git a/packages/dashboard-core-plugins/tsconfig.json b/packages/dashboard-core-plugins/tsconfig.json index 20ae9f1ef..3f2dedd4e 100644 --- a/packages/dashboard-core-plugins/tsconfig.json +++ b/packages/dashboard-core-plugins/tsconfig.json @@ -22,6 +22,7 @@ { "path": "../log" }, { "path": "../react-hooks" }, { "path": "../redux" }, - { "path": "../plugin" } + { "path": "../plugin" }, + { "path": "../test-utils" } ] } diff --git a/packages/dashboard/CHANGELOG.md b/packages/dashboard/CHANGELOG.md index 3e424bae8..35f1a7210 100644 --- a/packages/dashboard/CHANGELOG.md +++ b/packages/dashboard/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/dashboard + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/dashboard diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 82d2f4e8f..9f476986d 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/dashboard", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Dashboard", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -41,6 +41,7 @@ }, "devDependencies": { "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils", "@types/lodash.ismatch": "^4.4.0" }, "files": [ diff --git a/packages/dashboard/src/Dashboard.test.tsx b/packages/dashboard/src/Dashboard.test.tsx index 256c20874..9faf59937 100644 --- a/packages/dashboard/src/Dashboard.test.tsx +++ b/packages/dashboard/src/Dashboard.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { render, RenderResult } from '@testing-library/react'; +import { render, type RenderResult } from '@testing-library/react'; import { ApiContext } from '@deephaven/jsapi-bootstrap'; -import Dashboard, { DashboardProps } from './Dashboard'; +import Dashboard, { type DashboardProps } from './Dashboard'; const mockDispatch = jest.fn(); jest.mock('react-redux', () => ({ diff --git a/packages/dashboard/src/Dashboard.tsx b/packages/dashboard/src/Dashboard.tsx index 6a285844c..41b1a768d 100644 --- a/packages/dashboard/src/Dashboard.tsx +++ b/packages/dashboard/src/Dashboard.tsx @@ -1,7 +1,7 @@ import React, { - ComponentType, - ForwardRefExoticComponent, - RefAttributes, + type ComponentType, + type ForwardRefExoticComponent, + type RefAttributes, useEffect, useMemo, useRef, @@ -16,9 +16,9 @@ import LayoutUtils from './layout/LayoutUtils'; import PanelPlaceholder from './PanelPlaceholder'; import DashboardLayout from './DashboardLayout'; import { - PanelDehydrateFunction, - PanelHydrateFunction, - PanelProps, + type PanelDehydrateFunction, + type PanelHydrateFunction, + type PanelProps, } from './DashboardPlugin'; import './Dashboard.scss'; import { LayoutManagerContext } from './layout'; diff --git a/packages/dashboard/src/DashboardLayout.tsx b/packages/dashboard/src/DashboardLayout.tsx index 6410c4efa..cc2e05b7f 100644 --- a/packages/dashboard/src/DashboardLayout.tsx +++ b/packages/dashboard/src/DashboardLayout.tsx @@ -1,13 +1,13 @@ import React, { - ComponentType, - ReactElement, + type ComponentType, + type ReactElement, useCallback, useEffect, useMemo, useState, } from 'react'; import PropTypes from 'prop-types'; -import GoldenLayout from '@deephaven/golden-layout'; +import type GoldenLayout from '@deephaven/golden-layout'; import type { Container, ItemConfig, @@ -16,9 +16,9 @@ import type { import Log from '@deephaven/log'; import { usePrevious, useThrottledCallback } from '@deephaven/react-hooks'; import { ErrorBoundary } from '@deephaven/components'; -import { RootState } from '@deephaven/redux'; +import { type RootState } from '@deephaven/redux'; import { useDispatch, useSelector } from 'react-redux'; -import PanelManager, { ClosedPanels } from './PanelManager'; +import PanelManager, { type ClosedPanels } from './PanelManager'; import PanelErrorBoundary from './PanelErrorBoundary'; import LayoutUtils from './layout/LayoutUtils'; import { @@ -30,10 +30,10 @@ import PanelEvent from './PanelEvent'; import { GLPropTypes, useListener } from './layout'; import { getDashboardData, updateDashboardData } from './redux'; import { - PanelComponentType, - PanelDehydrateFunction, - PanelHydrateFunction, - PanelProps, + type PanelComponentType, + type PanelDehydrateFunction, + type PanelHydrateFunction, + type PanelProps, } from './DashboardPlugin'; import DashboardPanelWrapper from './DashboardPanelWrapper'; diff --git a/packages/dashboard/src/DashboardPanelWrapper.tsx b/packages/dashboard/src/DashboardPanelWrapper.tsx index ca07c4a33..1b7634310 100644 --- a/packages/dashboard/src/DashboardPanelWrapper.tsx +++ b/packages/dashboard/src/DashboardPanelWrapper.tsx @@ -1,4 +1,4 @@ -import React, { PropsWithChildren } from 'react'; +import React, { type PropsWithChildren } from 'react'; export function DashboardPanelWrapper({ children, diff --git a/packages/dashboard/src/DashboardPlugin.ts b/packages/dashboard/src/DashboardPlugin.ts index 592c27928..dfa716cdd 100644 --- a/packages/dashboard/src/DashboardPlugin.ts +++ b/packages/dashboard/src/DashboardPlugin.ts @@ -5,14 +5,14 @@ import type { PropsWithoutRef, RefAttributes, } from 'react'; -import { ConnectedComponent } from 'react-redux'; +import { type ConnectedComponent } from 'react-redux'; import GoldenLayout from '@deephaven/golden-layout'; import type { GLPanelProps, ReactComponentConfig, } from '@deephaven/golden-layout'; import PanelManager from './PanelManager'; -import { WidgetDescriptor } from './PanelEvent'; +import { type WidgetDescriptor } from './PanelEvent'; export { isWrappedComponent } from '@deephaven/components'; diff --git a/packages/dashboard/src/DashboardUtils.tsx b/packages/dashboard/src/DashboardUtils.tsx index 09d48607d..320a0fc63 100644 --- a/packages/dashboard/src/DashboardUtils.tsx +++ b/packages/dashboard/src/DashboardUtils.tsx @@ -1,7 +1,7 @@ import { - DehydratedDashboardPanelProps, - DehydratedPanelConfig, - PanelConfig, + type DehydratedDashboardPanelProps, + type DehydratedPanelConfig, + type PanelConfig, } from './DashboardPlugin'; export { canHaveRef } from '@deephaven/components'; diff --git a/packages/dashboard/src/LazyDashboard.tsx b/packages/dashboard/src/LazyDashboard.tsx index 219731d9d..510d1ff6e 100644 --- a/packages/dashboard/src/LazyDashboard.tsx +++ b/packages/dashboard/src/LazyDashboard.tsx @@ -2,9 +2,9 @@ import React, { useCallback, useState } from 'react'; import { useDispatch } from 'react-redux'; import { LoadingOverlay } from '@deephaven/components'; import { updateWorkspaceData } from '@deephaven/redux'; -import { Dashboard, DashboardProps } from './Dashboard'; +import { Dashboard, type DashboardProps } from './Dashboard'; import { updateDashboardData } from './redux'; -import { DashboardLayoutConfig } from './DashboardLayout'; +import { type DashboardLayoutConfig } from './DashboardLayout'; import { DEFAULT_DASHBOARD_ID } from './DashboardConstants'; export interface LazyDashboardProps extends DashboardProps { diff --git a/packages/dashboard/src/PanelErrorBoundary.tsx b/packages/dashboard/src/PanelErrorBoundary.tsx index de1945b6c..91f9223c6 100644 --- a/packages/dashboard/src/PanelErrorBoundary.tsx +++ b/packages/dashboard/src/PanelErrorBoundary.tsx @@ -1,4 +1,4 @@ -import React, { Component, ReactNode } from 'react'; +import React, { Component, type ReactNode } from 'react'; import { LoadingOverlay } from '@deephaven/components'; import type { Container, EventEmitter } from '@deephaven/golden-layout'; import Log from '@deephaven/log'; diff --git a/packages/dashboard/src/PanelManager.test.ts b/packages/dashboard/src/PanelManager.test.ts index 0e4079ba7..2ca8e11f2 100644 --- a/packages/dashboard/src/PanelManager.test.ts +++ b/packages/dashboard/src/PanelManager.test.ts @@ -9,7 +9,7 @@ import GoldenLayout from '@deephaven/golden-layout'; import type { ContentItem, Tab } from '@deephaven/golden-layout'; import PanelManager from './PanelManager'; import PanelEvent from './PanelEvent'; -import { PanelProps } from './DashboardPlugin'; +import { type PanelProps } from './DashboardPlugin'; type TestComponentProps = { id: string } & PanelProps; diff --git a/packages/dashboard/src/PanelManager.ts b/packages/dashboard/src/PanelManager.ts index 9effe1832..8804736ce 100644 --- a/packages/dashboard/src/PanelManager.ts +++ b/packages/dashboard/src/PanelManager.ts @@ -1,5 +1,5 @@ -import { ComponentType } from 'react'; -import GoldenLayout from '@deephaven/golden-layout'; +import { type ComponentType } from 'react'; +import type GoldenLayout from '@deephaven/golden-layout'; import type { Container, ContentItem, @@ -11,9 +11,9 @@ import PanelEvent from './PanelEvent'; import LayoutUtils, { isReactComponentConfig } from './layout/LayoutUtils'; import { isWrappedComponent, - PanelComponent, - PanelComponentType, - PanelProps, + type PanelComponent, + type PanelComponentType, + type PanelProps, } from './DashboardPlugin'; const log = Log.module('PanelManager'); diff --git a/packages/dashboard/src/PanelPlaceholder.tsx b/packages/dashboard/src/PanelPlaceholder.tsx index d0684500a..f76d879f4 100644 --- a/packages/dashboard/src/PanelPlaceholder.tsx +++ b/packages/dashboard/src/PanelPlaceholder.tsx @@ -1,7 +1,7 @@ -import React, { ForwardedRef } from 'react'; +import React, { type ForwardedRef } from 'react'; import './PanelPlaceholder.scss'; import LayoutUtils from './layout/LayoutUtils'; -import { PanelProps } from './DashboardPlugin'; +import { type PanelProps } from './DashboardPlugin'; /** * Displays a placeholder for unregistered panel types. diff --git a/packages/dashboard/src/layout/LayoutManagerContext.ts b/packages/dashboard/src/layout/LayoutManagerContext.ts index b1804dadf..56363e4a3 100644 --- a/packages/dashboard/src/layout/LayoutManagerContext.ts +++ b/packages/dashboard/src/layout/LayoutManagerContext.ts @@ -1,5 +1,5 @@ import React from 'react'; -import GoldenLayout from '@deephaven/golden-layout'; +import type GoldenLayout from '@deephaven/golden-layout'; export const LayoutManagerContext: React.Context = React.createContext(undefined); diff --git a/packages/dashboard/src/layout/LayoutUtils.ts b/packages/dashboard/src/layout/LayoutUtils.ts index 9cecf91d5..779d41139 100644 --- a/packages/dashboard/src/layout/LayoutUtils.ts +++ b/packages/dashboard/src/layout/LayoutUtils.ts @@ -2,12 +2,12 @@ import deepEqual from 'fast-deep-equal'; import { nanoid } from 'nanoid'; import isMatch from 'lodash.ismatch'; import Log from '@deephaven/log'; -import GoldenLayout, { +import type GoldenLayout from '@deephaven/golden-layout'; +import { isComponent, isRoot, isStack, GoldenLayoutThemeExport, - GLPanelProps, } from '@deephaven/golden-layout'; import type { ComponentConfig, @@ -19,10 +19,11 @@ import type { Stack, Tab, CloseOptions, + GLPanelProps, } from '@deephaven/golden-layout'; import { assertNotNull } from '@deephaven/utils'; -import { DashboardLayoutConfig } from '../DashboardLayout'; -import { PanelConfig } from '../DashboardPlugin'; +import { type DashboardLayoutConfig } from '../DashboardLayout'; +import { type PanelConfig } from '../DashboardPlugin'; const log = Log.module('LayoutUtils'); diff --git a/packages/dashboard/src/layout/useDashboardPanel.ts b/packages/dashboard/src/layout/useDashboardPanel.ts index 4b01168ac..cfe107fca 100644 --- a/packages/dashboard/src/layout/useDashboardPanel.ts +++ b/packages/dashboard/src/layout/useDashboardPanel.ts @@ -1,15 +1,15 @@ -import { ComponentType, useCallback } from 'react'; +import { type ComponentType, useCallback } from 'react'; import type { ReactComponentConfig } from '@deephaven/golden-layout'; import { nanoid } from 'nanoid'; import { - DashboardPanelProps, - DashboardPluginComponentProps, - DehydratedDashboardPanelProps, - PanelComponentType, - PanelDehydrateFunction, - PanelHydrateFunction, + type DashboardPanelProps, + type DashboardPluginComponentProps, + type DehydratedDashboardPanelProps, + type PanelComponentType, + type PanelDehydrateFunction, + type PanelHydrateFunction, } from '../DashboardPlugin'; -import { PanelOpenEventDetail, usePanelOpenListener } from '../PanelEvent'; +import { type PanelOpenEventDetail, usePanelOpenListener } from '../PanelEvent'; import LayoutUtils from './LayoutUtils'; import usePanelRegistration from './usePanelRegistration'; diff --git a/packages/dashboard/src/layout/useLayoutManager.ts b/packages/dashboard/src/layout/useLayoutManager.ts index 764cc3ee5..016633871 100644 --- a/packages/dashboard/src/layout/useLayoutManager.ts +++ b/packages/dashboard/src/layout/useLayoutManager.ts @@ -1,5 +1,5 @@ import { useContext } from 'react'; -import LayoutManager from '@deephaven/golden-layout'; +import type LayoutManager from '@deephaven/golden-layout'; import LayoutManagerContext from './LayoutManagerContext'; /** diff --git a/packages/dashboard/src/layout/useListener.test.ts b/packages/dashboard/src/layout/useListener.test.ts index 4c1f9e5fe..3529979bf 100644 --- a/packages/dashboard/src/layout/useListener.test.ts +++ b/packages/dashboard/src/layout/useListener.test.ts @@ -1,5 +1,5 @@ -import { EventEmitter } from '@deephaven/golden-layout'; -import { TestUtils } from '@deephaven/utils'; +import { type EventEmitter } from '@deephaven/golden-layout'; +import { TestUtils } from '@deephaven/test-utils'; import { renderHook } from '@testing-library/react-hooks'; import useListener from './useListener'; diff --git a/packages/dashboard/src/layout/usePanelRegistration.test.tsx b/packages/dashboard/src/layout/usePanelRegistration.test.tsx index 8228894a6..51de1b921 100644 --- a/packages/dashboard/src/layout/usePanelRegistration.test.tsx +++ b/packages/dashboard/src/layout/usePanelRegistration.test.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { renderHook } from '@testing-library/react-hooks'; import usePanelRegistration from './usePanelRegistration'; -import { PanelProps } from '../DashboardPlugin'; +import { type PanelProps } from '../DashboardPlugin'; /* eslint-disable react/prefer-stateless-function */ class ClassCOMPONENT extends React.Component { diff --git a/packages/dashboard/src/layout/usePanelRegistration.ts b/packages/dashboard/src/layout/usePanelRegistration.ts index 0ef871c11..1e02dfc79 100644 --- a/packages/dashboard/src/layout/usePanelRegistration.ts +++ b/packages/dashboard/src/layout/usePanelRegistration.ts @@ -1,10 +1,10 @@ import React from 'react'; import { - DashboardPanelProps, - DashboardPluginComponentProps, - PanelComponentType, - PanelDehydrateFunction, - PanelHydrateFunction, + type DashboardPanelProps, + type DashboardPluginComponentProps, + type PanelComponentType, + type PanelDehydrateFunction, + type PanelHydrateFunction, } from '../DashboardPlugin'; /** diff --git a/packages/dashboard/src/redux/actions.ts b/packages/dashboard/src/redux/actions.ts index af297b474..2268390a6 100644 --- a/packages/dashboard/src/redux/actions.ts +++ b/packages/dashboard/src/redux/actions.ts @@ -1,4 +1,8 @@ -import { DashboardData, PluginData, RootState } from '@deephaven/redux'; +import { + type DashboardData, + type PluginData, + type RootState, +} from '@deephaven/redux'; import type { Action } from 'redux'; import type { ThunkAction } from 'redux-thunk'; import { SET_DASHBOARD_DATA } from './actionTypes'; diff --git a/packages/dashboard/src/redux/hooks.ts b/packages/dashboard/src/redux/hooks.ts index 935f1446e..e5b0519d9 100644 --- a/packages/dashboard/src/redux/hooks.ts +++ b/packages/dashboard/src/redux/hooks.ts @@ -1,6 +1,6 @@ import { useCallback } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { PluginData, RootState } from '@deephaven/redux'; +import { type PluginData, type RootState } from '@deephaven/redux'; import { getPluginDataForDashboard } from './selectors'; import { setDashboardPluginData } from './actions'; diff --git a/packages/dashboard/src/redux/selectors.ts b/packages/dashboard/src/redux/selectors.ts index a57c16087..63b761a80 100644 --- a/packages/dashboard/src/redux/selectors.ts +++ b/packages/dashboard/src/redux/selectors.ts @@ -1,18 +1,18 @@ import { - AppStore, - DashboardData, - PluginData, - PluginDataMap, - RootDispatch, - RootState, + type AppStore, + type DashboardData, + type PluginData, + type PluginDataMap, + type RootDispatch, + type RootState, } from '@deephaven/redux'; import { - TypedUseSelectorHook, + type TypedUseSelectorHook, useDispatch, useSelector, useStore, } from 'react-redux'; -import { ClosedPanels, OpenedPanelMap } from '../PanelManager'; +import { type ClosedPanels, type OpenedPanelMap } from '../PanelManager'; const EMPTY_MAP = new Map(); diff --git a/packages/dashboard/tsconfig.json b/packages/dashboard/tsconfig.json index 0095b98b5..73feeb341 100644 --- a/packages/dashboard/tsconfig.json +++ b/packages/dashboard/tsconfig.json @@ -12,6 +12,7 @@ { "path": "../log" }, { "path": "../react-hooks" }, { "path": "../redux" }, + { "path": "../test-utils" }, { "path": "../utils" } ] } diff --git a/packages/embed-chart/CHANGELOG.md b/packages/embed-chart/CHANGELOG.md index 9fe896f25..b1b3844bb 100644 --- a/packages/embed-chart/CHANGELOG.md +++ b/packages/embed-chart/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +**Note:** Version bump only for package @deephaven/embed-chart + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/embed-chart + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/embed-chart + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/embed-chart diff --git a/packages/embed-chart/package.json b/packages/embed-chart/package.json index 952055878..c73eaad3a 100644 --- a/packages/embed-chart/package.json +++ b/packages/embed-chart/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/embed-chart", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Embedded Chart", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/embed-grid/CHANGELOG.md b/packages/embed-grid/CHANGELOG.md index 5de83b12c..9ff017269 100644 --- a/packages/embed-grid/CHANGELOG.md +++ b/packages/embed-grid/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +**Note:** Version bump only for package @deephaven/embed-grid + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/embed-grid + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/embed-grid + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/embed-grid diff --git a/packages/embed-grid/package.json b/packages/embed-grid/package.json index 2bffdc150..d96e3ecf9 100644 --- a/packages/embed-grid/package.json +++ b/packages/embed-grid/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/embed-grid", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Embedded Grid", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/embed-widget/CHANGELOG.md b/packages/embed-widget/CHANGELOG.md index 6a830bca5..1c102f6c8 100644 --- a/packages/embed-widget/CHANGELOG.md +++ b/packages/embed-widget/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/embed-widget + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/embed-widget + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/embed-widget diff --git a/packages/embed-widget/package.json b/packages/embed-widget/package.json index 0ac8412d8..0f4fe6749 100644 --- a/packages/embed-widget/package.json +++ b/packages/embed-widget/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/embed-widget", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Embedded Widget", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/embed-widget/src/App.tsx b/packages/embed-widget/src/App.tsx index 817289b5c..ae68053cb 100644 --- a/packages/embed-widget/src/App.tsx +++ b/packages/embed-widget/src/App.tsx @@ -25,7 +25,7 @@ import { useDashboardPlugins } from '@deephaven/plugin'; import { getAllDashboardsData, listenForCreateDashboard, - CreateDashboardPayload, + type CreateDashboardPayload, setDashboardPluginData, stopListenForCreateDashboard, emitPanelOpen, diff --git a/packages/eslint-config/CHANGELOG.md b/packages/eslint-config/CHANGELOG.md index e2eb52272..fade5048f 100644 --- a/packages/eslint-config/CHANGELOG.md +++ b/packages/eslint-config/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/eslint-config + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/eslint-config + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) ### Features diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index a9113c3e3..3eec7b040 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -89,23 +89,27 @@ module.exports = { plugins: ['@typescript-eslint'], extends: ['plugin:@typescript-eslint/recommended'], rules: { - 'default-case': 'off', // Typescript checks for exhaustive switch/case and doesn't require a default - 'consistent-return': 'off', // JS rule which complains if you don't have a default case - 'no-shadow': 'off', + '@typescript-eslint/consistent-type-imports': [ + 'error', + { fixStyle: 'inline-type-imports' }, + ], + '@typescript-eslint/default-param-last': ['error'], + '@typescript-eslint/explicit-module-boundary-types': 'error', + '@typescript-eslint/method-signature-style': 'error', '@typescript-eslint/no-shadow': ['error'], - 'no-use-before-define': 'off', '@typescript-eslint/no-use-before-define': 'error', - 'no-useless-constructor': 'off', - 'react/static-property-placement': ['error', 'static public field'], + '@typescript-eslint/return-await': 'error', '@typescript-eslint/strict-boolean-expressions': ['error'], + 'consistent-return': 'off', // JS rule which complains if you don't have a default case + 'default-case': 'off', // Typescript checks for exhaustive switch/case and doesn't require a default 'default-param-last': 'off', - '@typescript-eslint/default-param-last': ['error'], - '@typescript-eslint/explicit-module-boundary-types': 'error', - '@typescript-eslint/method-signature-style': 'error', // `no-return-await` needs to be disabled when enabling `@typescript-eslint/return-await` // to avoid incorrectly reporting errors 'no-return-await': 'off', - '@typescript-eslint/return-await': 'error', + 'no-shadow': 'off', + 'no-use-before-define': 'off', + 'no-useless-constructor': 'off', + 'react/static-property-placement': ['error', 'static public field'], }, }, { diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index da5f8c41b..95401e59c 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/eslint-config", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven ESLint configuration", "repository": { "type": "git", diff --git a/packages/file-explorer/CHANGELOG.md b/packages/file-explorer/CHANGELOG.md index d20312322..036106f0b 100644 --- a/packages/file-explorer/CHANGELOG.md +++ b/packages/file-explorer/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/file-explorer + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/file-explorer diff --git a/packages/file-explorer/package.json b/packages/file-explorer/package.json index 52e21b2d1..b4881a3d6 100644 --- a/packages/file-explorer/package.json +++ b/packages/file-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/file-explorer", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven File Explorer React component", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -37,7 +37,8 @@ "react": ">=16.8.0" }, "devDependencies": { - "@deephaven/mocks": "file:../mocks" + "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils" }, "files": [ "dist" diff --git a/packages/file-explorer/src/FileExistsError.ts b/packages/file-explorer/src/FileExistsError.ts index 4a481f333..92593afce 100644 --- a/packages/file-explorer/src/FileExistsError.ts +++ b/packages/file-explorer/src/FileExistsError.ts @@ -1,5 +1,5 @@ import { ValidationError } from '@deephaven/utils'; -import { FileStorageItem } from './FileStorage'; +import { type FileStorageItem } from './FileStorage'; class FileExistsError extends ValidationError { isExistingFile = true; diff --git a/packages/file-explorer/src/FileExplorer.test.tsx b/packages/file-explorer/src/FileExplorer.test.tsx index e3a4f4d35..0a3867c9c 100644 --- a/packages/file-explorer/src/FileExplorer.test.tsx +++ b/packages/file-explorer/src/FileExplorer.test.tsx @@ -7,12 +7,10 @@ import { import userEvent from '@testing-library/user-event/'; import { MockFileStorage } from '@deephaven/dashboard-core-plugins'; import { ContextMenuRoot } from '@deephaven/components'; -import { TestUtils } from '@deephaven/utils'; -import FileStorage, { - DirectoryStorageItem, - FileStorageItem, -} from './FileStorage'; -import FileExplorer, { FileExplorerProps } from './FileExplorer'; +import { TestUtils } from '@deephaven/test-utils'; +import { type DirectoryStorageItem, type FileStorageItem } from './FileStorage'; +import type FileStorage from './FileStorage'; +import FileExplorer, { type FileExplorerProps } from './FileExplorer'; import { makeDirectories, makeFiles, makeNested } from './FileTestUtils'; function makeMockFileStorage(): FileStorage { diff --git a/packages/file-explorer/src/FileExplorer.tsx b/packages/file-explorer/src/FileExplorer.tsx index 57342249a..f3294d7a2 100644 --- a/packages/file-explorer/src/FileExplorer.tsx +++ b/packages/file-explorer/src/FileExplorer.tsx @@ -1,13 +1,14 @@ import { BasicModal } from '@deephaven/components'; import Log from '@deephaven/log'; -import { CancelablePromise, PromiseUtils } from '@deephaven/utils'; +import { type CancelablePromise, PromiseUtils } from '@deephaven/utils'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { DEFAULT_ROW_HEIGHT } from './FileListUtils'; -import FileStorage, { - FileStorageItem, - FileStorageTable, +import { + type FileStorageItem, + type FileStorageTable, isDirectory, } from './FileStorage'; +import type FileStorage from './FileStorage'; import './FileExplorer.scss'; import FileListContainer from './FileListContainer'; import FileUtils from './FileUtils'; diff --git a/packages/file-explorer/src/FileList.test.tsx b/packages/file-explorer/src/FileList.test.tsx index 811c10e7a..50dc63669 100644 --- a/packages/file-explorer/src/FileList.test.tsx +++ b/packages/file-explorer/src/FileList.test.tsx @@ -3,13 +3,13 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { MockFileStorage } from '@deephaven/dashboard-core-plugins'; import { ContextMenuRoot } from '@deephaven/components'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { - DirectoryStorageItem, - FileStorageItem, - FileStorageTable, + type DirectoryStorageItem, + type FileStorageItem, + type FileStorageTable, } from './FileStorage'; -import FileList, { FileListProps } from './FileList'; +import FileList, { type FileListProps } from './FileList'; import { makeDirectories, makeDirectory, diff --git a/packages/file-explorer/src/FileList.tsx b/packages/file-explorer/src/FileList.tsx index 908101c89..a96ab569a 100644 --- a/packages/file-explorer/src/FileList.tsx +++ b/packages/file-explorer/src/FileList.tsx @@ -1,4 +1,4 @@ -import { ItemList, Range } from '@deephaven/components'; +import { ItemList, type Range } from '@deephaven/components'; import Log from '@deephaven/log'; import { RangeUtils } from '@deephaven/utils'; import classNames from 'classnames'; @@ -9,10 +9,14 @@ import React, { useRef, useState, } from 'react'; -import { FileStorageItem, FileStorageTable, isDirectory } from './FileStorage'; +import { + type FileStorageItem, + type FileStorageTable, + isDirectory, +} from './FileStorage'; import './FileList.scss'; import { DEFAULT_ROW_HEIGHT, getMoveOperation } from './FileListUtils'; -import { FileListItem, FileListRenderItemProps } from './FileListItem'; +import { FileListItem, type FileListRenderItemProps } from './FileListItem'; const log = Log.module('FileList'); diff --git a/packages/file-explorer/src/FileListContainer.test.tsx b/packages/file-explorer/src/FileListContainer.test.tsx index c24844349..ce8478801 100644 --- a/packages/file-explorer/src/FileListContainer.test.tsx +++ b/packages/file-explorer/src/FileListContainer.test.tsx @@ -2,10 +2,12 @@ import React from 'react'; import { screen, render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { MockFileStorage } from '@deephaven/dashboard-core-plugins'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { ContextMenuRoot } from '@deephaven/components'; -import { FileStorageItem, FileStorageTable } from './FileStorage'; -import FileListContainer, { FileListContainerProps } from './FileListContainer'; +import { type FileStorageItem, type FileStorageTable } from './FileStorage'; +import FileListContainer, { + type FileListContainerProps, +} from './FileListContainer'; import { makeFiles } from './FileTestUtils'; const renderFileListContainer = async ({ diff --git a/packages/file-explorer/src/FileListContainer.tsx b/packages/file-explorer/src/FileListContainer.tsx index fab8338aa..af6358742 100644 --- a/packages/file-explorer/src/FileListContainer.tsx +++ b/packages/file-explorer/src/FileListContainer.tsx @@ -1,10 +1,14 @@ -import { ContextAction, ContextActions } from '@deephaven/components'; +import { type ContextAction, ContextActions } from '@deephaven/components'; import { assertNotNull } from '@deephaven/utils'; import React, { useCallback, useMemo, useState } from 'react'; import FileList from './FileList'; -import { FileListItem, FileListRenderItemProps } from './FileListItem'; +import { FileListItem, type FileListRenderItemProps } from './FileListItem'; import { DEFAULT_ROW_HEIGHT } from './FileListUtils'; -import { FileStorageItem, FileStorageTable, isDirectory } from './FileStorage'; +import { + type FileStorageItem, + type FileStorageTable, + isDirectory, +} from './FileStorage'; import SHORTCUTS from './FileExplorerShortcuts'; import './FileExplorer.scss'; import FileUtils from './FileUtils'; diff --git a/packages/file-explorer/src/FileListItem.tsx b/packages/file-explorer/src/FileListItem.tsx index 71714049f..6ccf27b25 100644 --- a/packages/file-explorer/src/FileListItem.tsx +++ b/packages/file-explorer/src/FileListItem.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { Tooltip, RenderItemProps } from '@deephaven/components'; +import { Tooltip, type RenderItemProps } from '@deephaven/components'; import { dhPython, vsCode, vsFolder, vsFolderOpened } from '@deephaven/icons'; -import { IconDefinition } from '@fortawesome/fontawesome-svg-core'; +import { type IconDefinition } from '@fortawesome/fontawesome-svg-core'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import classNames from 'classnames'; -import { FileStorageItem, isDirectory } from './FileStorage'; +import { type FileStorageItem, isDirectory } from './FileStorage'; import './FileList.scss'; import FileUtils, { MIME_TYPE } from './FileUtils'; import { getPathFromItem } from './FileListUtils'; diff --git a/packages/file-explorer/src/FileListItemEditor.test.tsx b/packages/file-explorer/src/FileListItemEditor.test.tsx index 072f54579..45dd80df0 100644 --- a/packages/file-explorer/src/FileListItemEditor.test.tsx +++ b/packages/file-explorer/src/FileListItemEditor.test.tsx @@ -3,9 +3,9 @@ import { render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { FileListItemEditor, - FileListItemEditorProps, + type FileListItemEditorProps, } from './FileListItemEditor'; -import { FileStorageItem } from './FileStorage'; +import { type FileStorageItem } from './FileStorage'; function makeItem(name = 'DEFAULT_NAME'): FileStorageItem { return { diff --git a/packages/file-explorer/src/FileListItemEditor.tsx b/packages/file-explorer/src/FileListItemEditor.tsx index 4f99f5cdb..e82415f5c 100644 --- a/packages/file-explorer/src/FileListItemEditor.tsx +++ b/packages/file-explorer/src/FileListItemEditor.tsx @@ -1,7 +1,7 @@ import React, { - ChangeEvent, - KeyboardEvent, - MouseEvent, + type ChangeEvent, + type KeyboardEvent, + type MouseEvent, useCallback, useEffect, useRef, @@ -11,7 +11,7 @@ import classNames from 'classnames'; import Log from '@deephaven/log'; import { PromiseUtils } from '@deephaven/utils'; import './FileListItemEditor.scss'; -import { FileStorageItem } from './FileStorage'; +import { type FileStorageItem } from './FileStorage'; const log = Log.module('FileListItemEditor'); diff --git a/packages/file-explorer/src/FileStorage.ts b/packages/file-explorer/src/FileStorage.ts index f2370bb87..5c0020300 100644 --- a/packages/file-explorer/src/FileStorage.ts +++ b/packages/file-explorer/src/FileStorage.ts @@ -1,4 +1,4 @@ -import { StorageTable, StorageItem } from '@deephaven/storage'; +import { type StorageTable, type StorageItem } from '@deephaven/storage'; /** * Basic metadata of the file diff --git a/packages/file-explorer/src/FileUtils.ts b/packages/file-explorer/src/FileUtils.ts index 6acaae7f5..5f20a0d03 100644 --- a/packages/file-explorer/src/FileUtils.ts +++ b/packages/file-explorer/src/FileUtils.ts @@ -1,6 +1,6 @@ import { ValidationError } from '@deephaven/utils'; import FileNotFoundError from './FileNotFoundError'; -import { FileStorage } from './FileStorage'; +import { type FileStorage } from './FileStorage'; /** * A basic list of some common MIME types. diff --git a/packages/file-explorer/src/NewItemModal.tsx b/packages/file-explorer/src/NewItemModal.tsx index eb30acaf7..0013c0842 100644 --- a/packages/file-explorer/src/NewItemModal.tsx +++ b/packages/file-explorer/src/NewItemModal.tsx @@ -1,4 +1,8 @@ -import React, { ChangeEvent, KeyboardEvent, PureComponent } from 'react'; +import React, { + type ChangeEvent, + type KeyboardEvent, + PureComponent, +} from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { @@ -10,7 +14,7 @@ import { Button, } from '@deephaven/components'; import { - CancelablePromise, + type CancelablePromise, Pending, PromiseUtils, ValidationError, @@ -19,7 +23,8 @@ import Log from '@deephaven/log'; import { vsHome } from '@deephaven/icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import FileExplorer from './FileExplorer'; -import FileStorage, { FileStorageItem, FileType } from './FileStorage'; +import { type FileStorageItem, type FileType } from './FileStorage'; +import type FileStorage from './FileStorage'; import FileUtils from './FileUtils'; import './NewItemModal.scss'; diff --git a/packages/file-explorer/tsconfig.json b/packages/file-explorer/tsconfig.json index 48a48416a..1ad411946 100644 --- a/packages/file-explorer/tsconfig.json +++ b/packages/file-explorer/tsconfig.json @@ -16,6 +16,7 @@ { "path": "../storage" }, + { "path": "../test-utils" }, { "path": "../utils" } diff --git a/packages/filters/CHANGELOG.md b/packages/filters/CHANGELOG.md index 6e9d5ba8e..deda24bcb 100644 --- a/packages/filters/CHANGELOG.md +++ b/packages/filters/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/filters + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/filters + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/filters diff --git a/packages/filters/package.json b/packages/filters/package.json index 3952c07c7..526ea2047 100644 --- a/packages/filters/package.json +++ b/packages/filters/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/filters", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Filters", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/filters/src/Utils.ts b/packages/filters/src/Utils.ts index 16f86b793..de4286416 100644 --- a/packages/filters/src/Utils.ts +++ b/packages/filters/src/Utils.ts @@ -1,4 +1,4 @@ -import { Type, TypeValue } from './Type'; +import { Type, type TypeValue } from './Type'; export function getLabelForTextFilter(filterType: TypeValue): string { switch (filterType) { diff --git a/packages/golden-layout/CHANGELOG.md b/packages/golden-layout/CHANGELOG.md index fd7f67525..9a6e29eef 100644 --- a/packages/golden-layout/CHANGELOG.md +++ b/packages/golden-layout/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +**Note:** Version bump only for package @deephaven/golden-layout + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/golden-layout + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/golden-layout + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/golden-layout diff --git a/packages/golden-layout/package.json b/packages/golden-layout/package.json index 202ab25ae..35b27a10c 100644 --- a/packages/golden-layout/package.json +++ b/packages/golden-layout/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/golden-layout", - "version": "0.92.0", + "version": "0.95.0", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", "description": "A multi-screen javascript Layout manager", diff --git a/packages/grid/CHANGELOG.md b/packages/grid/CHANGELOG.md index 778311f4f..f0971b2aa 100644 --- a/packages/grid/CHANGELOG.md +++ b/packages/grid/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/grid + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/grid + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/grid diff --git a/packages/grid/package.json b/packages/grid/package.json index bb719371f..455762a86 100644 --- a/packages/grid/package.json +++ b/packages/grid/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/grid", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven React grid component", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/grid/src/CellRenderer.ts b/packages/grid/src/CellRenderer.ts index 0326a9442..d29f36a16 100644 --- a/packages/grid/src/CellRenderer.ts +++ b/packages/grid/src/CellRenderer.ts @@ -1,10 +1,14 @@ /* eslint-disable class-methods-use-this */ import { getOrThrow } from '@deephaven/utils'; import { isExpandableGridModel } from './ExpandableGridModel'; -import { VisibleIndex, Coordinate, BoxCoordinates } from './GridMetrics'; +import { + type VisibleIndex, + type Coordinate, + type BoxCoordinates, +} from './GridMetrics'; import GridRenderer from './GridRenderer'; -import { GridRenderState } from './GridRendererTypes'; -import { GridColor } from './GridTheme'; +import { type GridRenderState } from './GridRendererTypes'; +import { type GridColor } from './GridTheme'; import memoizeClear from './memoizeClear'; export type CellRenderType = 'text' | 'dataBar'; diff --git a/packages/grid/src/ColumnHeaderGroup.ts b/packages/grid/src/ColumnHeaderGroup.ts index 42e94e85d..7cd660954 100644 --- a/packages/grid/src/ColumnHeaderGroup.ts +++ b/packages/grid/src/ColumnHeaderGroup.ts @@ -1,5 +1,5 @@ -import { MoveOperation } from './GridMetrics'; -import { BoundedAxisRange } from './GridAxisRange'; +import { type MoveOperation } from './GridMetrics'; +import { type BoundedAxisRange } from './GridAxisRange'; export interface IColumnHeaderGroup { name: string; diff --git a/packages/grid/src/DataBarCellRenderer.ts b/packages/grid/src/DataBarCellRenderer.ts index 9b0db224b..9a9a94b6a 100644 --- a/packages/grid/src/DataBarCellRenderer.ts +++ b/packages/grid/src/DataBarCellRenderer.ts @@ -3,12 +3,16 @@ import { getOrThrow } from '@deephaven/utils'; import CellRenderer from './CellRenderer'; import { isExpandableGridModel } from './ExpandableGridModel'; import { isDataBarGridModel } from './DataBarGridModel'; -import { ModelIndex, VisibleIndex, VisibleToModelMap } from './GridMetrics'; +import { + type ModelIndex, + type VisibleIndex, + type VisibleToModelMap, +} from './GridMetrics'; import GridColorUtils from './GridColorUtils'; import GridUtils from './GridUtils'; import memoizeClear from './memoizeClear'; -import { DEFAULT_FONT_WIDTH, GridRenderState } from './GridRendererTypes'; -import GridModel from './GridModel'; +import { DEFAULT_FONT_WIDTH, type GridRenderState } from './GridRendererTypes'; +import type GridModel from './GridModel'; interface DataBarRenderMetrics { /** The total width the entire bar from the min to max value can take up (rightmostPosition - leftmostPosition) */ diff --git a/packages/grid/src/DataBarGridModel.ts b/packages/grid/src/DataBarGridModel.ts index 0bad337fe..de6806f42 100644 --- a/packages/grid/src/DataBarGridModel.ts +++ b/packages/grid/src/DataBarGridModel.ts @@ -1,6 +1,6 @@ -import { ModelIndex } from './GridMetrics'; -import GridModel from './GridModel'; -import { GridColor, type GridTheme as GridThemeType } from './GridTheme'; +import { type ModelIndex } from './GridMetrics'; +import type GridModel from './GridModel'; +import { type GridColor, type GridTheme as GridThemeType } from './GridTheme'; export type Marker = { value: number; color: string }; export type AxisOption = 'proportional' | 'middle' | 'directional'; diff --git a/packages/grid/src/DeletableGridModel.ts b/packages/grid/src/DeletableGridModel.ts index df855a096..de6fc436b 100644 --- a/packages/grid/src/DeletableGridModel.ts +++ b/packages/grid/src/DeletableGridModel.ts @@ -1,5 +1,5 @@ -import GridRange from './GridRange'; -import GridModel from './GridModel'; +import type GridRange from './GridRange'; +import type GridModel from './GridModel'; import { AssertionError } from './errors'; export function isDeletableGridModel( diff --git a/packages/grid/src/EditableGridModel.ts b/packages/grid/src/EditableGridModel.ts index 8840479fd..d15d2b484 100644 --- a/packages/grid/src/EditableGridModel.ts +++ b/packages/grid/src/EditableGridModel.ts @@ -1,6 +1,6 @@ -import GridRange from './GridRange'; -import { ModelIndex } from './GridMetrics'; -import GridModel from './GridModel'; +import type GridRange from './GridRange'; +import { type ModelIndex } from './GridMetrics'; +import type GridModel from './GridModel'; import { AssertionError } from './errors'; export function isEditableGridModel( diff --git a/packages/grid/src/ExpandableGridModel.ts b/packages/grid/src/ExpandableGridModel.ts index 4e8cee678..14e1177a8 100644 --- a/packages/grid/src/ExpandableGridModel.ts +++ b/packages/grid/src/ExpandableGridModel.ts @@ -1,5 +1,5 @@ -import GridModel from './GridModel'; -import { ModelIndex } from './GridMetrics'; +import type GridModel from './GridModel'; +import { type ModelIndex } from './GridMetrics'; export function isExpandableGridModel( model: GridModel diff --git a/packages/grid/src/Grid.test.tsx b/packages/grid/src/Grid.test.tsx index 932417300..f1b1a76ae 100644 --- a/packages/grid/src/Grid.test.tsx +++ b/packages/grid/src/Grid.test.tsx @@ -1,14 +1,14 @@ -import React, { ReactElement } from 'react'; +import React, { type ReactElement } from 'react'; import TestRenderer from 'react-test-renderer'; import Grid from './Grid'; import GridRange from './GridRange'; import GridRenderer from './GridRenderer'; -import GridTheme, { GridTheme as GridThemeType } from './GridTheme'; +import GridTheme, { type GridTheme as GridThemeType } from './GridTheme'; import GridUtils from './GridUtils'; import MockGridModel from './MockGridModel'; import MockGridData from './MockGridData'; -import { VisibleIndex } from './GridMetrics'; -import GridModel from './GridModel'; +import { type VisibleIndex } from './GridMetrics'; +import type GridModel from './GridModel'; function makeMockContext(): CanvasRenderingContext2D { // Just return a partial mock diff --git a/packages/grid/src/Grid.tsx b/packages/grid/src/Grid.tsx index 74c64f70b..738d78de9 100644 --- a/packages/grid/src/Grid.tsx +++ b/packages/grid/src/Grid.tsx @@ -1,24 +1,34 @@ /* eslint react/no-did-update-set-state: "off" */ import React, { - CSSProperties, + type CSSProperties, PureComponent, - ReactNode, - RefObject, + type ReactNode, + type RefObject, } from 'react'; import classNames from 'classnames'; import memoize from 'memoize-one'; import clamp from 'lodash.clamp'; import { assertNotNull, EMPTY_ARRAY, getChangedKeys } from '@deephaven/utils'; -import GridMetricCalculator, { GridMetricState } from './GridMetricCalculator'; -import GridModel from './GridModel'; -import GridMouseHandler, { - GridMouseEvent, - GridMouseHandlerFunctionName, +import GridMetricCalculator, { + type GridMetricState, +} from './GridMetricCalculator'; +import type GridModel from './GridModel'; +import { + type GridMouseEvent, + type GridMouseHandlerFunctionName, } from './GridMouseHandler'; -import GridTheme, { GridTheme as GridThemeType } from './GridTheme'; -import GridRange, { GridRangeIndex, SELECTION_DIRECTION } from './GridRange'; +import type GridMouseHandler from './GridMouseHandler'; +import GridTheme, { type GridTheme as GridThemeType } from './GridTheme'; +import GridRange, { + type GridRangeIndex, + SELECTION_DIRECTION, +} from './GridRange'; import GridRenderer from './GridRenderer'; -import GridUtils, { GridPoint, isLinkToken, Token } from './GridUtils'; +import GridUtils, { + type GridPoint, + isLinkToken, + type Token, +} from './GridUtils'; import { GridSelectionMouseHandler, GridColumnMoveMouseHandler, @@ -30,14 +40,15 @@ import { GridScrollBarCornerMouseHandler, GridVerticalScrollBarMouseHandler, EditMouseHandler, - GridSeparator, + type GridSeparator, GridTokenMouseHandler, } from './mouse-handlers'; import './Grid.scss'; -import KeyHandler, { - GridKeyHandlerFunctionName, - GridKeyboardEvent, +import { + type GridKeyHandlerFunctionName, + type GridKeyboardEvent, } from './KeyHandler'; +import type KeyHandler from './KeyHandler'; import { EditKeyHandler, PasteKeyHandler, @@ -46,26 +57,27 @@ import { } from './key-handlers'; import CellInputField from './CellInputField'; import PasteError from './errors/PasteError'; -import GridMetrics, { - Coordinate, - ModelIndex, - MoveOperation, - VisibleIndex, +import { + type Coordinate, + type ModelIndex, + type MoveOperation, + type VisibleIndex, } from './GridMetrics'; +import type GridMetrics from './GridMetrics'; import { isExpandableGridModel } from './ExpandableGridModel'; import { assertIsEditableGridModel, - EditOperation, + type EditOperation, isEditableGridModel, } from './EditableGridModel'; -import { EventHandlerResultOptions } from './EventHandlerResult'; +import { type EventHandlerResultOptions } from './EventHandlerResult'; import { assertIsDefined } from './errors'; import ThemeContext from './ThemeContext'; -import { DraggingColumn } from './mouse-handlers/GridColumnMoveMouseHandler'; +import { type DraggingColumn } from './mouse-handlers/GridColumnMoveMouseHandler'; import { - EditingCell, - GridRenderState, - EditingCellTextSelectionRange, + type EditingCell, + type GridRenderState, + type EditingCellTextSelectionRange, } from './GridRendererTypes'; type LegacyCanvasRenderingContext2D = CanvasRenderingContext2D & { diff --git a/packages/grid/src/GridColorUtils.ts b/packages/grid/src/GridColorUtils.ts index 88f61c865..12cecf686 100644 --- a/packages/grid/src/GridColorUtils.ts +++ b/packages/grid/src/GridColorUtils.ts @@ -1,7 +1,7 @@ import convert from 'color-convert'; -import { HEX } from 'color-convert/conversions'; +import { type HEX } from 'color-convert/conversions'; import clamp from 'lodash.clamp'; -import { GridColor } from './GridTheme'; +import { type GridColor } from './GridTheme'; export type RGB = { r: number; g: number; b: number }; export type Oklab = { L: number; a: number; b: number }; diff --git a/packages/grid/src/GridMetricCalculator.ts b/packages/grid/src/GridMetricCalculator.ts index a67ace195..90ee7b7ee 100644 --- a/packages/grid/src/GridMetricCalculator.ts +++ b/packages/grid/src/GridMetricCalculator.ts @@ -1,6 +1,6 @@ import clamp from 'lodash.clamp'; import { getOrThrow } from '@deephaven/utils'; -import GridModel from './GridModel'; +import type GridModel from './GridModel'; import type { GridMetrics, BoxCoordinates, @@ -14,9 +14,9 @@ import type { SizeMap, } from './GridMetrics'; import GridUtils from './GridUtils'; -import { GridFont, GridTheme } from './GridTheme'; +import { type GridFont, type GridTheme } from './GridTheme'; import { isExpandableGridModel } from './ExpandableGridModel'; -import { DraggingColumn } from './mouse-handlers/GridColumnMoveMouseHandler'; +import { type DraggingColumn } from './mouse-handlers/GridColumnMoveMouseHandler'; export { getOrThrow } from '@deephaven/utils'; /* eslint class-methods-use-this: "off" */ diff --git a/packages/grid/src/GridModel.ts b/packages/grid/src/GridModel.ts index c52db2e76..1699f0209 100644 --- a/packages/grid/src/GridModel.ts +++ b/packages/grid/src/GridModel.ts @@ -1,10 +1,14 @@ -import { EventTarget, Event } from 'event-target-shim'; +import { EventTarget, type Event } from 'event-target-shim'; import type { IColumnHeaderGroup } from './ColumnHeaderGroup'; -import { ModelIndex } from './GridMetrics'; -import { GridColor, GridTheme, NullableGridColor } from './GridTheme'; +import { type ModelIndex } from './GridMetrics'; +import { + type GridColor, + type GridTheme, + type NullableGridColor, +} from './GridTheme'; import memoizeClear from './memoizeClear'; -import GridUtils, { Token } from './GridUtils'; -import { CellRenderType } from './CellRenderer'; +import GridUtils, { type Token } from './GridUtils'; +import { type CellRenderType } from './CellRenderer'; const LINK_TRUNCATION_LENGTH = 5000; diff --git a/packages/grid/src/GridMouseHandler.ts b/packages/grid/src/GridMouseHandler.ts index b81baec0c..e439c1a63 100644 --- a/packages/grid/src/GridMouseHandler.ts +++ b/packages/grid/src/GridMouseHandler.ts @@ -1,8 +1,8 @@ /* eslint class-methods-use-this: "off" */ /* eslint no-unused-vars: "off" */ -import { EventHandlerResult } from './EventHandlerResult'; -import Grid from './Grid'; -import { GridPoint } from './GridUtils'; +import { type EventHandlerResult } from './EventHandlerResult'; +import type Grid from './Grid'; +import { type GridPoint } from './GridUtils'; /** * Some events we listen to are a native mouse event, and others are wrapped with React's SyntheticEvent. diff --git a/packages/grid/src/GridRenderer.test.tsx b/packages/grid/src/GridRenderer.test.tsx index 782832779..291458d60 100644 --- a/packages/grid/src/GridRenderer.test.tsx +++ b/packages/grid/src/GridRenderer.test.tsx @@ -1,11 +1,11 @@ -import GridMetrics from './GridMetrics'; -import GridModel from './GridModel'; +import type GridMetrics from './GridMetrics'; +import type GridModel from './GridModel'; import GridRenderer from './GridRenderer'; import MockGridModel from './MockGridModel'; import GridTheme from './GridTheme'; -import TextCellRenderer from './TextCellRenderer'; -import { LinkToken } from './GridUtils'; -import { GridRenderState } from './GridRendererTypes'; +import type TextCellRenderer from './TextCellRenderer'; +import { type LinkToken } from './GridUtils'; +import { type GridRenderState } from './GridRendererTypes'; const makeMockContext = (): CanvasRenderingContext2D => // Just return a partial mock diff --git a/packages/grid/src/GridRenderer.ts b/packages/grid/src/GridRenderer.ts index 429e2e29d..73892677c 100644 --- a/packages/grid/src/GridRenderer.ts +++ b/packages/grid/src/GridRenderer.ts @@ -4,13 +4,18 @@ import memoizeClear from './memoizeClear'; import GridUtils from './GridUtils'; import GridColorUtils from './GridColorUtils'; import { isExpandableGridModel } from './ExpandableGridModel'; -import { GridColor, GridColorWay, NullableGridColor } from './GridTheme'; -import { Coordinate, VisibleIndex } from './GridMetrics'; +import { + type GridColor, + type GridColorWay, + type NullableGridColor, +} from './GridTheme'; +import { type Coordinate, type VisibleIndex } from './GridMetrics'; import { isEditableGridModel } from './EditableGridModel'; import GridColumnSeparatorMouseHandler from './mouse-handlers/GridColumnSeparatorMouseHandler'; -import { BoundedAxisRange } from './GridAxisRange'; -import { DEFAULT_FONT_WIDTH, GridRenderState } from './GridRendererTypes'; -import CellRenderer, { CellRenderType } from './CellRenderer'; +import { type BoundedAxisRange } from './GridAxisRange'; +import { DEFAULT_FONT_WIDTH, type GridRenderState } from './GridRendererTypes'; +import { type CellRenderType } from './CellRenderer'; +import type CellRenderer from './CellRenderer'; import DataBarCellRenderer from './DataBarCellRenderer'; import TextCellRenderer from './TextCellRenderer'; diff --git a/packages/grid/src/GridRendererTypes.ts b/packages/grid/src/GridRendererTypes.ts index fecf47c36..6ef99e438 100644 --- a/packages/grid/src/GridRendererTypes.ts +++ b/packages/grid/src/GridRendererTypes.ts @@ -1,9 +1,10 @@ -import GridMetrics, { VisibleIndex, Coordinate } from './GridMetrics'; -import GridModel from './GridModel'; -import GridRange from './GridRange'; -import { GridTheme } from './GridTheme'; -import { DraggingColumn } from './mouse-handlers/GridColumnMoveMouseHandler'; -import { GridSeparator } from './mouse-handlers/GridSeparatorMouseHandler'; +import { type VisibleIndex, type Coordinate } from './GridMetrics'; +import type GridMetrics from './GridMetrics'; +import type GridModel from './GridModel'; +import type GridRange from './GridRange'; +import { type GridTheme } from './GridTheme'; +import { type DraggingColumn } from './mouse-handlers/GridColumnMoveMouseHandler'; +import { type GridSeparator } from './mouse-handlers/GridSeparatorMouseHandler'; // Default font width in pixels if it cannot be retrieved from the context export const DEFAULT_FONT_WIDTH = 10; diff --git a/packages/grid/src/GridUtils.test.ts b/packages/grid/src/GridUtils.test.ts index 2fb2dd46d..458a51d95 100644 --- a/packages/grid/src/GridUtils.test.ts +++ b/packages/grid/src/GridUtils.test.ts @@ -1,7 +1,8 @@ -import { AxisRange } from './GridAxisRange'; -import GridMetrics, { ModelIndex, MoveOperation } from './GridMetrics'; -import GridRange, { GridRangeIndex } from './GridRange'; -import GridUtils, { Token, TokenBox } from './GridUtils'; +import { type AxisRange } from './GridAxisRange'; +import { type ModelIndex, type MoveOperation } from './GridMetrics'; +import type GridMetrics from './GridMetrics'; +import GridRange, { type GridRangeIndex } from './GridRange'; +import GridUtils, { type Token, type TokenBox } from './GridUtils'; import type { BoundedAxisRange } from './GridAxisRange'; function expectModelIndexes( diff --git a/packages/grid/src/GridUtils.ts b/packages/grid/src/GridUtils.ts index 47511a31b..83eb9e1c2 100644 --- a/packages/grid/src/GridUtils.ts +++ b/packages/grid/src/GridUtils.ts @@ -1,30 +1,30 @@ -import React from 'react'; +import type React from 'react'; import clamp from 'lodash.clamp'; import { find as linkifyFind } from 'linkifyjs'; import { EMPTY_ARRAY, getOrThrow } from '@deephaven/utils'; -import GridRange, { GridRangeIndex } from './GridRange'; +import GridRange, { type GridRangeIndex } from './GridRange'; import { - BoxCoordinates, - Coordinate, - CoordinateMap, - VisibleIndex, - VisibleToModelMap, - ModelIndex, - ModelSizeMap, - MoveOperation, - SizeMap, + type BoxCoordinates, + type Coordinate, + type CoordinateMap, + type VisibleIndex, + type VisibleToModelMap, + type ModelIndex, + type ModelSizeMap, + type MoveOperation, + type SizeMap, } from './GridMetrics'; import type { GridMetrics } from './GridMetrics'; -import { GridTheme } from './GridTheme'; -import { GridWheelEvent } from './GridMouseHandler'; +import { type GridTheme } from './GridTheme'; +import { type GridWheelEvent } from './GridMouseHandler'; import { - AxisRange, - BoundedAxisRange, + type AxisRange, + type BoundedAxisRange, isBoundedAxisRange, - Range, + type Range, } from './GridAxisRange'; import { isExpandableGridModel } from './ExpandableGridModel'; -import { GridRenderState } from './GridRendererTypes'; +import { type GridRenderState } from './GridRendererTypes'; export type GridPoint = { x: Coordinate; diff --git a/packages/grid/src/KeyHandler.ts b/packages/grid/src/KeyHandler.ts index 776b53338..e0c377552 100644 --- a/packages/grid/src/KeyHandler.ts +++ b/packages/grid/src/KeyHandler.ts @@ -5,8 +5,8 @@ * Return true from any of the events to indicate they're consumed, and stopPropagation/preventDefault will be called. */ -import React from 'react'; -import { EventHandlerResult } from './EventHandlerResult'; +import type React from 'react'; +import { type EventHandlerResult } from './EventHandlerResult'; import type Grid from './Grid'; /** diff --git a/packages/grid/src/MockDataBarGridModel.ts b/packages/grid/src/MockDataBarGridModel.ts index 55fae2e54..923f7729d 100644 --- a/packages/grid/src/MockDataBarGridModel.ts +++ b/packages/grid/src/MockDataBarGridModel.ts @@ -1,21 +1,21 @@ /* eslint-disable class-methods-use-this */ import { getOrThrow } from '@deephaven/utils'; -import { CellRenderType } from './CellRenderer'; +import { type CellRenderType } from './CellRenderer'; import { - AxisOption, - ColorMap, - ColumnAxisMap, - DataBarGridModel, - DataBarOptions, - DirectionMap, - MarkerMap, - MaxMap, - MinMap, - OpacityMap, - TextAlignmentMap, - ValuePlacementMap, + type AxisOption, + type ColorMap, + type ColumnAxisMap, + type DataBarGridModel, + type DataBarOptions, + type DirectionMap, + type MarkerMap, + type MaxMap, + type MinMap, + type OpacityMap, + type TextAlignmentMap, + type ValuePlacementMap, } from './DataBarGridModel'; -import { ModelIndex } from './GridMetrics'; +import { type ModelIndex } from './GridMetrics'; import GridModel from './GridModel'; import GridTheme from './GridTheme'; diff --git a/packages/grid/src/MockGridModel.test.ts b/packages/grid/src/MockGridModel.test.ts index 7d28c78c7..e4ed53b6f 100644 --- a/packages/grid/src/MockGridModel.test.ts +++ b/packages/grid/src/MockGridModel.test.ts @@ -1,4 +1,4 @@ -import { LinkToken } from './GridUtils'; +import { type LinkToken } from './GridUtils'; import MockGridModel from './MockGridModel'; describe('tokensForCell', () => { diff --git a/packages/grid/src/MockGridModel.ts b/packages/grid/src/MockGridModel.ts index afaab6e70..715294102 100644 --- a/packages/grid/src/MockGridModel.ts +++ b/packages/grid/src/MockGridModel.ts @@ -1,10 +1,11 @@ /* eslint class-methods-use-this: "off" */ /* eslint no-unused-vars: "off" */ -import EditableGridModel, { EditOperation } from './EditableGridModel'; -import { ModelIndex } from './GridMetrics'; +import { type EditOperation } from './EditableGridModel'; +import type EditableGridModel from './EditableGridModel'; +import { type ModelIndex } from './GridMetrics'; import GridModel from './GridModel'; import GridRange from './GridRange'; -import { GridColor, GridTheme } from './GridTheme'; +import { type GridColor, type GridTheme } from './GridTheme'; /** * Mock model implementing GridModel for testing out grid functionality diff --git a/packages/grid/src/MockTreeGridModel.ts b/packages/grid/src/MockTreeGridModel.ts index cda9fc86d..58cdf0925 100644 --- a/packages/grid/src/MockTreeGridModel.ts +++ b/packages/grid/src/MockTreeGridModel.ts @@ -2,8 +2,8 @@ /* eslint no-unused-vars: "off" */ import MockGridModel from './MockGridModel'; import memoizeClear from './memoizeClear'; -import ExpandableGridModel from './ExpandableGridModel'; -import { ModelIndex } from './GridMetrics'; +import type ExpandableGridModel from './ExpandableGridModel'; +import { type ModelIndex } from './GridMetrics'; type ChildrenTreeMap = Map; diff --git a/packages/grid/src/TextCellRenderer.ts b/packages/grid/src/TextCellRenderer.ts index ac7515f1c..e32a83088 100644 --- a/packages/grid/src/TextCellRenderer.ts +++ b/packages/grid/src/TextCellRenderer.ts @@ -2,11 +2,11 @@ import { EMPTY_ARRAY, getOrThrow } from '@deephaven/utils'; import CellRenderer from './CellRenderer'; import { isExpandableGridModel } from './ExpandableGridModel'; -import { VisibleIndex } from './GridMetrics'; -import { DEFAULT_FONT_WIDTH, GridRenderState } from './GridRendererTypes'; -import GridUtils, { TokenBox, Token } from './GridUtils'; +import { type VisibleIndex } from './GridMetrics'; +import { DEFAULT_FONT_WIDTH, type GridRenderState } from './GridRendererTypes'; +import GridUtils, { type TokenBox, type Token } from './GridUtils'; import memoizeClear from './memoizeClear'; -import TokenBoxCellRenderer from './TokenBoxCellRenderer'; +import type TokenBoxCellRenderer from './TokenBoxCellRenderer'; class TextCellRenderer extends CellRenderer implements TokenBoxCellRenderer { drawCellContent( diff --git a/packages/grid/src/ThemeContext.ts b/packages/grid/src/ThemeContext.ts index 4b89a746d..0d3c55bf9 100644 --- a/packages/grid/src/ThemeContext.ts +++ b/packages/grid/src/ThemeContext.ts @@ -1,5 +1,5 @@ import React from 'react'; -import { GridTheme as GridThemeType } from './GridTheme'; +import { type GridTheme as GridThemeType } from './GridTheme'; export type ThemeContextValue = Partial; diff --git a/packages/grid/src/TokenBoxCellRenderer.ts b/packages/grid/src/TokenBoxCellRenderer.ts index 8bbb5bde1..edbb113d5 100644 --- a/packages/grid/src/TokenBoxCellRenderer.ts +++ b/packages/grid/src/TokenBoxCellRenderer.ts @@ -1,7 +1,7 @@ -import CellRenderer from './CellRenderer'; -import { VisibleIndex } from './GridMetrics'; -import { GridRenderState } from './GridRendererTypes'; -import { TokenBox } from './GridUtils'; +import type CellRenderer from './CellRenderer'; +import { type VisibleIndex } from './GridMetrics'; +import { type GridRenderState } from './GridRendererTypes'; +import { type TokenBox } from './GridUtils'; export function isTokenBoxCellRenderer( cellRenderer: CellRenderer diff --git a/packages/grid/src/key-handlers/EditKeyHandler.ts b/packages/grid/src/key-handlers/EditKeyHandler.ts index 3b8a27025..3ad20b707 100644 --- a/packages/grid/src/key-handlers/EditKeyHandler.ts +++ b/packages/grid/src/key-handlers/EditKeyHandler.ts @@ -1,10 +1,10 @@ /* eslint class-methods-use-this: "off" */ import GridUtils from '../GridUtils'; -import Grid from '../Grid'; +import type Grid from '../Grid'; import GridRange from '../GridRange'; -import KeyHandler, { GridKeyboardEvent } from '../KeyHandler'; +import KeyHandler, { type GridKeyboardEvent } from '../KeyHandler'; import { isEditableGridModel } from '../EditableGridModel'; -import { EventHandlerResult } from '../EventHandlerResult'; +import { type EventHandlerResult } from '../EventHandlerResult'; class EditKeyHandler extends KeyHandler { onDown(event: GridKeyboardEvent, grid: Grid): EventHandlerResult { diff --git a/packages/grid/src/key-handlers/PasteKeyHandler.ts b/packages/grid/src/key-handlers/PasteKeyHandler.ts index 68b8528f8..d8a1f281f 100644 --- a/packages/grid/src/key-handlers/PasteKeyHandler.ts +++ b/packages/grid/src/key-handlers/PasteKeyHandler.ts @@ -1,8 +1,8 @@ /* eslint class-methods-use-this: "off" */ -import { EventHandlerResult } from '../EventHandlerResult'; -import Grid from '../Grid'; +import { type EventHandlerResult } from '../EventHandlerResult'; +import type Grid from '../Grid'; import GridUtils from '../GridUtils'; -import KeyHandler, { GridKeyboardEvent } from '../KeyHandler'; +import KeyHandler, { type GridKeyboardEvent } from '../KeyHandler'; /** * Parse out data from an HTML table. Currently does not support colspan/rowspan diff --git a/packages/grid/src/key-handlers/SelectionKeyHandler.ts b/packages/grid/src/key-handlers/SelectionKeyHandler.ts index 20ae726f1..024d9134c 100644 --- a/packages/grid/src/key-handlers/SelectionKeyHandler.ts +++ b/packages/grid/src/key-handlers/SelectionKeyHandler.ts @@ -1,10 +1,10 @@ /* eslint class-methods-use-this: "off" */ import clamp from 'lodash.clamp'; -import { EventHandlerResult } from '../EventHandlerResult'; -import Grid from '../Grid'; +import { type EventHandlerResult } from '../EventHandlerResult'; +import type Grid from '../Grid'; import GridRange from '../GridRange'; import GridUtils from '../GridUtils'; -import KeyHandler, { GridKeyboardEvent } from '../KeyHandler'; +import KeyHandler, { type GridKeyboardEvent } from '../KeyHandler'; class SelectionKeyHandler extends KeyHandler { onDown(event: GridKeyboardEvent, grid: Grid): EventHandlerResult { diff --git a/packages/grid/src/key-handlers/TreeKeyHandler.ts b/packages/grid/src/key-handlers/TreeKeyHandler.ts index 8b2f39c1a..7eff22713 100644 --- a/packages/grid/src/key-handlers/TreeKeyHandler.ts +++ b/packages/grid/src/key-handlers/TreeKeyHandler.ts @@ -1,7 +1,7 @@ /* eslint class-methods-use-this: "off" */ import { isExpandableGridModel } from '../ExpandableGridModel'; -import Grid from '../Grid'; -import GridRange from '../GridRange'; +import type Grid from '../Grid'; +import type GridRange from '../GridRange'; import KeyHandler from '../KeyHandler'; class TreeKeyHandler extends KeyHandler { diff --git a/packages/grid/src/mouse-handlers/EditMouseHandler.ts b/packages/grid/src/mouse-handlers/EditMouseHandler.ts index dd3dbc81a..a1ae10f5c 100644 --- a/packages/grid/src/mouse-handlers/EditMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/EditMouseHandler.ts @@ -1,10 +1,10 @@ /* eslint class-methods-use-this: "off" */ import { isEditableGridModel } from '../EditableGridModel'; -import { EventHandlerResult } from '../EventHandlerResult'; -import Grid from '../Grid'; +import { type EventHandlerResult } from '../EventHandlerResult'; +import type Grid from '../Grid'; import GridMouseHandler from '../GridMouseHandler'; import GridRange from '../GridRange'; -import { GridPoint } from '../GridUtils'; +import { type GridPoint } from '../GridUtils'; /** * Handles clicking on a cell to edit it in an editable grid diff --git a/packages/grid/src/mouse-handlers/GridColumnMoveMouseHandler.ts b/packages/grid/src/mouse-handlers/GridColumnMoveMouseHandler.ts index b65f8362b..c728e8f34 100644 --- a/packages/grid/src/mouse-handlers/GridColumnMoveMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridColumnMoveMouseHandler.ts @@ -1,9 +1,9 @@ import clamp from 'lodash.clamp'; import { assertNotNull } from '@deephaven/utils'; -import Grid from '../Grid'; -import GridUtils, { GridPoint } from '../GridUtils'; -import GridMouseHandler, { GridMouseEvent } from '../GridMouseHandler'; -import { EventHandlerResult } from '../EventHandlerResult'; +import type Grid from '../Grid'; +import GridUtils, { type GridPoint } from '../GridUtils'; +import GridMouseHandler, { type GridMouseEvent } from '../GridMouseHandler'; +import { type EventHandlerResult } from '../EventHandlerResult'; import type { VisibleIndex, ModelIndex, diff --git a/packages/grid/src/mouse-handlers/GridColumnSeparatorMouseHandler.ts b/packages/grid/src/mouse-handlers/GridColumnSeparatorMouseHandler.ts index 83b52eed2..a401ec45d 100644 --- a/packages/grid/src/mouse-handlers/GridColumnSeparatorMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridColumnSeparatorMouseHandler.ts @@ -1,12 +1,12 @@ /* eslint class-methods-use-this: "off" */ -import Grid from '../Grid'; -import GridMetricCalculator from '../GridMetricCalculator'; +import type Grid from '../Grid'; +import type GridMetricCalculator from '../GridMetricCalculator'; import type { ModelIndex, GridMetrics } from '../GridMetrics'; import type GridModel from '../GridModel'; import type { GridTheme } from '../GridTheme'; -import GridUtils, { GridPoint } from '../GridUtils'; +import GridUtils, { type GridPoint } from '../GridUtils'; import GridSeparatorMouseHandler, { - GridSeparator, + type GridSeparator, } from './GridSeparatorMouseHandler'; class GridColumnSeparatorMouseHandler extends GridSeparatorMouseHandler { diff --git a/packages/grid/src/mouse-handlers/GridHorizontalScrollBarMouseHandler.ts b/packages/grid/src/mouse-handlers/GridHorizontalScrollBarMouseHandler.ts index 3403fba18..741aa585e 100644 --- a/packages/grid/src/mouse-handlers/GridHorizontalScrollBarMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridHorizontalScrollBarMouseHandler.ts @@ -1,9 +1,9 @@ import clamp from 'lodash.clamp'; -import { EventHandlerResult } from '../EventHandlerResult'; -import Grid from '../Grid'; -import { VisibleIndex } from '../GridMetrics'; +import { type EventHandlerResult } from '../EventHandlerResult'; +import type Grid from '../Grid'; +import { type VisibleIndex } from '../GridMetrics'; import GridMouseHandler from '../GridMouseHandler'; -import { GridPoint } from '../GridUtils'; +import { type GridPoint } from '../GridUtils'; /* eslint class-methods-use-this: "off" */ class GridHorizontalScrollBarMouseHandler extends GridMouseHandler { diff --git a/packages/grid/src/mouse-handlers/GridRowMoveMouseHandler.ts b/packages/grid/src/mouse-handlers/GridRowMoveMouseHandler.ts index c892a8073..27b94a468 100644 --- a/packages/grid/src/mouse-handlers/GridRowMoveMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridRowMoveMouseHandler.ts @@ -1,8 +1,8 @@ import { getOrThrow } from '@deephaven/utils'; -import { EventHandlerResult } from '../EventHandlerResult'; -import Grid from '../Grid'; +import { type EventHandlerResult } from '../EventHandlerResult'; +import type Grid from '../Grid'; import GridMouseHandler from '../GridMouseHandler'; -import GridUtils, { GridPoint } from '../GridUtils'; +import GridUtils, { type GridPoint } from '../GridUtils'; class GridRowMoveMouseHandler extends GridMouseHandler { cursor = 'move'; diff --git a/packages/grid/src/mouse-handlers/GridRowSeparatorMouseHandler.ts b/packages/grid/src/mouse-handlers/GridRowSeparatorMouseHandler.ts index ddac0b680..1215047a2 100644 --- a/packages/grid/src/mouse-handlers/GridRowSeparatorMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridRowSeparatorMouseHandler.ts @@ -1,12 +1,12 @@ /* eslint class-methods-use-this: "off" */ -import Grid from '../Grid'; -import GridMetricCalculator from '../GridMetricCalculator'; +import type Grid from '../Grid'; +import type GridMetricCalculator from '../GridMetricCalculator'; import type { ModelIndex, GridMetrics } from '../GridMetrics'; import type GridModel from '../GridModel'; -import { GridTheme } from '../GridTheme'; -import GridUtils, { GridPoint } from '../GridUtils'; +import { type GridTheme } from '../GridTheme'; +import GridUtils, { type GridPoint } from '../GridUtils'; import GridSeparatorMouseHandler, { - GridSeparator, + type GridSeparator, } from './GridSeparatorMouseHandler'; class GridRowSeparatorMouseHandler extends GridSeparatorMouseHandler { diff --git a/packages/grid/src/mouse-handlers/GridRowTreeMouseHandler.ts b/packages/grid/src/mouse-handlers/GridRowTreeMouseHandler.ts index 9b0a4dd36..3c14466b1 100644 --- a/packages/grid/src/mouse-handlers/GridRowTreeMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridRowTreeMouseHandler.ts @@ -1,9 +1,9 @@ /* eslint class-methods-use-this: "off" */ import { getOrThrow } from '@deephaven/utils'; -import { EventHandlerResult } from '../EventHandlerResult'; -import Grid from '../Grid'; +import { type EventHandlerResult } from '../EventHandlerResult'; +import type Grid from '../Grid'; import GridMouseHandler from '../GridMouseHandler'; -import GridUtils, { GridPoint } from '../GridUtils'; +import GridUtils, { type GridPoint } from '../GridUtils'; /** * Detect when the tree expand/collapse button is clicked diff --git a/packages/grid/src/mouse-handlers/GridScrollBarCornerMouseHandler.ts b/packages/grid/src/mouse-handlers/GridScrollBarCornerMouseHandler.ts index c2f4463eb..ccabe8bef 100644 --- a/packages/grid/src/mouse-handlers/GridScrollBarCornerMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridScrollBarCornerMouseHandler.ts @@ -1,8 +1,8 @@ /* eslint class-methods-use-this: "off" */ -import { EventHandlerResult } from '../EventHandlerResult'; -import Grid from '../Grid'; +import { type EventHandlerResult } from '../EventHandlerResult'; +import type Grid from '../Grid'; import GridMouseHandler from '../GridMouseHandler'; -import { GridPoint } from '../GridUtils'; +import { type GridPoint } from '../GridUtils'; /** * Used to eat the mouse event in the bottom right corner of the scroll bar diff --git a/packages/grid/src/mouse-handlers/GridSelectionMouseHandler.ts b/packages/grid/src/mouse-handlers/GridSelectionMouseHandler.ts index 1a5ce5f4b..f6d1ea404 100644 --- a/packages/grid/src/mouse-handlers/GridSelectionMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridSelectionMouseHandler.ts @@ -1,8 +1,8 @@ -import { EventHandlerResult } from '../EventHandlerResult'; -import Grid from '../Grid'; -import GridMouseHandler, { GridMouseEvent } from '../GridMouseHandler'; +import { type EventHandlerResult } from '../EventHandlerResult'; +import type Grid from '../Grid'; +import GridMouseHandler, { type GridMouseEvent } from '../GridMouseHandler'; import GridRange from '../GridRange'; -import GridUtils, { GridPoint } from '../GridUtils'; +import GridUtils, { type GridPoint } from '../GridUtils'; const DEFAULT_INTERVAL_MS = 100; diff --git a/packages/grid/src/mouse-handlers/GridSeparatorMouseHandler.ts b/packages/grid/src/mouse-handlers/GridSeparatorMouseHandler.ts index e9321b705..d27e0b03f 100644 --- a/packages/grid/src/mouse-handlers/GridSeparatorMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridSeparatorMouseHandler.ts @@ -2,8 +2,9 @@ import { getOrThrow } from '@deephaven/utils'; import type Grid from '../Grid'; import type { GridMetricCalculator } from '../GridMetricCalculator'; import type GridModel from '../GridModel'; -import { EventHandlerResult } from '../EventHandlerResult'; -import GridMetrics, { ModelIndex, VisibleIndex } from '../GridMetrics'; +import { type EventHandlerResult } from '../EventHandlerResult'; +import { type ModelIndex, type VisibleIndex } from '../GridMetrics'; +import type GridMetrics from '../GridMetrics'; import GridMouseHandler from '../GridMouseHandler'; import type { GridTheme } from '../GridTheme'; import type { GridPoint } from '../GridUtils'; diff --git a/packages/grid/src/mouse-handlers/GridTokenMouseHandler.ts b/packages/grid/src/mouse-handlers/GridTokenMouseHandler.ts index 648aa5aee..08612bcf6 100644 --- a/packages/grid/src/mouse-handlers/GridTokenMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridTokenMouseHandler.ts @@ -2,11 +2,15 @@ import { getOrThrow } from '@deephaven/utils'; import { isEditableGridModel } from '../EditableGridModel'; -import { EventHandlerResult } from '../EventHandlerResult'; -import Grid from '../Grid'; -import GridMouseHandler, { GridMouseEvent } from '../GridMouseHandler'; +import { type EventHandlerResult } from '../EventHandlerResult'; +import type Grid from '../Grid'; +import GridMouseHandler, { type GridMouseEvent } from '../GridMouseHandler'; import GridRange from '../GridRange'; -import GridUtils, { GridPoint, isLinkToken, TokenBox } from '../GridUtils'; +import GridUtils, { + type GridPoint, + isLinkToken, + type TokenBox, +} from '../GridUtils'; import { isTokenBoxCellRenderer } from '../TokenBoxCellRenderer'; class GridTokenMouseHandler extends GridMouseHandler { diff --git a/packages/grid/src/mouse-handlers/GridVerticalScrollBarMouseHandler.ts b/packages/grid/src/mouse-handlers/GridVerticalScrollBarMouseHandler.ts index bc044cc62..43df4dff2 100644 --- a/packages/grid/src/mouse-handlers/GridVerticalScrollBarMouseHandler.ts +++ b/packages/grid/src/mouse-handlers/GridVerticalScrollBarMouseHandler.ts @@ -1,9 +1,9 @@ import clamp from 'lodash.clamp'; -import { EventHandlerResult } from '../EventHandlerResult'; -import Grid from '../Grid'; -import { VisibleIndex } from '../GridMetrics'; +import { type EventHandlerResult } from '../EventHandlerResult'; +import type Grid from '../Grid'; +import { type VisibleIndex } from '../GridMetrics'; import GridMouseHandler from '../GridMouseHandler'; -import { GridPoint } from '../GridUtils'; +import { type GridPoint } from '../GridUtils'; /* eslint class-methods-use-this: "off" */ class GridVerticalScrollBarMouseHandler extends GridMouseHandler { diff --git a/packages/icons/CHANGELOG.md b/packages/icons/CHANGELOG.md index fb695220b..454d28fa9 100644 --- a/packages/icons/CHANGELOG.md +++ b/packages/icons/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +**Note:** Version bump only for package @deephaven/icons + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/icons + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/icons + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/icons diff --git a/packages/icons/package.json b/packages/icons/package.json index 10901855c..4904ed9e5 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/icons", - "version": "0.92.0", + "version": "0.95.0", "description": "Icons used in Deephaven client apps. Extends vscode-codicons to be font-awesome svg-core compatible and adds additional icons in a similar style.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/iris-grid/CHANGELOG.md b/packages/iris-grid/CHANGELOG.md index 817d077c7..f4813f805 100644 --- a/packages/iris-grid/CHANGELOG.md +++ b/packages/iris-grid/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/iris-grid + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) ### Features diff --git a/packages/iris-grid/package.json b/packages/iris-grid/package.json index 39258ad47..a90182c53 100644 --- a/packages/iris-grid/package.json +++ b/packages/iris-grid/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/iris-grid", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Iris Grid", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -67,6 +67,7 @@ "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", "@deephaven/mocks": "file:../mocks", + "@deephaven/test-utils": "file:../test-utils", "deep-equal": "2.2.3" }, "files": [ diff --git a/packages/iris-grid/src/AdvancedFilterCreator.test.tsx b/packages/iris-grid/src/AdvancedFilterCreator.test.tsx index 0b5f21004..1de9d9175 100644 --- a/packages/iris-grid/src/AdvancedFilterCreator.test.tsx +++ b/packages/iris-grid/src/AdvancedFilterCreator.test.tsx @@ -9,9 +9,9 @@ import dh from '@deephaven/jsapi-shim'; // Operator as FilterOperator, // } from '@deephaven/filters'; import AdvancedFilterCreator from './AdvancedFilterCreator'; -import { AdvancedFilterOptions } from './CommonTypes'; +import { type AdvancedFilterOptions } from './CommonTypes'; import IrisGridTestUtils from './IrisGridTestUtils'; -import IrisGridModel from './IrisGridModel'; +import type IrisGridModel from './IrisGridModel'; const irisGridTestUtils = new IrisGridTestUtils(dh); diff --git a/packages/iris-grid/src/AdvancedFilterCreator.tsx b/packages/iris-grid/src/AdvancedFilterCreator.tsx index 3747c0501..fd30b2da6 100644 --- a/packages/iris-grid/src/AdvancedFilterCreator.tsx +++ b/packages/iris-grid/src/AdvancedFilterCreator.tsx @@ -7,22 +7,22 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import memoize from 'memoize-one'; import { Operator as FilterOperator, - OperatorValue as FilterOperatorValue, - TypeValue as FilterTypeValue, + type OperatorValue as FilterOperatorValue, + type TypeValue as FilterTypeValue, assertOperatorValue as assertFilterOperatorValue, } from '@deephaven/filters'; import { dhSortAmountDown, dhNewCircleLargeFilled } from '@deephaven/icons'; import { - Formatter, + type Formatter, TableUtils, - SortDirection, - FilterItem, + type SortDirection, + type FilterItem, } from '@deephaven/jsapi-utils'; import { Button, ContextActionUtils } from '@deephaven/components'; import Log from '@deephaven/log'; import { assertNotNull, - CancelablePromise, + type CancelablePromise, PromiseUtils, } from '@deephaven/utils'; import type { dh } from '@deephaven/jsapi-types'; @@ -30,8 +30,8 @@ import { nanoid } from 'nanoid'; import AdvancedFilterCreatorFilterItem from './AdvancedFilterCreatorFilterItem'; import AdvancedFilterCreatorSelectValue from './AdvancedFilterCreatorSelectValue'; import './AdvancedFilterCreator.scss'; -import IrisGridModel from './IrisGridModel'; -import { AdvancedFilterOptions } from './CommonTypes'; +import type IrisGridModel from './IrisGridModel'; +import { type AdvancedFilterOptions } from './CommonTypes'; const log = Log.module('AdvancedFilterCreator'); diff --git a/packages/iris-grid/src/AdvancedFilterCreatorFilterItem.tsx b/packages/iris-grid/src/AdvancedFilterCreatorFilterItem.tsx index 9b1eb3790..10de1a620 100644 --- a/packages/iris-grid/src/AdvancedFilterCreatorFilterItem.tsx +++ b/packages/iris-grid/src/AdvancedFilterCreatorFilterItem.tsx @@ -6,13 +6,13 @@ import { getLabelForDateFilter, getLabelForNumberFilter, getLabelForTextFilter, - TypeValue as FilterTypeValue, + type TypeValue as FilterTypeValue, } from '@deephaven/filters'; import { vsTrash } from '@deephaven/icons'; import type { dh } from '@deephaven/jsapi-types'; import { - AdvancedFilterItemType, - Formatter, + type AdvancedFilterItemType, + type Formatter, TableUtils, } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; diff --git a/packages/iris-grid/src/AdvancedFilterCreatorSelectValue.tsx b/packages/iris-grid/src/AdvancedFilterCreatorSelectValue.tsx index 2e3ba2937..12e0e7984 100644 --- a/packages/iris-grid/src/AdvancedFilterCreatorSelectValue.tsx +++ b/packages/iris-grid/src/AdvancedFilterCreatorSelectValue.tsx @@ -1,12 +1,12 @@ /* eslint react/no-did-update-set-state: "off" */ import React, { PureComponent } from 'react'; import classNames from 'classnames'; -import { Formatter, TableUtils } from '@deephaven/jsapi-utils'; +import { type Formatter, TableUtils } from '@deephaven/jsapi-utils'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { Button, FadeTransition } from '@deephaven/components'; import AdvancedFilterCreatorSelectValueList from './AdvancedFilterCreatorSelectValueList'; import './AdvancedFilterCreatorSelectValue.scss'; -import { ColumnName } from './CommonTypes'; +import { type ColumnName } from './CommonTypes'; interface AdvancedFilterCreatorSelectValueProps { dh: typeof DhType; diff --git a/packages/iris-grid/src/AdvancedFilterCreatorSelectValueList.tsx b/packages/iris-grid/src/AdvancedFilterCreatorSelectValueList.tsx index fd667cb7e..9d19078b6 100644 --- a/packages/iris-grid/src/AdvancedFilterCreatorSelectValueList.tsx +++ b/packages/iris-grid/src/AdvancedFilterCreatorSelectValueList.tsx @@ -1,11 +1,11 @@ /* eslint react/no-did-update-set-state: "off" */ -import React, { PureComponent, ReactElement } from 'react'; +import React, { PureComponent, type ReactElement } from 'react'; import type { dh as DhType } from '@deephaven/jsapi-types'; -import { Formatter } from '@deephaven/jsapi-utils'; +import { type Formatter } from '@deephaven/jsapi-utils'; import { LoadingSpinner, SelectValueList, - SelectItem, + type SelectItem, FadeTransition, } from '@deephaven/components'; import Log from '@deephaven/log'; diff --git a/packages/iris-grid/src/ColumnHeaderGroup.ts b/packages/iris-grid/src/ColumnHeaderGroup.ts index 33b4fa78d..d0bc17bd3 100644 --- a/packages/iris-grid/src/ColumnHeaderGroup.ts +++ b/packages/iris-grid/src/ColumnHeaderGroup.ts @@ -1,9 +1,9 @@ import { - MoveOperation, + type MoveOperation, GridUtils, - ModelIndex, - BoundedAxisRange, - IColumnHeaderGroup, + type ModelIndex, + type BoundedAxisRange, + type IColumnHeaderGroup, } from '@deephaven/grid'; import memoizeOne from 'memoize-one'; import Log from '@deephaven/log'; diff --git a/packages/iris-grid/src/ColumnStatistics.tsx b/packages/iris-grid/src/ColumnStatistics.tsx index f4f78d95f..10fd3c691 100644 --- a/packages/iris-grid/src/ColumnStatistics.tsx +++ b/packages/iris-grid/src/ColumnStatistics.tsx @@ -1,14 +1,15 @@ -import React, { Component, Key } from 'react'; +import React, { Component, type Key } from 'react'; import classNames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button, CopyButton, LoadingSpinner } from '@deephaven/components'; import { dhFreeze, dhRefresh, dhSortSlash, vsLock } from '@deephaven/icons'; import type { dh } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; -import { CancelablePromise, PromiseUtils } from '@deephaven/utils'; +import { type CancelablePromise, PromiseUtils } from '@deephaven/utils'; import { isExpandableGridModel } from '@deephaven/grid'; import './ColumnStatistics.scss'; -import IrisGridModel, { DisplayColumn } from './IrisGridModel'; +import { type DisplayColumn } from './IrisGridModel'; +import type IrisGridModel from './IrisGridModel'; const log = Log.module('ColumnStatistics'); const STATS_LABEL_OVERRIDES: Record = { diff --git a/packages/iris-grid/src/CommonTypes.tsx b/packages/iris-grid/src/CommonTypes.tsx index a99ee66ba..2ff8f6a7a 100644 --- a/packages/iris-grid/src/CommonTypes.tsx +++ b/packages/iris-grid/src/CommonTypes.tsx @@ -1,10 +1,10 @@ -import { AdvancedFilterOptions } from '@deephaven/jsapi-utils'; -import { ModelIndex } from '@deephaven/grid'; +import { type AdvancedFilterOptions } from '@deephaven/jsapi-utils'; +import { type ModelIndex } from '@deephaven/grid'; import type { dh } from '@deephaven/jsapi-types'; -import { Shortcut } from '@deephaven/components'; -import { IconDefinition } from '@deephaven/icons'; -import AggregationOperation from './sidebar/aggregations/AggregationOperation'; -import { OptionType } from './sidebar'; +import { type Shortcut } from '@deephaven/components'; +import { type IconDefinition } from '@deephaven/icons'; +import type AggregationOperation from './sidebar/aggregations/AggregationOperation'; +import { type OptionType } from './sidebar'; export type RowIndex = ModelIndex; diff --git a/packages/iris-grid/src/CrossColumnSearch.tsx b/packages/iris-grid/src/CrossColumnSearch.tsx index 8a5b1b33f..95d89602a 100644 --- a/packages/iris-grid/src/CrossColumnSearch.tsx +++ b/packages/iris-grid/src/CrossColumnSearch.tsx @@ -12,8 +12,8 @@ import { import type { dh as DhType } from '@deephaven/jsapi-types'; import { TableUtils } from '@deephaven/jsapi-utils'; import './CrossColumnSearch.scss'; -import { ColumnName } from './CommonTypes'; -import { DisplayColumn } from './IrisGridModel'; +import { type ColumnName } from './CommonTypes'; +import { type DisplayColumn } from './IrisGridModel'; interface CrossColumnSearchProps { value: string; diff --git a/packages/iris-grid/src/EmptyIrisGridModel.ts b/packages/iris-grid/src/EmptyIrisGridModel.ts index 68c1471ae..c535af09a 100644 --- a/packages/iris-grid/src/EmptyIrisGridModel.ts +++ b/packages/iris-grid/src/EmptyIrisGridModel.ts @@ -1,19 +1,19 @@ /* eslint class-methods-use-this: "off" */ import { - GridRange, - ModelIndex, - MoveOperation, - VisibleIndex, + type GridRange, + type ModelIndex, + type MoveOperation, + type VisibleIndex, } from '@deephaven/grid'; -import { dh as DhType } from '@deephaven/jsapi-types'; -import { ColumnName, Formatter } from '@deephaven/jsapi-utils'; +import { type dh as DhType } from '@deephaven/jsapi-types'; +import { type ColumnName, Formatter } from '@deephaven/jsapi-utils'; import { EMPTY_ARRAY, EMPTY_MAP } from '@deephaven/utils'; import IrisGridModel from './IrisGridModel'; -import ColumnHeaderGroup from './ColumnHeaderGroup'; +import type ColumnHeaderGroup from './ColumnHeaderGroup'; import { - PendingDataErrorMap, - PendingDataMap, - UITotalsTableConfig, + type PendingDataErrorMap, + type PendingDataMap, + type UITotalsTableConfig, } from './CommonTypes'; class EmptyIrisGridModel extends IrisGridModel { diff --git a/packages/iris-grid/src/FilterInputField.tsx b/packages/iris-grid/src/FilterInputField.tsx index f968f5d61..0c7c018c6 100644 --- a/packages/iris-grid/src/FilterInputField.tsx +++ b/packages/iris-grid/src/FilterInputField.tsx @@ -1,4 +1,8 @@ -import React, { ChangeEvent, PureComponent, ReactElement } from 'react'; +import React, { + type ChangeEvent, + PureComponent, + type ReactElement, +} from 'react'; import classNames from 'classnames'; import debounce from 'lodash.debounce'; import { vsFilter, dhFilterFilled } from '@deephaven/icons'; diff --git a/packages/iris-grid/src/GotoRow.test.tsx b/packages/iris-grid/src/GotoRow.test.tsx index 7724a96ea..f23af47bd 100644 --- a/packages/iris-grid/src/GotoRow.test.tsx +++ b/packages/iris-grid/src/GotoRow.test.tsx @@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event'; import dh from '@deephaven/jsapi-shim'; import { Type as FilterType, - TypeValue as FilterTypeValue, + type TypeValue as FilterTypeValue, } from '@deephaven/filters'; import { TableUtils } from '@deephaven/jsapi-utils'; import GotoRow from './GotoRow'; diff --git a/packages/iris-grid/src/GotoRow.tsx b/packages/iris-grid/src/GotoRow.tsx index d451cafc0..897fbd089 100644 --- a/packages/iris-grid/src/GotoRow.tsx +++ b/packages/iris-grid/src/GotoRow.tsx @@ -1,9 +1,9 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { vsClose, vsArrowUp, vsArrowDown } from '@deephaven/icons'; import React, { - ChangeEvent, - KeyboardEvent, - ReactElement, + type ChangeEvent, + type KeyboardEvent, + type ReactElement, forwardRef, useEffect, useImperativeHandle, @@ -14,16 +14,16 @@ import React, { import type { dh } from '@deephaven/jsapi-types'; import { Type as FilterType, - TypeValue as FilterTypeValue, + type TypeValue as FilterTypeValue, } from '@deephaven/filters'; import { Button, DateTimeInput, Select } from '@deephaven/components'; import { TableUtils } from '@deephaven/jsapi-utils'; import classNames from 'classnames'; import './GotoRow.scss'; import { nanoid } from 'nanoid'; -import IrisGridModel from './IrisGridModel'; +import type IrisGridModel from './IrisGridModel'; import IrisGridBottomBar from './IrisGridBottomBar'; -import { ColumnName } from './CommonTypes'; +import { type ColumnName } from './CommonTypes'; import { isIrisGridTableModelTemplate } from './IrisGridTableModelTemplate'; const DEFAULT_FORMAT_STRING = '###,##0'; diff --git a/packages/iris-grid/src/IrisGrid.test.tsx b/packages/iris-grid/src/IrisGrid.test.tsx index 24d58e721..f6709a5ac 100644 --- a/packages/iris-grid/src/IrisGrid.test.tsx +++ b/packages/iris-grid/src/IrisGrid.test.tsx @@ -1,9 +1,9 @@ -import React, { ReactElement } from 'react'; +import React, { type ReactElement } from 'react'; import TestRenderer from 'react-test-renderer'; import dh from '@deephaven/jsapi-shim'; -import { DateUtils, Settings } from '@deephaven/jsapi-utils'; -import { TestUtils } from '@deephaven/utils'; -import { TypeValue } from '@deephaven/filters'; +import { DateUtils, type Settings } from '@deephaven/jsapi-utils'; +import { TestUtils } from '@deephaven/test-utils'; +import { type TypeValue } from '@deephaven/filters'; import IrisGrid from './IrisGrid'; import IrisGridTestUtils from './IrisGridTestUtils'; diff --git a/packages/iris-grid/src/IrisGrid.tsx b/packages/iris-grid/src/IrisGrid.tsx index fb9b1ba1d..72c9df1b2 100644 --- a/packages/iris-grid/src/IrisGrid.tsx +++ b/packages/iris-grid/src/IrisGrid.tsx @@ -1,9 +1,9 @@ import React, { - ChangeEvent, + type ChangeEvent, Component, - CSSProperties, - ReactElement, - ReactNode, + type CSSProperties, + type ReactElement, + type ReactNode, } from 'react'; import memoize from 'memoizee'; import classNames from 'classnames'; @@ -20,30 +20,30 @@ import { Popper, ThemeExport, Tooltip, - ContextAction, - PopperOptions, - ReferenceObject, + type ContextAction, + type PopperOptions, + type ReferenceObject, Button, ContextActionUtils, - ResolvableContextAction, + type ResolvableContextAction, SlideTransition, } from '@deephaven/components'; import { Grid, - GridMetrics, - GridMouseHandler, + type GridMetrics, + type GridMouseHandler, GridRange, - GridRangeIndex, - GridThemeType, + type GridRangeIndex, + type GridThemeType, GridUtils, - KeyHandler, - ModelIndex, - ModelSizeMap, - MoveOperation, - VisibleIndex, - GridState, + type KeyHandler, + type ModelIndex, + type ModelSizeMap, + type MoveOperation, + type VisibleIndex, + type GridState, isEditableGridModel, - BoundedAxisRange, + type BoundedAxisRange, isExpandableGridModel, isDeletableGridModel, } from '@deephaven/grid'; @@ -70,13 +70,13 @@ import { Formatter, FormatterUtils, TableUtils, - FormattingRule, - ReverseType, - RowDataMap, - SortDirection, - DateTimeColumnFormatterOptions, - TableColumnFormat, - Settings, + type FormattingRule, + type ReverseType, + type RowDataMap, + type SortDirection, + type DateTimeColumnFormatterOptions, + type TableColumnFormat, + type Settings, isSortDirection, } from '@deephaven/jsapi-utils'; import { @@ -88,20 +88,21 @@ import { PromiseUtils, ValidationError, getOrThrow, + type EventT, } from '@deephaven/utils'; import { Type as FilterType, - TypeValue as FilterTypeValue, + type TypeValue as FilterTypeValue, } from '@deephaven/filters'; import throttle from 'lodash.throttle'; import debounce from 'lodash.debounce'; import clamp from 'lodash.clamp'; import { - FormattingRule as SidebarFormattingRule, + type FormattingRule as SidebarFormattingRule, getFormatColumns, } from './sidebar/conditional-formatting/ConditionalFormattingUtils'; import PendingDataBottomBar from './PendingDataBottomBar'; -import IrisGridCopyHandler, { CopyOperation } from './IrisGridCopyHandler'; +import IrisGridCopyHandler, { type CopyOperation } from './IrisGridCopyHandler'; import FilterInputField from './FilterInputField'; import { CopyCellKeyHandler, @@ -127,7 +128,10 @@ import ToastBottomBar from './ToastBottomBar'; import IrisGridMetricCalculator from './IrisGridMetricCalculator'; import IrisGridModelUpdater from './IrisGridModelUpdater'; import IrisGridRenderer from './IrisGridRenderer'; -import { createDefaultIrisGridTheme, IrisGridThemeType } from './IrisGridTheme'; +import { + createDefaultIrisGridTheme, + type IrisGridThemeType, +} from './IrisGridTheme'; import ColumnStatistics from './ColumnStatistics'; import './IrisGrid.scss'; import AdvancedFilterCreator from './AdvancedFilterCreator'; @@ -149,45 +153,45 @@ import CrossColumnSearch from './CrossColumnSearch'; import IrisGridModel from './IrisGridModel'; import { isPartitionedGridModel, - PartitionConfig, - PartitionedGridModel, + type PartitionConfig, + type PartitionedGridModel, } from './PartitionedGridModel'; import IrisGridPartitionSelector from './IrisGridPartitionSelector'; import SelectDistinctBuilder from './sidebar/SelectDistinctBuilder'; import AdvancedSettingsType from './sidebar/AdvancedSettingsType'; import AdvancedSettingsMenu, { - AdvancedSettingsMenuCallback, + type AdvancedSettingsMenuCallback, } from './sidebar/AdvancedSettingsMenu'; import SHORTCUTS from './IrisGridShortcuts'; import ConditionalFormattingMenu from './sidebar/conditional-formatting/ConditionalFormattingMenu'; import ConditionalFormatEditor from './sidebar/conditional-formatting/ConditionalFormatEditor'; import IrisGridCellOverflowModal from './IrisGridCellOverflowModal'; -import GotoRow, { GotoRowElement } from './GotoRow'; +import GotoRow, { type GotoRowElement } from './GotoRow'; import { - Aggregation, - AggregationSettings, + type Aggregation, + type AggregationSettings, } from './sidebar/aggregations/Aggregations'; -import { ChartBuilderSettings } from './sidebar/ChartBuilder'; +import { type ChartBuilderSettings } from './sidebar/ChartBuilder'; import AggregationOperation from './sidebar/aggregations/AggregationOperation'; -import { UIRollupConfig } from './sidebar/RollupRows'; +import { type UIRollupConfig } from './sidebar/RollupRows'; import { - Action, - AdvancedFilterMap, - AdvancedFilterOptions, - ColumnName, - InputFilter, - OperationMap, - OptionItem, - PendingDataErrorMap, - PendingDataMap, - QuickFilterMap, - ReadonlyAdvancedFilterMap, - ReadonlyAggregationMap, - ReadonlyQuickFilterMap, - UITotalsTableConfig, + type Action, + type AdvancedFilterMap, + type AdvancedFilterOptions, + type ColumnName, + type InputFilter, + type OperationMap, + type OptionItem, + type PendingDataErrorMap, + type PendingDataMap, + type QuickFilterMap, + type ReadonlyAdvancedFilterMap, + type ReadonlyAggregationMap, + type ReadonlyQuickFilterMap, + type UITotalsTableConfig, } from './CommonTypes'; -import ColumnHeaderGroup from './ColumnHeaderGroup'; +import type ColumnHeaderGroup from './ColumnHeaderGroup'; import { IrisGridThemeContext } from './IrisGridThemeProvider'; import { isMissingPartitionError } from './MissingPartitionError'; @@ -3103,7 +3107,7 @@ class IrisGrid extends Component { })); } - handleRequestFailed(event: Event): void { + handleRequestFailed(event: EventT): void { const { detail: error } = event as CustomEvent; log.error('request failed:', error); this.stopLoading(); diff --git a/packages/iris-grid/src/IrisGridCellRendererUtils.ts b/packages/iris-grid/src/IrisGridCellRendererUtils.ts index 2d22efb9a..af32e76fb 100644 --- a/packages/iris-grid/src/IrisGridCellRendererUtils.ts +++ b/packages/iris-grid/src/IrisGridCellRendererUtils.ts @@ -1,6 +1,6 @@ -import { BoxCoordinates, Coordinate } from '@deephaven/grid'; +import { type BoxCoordinates, type Coordinate } from '@deephaven/grid'; import { getIcon } from './IrisGridIcons'; -import { IrisGridRenderState } from './IrisGridRenderer'; +import { type IrisGridRenderState } from './IrisGridRenderer'; class IrisGridCellRendererUtils { static drawTreeMarker( diff --git a/packages/iris-grid/src/IrisGridCopyHandler.test.tsx b/packages/iris-grid/src/IrisGridCopyHandler.test.tsx index cb4bab3d9..f8ff1d47d 100644 --- a/packages/iris-grid/src/IrisGridCopyHandler.test.tsx +++ b/packages/iris-grid/src/IrisGridCopyHandler.test.tsx @@ -6,11 +6,11 @@ import { copyToClipboard } from '@deephaven/utils'; import dh from '@deephaven/jsapi-shim'; import IrisGridTestUtils from './IrisGridTestUtils'; import IrisGridCopyHandler, { - CopyOperation, - CopyHeaderOperation, - CopyRangesOperation, + type CopyOperation, + type CopyHeaderOperation, + type CopyRangesOperation, } from './IrisGridCopyHandler'; -import IrisGridProxyModel from './IrisGridProxyModel'; +import type IrisGridProxyModel from './IrisGridProxyModel'; jest.mock('@deephaven/utils', () => ({ ...jest.requireActual('@deephaven/utils'), diff --git a/packages/iris-grid/src/IrisGridCopyHandler.tsx b/packages/iris-grid/src/IrisGridCopyHandler.tsx index c52a1b0e5..6198aff47 100644 --- a/packages/iris-grid/src/IrisGridCopyHandler.tsx +++ b/packages/iris-grid/src/IrisGridCopyHandler.tsx @@ -4,11 +4,11 @@ import { Button, FadeTransition, LoadingSpinner } from '@deephaven/components'; import { GridRange, GridUtils, - ModelSizeMap, - MoveOperation, + type ModelSizeMap, + type MoveOperation, } from '@deephaven/grid'; import { - CancelablePromise, + type CancelablePromise, CanceledPromiseError, copyToClipboard, PromiseUtils, @@ -18,7 +18,7 @@ import type { dh } from '@deephaven/jsapi-types'; import IrisGridUtils from './IrisGridUtils'; import IrisGridBottomBar from './IrisGridBottomBar'; import './IrisGridCopyHandler.scss'; -import IrisGridModel from './IrisGridModel'; +import type IrisGridModel from './IrisGridModel'; const log = Log.module('IrisGridCopyHandler'); diff --git a/packages/iris-grid/src/IrisGridDataBarCellRenderer.ts b/packages/iris-grid/src/IrisGridDataBarCellRenderer.ts index d70239491..e6b7842de 100644 --- a/packages/iris-grid/src/IrisGridDataBarCellRenderer.ts +++ b/packages/iris-grid/src/IrisGridDataBarCellRenderer.ts @@ -1,10 +1,10 @@ /* eslint-disable class-methods-use-this */ import { - BoxCoordinates, - Coordinate, + type BoxCoordinates, + type Coordinate, DataBarCellRenderer, } from '@deephaven/grid'; -import { IrisGridRenderState } from './IrisGridRenderer'; +import { type IrisGridRenderState } from './IrisGridRenderer'; import IrisGridCellRendererUtils from './IrisGridCellRendererUtils'; class IrisGridDataBarCellRenderer extends DataBarCellRenderer { diff --git a/packages/iris-grid/src/IrisGridIcons.ts b/packages/iris-grid/src/IrisGridIcons.ts index 37c41de97..547792df0 100644 --- a/packages/iris-grid/src/IrisGridIcons.ts +++ b/packages/iris-grid/src/IrisGridIcons.ts @@ -4,7 +4,7 @@ import { vsTriangleRight, vsTriangleUp, vsLinkExternal, - IconDefinition, + type IconDefinition, } from '@deephaven/icons'; export type IconName = diff --git a/packages/iris-grid/src/IrisGridMetricCalculator.ts b/packages/iris-grid/src/IrisGridMetricCalculator.ts index b9e04f71e..efb242ea1 100644 --- a/packages/iris-grid/src/IrisGridMetricCalculator.ts +++ b/packages/iris-grid/src/IrisGridMetricCalculator.ts @@ -1,9 +1,9 @@ -import { GridMetricCalculator, ModelSizeMap } from '@deephaven/grid'; +import { GridMetricCalculator, type ModelSizeMap } from '@deephaven/grid'; import type { GridMetricState } from '@deephaven/grid'; import type { dh } from '@deephaven/jsapi-types'; import { TableUtils } from '@deephaven/jsapi-utils'; import type IrisGridModel from './IrisGridModel'; -import { IrisGridThemeType } from './IrisGridTheme'; +import { type IrisGridThemeType } from './IrisGridTheme'; export interface IrisGridMetricState extends GridMetricState { model: IrisGridModel; diff --git a/packages/iris-grid/src/IrisGridModel.test.ts b/packages/iris-grid/src/IrisGridModel.test.ts index 99da0da32..34bd4bf7f 100644 --- a/packages/iris-grid/src/IrisGridModel.test.ts +++ b/packages/iris-grid/src/IrisGridModel.test.ts @@ -9,7 +9,7 @@ import type { import { Formatter } from '@deephaven/jsapi-utils'; import IrisGridModel from './IrisGridModel'; import IrisGridTestUtils from './IrisGridTestUtils'; -import { UITotalsTableConfig } from './CommonTypes'; +import { type UITotalsTableConfig } from './CommonTypes'; jest.useFakeTimers(); diff --git a/packages/iris-grid/src/IrisGridModel.ts b/packages/iris-grid/src/IrisGridModel.ts index d23b95a16..83a7908f4 100644 --- a/packages/iris-grid/src/IrisGridModel.ts +++ b/packages/iris-grid/src/IrisGridModel.ts @@ -1,26 +1,26 @@ /* eslint-disable class-methods-use-this */ import type { Event, EventTarget } from 'event-target-shim'; import { - BoundedAxisRange, - DataBarGridModel, - DataBarOptions, - GridCell, + type BoundedAxisRange, + type DataBarGridModel, + type DataBarOptions, + type GridCell, GridModel, - GridRange, - GridThemeType, - ModelIndex, - MoveOperation, - VisibleIndex, + type GridRange, + type GridThemeType, + type ModelIndex, + type MoveOperation, + type VisibleIndex, } from '@deephaven/grid'; import type { dh as DhType } from '@deephaven/jsapi-types'; -import { Formatter } from '@deephaven/jsapi-utils'; +import { type Formatter } from '@deephaven/jsapi-utils'; import { - ColumnName, - UITotalsTableConfig, - PendingDataMap, - PendingDataErrorMap, + type ColumnName, + type UITotalsTableConfig, + type PendingDataMap, + type PendingDataErrorMap, } from './CommonTypes'; -import ColumnHeaderGroup from './ColumnHeaderGroup'; +import type ColumnHeaderGroup from './ColumnHeaderGroup'; export type DisplayColumn = DhType.Column & { /** diff --git a/packages/iris-grid/src/IrisGridModelFactory.ts b/packages/iris-grid/src/IrisGridModelFactory.ts index df2106f67..e7e52c26b 100644 --- a/packages/iris-grid/src/IrisGridModelFactory.ts +++ b/packages/iris-grid/src/IrisGridModelFactory.ts @@ -1,6 +1,6 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; import { Formatter, TableUtils } from '@deephaven/jsapi-utils'; -import IrisGridModel from './IrisGridModel'; +import type IrisGridModel from './IrisGridModel'; import IrisGridProxyModel from './IrisGridProxyModel'; /** diff --git a/packages/iris-grid/src/IrisGridModelUpdater.tsx b/packages/iris-grid/src/IrisGridModelUpdater.tsx index 844934046..2f4f1e19f 100644 --- a/packages/iris-grid/src/IrisGridModelUpdater.tsx +++ b/packages/iris-grid/src/IrisGridModelUpdater.tsx @@ -2,16 +2,24 @@ /* eslint-disable no-param-reassign */ import { useMemo } from 'react'; import type { dh } from '@deephaven/jsapi-types'; -import { ModelIndex, MoveOperation } from '@deephaven/grid'; -import { Formatter, ReverseType, TableUtils } from '@deephaven/jsapi-utils'; +import { type ModelIndex, type MoveOperation } from '@deephaven/grid'; +import { + type Formatter, + type ReverseType, + TableUtils, +} from '@deephaven/jsapi-utils'; import { EMPTY_ARRAY, EMPTY_MAP } from '@deephaven/utils'; import { useOnChange } from '@deephaven/react-hooks'; import IrisGridUtils from './IrisGridUtils'; -import { ColumnName, UITotalsTableConfig, PendingDataMap } from './CommonTypes'; -import IrisGridModel from './IrisGridModel'; +import { + type ColumnName, + type UITotalsTableConfig, + type PendingDataMap, +} from './CommonTypes'; +import type IrisGridModel from './IrisGridModel'; import type ColumnHeaderGroup from './ColumnHeaderGroup'; import { - PartitionConfig, + type PartitionConfig, isPartitionedGridModel, } from './PartitionedGridModel'; import { isIrisGridTreeTableModel } from './IrisGridTreeTableModel'; diff --git a/packages/iris-grid/src/IrisGridPartitionSelector.test.tsx b/packages/iris-grid/src/IrisGridPartitionSelector.test.tsx index 0e037dc65..eaf510367 100644 --- a/packages/iris-grid/src/IrisGridPartitionSelector.test.tsx +++ b/packages/iris-grid/src/IrisGridPartitionSelector.test.tsx @@ -4,7 +4,10 @@ import { ApiContext } from '@deephaven/jsapi-bootstrap'; import dh from '@deephaven/jsapi-shim'; import IrisGridPartitionSelector from './IrisGridPartitionSelector'; import IrisGridTestUtils from './IrisGridTestUtils'; -import { PartitionConfig, PartitionedGridModel } from './PartitionedGridModel'; +import { + type PartitionConfig, + type PartitionedGridModel, +} from './PartitionedGridModel'; const irisGridTestUtils = new IrisGridTestUtils(dh); diff --git a/packages/iris-grid/src/IrisGridPartitionSelector.tsx b/packages/iris-grid/src/IrisGridPartitionSelector.tsx index a8346ae3d..28b528a09 100644 --- a/packages/iris-grid/src/IrisGridPartitionSelector.tsx +++ b/packages/iris-grid/src/IrisGridPartitionSelector.tsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import memoizee from 'memoizee'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Button, ItemKey } from '@deephaven/components'; +import { Button, type ItemKey } from '@deephaven/components'; import { vsChevronRight, vsMerge, vsKey } from '@deephaven/icons'; import Log from '@deephaven/log'; import { Picker } from '@deephaven/jsapi-components'; @@ -9,7 +9,10 @@ import type { dh } from '@deephaven/jsapi-types'; import { TableUtils } from '@deephaven/jsapi-utils'; import { assertNotNull, Pending, PromiseUtils } from '@deephaven/utils'; import './IrisGridPartitionSelector.scss'; -import { PartitionConfig, PartitionedGridModel } from './PartitionedGridModel'; +import { + type PartitionConfig, + type PartitionedGridModel, +} from './PartitionedGridModel'; const log = Log.module('IrisGridPartitionSelector'); diff --git a/packages/iris-grid/src/IrisGridPartitionedTableModel.ts b/packages/iris-grid/src/IrisGridPartitionedTableModel.ts index 714070016..5657dd455 100644 --- a/packages/iris-grid/src/IrisGridPartitionedTableModel.ts +++ b/packages/iris-grid/src/IrisGridPartitionedTableModel.ts @@ -1,12 +1,12 @@ /* eslint class-methods-use-this: "off" */ import type { dh as DhType } from '@deephaven/jsapi-types'; import { Formatter } from '@deephaven/jsapi-utils'; -import { ColumnName } from './CommonTypes'; +import { type ColumnName } from './CommonTypes'; import EmptyIrisGridModel from './EmptyIrisGridModel'; import MissingPartitionError, { isMissingPartitionError, } from './MissingPartitionError'; -import { PartitionedGridModelProvider } from './PartitionedGridModel'; +import { type PartitionedGridModelProvider } from './PartitionedGridModel'; type PartitionedTableWithBaseTable = DhType.PartitionedTable & { getBaseTable: () => DhType.Table; diff --git a/packages/iris-grid/src/IrisGridProxyModel.test.ts b/packages/iris-grid/src/IrisGridProxyModel.test.ts index 8df4bb70f..293d6425f 100644 --- a/packages/iris-grid/src/IrisGridProxyModel.test.ts +++ b/packages/iris-grid/src/IrisGridProxyModel.test.ts @@ -1,6 +1,6 @@ import dh from '@deephaven/jsapi-shim'; -import IrisGridModel from './IrisGridModel'; -import IrisGridProxyModel from './IrisGridProxyModel'; +import type IrisGridModel from './IrisGridModel'; +import type IrisGridProxyModel from './IrisGridProxyModel'; import IrisGridTestUtils from './IrisGridTestUtils'; const irisGridTestUtils = new IrisGridTestUtils(dh); diff --git a/packages/iris-grid/src/IrisGridProxyModel.ts b/packages/iris-grid/src/IrisGridProxyModel.ts index acd900b66..823c76fd7 100644 --- a/packages/iris-grid/src/IrisGridProxyModel.ts +++ b/packages/iris-grid/src/IrisGridProxyModel.ts @@ -2,7 +2,7 @@ import deepEqual from 'fast-deep-equal'; import { Formatter, TableUtils } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; import { - CancelablePromise, + type CancelablePromise, EventShimCustomEvent, PromiseUtils, } from '@deephaven/utils'; @@ -11,11 +11,11 @@ import IrisGridTableModel from './IrisGridTableModel'; import IrisGridPartitionedTableModel from './IrisGridPartitionedTableModel'; import IrisGridTreeTableModel from './IrisGridTreeTableModel'; import IrisGridModel from './IrisGridModel'; -import { ColumnName } from './CommonTypes'; +import { type ColumnName } from './CommonTypes'; import { isIrisGridTableModelTemplate } from './IrisGridTableModelTemplate'; import { - PartitionConfig, - PartitionedGridModel, + type PartitionConfig, + type PartitionedGridModel, isPartitionedGridModelProvider, } from './PartitionedGridModel'; diff --git a/packages/iris-grid/src/IrisGridRenderer.ts b/packages/iris-grid/src/IrisGridRenderer.ts index 9d57c7ee6..3ea6dfcd4 100644 --- a/packages/iris-grid/src/IrisGridRenderer.ts +++ b/packages/iris-grid/src/IrisGridRenderer.ts @@ -1,27 +1,27 @@ /* eslint class-methods-use-this: "off" */ import { - BoundedAxisRange, - Coordinate, + type BoundedAxisRange, + type Coordinate, DEFAULT_FONT_WIDTH, - GridMetrics, - GridRangeIndex, + type GridMetrics, + type GridRangeIndex, GridRenderer, - GridRenderState, - GridThemeType, + type GridRenderState, + type GridThemeType, GridUtils, - VisibleIndex, + type VisibleIndex, } from '@deephaven/grid'; import type { dh } from '@deephaven/jsapi-types'; -import { TableUtils, ReverseType } from '@deephaven/jsapi-utils'; +import { TableUtils, type ReverseType } from '@deephaven/jsapi-utils'; import { assertNotNull, getOrThrow } from '@deephaven/utils'; import { - ReadonlyAdvancedFilterMap, - ReadonlyQuickFilterMap, - AdvancedFilter, - QuickFilter, + type ReadonlyAdvancedFilterMap, + type ReadonlyQuickFilterMap, + type AdvancedFilter, + type QuickFilter, } from './CommonTypes'; -import { IrisGridThemeType } from './IrisGridTheme'; -import IrisGridModel from './IrisGridModel'; +import { type IrisGridThemeType } from './IrisGridTheme'; +import type IrisGridModel from './IrisGridModel'; import IrisGridTextCellRenderer from './IrisGridTextCellRenderer'; import IrisGridDataBarCellRenderer from './IrisGridDataBarCellRenderer'; import { getIcon } from './IrisGridIcons'; diff --git a/packages/iris-grid/src/IrisGridTableModel.ts b/packages/iris-grid/src/IrisGridTableModel.ts index a75ce32db..3719f3486 100644 --- a/packages/iris-grid/src/IrisGridTableModel.ts +++ b/packages/iris-grid/src/IrisGridTableModel.ts @@ -1,6 +1,6 @@ /* eslint class-methods-use-this: "off" */ import memoize from 'memoize-one'; -import { GridRange, ModelIndex } from '@deephaven/grid'; +import { GridRange, type ModelIndex } from '@deephaven/grid'; import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; import { Formatter } from '@deephaven/jsapi-utils'; @@ -11,9 +11,13 @@ import { EMPTY_ARRAY, } from '@deephaven/utils'; import IrisGridModel from './IrisGridModel'; -import { ColumnName, UIRow, UITotalsTableConfig } from './CommonTypes'; +import { + type ColumnName, + type UIRow, + type UITotalsTableConfig, +} from './CommonTypes'; import IrisGridTableModelTemplate from './IrisGridTableModelTemplate'; -import { PartitionedGridModelProvider } from './PartitionedGridModel'; +import { type PartitionedGridModelProvider } from './PartitionedGridModel'; const log = Log.module('IrisGridTableModel'); diff --git a/packages/iris-grid/src/IrisGridTableModelTemplate.ts b/packages/iris-grid/src/IrisGridTableModelTemplate.ts index e57eb299d..51407547f 100644 --- a/packages/iris-grid/src/IrisGridTableModelTemplate.ts +++ b/packages/iris-grid/src/IrisGridTableModelTemplate.ts @@ -3,40 +3,41 @@ import memoize from 'memoize-one'; import throttle from 'lodash.throttle'; import { - DeletableGridModel, - EditableGridModel, - EditOperation, + type DeletableGridModel, + type EditableGridModel, + type EditOperation, GridRange, GridUtils, memoizeClear, - ModelIndex, - MoveOperation, - VisibleIndex, + type ModelIndex, + type MoveOperation, + type VisibleIndex, } from '@deephaven/grid'; import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; import { - CancelablePromise, + type CancelablePromise, EventShimCustomEvent, PromiseUtils, assertNotNull, } from '@deephaven/utils'; import { TableUtils, Formatter, FormatterUtils } from '@deephaven/jsapi-utils'; -import IrisGridModel, { DisplayColumn } from './IrisGridModel'; +import IrisGridModel, { type DisplayColumn } from './IrisGridModel'; import AggregationOperation from './sidebar/aggregations/AggregationOperation'; import IrisGridUtils from './IrisGridUtils'; import MissingKeyError from './MissingKeyError'; import { - ColumnName, - UITotalsTableConfig, - UIRow, - PendingDataMap, - CellData, - UIViewportData, - PendingDataErrorMap, + type ColumnName, + type UITotalsTableConfig, + type UIRow, + type PendingDataMap, + type CellData, + type UIViewportData, + type PendingDataErrorMap, } from './CommonTypes'; -import { IrisGridThemeType } from './IrisGridTheme'; -import ColumnHeaderGroup, { isColumnHeaderGroup } from './ColumnHeaderGroup'; +import { type IrisGridThemeType } from './IrisGridTheme'; +import type ColumnHeaderGroup from './ColumnHeaderGroup'; +import { isColumnHeaderGroup } from './ColumnHeaderGroup'; const log = Log.module('IrisGridTableModelTemplate'); diff --git a/packages/iris-grid/src/IrisGridTestUtils.ts b/packages/iris-grid/src/IrisGridTestUtils.ts index c36cc371c..bc83a1bb0 100644 --- a/packages/iris-grid/src/IrisGridTestUtils.ts +++ b/packages/iris-grid/src/IrisGridTestUtils.ts @@ -1,4 +1,4 @@ -import { GridRangeIndex, ModelSizeMap } from '@deephaven/grid'; +import { type GridRangeIndex, type ModelSizeMap } from '@deephaven/grid'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { Formatter } from '@deephaven/jsapi-utils'; import IrisGridProxyModel from './IrisGridProxyModel'; diff --git a/packages/iris-grid/src/IrisGridTextCellRenderer.ts b/packages/iris-grid/src/IrisGridTextCellRenderer.ts index 09dc59deb..143dd73ba 100644 --- a/packages/iris-grid/src/IrisGridTextCellRenderer.ts +++ b/packages/iris-grid/src/IrisGridTextCellRenderer.ts @@ -1,16 +1,16 @@ /* eslint-disable class-methods-use-this */ import { - BoxCoordinates, - Coordinate, + type BoxCoordinates, + type Coordinate, DEFAULT_FONT_WIDTH, getOrThrow, - GridMetrics, + type GridMetrics, GridUtils, TextCellRenderer, - VisibleIndex, + type VisibleIndex, } from '@deephaven/grid'; import { TableUtils } from '@deephaven/jsapi-utils'; -import { IrisGridRenderState } from './IrisGridRenderer'; +import { type IrisGridRenderState } from './IrisGridRenderer'; import IrisGridCellRendererUtils from './IrisGridCellRendererUtils'; import type { IrisGridThemeType } from './IrisGridTheme'; diff --git a/packages/iris-grid/src/IrisGridTheme.ts b/packages/iris-grid/src/IrisGridTheme.ts index a51c52a2e..eff77059e 100644 --- a/packages/iris-grid/src/IrisGridTheme.ts +++ b/packages/iris-grid/src/IrisGridTheme.ts @@ -5,7 +5,10 @@ import { import type { GridThemeType } from '@deephaven/grid'; import { GridTheme } from '@deephaven/grid'; import Log from '@deephaven/log'; -import { GridColor, NullableGridColor } from '@deephaven/grid/src/GridTheme'; +import { + type GridColor, + type NullableGridColor, +} from '@deephaven/grid/src/GridTheme'; import { ColorUtils } from '@deephaven/utils'; import IrisGridThemeRaw from './IrisGridTheme.module.scss'; diff --git a/packages/iris-grid/src/IrisGridThemeProvider.tsx b/packages/iris-grid/src/IrisGridThemeProvider.tsx index 117468eca..22d7763e2 100644 --- a/packages/iris-grid/src/IrisGridThemeProvider.tsx +++ b/packages/iris-grid/src/IrisGridThemeProvider.tsx @@ -1,6 +1,9 @@ import { useTheme } from '@deephaven/components'; -import { createContext, ReactNode, useMemo } from 'react'; -import { createDefaultIrisGridTheme, IrisGridThemeType } from './IrisGridTheme'; +import { createContext, type ReactNode, useMemo } from 'react'; +import { + createDefaultIrisGridTheme, + type IrisGridThemeType, +} from './IrisGridTheme'; /** * The context value for the IrisGridThemeProvider. diff --git a/packages/iris-grid/src/IrisGridTreeTableModel.ts b/packages/iris-grid/src/IrisGridTreeTableModel.ts index c1a8f3a9d..eb2c00b5e 100644 --- a/packages/iris-grid/src/IrisGridTreeTableModel.ts +++ b/packages/iris-grid/src/IrisGridTreeTableModel.ts @@ -1,18 +1,18 @@ /* eslint class-methods-use-this: "off" */ import memoize from 'memoize-one'; import { - BoundedAxisRange, - GridCell, + type BoundedAxisRange, + type GridCell, GridRange, - ModelIndex, + type ModelIndex, } from '@deephaven/grid'; import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; import { Formatter, TableUtils } from '@deephaven/jsapi-utils'; import { assertNotNull, EventShimCustomEvent } from '@deephaven/utils'; -import { UIRow, ColumnName } from './CommonTypes'; +import { type UIRow, type ColumnName } from './CommonTypes'; import IrisGridTableModelTemplate from './IrisGridTableModelTemplate'; -import IrisGridModel, { DisplayColumn } from './IrisGridModel'; +import IrisGridModel, { type DisplayColumn } from './IrisGridModel'; const log = Log.module('IrisGridTreeTableModel'); diff --git a/packages/iris-grid/src/IrisGridUtils.test.ts b/packages/iris-grid/src/IrisGridUtils.test.ts index 5402d55b3..5e1083122 100644 --- a/packages/iris-grid/src/IrisGridUtils.test.ts +++ b/packages/iris-grid/src/IrisGridUtils.test.ts @@ -1,15 +1,15 @@ import deepEqual from 'deep-equal'; -import { GridUtils, GridRange, MoveOperation } from '@deephaven/grid'; +import { GridUtils, GridRange, type MoveOperation } from '@deephaven/grid'; import dh from '@deephaven/jsapi-shim'; import type { Column, Table, Sort } from '@deephaven/jsapi-types'; -import { TypeValue as FilterTypeValue } from '@deephaven/filters'; +import { type TypeValue as FilterTypeValue } from '@deephaven/filters'; import { DateUtils } from '@deephaven/jsapi-utils'; import type { AdvancedFilter } from './CommonTypes'; -import { FilterData } from './IrisGrid'; +import { type FilterData } from './IrisGrid'; import IrisGridTestUtils from './IrisGridTestUtils'; import IrisGridUtils, { - DehydratedSort, - LegacyDehydratedSort, + type DehydratedSort, + type LegacyDehydratedSort, } from './IrisGridUtils'; const irisGridUtils = new IrisGridUtils(dh); diff --git a/packages/iris-grid/src/IrisGridUtils.ts b/packages/iris-grid/src/IrisGridUtils.ts index 539ee7341..2bc9c079b 100644 --- a/packages/iris-grid/src/IrisGridUtils.ts +++ b/packages/iris-grid/src/IrisGridUtils.ts @@ -1,19 +1,19 @@ import { - GridMetrics, - GridRange, + type GridMetrics, + type GridRange, GridUtils, - ModelIndex, - ModelSizeMap, - MoveOperation, - VisibleIndex, + type ModelIndex, + type ModelSizeMap, + type MoveOperation, + type VisibleIndex, } from '@deephaven/grid'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { DateUtils, TableUtils, - ReverseType, - SortDirection, - FormattingRule, + type ReverseType, + type SortDirection, + type FormattingRule, } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; import { @@ -24,27 +24,31 @@ import { } from '@deephaven/utils'; import AggregationUtils from './sidebar/aggregations/AggregationUtils'; import AggregationOperation from './sidebar/aggregations/AggregationOperation'; -import { FilterData, IrisGridProps, IrisGridState } from './IrisGrid'; import { - ColumnName, - ReadonlyAdvancedFilterMap, - ReadonlyQuickFilterMap, - InputFilter, - CellData, - PendingDataMap, - UIRow, - AdvancedFilterOptions, + type FilterData, + type IrisGridProps, + type IrisGridState, +} from './IrisGrid'; +import { + type ColumnName, + type ReadonlyAdvancedFilterMap, + type ReadonlyQuickFilterMap, + type InputFilter, + type CellData, + type PendingDataMap, + type UIRow, + type AdvancedFilterOptions, } from './CommonTypes'; -import { UIRollupConfig } from './sidebar/RollupRows'; -import { AggregationSettings } from './sidebar/aggregations/Aggregations'; -import { FormattingRule as SidebarFormattingRule } from './sidebar/conditional-formatting/ConditionalFormattingUtils'; -import IrisGridModel from './IrisGridModel'; +import { type UIRollupConfig } from './sidebar/RollupRows'; +import { type AggregationSettings } from './sidebar/aggregations/Aggregations'; +import { type FormattingRule as SidebarFormattingRule } from './sidebar/conditional-formatting/ConditionalFormattingUtils'; +import type IrisGridModel from './IrisGridModel'; import type AdvancedSettingsType from './sidebar/AdvancedSettingsType'; import AdvancedSettings from './sidebar/AdvancedSettings'; import ColumnHeaderGroup from './ColumnHeaderGroup'; import { isPartitionedGridModelProvider, - PartitionConfig, + type PartitionConfig, } from './PartitionedGridModel'; const log = Log.module('IrisGridUtils'); diff --git a/packages/iris-grid/src/MissingKeyError.ts b/packages/iris-grid/src/MissingKeyError.ts index 670a8adbc..d3468e99e 100644 --- a/packages/iris-grid/src/MissingKeyError.ts +++ b/packages/iris-grid/src/MissingKeyError.ts @@ -1,5 +1,5 @@ -import { ModelIndex } from '@deephaven/grid'; -import { ColumnName } from './CommonTypes'; +import { type ModelIndex } from '@deephaven/grid'; +import { type ColumnName } from './CommonTypes'; class MissingKeyError extends Error { isMissingKey = true; diff --git a/packages/iris-grid/src/PartitionedGridModel.ts b/packages/iris-grid/src/PartitionedGridModel.ts index 5a188088f..ed5fa1399 100644 --- a/packages/iris-grid/src/PartitionedGridModel.ts +++ b/packages/iris-grid/src/PartitionedGridModel.ts @@ -1,5 +1,5 @@ import type { dh } from '@deephaven/jsapi-types'; -import IrisGridModel from './IrisGridModel'; +import type IrisGridModel from './IrisGridModel'; export function isPartitionedGridModelProvider( model: IrisGridModel diff --git a/packages/iris-grid/src/PendingDataBottomBar.tsx b/packages/iris-grid/src/PendingDataBottomBar.tsx index 5efa55a74..be671fb93 100644 --- a/packages/iris-grid/src/PendingDataBottomBar.tsx +++ b/packages/iris-grid/src/PendingDataBottomBar.tsx @@ -5,7 +5,7 @@ import { Button, LoadingSpinner } from '@deephaven/components'; import { usePrevious } from '@deephaven/react-hooks'; import IrisGridBottomBar from './IrisGridBottomBar'; import './PendingDataBottomBar.scss'; -import { PendingDataErrorMap, PendingDataMap } from './CommonTypes'; +import { type PendingDataErrorMap, type PendingDataMap } from './CommonTypes'; const HIDE_TIMEOUT = 3000; diff --git a/packages/iris-grid/src/format-context-menus/DateTimeFormatContextMenu.ts b/packages/iris-grid/src/format-context-menus/DateTimeFormatContextMenu.ts index 64ca3b0fa..720981c29 100644 --- a/packages/iris-grid/src/format-context-menus/DateTimeFormatContextMenu.ts +++ b/packages/iris-grid/src/format-context-menus/DateTimeFormatContextMenu.ts @@ -1,11 +1,11 @@ import { DateTimeColumnFormatter, - Formatter, - TableColumnFormat, + type Formatter, + type TableColumnFormat, TableUtils, } from '@deephaven/jsapi-utils'; import FormatContextMenuUtils, { - FormatContextMenuOption, + type FormatContextMenuOption, } from './FormatContextMenuUtils'; class DateTimeFormatContextMenu { diff --git a/packages/iris-grid/src/format-context-menus/DecimalFormatContextMenu.ts b/packages/iris-grid/src/format-context-menus/DecimalFormatContextMenu.ts index de525b8e9..c7b5daf09 100644 --- a/packages/iris-grid/src/format-context-menus/DecimalFormatContextMenu.ts +++ b/packages/iris-grid/src/format-context-menus/DecimalFormatContextMenu.ts @@ -1,10 +1,10 @@ import { - DecimalColumnFormat, + type DecimalColumnFormat, DecimalColumnFormatter, } from '@deephaven/jsapi-utils'; import type { dh as DhType } from '@deephaven/jsapi-types'; import FormatContextMenuUtils, { - FormatContextMenuOption, + type FormatContextMenuOption, } from './FormatContextMenuUtils'; class DecimalFormatContextMenu { diff --git a/packages/iris-grid/src/format-context-menus/FormatContextMenuUtils.tsx b/packages/iris-grid/src/format-context-menus/FormatContextMenuUtils.tsx index 00bd1678e..f068c606c 100644 --- a/packages/iris-grid/src/format-context-menus/FormatContextMenuUtils.tsx +++ b/packages/iris-grid/src/format-context-menus/FormatContextMenuUtils.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { - TableColumnFormat, + type TableColumnFormat, TableColumnFormatter, } from '@deephaven/jsapi-utils'; import CustomFormatAction from './CustomFormatAction'; diff --git a/packages/iris-grid/src/format-context-menus/IntegerFormatContextMenu.ts b/packages/iris-grid/src/format-context-menus/IntegerFormatContextMenu.ts index 31889be50..4d2552f22 100644 --- a/packages/iris-grid/src/format-context-menus/IntegerFormatContextMenu.ts +++ b/packages/iris-grid/src/format-context-menus/IntegerFormatContextMenu.ts @@ -1,10 +1,10 @@ import { - IntegerColumnFormat, + type IntegerColumnFormat, IntegerColumnFormatter, } from '@deephaven/jsapi-utils'; import type { dh as DhType } from '@deephaven/jsapi-types'; import FormatContextMenuUtils, { - FormatContextMenuOption, + type FormatContextMenuOption, } from './FormatContextMenuUtils'; class IntegerFormatContextMenu { diff --git a/packages/iris-grid/src/key-handlers/ClearFilterKeyHandler.ts b/packages/iris-grid/src/key-handlers/ClearFilterKeyHandler.ts index 9952febc5..65bd79b2e 100644 --- a/packages/iris-grid/src/key-handlers/ClearFilterKeyHandler.ts +++ b/packages/iris-grid/src/key-handlers/ClearFilterKeyHandler.ts @@ -1,4 +1,4 @@ -import { KeyboardEvent } from 'react'; +import { type KeyboardEvent } from 'react'; import { KeyHandler } from '@deephaven/grid'; import type IrisGrid from '../IrisGrid'; import IrisGridShortcuts from '../IrisGridShortcuts'; diff --git a/packages/iris-grid/src/key-handlers/CopyCellKeyHandler.ts b/packages/iris-grid/src/key-handlers/CopyCellKeyHandler.ts index f5cf18589..8f1d18570 100644 --- a/packages/iris-grid/src/key-handlers/CopyCellKeyHandler.ts +++ b/packages/iris-grid/src/key-handlers/CopyCellKeyHandler.ts @@ -1,4 +1,4 @@ -import { KeyboardEvent } from 'react'; +import { type KeyboardEvent } from 'react'; import { KeyHandler } from '@deephaven/grid'; import { ContextActionUtils } from '@deephaven/components'; import type { Grid } from '@deephaven/grid'; diff --git a/packages/iris-grid/src/key-handlers/CopyKeyHandler.ts b/packages/iris-grid/src/key-handlers/CopyKeyHandler.ts index f8365fb37..d255b7f08 100644 --- a/packages/iris-grid/src/key-handlers/CopyKeyHandler.ts +++ b/packages/iris-grid/src/key-handlers/CopyKeyHandler.ts @@ -1,5 +1,5 @@ /* eslint class-methods-use-this: "off" */ -import { KeyboardEvent } from 'react'; +import { type KeyboardEvent } from 'react'; import { ContextActionUtils } from '@deephaven/components'; import { KeyHandler } from '@deephaven/grid'; import type IrisGrid from '../IrisGrid'; diff --git a/packages/iris-grid/src/key-handlers/ReverseKeyHandler.ts b/packages/iris-grid/src/key-handlers/ReverseKeyHandler.ts index bb3cc1047..a8e003138 100644 --- a/packages/iris-grid/src/key-handlers/ReverseKeyHandler.ts +++ b/packages/iris-grid/src/key-handlers/ReverseKeyHandler.ts @@ -1,4 +1,4 @@ -import { KeyboardEvent } from 'react'; +import { type KeyboardEvent } from 'react'; import { KeyHandler } from '@deephaven/grid'; import { TableUtils } from '@deephaven/jsapi-utils'; import type IrisGrid from '../IrisGrid'; diff --git a/packages/iris-grid/src/mousehandlers/IrisGridCellOverflowMouseHandler.ts b/packages/iris-grid/src/mousehandlers/IrisGridCellOverflowMouseHandler.ts index cf24496ca..042c94760 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridCellOverflowMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/IrisGridCellOverflowMouseHandler.ts @@ -1,11 +1,11 @@ import { - GridPoint, + type GridPoint, GridMouseHandler, - EventHandlerResult, + type EventHandlerResult, } from '@deephaven/grid'; import deepEqual from 'fast-deep-equal'; import type IrisGrid from '../IrisGrid'; -import { IrisGridRenderState } from '../IrisGridRenderer'; +import { type IrisGridRenderState } from '../IrisGridRenderer'; /** * Handles cursor and click action for cell overflow button diff --git a/packages/iris-grid/src/mousehandlers/IrisGridColumnSelectMouseHandler.ts b/packages/iris-grid/src/mousehandlers/IrisGridColumnSelectMouseHandler.ts index c0fc76465..e9c29363c 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridColumnSelectMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/IrisGridColumnSelectMouseHandler.ts @@ -1,12 +1,12 @@ /* eslint class-methods-use-this: "off" */ import { GridMouseHandler, - GridPoint, - EventHandlerResult, + type GridPoint, + type EventHandlerResult, } from '@deephaven/grid'; import type { dh } from '@deephaven/jsapi-types'; import type IrisGrid from '../IrisGrid'; -import { DisplayColumn } from '../IrisGridModel'; +import { type DisplayColumn } from '../IrisGridModel'; /** * Handles interaction with tables when the Linker tool is active diff --git a/packages/iris-grid/src/mousehandlers/IrisGridColumnTooltipMouseHandler.ts b/packages/iris-grid/src/mousehandlers/IrisGridColumnTooltipMouseHandler.ts index 4b753a2a5..e64ccd29c 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridColumnTooltipMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/IrisGridColumnTooltipMouseHandler.ts @@ -1,10 +1,10 @@ /* eslint class-methods-use-this: "off" */ import { GridMouseHandler, - GridPoint, - EventHandlerResult, - Grid, - GridMouseEvent, + type GridPoint, + type EventHandlerResult, + type Grid, + type GridMouseEvent, } from '@deephaven/grid'; import type IrisGrid from '../IrisGrid'; diff --git a/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx b/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx index 728ee8689..fbc817192 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx +++ b/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx @@ -6,36 +6,36 @@ import { vsRemove, vsCheck, vsFilter, - IconDefinition, + type IconDefinition, } from '@deephaven/icons'; import debounce from 'lodash.debounce'; import { - ContextAction, + type ContextAction, ContextActions, ContextActionUtils, GLOBAL_SHORTCUTS, - ResolvableContextAction, + type ResolvableContextAction, } from '@deephaven/components'; import { - EventHandlerResult, - Grid, + type EventHandlerResult, + type Grid, GridMouseHandler, - GridPoint, + type GridPoint, GridRange, GridRenderer, isDeletableGridModel, isEditableGridModel, isExpandableGridModel, - ModelIndex, + type ModelIndex, } from '@deephaven/grid'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { TableColumnFormatter, DateTimeColumnFormatter, TableUtils, - TableColumnFormat, - IntegerColumnFormat, - SortDirection, + type TableColumnFormat, + type IntegerColumnFormat, + type SortDirection, } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; import type { DebouncedFunc } from 'lodash'; @@ -53,8 +53,8 @@ import { } from '../format-context-menus'; import './IrisGridContextMenuHandler.scss'; import SHORTCUTS from '../IrisGridShortcuts'; -import IrisGrid from '../IrisGrid'; -import { QuickFilter } from '../CommonTypes'; +import type IrisGrid from '../IrisGrid'; +import { type QuickFilter } from '../CommonTypes'; import { isPartitionedGridModel } from '../PartitionedGridModel'; const log = Log.module('IrisGridContextMenuHandler'); diff --git a/packages/iris-grid/src/mousehandlers/IrisGridCopyCellMouseHandler.ts b/packages/iris-grid/src/mousehandlers/IrisGridCopyCellMouseHandler.ts index 8359dd639..9b542ce5f 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridCopyCellMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/IrisGridCopyCellMouseHandler.ts @@ -1,13 +1,13 @@ import { - Grid, + type Grid, GridMouseHandler, - GridPoint, - EventHandlerResult, - GridMouseEvent, + type GridPoint, + type EventHandlerResult, + type GridMouseEvent, GridRange, } from '@deephaven/grid'; import { ContextActionUtils } from '@deephaven/components'; -import IrisGrid from '../IrisGrid'; +import type IrisGrid from '../IrisGrid'; class IrisGridCopyCellMouseHandler extends GridMouseHandler { private irisGrid: IrisGrid; diff --git a/packages/iris-grid/src/mousehandlers/IrisGridDataSelectMouseHandler.ts b/packages/iris-grid/src/mousehandlers/IrisGridDataSelectMouseHandler.ts index 7b1f8e9b0..2a6eb80ae 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridDataSelectMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/IrisGridDataSelectMouseHandler.ts @@ -2,8 +2,8 @@ import { type Grid, GridMouseHandler, - GridPoint, - EventHandlerResult, + type GridPoint, + type EventHandlerResult, } from '@deephaven/grid'; import type IrisGrid from '../IrisGrid'; diff --git a/packages/iris-grid/src/mousehandlers/IrisGridFilterMouseHandler.ts b/packages/iris-grid/src/mousehandlers/IrisGridFilterMouseHandler.ts index 2e4402c32..7feaf44e3 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridFilterMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/IrisGridFilterMouseHandler.ts @@ -1,8 +1,8 @@ /* eslint class-methods-use-this: "off" */ import { GridMouseHandler, - GridPoint, - EventHandlerResult, + type GridPoint, + type EventHandlerResult, } from '@deephaven/grid'; import type IrisGrid from '../IrisGrid'; diff --git a/packages/iris-grid/src/mousehandlers/IrisGridPartitionedTableMouseHandler.ts b/packages/iris-grid/src/mousehandlers/IrisGridPartitionedTableMouseHandler.ts index aec2af84a..79d6a87d6 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridPartitionedTableMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/IrisGridPartitionedTableMouseHandler.ts @@ -2,8 +2,8 @@ import { type Grid, GridMouseHandler, - GridPoint, - EventHandlerResult, + type GridPoint, + type EventHandlerResult, } from '@deephaven/grid'; import type IrisGrid from '../IrisGrid'; import { isPartitionedGridModel } from '../PartitionedGridModel'; diff --git a/packages/iris-grid/src/mousehandlers/IrisGridRowTreeMouseHandler.ts b/packages/iris-grid/src/mousehandlers/IrisGridRowTreeMouseHandler.ts index 2dd8ba708..3c17df7a9 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridRowTreeMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/IrisGridRowTreeMouseHandler.ts @@ -1,8 +1,8 @@ import { - EventHandlerResult, - Grid, + type EventHandlerResult, + type Grid, GridMouseHandler, - GridPoint, + type GridPoint, GridRowTreeMouseHandler, isExpandableGridModel, } from '@deephaven/grid'; diff --git a/packages/iris-grid/src/mousehandlers/IrisGridSortMouseHandler.ts b/packages/iris-grid/src/mousehandlers/IrisGridSortMouseHandler.ts index c7bd60825..bcd8f830f 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridSortMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/IrisGridSortMouseHandler.ts @@ -1,12 +1,12 @@ /* eslint class-methods-use-this: "off" */ import { ContextActionUtils } from '@deephaven/components'; import { - Grid, - GridMouseEvent, + type Grid, + type GridMouseEvent, GridMouseHandler, - GridPoint, - GridRangeIndex, - EventHandlerResult, + type GridPoint, + type GridRangeIndex, + type EventHandlerResult, } from '@deephaven/grid'; import type IrisGrid from '../IrisGrid'; diff --git a/packages/iris-grid/src/mousehandlers/IrisGridTokenMouseHandler.ts b/packages/iris-grid/src/mousehandlers/IrisGridTokenMouseHandler.ts index 3c62248c6..b8d4a4b7f 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridTokenMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/IrisGridTokenMouseHandler.ts @@ -1,16 +1,16 @@ import { - EventHandlerResult, + type EventHandlerResult, getOrThrow, - Grid, + type Grid, GridMouseHandler, - GridPoint, + type GridPoint, GridUtils, isLinkToken, - TokenBox, + type TokenBox, isTokenBoxCellRenderer, } from '@deephaven/grid'; import deepEqual from 'fast-deep-equal'; -import IrisGrid from '../IrisGrid'; +import type IrisGrid from '../IrisGrid'; class IrisGridTokenMouseHandler extends GridMouseHandler { private irisGrid: IrisGrid; diff --git a/packages/iris-grid/src/mousehandlers/PendingMouseHandler.ts b/packages/iris-grid/src/mousehandlers/PendingMouseHandler.ts index eb7059181..3681ad1e3 100644 --- a/packages/iris-grid/src/mousehandlers/PendingMouseHandler.ts +++ b/packages/iris-grid/src/mousehandlers/PendingMouseHandler.ts @@ -1,14 +1,14 @@ /* eslint class-methods-use-this: "off" */ import { - Grid, + type Grid, GridMouseHandler, - GridPoint, + type GridPoint, GridUtils, - GridWheelEvent, + type GridWheelEvent, isEditableGridModel, } from '@deephaven/grid'; import { assertNotNull } from '@deephaven/utils'; -import IrisGrid from '../IrisGrid'; +import type IrisGrid from '../IrisGrid'; /** * Handles sending data selected via double click diff --git a/packages/iris-grid/src/sidebar/AdvancedSettingsMenu.tsx b/packages/iris-grid/src/sidebar/AdvancedSettingsMenu.tsx index 68089731d..782334039 100644 --- a/packages/iris-grid/src/sidebar/AdvancedSettingsMenu.tsx +++ b/packages/iris-grid/src/sidebar/AdvancedSettingsMenu.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Menu, SwitchMenuItemDef } from '@deephaven/components'; +import { Menu, type SwitchMenuItemDef } from '@deephaven/components'; import AdvancedSettingsType from './AdvancedSettingsType'; export type AdvancedSettingsMenuCallback = ( diff --git a/packages/iris-grid/src/sidebar/ChartBuilder.tsx b/packages/iris-grid/src/sidebar/ChartBuilder.tsx index 887f84f34..47e8ecf3c 100644 --- a/packages/iris-grid/src/sidebar/ChartBuilder.tsx +++ b/packages/iris-grid/src/sidebar/ChartBuilder.tsx @@ -22,7 +22,7 @@ import { ScatterIcon, } from './icons'; import './ChartBuilder.scss'; -import IrisGridModel from '../IrisGridModel'; +import type IrisGridModel from '../IrisGridModel'; const log = Log.module('ChartBuilder'); diff --git a/packages/iris-grid/src/sidebar/CustomColumnBuilder.test.tsx b/packages/iris-grid/src/sidebar/CustomColumnBuilder.test.tsx index 8586920df..961093345 100644 --- a/packages/iris-grid/src/sidebar/CustomColumnBuilder.test.tsx +++ b/packages/iris-grid/src/sidebar/CustomColumnBuilder.test.tsx @@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event'; import { EventShimCustomEvent } from '@deephaven/utils'; import dh from '@deephaven/jsapi-shim'; import CustomColumnBuilder, { - CustomColumnBuilderProps, + type CustomColumnBuilderProps, } from './CustomColumnBuilder'; import IrisGridTestUtils from '../IrisGridTestUtils'; import IrisGridModel from '../IrisGridModel'; diff --git a/packages/iris-grid/src/sidebar/CustomColumnBuilder.tsx b/packages/iris-grid/src/sidebar/CustomColumnBuilder.tsx index 5f302ca42..a9c405211 100644 --- a/packages/iris-grid/src/sidebar/CustomColumnBuilder.tsx +++ b/packages/iris-grid/src/sidebar/CustomColumnBuilder.tsx @@ -1,12 +1,16 @@ -import React, { Component, ReactElement } from 'react'; +import React, { Component, type ReactElement } from 'react'; import classNames from 'classnames'; import { nanoid } from 'nanoid'; import memoize from 'memoize-one'; -import { DragDropContext, Droppable, DropResult } from 'react-beautiful-dnd'; +import { + DragDropContext, + Droppable, + type DropResult, +} from 'react-beautiful-dnd'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button, DragUtils, LoadingSpinner } from '@deephaven/components'; import { dhNewCircleLargeFilled, vsWarning, vsPass } from '@deephaven/icons'; -import { DbNameValidator } from '@deephaven/utils'; +import { DbNameValidator, type EventT } from '@deephaven/utils'; import CustomColumnInput from './CustomColumnInput'; import './CustomColumnBuilder.scss'; import IrisGridModel from '../IrisGridModel'; @@ -211,7 +215,7 @@ class CustomColumnBuilder extends Component< ); } - handleRequestFailed(event: Event): void { + handleRequestFailed(event: EventT): void { const customEvent = event as CustomEvent; const { isCustomColumnApplying } = this.state; if (!isCustomColumnApplying) { diff --git a/packages/iris-grid/src/sidebar/CustomColumnInput.test.tsx b/packages/iris-grid/src/sidebar/CustomColumnInput.test.tsx index c6f7cce05..25bb06f0b 100644 --- a/packages/iris-grid/src/sidebar/CustomColumnInput.test.tsx +++ b/packages/iris-grid/src/sidebar/CustomColumnInput.test.tsx @@ -2,7 +2,9 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; import { DragDropContext, Droppable } from 'react-beautiful-dnd'; -import CustomColumnInput, { CustomColumnInputProps } from './CustomColumnInput'; +import CustomColumnInput, { + type CustomColumnInputProps, +} from './CustomColumnInput'; const TEST_ID = 'TEST_ID'; diff --git a/packages/iris-grid/src/sidebar/CustomColumnInput.tsx b/packages/iris-grid/src/sidebar/CustomColumnInput.tsx index d15817e5b..0d3cb9173 100644 --- a/packages/iris-grid/src/sidebar/CustomColumnInput.tsx +++ b/packages/iris-grid/src/sidebar/CustomColumnInput.tsx @@ -5,7 +5,7 @@ import { Button } from '@deephaven/components'; import { vsTrash, vsGripper } from '@deephaven/icons'; import { DbNameValidator } from '@deephaven/utils'; import InputEditor from './InputEditor'; -import { CustomColumnKey } from './CustomColumnBuilder'; +import { type CustomColumnKey } from './CustomColumnBuilder'; export interface CustomColumnInputProps { eventKey: string; diff --git a/packages/iris-grid/src/sidebar/InputEditor.tsx b/packages/iris-grid/src/sidebar/InputEditor.tsx index 68fe812b3..ae10feba0 100644 --- a/packages/iris-grid/src/sidebar/InputEditor.tsx +++ b/packages/iris-grid/src/sidebar/InputEditor.tsx @@ -1,4 +1,4 @@ -import React, { Component, ReactElement } from 'react'; +import React, { Component, type ReactElement } from 'react'; import * as monaco from 'monaco-editor'; import classNames from 'classnames'; import './InputEditor.scss'; diff --git a/packages/iris-grid/src/sidebar/RollupRows.tsx b/packages/iris-grid/src/sidebar/RollupRows.tsx index b5c9ac5ae..d31f5e554 100644 --- a/packages/iris-grid/src/sidebar/RollupRows.tsx +++ b/packages/iris-grid/src/sidebar/RollupRows.tsx @@ -1,13 +1,18 @@ /* eslint-disable jsx-a11y/click-events-have-key-events */ -import React, { ChangeEvent, Component, ReactElement, RefObject } from 'react'; +import React, { + type ChangeEvent, + Component, + type ReactElement, + type RefObject, +} from 'react'; import classNames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { DragDropContext, - DraggableLocation, - DragStart, + type DraggableLocation, + type DragStart, Droppable, - DropResult, + type DropResult, } from 'react-beautiful-dnd'; import { Checkbox, @@ -15,20 +20,20 @@ import { DragUtils, SearchInput, Tooltip, - Range, - RenderItemProps, + type Range, + type RenderItemProps, Button, } from '@deephaven/components'; import { vsTrash, dhSortAlphaDown, dhSortAlphaUp } from '@deephaven/icons'; -import { TableUtils, SortDirection } from '@deephaven/jsapi-utils'; +import { TableUtils, type SortDirection } from '@deephaven/jsapi-utils'; import memoize from 'memoizee'; import debounce from 'lodash.debounce'; import Log from '@deephaven/log'; import { assertNotNull } from '@deephaven/utils'; import './RollupRows.scss'; import type { dh } from '@deephaven/jsapi-types'; -import IrisGridModel from '../IrisGridModel'; -import { ColumnName } from '../CommonTypes'; +import type IrisGridModel from '../IrisGridModel'; +import { type ColumnName } from '../CommonTypes'; const log = Log.module('RollupRows'); const DEBOUNCE_SEARCH = 150; diff --git a/packages/iris-grid/src/sidebar/SelectDistinctBuilder.tsx b/packages/iris-grid/src/sidebar/SelectDistinctBuilder.tsx index 0f6c89cda..5428470ab 100644 --- a/packages/iris-grid/src/sidebar/SelectDistinctBuilder.tsx +++ b/packages/iris-grid/src/sidebar/SelectDistinctBuilder.tsx @@ -1,15 +1,15 @@ -import React, { Component, ReactElement } from 'react'; +import React, { Component, type ReactElement } from 'react'; import deepEqual from 'fast-deep-equal'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { dhNewCircleLargeFilled, vsTrash } from '@deephaven/icons'; import { Button, Select } from '@deephaven/components'; import Log from '@deephaven/log'; import type { dh } from '@deephaven/jsapi-types'; -import { ModelIndex } from '@deephaven/grid'; -import IrisGridModel from '../IrisGridModel'; +import { type ModelIndex } from '@deephaven/grid'; +import type IrisGridModel from '../IrisGridModel'; import './SelectDistinctBuilder.scss'; -import { ColumnName } from '../CommonTypes'; +import { type ColumnName } from '../CommonTypes'; const log = Log.module('SelectDistinctBuilder'); diff --git a/packages/iris-grid/src/sidebar/TableCsvExporter.tsx b/packages/iris-grid/src/sidebar/TableCsvExporter.tsx index 0744362f9..74aa3ff81 100644 --- a/packages/iris-grid/src/sidebar/TableCsvExporter.tsx +++ b/packages/iris-grid/src/sidebar/TableCsvExporter.tsx @@ -1,4 +1,4 @@ -import React, { Component, ReactElement } from 'react'; +import React, { Component, type ReactElement } from 'react'; import ClassNames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { @@ -12,8 +12,8 @@ import { import { GridRange, GridUtils, - ModelSizeMap, - MoveOperation, + type ModelSizeMap, + type MoveOperation, } from '@deephaven/grid'; import { vsWarning } from '@deephaven/icons'; import type { dh as DhType } from '@deephaven/jsapi-types'; @@ -21,7 +21,7 @@ import { TimeUtils } from '@deephaven/utils'; import { nanoid } from 'nanoid'; import './TableCsvExporter.scss'; import Log from '@deephaven/log'; -import IrisGridModel from '../IrisGridModel'; +import type IrisGridModel from '../IrisGridModel'; import IrisGridUtils from '../IrisGridUtils'; const log = Log.module('TableCsvExporter'); diff --git a/packages/iris-grid/src/sidebar/TableSaver.tsx b/packages/iris-grid/src/sidebar/TableSaver.tsx index e78004bdf..afe730bf3 100644 --- a/packages/iris-grid/src/sidebar/TableSaver.tsx +++ b/packages/iris-grid/src/sidebar/TableSaver.tsx @@ -1,10 +1,18 @@ import { PureComponent } from 'react'; import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; -import { GridRange, GridRangeIndex, memoizeClear } from '@deephaven/grid'; -import { Formatter, FormatterUtils, TableUtils } from '@deephaven/jsapi-utils'; import { - CancelablePromise, + type GridRange, + type GridRangeIndex, + memoizeClear, +} from '@deephaven/grid'; +import { + type Formatter, + FormatterUtils, + TableUtils, +} from '@deephaven/jsapi-utils'; +import { + type CancelablePromise, PromiseUtils, assertNotNull, } from '@deephaven/utils'; diff --git a/packages/iris-grid/src/sidebar/aggregations/AggregationEdit.test.tsx b/packages/iris-grid/src/sidebar/aggregations/AggregationEdit.test.tsx index dda9424b1..74f147858 100644 --- a/packages/iris-grid/src/sidebar/aggregations/AggregationEdit.test.tsx +++ b/packages/iris-grid/src/sidebar/aggregations/AggregationEdit.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { render, RenderResult, screen } from '@testing-library/react'; +import { render, type RenderResult, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { Aggregation } from './Aggregations'; +import { type Aggregation } from './Aggregations'; import AggregationEdit from './AggregationEdit'; import AggregationOperation from './AggregationOperation'; diff --git a/packages/iris-grid/src/sidebar/aggregations/AggregationEdit.tsx b/packages/iris-grid/src/sidebar/aggregations/AggregationEdit.tsx index 7e361b17d..29af5a234 100644 --- a/packages/iris-grid/src/sidebar/aggregations/AggregationEdit.tsx +++ b/packages/iris-grid/src/sidebar/aggregations/AggregationEdit.tsx @@ -9,10 +9,10 @@ import { } from '@deephaven/components'; import { dhSortAlphaDown, dhSortAlphaUp } from '@deephaven/icons'; import { TableUtils } from '@deephaven/jsapi-utils'; -import { Aggregation } from './Aggregations'; +import { type Aggregation } from './Aggregations'; import { filterValidColumns } from './AggregationUtils'; import './AggregationEdit.scss'; -import { DisplayColumn } from '../../IrisGridModel'; +import { type DisplayColumn } from '../../IrisGridModel'; interface AggregationEditItem { value: string; diff --git a/packages/iris-grid/src/sidebar/aggregations/AggregationUtils.ts b/packages/iris-grid/src/sidebar/aggregations/AggregationUtils.ts index 9233ab906..ff24a6873 100644 --- a/packages/iris-grid/src/sidebar/aggregations/AggregationUtils.ts +++ b/packages/iris-grid/src/sidebar/aggregations/AggregationUtils.ts @@ -1,5 +1,5 @@ import { TableUtils } from '@deephaven/jsapi-utils'; -import { DisplayColumn } from '../../IrisGridModel'; +import { type DisplayColumn } from '../../IrisGridModel'; import AggregationOperation from './AggregationOperation'; export const SELECTABLE_OPTIONS = [ diff --git a/packages/iris-grid/src/sidebar/aggregations/Aggregations.test.tsx b/packages/iris-grid/src/sidebar/aggregations/Aggregations.test.tsx index 3d081ec3a..100474283 100644 --- a/packages/iris-grid/src/sidebar/aggregations/Aggregations.test.tsx +++ b/packages/iris-grid/src/sidebar/aggregations/Aggregations.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { render, RenderResult, screen } from '@testing-library/react'; +import { render, type RenderResult, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import Aggregations, { Aggregation } from './Aggregations'; +import Aggregations, { type Aggregation } from './Aggregations'; import AggregationOperation from './AggregationOperation'; import { SELECTABLE_OPTIONS } from './AggregationUtils'; diff --git a/packages/iris-grid/src/sidebar/aggregations/Aggregations.tsx b/packages/iris-grid/src/sidebar/aggregations/Aggregations.tsx index 4fe7a2549..71b9a0c77 100644 --- a/packages/iris-grid/src/sidebar/aggregations/Aggregations.tsx +++ b/packages/iris-grid/src/sidebar/aggregations/Aggregations.tsx @@ -19,8 +19,8 @@ import { Button, } from '@deephaven/components'; import type { DraggableRenderItemProps, Range } from '@deephaven/components'; -import { ModelIndex } from '@deephaven/grid'; -import AggregationOperation from './AggregationOperation'; +import { type ModelIndex } from '@deephaven/grid'; +import type AggregationOperation from './AggregationOperation'; import AggregationUtils, { SELECTABLE_OPTIONS } from './AggregationUtils'; import './Aggregations.scss'; diff --git a/packages/iris-grid/src/sidebar/conditional-formatting/ColumnFormatEditor.tsx b/packages/iris-grid/src/sidebar/conditional-formatting/ColumnFormatEditor.tsx index 1417ff462..499310b42 100644 --- a/packages/iris-grid/src/sidebar/conditional-formatting/ColumnFormatEditor.tsx +++ b/packages/iris-grid/src/sidebar/conditional-formatting/ColumnFormatEditor.tsx @@ -3,12 +3,12 @@ import Log from '@deephaven/log'; import { ComboBox } from '@deephaven/components'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { - BaseFormatConfig, - ChangeCallback, + type BaseFormatConfig, + type ChangeCallback, getDefaultConditionConfigForType, getConditionConfig, getDefaultStyleConfig, - ModelColumn, + type ModelColumn, FormatStyleType, } from './ConditionalFormattingUtils'; import ConditionEditor from './ConditionEditor'; diff --git a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionEditor.tsx b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionEditor.tsx index 712aa0a88..8eb362da2 100644 --- a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionEditor.tsx +++ b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionEditor.tsx @@ -10,13 +10,13 @@ import { getLabelForDateCondition, getLabelForStringCondition, NumberCondition, - ModelColumn, - ConditionConfig, + type ModelColumn, + type ConditionConfig, getDefaultConditionForType, getLabelForBooleanCondition, BooleanCondition, CharCondition, - Condition, + type Condition, getLabelForCharCondition, isDateConditionValid, getDefaultValueForType, diff --git a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormatEditor.tsx b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormatEditor.tsx index 2737d978f..92514d920 100644 --- a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormatEditor.tsx +++ b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormatEditor.tsx @@ -7,11 +7,11 @@ import { FormatColumnWhereIcon, FormatRowWhereIcon } from '../icons'; import ColumnFormatEditor from './ColumnFormatEditor'; import RowFormatEditor from './RowFormatEditor'; import { - BaseFormatConfig, + type BaseFormatConfig, FormatterType, - FormattingRule, + type FormattingRule, isSupportedColumn, - ModelColumn, + type ModelColumn, } from './ConditionalFormattingUtils'; import './ConditionalFormatEditor.scss'; diff --git a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.ts b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.ts index e94260f8e..524be7a15 100644 --- a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.ts +++ b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.ts @@ -1,6 +1,6 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; import { - BaseFormatConfig, + type BaseFormatConfig, getConditionDBString, getStyleDBString, } from './ConditionalFormattingUtils'; diff --git a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingMenu.tsx b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingMenu.tsx index d79bc7f3f..cf95100d0 100644 --- a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingMenu.tsx +++ b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingMenu.tsx @@ -3,7 +3,7 @@ import { DragDropContext, Draggable, Droppable, - DropResult, + type DropResult, } from 'react-beautiful-dnd'; import classNames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; @@ -13,8 +13,8 @@ import { TableUtils } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; import './ConditionalFormattingMenu.scss'; import { - BaseFormatConfig, - FormattingRule, + type BaseFormatConfig, + type FormattingRule, FormatterType, getBackgroundForStyleConfig, getColorForStyleConfig, @@ -23,7 +23,7 @@ import { StringCondition, DateCondition, } from './ConditionalFormattingUtils'; -import { ColumnName } from '../../CommonTypes'; +import { type ColumnName } from '../../CommonTypes'; const log = Log.module('ConditionalFormattingMenu'); diff --git a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingUtils.test.ts b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingUtils.test.ts index 493cbac80..c1bc8a78c 100644 --- a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingUtils.test.ts +++ b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingUtils.test.ts @@ -5,7 +5,7 @@ import { DateCondition, FormatStyleType, FormatterType, - FormattingRule, + type FormattingRule, getFormatColumns, isDateConditionValid, StringCondition, diff --git a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingUtils.ts b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingUtils.ts index 9e5718142..99b8903e6 100644 --- a/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingUtils.ts +++ b/packages/iris-grid/src/sidebar/conditional-formatting/ConditionalFormattingUtils.ts @@ -6,7 +6,7 @@ import { makeRowFormatColumn, makeTernaryFormatRule, } from './ConditionalFormattingAPIUtils'; -import { ColumnName } from '../../CommonTypes'; +import { type ColumnName } from '../../CommonTypes'; const log = Log.module('ConditionalFormattingUtils'); diff --git a/packages/iris-grid/src/sidebar/conditional-formatting/RowFormatEditor.tsx b/packages/iris-grid/src/sidebar/conditional-formatting/RowFormatEditor.tsx index ad2e43844..d6a819300 100644 --- a/packages/iris-grid/src/sidebar/conditional-formatting/RowFormatEditor.tsx +++ b/packages/iris-grid/src/sidebar/conditional-formatting/RowFormatEditor.tsx @@ -3,12 +3,12 @@ import Log from '@deephaven/log'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { ComboBox } from '@deephaven/components'; import { - BaseFormatConfig, - ChangeCallback, + type BaseFormatConfig, + type ChangeCallback, getDefaultConditionConfigForType, getConditionConfig, getDefaultStyleConfig, - ModelColumn, + type ModelColumn, } from './ConditionalFormattingUtils'; import ConditionEditor from './ConditionEditor'; import StyleEditor from './StyleEditor'; diff --git a/packages/iris-grid/src/sidebar/conditional-formatting/StyleEditor.tsx b/packages/iris-grid/src/sidebar/conditional-formatting/StyleEditor.tsx index 5ede1fb69..635f8c195 100644 --- a/packages/iris-grid/src/sidebar/conditional-formatting/StyleEditor.tsx +++ b/packages/iris-grid/src/sidebar/conditional-formatting/StyleEditor.tsx @@ -13,7 +13,7 @@ import { Button, DropdownMenu } from '@deephaven/components'; import { FormatStyleType, getLabelForStyleType, - FormatStyleConfig, + type FormatStyleConfig, getBackgroundForStyleConfig, getColorForStyleConfig, } from './ConditionalFormattingUtils'; diff --git a/packages/iris-grid/src/sidebar/index.ts b/packages/iris-grid/src/sidebar/index.ts index 855a96e96..7da2c16fa 100644 --- a/packages/iris-grid/src/sidebar/index.ts +++ b/packages/iris-grid/src/sidebar/index.ts @@ -9,7 +9,7 @@ import RollupRows from './RollupRows'; import TableCsvExporter from './TableCsvExporter'; import TableSaver from './TableSaver'; import VisibilityOrderingBuilder from './visibility-ordering-builder/VisibilityOrderingBuilder'; -import { FormattingRule } from './conditional-formatting/ConditionalFormattingUtils'; +import { type FormattingRule } from './conditional-formatting/ConditionalFormattingUtils'; import AdvancedSettingsType from './AdvancedSettingsType'; import DownloadServiceWorkerUtils from './DownloadServiceWorkerUtils'; diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.test.tsx b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.test.tsx index 9816585fc..711bf572a 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.test.tsx +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.test.tsx @@ -3,7 +3,8 @@ import { fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { GridUtils } from '@deephaven/grid'; import type { MoveOperation } from '@deephaven/grid'; -import { assertNotNull, TestUtils } from '@deephaven/utils'; +import { assertNotNull } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import dh from '@deephaven/jsapi-shim'; import type { ColumnGroup } from '@deephaven/jsapi-types'; import VisibilityOrderingBuilder from './VisibilityOrderingBuilder'; diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.tsx b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.tsx index 366276e59..5b113cffd 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.tsx +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.tsx @@ -1,10 +1,14 @@ -import React, { ChangeEvent, PureComponent, ReactElement } from 'react'; +import React, { + type ChangeEvent, + PureComponent, + type ReactElement, +} from 'react'; import classNames from 'classnames'; import { GridUtils, - ModelIndex, - MoveOperation, - VisibleIndex, + type ModelIndex, + type MoveOperation, + type VisibleIndex, } from '@deephaven/grid'; import { TextUtils, assertNotNull, DbNameValidator } from '@deephaven/utils'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; @@ -29,18 +33,19 @@ import { Button, SearchInput } from '@deephaven/components'; import clamp from 'lodash.clamp'; import throttle from 'lodash.throttle'; import './VisibilityOrderingBuilder.scss'; -import IrisGridModel, { DisplayColumn } from '../../IrisGridModel'; -import { ColumnName } from '../../CommonTypes'; +import { type DisplayColumn } from '../../IrisGridModel'; +import type IrisGridModel from '../../IrisGridModel'; +import { type ColumnName } from '../../CommonTypes'; import ColumnHeaderGroup from '../../ColumnHeaderGroup'; import VisibilityOrderingItem from './VisibilityOrderingItem'; import { - FlattenedIrisGridTreeItem, + type FlattenedIrisGridTreeItem, flattenTree, getTreeItems, - IrisGridTreeItem, + type IrisGridTreeItem, } from './sortable-tree/utilities'; import SortableTree from './sortable-tree/SortableTree'; -import { TreeItemRenderFn } from './sortable-tree/TreeItem'; +import { type TreeItemRenderFn } from './sortable-tree/TreeItem'; import { moveItemsFromDrop, moveToGroup, diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilderUtils.test.ts b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilderUtils.test.ts index 969d90e69..642775233 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilderUtils.test.ts +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilderUtils.test.ts @@ -6,7 +6,7 @@ import { moveToGroup, } from './VisibilityOrderingBuilderUtils'; import { - FlattenedIrisGridTreeItem, + type FlattenedIrisGridTreeItem, flattenTree, getProjection, getTreeItems, diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilderUtils.ts b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilderUtils.ts index f9f6ceb06..b04d53c5e 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilderUtils.ts +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingBuilderUtils.ts @@ -1,8 +1,8 @@ -import { GridUtils, MoveOperation } from '@deephaven/grid'; +import { GridUtils, type MoveOperation } from '@deephaven/grid'; import clamp from 'lodash.clamp'; import ColumnHeaderGroup from '../../ColumnHeaderGroup'; -import { FlattenedItem } from './sortable-tree/types'; -import { FlattenedIrisGridTreeItem } from './sortable-tree/utilities'; +import { type FlattenedItem } from './sortable-tree/types'; +import { type FlattenedIrisGridTreeItem } from './sortable-tree/utilities'; /** * Moves an item as the result of drag and drop in the visibility ordering builder diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingItem.tsx b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingItem.tsx index 2624d08f0..9bdcd571e 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingItem.tsx +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/VisibilityOrderingItem.tsx @@ -5,7 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { dhEye, dhEyeSlash, vsGripper } from '@deephaven/icons'; import { Button, Tooltip } from '@deephaven/components'; import VisibilityOrderingGroup from './VisibilityOrderingGroup'; -import { FlattenedIrisGridTreeItem } from './sortable-tree/utilities'; +import { type FlattenedIrisGridTreeItem } from './sortable-tree/utilities'; import type ColumnHeaderGroup from '../../ColumnHeaderGroup'; type VisibilityOrderingItemProps = { diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.tsx b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.tsx index 6cc1c7f56..c399dca2a 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.tsx +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.tsx @@ -11,10 +11,10 @@ import { KeyboardSensor, useSensor, useSensors, - DragStartEvent, - DragMoveEvent, - DragEndEvent, - DragOverEvent, + type DragStartEvent, + type DragMoveEvent, + type DragEndEvent, + type DragOverEvent, MeasuringStrategy, } from '@dnd-kit/core'; import { diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.tsx b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.tsx index f91f782ce..292f1579a 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.tsx +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.tsx @@ -3,8 +3,8 @@ import { createPortal } from 'react-dom'; import classNames from 'classnames'; import { DragOverlay, - DropAnimation, - Modifier, + type DropAnimation, + type Modifier, defaultDropAnimation, useDndContext, } from '@dnd-kit/core'; diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.tsx b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.tsx index 621e706ce..653bfadc9 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.tsx +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.tsx @@ -1,8 +1,8 @@ /* eslint-disable import/prefer-default-export */ -import React, { CSSProperties, useMemo } from 'react'; -import { AnimateLayoutChanges, useSortable } from '@dnd-kit/sortable'; +import React, { type CSSProperties, useMemo } from 'react'; +import { type AnimateLayoutChanges, useSortable } from '@dnd-kit/sortable'; import { CSS } from '@dnd-kit/utilities'; -import { TreeItem, Props as TreeItemProps } from './TreeItem'; +import { TreeItem, type Props as TreeItemProps } from './TreeItem'; export interface Props extends Omit, 'style'> { id: string; diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.ts b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.ts index 2d38590b5..a26b0cb8c 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.ts +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.ts @@ -3,8 +3,8 @@ import { closestCorners, getFirstCollision, KeyboardCode, - KeyboardCoordinateGetter, - DroppableContainer, + type KeyboardCoordinateGetter, + type DroppableContainer, } from '@dnd-kit/core'; import type { SensorContext } from './types'; import { getProjection } from './utilities'; diff --git a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/utilities.ts b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/utilities.ts index a0ab24040..a0986aea9 100644 --- a/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/utilities.ts +++ b/packages/iris-grid/src/sidebar/visibility-ordering-builder/sortable-tree/utilities.ts @@ -1,8 +1,12 @@ import { arrayMove } from '@dnd-kit/sortable'; import type { dh } from '@deephaven/jsapi-types'; -import { GridUtils, ModelIndex, MoveOperation } from '@deephaven/grid'; +import { + GridUtils, + type ModelIndex, + type MoveOperation, +} from '@deephaven/grid'; import type ColumnHeaderGroup from '../../../ColumnHeaderGroup'; -import { isFlattenedTreeItem, ReadonlyTreeItems } from './types'; +import { isFlattenedTreeItem, type ReadonlyTreeItems } from './types'; import type { FlattenedItem, TreeItem } from './types'; /** diff --git a/packages/iris-grid/tsconfig.json b/packages/iris-grid/tsconfig.json index a7b42e12a..32980635c 100644 --- a/packages/iris-grid/tsconfig.json +++ b/packages/iris-grid/tsconfig.json @@ -17,6 +17,7 @@ { "path": "../log" }, { "path": "../react-hooks" }, { "path": "../storage" }, + { "path": "../test-utils" }, { "path": "../utils" } ] } diff --git a/packages/jsapi-bootstrap/CHANGELOG.md b/packages/jsapi-bootstrap/CHANGELOG.md index cfa3d219c..1a4637646 100644 --- a/packages/jsapi-bootstrap/CHANGELOG.md +++ b/packages/jsapi-bootstrap/CHANGELOG.md @@ -3,6 +3,35 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +### Bug Fixes + +- ChartBuilderPlugin fixes for charts built from PPQs in Enterprise ([#2167](https://github.com/deephaven/web-client-ui/issues/2167)) ([99b8d59](https://github.com/deephaven/web-client-ui/commit/99b8d5952ba325bf74d2d16ed39eb7a2e897d196)) + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/jsapi-bootstrap diff --git a/packages/jsapi-bootstrap/package.json b/packages/jsapi-bootstrap/package.json index b390ab3f0..721ca6308 100644 --- a/packages/jsapi-bootstrap/package.json +++ b/packages/jsapi-bootstrap/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/jsapi-bootstrap", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven JSAPI Bootstrap", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -29,6 +29,7 @@ "@deephaven/utils": "file:../utils" }, "devDependencies": { + "@deephaven/test-utils": "file:../test-utils", "react": "^17.x" }, "peerDependencies": { diff --git a/packages/jsapi-bootstrap/src/ApiBootstrap.tsx b/packages/jsapi-bootstrap/src/ApiBootstrap.tsx index d73580f00..f1d0dfc3d 100644 --- a/packages/jsapi-bootstrap/src/ApiBootstrap.tsx +++ b/packages/jsapi-bootstrap/src/ApiBootstrap.tsx @@ -1,4 +1,4 @@ -import { createContext, ReactNode, useEffect, useState } from 'react'; +import { createContext, type ReactNode, useEffect, useState } from 'react'; import { LoadingOverlay, Modal, diff --git a/packages/jsapi-bootstrap/src/DeferredApiBootstrap.test.tsx b/packages/jsapi-bootstrap/src/DeferredApiBootstrap.test.tsx index 281ea2db4..c46642992 100644 --- a/packages/jsapi-bootstrap/src/DeferredApiBootstrap.test.tsx +++ b/packages/jsapi-bootstrap/src/DeferredApiBootstrap.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { act, render } from '@testing-library/react'; import type { dh as DhType } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import DeferredApiBootstrap from './DeferredApiBootstrap'; import { DeferredApiContext } from './useDeferredApi'; diff --git a/packages/jsapi-bootstrap/src/useApi.test.ts b/packages/jsapi-bootstrap/src/useApi.test.ts index 289a0e700..0ce099c55 100644 --- a/packages/jsapi-bootstrap/src/useApi.test.ts +++ b/packages/jsapi-bootstrap/src/useApi.test.ts @@ -1,7 +1,7 @@ import { renderHook } from '@testing-library/react-hooks'; import dh from '@deephaven/jsapi-shim'; import { useContext } from 'react'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { useApi } from './useApi'; const { asMock } = TestUtils; diff --git a/packages/jsapi-bootstrap/src/useDeferredApi.test.ts b/packages/jsapi-bootstrap/src/useDeferredApi.test.ts index 413bf10eb..5bb6b4475 100644 --- a/packages/jsapi-bootstrap/src/useDeferredApi.test.ts +++ b/packages/jsapi-bootstrap/src/useDeferredApi.test.ts @@ -1,9 +1,9 @@ import { act, renderHook } from '@testing-library/react-hooks'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { useContext } from 'react'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { useDeferredApi } from './useDeferredApi'; -import { VariableDescriptor } from './useObjectFetcher'; +import { type VariableDescriptor } from './useObjectFetcher'; const { asMock, createMockProxy, flushPromises } = TestUtils; @@ -29,7 +29,10 @@ describe('useDeferredApi', () => { expect(result.current).toEqual([dh1, null]); const { result: result2 } = renderHook(() => - useDeferredApi({ type: 'foo', foo: 'bar' }) + useDeferredApi({ + type: 'foo', + foo: 'bar', + } as DhType.ide.VariableDescriptor) ); expect(result2.current).toEqual([dh1, null]); }); @@ -68,4 +71,10 @@ describe('useDeferredApi', () => { const { result } = renderHook(() => useDeferredApi(objectMetadata)); expect(result.current).toEqual([null, expect.any(Error)]); }); + + it('returns an error if the metadata is null', async () => { + asMock(useContext).mockReturnValue(dh1); + const { result } = renderHook(() => useDeferredApi(null)); + expect(result.current).toEqual([null, expect.any(Error)]); + }); }); diff --git a/packages/jsapi-bootstrap/src/useDeferredApi.ts b/packages/jsapi-bootstrap/src/useDeferredApi.ts index dc62174d9..25eabd3a4 100644 --- a/packages/jsapi-bootstrap/src/useDeferredApi.ts +++ b/packages/jsapi-bootstrap/src/useDeferredApi.ts @@ -24,8 +24,8 @@ export const DeferredApiContext = createContext< * @returns A tuple with the API instance, and an error if one occurred. */ export function useDeferredApi( - widget: DhType.ide.VariableDescriptor -): [typeof DhType | null, unknown | null] { + widget: DhType.ide.VariableDescriptor | null +): [dh: typeof DhType | null, error: unknown | null] { const [api, setApi] = useState(null); const [error, setError] = useState(null); const deferredApi = useContext(DeferredApiContext); @@ -49,7 +49,12 @@ export function useDeferredApi( let isCancelled = false; async function loadApi() { - if (typeof deferredApi === 'function') { + if (widget == null) { + if (!isCancelled) { + setApi(null); + setError(new Error('No widget provided to useDeferredApi')); + } + } else if (typeof deferredApi === 'function') { try { const newApi = await deferredApi(widget); if (!isCancelled) { diff --git a/packages/jsapi-bootstrap/src/useObjectFetcher.test.ts b/packages/jsapi-bootstrap/src/useObjectFetcher.test.ts index 52f441b36..2855501ee 100644 --- a/packages/jsapi-bootstrap/src/useObjectFetcher.test.ts +++ b/packages/jsapi-bootstrap/src/useObjectFetcher.test.ts @@ -1,6 +1,6 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { useContext } from 'react'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { getVariableDescriptor, sanitizeVariableDescriptor, diff --git a/packages/jsapi-bootstrap/src/useWidget.test.tsx b/packages/jsapi-bootstrap/src/useWidget.test.tsx index f6221b04d..89c9bf1bc 100644 --- a/packages/jsapi-bootstrap/src/useWidget.test.tsx +++ b/packages/jsapi-bootstrap/src/useWidget.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { act, renderHook } from '@testing-library/react-hooks'; -import { dh } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { type dh } from '@deephaven/jsapi-types'; +import { TestUtils } from '@deephaven/test-utils'; import { useWidget } from './useWidget'; import { ObjectFetchManagerContext } from './useObjectFetch'; diff --git a/packages/jsapi-bootstrap/tsconfig.json b/packages/jsapi-bootstrap/tsconfig.json index 7c57a9efe..e8d52756d 100644 --- a/packages/jsapi-bootstrap/tsconfig.json +++ b/packages/jsapi-bootstrap/tsconfig.json @@ -10,6 +10,7 @@ { "path": "../components" }, { "path": "../log" }, { "path": "../react-hooks" }, + { "path": "../test-utils" }, { "path": "../utils" } ] } diff --git a/packages/jsapi-components/CHANGELOG.md b/packages/jsapi-components/CHANGELOG.md index bc7fc4c45..ebc1b365e 100644 --- a/packages/jsapi-components/CHANGELOG.md +++ b/packages/jsapi-components/CHANGELOG.md @@ -3,6 +3,35 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +### Bug Fixes + +- Use correct offset in snapshot ([#2217](https://github.com/deephaven/web-client-ui/issues/2217)) ([a479d6c](https://github.com/deephaven/web-client-ui/commit/a479d6c5f907f53aaa6500845ea168ab0eb9bb09)) + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/jsapi-components diff --git a/packages/jsapi-components/package.json b/packages/jsapi-components/package.json index c60f84db8..a0e53ea74 100644 --- a/packages/jsapi-components/package.json +++ b/packages/jsapi-components/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/jsapi-components", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven JSAPI Components", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -37,6 +37,7 @@ }, "devDependencies": { "@deephaven/jsapi-shim": "file:../jsapi-shim", + "@deephaven/test-utils": "file:../test-utils", "react-test-renderer": "^17.0.2" }, "peerDependencies": { diff --git a/packages/jsapi-components/src/HookTestUtils.tsx b/packages/jsapi-components/src/HookTestUtils.tsx index 8ca7a25e7..95cbe9081 100644 --- a/packages/jsapi-components/src/HookTestUtils.tsx +++ b/packages/jsapi-components/src/HookTestUtils.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import React, { type ReactNode } from 'react'; import { ApiContext } from '@deephaven/jsapi-bootstrap'; import type { dh as DhType } from '@deephaven/jsapi-types'; diff --git a/packages/jsapi-components/src/TableDropdown.tsx b/packages/jsapi-components/src/TableDropdown.tsx index 2e8e342ab..6e21767f2 100644 --- a/packages/jsapi-components/src/TableDropdown.tsx +++ b/packages/jsapi-components/src/TableDropdown.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { Option, Select } from '@deephaven/components'; import { useApi } from '@deephaven/jsapi-bootstrap'; -import { dh as DhType } from '@deephaven/jsapi-types'; +import { type dh as DhType } from '@deephaven/jsapi-types'; import { EMPTY_ARRAY } from '@deephaven/utils'; type JavaObject = { diff --git a/packages/jsapi-components/src/TableInput.tsx b/packages/jsapi-components/src/TableInput.tsx index f1849d2ee..680062574 100644 --- a/packages/jsapi-components/src/TableInput.tsx +++ b/packages/jsapi-components/src/TableInput.tsx @@ -14,7 +14,11 @@ import { import type { dh } from '@deephaven/jsapi-types'; import { PromiseUtils } from '@deephaven/utils'; import Log from '@deephaven/log'; -import { Formatter, FormatterUtils, Settings } from '@deephaven/jsapi-utils'; +import { + Formatter, + FormatterUtils, + type Settings, +} from '@deephaven/jsapi-utils'; import { useApi } from '@deephaven/jsapi-bootstrap'; import useTableColumn from './useTableColumn'; diff --git a/packages/jsapi-components/src/spectrum/ComboBox.tsx b/packages/jsapi-components/src/spectrum/ComboBox.tsx index 8c345a102..c41a23b60 100644 --- a/packages/jsapi-components/src/spectrum/ComboBox.tsx +++ b/packages/jsapi-components/src/spectrum/ComboBox.tsx @@ -1,10 +1,10 @@ import { ComboBoxNormalized, - NormalizedItem, - SpectrumComboBoxProps, + type NormalizedItem, + type SpectrumComboBoxProps, } from '@deephaven/components'; import { useCallback } from 'react'; -import { PickerWithTableProps } from './PickerProps'; +import { type PickerWithTableProps } from './PickerProps'; import { usePickerProps } from './utils'; export type ComboBoxProps = PickerWithTableProps< diff --git a/packages/jsapi-components/src/spectrum/ListView.tsx b/packages/jsapi-components/src/spectrum/ListView.tsx index 92858c82b..b22d69573 100644 --- a/packages/jsapi-components/src/spectrum/ListView.tsx +++ b/packages/jsapi-components/src/spectrum/ListView.tsx @@ -1,12 +1,12 @@ import { LIST_VIEW_ROW_HEIGHTS, ListViewNormalized, - ListViewNormalizedProps, - NormalizedItemData, + type ListViewNormalizedProps, + type NormalizedItemData, useSpectrumThemeProvider, } from '@deephaven/components'; -import { dh as DhType } from '@deephaven/jsapi-types'; -import { Settings } from '@deephaven/jsapi-utils'; +import { type dh as DhType } from '@deephaven/jsapi-types'; +import { type Settings } from '@deephaven/jsapi-utils'; import useFormatter from '../useFormatter'; import useViewportData from '../useViewportData'; import { useItemRowDeserializer } from './utils'; diff --git a/packages/jsapi-components/src/spectrum/Picker.tsx b/packages/jsapi-components/src/spectrum/Picker.tsx index 207ee81de..e6a49f348 100644 --- a/packages/jsapi-components/src/spectrum/Picker.tsx +++ b/packages/jsapi-components/src/spectrum/Picker.tsx @@ -1,5 +1,5 @@ import { PickerNormalized } from '@deephaven/components'; -import { PickerProps } from './PickerProps'; +import { type PickerProps } from './PickerProps'; import { usePickerProps } from './utils'; export function Picker(props: PickerProps): JSX.Element { diff --git a/packages/jsapi-components/src/spectrum/PickerProps.ts b/packages/jsapi-components/src/spectrum/PickerProps.ts index 7112e3646..8de8003c5 100644 --- a/packages/jsapi-components/src/spectrum/PickerProps.ts +++ b/packages/jsapi-components/src/spectrum/PickerProps.ts @@ -1,10 +1,10 @@ import { - NormalizedItem, - PickerPropsT, - SpectrumPickerProps, + type NormalizedItem, + type PickerPropsT, + type SpectrumPickerProps, } from '@deephaven/components'; -import { dh as DhType } from '@deephaven/jsapi-types'; -import { Settings } from '@deephaven/jsapi-utils'; +import { type dh as DhType } from '@deephaven/jsapi-types'; +import { type Settings } from '@deephaven/jsapi-utils'; export type PickerWithTableProps = Omit< PickerPropsT, diff --git a/packages/jsapi-components/src/spectrum/utils/itemUtils.test.tsx b/packages/jsapi-components/src/spectrum/utils/itemUtils.test.tsx index 6e9ca57e3..a20b14b1a 100644 --- a/packages/jsapi-components/src/spectrum/utils/itemUtils.test.tsx +++ b/packages/jsapi-components/src/spectrum/utils/itemUtils.test.tsx @@ -1,5 +1,5 @@ import { type dh } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { getItemKeyColumn, getItemLabelColumn } from './itemUtils'; const { createMockProxy } = TestUtils; diff --git a/packages/jsapi-components/src/spectrum/utils/itemUtils.ts b/packages/jsapi-components/src/spectrum/utils/itemUtils.ts index f43168b07..bdf2b2530 100644 --- a/packages/jsapi-components/src/spectrum/utils/itemUtils.ts +++ b/packages/jsapi-components/src/spectrum/utils/itemUtils.ts @@ -1,4 +1,4 @@ -import { dh } from '@deephaven/jsapi-types'; +import { type dh } from '@deephaven/jsapi-types'; /** * Get the key column if column name is provided, otherwise use the first column. diff --git a/packages/jsapi-components/src/spectrum/utils/useItemRowDeserializer.test.ts b/packages/jsapi-components/src/spectrum/utils/useItemRowDeserializer.test.ts index 1d0bff5ff..000bfa841 100644 --- a/packages/jsapi-components/src/spectrum/utils/useItemRowDeserializer.test.ts +++ b/packages/jsapi-components/src/spectrum/utils/useItemRowDeserializer.test.ts @@ -1,6 +1,6 @@ import { renderHook } from '@testing-library/react-hooks'; import type { dh } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { useItemRowDeserializer } from './useItemRowDeserializer'; import { getItemKeyColumn, getItemLabelColumn } from './itemUtils'; diff --git a/packages/jsapi-components/src/spectrum/utils/useItemRowDeserializer.ts b/packages/jsapi-components/src/spectrum/utils/useItemRowDeserializer.ts index 71b660bba..8c9d6b0cf 100644 --- a/packages/jsapi-components/src/spectrum/utils/useItemRowDeserializer.ts +++ b/packages/jsapi-components/src/spectrum/utils/useItemRowDeserializer.ts @@ -1,6 +1,6 @@ import { useCallback, useMemo } from 'react'; -import { NormalizedItemData } from '@deephaven/components'; -import { dh } from '@deephaven/jsapi-types'; +import { type NormalizedItemData } from '@deephaven/components'; +import { type dh } from '@deephaven/jsapi-types'; import { assertNotNull } from '@deephaven/utils'; import { getItemKeyColumn, getItemLabelColumn } from './itemUtils'; diff --git a/packages/jsapi-components/src/spectrum/utils/usePickerProps.ts b/packages/jsapi-components/src/spectrum/utils/usePickerProps.ts index 0cebf29a3..fdd001feb 100644 --- a/packages/jsapi-components/src/spectrum/utils/usePickerProps.ts +++ b/packages/jsapi-components/src/spectrum/utils/usePickerProps.ts @@ -1,8 +1,8 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { - ItemKey, - NormalizedItem, - NormalizedSection, + type ItemKey, + type NormalizedItem, + type NormalizedSection, PICKER_TOP_OFFSET, usePickerItemScale, } from '@deephaven/components'; diff --git a/packages/jsapi-components/src/useBroadcastChannel.ts b/packages/jsapi-components/src/useBroadcastChannel.ts index 302de4117..1d1eae6e4 100644 --- a/packages/jsapi-components/src/useBroadcastChannel.ts +++ b/packages/jsapi-components/src/useBroadcastChannel.ts @@ -1,7 +1,7 @@ import { BROADCAST_CHANNEL_NAME, isMessage, - Message, + type Message, } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; import { EMPTY_FUNCTION } from '@deephaven/utils'; diff --git a/packages/jsapi-components/src/useBroadcastLoginListener.ts b/packages/jsapi-components/src/useBroadcastLoginListener.ts index d38ff4530..5dc31793b 100644 --- a/packages/jsapi-components/src/useBroadcastLoginListener.ts +++ b/packages/jsapi-components/src/useBroadcastLoginListener.ts @@ -1,9 +1,9 @@ import { - BroadcastLoginMessage, - BroadcastLogoutMessage, + type BroadcastLoginMessage, + type BroadcastLogoutMessage, isBroadcastLoginMessage, isBroadcastLogoutMessage, - Message, + type Message, } from '@deephaven/jsapi-utils'; import { useCallback } from 'react'; import useBroadcastChannel from './useBroadcastChannel'; diff --git a/packages/jsapi-components/src/useCheckIfExistsValue.test.ts b/packages/jsapi-components/src/useCheckIfExistsValue.test.ts index 27bc790a3..8cb5a9a97 100644 --- a/packages/jsapi-components/src/useCheckIfExistsValue.test.ts +++ b/packages/jsapi-components/src/useCheckIfExistsValue.test.ts @@ -1,7 +1,7 @@ import { act, renderHook } from '@testing-library/react-hooks'; import type { Table } from '@deephaven/jsapi-types'; -import { TableUtils } from '@deephaven/jsapi-utils'; -import { TestUtils } from '@deephaven/utils'; +import { type TableUtils } from '@deephaven/jsapi-utils'; +import { TestUtils } from '@deephaven/test-utils'; import useCheckIfExistsValue from './useCheckIfExistsValue'; import useTableUtils from './useTableUtils'; diff --git a/packages/jsapi-components/src/useDebouncedViewportSearch.test.tsx b/packages/jsapi-components/src/useDebouncedViewportSearch.test.tsx index 694f99ef2..c694da22b 100644 --- a/packages/jsapi-components/src/useDebouncedViewportSearch.test.tsx +++ b/packages/jsapi-components/src/useDebouncedViewportSearch.test.tsx @@ -6,12 +6,12 @@ import type { Table, } from '@deephaven/jsapi-types'; import dh from '@deephaven/jsapi-shim'; -import { TableUtils } from '@deephaven/jsapi-utils'; -import { TestUtils } from '@deephaven/utils'; +import { type TableUtils } from '@deephaven/jsapi-utils'; +import { TestUtils } from '@deephaven/test-utils'; import useDebouncedViewportSearch, { DEBOUNCE_VIEWPORT_SEARCH_MS, } from './useDebouncedViewportSearch'; -import { UseViewportDataResult } from './useViewportData'; +import { type UseViewportDataResult } from './useViewportData'; import { makeApiContextWrapper } from './HookTestUtils'; import useTableUtils from './useTableUtils'; diff --git a/packages/jsapi-components/src/useDebouncedViewportSearch.ts b/packages/jsapi-components/src/useDebouncedViewportSearch.ts index 040c43c3c..95fb09fbc 100644 --- a/packages/jsapi-components/src/useDebouncedViewportSearch.ts +++ b/packages/jsapi-components/src/useDebouncedViewportSearch.ts @@ -2,7 +2,7 @@ import debounce from 'lodash.debounce'; import type { dh } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; import { useEffect, useMemo } from 'react'; -import { UseViewportDataResult } from './useViewportData'; +import { type UseViewportDataResult } from './useViewportData'; import useTableUtils from './useTableUtils'; const log = Log.module('useDebouncedViewportSearch'); diff --git a/packages/jsapi-components/src/useDebouncedViewportSelectionFilter.test.ts b/packages/jsapi-components/src/useDebouncedViewportSelectionFilter.test.ts index 8e27c6bb6..ac09a109a 100644 --- a/packages/jsapi-components/src/useDebouncedViewportSelectionFilter.test.ts +++ b/packages/jsapi-components/src/useDebouncedViewportSelectionFilter.test.ts @@ -2,17 +2,18 @@ import { renderHook } from '@testing-library/react-hooks'; import { createKeyedItemKey, createSelectedValuesFilter, - FilterConditionFactory, - TableUtils, + type FilterConditionFactory, + type TableUtils, } from '@deephaven/jsapi-utils'; import { isSelectionMaybeInvertedEqual, useDebouncedValue, useIsEqualMemo, useMappedSelection, - WindowedListData, + type WindowedListData, } from '@deephaven/react-hooks'; -import { KeyedItem, TestUtils } from '@deephaven/utils'; +import { type KeyedItem } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useDebouncedViewportSelectionFilter, { DEBOUNCE_MS, } from './useDebouncedViewportSelectionFilter'; diff --git a/packages/jsapi-components/src/useDebouncedViewportSelectionFilter.ts b/packages/jsapi-components/src/useDebouncedViewportSelectionFilter.ts index 593bdcdde..149d0abf8 100644 --- a/packages/jsapi-components/src/useDebouncedViewportSelectionFilter.ts +++ b/packages/jsapi-components/src/useDebouncedViewportSelectionFilter.ts @@ -1,16 +1,16 @@ import { createKeyedItemKey, createSelectedValuesFilter, - FilterConditionFactory, + type FilterConditionFactory, } from '@deephaven/jsapi-utils'; import { isSelectionMaybeInvertedEqual, useDebouncedValue, useIsEqualMemo, useMappedSelection, - WindowedListData, + type WindowedListData, } from '@deephaven/react-hooks'; -import { KeyedItem } from '@deephaven/utils'; +import { type KeyedItem } from '@deephaven/utils'; import { useMemo } from 'react'; import useTableUtils from './useTableUtils'; diff --git a/packages/jsapi-components/src/useFilterConditionFactories.test.ts b/packages/jsapi-components/src/useFilterConditionFactories.test.ts index 65c9f0aba..609e2d863 100644 --- a/packages/jsapi-components/src/useFilterConditionFactories.test.ts +++ b/packages/jsapi-components/src/useFilterConditionFactories.test.ts @@ -1,7 +1,7 @@ import { renderHook } from '@testing-library/react-hooks'; import type { FilterCondition, Table } from '@deephaven/jsapi-types'; -import { FilterConditionFactory } from '@deephaven/jsapi-utils'; -import { TestUtils } from '@deephaven/utils'; +import { type FilterConditionFactory } from '@deephaven/jsapi-utils'; +import { TestUtils } from '@deephaven/test-utils'; import useFilterConditionFactories from './useFilterConditionFactories'; const { asMock, createMockProxy } = TestUtils; diff --git a/packages/jsapi-components/src/useFilteredItemsWithDefaultValue.test.ts b/packages/jsapi-components/src/useFilteredItemsWithDefaultValue.test.ts index d9fbfbc4c..382abb17a 100644 --- a/packages/jsapi-components/src/useFilteredItemsWithDefaultValue.test.ts +++ b/packages/jsapi-components/src/useFilteredItemsWithDefaultValue.test.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks'; -import { KeyedItem } from '@deephaven/jsapi-utils'; +import { type KeyedItem } from '@deephaven/jsapi-utils'; import useFilteredItemsWithDefaultValue from './useFilteredItemsWithDefaultValue'; beforeEach(() => { diff --git a/packages/jsapi-components/src/useFilteredItemsWithDefaultValue.ts b/packages/jsapi-components/src/useFilteredItemsWithDefaultValue.ts index 7f8d278ec..d1c66dcd2 100644 --- a/packages/jsapi-components/src/useFilteredItemsWithDefaultValue.ts +++ b/packages/jsapi-components/src/useFilteredItemsWithDefaultValue.ts @@ -1,5 +1,5 @@ import { useMemo, useRef } from 'react'; -import { KeyedItem } from '@deephaven/utils'; +import { type KeyedItem } from '@deephaven/utils'; /** * Takes an array of items and adds a default item to the top of the list if: diff --git a/packages/jsapi-components/src/useFormatter.test.ts b/packages/jsapi-components/src/useFormatter.test.ts index c39a531f3..476a10111 100644 --- a/packages/jsapi-components/src/useFormatter.test.ts +++ b/packages/jsapi-components/src/useFormatter.test.ts @@ -1,9 +1,10 @@ import { useApi } from '@deephaven/jsapi-bootstrap'; -import { bindAllMethods, TestUtils } from '@deephaven/utils'; +import { bindAllMethods } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { createFormatterFromSettings, - Formatter, - Settings, + type Formatter, + type Settings, } from '@deephaven/jsapi-utils'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { renderHook } from '@testing-library/react-hooks'; diff --git a/packages/jsapi-components/src/useFormatter.ts b/packages/jsapi-components/src/useFormatter.ts index 0900b0a8c..1e97db41f 100644 --- a/packages/jsapi-components/src/useFormatter.ts +++ b/packages/jsapi-components/src/useFormatter.ts @@ -1,8 +1,8 @@ import { useApi } from '@deephaven/jsapi-bootstrap'; import { createFormatterFromSettings, - Formatter, - Settings, + type Formatter, + type Settings, } from '@deephaven/jsapi-utils'; import { bindAllMethods } from '@deephaven/utils'; import { useMemo } from 'react'; diff --git a/packages/jsapi-components/src/useGetItemIndexByValue.test.ts b/packages/jsapi-components/src/useGetItemIndexByValue.test.ts index e21d20052..9cee8bf8c 100644 --- a/packages/jsapi-components/src/useGetItemIndexByValue.test.ts +++ b/packages/jsapi-components/src/useGetItemIndexByValue.test.ts @@ -1,7 +1,7 @@ import { renderHook } from '@testing-library/react-hooks'; -import { dh } from '@deephaven/jsapi-types'; -import { TableUtils } from '@deephaven/jsapi-utils'; -import { TestUtils } from '@deephaven/utils'; +import { type dh } from '@deephaven/jsapi-types'; +import { type TableUtils } from '@deephaven/jsapi-utils'; +import { TestUtils } from '@deephaven/test-utils'; import { useGetItemIndexByValue } from './useGetItemIndexByValue'; import { useTableUtils } from './useTableUtils'; diff --git a/packages/jsapi-components/src/useGetItemIndexByValue.ts b/packages/jsapi-components/src/useGetItemIndexByValue.ts index 685c9cb62..0a3abc51e 100644 --- a/packages/jsapi-components/src/useGetItemIndexByValue.ts +++ b/packages/jsapi-components/src/useGetItemIndexByValue.ts @@ -1,5 +1,5 @@ import { useCallback } from 'react'; -import { dh } from '@deephaven/jsapi-types'; +import { type dh } from '@deephaven/jsapi-types'; import { useTableUtils } from './useTableUtils'; /** diff --git a/packages/jsapi-components/src/useGetItemPosition.test.ts b/packages/jsapi-components/src/useGetItemPosition.test.ts index 8399b0dab..a4b9f02b2 100644 --- a/packages/jsapi-components/src/useGetItemPosition.test.ts +++ b/packages/jsapi-components/src/useGetItemPosition.test.ts @@ -1,8 +1,8 @@ import { renderHook } from '@testing-library/react-hooks'; import type { Column, Table } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useGetItemPosition, { - UseGetItemPositionOptions, + type UseGetItemPositionOptions, } from './useGetItemPosition'; const { asMock, createMockProxy } = TestUtils; diff --git a/packages/jsapi-components/src/useInitializeViewportData.test.ts b/packages/jsapi-components/src/useInitializeViewportData.test.ts index c3297b860..01359a526 100644 --- a/packages/jsapi-components/src/useInitializeViewportData.test.ts +++ b/packages/jsapi-components/src/useInitializeViewportData.test.ts @@ -1,8 +1,9 @@ import { act, renderHook } from '@testing-library/react-hooks'; import type { dh } from '@deephaven/jsapi-types'; import { generateEmptyKeyedItems } from '@deephaven/jsapi-utils'; -import { WindowedListData } from '@deephaven/react-hooks'; -import { ITEM_KEY_PREFIX, KeyedItem, TestUtils } from '@deephaven/utils'; +import { type WindowedListData } from '@deephaven/react-hooks'; +import { ITEM_KEY_PREFIX, type KeyedItem } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useInitializeViewportData from './useInitializeViewportData'; import useTableSize from './useTableSize'; diff --git a/packages/jsapi-components/src/useInitializeViewportData.ts b/packages/jsapi-components/src/useInitializeViewportData.ts index 7084c818d..93aaacab6 100644 --- a/packages/jsapi-components/src/useInitializeViewportData.ts +++ b/packages/jsapi-components/src/useInitializeViewportData.ts @@ -1,8 +1,11 @@ import { useEffect } from 'react'; import type { dh } from '@deephaven/jsapi-types'; import { generateEmptyKeyedItems } from '@deephaven/jsapi-utils'; -import { useWindowedListData, WindowedListData } from '@deephaven/react-hooks'; -import { KeyedItem } from '@deephaven/utils'; +import { + useWindowedListData, + type WindowedListData, +} from '@deephaven/react-hooks'; +import { type KeyedItem } from '@deephaven/utils'; import Log from '@deephaven/log'; import useTableSize from './useTableSize'; diff --git a/packages/jsapi-components/src/useNotNullOrEmptyFilter.test.ts b/packages/jsapi-components/src/useNotNullOrEmptyFilter.test.ts index 228aa0077..20a31367a 100644 --- a/packages/jsapi-components/src/useNotNullOrEmptyFilter.test.ts +++ b/packages/jsapi-components/src/useNotNullOrEmptyFilter.test.ts @@ -3,10 +3,10 @@ import type { Column, FilterCondition } from '@deephaven/jsapi-types'; import { createFilterConditionFactory, createNotNullOrEmptyFilterCondition, - FilterConditionFactory, - TableUtils, + type FilterConditionFactory, + type TableUtils, } from '@deephaven/jsapi-utils'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useNotNullOrEmptyFilter from './useNotNullOrEmptyFilter'; import useTableUtils from './useTableUtils'; diff --git a/packages/jsapi-components/src/useNotNullOrEmptyFilter.ts b/packages/jsapi-components/src/useNotNullOrEmptyFilter.ts index 2080d4f01..8112e1a8d 100644 --- a/packages/jsapi-components/src/useNotNullOrEmptyFilter.ts +++ b/packages/jsapi-components/src/useNotNullOrEmptyFilter.ts @@ -2,7 +2,7 @@ import { useMemo } from 'react'; import { createFilterConditionFactory, createNotNullOrEmptyFilterCondition, - FilterConditionFactory, + type FilterConditionFactory, } from '@deephaven/jsapi-utils'; import useTableUtils from './useTableUtils'; diff --git a/packages/jsapi-components/src/usePickerWithSelectedValues.test.ts b/packages/jsapi-components/src/usePickerWithSelectedValues.test.ts index 6db84d1d5..afd94256e 100644 --- a/packages/jsapi-components/src/usePickerWithSelectedValues.test.ts +++ b/packages/jsapi-components/src/usePickerWithSelectedValues.test.ts @@ -4,16 +4,17 @@ import { usePickerItemScale } from '@deephaven/components'; import { createSearchTextFilter, createSelectedValuesFilter, - FilterConditionFactory, - TableUtils, + type FilterConditionFactory, + type TableUtils, } from '@deephaven/jsapi-utils'; import { useDebouncedValue, type WindowedListData, } from '@deephaven/react-hooks'; -import { KeyedItem, TestUtils } from '@deephaven/utils'; +import { type KeyedItem } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import usePickerWithSelectedValues from './usePickerWithSelectedValues'; -import useViewportData, { UseViewportDataResult } from './useViewportData'; +import useViewportData, { type UseViewportDataResult } from './useViewportData'; import useViewportFilter from './useViewportFilter'; import useFilterConditionFactories from './useFilterConditionFactories'; import useTableUtils from './useTableUtils'; diff --git a/packages/jsapi-components/src/usePickerWithSelectedValues.ts b/packages/jsapi-components/src/usePickerWithSelectedValues.ts index 4b2bdac3d..d0c4ac591 100644 --- a/packages/jsapi-components/src/usePickerWithSelectedValues.ts +++ b/packages/jsapi-components/src/usePickerWithSelectedValues.ts @@ -1,9 +1,9 @@ -import { Key, useCallback, useMemo, useState } from 'react'; +import { type Key, useCallback, useMemo, useState } from 'react'; import type { dh } from '@deephaven/jsapi-types'; import { createSearchTextFilter, createSelectedValuesFilter, - FilterConditionFactory, + type FilterConditionFactory, } from '@deephaven/jsapi-utils'; import { useDebouncedCallback, @@ -11,9 +11,9 @@ import { usePromiseFactory, } from '@deephaven/react-hooks'; import { usePickerItemScale } from '@deephaven/components'; -import { KeyedItem, SelectionT } from '@deephaven/utils'; +import { type KeyedItem, type SelectionT } from '@deephaven/utils'; import useFilterConditionFactories from './useFilterConditionFactories'; -import useViewportData, { UseViewportDataResult } from './useViewportData'; +import useViewportData, { type UseViewportDataResult } from './useViewportData'; import useViewportFilter from './useViewportFilter'; import useTableUtils from './useTableUtils'; import useTableClose from './useTableClose'; diff --git a/packages/jsapi-components/src/useSearchableViewportData.test.ts b/packages/jsapi-components/src/useSearchableViewportData.test.ts index d09cea957..24bfc0c8d 100644 --- a/packages/jsapi-components/src/useSearchableViewportData.test.ts +++ b/packages/jsapi-components/src/useSearchableViewportData.test.ts @@ -4,13 +4,13 @@ import { TABLE_ROW_HEIGHT } from '@deephaven/components'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { createSearchTextFilter, - FilterConditionFactory, - TableUtils, + type FilterConditionFactory, + type TableUtils, } from '@deephaven/jsapi-utils'; import { useDebouncedCallback } from '@deephaven/react-hooks'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useSearchableViewportData from './useSearchableViewportData'; -import useViewportData, { UseViewportDataResult } from './useViewportData'; +import useViewportData, { type UseViewportDataResult } from './useViewportData'; import useTableUtils from './useTableUtils'; import useFilterConditionFactories from './useFilterConditionFactories'; import useViewportFilter from './useViewportFilter'; diff --git a/packages/jsapi-components/src/useSearchableViewportData.ts b/packages/jsapi-components/src/useSearchableViewportData.ts index a0e2abd62..af007380b 100644 --- a/packages/jsapi-components/src/useSearchableViewportData.ts +++ b/packages/jsapi-components/src/useSearchableViewportData.ts @@ -3,13 +3,13 @@ import { TABLE_ROW_HEIGHT } from '@deephaven/components'; import type { dh } from '@deephaven/jsapi-types'; import { createSearchTextFilter, - FilterConditionFactory, + type FilterConditionFactory, } from '@deephaven/jsapi-utils'; import { useDebouncedCallback } from '@deephaven/react-hooks'; import { useTableUtils } from './useTableUtils'; import useViewportData, { - UseViewportDataProps, - UseViewportDataResult, + type UseViewportDataProps, + type UseViewportDataResult, } from './useViewportData'; import useFilterConditionFactories from './useFilterConditionFactories'; import useViewportFilter from './useViewportFilter'; diff --git a/packages/jsapi-components/src/useSelectDistinctTable.test.ts b/packages/jsapi-components/src/useSelectDistinctTable.test.ts index 17636f5d0..df3a61686 100644 --- a/packages/jsapi-components/src/useSelectDistinctTable.test.ts +++ b/packages/jsapi-components/src/useSelectDistinctTable.test.ts @@ -1,5 +1,5 @@ import type { Table } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { renderHook } from '@testing-library/react-hooks'; import useSelectDistinctTable from './useSelectDistinctTable'; diff --git a/packages/jsapi-components/src/useSetPaddedViewportCallback.test.ts b/packages/jsapi-components/src/useSetPaddedViewportCallback.test.ts index d81ba6356..6dcd73f6b 100644 --- a/packages/jsapi-components/src/useSetPaddedViewportCallback.test.ts +++ b/packages/jsapi-components/src/useSetPaddedViewportCallback.test.ts @@ -1,6 +1,6 @@ import { renderHook } from '@testing-library/react-hooks'; import type { Table } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useSetPaddedViewportCallback from './useSetPaddedViewportCallback'; beforeEach(() => { diff --git a/packages/jsapi-components/src/useShowOnlyEmptyFilter.test.ts b/packages/jsapi-components/src/useShowOnlyEmptyFilter.test.ts index f7d08fed0..b89d39ffc 100644 --- a/packages/jsapi-components/src/useShowOnlyEmptyFilter.test.ts +++ b/packages/jsapi-components/src/useShowOnlyEmptyFilter.test.ts @@ -3,9 +3,9 @@ import type { FilterCondition } from '@deephaven/jsapi-types'; import { createFilterConditionFactory, createShowOnlyEmptyFilterCondition, - TableUtils, + type TableUtils, } from '@deephaven/jsapi-utils'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useShowOnlyEmptyFilter from './useShowOnlyEmptyFilter'; import useTableUtils from './useTableUtils'; diff --git a/packages/jsapi-components/src/useShowOnlyEmptyFilter.ts b/packages/jsapi-components/src/useShowOnlyEmptyFilter.ts index 267d307cf..185fcf1c0 100644 --- a/packages/jsapi-components/src/useShowOnlyEmptyFilter.ts +++ b/packages/jsapi-components/src/useShowOnlyEmptyFilter.ts @@ -2,7 +2,7 @@ import { useMemo } from 'react'; import { createFilterConditionFactory, createShowOnlyEmptyFilterCondition, - FilterConditionFactory, + type FilterConditionFactory, } from '@deephaven/jsapi-utils'; import useTableUtils from './useTableUtils'; diff --git a/packages/jsapi-components/src/useTableClose.test.ts b/packages/jsapi-components/src/useTableClose.test.ts index 16bb4f109..64a5fdb79 100644 --- a/packages/jsapi-components/src/useTableClose.test.ts +++ b/packages/jsapi-components/src/useTableClose.test.ts @@ -1,6 +1,6 @@ import { renderHook } from '@testing-library/react-hooks'; import type { dh } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useTableClose from './useTableClose'; const table = TestUtils.createMockProxy({}); diff --git a/packages/jsapi-components/src/useTableSize.test.ts b/packages/jsapi-components/src/useTableSize.test.ts index fc296efcf..cd54cc3ce 100644 --- a/packages/jsapi-components/src/useTableSize.test.ts +++ b/packages/jsapi-components/src/useTableSize.test.ts @@ -1,7 +1,7 @@ import { act, renderHook } from '@testing-library/react-hooks'; import dh from '@deephaven/jsapi-shim'; import type { dh as DhType } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useTableSize from './useTableSize'; import useTableListener from './useTableListener'; import { makeApiContextWrapper } from './HookTestUtils'; diff --git a/packages/jsapi-components/src/useValueFilter.test.ts b/packages/jsapi-components/src/useValueFilter.test.ts index 2fd72502a..663e6e791 100644 --- a/packages/jsapi-components/src/useValueFilter.test.ts +++ b/packages/jsapi-components/src/useValueFilter.test.ts @@ -2,10 +2,10 @@ import { useMemo } from 'react'; import { renderHook } from '@testing-library/react-hooks'; import { createValueFilter, - FilterConditionFactory, - TableUtils, + type FilterConditionFactory, + type TableUtils, } from '@deephaven/jsapi-utils'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useValueFilter from './useValueFilter'; import useTableUtils from './useTableUtils'; diff --git a/packages/jsapi-components/src/useValueFilter.ts b/packages/jsapi-components/src/useValueFilter.ts index b93939209..d1009e943 100644 --- a/packages/jsapi-components/src/useValueFilter.ts +++ b/packages/jsapi-components/src/useValueFilter.ts @@ -1,7 +1,7 @@ import { useMemo } from 'react'; import { createValueFilter, - FilterConditionFactory, + type FilterConditionFactory, } from '@deephaven/jsapi-utils'; import useTableUtils from './useTableUtils'; diff --git a/packages/jsapi-components/src/useViewportData.test.tsx b/packages/jsapi-components/src/useViewportData.test.tsx index 2072f4436..2afe47dc0 100644 --- a/packages/jsapi-components/src/useViewportData.test.tsx +++ b/packages/jsapi-components/src/useViewportData.test.tsx @@ -2,15 +2,14 @@ import { act, renderHook } from '@testing-library/react-hooks'; import type { dh as DhType } from '@deephaven/jsapi-types'; import dh from '@deephaven/jsapi-shim'; import { - OnTableUpdatedEvent, - ViewportRow, + type OnTableUpdatedEvent, generateEmptyKeyedItems, isClosed, ITEM_KEY_PREFIX, } from '@deephaven/jsapi-utils'; import { useOnScrollOffsetChangeCallback } from '@deephaven/react-hooks'; -import { TestUtils } from '@deephaven/utils'; -import useViewportData, { UseViewportDataProps } from './useViewportData'; +import { TestUtils } from '@deephaven/test-utils'; +import useViewportData, { type UseViewportDataProps } from './useViewportData'; import { makeApiContextWrapper } from './HookTestUtils'; import { useTableSize } from './useTableSize'; import { useSetPaddedViewportCallback } from './useSetPaddedViewportCallback'; @@ -23,13 +22,9 @@ jest.mock('@deephaven/react-hooks', () => ({ jest.mock('./useSetPaddedViewportCallback'); jest.mock('./useTableSize'); -function mockViewportRow(offsetInSnapshot: number): ViewportRow { - return { offsetInSnapshot } as ViewportRow; -} - function mockUpdateEvent( offset: number, - rows: ViewportRow[] + rows: DhType.Row[] ): OnTableUpdatedEvent { return { detail: { @@ -213,14 +208,14 @@ it('should update state on dh.Table.EVENT_UPDATED event', () => { ); const offset = 3; - const row = mockViewportRow(5); + const row = TestUtils.createMockProxy(); const event = mockUpdateEvent(offset, [row]); act(() => { updateEventHandler?.(event); }); - const expectedKeyIndex = offset + row.offsetInSnapshot; + const expectedKeyIndex = offset; const expectedInitialItems = [...generateEmptyKeyedItems(0, table.size - 1)]; const expectedItems = [ ...expectedInitialItems.slice(0, expectedKeyIndex), diff --git a/packages/jsapi-components/src/useViewportData.ts b/packages/jsapi-components/src/useViewportData.ts index 92348fb73..f3bbbf002 100644 --- a/packages/jsapi-components/src/useViewportData.ts +++ b/packages/jsapi-components/src/useViewportData.ts @@ -1,19 +1,19 @@ import { useCallback, useEffect, useMemo, useRef } from 'react'; import type { dh } from '@deephaven/jsapi-types'; import { - RowDeserializer, + type RowDeserializer, defaultRowDeserializer, isClosed, createOnTableUpdatedHandler, - OnTableUpdatedEvent, + type OnTableUpdatedEvent, } from '@deephaven/jsapi-utils'; import Log from '@deephaven/log'; import { useApi } from '@deephaven/jsapi-bootstrap'; import { useOnScrollOffsetChangeCallback, - WindowedListData, + type WindowedListData, } from '@deephaven/react-hooks'; -import { KeyedItem } from '@deephaven/utils'; +import { type KeyedItem } from '@deephaven/utils'; import useInitializeViewportData from './useInitializeViewportData'; import useSetPaddedViewportCallback from './useSetPaddedViewportCallback'; import useTableSize from './useTableSize'; diff --git a/packages/jsapi-components/src/useViewportFilter.test.ts b/packages/jsapi-components/src/useViewportFilter.test.ts index 9d60b680a..39f484dce 100644 --- a/packages/jsapi-components/src/useViewportFilter.test.ts +++ b/packages/jsapi-components/src/useViewportFilter.test.ts @@ -1,7 +1,7 @@ import { renderHook } from '@testing-library/react-hooks'; import type { FilterCondition, Table } from '@deephaven/jsapi-types'; import useViewportFilter from './useViewportFilter'; -import { UseViewportDataResult } from './useViewportData'; +import { type UseViewportDataResult } from './useViewportData'; beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/jsapi-components/src/useViewportFilter.ts b/packages/jsapi-components/src/useViewportFilter.ts index f4ef61b87..68b884dc7 100644 --- a/packages/jsapi-components/src/useViewportFilter.ts +++ b/packages/jsapi-components/src/useViewportFilter.ts @@ -1,6 +1,6 @@ import { useEffect } from 'react'; import type { dh } from '@deephaven/jsapi-types'; -import { UseViewportDataResult } from './useViewportData'; +import { type UseViewportDataResult } from './useViewportData'; /** * Applies a filter to a viewport. diff --git a/packages/jsapi-components/tsconfig.json b/packages/jsapi-components/tsconfig.json index 6351ddd1c..e60b89090 100644 --- a/packages/jsapi-components/tsconfig.json +++ b/packages/jsapi-components/tsconfig.json @@ -11,6 +11,7 @@ { "path": "../jsapi-bootstrap" }, { "path": "../jsapi-shim" }, { "path": "../jsapi-utils" }, - { "path": "../log" } + { "path": "../log" }, + { "path": "../test-utils" } ] } diff --git a/packages/jsapi-shim/CHANGELOG.md b/packages/jsapi-shim/CHANGELOG.md index 8978f690d..0133ccb42 100644 --- a/packages/jsapi-shim/CHANGELOG.md +++ b/packages/jsapi-shim/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +**Note:** Version bump only for package @deephaven/jsapi-shim + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/jsapi-shim + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/jsapi-shim + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/jsapi-shim diff --git a/packages/jsapi-shim/package.json b/packages/jsapi-shim/package.json index 13a724d61..fe96a62bf 100644 --- a/packages/jsapi-shim/package.json +++ b/packages/jsapi-shim/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/jsapi-shim", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven JSAPI Shim", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/jsapi-utils/CHANGELOG.md b/packages/jsapi-utils/CHANGELOG.md index 5f207e3d9..1dcf53dea 100644 --- a/packages/jsapi-utils/CHANGELOG.md +++ b/packages/jsapi-utils/CHANGELOG.md @@ -3,6 +3,35 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +### Bug Fixes + +- Use correct offset in snapshot ([#2217](https://github.com/deephaven/web-client-ui/issues/2217)) ([a479d6c](https://github.com/deephaven/web-client-ui/commit/a479d6c5f907f53aaa6500845ea168ab0eb9bb09)) + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) ### Features diff --git a/packages/jsapi-utils/package.json b/packages/jsapi-utils/package.json index b0ec40949..53d1ced8f 100644 --- a/packages/jsapi-utils/package.json +++ b/packages/jsapi-utils/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/jsapi-utils", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven JSAPI Utils", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -29,7 +29,8 @@ "nanoid": "^5.0.7" }, "devDependencies": { - "@deephaven/jsapi-shim": "file:../jsapi-shim" + "@deephaven/jsapi-shim": "file:../jsapi-shim", + "@deephaven/test-utils": "file:../test-utils" }, "files": [ "dist" diff --git a/packages/jsapi-utils/src/FilterUtils.test.ts b/packages/jsapi-utils/src/FilterUtils.test.ts index c997a765c..e103341f4 100644 --- a/packages/jsapi-utils/src/FilterUtils.test.ts +++ b/packages/jsapi-utils/src/FilterUtils.test.ts @@ -1,7 +1,8 @@ -import { Key } from 'react'; +import { type Key } from 'react'; import dh from '@deephaven/jsapi-shim'; import type { dh as DhType } from '@deephaven/jsapi-types'; -import { KeyedItem, TestUtils } from '@deephaven/utils'; +import { type KeyedItem } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { createComboboxFilterArgs, createFilterConditionFactory, diff --git a/packages/jsapi-utils/src/FilterUtils.ts b/packages/jsapi-utils/src/FilterUtils.ts index 9022130f5..c8575f468 100644 --- a/packages/jsapi-utils/src/FilterUtils.ts +++ b/packages/jsapi-utils/src/FilterUtils.ts @@ -1,6 +1,6 @@ import type { dh } from '@deephaven/jsapi-types'; import type { SelectionT } from '@deephaven/utils'; -import TableUtils from './TableUtils'; +import type TableUtils from './TableUtils'; export interface FilterConditionFactory { ( diff --git a/packages/jsapi-utils/src/Formatter.test.ts b/packages/jsapi-utils/src/Formatter.test.ts index 9d6a5c50c..c0fc6cb31 100644 --- a/packages/jsapi-utils/src/Formatter.test.ts +++ b/packages/jsapi-utils/src/Formatter.test.ts @@ -7,8 +7,8 @@ import { DecimalColumnFormatter, DefaultColumnFormatter, IntegerColumnFormatter, - TableColumnFormat, - TableColumnFormatType, + type TableColumnFormat, + type TableColumnFormatType, } from './formatters'; import TableUtils from './TableUtils'; diff --git a/packages/jsapi-utils/src/Formatter.ts b/packages/jsapi-utils/src/Formatter.ts index ece2104b5..3c67b9ecc 100644 --- a/packages/jsapi-utils/src/Formatter.ts +++ b/packages/jsapi-utils/src/Formatter.ts @@ -1,6 +1,6 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; import { assertInstanceOf } from '@deephaven/utils'; -import TableUtils, { DataType } from './TableUtils'; +import TableUtils, { type DataType } from './TableUtils'; import { BooleanColumnFormatter, CharColumnFormatter, @@ -9,8 +9,8 @@ import { DefaultColumnFormatter, IntegerColumnFormatter, StringColumnFormatter, - TableColumnFormat, - TableColumnFormatter, + type TableColumnFormat, + type TableColumnFormatter, } from './formatters'; export type ColumnName = string; diff --git a/packages/jsapi-utils/src/FormatterUtils.test.ts b/packages/jsapi-utils/src/FormatterUtils.test.ts index 97bb49e5b..7e2277cab 100644 --- a/packages/jsapi-utils/src/FormatterUtils.test.ts +++ b/packages/jsapi-utils/src/FormatterUtils.test.ts @@ -1,21 +1,22 @@ import dh from '@deephaven/jsapi-shim'; -import { TestUtils } from '@deephaven/utils'; -import Formatter, { FormattingRule } from './Formatter'; +import { TestUtils } from '@deephaven/test-utils'; +import Formatter, { type FormattingRule } from './Formatter'; import FormatterUtils, { createFormatterFromSettings, getColumnFormats, getDateTimeFormatterOptions, } from './FormatterUtils'; import { - TableColumnFormat, + type TableColumnFormat, TableColumnFormatter, - TableColumnFormatType, + type TableColumnFormatType, } from './formatters'; import TableUtils from './TableUtils'; -import Settings, { - ColumnFormatSettings, - DateTimeFormatSettings, +import { + type ColumnFormatSettings, + type DateTimeFormatSettings, } from './Settings'; +import type Settings from './Settings'; jest.mock('./Formatter', () => { const FormatterActual = jest.requireActual('./Formatter').default; diff --git a/packages/jsapi-utils/src/FormatterUtils.ts b/packages/jsapi-utils/src/FormatterUtils.ts index d25957a56..450fb3e4e 100644 --- a/packages/jsapi-utils/src/FormatterUtils.ts +++ b/packages/jsapi-utils/src/FormatterUtils.ts @@ -1,11 +1,15 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; import type { FormattingRule } from './Formatter'; import Formatter from './Formatter'; -import { DateTimeColumnFormatter, TableColumnFormatter } from './formatters'; -import Settings, { - ColumnFormatSettings, - DateTimeFormatSettings, +import { + type DateTimeColumnFormatter, + TableColumnFormatter, +} from './formatters'; +import { + type ColumnFormatSettings, + type DateTimeFormatSettings, } from './Settings'; +import type Settings from './Settings'; /** * Instantiate a `Formatter` from the given settings. diff --git a/packages/jsapi-utils/src/MessageUtils.test.ts b/packages/jsapi-utils/src/MessageUtils.test.ts index a7a390c64..31c7a7a8d 100644 --- a/packages/jsapi-utils/src/MessageUtils.test.ts +++ b/packages/jsapi-utils/src/MessageUtils.test.ts @@ -1,8 +1,8 @@ -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { makeMessage, makeResponse, - Message, + type Message, requestParentResponse, } from './MessageUtils'; diff --git a/packages/jsapi-utils/src/Settings.ts b/packages/jsapi-utils/src/Settings.ts index 40f324021..92d40c97b 100644 --- a/packages/jsapi-utils/src/Settings.ts +++ b/packages/jsapi-utils/src/Settings.ts @@ -1,4 +1,4 @@ -import { FormattingRule } from './Formatter'; +import { type FormattingRule } from './Formatter'; export interface ColumnFormatSettings { formatter?: FormattingRule[]; diff --git a/packages/jsapi-utils/src/TableUtils.test.ts b/packages/jsapi-utils/src/TableUtils.test.ts index ed2fb19e7..8f0a46988 100644 --- a/packages/jsapi-utils/src/TableUtils.test.ts +++ b/packages/jsapi-utils/src/TableUtils.test.ts @@ -4,15 +4,16 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; import { Operator as FilterOperator, Type as FilterType, - TypeValue as FilterTypeValue, + type TypeValue as FilterTypeValue, } from '@deephaven/filters'; -import { getAllMethodNames, TestUtils } from '@deephaven/utils'; -import TableUtils, { DataType, SortDirection } from './TableUtils'; +import { getAllMethodNames } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; +import TableUtils, { type DataType, type SortDirection } from './TableUtils'; import DateUtils from './DateUtils'; // eslint-disable-next-line import/no-relative-packages import IrisGridTestUtils from '../../iris-grid/src/IrisGridTestUtils'; -import { ColumnName } from './Formatter'; -import { createValueFilter, FilterConditionFactory } from './FilterUtils'; +import { type ColumnName } from './Formatter'; +import { createValueFilter, type FilterConditionFactory } from './FilterUtils'; import { getSize } from './ViewportDataUtils'; type Column = DhType.Column; diff --git a/packages/jsapi-utils/src/TableUtils.ts b/packages/jsapi-utils/src/TableUtils.ts index 3903959dd..6b16267c0 100644 --- a/packages/jsapi-utils/src/TableUtils.ts +++ b/packages/jsapi-utils/src/TableUtils.ts @@ -1,23 +1,23 @@ import { Type as FilterType, Operator as FilterOperator, - TypeValue as FilterTypeValue, - OperatorValue as FilterOperatorValue, + type TypeValue as FilterTypeValue, + type OperatorValue as FilterOperatorValue, } from '@deephaven/filters'; import Log from '@deephaven/log'; import type { dh as DhType } from '@deephaven/jsapi-types'; import { assertNotNull, bindAllMethods, - CancelablePromise, + type CancelablePromise, PromiseUtils, removeNullAndUndefined, TextUtils, TimeoutError, } from '@deephaven/utils'; import DateUtils from './DateUtils'; -import { ColumnName } from './Formatter'; -import { createValueFilter, FilterConditionFactory } from './FilterUtils'; +import { type ColumnName } from './Formatter'; +import { createValueFilter, type FilterConditionFactory } from './FilterUtils'; import { getSize } from './ViewportDataUtils'; const log = Log.module('TableUtils'); diff --git a/packages/jsapi-utils/src/ViewportDataUtils.test.ts b/packages/jsapi-utils/src/ViewportDataUtils.test.ts index 0bdc658b9..5f1756172 100644 --- a/packages/jsapi-utils/src/ViewportDataUtils.test.ts +++ b/packages/jsapi-utils/src/ViewportDataUtils.test.ts @@ -1,12 +1,10 @@ import { act } from '@testing-library/react-hooks'; -import { dh } from '@deephaven/jsapi-types'; -import { TestUtils } from '@deephaven/utils'; +import { type dh } from '@deephaven/jsapi-types'; +import { TestUtils } from '@deephaven/test-utils'; import { ITEM_KEY_PREFIX, - OnTableUpdatedEvent, - RowDeserializer, - ViewportRow, - createKeyFromOffsetRow, + type OnTableUpdatedEvent, + type RowDeserializer, createOnTableUpdatedHandler, defaultRowDeserializer, generateEmptyKeyedItems, @@ -18,10 +16,6 @@ import { const { asMock, createMockProxy } = TestUtils; -function mockViewportRow(offsetInSnapshot: number): ViewportRow { - return { offsetInSnapshot } as ViewportRow; -} - function mockColumn(name: string) { return { name, @@ -44,28 +38,15 @@ describe('createdKeyedItemKey', () => { }); }); -describe('createKeyFromOffsetRow', () => { - it.each([ - [{ offsetInSnapshot: 4 } as ViewportRow, 5, `${ITEM_KEY_PREFIX}_9`], - [{ offsetInSnapshot: 27 } as ViewportRow, 99, `${ITEM_KEY_PREFIX}_126`], - ] as const)( - 'should create a string key based on the actual row offset: %o', - (row, offset, expected) => { - const actual = createKeyFromOffsetRow(row, offset); - expect(actual).toEqual(expected); - } - ); -}); - describe('createOnTableUpdatedHandler', () => { const mock = { deserializeRow: jest.fn() as RowDeserializer, rows: [ - createMockProxy({ offsetInSnapshot: 0 }), - createMockProxy({ offsetInSnapshot: 1 }), - createMockProxy({ offsetInSnapshot: 2 }), + createMockProxy(), + createMockProxy(), + createMockProxy(), ], - updateEvent: (offset: number, rows: ViewportRow[], columns: dh.Column[]) => + updateEvent: (offset: number, rows: dh.Row[], columns: dh.Column[]) => createMockProxy({ detail: { offset, @@ -107,10 +88,11 @@ describe('createOnTableUpdatedHandler', () => { describe('defaultRowDeserializer', () => { it('should map all columns with original names', () => { - const row = mockViewportRow(10); - // mock our get function by mapping capital column name to lowercase value - // e.g. A: 'a' - row.get = jest.fn(({ name }: { name: string }) => name.toLowerCase()); + const row = createMockProxy({ + // mock our get function by mapping capital column name to lowercase value + // e.g. A: 'a' + get: jest.fn(({ name }: { name: string }) => name.toLowerCase()), + }); const actual = defaultRowDeserializer(row, [ mockColumn('A'), diff --git a/packages/jsapi-utils/src/ViewportDataUtils.ts b/packages/jsapi-utils/src/ViewportDataUtils.ts index e3d4a9b92..c0d55324c 100644 --- a/packages/jsapi-utils/src/ViewportDataUtils.ts +++ b/packages/jsapi-utils/src/ViewportDataUtils.ts @@ -2,19 +2,17 @@ import type { Key } from 'react'; import clamp from 'lodash.clamp'; import type { dh } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; -import { KeyedItem, ValueOf } from '@deephaven/utils'; +import { type KeyedItem, type ValueOf } from '@deephaven/utils'; export const ITEM_KEY_PREFIX = 'DH_ITEM_KEY'; export type OnTableUpdatedEvent = CustomEvent<{ offset: number; columns: dh.Column[]; - rows: ViewportRow[]; + rows: dh.Row[]; }>; -export type RowDeserializer = (row: ViewportRow, columns: dh.Column[]) => T; - -export type ViewportRow = dh.Row & { offsetInSnapshot: number }; +export type RowDeserializer = (row: dh.Row, columns: dh.Column[]) => T; const log = Log.module('ViewportDataUtils'); @@ -29,21 +27,6 @@ export function createKeyedItemKey(index: number): string { return `${ITEM_KEY_PREFIX}_${index}`; } -/** - * Create a unique string key for a row based on its ordinal position in its - * source table. This is calculated based on it's offset in the viewport - * (row.offsetInSnapshot) + the offset of the snapshot. - * @param row Row from a Table update event. - * @param offset Offset of the current viewport. - * @returns Unique string key for the ordinal position of the given row. - */ -export function createKeyFromOffsetRow( - row: ViewportRow, - offset: number -): string { - return createKeyedItemKey(row.offsetInSnapshot + offset); -} - /** * Creates a handler function for a `dh.Table.EVENT_UPDATED` event. Rows that * get passed to the handler will be bulk updated in the given `viewportData` @@ -66,9 +49,9 @@ export function createOnTableUpdatedHandler( const updateKeyMap = new Map>(); - rows.forEach(row => { + rows.forEach((row, offsetInSnapshot) => { const item = deserializeRow(row, columns); - const key = createKeyFromOffsetRow(row, offset); + const key = createKeyedItemKey(offset + offsetInSnapshot); updateKeyMap.set(key, { key, item }); }); @@ -86,7 +69,7 @@ export function createOnTableUpdatedHandler( * @returns A key / value object for the row. */ export function defaultRowDeserializer( - row: ViewportRow, + row: dh.Row, columns: dh.Column[] ): T { return columns.reduce((result, col) => { diff --git a/packages/jsapi-utils/src/formatters/DateTimeColumnFormatter.test.ts b/packages/jsapi-utils/src/formatters/DateTimeColumnFormatter.test.ts index 519711c4f..e42e100f1 100644 --- a/packages/jsapi-utils/src/formatters/DateTimeColumnFormatter.test.ts +++ b/packages/jsapi-utils/src/formatters/DateTimeColumnFormatter.test.ts @@ -1,7 +1,7 @@ import dh from '@deephaven/jsapi-shim'; import type { TimeZone } from '@deephaven/jsapi-types'; import DateTimeColumnFormatter from './DateTimeColumnFormatter'; -import { TableColumnFormat } from './TableColumnFormatter'; +import { type TableColumnFormat } from './TableColumnFormatter'; function makeFormatter({ timeZone, diff --git a/packages/jsapi-utils/src/formatters/DateTimeColumnFormatter.ts b/packages/jsapi-utils/src/formatters/DateTimeColumnFormatter.ts index 1b0212065..efde2a9e1 100644 --- a/packages/jsapi-utils/src/formatters/DateTimeColumnFormatter.ts +++ b/packages/jsapi-utils/src/formatters/DateTimeColumnFormatter.ts @@ -2,7 +2,7 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; import TableColumnFormatter, { - TableColumnFormat, + type TableColumnFormat, } from './TableColumnFormatter'; const log = Log.module('DateTimeColumnFormatter'); diff --git a/packages/jsapi-utils/src/formatters/DecimalColumnFormatter.ts b/packages/jsapi-utils/src/formatters/DecimalColumnFormatter.ts index de09a154d..e6cba5d11 100644 --- a/packages/jsapi-utils/src/formatters/DecimalColumnFormatter.ts +++ b/packages/jsapi-utils/src/formatters/DecimalColumnFormatter.ts @@ -2,7 +2,7 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; import TableColumnFormatter, { - TableColumnFormat, + type TableColumnFormat, } from './TableColumnFormatter'; const log = Log.module('DecimalColumnFormatter'); diff --git a/packages/jsapi-utils/src/formatters/IntegerColumnFormatter.ts b/packages/jsapi-utils/src/formatters/IntegerColumnFormatter.ts index 73cad020e..1a1b04dae 100644 --- a/packages/jsapi-utils/src/formatters/IntegerColumnFormatter.ts +++ b/packages/jsapi-utils/src/formatters/IntegerColumnFormatter.ts @@ -2,7 +2,7 @@ import type { dh as DhType } from '@deephaven/jsapi-types'; import Log from '@deephaven/log'; import TableColumnFormatter, { - TableColumnFormat, + type TableColumnFormat, } from './TableColumnFormatter'; const log = Log.module('IntegerColumnFormatter'); diff --git a/packages/jsapi-utils/src/formatters/NumberColumnFormatter.test.ts b/packages/jsapi-utils/src/formatters/NumberColumnFormatter.test.ts index 6329895eb..c20b0c74d 100644 --- a/packages/jsapi-utils/src/formatters/NumberColumnFormatter.test.ts +++ b/packages/jsapi-utils/src/formatters/NumberColumnFormatter.test.ts @@ -1,7 +1,7 @@ import dh from '@deephaven/jsapi-shim'; import DecimalColumnFormatter from './DecimalColumnFormatter'; import IntegerColumnFormatter from './IntegerColumnFormatter'; -import { TableColumnFormat } from './TableColumnFormatter'; +import { type TableColumnFormat } from './TableColumnFormatter'; const numberColumnFormatters = [ { diff --git a/packages/jsapi-utils/src/formatters/TableColumnFormatter.test.ts b/packages/jsapi-utils/src/formatters/TableColumnFormatter.test.ts index b0934226e..41ad8879c 100644 --- a/packages/jsapi-utils/src/formatters/TableColumnFormatter.test.ts +++ b/packages/jsapi-utils/src/formatters/TableColumnFormatter.test.ts @@ -1,5 +1,5 @@ import TableColumnFormatter, { - TableColumnFormat, + type TableColumnFormat, } from './TableColumnFormatter'; const VALID_FORMAT: TableColumnFormat = { diff --git a/packages/jsapi-utils/tsconfig.json b/packages/jsapi-utils/tsconfig.json index cbf29e488..cca74d401 100644 --- a/packages/jsapi-utils/tsconfig.json +++ b/packages/jsapi-utils/tsconfig.json @@ -10,6 +10,7 @@ { "path": "../filters" }, { "path": "../jsapi-shim" }, { "path": "../log" }, + { "path": "../test-utils" }, { "path": "../utils" } ] } diff --git a/packages/log/CHANGELOG.md b/packages/log/CHANGELOG.md index e9efd997d..d6f0eacb7 100644 --- a/packages/log/CHANGELOG.md +++ b/packages/log/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/log + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/log + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/log diff --git a/packages/log/package.json b/packages/log/package.json index 82683979c..7fce909fc 100644 --- a/packages/log/package.json +++ b/packages/log/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/log", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Logger", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/log/src/LogHistory.ts b/packages/log/src/LogHistory.ts index 48510a2e4..985ba40fd 100644 --- a/packages/log/src/LogHistory.ts +++ b/packages/log/src/LogHistory.ts @@ -1,4 +1,4 @@ -import { LogProxy, LOG_PROXY_TYPE } from './LogProxy'; +import { type LogProxy, LOG_PROXY_TYPE } from './LogProxy'; type HistoryItem = { type: LOG_PROXY_TYPE; diff --git a/packages/log/src/LogProxy.ts b/packages/log/src/LogProxy.ts index 85315dd6c..eabe8caac 100644 --- a/packages/log/src/LogProxy.ts +++ b/packages/log/src/LogProxy.ts @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -import { EventTarget, Event } from 'event-target-shim'; +import { EventTarget, type Event } from 'event-target-shim'; import Log from './Log'; export enum LOG_PROXY_TYPE { @@ -124,15 +124,20 @@ export class LogProxy { type: LOG_PROXY_TYPE, listener: (event: CustomEvent) => void ): void { - // The cast as EventListener is a dumb TypeScript issue - this.eventTarget.addEventListener(type, listener as EventListener); + this.eventTarget.addEventListener( + type, + listener as Parameters[1] + ); } removeEventListener( type: LOG_PROXY_TYPE, listener: (event: CustomEvent) => void ): void { - this.eventTarget.removeEventListener(type, listener as EventListener); + this.eventTarget.removeEventListener( + type, + listener as Parameters[1] + ); } } diff --git a/packages/mocks/CHANGELOG.md b/packages/mocks/CHANGELOG.md index 1e18046a1..e98cd99b3 100644 --- a/packages/mocks/CHANGELOG.md +++ b/packages/mocks/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +**Note:** Version bump only for package @deephaven/mocks + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/mocks + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/mocks + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/mocks diff --git a/packages/mocks/package.json b/packages/mocks/package.json index bdb8d2daa..d1cdd89e4 100644 --- a/packages/mocks/package.json +++ b/packages/mocks/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/mocks", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Mocks for common libraries", "repository": { "type": "git", diff --git a/packages/plugin/CHANGELOG.md b/packages/plugin/CHANGELOG.md index bf4c8fda6..2cb35ba52 100644 --- a/packages/plugin/CHANGELOG.md +++ b/packages/plugin/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/plugin + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/plugin + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/plugin diff --git a/packages/plugin/package.json b/packages/plugin/package.json index 8eb16b24d..031438100 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/plugin", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven JS Plugin Core", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/plugin/src/PluginTypes.test.ts b/packages/plugin/src/PluginTypes.test.ts index 4593ae155..9236bdd5b 100644 --- a/packages/plugin/src/PluginTypes.test.ts +++ b/packages/plugin/src/PluginTypes.test.ts @@ -5,7 +5,7 @@ import { isTablePlugin, isThemePlugin, isWidgetPlugin, - Plugin, + type Plugin, isPlugin, } from './PluginTypes'; diff --git a/packages/plugin/src/PluginTypes.ts b/packages/plugin/src/PluginTypes.ts index 3f63e780e..2d67120d4 100644 --- a/packages/plugin/src/PluginTypes.ts +++ b/packages/plugin/src/PluginTypes.ts @@ -160,7 +160,7 @@ export interface WidgetPlugin extends Plugin { * If a react node is provided (including a string), it will be rendered directly. * If no icon is specified, the default widget icon will be used. */ - icon?: IconDefinition | React.ReactElement; + icon?: IconDefinition | React.ReactElement; } export function isWidgetPlugin(plugin: PluginModule): plugin is WidgetPlugin { diff --git a/packages/plugin/src/PluginUtils.test.tsx b/packages/plugin/src/PluginUtils.test.tsx index af34950ac..a600411f9 100644 --- a/packages/plugin/src/PluginUtils.test.tsx +++ b/packages/plugin/src/PluginUtils.test.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { ThemeData } from '@deephaven/components'; +import { type ThemeData } from '@deephaven/components'; import { dhTruck, vsPreview } from '@deephaven/icons'; import { type DashboardPlugin, diff --git a/packages/plugin/src/PluginUtils.tsx b/packages/plugin/src/PluginUtils.tsx index a2ef110b6..051aa3d5e 100644 --- a/packages/plugin/src/PluginUtils.tsx +++ b/packages/plugin/src/PluginUtils.tsx @@ -6,8 +6,8 @@ import Log from '@deephaven/log'; import { type PluginModule, isWidgetPlugin, - PluginModuleMap, - ThemePlugin, + type PluginModuleMap, + type ThemePlugin, isThemePlugin, } from './PluginTypes'; diff --git a/packages/plugin/src/TablePlugin.ts b/packages/plugin/src/TablePlugin.ts index 94a82ec3d..83909414c 100644 --- a/packages/plugin/src/TablePlugin.ts +++ b/packages/plugin/src/TablePlugin.ts @@ -5,7 +5,7 @@ import type { IrisGridContextMenuData, IrisGridModel, } from '@deephaven/iris-grid'; -import { GridRange } from '@deephaven/grid'; +import { type GridRange } from '@deephaven/grid'; import type { ResolvableContextAction } from '@deephaven/components'; import type { dh } from '@deephaven/jsapi-types'; diff --git a/packages/plugin/src/useDashboardPlugins.tsx b/packages/plugin/src/useDashboardPlugins.tsx index ffbd3350b..7e952131b 100644 --- a/packages/plugin/src/useDashboardPlugins.tsx +++ b/packages/plugin/src/useDashboardPlugins.tsx @@ -2,7 +2,7 @@ import { useMemo } from 'react'; import { isDashboardPlugin, isLegacyDashboardPlugin, - PluginModuleMap, + type PluginModuleMap, type DashboardPlugin, type LegacyDashboardPlugin, } from './PluginTypes'; diff --git a/packages/pouch-storage/CHANGELOG.md b/packages/pouch-storage/CHANGELOG.md index 69cb63bed..aad7f550c 100644 --- a/packages/pouch-storage/CHANGELOG.md +++ b/packages/pouch-storage/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/pouch-storage + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/pouch-storage + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/pouch-storage diff --git a/packages/pouch-storage/package.json b/packages/pouch-storage/package.json index 1f69bc11c..f7cc42d29 100644 --- a/packages/pouch-storage/package.json +++ b/packages/pouch-storage/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/pouch-storage", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Storage based on PouchDB", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/pouch-storage/src/PouchCommandHistoryCache.ts b/packages/pouch-storage/src/PouchCommandHistoryCache.ts index b879dca5f..2d71dea06 100644 --- a/packages/pouch-storage/src/PouchCommandHistoryCache.ts +++ b/packages/pouch-storage/src/PouchCommandHistoryCache.ts @@ -1,7 +1,7 @@ -import { CommandHistoryStorageItem } from '@deephaven/console'; +import { type CommandHistoryStorageItem } from '@deephaven/console'; import Log from '@deephaven/log'; -import PouchCommandHistoryTable from './PouchCommandHistoryTable'; -import { PouchStorageItem } from './PouchStorageTable'; +import type PouchCommandHistoryTable from './PouchCommandHistoryTable'; +import { type PouchStorageItem } from './PouchStorageTable'; type CommandHistoryStorageItemFindResponse = PouchDB.Find.FindResponse< CommandHistoryStorageItem & PouchStorageItem diff --git a/packages/pouch-storage/src/PouchCommandHistoryStorage.ts b/packages/pouch-storage/src/PouchCommandHistoryStorage.ts index 39ab6d2e5..af0d00ed8 100644 --- a/packages/pouch-storage/src/PouchCommandHistoryStorage.ts +++ b/packages/pouch-storage/src/PouchCommandHistoryStorage.ts @@ -1,13 +1,13 @@ /* eslint-disable class-methods-use-this */ import Log from '@deephaven/log'; import { - CommandHistoryStorage, - CommandHistoryStorageData, - CommandHistoryStorageItem, + type CommandHistoryStorage, + type CommandHistoryStorageData, + type CommandHistoryStorageItem, } from '@deephaven/console'; import { - StorageItemListener, - StorageListenerRemover, + type StorageItemListener, + type StorageListenerRemover, } from '@deephaven/storage'; import PouchCommandHistoryTable from './PouchCommandHistoryTable'; import PouchCommandHistoryCache from './PouchCommandHistoryCache'; diff --git a/packages/pouch-storage/src/PouchCommandHistoryTable.ts b/packages/pouch-storage/src/PouchCommandHistoryTable.ts index f1ab0deda..68ad8e708 100644 --- a/packages/pouch-storage/src/PouchCommandHistoryTable.ts +++ b/packages/pouch-storage/src/PouchCommandHistoryTable.ts @@ -1,20 +1,20 @@ import { - CommandHistoryStorageItem, - CommandHistoryTable, + type CommandHistoryStorageItem, + type CommandHistoryTable, } from '@deephaven/console'; import { Type as FilterType } from '@deephaven/filters'; import Log from '@deephaven/log'; import { - StorageTableViewport, + type StorageTableViewport, StorageUtils, - ViewportData, + type ViewportData, } from '@deephaven/storage'; import { PromiseUtils } from '@deephaven/utils'; -import PouchCommandHistoryCache from './PouchCommandHistoryCache'; +import type PouchCommandHistoryCache from './PouchCommandHistoryCache'; import { siftPrunableItems } from './pouchCommandHistoryUtils'; import PouchStorageTable, { - PouchDBSort, - PouchStorageItem, + type PouchDBSort, + type PouchStorageItem, } from './PouchStorageTable'; const COMMAND_HISTORY_ITEMS_MAX = 2500; diff --git a/packages/pouch-storage/src/PouchStorageTable.ts b/packages/pouch-storage/src/PouchStorageTable.ts index 5a174f9e8..cf8682e4a 100644 --- a/packages/pouch-storage/src/PouchStorageTable.ts +++ b/packages/pouch-storage/src/PouchStorageTable.ts @@ -6,20 +6,24 @@ import { } from '@deephaven/filters'; import Log from '@deephaven/log'; import { - FilterConfig, - FilterValue, - SortConfig, - StorageItem, - StorageTable, - StorageListenerRemover, - StorageTableViewport, - StorageItemListener, - StorageSnapshot, - ViewportData, - ViewportUpdateCallback, - IndexRange, + type FilterConfig, + type FilterValue, + type SortConfig, + type StorageItem, + type StorageTable, + type StorageListenerRemover, + type StorageTableViewport, + type StorageItemListener, + type StorageSnapshot, + type ViewportData, + type ViewportUpdateCallback, + type IndexRange, } from '@deephaven/storage'; -import { CancelablePromise, OnlyOneProp, PromiseUtils } from '@deephaven/utils'; +import { + type CancelablePromise, + type OnlyOneProp, + PromiseUtils, +} from '@deephaven/utils'; const log = Log.module('PouchStorageTable'); diff --git a/packages/prettier-config/CHANGELOG.md b/packages/prettier-config/CHANGELOG.md index 7f37c0d16..ffd1131c2 100644 --- a/packages/prettier-config/CHANGELOG.md +++ b/packages/prettier-config/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +**Note:** Version bump only for package @deephaven/prettier-config + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/prettier-config + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/prettier-config + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/prettier-config diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index b72692a22..91417accf 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/prettier-config", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Prettier configuration", "repository": { "type": "git", diff --git a/packages/react-hooks/CHANGELOG.md b/packages/react-hooks/CHANGELOG.md index 4ac2b5e55..d86bee450 100644 --- a/packages/react-hooks/CHANGELOG.md +++ b/packages/react-hooks/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/react-hooks + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) ### Features diff --git a/packages/react-hooks/package.json b/packages/react-hooks/package.json index 2520da476..020115fb1 100644 --- a/packages/react-hooks/package.json +++ b/packages/react-hooks/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/react-hooks", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven React hooks library", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -28,6 +28,9 @@ "lodash.throttle": "^4.1.1", "nanoid": "^5.0.7" }, + "devDependencies": { + "@deephaven/test-utils": "file:../test-utils" + }, "peerDependencies": { "react": ">=16.8.0" }, diff --git a/packages/react-hooks/src/ElementUtils.test.tsx b/packages/react-hooks/src/ElementUtils.test.tsx index 8c525841e..f0dd8eb9b 100644 --- a/packages/react-hooks/src/ElementUtils.test.tsx +++ b/packages/react-hooks/src/ElementUtils.test.tsx @@ -1,5 +1,5 @@ import { createElement } from 'react'; -import { ItemElement, Item, Text } from '@deephaven/components'; +import { type ItemElement, Item, Text } from '@deephaven/components'; import { isElementOfType } from './ElementUtils'; beforeEach(() => { diff --git a/packages/react-hooks/src/ElementUtils.ts b/packages/react-hooks/src/ElementUtils.ts index ed5cfe4a2..0803e3b08 100644 --- a/packages/react-hooks/src/ElementUtils.ts +++ b/packages/react-hooks/src/ElementUtils.ts @@ -1,10 +1,20 @@ import { + type Component, + type FunctionComponent, isValidElement, - JSXElementConstructor, - ReactElement, - ReactNode, + type JSXElementConstructor, + type ReactElement, + type ReactNode, } from 'react'; -import { InferComponentProps } from '@deephaven/utils'; + +/** + * Extracts the props type from a React component type. + */ +export type InferComponentProps = T extends FunctionComponent + ? P + : T extends Component + ? P + : never; /** * Check if a node is a React element of a specific type. diff --git a/packages/react-hooks/src/SelectionUtils.ts b/packages/react-hooks/src/SelectionUtils.ts index fae93a54f..8bbf002d4 100644 --- a/packages/react-hooks/src/SelectionUtils.ts +++ b/packages/react-hooks/src/SelectionUtils.ts @@ -2,9 +2,9 @@ import type { Key } from 'react'; import type { Selection } from '@react-types/shared'; import { generateRange, - KeyedItem, - SelectionMaybeInverted, - SelectionT, + type KeyedItem, + type SelectionMaybeInverted, + type SelectionT, } from '@deephaven/utils'; /** diff --git a/packages/react-hooks/src/SpectrumUtils.test.ts b/packages/react-hooks/src/SpectrumUtils.test.ts index 9fb99afe3..722c5f87d 100644 --- a/packages/react-hooks/src/SpectrumUtils.test.ts +++ b/packages/react-hooks/src/SpectrumUtils.test.ts @@ -1,4 +1,5 @@ -import { KeyedItem, TestUtils } from '@deephaven/utils'; +import { type KeyedItem } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import type { DOMRefValue } from '@react-types/shared'; import { createValidationProps, diff --git a/packages/react-hooks/src/SpectrumUtils.ts b/packages/react-hooks/src/SpectrumUtils.ts index 451b00c2e..a059a4849 100644 --- a/packages/react-hooks/src/SpectrumUtils.ts +++ b/packages/react-hooks/src/SpectrumUtils.ts @@ -1,6 +1,6 @@ // eslint-disable-next-line no-restricted-imports import type { SpectrumTextFieldProps } from '@adobe/react-spectrum'; -import { KeyedItem } from '@deephaven/utils'; +import { type KeyedItem } from '@deephaven/utils'; import type { DOMRefValue } from '@react-types/shared'; /** diff --git a/packages/react-hooks/src/useAsyncInterval.test.ts b/packages/react-hooks/src/useAsyncInterval.test.ts index 6d7ebf617..67581e04a 100644 --- a/packages/react-hooks/src/useAsyncInterval.test.ts +++ b/packages/react-hooks/src/useAsyncInterval.test.ts @@ -1,6 +1,6 @@ import { renderHook, act } from '@testing-library/react-hooks'; import Log from '@deephaven/log'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useAsyncInterval from './useAsyncInterval'; jest.mock('@deephaven/log', () => { diff --git a/packages/react-hooks/src/useCheckOverflow.test.ts b/packages/react-hooks/src/useCheckOverflow.test.ts index 9499e9188..c1c8b351a 100644 --- a/packages/react-hooks/src/useCheckOverflow.test.ts +++ b/packages/react-hooks/src/useCheckOverflow.test.ts @@ -1,6 +1,6 @@ import { act, renderHook } from '@testing-library/react-hooks'; import type { DOMRefValue } from '@react-types/shared'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { useCheckOverflow } from './useCheckOverflow'; const { createMockProxy } = TestUtils; diff --git a/packages/react-hooks/src/useContentRect.test.ts b/packages/react-hooks/src/useContentRect.test.ts index 42e248b82..a3d9091e4 100644 --- a/packages/react-hooks/src/useContentRect.test.ts +++ b/packages/react-hooks/src/useContentRect.test.ts @@ -1,5 +1,5 @@ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { useContentRect } from './useContentRect'; import useResizeObserver from './useResizeObserver'; diff --git a/packages/react-hooks/src/useContextOrThrow.ts b/packages/react-hooks/src/useContextOrThrow.ts index 90656b2c5..943db8ac0 100644 --- a/packages/react-hooks/src/useContextOrThrow.ts +++ b/packages/react-hooks/src/useContextOrThrow.ts @@ -1,4 +1,5 @@ -import React, { useContext } from 'react'; +import type React from 'react'; +import { useContext } from 'react'; /** * Fetch a given context or throw an error if it is null or undefined. diff --git a/packages/react-hooks/src/useEffectNTimesWhen.test.ts b/packages/react-hooks/src/useEffectNTimesWhen.test.ts index f1e9e85f2..67c03485b 100644 --- a/packages/react-hooks/src/useEffectNTimesWhen.test.ts +++ b/packages/react-hooks/src/useEffectNTimesWhen.test.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks'; -import { DependencyList } from 'react'; +import { type DependencyList } from 'react'; import { nanoid } from 'nanoid'; import useEffectNTimesWhen from './useEffectNTimesWhen'; diff --git a/packages/react-hooks/src/useEffectNTimesWhen.ts b/packages/react-hooks/src/useEffectNTimesWhen.ts index caf33b53b..9fe52db89 100644 --- a/packages/react-hooks/src/useEffectNTimesWhen.ts +++ b/packages/react-hooks/src/useEffectNTimesWhen.ts @@ -1,4 +1,9 @@ -import { DependencyList, EffectCallback, useEffect, useRef } from 'react'; +import { + type DependencyList, + type EffectCallback, + useEffect, + useRef, +} from 'react'; /** * Custom useEffect hook that runs an effect function up to `n` times as long diff --git a/packages/react-hooks/src/useFormWithDetachedSubmitButton.test.ts b/packages/react-hooks/src/useFormWithDetachedSubmitButton.test.ts index 9f241401c..5b386cc73 100644 --- a/packages/react-hooks/src/useFormWithDetachedSubmitButton.test.ts +++ b/packages/react-hooks/src/useFormWithDetachedSubmitButton.test.ts @@ -1,5 +1,5 @@ import { nanoid } from 'nanoid'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { renderHook } from '@testing-library/react-hooks'; import type { FocusableRefValue } from '@react-types/shared'; import useFormWithDetachedSubmitButton from './useFormWithDetachedSubmitButton'; diff --git a/packages/react-hooks/src/useFormWithDetachedSubmitButton.ts b/packages/react-hooks/src/useFormWithDetachedSubmitButton.ts index 0e4f1e9f0..a608c227e 100644 --- a/packages/react-hooks/src/useFormWithDetachedSubmitButton.ts +++ b/packages/react-hooks/src/useFormWithDetachedSubmitButton.ts @@ -1,4 +1,4 @@ -import { FormEvent, useCallback, useMemo } from 'react'; +import { type FormEvent, useCallback, useMemo } from 'react'; import { nanoid } from 'nanoid'; import type { FocusableRefValue } from '@react-types/shared'; diff --git a/packages/react-hooks/src/useForwardedRef.ts b/packages/react-hooks/src/useForwardedRef.ts index 462e530ed..6b9f25b98 100644 --- a/packages/react-hooks/src/useForwardedRef.ts +++ b/packages/react-hooks/src/useForwardedRef.ts @@ -1,4 +1,5 @@ -import React, { useEffect, useRef } from 'react'; +import type React from 'react'; +import { useEffect, useRef } from 'react'; /** * Takes a ref from forwardRef and makes it safe to use. diff --git a/packages/react-hooks/src/useMappedRef.test.ts b/packages/react-hooks/src/useMappedRef.test.ts index f45a1ce86..ac4962673 100644 --- a/packages/react-hooks/src/useMappedRef.test.ts +++ b/packages/react-hooks/src/useMappedRef.test.ts @@ -1,6 +1,6 @@ -import { MutableRefObject } from 'react'; +import { type MutableRefObject } from 'react'; import { renderHook } from '@testing-library/react-hooks'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useMappedRef from './useMappedRef'; const { asMock } = TestUtils; diff --git a/packages/react-hooks/src/useMappedRef.ts b/packages/react-hooks/src/useMappedRef.ts index 2f0cb3b3b..7c8c9276a 100644 --- a/packages/react-hooks/src/useMappedRef.ts +++ b/packages/react-hooks/src/useMappedRef.ts @@ -1,4 +1,4 @@ -import { MutableRefObject, useCallback } from 'react'; +import { type MutableRefObject, useCallback } from 'react'; /** * Returns a callback ref that will map it's argument diff --git a/packages/react-hooks/src/useMappedSelection.test.ts b/packages/react-hooks/src/useMappedSelection.test.ts index 67c32d7b9..9dac68137 100644 --- a/packages/react-hooks/src/useMappedSelection.test.ts +++ b/packages/react-hooks/src/useMappedSelection.test.ts @@ -1,8 +1,9 @@ -import { Key } from 'react'; +import { type Key } from 'react'; import { renderHook } from '@testing-library/react-hooks'; -import { KeyedItem, TestUtils } from '@deephaven/utils'; +import { type KeyedItem } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import { useMappedSelection } from './useMappedSelection'; -import { WindowedListData } from './useWindowedListData'; +import { type WindowedListData } from './useWindowedListData'; import { mapSelection, optimizeSelection } from './SelectionUtils'; const { asMock, createMockProxy } = TestUtils; diff --git a/packages/react-hooks/src/useMappedSelection.ts b/packages/react-hooks/src/useMappedSelection.ts index 12f43b890..f9bf36655 100644 --- a/packages/react-hooks/src/useMappedSelection.ts +++ b/packages/react-hooks/src/useMappedSelection.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { KeyedItem, SelectionMaybeInverted } from '@deephaven/utils'; +import { type KeyedItem, type SelectionMaybeInverted } from '@deephaven/utils'; import { mapSelection, optimizeSelection } from './SelectionUtils'; import type { WindowedListData } from './useWindowedListData'; diff --git a/packages/react-hooks/src/useOnChange.ts b/packages/react-hooks/src/useOnChange.ts index 54040f322..3ad330f33 100644 --- a/packages/react-hooks/src/useOnChange.ts +++ b/packages/react-hooks/src/useOnChange.ts @@ -1,4 +1,4 @@ -import { DependencyList } from 'react'; +import { type DependencyList } from 'react'; import usePrevious from './usePrevious'; /** diff --git a/packages/react-hooks/src/useOnScrollOffsetChangeCallback.test.ts b/packages/react-hooks/src/useOnScrollOffsetChangeCallback.test.ts index 39c4565c5..90855b0bc 100644 --- a/packages/react-hooks/src/useOnScrollOffsetChangeCallback.test.ts +++ b/packages/react-hooks/src/useOnScrollOffsetChangeCallback.test.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useOnScrollOffsetChangeCallback from './useOnScrollOffsetChangeCallback'; const { createMockProxy } = TestUtils; diff --git a/packages/react-hooks/src/usePopoverOnScrollRef.test.tsx b/packages/react-hooks/src/usePopoverOnScrollRef.test.tsx index 7bdb1d33c..b99332f58 100644 --- a/packages/react-hooks/src/usePopoverOnScrollRef.test.tsx +++ b/packages/react-hooks/src/usePopoverOnScrollRef.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import { act, renderHook } from '@testing-library/react-hooks'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import usePopoverOnScrollRef from './usePopoverOnScrollRef'; const { asMock, createMockProxy } = TestUtils; diff --git a/packages/react-hooks/src/usePromiseFactory.test.ts b/packages/react-hooks/src/usePromiseFactory.test.ts index 389f57009..6e95e888d 100644 --- a/packages/react-hooks/src/usePromiseFactory.test.ts +++ b/packages/react-hooks/src/usePromiseFactory.test.ts @@ -1,6 +1,6 @@ import { act, renderHook } from '@testing-library/react-hooks'; import usePromiseFactory, { - UsePromiseFactoryResult, + type UsePromiseFactoryResult, } from './usePromiseFactory'; const defaultState: UsePromiseFactoryResult = { diff --git a/packages/react-hooks/src/useSetAttributesCallback.test.ts b/packages/react-hooks/src/useSetAttributesCallback.test.ts index 6499f00ef..1d8a8629d 100644 --- a/packages/react-hooks/src/useSetAttributesCallback.test.ts +++ b/packages/react-hooks/src/useSetAttributesCallback.test.ts @@ -1,6 +1,6 @@ import { renderHook } from '@testing-library/react-hooks'; -import { HTMLAttributes } from 'react'; -import { TestUtils } from '@deephaven/utils'; +import { type HTMLAttributes } from 'react'; +import { TestUtils } from '@deephaven/test-utils'; import useSetAttributesCallback from './useSetAttributesCallback'; beforeEach(() => { diff --git a/packages/react-hooks/src/useSetAttributesCallback.ts b/packages/react-hooks/src/useSetAttributesCallback.ts index 9584ebafa..1c20d1898 100644 --- a/packages/react-hooks/src/useSetAttributesCallback.ts +++ b/packages/react-hooks/src/useSetAttributesCallback.ts @@ -1,4 +1,4 @@ -import { HTMLAttributes, useCallback } from 'react'; +import { type HTMLAttributes, useCallback } from 'react'; /** * Returns a callback that sets attributes on elements based on given selectors. diff --git a/packages/react-hooks/src/useSpectrumDisableSpellcheckRef.test.ts b/packages/react-hooks/src/useSpectrumDisableSpellcheckRef.test.ts index 5b4ee8f2d..b0e3305ca 100644 --- a/packages/react-hooks/src/useSpectrumDisableSpellcheckRef.test.ts +++ b/packages/react-hooks/src/useSpectrumDisableSpellcheckRef.test.ts @@ -1,6 +1,6 @@ import { renderHook } from '@testing-library/react-hooks'; -import { DOMRefValue } from '@react-types/shared'; -import { TestUtils } from '@deephaven/utils'; +import { type DOMRefValue } from '@react-types/shared'; +import { TestUtils } from '@deephaven/test-utils'; import useSetAttributesCallback from './useSetAttributesCallback'; import { SPELLCHECK_FALSE_ATTRIBUTE, diff --git a/packages/react-hooks/src/useWindowedListData.test.ts b/packages/react-hooks/src/useWindowedListData.test.ts index e4e711f61..a8af8bab5 100644 --- a/packages/react-hooks/src/useWindowedListData.test.ts +++ b/packages/react-hooks/src/useWindowedListData.test.ts @@ -1,13 +1,13 @@ import { act, - Renderer, + type Renderer, renderHook, - RenderHookResult, + type RenderHookResult, } from '@testing-library/react-hooks'; -import { TestUtils } from '@deephaven/utils'; +import { TestUtils } from '@deephaven/test-utils'; import useWindowedListData, { defaultGetKey, - WindowedListData, + type WindowedListData, } from './useWindowedListData'; const { asMock } = TestUtils; diff --git a/packages/react-hooks/src/useWindowedListData.ts b/packages/react-hooks/src/useWindowedListData.ts index e8cc97a0b..3cd17e968 100644 --- a/packages/react-hooks/src/useWindowedListData.ts +++ b/packages/react-hooks/src/useWindowedListData.ts @@ -1,6 +1,6 @@ // eslint-disable-next-line no-restricted-imports import type { ListData } from '@adobe/react-spectrum'; -import { Key, useCallback, useMemo, useState } from 'react'; +import { type Key, useCallback, useMemo, useState } from 'react'; /** * Subset of React Stately ListData + bulkUpdate. diff --git a/packages/react-hooks/tsconfig.json b/packages/react-hooks/tsconfig.json index 80c334df0..132d9cce0 100644 --- a/packages/react-hooks/tsconfig.json +++ b/packages/react-hooks/tsconfig.json @@ -6,5 +6,9 @@ }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], "exclude": ["node_modules", "src/**/*.test.*", "src/**/__mocks__/*"], - "references": [{ "path": "../log" }, { "path": "../utils" }] + "references": [ + { "path": "../log" }, + { "path": "../test-utils" }, + { "path": "../utils" } + ] } diff --git a/packages/redux/CHANGELOG.md b/packages/redux/CHANGELOG.md index a4916aff2..87dc85411 100644 --- a/packages/redux/CHANGELOG.md +++ b/packages/redux/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/redux + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/redux + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) ### Features diff --git a/packages/redux/package.json b/packages/redux/package.json index 1134e04c8..17d5efd34 100644 --- a/packages/redux/package.json +++ b/packages/redux/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/redux", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Redux", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/redux/src/createMockStore.ts b/packages/redux/src/createMockStore.ts index a7c96b286..f8c2f6053 100644 --- a/packages/redux/src/createMockStore.ts +++ b/packages/redux/src/createMockStore.ts @@ -1,4 +1,4 @@ -import store from './store'; +import type store from './store'; export function createMockStore(): typeof store { return { diff --git a/packages/redux/src/reducerRegistry.ts b/packages/redux/src/reducerRegistry.ts index 99cf0f21f..dee9890d2 100644 --- a/packages/redux/src/reducerRegistry.ts +++ b/packages/redux/src/reducerRegistry.ts @@ -1,4 +1,4 @@ -import { Reducer, ReducersMapObject } from 'redux'; +import { type Reducer, type ReducersMapObject } from 'redux'; export type ReducerRegistryListener = (reducers: ReducersMapObject) => void; diff --git a/packages/redux/src/reducers/common/mergeReducer.ts b/packages/redux/src/reducers/common/mergeReducer.ts index 6136e5659..d32f9141b 100644 --- a/packages/redux/src/reducers/common/mergeReducer.ts +++ b/packages/redux/src/reducers/common/mergeReducer.ts @@ -11,7 +11,7 @@ export default function mergeReducer( initialState: S ): Reducer { return (state = initialState, action?) => { - switch (action.type) { + switch (action?.type) { case type: { const newState = action.payload; if (newState == null) { diff --git a/packages/redux/src/reducers/common/replaceByIdReducer.ts b/packages/redux/src/reducers/common/replaceByIdReducer.ts index 94f44149b..949f48bbd 100644 --- a/packages/redux/src/reducers/common/replaceByIdReducer.ts +++ b/packages/redux/src/reducers/common/replaceByIdReducer.ts @@ -12,7 +12,7 @@ export default function replaceByIdReducer>( checkIfChanged = true ): Reducer { return (state = initialState, action?) => { - switch (action.type) { + switch (action?.type) { case type: { const { id, payload } = action; if (checkIfChanged && deepEqual({ payload }, { payload: state[id] })) { diff --git a/packages/redux/src/reducers/common/replaceReducer.ts b/packages/redux/src/reducers/common/replaceReducer.ts index 0152c3b76..50c3e6333 100644 --- a/packages/redux/src/reducers/common/replaceReducer.ts +++ b/packages/redux/src/reducers/common/replaceReducer.ts @@ -11,7 +11,7 @@ export default function replaceReducer( initialState: S ): Reducer { return (state = initialState, action?) => { - switch (action.type) { + switch (action?.type) { case type: { return action.payload; } diff --git a/packages/storage/CHANGELOG.md b/packages/storage/CHANGELOG.md index 15fb3aba1..1ecb9f2a7 100644 --- a/packages/storage/CHANGELOG.md +++ b/packages/storage/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/storage + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/storage + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/storage diff --git a/packages/storage/package.json b/packages/storage/package.json index 8ede7a9b5..cc6fb72be 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/storage", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Storage abstract classes for storing app data", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", diff --git a/packages/storage/src/StorageUtils.ts b/packages/storage/src/StorageUtils.ts index 3cce1add0..10d1cf306 100644 --- a/packages/storage/src/StorageUtils.ts +++ b/packages/storage/src/StorageUtils.ts @@ -1,10 +1,10 @@ import { Operator as FilterOperator } from '@deephaven/filters'; import { - FilterConfig, - FilterConfigItem, - FilterValue, - SortConfig, - SortDirection, + type FilterConfig, + type FilterConfigItem, + type FilterValue, + type SortConfig, + type SortDirection, } from './Storage'; export class StorageUtils { diff --git a/packages/stylelint-config/CHANGELOG.md b/packages/stylelint-config/CHANGELOG.md index ca1c3b139..548d416b7 100644 --- a/packages/stylelint-config/CHANGELOG.md +++ b/packages/stylelint-config/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +**Note:** Version bump only for package @deephaven/stylelint-config + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/stylelint-config + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/stylelint-config + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/stylelint-config diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index 45f80e948..898f309ab 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/stylelint-config", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Stylelint configuration", "repository": { "type": "git", diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md new file mode 100644 index 000000000..506c74cf4 --- /dev/null +++ b/packages/test-utils/CHANGELOG.md @@ -0,0 +1,27 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) diff --git a/packages/test-utils/README.md b/packages/test-utils/README.md new file mode 100644 index 000000000..ab999695d --- /dev/null +++ b/packages/test-utils/README.md @@ -0,0 +1,9 @@ +# @deephaven/test-utils + +A library with some test utility functions used by Deephaven. It is recommended to install as a `dev` dependency. + +## Install + +```bash +npm install --save-dev @deephaven/test-utils +``` diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json new file mode 100644 index 000000000..66e12c126 --- /dev/null +++ b/packages/test-utils/package.json @@ -0,0 +1,31 @@ +{ + "name": "@deephaven/test-utils", + "version": "0.95.0", + "description": "Deephaven Test Utils", + "author": "Deephaven Data Labs LLC", + "license": "Apache-2.0", + "type": "module", + "repository": { + "type": "git", + "url": "https://github.com/deephaven/web-client-ui.git", + "directory": "packages/utils" + }, + "source": "src/index.js", + "main": "dist/index.js", + "module": "dist/index.js", + "types": "dist/index.d.ts", + "engines": { + "node": ">=16" + }, + "scripts": { + "build": "cross-env NODE_ENV=production run-p build:*", + "build:babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward" + }, + "files": [ + "dist" + ], + "sideEffects": false, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/utils/src/MockProxy.test.ts b/packages/test-utils/src/MockProxy.test.ts similarity index 100% rename from packages/utils/src/MockProxy.test.ts rename to packages/test-utils/src/MockProxy.test.ts diff --git a/packages/utils/src/MockProxy.ts b/packages/test-utils/src/MockProxy.ts similarity index 100% rename from packages/utils/src/MockProxy.ts rename to packages/test-utils/src/MockProxy.ts diff --git a/packages/utils/src/TestUtils.test.tsx b/packages/test-utils/src/TestUtils.test.tsx similarity index 99% rename from packages/utils/src/TestUtils.test.tsx rename to packages/test-utils/src/TestUtils.test.tsx index 3366aab27..5d0d1fd1f 100644 --- a/packages/utils/src/TestUtils.test.tsx +++ b/packages/test-utils/src/TestUtils.test.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import TestUtils, { ConsoleMethodName } from './TestUtils'; +import TestUtils, { type ConsoleMethodName } from './TestUtils'; import createMockProxy from './MockProxy'; beforeEach(() => { diff --git a/packages/utils/src/TestUtils.ts b/packages/test-utils/src/TestUtils.ts similarity index 99% rename from packages/utils/src/TestUtils.ts rename to packages/test-utils/src/TestUtils.ts index d121c470c..cef6bea64 100644 --- a/packages/utils/src/TestUtils.ts +++ b/packages/test-utils/src/TestUtils.ts @@ -1,6 +1,6 @@ import type userEvent from '@testing-library/user-event'; import createMockProxy from './MockProxy'; -import { Tuple } from './TypeUtils'; +import { type Tuple } from './TypeUtils'; interface MockContext { arc: jest.Mock; @@ -43,7 +43,7 @@ export type PickMethods = { export type ConsoleMethodName = keyof PickMethods; -class TestUtils { +export class TestUtils { /** * jest.useFakeTimers mocks `process.nextTick` by default. Hold on to a * reference to the real function so we can still use it. diff --git a/packages/test-utils/src/TypeUtils.ts b/packages/test-utils/src/TypeUtils.ts new file mode 100644 index 000000000..ace32629c --- /dev/null +++ b/packages/test-utils/src/TypeUtils.ts @@ -0,0 +1,28 @@ +/** + * Tuple type. + * @param T Type of the items in the tuple + * @param N Length of the tuple + */ +export type Tuple = N extends 0 + ? [] + : N extends 1 + ? [T] + : N extends 2 + ? [T, T] + : N extends 3 + ? [T, T, T] + : N extends 4 + ? [T, T, T, T] + : N extends 5 + ? [T, T, T, T, T] + : N extends 6 + ? [T, T, T, T, T, T] + : N extends 7 + ? [T, T, T, T, T, T, T] + : N extends 8 + ? [T, T, T, T, T, T, T, T] + : N extends 9 + ? [T, T, T, T, T, T, T, T, T] + : N extends 10 + ? [T, T, T, T, T, T, T, T, T, T] + : Array; diff --git a/packages/test-utils/src/index.ts b/packages/test-utils/src/index.ts new file mode 100644 index 000000000..4d058248c --- /dev/null +++ b/packages/test-utils/src/index.ts @@ -0,0 +1 @@ +export * from './TestUtils'; diff --git a/packages/test-utils/src/jest.config.cjs b/packages/test-utils/src/jest.config.cjs new file mode 100644 index 000000000..365815a41 --- /dev/null +++ b/packages/test-utils/src/jest.config.cjs @@ -0,0 +1,7 @@ +const baseConfig = require('../../jest.config.base.cjs'); +const packageJson = require('./package'); + +module.exports = { + ...baseConfig, + displayName: packageJson.name, +}; diff --git a/packages/test-utils/tsconfig.json b/packages/test-utils/tsconfig.json new file mode 100644 index 000000000..8c183dff3 --- /dev/null +++ b/packages/test-utils/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "src/", + "outDir": "dist/" + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], + "exclude": ["node_modules", "src/**/*.test.*", "src/**/__mocks__/*"] +} diff --git a/packages/tsconfig/CHANGELOG.md b/packages/tsconfig/CHANGELOG.md index bd4bbe32a..365737b92 100644 --- a/packages/tsconfig/CHANGELOG.md +++ b/packages/tsconfig/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +**Note:** Version bump only for package @deephaven/tsconfig + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +**Note:** Version bump only for package @deephaven/tsconfig + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/tsconfig + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/tsconfig diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json index 4c41ff683..278d9b319 100644 --- a/packages/tsconfig/package.json +++ b/packages/tsconfig/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/tsconfig", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven TypeScript configuration", "repository": { "type": "git", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 5f477cc7e..16576cdd7 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.95.0](https://github.com/deephaven/web-client-ui/compare/v0.94.0...v0.95.0) (2024-09-20) + +### ⚠ BREAKING CHANGES + +- eslint rule will require type only imports where + possible + +### Code Refactoring + +- Added consistent-type-imports eslint rule and ran --fix ([#2230](https://github.com/deephaven/web-client-ui/issues/2230)) ([2744f97](https://github.com/deephaven/web-client-ui/commit/2744f9793aeac2b70e475a725447dcba1b5f294c)), closes [#2229](https://github.com/deephaven/web-client-ui/issues/2229) + +## [0.94.0](https://github.com/deephaven/web-client-ui/compare/v0.93.0...v0.94.0) (2024-09-18) + +### ⚠ BREAKING CHANGES + +- TestUtils has been moved to new package + `@deephaven-test-utils`. Consumers will need to install the new package + as a dev dependency and update references. + +### Code Refactoring + +- Split out @deephaven/test-utils package ([#2225](https://github.com/deephaven/web-client-ui/issues/2225)) ([1d027d3](https://github.com/deephaven/web-client-ui/commit/1d027d3f6c0b47910cc0b8285c471e90c5f113a8)), closes [#2185](https://github.com/deephaven/web-client-ui/issues/2185) + +## [0.93.0](https://github.com/deephaven/web-client-ui/compare/v0.92.0...v0.93.0) (2024-09-12) + +**Note:** Version bump only for package @deephaven/utils + ## [0.92.0](https://github.com/deephaven/web-client-ui/compare/v0.91.0...v0.92.0) (2024-09-03) **Note:** Version bump only for package @deephaven/utils diff --git a/packages/utils/package.json b/packages/utils/package.json index e390d8f36..e6ace920c 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/utils", - "version": "0.92.0", + "version": "0.95.0", "description": "Deephaven Utils", "author": "Deephaven Data Labs LLC", "license": "Apache-2.0", @@ -27,5 +27,8 @@ "sideEffects": false, "publishConfig": { "access": "public" + }, + "devDependencies": { + "@deephaven/test-utils": "file:../test-utils" } } diff --git a/packages/utils/src/ColorUtils.test.ts b/packages/utils/src/ColorUtils.test.ts index 4242dfb93..89ca25bd0 100644 --- a/packages/utils/src/ColorUtils.test.ts +++ b/packages/utils/src/ColorUtils.test.ts @@ -1,5 +1,5 @@ +import { TestUtils } from '@deephaven/test-utils'; import ColorUtils from './ColorUtils'; -import TestUtils from './TestUtils'; const { createMockProxy } = TestUtils; diff --git a/packages/utils/src/DOMUtils.test.ts b/packages/utils/src/DOMUtils.test.ts index acdd53cbb..7eced15dd 100644 --- a/packages/utils/src/DOMUtils.test.ts +++ b/packages/utils/src/DOMUtils.test.ts @@ -1,9 +1,9 @@ +import { TestUtils } from '@deephaven/test-utils'; import { getClosestByClassName, identityExtractHTMLElement, syncAnimationStartTime, } from './DOMUtils'; -import TestUtils from './TestUtils'; const { createMockProxy } = TestUtils; diff --git a/packages/utils/src/EventTargetShimUtils.ts b/packages/utils/src/EventTargetShimUtils.ts index c5a49ac9a..bdf8209e1 100644 --- a/packages/utils/src/EventTargetShimUtils.ts +++ b/packages/utils/src/EventTargetShimUtils.ts @@ -1,4 +1,9 @@ -import type { Event, EventTarget } from 'event-target-shim'; +import type { + Event as EventT, + EventTarget as EventTargetT, +} from 'event-target-shim'; + +export type { EventT }; /** * A CustomEvent extension which combines the browser CustomEvent and event-target-shim's Event types for type safety @@ -15,13 +20,13 @@ export class EventShimCustomEvent< // https://github.com/babel/babel/issues/12128#issuecomment-702119272 declare type: T; - declare target: EventTarget | null; + declare target: (EventTargetT & EventTarget) | null; - declare srcElement: EventTarget | null; + declare srcElement: (EventTargetT & EventTarget) | null; - declare currentTarget: EventTarget | null; + declare currentTarget: (EventTargetT & EventTarget) | null; - declare composedPath: () => EventTarget[]; + declare composedPath: () => (EventTargetT & EventTarget)[]; // eslint-disable-next-line @typescript-eslint/no-useless-constructor constructor(typeArg: T, eventInitDict?: CustomEventInit) { @@ -38,8 +43,8 @@ export type CustomEventMap> = { [T in keyof M]: T extends string ? M[T] extends CustomEvent ? EventShimCustomEvent - : M[T] extends Event - ? Event + : M[T] extends EventT + ? EventT : never : never; }; diff --git a/packages/utils/src/Pending.ts b/packages/utils/src/Pending.ts index 6d2e78c3a..7e4c99f5a 100644 --- a/packages/utils/src/Pending.ts +++ b/packages/utils/src/Pending.ts @@ -1,4 +1,4 @@ -import { PromiseUtils, CancelablePromise } from './PromiseUtils'; +import { PromiseUtils, type CancelablePromise } from './PromiseUtils'; /** * Helper class for managing pending promises. diff --git a/packages/utils/src/TimeUtils.test.ts b/packages/utils/src/TimeUtils.test.ts index dba30cd87..0e9973e7d 100644 --- a/packages/utils/src/TimeUtils.test.ts +++ b/packages/utils/src/TimeUtils.test.ts @@ -1,4 +1,4 @@ -import TimeUtils, { TimeString } from './TimeUtils'; +import TimeUtils, { type TimeString } from './TimeUtils'; describe('formatElapsedTime parsing tests', () => { function testFormatElapsedTime(time: number, expectedResult: string) { diff --git a/packages/utils/src/TypeUtils.test.ts b/packages/utils/src/TypeUtils.test.ts index 729b0e2d7..ffd9e1bd6 100644 --- a/packages/utils/src/TypeUtils.test.ts +++ b/packages/utils/src/TypeUtils.test.ts @@ -1,4 +1,4 @@ -import { ValueOf } from './TypeUtils'; +import { type ValueOf } from './TypeUtils'; describe('ValueOf', () => { it('should derive the value type', () => { diff --git a/packages/utils/src/TypeUtils.ts b/packages/utils/src/TypeUtils.ts index f3a921fa6..c77dd2e2a 100644 --- a/packages/utils/src/TypeUtils.ts +++ b/packages/utils/src/TypeUtils.ts @@ -1,5 +1,3 @@ -import type { Component, FunctionComponent } from 'react'; - /** * Util type to create a "subtype" of T. Useful for creating subsets of union * types. @@ -15,15 +13,6 @@ import type { Component, FunctionComponent } from 'react'; */ export type Extends = U extends T ? U : never; -/** - * Extracts the props type from a React component type. - */ -export type InferComponentProps = T extends FunctionComponent - ? P - : T extends Component - ? P - : never; - /** * Derives a union type where all constituents define 1 property of the original * type. @@ -38,35 +27,6 @@ export type OnlyOneProp = { [P in keyof T]: { [ONEPROP in P]: T[ONEPROP] }; }[keyof T]; -/** - * Tuple type. - * @param T Type of the items in the tuple - * @param N Length of the tuple - */ -export type Tuple = N extends 0 - ? [] - : N extends 1 - ? [T] - : N extends 2 - ? [T, T] - : N extends 3 - ? [T, T, T] - : N extends 4 - ? [T, T, T, T] - : N extends 5 - ? [T, T, T, T, T] - : N extends 6 - ? [T, T, T, T, T, T] - : N extends 7 - ? [T, T, T, T, T, T, T] - : N extends 8 - ? [T, T, T, T, T, T, T, T] - : N extends 9 - ? [T, T, T, T, T, T, T, T, T] - : N extends 10 - ? [T, T, T, T, T, T, T, T, T, T] - : Array; - /** * Remove `Partial` wrapper from a type. Note that this is slightly different * than `Required` because it will preserve optional properties on the original diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index dc0afb0ad..c4ed91f52 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -24,6 +24,4 @@ export { default as TimeUtils } from './TimeUtils'; export * from './TypeUtils'; export { default as InvalidMetadataError } from './InvalidMetadataError'; export { default as ValidationError } from './ValidationError'; -export { default as TestUtils } from './TestUtils'; -export * from './TestUtils'; export * from './UIConstants'; diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 8c183dff3..7917a8934 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -5,5 +5,6 @@ "outDir": "dist/" }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"], - "exclude": ["node_modules", "src/**/*.test.*", "src/**/__mocks__/*"] + "exclude": ["node_modules", "src/**/*.test.*", "src/**/__mocks__/*"], + "references": [{ "path": "../test-utils" }] }