From 9430b549d6009d076b528ca2a20a3dbcefb1aecc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:20:26 +0200 Subject: [PATCH] chore: bump the typescript-eslint group across 1 directory with 2 updates (#2247) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the typescript-eslint group with 2 updates in the /typescript directory: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 7.18.0 to 8.6.0
Release notes

Sourced from @​typescript-eslint/eslint-plugin's releases.

v8.6.0

8.6.0 (2024-09-16)

🚀 Features

🩹 Fixes

❤️ Thank You

You can read about our versioning strategy and releases on our website.

v8.5.0

8.5.0 (2024-09-09)

🚀 Features

🩹 Fixes

❤️ Thank You

... (truncated)

Changelog

Sourced from @​typescript-eslint/eslint-plugin's changelog.

8.6.0 (2024-09-16)

🚀 Features

🩹 Fixes

❤️ Thank You

You can read about our versioning strategy and releases on our website.

8.5.0 (2024-09-09)

🚀 Features

🩹 Fixes

... (truncated)

Commits

Updates `@typescript-eslint/parser` from 7.18.0 to 8.6.0
Release notes

Sourced from @​typescript-eslint/parser's releases.

v8.6.0

8.6.0 (2024-09-16)

🚀 Features

🩹 Fixes

❤️ Thank You

You can read about our versioning strategy and releases on our website.

v8.5.0

8.5.0 (2024-09-09)

🚀 Features

🩹 Fixes

❤️ Thank You

... (truncated)

Changelog

Sourced from @​typescript-eslint/parser's changelog.

8.6.0 (2024-09-16)

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

8.5.0 (2024-09-09)

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

8.4.0 (2024-09-02)

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

8.3.0 (2024-08-26)

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

8.2.0 (2024-08-19)

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

8.1.0 (2024-08-12)

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

8.0.1 (2024-08-05)

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

8.0.0 (2024-07-31)

🚀 Features

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Havard Bjerke --- typescript/cypress.config.ts | 1 + typescript/package-lock.json | 125 +++++++++--------- typescript/package.json | 4 +- .../subsurface-viewer/src/components/Map.tsx | 2 + .../LayerProperty_performance.test.tsx | 2 + .../settings/LayerSettingsButton.test.tsx | 10 ++ .../components/settings/NumericInput.test.tsx | 2 + .../components/settings/SliderInput.test.tsx | 2 + .../components/settings/ToggleButton.test.tsx | 2 + .../subsurface-viewer/src/custom.d.ts | 2 + .../grid3d/test_data/TruncatedSnubCube.ts | 2 + .../src/layers/wells/wellsLayer.ts | 2 + .../src/Storybook/ExternalLayout.stories.tsx | 2 +- .../src/Storybook/helpers/MuiComponents.tsx | 4 +- .../src/SyncLogViewer.stories.tsx | 5 +- .../src/SyncLogViewer.test.tsx | 4 + .../well-log-viewer/src/SyncLogViewer.tsx | 22 +++ .../src/WellLogViewer.stories.tsx | 29 +++- .../src/WellLogViewer.test.tsx | 4 + .../well-log-viewer/src/WellLogViewer.tsx | 22 +++ .../src/WellLogViewer_performance.test.tsx | 2 + .../src/components/AxisSelector.tsx | 17 ++- .../src/components/InfoPanel.tsx | 6 + .../src/components/LocalMenus.tsx | 76 ++++++++++- .../src/components/PlotDialog.tsx | 22 +++ .../src/components/Scroller.tsx | 4 + .../src/components/TrackDialog.tsx | 24 ++++ .../src/components/WellLogAxesPanel.tsx | 30 +++++ .../src/components/WellLogInfoPanel.tsx | 32 ++++- .../src/components/WellLogLayout.tsx | 22 ++- .../src/components/WellLogScaleSelector.tsx | 22 +++ .../src/components/WellLogSpacer.tsx | 71 +++++++++- .../src/components/WellLogView.stories.tsx | 4 + .../src/components/WellLogView.test.tsx | 2 + .../src/components/WellLogView.tsx | 1 + .../WellLogViewWithScroller.stories.tsx | 2 + .../WellLogViewWithScroller.test.tsx | 4 + .../components/WellLogViewWithScroller.tsx | 34 +++++ .../src/components/WellLogZoomSlider.tsx | 20 +++ .../src/components/ZoomSlider.tsx | 14 ++ .../packages/well-log-viewer/src/custom.d.ts | 2 + .../well-log-viewer/src/utils/tracks.ts | 2 + 42 files changed, 569 insertions(+), 92 deletions(-) diff --git a/typescript/cypress.config.ts b/typescript/cypress.config.ts index e171a701a..019642293 100644 --- a/typescript/cypress.config.ts +++ b/typescript/cypress.config.ts @@ -9,6 +9,7 @@ export default defineConfig({ }, video: false, setupNodeEvents(on, config) { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions getCompareSnapshotsPlugin(on, config), // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore diff --git a/typescript/package-lock.json b/typescript/package-lock.json index dc6ef67e8..efbe8afc7 100644 --- a/typescript/package-lock.json +++ b/typescript/package-lock.json @@ -43,8 +43,8 @@ "@types/react-redux": "^7.1.33", "@types/uuid": "^8.3.0", "@types/workerpool": "^6.4.7", - "@typescript-eslint/eslint-plugin": "^7.18.0", - "@typescript-eslint/parser": "^7.18.0", + "@typescript-eslint/eslint-plugin": "^8.6.0", + "@typescript-eslint/parser": "^8.6.0", "assert": "^2.0.0", "babel-jest": "^29.6.0", "copyfiles": "^2.0.0", @@ -11549,31 +11549,31 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", - "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.6.0.tgz", + "integrity": "sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/type-utils": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.6.0", + "@typescript-eslint/type-utils": "8.6.0", + "@typescript-eslint/utils": "8.6.0", + "@typescript-eslint/visitor-keys": "8.6.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -11582,26 +11582,26 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.6.0.tgz", + "integrity": "sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.6.0", + "@typescript-eslint/types": "8.6.0", + "@typescript-eslint/typescript-estree": "8.6.0", + "@typescript-eslint/visitor-keys": "8.6.0", "debug": "^4.3.4" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -11610,16 +11610,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.6.0.tgz", + "integrity": "sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" + "@typescript-eslint/types": "8.6.0", + "@typescript-eslint/visitor-keys": "8.6.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -11627,26 +11627,23 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.6.0.tgz", + "integrity": "sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/typescript-estree": "8.6.0", + "@typescript-eslint/utils": "8.6.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "eslint": "^8.56.0" - }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -11654,12 +11651,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.6.0.tgz", + "integrity": "sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw==", "dev": true, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -11667,22 +11664,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.6.0.tgz", + "integrity": "sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/types": "8.6.0", + "@typescript-eslint/visitor-keys": "8.6.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -11731,38 +11728,38 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.6.0.tgz", + "integrity": "sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" + "@typescript-eslint/scope-manager": "8.6.0", + "@typescript-eslint/types": "8.6.0", + "@typescript-eslint/typescript-estree": "8.6.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.6.0.tgz", + "integrity": "sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/types": "8.6.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -36636,7 +36633,7 @@ }, "packages/group-tree-plot": { "name": "@webviz/group-tree-plot", - "version": "1.3.1", + "version": "1.3.2", "license": "MPL-2.0", "dependencies": { "d3": "^7.8.2", @@ -36894,7 +36891,7 @@ }, "packages/well-completions-plot": { "name": "@webviz/well-completions-plot", - "version": "1.4.1", + "version": "1.4.2", "license": "MPL-2.0", "dependencies": { "react-resize-detector": "^10.0.1", @@ -36946,7 +36943,7 @@ }, "packages/well-log-viewer": { "name": "@webviz/well-log-viewer", - "version": "1.13.3", + "version": "1.13.4", "license": "MPL-2.0", "dependencies": { "@emerson-eps/color-tables": "^0.4.71", @@ -37029,7 +37026,7 @@ }, "packages/wsc-common": { "name": "@webviz/wsc-common", - "version": "0.8.1", + "version": "0.8.2", "license": "MPL-2.0", "dependencies": { "@deck.gl/core": "^9.0.29", diff --git a/typescript/package.json b/typescript/package.json index 7a1edae83..ff293352f 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -76,8 +76,8 @@ "@types/react-redux": "^7.1.33", "@types/uuid": "^8.3.0", "@types/workerpool": "^6.4.7", - "@typescript-eslint/eslint-plugin": "^7.18.0", - "@typescript-eslint/parser": "^7.18.0", + "@typescript-eslint/eslint-plugin": "^8.6.0", + "@typescript-eslint/parser": "^8.6.0", "assert": "^2.0.0", "babel-jest": "^29.6.0", "copyfiles": "^2.0.0", diff --git a/typescript/packages/subsurface-viewer/src/components/Map.tsx b/typescript/packages/subsurface-viewer/src/components/Map.tsx index 9ebd3fccb..a79e64276 100644 --- a/typescript/packages/subsurface-viewer/src/components/Map.tsx +++ b/typescript/packages/subsurface-viewer/src/components/Map.tsx @@ -691,6 +691,8 @@ const Map: React.FC = ({ if (checkDatafileSchema && layers && loadingProgress === 100) { try { validateLayers(layers); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions colorTables && validateColorTables(colorTables); } catch (e) { setErrorText(String(e)); diff --git a/typescript/packages/subsurface-viewer/src/components/settings/LayerProperty_performance.test.tsx b/typescript/packages/subsurface-viewer/src/components/settings/LayerProperty_performance.test.tsx index 3a5d87f01..0bbbfae16 100644 --- a/typescript/packages/subsurface-viewer/src/components/settings/LayerProperty_performance.test.tsx +++ b/typescript/packages/subsurface-viewer/src/components/settings/LayerProperty_performance.test.tsx @@ -16,6 +16,8 @@ describe("Test Layer Property", () => { const drawing_layer = layers.find( (item) => item["@@type"] === "DrawingLayer" ); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions drawing_layer && render( EmptyWrapper({ diff --git a/typescript/packages/subsurface-viewer/src/components/settings/LayerSettingsButton.test.tsx b/typescript/packages/subsurface-viewer/src/components/settings/LayerSettingsButton.test.tsx index bb2371d42..87a84a21c 100644 --- a/typescript/packages/subsurface-viewer/src/components/settings/LayerSettingsButton.test.tsx +++ b/typescript/packages/subsurface-viewer/src/components/settings/LayerSettingsButton.test.tsx @@ -60,6 +60,8 @@ describe("test layers settings button", () => { it("should close menu when clicked on backdrop", async () => { const user = userEvent.setup(); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions drawingLayer && render( EmptyWrapper({ @@ -75,6 +77,8 @@ describe("test layers settings button", () => { it("should close menu when clicked twice on layers button", async () => { const user = userEvent.setup(); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions drawingLayer && render( EmptyWrapper({ @@ -93,6 +97,8 @@ describe("test layers settings button", () => { const wells_layer = layers.find( (item) => item["@@type"] === "WellsLayer" ); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions wells_layer && render( EmptyWrapper({ @@ -109,6 +115,8 @@ describe("test layers settings button", () => { const wells_layer = layers.find( (item) => item["@@type"] === "WellsLayer" ); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions wells_layer && render( EmptyWrapper({ @@ -125,6 +133,8 @@ describe("test layers settings button", () => { const wells_layer = layers.find( (item) => item["@@type"] === "WellsLayer" ); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions wells_layer && render( EmptyWrapper({ diff --git a/typescript/packages/subsurface-viewer/src/components/settings/NumericInput.test.tsx b/typescript/packages/subsurface-viewer/src/components/settings/NumericInput.test.tsx index 1f3732bf2..c2b97d5f6 100644 --- a/typescript/packages/subsurface-viewer/src/components/settings/NumericInput.test.tsx +++ b/typescript/packages/subsurface-viewer/src/components/settings/NumericInput.test.tsx @@ -15,6 +15,8 @@ describe("Test Numeric Input", () => { label="Trajectory thickness" value={15} onChange={(e: ChangeEvent) => { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions e; }} /> diff --git a/typescript/packages/subsurface-viewer/src/components/settings/SliderInput.test.tsx b/typescript/packages/subsurface-viewer/src/components/settings/SliderInput.test.tsx index 053931246..a4b78def7 100644 --- a/typescript/packages/subsurface-viewer/src/components/settings/SliderInput.test.tsx +++ b/typescript/packages/subsurface-viewer/src/components/settings/SliderInput.test.tsx @@ -18,6 +18,8 @@ describe("Test Slider Input", () => { max={100} step={2} onChange={(e: FormEvent) => { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions e; }} /> diff --git a/typescript/packages/subsurface-viewer/src/components/settings/ToggleButton.test.tsx b/typescript/packages/subsurface-viewer/src/components/settings/ToggleButton.test.tsx index 871205944..d8beb71e1 100644 --- a/typescript/packages/subsurface-viewer/src/components/settings/ToggleButton.test.tsx +++ b/typescript/packages/subsurface-viewer/src/components/settings/ToggleButton.test.tsx @@ -15,6 +15,8 @@ describe("Test Toggle Input", () => { label="Log curves" checked={false} onChange={(e: ChangeEvent) => { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions e; }} /> diff --git a/typescript/packages/subsurface-viewer/src/custom.d.ts b/typescript/packages/subsurface-viewer/src/custom.d.ts index 79d8dfe9b..4f4c251dc 100644 --- a/typescript/packages/subsurface-viewer/src/custom.d.ts +++ b/typescript/packages/subsurface-viewer/src/custom.d.ts @@ -1,4 +1,6 @@ declare module "*.svg" { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-require-imports import React = require("react"); export const ReactComponent: React.SFC>; const src: string; diff --git a/typescript/packages/subsurface-viewer/src/layers/grid3d/test_data/TruncatedSnubCube.ts b/typescript/packages/subsurface-viewer/src/layers/grid3d/test_data/TruncatedSnubCube.ts index c7ec850db..e1d19e673 100644 --- a/typescript/packages/subsurface-viewer/src/layers/grid3d/test_data/TruncatedSnubCube.ts +++ b/typescript/packages/subsurface-viewer/src/layers/grid3d/test_data/TruncatedSnubCube.ts @@ -5,6 +5,7 @@ * http://dmccooey.com/polyhedra/CanonicalTruncatedLsnubCube.html */ +/* eslint-disable no-loss-of-precision */ const C0 = 0.0302251764772701090307923300606 const C1 = 0.0363071672915951331148593569212 const C2 = 0.0409778062246362225458193945047 @@ -78,6 +79,7 @@ const C69 = 0.927848015760027714252783557760 const C70 = 0.930337880764612328053786329055496 const C71 = 0.931009593453156729363470630779 const C72 = 0.9320409293065338248817734612548 +/* eslint-enable no-loss-of-precision */ export const Points = [ C72, -C25, -C2, diff --git a/typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts b/typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts index 13973f334..a1b059d0d 100644 --- a/typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts +++ b/typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts @@ -1046,6 +1046,8 @@ function getLogColor( const dl_attrs = Object.entries(attributesObject).find( ([, value]) => value[1] == log_value )?.[1]; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions dl_attrs ? log_color.push(dl_attrs[0]) : log_color.push([0, 0, 0, 0]); // use transparent for undefined/null log values diff --git a/typescript/packages/well-log-viewer/src/Storybook/ExternalLayout.stories.tsx b/typescript/packages/well-log-viewer/src/Storybook/ExternalLayout.stories.tsx index 74b3c2267..dba4a32bc 100644 --- a/typescript/packages/well-log-viewer/src/Storybook/ExternalLayout.stories.tsx +++ b/typescript/packages/well-log-viewer/src/Storybook/ExternalLayout.stories.tsx @@ -8,7 +8,7 @@ import SyncLogViewer from "../SyncLogViewer"; import { tabDecorator } from "./helpers/MuiComponentsTabHelper"; -// eslint-disable-next-line @typescript-eslint/no-var-requires +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const args = require("../../../../../example-data/facies3wells.json"); const RTCWellLogViewer: React.FunctionComponent = () => { diff --git a/typescript/packages/well-log-viewer/src/Storybook/helpers/MuiComponents.tsx b/typescript/packages/well-log-viewer/src/Storybook/helpers/MuiComponents.tsx index 3257ab7c4..47de7f499 100644 --- a/typescript/packages/well-log-viewer/src/Storybook/helpers/MuiComponents.tsx +++ b/typescript/packages/well-log-viewer/src/Storybook/helpers/MuiComponents.tsx @@ -104,7 +104,7 @@ type TabTitle = { type TabsBarProps = { currentTab: number; name: string; - // eslint-disable-next-line @typescript-eslint/ban-types + // eslint-disable-next-line @typescript-eslint/no-empty-object-type onTabChange: (e: React.ChangeEvent<{}>, newValue: number) => void; titles: TabTitle[]; }; @@ -283,7 +283,7 @@ export const Tabs: React.FC = (props) => { setCurrentTab(props.selectedTab ? props.selectedTab : 0); }, [props]); - // eslint-disable-next-line @typescript-eslint/ban-types + // eslint-disable-next-line @typescript-eslint/no-empty-object-type const handleChange = (_e: React.ChangeEvent<{}>, newValue: number) => { setCurrentTab(newValue); if (props.handleSelectedTab) { diff --git a/typescript/packages/well-log-viewer/src/SyncLogViewer.stories.tsx b/typescript/packages/well-log-viewer/src/SyncLogViewer.stories.tsx index 1aa5cbaed..adcb359b6 100644 --- a/typescript/packages/well-log-viewer/src/SyncLogViewer.stories.tsx +++ b/typescript/packages/well-log-viewer/src/SyncLogViewer.stories.tsx @@ -251,6 +251,7 @@ const Template = (args) => { ); }; +/* eslint-disable @typescript-eslint/no-require-imports */ const patternImages = [ require("../../../../example-data/patterns/Anhydrite.gif"), require("../../../../example-data/patterns/Bitumenious.gif"), @@ -305,6 +306,8 @@ const patternImages = [ require("../../../../example-data/patterns/Vertical_tuffitt.gif"), require("../../../../example-data/patterns/Vulcanic.gif"), ]; +/* eslint-enable @typescript-eslint/no-require-imports */ + const patternNamesEnglish = [ "Anhydrite", "Bitumenious", @@ -621,7 +624,7 @@ const TemplateWithSelection = (args: { welllogs: WellLog[] }) => { ); }; -// eslint-disable-next-line @typescript-eslint/no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports const args = require("../../../../example-data/facies3wells.json"); export const DiscreteLogs: StoryObj = { diff --git a/typescript/packages/well-log-viewer/src/SyncLogViewer.test.tsx b/typescript/packages/well-log-viewer/src/SyncLogViewer.test.tsx index 33dfd5d7c..4d1178b38 100644 --- a/typescript/packages/well-log-viewer/src/SyncLogViewer.test.tsx +++ b/typescript/packages/well-log-viewer/src/SyncLogViewer.test.tsx @@ -8,7 +8,11 @@ import { axisMnemos, axisTitles } from "./utils/axes"; import type { ColorTable } from "./components/ColorTableTypes"; const exampleColorTable = colorTables as unknown as ColorTable[]; // equivalent types, should be merged +// TODO: Fix this the next time the file is edited. +// eslint-disable-next-line @typescript-eslint/no-require-imports const exampleWellLog = require("../../../../example-data/L898MUD.json")[0]; +// TODO: Fix this the next time the file is edited. +// eslint-disable-next-line @typescript-eslint/no-require-imports const exampleTemplate = require("../../../../example-data/welllog_template_1.json"); window.ResizeObserver = diff --git a/typescript/packages/well-log-viewer/src/SyncLogViewer.tsx b/typescript/packages/well-log-viewer/src/SyncLogViewer.tsx index c03953e8c..7dc2ee423 100644 --- a/typescript/packages/well-log-viewer/src/SyncLogViewer.tsx +++ b/typescript/packages/well-log-viewer/src/SyncLogViewer.tsx @@ -427,9 +427,13 @@ class SyncLogViewer extends Component { // const onInfoFilled = this.onInfoFilled.bind(this, iView); const onInfoFilled = (infos: Info[]) => { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onInfoFilled?.(iView, infos); }; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.onInfoFilled) { callbackManager.registerCallback("onInfoFilled", onInfoFilled); } @@ -509,6 +513,8 @@ class SyncLogViewer extends Component { iTo: number ) { this.callbackManagers[iWellLog].onInfo(x, logController, iFrom, iTo); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onInfo?.(iWellLog, x, logController, iFrom, iTo); this.fillInfo(iWellLog, x, logController, iFrom, iTo); @@ -541,6 +547,8 @@ class SyncLogViewer extends Component { onCreateController(iWellLog: number, controller: WellLogController): void { this.callbackManagers[iWellLog]?.onCreateController(controller); // set callback to component's caller + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onCreateController?.(iWellLog, controller); this.setControllersZoom(); @@ -551,6 +559,8 @@ class SyncLogViewer extends Component { this.controllers[iWellLog] = controller; } onDeleteController(iWellLog: number, controller: WellLogController): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onDeleteController?.(iWellLog, controller); } // callback function from WellLogView @@ -569,6 +579,8 @@ class SyncLogViewer extends Component { this.syncContentScrollPos(iWellLog); this.syncContentSelection(iWellLog); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onContentRescale?.(iWellLog); } // callback function from WellLogView @@ -576,6 +588,8 @@ class SyncLogViewer extends Component { this.callbackManagers[iWellLog]?.onContentSelection(); this.syncContentSelection(iWellLog); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onContentSelection?.(iWellLog); } // callback function from WellLogView @@ -584,6 +598,8 @@ class SyncLogViewer extends Component { this.syncTemplate(iWellLog); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onTemplateChanged?.(iWellLog); } // callback function from Axis selector @@ -952,6 +968,8 @@ class SyncLogViewer extends Component { onInfo={callbacks.onInfoBind} onCreateController={callbacks.onCreateControllerBind} onTrackMouseEvent={ + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onTrackMouseEvent || onTrackMouseEventDefault } onTrackScroll={callbacks.onTrackScrollBind} @@ -1010,6 +1028,8 @@ class SyncLogViewer extends Component { width={width} patternsTable={this.props.patternsTable} patterns={this.props.patterns} + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types options={this.props.spacerOptions} horizontal={this.props.horizontal} onCreateSpacer={(spacer: WellLogSpacer): void => { @@ -1044,6 +1064,8 @@ class SyncLogViewer extends Component { )} } + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types layout={this.props.layout || defaultLayout} /> ); diff --git a/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx b/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx index f3bd7a4ff..c847ee6ed 100644 --- a/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx +++ b/typescript/packages/well-log-viewer/src/WellLogViewer.stories.tsx @@ -482,7 +482,11 @@ class MapAndWellLogViewer extends React.Component { super(props); this.state = { wellIndex: undefined, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types editedData: props.editedData, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types layers: props.layers as LayersList, }; this.onContentSelection = this.onContentSelection.bind(this); @@ -497,8 +501,14 @@ class MapAndWellLogViewer extends React.Component { }); } componentDidUpdate(prevProps: Props, prevState: State): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.editedData !== prevProps.editedData) { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.setState({ editedData: this.props.editedData }); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions 0; } if (!isEqualRanges(this.state.selection, prevState.selection)) { @@ -540,12 +550,13 @@ class MapAndWellLogViewer extends React.Component { if (track) { const templatePlot = track.plots[0]; if (templatePlot) { - const wells_layer = ( - this.props.layers as Record[] - )?.find( - (item: Record) => - item["@@type"] === "WellsLayer" - ); + const wells_layer = + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + (this.props.layers as Record[])?.find( + (item: Record) => + item["@@type"] === "WellsLayer" + ); if ( wells_layer && wells_layer["logName"] !== templatePlot.name @@ -557,6 +568,8 @@ class MapAndWellLogViewer extends React.Component { ); if (colorTable) wells_layer["logColor"] = colorTable; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const layers = deepCopy(this.props.layers); this.setState({ layers: layers as LayersList, @@ -732,6 +745,8 @@ class MapAndWellLogViewer extends React.Component { : undefined } template={template} + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types colorTables={this.props.colorTables as ColorTable[]} // @aspentech: This issue needs to get sorted out, there seems to be a compatibility issue with the JSON file and the prop type // eslint-disable-next-line @typescript-eslint/ban-ts-comment @@ -743,6 +758,8 @@ class MapAndWellLogViewer extends React.Component { viewTitle={viewTitle} options={{ checkDatafileSchema: + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.checkDatafileSchema, maxVisibleTrackNum: 1, }} diff --git a/typescript/packages/well-log-viewer/src/WellLogViewer.test.tsx b/typescript/packages/well-log-viewer/src/WellLogViewer.test.tsx index 9520e8f21..ab74f7599 100644 --- a/typescript/packages/well-log-viewer/src/WellLogViewer.test.tsx +++ b/typescript/packages/well-log-viewer/src/WellLogViewer.test.tsx @@ -7,7 +7,11 @@ import WellLogViewer from "./WellLogViewer"; import type { WellLogController } from "./components/WellLogView"; import { axisMnemos, axisTitles } from "./utils/axes"; +// TODO: Fix this the next time the file is edited. +// eslint-disable-next-line @typescript-eslint/no-require-imports const exampleTemplate = require("../../../../example-data/welllog_template_1.json"); +// TODO: Fix this the next time the file is edited. +// eslint-disable-next-line @typescript-eslint/no-require-imports const exampleWellLog = require("../../../../example-data/L898MUD.json")[0]; const exampleColorTable = colorTables; diff --git a/typescript/packages/well-log-viewer/src/WellLogViewer.tsx b/typescript/packages/well-log-viewer/src/WellLogViewer.tsx index cf587906e..d20bb2eff 100644 --- a/typescript/packages/well-log-viewer/src/WellLogViewer.tsx +++ b/typescript/packages/well-log-viewer/src/WellLogViewer.tsx @@ -131,21 +131,29 @@ export default class WellLogViewer extends Component< // callback function from WellLogView onCreateController(controller: WellLogController): void { this.callbackManager.onCreateController(controller); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onCreateController?.(controller); // call callback to component's caller } // callback function from WellLogView onContentRescale(): void { this.callbackManager.onContentRescale(); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onContentRescale?.(); // call callback to component's caller } // callback function from WellLogView onContentSelection(): void { this.callbackManager.onContentSelection(); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onContentSelection?.(); // call callback to component's caller } // callback function from WellLogView onTemplateChanged(): void { this.callbackManager.onTemplateChanged(); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onTemplateChanged?.(); // call callback to component's caller } // callback function from Axis selector @@ -156,6 +164,8 @@ export default class WellLogViewer extends Component< onInfo(x: number, logController: LogViewer, iFrom: number, iTo: number) { this.callbackManager.onInfo(x, logController, iFrom, iTo); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onInfo?.(x, logController, iFrom, iTo); this.fillInfo(x, logController, iFrom, iTo); @@ -185,9 +195,13 @@ export default class WellLogViewer extends Component< true ); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.onInfoFilled) { this.callbackManager.registerCallback( "onInfoFilled", + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onInfoFilled ); } @@ -266,7 +280,11 @@ export default class WellLogViewer extends Component< template={this.props.template} colorTables={this.props.colorTables} wellpick={this.props.wellpick} + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types patternsTable={this.props.patternsTable} + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types patterns={this.props.patterns} horizontal={this.props.horizontal} axisTitles={this.props.axisTitles} @@ -279,6 +297,8 @@ export default class WellLogViewer extends Component< onInfo={this.onInfo} onCreateController={this.onCreateController} onTrackMouseEvent={ + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onTrackMouseEvent || onTrackMouseEventDefault } @@ -287,6 +307,8 @@ export default class WellLogViewer extends Component< onTemplateChanged={this.onTemplateChanged} /> } + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types layout={this.props.layout || defaultLayout} /> ); diff --git a/typescript/packages/well-log-viewer/src/WellLogViewer_performance.test.tsx b/typescript/packages/well-log-viewer/src/WellLogViewer_performance.test.tsx index af8c44f8c..d36ed6b06 100644 --- a/typescript/packages/well-log-viewer/src/WellLogViewer_performance.test.tsx +++ b/typescript/packages/well-log-viewer/src/WellLogViewer_performance.test.tsx @@ -8,6 +8,8 @@ import WellLogViewer from "./WellLogViewer"; import logTimes, { obj } from "./test/performanceMetrics"; import { axisMnemos, axisTitles } from "./utils/axes"; +// TODO: Fix this the next time the file is edited. +// eslint-disable-next-line @typescript-eslint/no-require-imports const exampleTemplate = require("../../../../example-data/welllog_template_1.json"); //const exampleWellLog = require("../../../../example-data/L898MUD.json")[0]; const exampleWellLog = { diff --git a/typescript/packages/well-log-viewer/src/components/AxisSelector.tsx b/typescript/packages/well-log-viewer/src/components/AxisSelector.tsx index 235bd643c..f71458a65 100644 --- a/typescript/packages/well-log-viewer/src/components/AxisSelector.tsx +++ b/typescript/packages/well-log-viewer/src/components/AxisSelector.tsx @@ -20,8 +20,12 @@ class AxisSelector extends Component { { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onChange(ev.target.value); }} /> @@ -31,15 +35,24 @@ class AxisSelector extends Component { } render(): JSX.Element { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.autoHide && this.props.axes.length <= 1) return <>; // do not need to render anything return (
+ {/* TODO: Fix this the next time the file is edited. */} + {/* eslint-disable-next-line react/prop-types */} {this.props.header} + {/* TODO: Fix this the next time the file is edited. */} + {/* eslint-disable-next-line react/prop-types */} {this.props.axes.map((axis) => { return this.createItem( - this.props.axisTitles - ? this.props.axisTitles[axis] + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.axisTitles // TODO: Fix this the next time the file is edited. + ? // eslint-disable-next-line react/prop-types + this.props.axisTitles[axis] : axis, axis ); diff --git a/typescript/packages/well-log-viewer/src/components/InfoPanel.tsx b/typescript/packages/well-log-viewer/src/components/InfoPanel.tsx index b8875f436..3cd05201c 100644 --- a/typescript/packages/well-log-viewer/src/components/InfoPanel.tsx +++ b/typescript/packages/well-log-viewer/src/components/InfoPanel.tsx @@ -50,6 +50,8 @@ class InfoPanel extends Component { info: Info /*, ev: React.MouseEvent*/ ): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onGroupClick?.(info); } @@ -123,6 +125,8 @@ class InfoPanel extends Component { } render(): JSX.Element { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const header = this.props.header; return (
@@ -130,6 +134,8 @@ class InfoPanel extends Component { {header && {header}} + {/* TODO: Fix this the next time the file is edited. */} + {/* eslint-disable-next-line react/prop-types */} {this.props.infos?.map(this.createRow.bind(this))}
diff --git a/typescript/packages/well-log-viewer/src/components/LocalMenus.tsx b/typescript/packages/well-log-viewer/src/components/LocalMenus.tsx index 8fb19f0bb..2c3d6efd3 100644 --- a/typescript/packages/well-log-viewer/src/components/LocalMenus.tsx +++ b/typescript/packages/well-log-viewer/src/components/LocalMenus.tsx @@ -54,45 +54,73 @@ export class SimpleMenu extends Component { constructor(props: Props) { super(props); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.state = { anchorEl: this.props.anchorEl }; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const wellLogView = this.props.wellLogView; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.addTrack = wellLogView.addTrack.bind( wellLogView, this.state.anchorEl, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.track ); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.editTrack = wellLogView.editTrack.bind( wellLogView, this.state.anchorEl, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.track ); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.removeTrack = wellLogView.removeTrack.bind( wellLogView, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.track ); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.addPlot = wellLogView.addPlot.bind( wellLogView, this.state.anchorEl, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.track ); this.editPlots = editPlots.bind( null, this.state.anchorEl, wellLogView, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.track ); this.removePlots = removePlots.bind( null, this.state.anchorEl, wellLogView, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.track ); } componentDidUpdate(prevProps: Props): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.anchorEl !== prevProps.anchorEl) { this.setState((_state, props) => { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types return { anchorEl: props.anchorEl }; }); } @@ -120,8 +148,13 @@ export class SimpleMenu extends Component { key={plot.id} onClick={() => this.handleClickItem( + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.wellLogView.removeTrackPlot.bind( - this.props.wellLogView, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.wellLogView, // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.track as GraphTrack, plot ) @@ -135,13 +168,23 @@ export class SimpleMenu extends Component { menuRemovePlotItems(): ReactNode[] { const nodes: ReactNode[] = []; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const welllog = this.props.wellLogView.props.welllog; if (welllog) { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const track = this.props.track; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const plots = (track as GraphTrack).plots; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const curves = welllog.curves; for (const plot of plots) { const iCurve = plot.id as number; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const title = getPlotTitle(plot) || curves[iCurve].name; nodes.push(this.createRemovePlotMenuItem(title, plot)); } @@ -155,9 +198,14 @@ export class SimpleMenu extends Component { key={plot.id} onClick={() => this.handleClickItem( + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.wellLogView.editPlot.bind( + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.wellLogView, - this.state.anchorEl, + this.state.anchorEl, // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.track, plot ) @@ -171,13 +219,23 @@ export class SimpleMenu extends Component { menuEditPlotItems(): ReactNode[] { const nodes: ReactNode[] = []; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const welllog = this.props.wellLogView.props.welllog; if (welllog) { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const track = this.props.track; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const plots = (track as GraphTrack).plots; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const curves = welllog.curves; for (const plot of plots) { const iCurve = plot.id as number; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const title = getPlotTitle(plot) || curves[iCurve].name; nodes.push(this.createEditPlotMenuItem(title, plot)); } @@ -194,6 +252,8 @@ export class SimpleMenu extends Component { } render(): JSX.Element { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.type == "removePlots") { return (
@@ -210,6 +270,8 @@ export class SimpleMenu extends Component {
); } + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.type == "editPlots") { return (
@@ -226,6 +288,8 @@ export class SimpleMenu extends Component {
); } + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.type == "title") { return (
@@ -246,10 +310,16 @@ export class SimpleMenu extends Component { // For this.props.type == "legends" or this.props.type == "container" + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const track = this.props.track; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const plots = (track as GraphTrack).plots; const createMenuItem = (track: GraphTrack): React.ReactNode => { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if ((track as GraphTrack).options.plotFactory) { return [this.createMenuItem("Add plot", this.addPlot)]; } else if (!isScaleTrack(track)) { @@ -269,6 +339,8 @@ export class SimpleMenu extends Component { onContextMenu={this.handleContextMenu.bind(this)} > {createMenuItem(track as GraphTrack)} + {/* TODO: Fix this the next time the file is edited. */} + {/* eslint-disable-next-line react/prop-types */} {plots && plots.length ? [ this.createMenuItem("Edit plot", this.editPlots), diff --git a/typescript/packages/well-log-viewer/src/components/PlotDialog.tsx b/typescript/packages/well-log-viewer/src/components/PlotDialog.tsx index ad2ba62fd..cb5ac8451 100644 --- a/typescript/packages/well-log-viewer/src/components/PlotDialog.tsx +++ b/typescript/packages/well-log-viewer/src/components/PlotDialog.tsx @@ -193,7 +193,11 @@ export class PlotPropertiesDialog extends Component { if (names[0]) name2 = name = names[0]; if (names[1]) name2 = names[1]; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const trackTemplate = getTrackTemplate(this.props.track); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const templatePlot = this.props.templatePlot; this.state = templatePlot ? { @@ -217,6 +221,8 @@ export class PlotPropertiesDialog extends Component { // for 'gradientfill' plot colorTable: + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.wellLogView.props.colorTables?.[0]?.name, inverseColorTable: undefined, colorScale: undefined, @@ -242,6 +248,8 @@ export class PlotPropertiesDialog extends Component { this.setState({ inverseColor: "" }); } else if (this.state.type === "differential") { if (!this.state.name2) { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const skipUsed = this.props.templatePlot ? false : true; /*??*/ @@ -252,6 +260,8 @@ export class PlotPropertiesDialog extends Component { } onOK(): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onOK(this.state); this.closeDialog(); } @@ -262,7 +272,11 @@ export class PlotPropertiesDialog extends Component { dataNames(skipUsed: boolean): string[] { return dataNames( + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.wellLogView.props.welllog, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types skipUsed ? this.props.track : null ); } @@ -334,6 +348,8 @@ export class PlotPropertiesDialog extends Component { ), ]; } else if (type === "gradientfill") { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const colorTables = this.props.wellLogView.props.colorTables; return [ this.createSelectControl( @@ -356,8 +372,14 @@ export class PlotPropertiesDialog extends Component { } render(): JSX.Element { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const trackTemplate = getTrackTemplate(this.props.track); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const title = this.props.templatePlot ? "Edit plot" : "Add New Plot"; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const skipUsed = this.props.templatePlot ? false : true; /*??*/ const scale = this.state.scale || trackTemplate.scale; return ( diff --git a/typescript/packages/well-log-viewer/src/components/Scroller.tsx b/typescript/packages/well-log-viewer/src/components/Scroller.tsx index 2405bdc11..387738a55 100644 --- a/typescript/packages/well-log-viewer/src/components/Scroller.tsx +++ b/typescript/packages/well-log-viewer/src/components/Scroller.tsx @@ -90,6 +90,8 @@ class Scroller extends Component { const elOuter = this.scroller; if (!elOuter) return; // notify parent + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onScroll?.(this.getScrollX(), this.getScrollY()); } @@ -164,6 +166,8 @@ class Scroller extends Component { ref={(el) => (this.content = el as HTMLDivElement)} style={{ position: "absolute" }} > + {/* TODO: Fix this the next time the file is edited. */} + {/* eslint-disable-next-line react/prop-types */} {this.props.children}
diff --git a/typescript/packages/well-log-viewer/src/components/TrackDialog.tsx b/typescript/packages/well-log-viewer/src/components/TrackDialog.tsx index 4c96b2bb9..b55d28195 100644 --- a/typescript/packages/well-log-viewer/src/components/TrackDialog.tsx +++ b/typescript/packages/well-log-viewer/src/components/TrackDialog.tsx @@ -46,32 +46,50 @@ export class TrackPropertiesDialog extends Component { super(props); let name = ""; const names = dataNames( + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.wellLogView.props.welllog, null, true ); if (names[0]) name = names[0]; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const templateTrack = this.props.templateTrack; this.bStacked = templateTrack && + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types templateTrack.plots && + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types templateTrack.plots[0] && + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types templateTrack.plots[0].type === "stacked"; this.state = templateTrack ? { ...templateTrack, stacked: this.bStacked ? "1" : "0", + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types stackedName: templateTrack.plots[0]?.name, showLabels: + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types templateTrack.plots[0]?.showLabels !== false ? "true" : "false", showLines: + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types templateTrack.plots[0]?.showLines !== false ? "true" : "false", + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types labelRotation: templateTrack.plots[0]?.labelRotation || 0, open: true, } @@ -112,6 +130,8 @@ export class TrackPropertiesDialog extends Component { }; this.state.plots.push(plot); } + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onOK(this.state); this.closeDialog(); } @@ -168,6 +188,8 @@ export class TrackPropertiesDialog extends Component { } render(): JSX.Element { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const templateTrack = this.props.templateTrack; const title = templateTrack ? "Edit track" : "Add New Track"; return ( @@ -203,6 +225,8 @@ export class TrackPropertiesDialog extends Component { "stackedName", // data "Data", createDataItems( + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.wellLogView.props.welllog, null, true diff --git a/typescript/packages/well-log-viewer/src/components/WellLogAxesPanel.tsx b/typescript/packages/well-log-viewer/src/components/WellLogAxesPanel.tsx index 1bc7f7868..53bffcc1d 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogAxesPanel.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogAxesPanel.tsx @@ -41,11 +41,17 @@ export class WellLogAxesPanel extends Component { constructor(props: Props) { super(props); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.welllog = this.props.callbackManager.welllog(); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const axes = getAvailableAxes(this.welllog, this.props.axisMnemos); this.state = { axes: axes, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types primaryAxis: this.props.primaryAxis, }; @@ -66,25 +72,41 @@ export class WellLogAxesPanel extends Component { } componentDidMount(): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.registerCallbacks(this.props.callbackManager); } componentWillUnmount(): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.unregisterCallbacks(this.props.callbackManager); } componentDidUpdate(prevProps: Props): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (prevProps.callbackManager !== this.props.callbackManager) { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.unregisterCallbacks(prevProps.callbackManager); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.registerCallbacks(this.props.callbackManager); } + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const wellog = this.props.callbackManager?.welllog(); if ( this.welllog !== wellog || + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types prevProps.axisMnemos !== this.props.axisMnemos ) { this.welllog = wellog; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const axes = getAvailableAxes(this.welllog, this.props.axisMnemos); this.setState({ axes: axes, @@ -100,13 +122,21 @@ export class WellLogAxesPanel extends Component { return (
+ // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onChangePrimaryAxis(value) } + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types autoHide={this.props.autoHide} />
diff --git a/typescript/packages/well-log-viewer/src/components/WellLogInfoPanel.tsx b/typescript/packages/well-log-viewer/src/components/WellLogInfoPanel.tsx index 19f2c114e..ae0dfe387 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogInfoPanel.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogInfoPanel.tsx @@ -48,30 +48,52 @@ export class WellLogInfoPanel extends Component { } componentDidMount(): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const callbackManager = this.props.callbackManager; this.registerCallBacks(callbackManager); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types callbackManager.updateInfo(); // force onInfo callback to be called } componentWillUnmount(): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const callbackManager = this.props.callbackManager; this.unregisterCallBacks(callbackManager); } componentDidUpdate(prevProps: Props /*, prevState: State*/): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (prevProps.callbackManager !== this.props.callbackManager) { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.unregisterCallBacks(prevProps.callbackManager); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.registerCallBacks(this.props.callbackManager); } if ( - this.props.readoutOptions && + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.readoutOptions && // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types (!prevProps.readoutOptions || - this.props.readoutOptions.allTracks !== - prevProps.readoutOptions.allTracks || - this.props.readoutOptions.grouping !== + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.readoutOptions.allTracks !== // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + prevProps.readoutOptions.allTracks || // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.readoutOptions.grouping !== // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types prevProps.readoutOptions.grouping) ) { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.callbackManager.updateInfo(); // force onInfo callback to be called } } @@ -84,6 +106,8 @@ export class WellLogInfoPanel extends Component { render(): JSX.Element { return ( extends Component> { createPanel( panel?: JSX.Element | string | ((parent: Parent) => JSX.Element) ): JSX.Element | string | undefined { - if (typeof panel === "function") return panel(this.props.parent); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + if (typeof panel === "function") + // eslint-disable-next-line react/prop-types + return panel(this.props.parent); if (typeof panel === "object") return panel; // JSX.Element return panel; // JSX.Element | string } render(): JSX.Element { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const center = this.createPanel(this.props.center); let header: JSX.Element | string | undefined; @@ -41,6 +47,8 @@ export class WellLogLayout extends Component> { let top: JSX.Element | string | undefined; let bottom: JSX.Element | string | undefined; let footer: JSX.Element | string | undefined; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const layout = this.props.layout; if (!layout) { // use default empty layout @@ -51,11 +59,23 @@ export class WellLogLayout extends Component> { bottom = undefined; footer = undefined; } else { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types header = this.createPanel(layout.header); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types left = this.createPanel(layout.left); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types right = this.createPanel(layout.right); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types top = this.createPanel(layout.top); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types bottom = this.createPanel(layout.bottom); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types footer = this.createPanel(layout.footer); } diff --git a/typescript/packages/well-log-viewer/src/components/WellLogScaleSelector.tsx b/typescript/packages/well-log-viewer/src/components/WellLogScaleSelector.tsx index 6fd76cf44..1f79fbbfd 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogScaleSelector.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogScaleSelector.tsx @@ -42,22 +42,34 @@ export class WellLogScaleSelector extends Component { } componentDidMount(): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.registerCallbacks(this.props.callbackManager); } componentWillUnmount(): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.unregisterCallbacks(this.props.callbackManager); } componentDidUpdate(prevProps: Props): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (prevProps.callbackManager !== this.props.callbackManager) { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.unregisterCallbacks(prevProps.callbackManager); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.registerCallbacks(this.props.callbackManager); } } // callback function from Vertical Scale combobox onChange(value: number): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const controller = this.props.callbackManager?.controller; if (!controller) return; controller.setContentScale(value); @@ -65,6 +77,8 @@ export class WellLogScaleSelector extends Component { onContentRescale(): void { this.setState((state: Readonly) => { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const controller = this.props.callbackManager?.controller; if (!controller) return null; const value = controller.getContentScale(); @@ -78,14 +92,22 @@ export class WellLogScaleSelector extends Component { render(): JSX.Element { return (
+ {/* TODO: Fix this the next time the file is edited. */} + {/* eslint-disable-next-line react/prop-types */} {this.props.label && ( + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types {this.props.label} )} diff --git a/typescript/packages/well-log-viewer/src/components/WellLogSpacer.tsx b/typescript/packages/well-log-viewer/src/components/WellLogSpacer.tsx index de233a50f..e405762f8 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogSpacer.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogSpacer.tsx @@ -85,8 +85,13 @@ class WellLogSpacer extends Component { constructor(props: WellLogSpacerProps) { super(props); this.defs = + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.options?.wellpickPatternFill && - this.props.patterns && + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.patterns && // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types createDefs(this.uid, this.props.patternsTable); this._isMount = false; @@ -100,19 +105,34 @@ class WellLogSpacer extends Component { prevProps: WellLogSpacerProps /*, prevState: State*/ ): void { // called after render()!? + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.onCreateSpacer !== prevProps.onCreateSpacer) { // update callback to component's caller + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onCreateSpacer?.(this); } if ( + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.patternsTable !== prevProps.patternsTable || - this.props.patterns !== prevProps.patterns || - this.props.options?.wellpickPatternFill !== + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.patterns !== prevProps.patterns || // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.options?.wellpickPatternFill !== // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types prevProps.options?.wellpickPatternFill ) { this.defs = + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.options?.wellpickPatternFill && - this.props.patterns && + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.patterns && // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types createDefs(this.uid, this.props.patternsTable); this.forceUpdate(); // force to show pattern fill with new this.defs @@ -122,26 +142,40 @@ class WellLogSpacer extends Component { shouldComponentUpdate( nextProps: WellLogSpacerProps /*, nextState: State*/ ): boolean { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.colorTables !== nextProps.colorTables) { return true; } + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.controllers !== nextProps.controllers) { return true; } + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.wellpicks !== nextProps.wellpicks) { return true; } + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.width !== nextProps.width) { return true; } if ( - this.props.options?.wellpickColorFill !== + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.options?.wellpickColorFill !== // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types nextProps.options?.wellpickColorFill ) return true; if ( - this.props.options?.wellpickPatternFill !== + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.options?.wellpickPatternFill !== // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types nextProps.options?.wellpickPatternFill ) { return true; @@ -158,6 +192,8 @@ class WellLogSpacer extends Component { } render(): JSX.Element { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const horizontal = this.props.horizontal; let ymax = 0; @@ -171,9 +207,15 @@ class WellLogSpacer extends Component { let offsetTop = 3000; // try to draw initially out of screen let offsetLeft = 3000; let height = 1; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types let width = this.props.width ?? 1; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const controller = this.props.controllers[0] as unknown as WellLogView; const logViewer = controller?.logController; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const controller2 = this.props.controllers[1] as unknown as WellLogView; const logViewer2 = controller2?.logController; const wps = controller ? getWellPicks(controller) : null; @@ -199,8 +241,13 @@ class WellLogSpacer extends Component { //const offset = wpSize / 2; const patterns = + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.options?.wellpickPatternFill && - this.props.patternsTable && + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types + this.props.patternsTable && // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.patterns; for (const wp of wps) { @@ -371,6 +418,8 @@ class WellLogSpacer extends Component { ); }); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const distance = this.props.distance; return ( @@ -395,10 +444,16 @@ class WellLogSpacer extends Component { {!controller?.props.options?.hideTrackTitle ?
: null} {!controller?.props.options?.hideTrackLegend && distance !== undefined && + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types distance.value !== undefined ? (
{"←" + + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types distance.value.toFixed(0) + + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types distance.units + "→"}
@@ -424,6 +479,8 @@ class WellLogSpacer extends Component { {picks.map( (value, index) => index + 1 < picks.length && [ + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.options?.wellpickColorFill && value.color && ( = { id: "Well-Log-View", horizontal: false, welllog: welllogDefault, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-require-imports template: require("../../../../../example-data/welllog_template_1.json"), viewTitle: (
@@ -80,6 +82,8 @@ export const Discrete: StoryObj = { id: "Well-Log-View-Discrete", horizontal: false, welllog: welllogDiscrete, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-require-imports template: require("../../../../../example-data/welllog_template_2.json"), viewTitle: "Well '" + welllogDiscrete.header.well + "'", colorTables: colorTables, diff --git a/typescript/packages/well-log-viewer/src/components/WellLogView.test.tsx b/typescript/packages/well-log-viewer/src/components/WellLogView.test.tsx index 683c76b52..a485ce035 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogView.test.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogView.test.tsx @@ -5,6 +5,8 @@ import "jest-styled-components"; import React from "react"; import WellLogView from "./WellLogView"; +// TODO: Fix this the next time the file is edited. +// eslint-disable-next-line @typescript-eslint/no-require-imports const exampleTemplate = require("../../../../../example-data/welllog_template_1.json"); const exampleWellLog = { header: {}, diff --git a/typescript/packages/well-log-viewer/src/components/WellLogView.tsx b/typescript/packages/well-log-viewer/src/components/WellLogView.tsx index 52261e58b..1f5913286 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogView.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogView.tsx @@ -1,3 +1,4 @@ +/* eslint-disable react/prop-types */ import type { ReactNode } from "react"; import React, { Component } from "react"; import { LogViewer } from "@equinor/videx-wellog"; diff --git a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.stories.tsx b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.stories.tsx index 733cad740..6c7b23401 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.stories.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.stories.tsx @@ -75,6 +75,8 @@ export const Default: StoryObj = { id: "Well-Log-Viewer-With-Scroller", horizontal: false, welllog: wellLog, + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-require-imports template: require("../../../../../example-data/welllog_template_1.json"), viewTitle: "Well '" + wellLog.header.well + "'", colorTables: colorTables, diff --git a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.test.tsx b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.test.tsx index 53941f147..e10d7d0ad 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.test.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.test.tsx @@ -5,7 +5,11 @@ import "jest-styled-components"; import React from "react"; import WellLogViewWithScroller from "./WellLogViewWithScroller"; +// TODO: Fix this the next time the file is edited. +// eslint-disable-next-line @typescript-eslint/no-require-imports const welllog = require("../../../../../example-data/L898MUD.json")[0]; +// TODO: Fix this the next time the file is edited. +// eslint-disable-next-line @typescript-eslint/no-require-imports const template = require("../../../../../example-data/welllog_template_1.json"); window.ResizeObserver = diff --git a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.tsx b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.tsx index 7bcc092dd..c28324260 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.tsx @@ -50,24 +50,34 @@ class WellLogViewWithScroller extends Component { // callback function from WellLogView onCreateController(controller: WellLogController): void { this.controller = controller; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onCreateController?.(controller); } // callback function from WellLogView onTrackScroll(): void { this.setScrollerPosAndZoom(); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onTrackScroll?.(); } // callback function from WellLogView onTrackSelection(): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onTrackSelection?.(); } // callback function from WellLogView onContentRescale(): void { this.setScrollerPosAndZoom(); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onContentRescale?.(); } // callback function from WellLogView onContentSelection(): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onContentSelection?.(); } @@ -82,8 +92,12 @@ class WellLogViewWithScroller extends Component { const controller = this.controller; if (!controller) return; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const fContent = this.props.horizontal ? x : y; // fraction controller.scrollContentTo(fContent); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const posTrack = this.calcPosTrack(this.props.horizontal ? y : x); controller.scrollTrackTo(posTrack); } @@ -124,12 +138,20 @@ class WellLogViewWithScroller extends Component { } else { const contentZoom = controller.getContentZoom(); const trackZoom = controller.getTrackZoom(); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types xZoom = this.props.horizontal ? contentZoom : trackZoom; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types yZoom = this.props.horizontal ? trackZoom : contentZoom; const fContent = this.getContentPosFraction(); const fTrack = this.getTrackPosFraction(); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types x = this.props.horizontal ? fContent : fTrack; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types y = this.props.horizontal ? fTrack : fContent; } @@ -141,17 +163,29 @@ class WellLogViewWithScroller extends Component { const _x = scroller.getScrollX(); const _y = scroller.getScrollY(); const _posTrack = this.calcPosTrack( + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.horizontal ? _y : _x ); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const posTrack = this.calcPosTrack(this.props.horizontal ? y : x); if (posTrack === _posTrack) { shouldUpdateScroller--; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions, react/prop-types this.props.horizontal ? (y = _y) : (x = _x); } + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const _fContent = this.props.horizontal ? _x : _y; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const fContent = this.props.horizontal ? x : y; if (Math.abs(fContent - _fContent) < 0.001) { shouldUpdateScroller--; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions, react/prop-types this.props.horizontal ? (x = _x) : (y = _y); } } diff --git a/typescript/packages/well-log-viewer/src/components/WellLogZoomSlider.tsx b/typescript/packages/well-log-viewer/src/components/WellLogZoomSlider.tsx index ff7681872..201b622a9 100644 --- a/typescript/packages/well-log-viewer/src/components/WellLogZoomSlider.tsx +++ b/typescript/packages/well-log-viewer/src/components/WellLogZoomSlider.tsx @@ -40,22 +40,34 @@ export class WellLogZoomSlider extends Component { } componentDidMount(): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.registerCallbacks(this.props.callbackManager); } componentWillUnmount(): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.unregisterCallbacks(this.props.callbackManager); } componentDidUpdate(prevProps: Props): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (prevProps.callbackManager !== this.props.callbackManager) { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.unregisterCallbacks(prevProps.callbackManager); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.registerCallbacks(this.props.callbackManager); } } onContentRescale(): void { this.setState((state: Readonly) => { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const controller = this.props.callbackManager?.controller; if (!controller) return null; const zoom = controller.getContentZoom(); @@ -68,18 +80,26 @@ export class WellLogZoomSlider extends Component { // callback function from zoom slider onZoomSliderChange(zoom: number): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.callbackManager?.controller?.zoomContent(zoom); } render(): JSX.Element { return (
+ {/* TODO: Fix this the next time the file is edited. */} + {/* eslint-disable-next-line react/prop-types */} {this.props.label && ( + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types {this.props.label} )} diff --git a/typescript/packages/well-log-viewer/src/components/ZoomSlider.tsx b/typescript/packages/well-log-viewer/src/components/ZoomSlider.tsx index f729d5274..79c105680 100644 --- a/typescript/packages/well-log-viewer/src/components/ZoomSlider.tsx +++ b/typescript/packages/well-log-viewer/src/components/ZoomSlider.tsx @@ -31,6 +31,8 @@ class ZoomSlider extends Component { constructor(props: Props) { super(props); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const level = convertValueToLevel(this.props.value); this.state = { level: level, @@ -39,8 +41,12 @@ class ZoomSlider extends Component { } componentDidUpdate(prevProps: Props): void { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.value !== prevProps.value) { this.setState((state: Readonly) => { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types const level = convertValueToLevel(this.props.value); if (state.level == level) return null; return { level: level }; @@ -56,7 +62,11 @@ class ZoomSlider extends Component { if (typeof level !== "number") return; this.setState((state: Readonly) => { if (state.level === level) return null; + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types if (this.props.onChange) + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types this.props.onChange(convertLevelToValue(level)); else console.error("ZoomSlider props.onChange not set"); return { level: level as number }; @@ -69,7 +79,11 @@ class ZoomSlider extends Component { value={this.state.level} defaultValue={0} min={0} + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types step={this.props.step || 0.5} + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line react/prop-types max={convertValueToLevel(this.props.max || 256)} scale={convertLevelToValue} // convert zoom level to zoom value function onChange={this.onChange} diff --git a/typescript/packages/well-log-viewer/src/custom.d.ts b/typescript/packages/well-log-viewer/src/custom.d.ts index 6e1b25973..2bb55970f 100644 --- a/typescript/packages/well-log-viewer/src/custom.d.ts +++ b/typescript/packages/well-log-viewer/src/custom.d.ts @@ -1,4 +1,6 @@ declare module "*.svg" { + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-require-imports import React = require("react"); export const ReactComponent: React.SFC>; const src: string; diff --git a/typescript/packages/well-log-viewer/src/utils/tracks.ts b/typescript/packages/well-log-viewer/src/utils/tracks.ts index 6b8d99469..018a79a3d 100644 --- a/typescript/packages/well-log-viewer/src/utils/tracks.ts +++ b/typescript/packages/well-log-viewer/src/utils/tracks.ts @@ -572,6 +572,8 @@ function updateStackedTrackScale(track: StackedTrack): void { //if (!track.options.scale) throw Error("Invalid track.options.scale!"); //track.trackScale = createScale(track.options.scale, track.options.domain); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @typescript-eslint/no-unused-expressions track.xscale; }