diff options
author | David Cho-Lerat <117642976+david-cho-lerat-sonarsource@users.noreply.github.com> | 2024-10-22 15:19:18 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-10-22 20:03:10 +0000 |
commit | d9f6920331a0f274f1d6227c2af74d6dbfe84aa2 (patch) | |
tree | 3228b99c665c03e6c1bf2a1f68d9d90865f8558b /server | |
parent | c33a6b9956802dfa00133e304326887b901af901 (diff) | |
download | sonarqube-d9f6920331a0f274f1d6227c2af74d6dbfe84aa2.tar.gz sonarqube-d9f6920331a0f274f1d6227c2af74d6dbfe84aa2.zip |
SONAR-23206 Remove design-system build to have it as normal code inside sonar-web (#12088)
Co-authored-by: Grégoire Aubert <gregoire.aubert@sonarsource.com>
Co-authored-by: Jeremy Davis <jeremy.davis@sonarsource.com>
Diffstat (limited to 'server')
2218 files changed, 3768 insertions, 5570 deletions
diff --git a/server/sonar-web/.eslintrc b/server/sonar-web/.eslintrc index 7da42df461d..09c65f0aba4 100644 --- a/server/sonar-web/.eslintrc +++ b/server/sonar-web/.eslintrc @@ -1,7 +1,14 @@ { "extends": "sonarqube", - "plugins": ["header", "typescript-sort-keys", "eslint-plugin-local-rules"], - "ignorePatterns": ["eslint-local-rules/**/*"], + "plugins": [ + "header", + "typescript-sort-keys", + "eslint-plugin-local-rules" + ], + "ignorePatterns": [ + "config/jest/**/*.ts", + "eslint-local-rules/**/*" + ], "root": true, "parserOptions": { "project": "./tsconfig.json" @@ -33,7 +40,7 @@ " * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.", " " ], - 1 + 2 ], "react/forbid-component-props": [ "error", @@ -69,6 +76,7 @@ } ], "react/jsx-curly-brace-presence": "warn", + "react/react-in-jsx-scope": "off", "testing-library/render-result-naming-convention": "off", "typescript-sort-keys/interface": "error", /* Local rules, defined in ./eslint-local-rules/ */ @@ -92,4 +100,4 @@ } ] } -} +}
\ No newline at end of file diff --git a/server/sonar-web/build.gradle b/server/sonar-web/build.gradle index 51c3d57b0e2..48261edb792 100644 --- a/server/sonar-web/build.gradle +++ b/server/sonar-web/build.gradle @@ -13,23 +13,9 @@ sonar { def webappDir = "${buildDir}/webapp" -task "yarn_design-system"(type: Exec) { - inputs.dir('design-system/src') - workingDir "design-system" - commandLine osAdaptiveCommand(['npm', 'run', 'build-release']) - outputs.dir("design-system/lib") - outputs.cacheIf { true } -} - compileJava.onlyIf {false} task yarn_run(type: Exec) { - dependsOn "yarn_design-system" - - tasks."yarn_design-system".getOutputs().getFiles().each { - inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE) - } - ['config', 'public', 'scripts', 'src'].each { inputs.dir(it).withPathSensitivity(PathSensitivity.RELATIVE) } @@ -58,10 +44,8 @@ task "yarn_lint-report-ci"(type: Exec) { } task "yarn_validate-ci"(type: Exec) { - dependsOn "yarn_design-system" - // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized - ['config', 'src/main/js', 'design-system'].each { + ['config', 'src/main/js'].each { inputs.dir(it) } ['package.json', 'yarn.lock', 'tsconfig.json', '.eslintrc', 'jest.config.js'].each { @@ -74,8 +58,6 @@ task "yarn_validate-ci"(type: Exec) { } task "yarn_check-ci"(type: Exec) { - dependsOn "yarn_design-system" - // Note that outputs are not relocatable, because contain absolute paths, and that's why inputs are not relativized ['config', 'src'].each { inputs.dir(it) @@ -87,7 +69,7 @@ task "yarn_check-ci"(type: Exec) { commandLine osAdaptiveCommand(['npm', 'run', 'check-ci']) } -def sources = fileTree(dir: "src/main/js") + fileTree(dir: "scripts") + fileTree(dir: "config") + fileTree(dir: "eslint-local-rules") + fileTree(dir: "__mocks__") + fileTree(dir: "design-system/config") + fileTree(dir: "design-system/src") + files("file:tailwind.config.js") + files("file:jest.config.js") + files("file:tailwind.base.config.js") + files("file:tailwind.config.js") + files("file:tailwind.utilities.js") +def sources = fileTree(dir: "src/main/js") + fileTree(dir: "scripts") + fileTree(dir: "config") + fileTree(dir: "eslint-local-rules") + fileTree(dir: "__mocks__") + files("file:tailwind.config.js") + files("file:jest.config.js") + files("file:tailwind.base.config.js") + files("file:tailwind.config.js") + files("file:tailwind.utilities.js") task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) { source = sources diff --git a/server/sonar-web/config/jest/CSSStub.js b/server/sonar-web/config/jest/CSSStub.js index e787e07baed..0ee64fb1837 100644 --- a/server/sonar-web/config/jest/CSSStub.js +++ b/server/sonar-web/config/jest/CSSStub.js @@ -17,5 +17,5 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -module.exports = {}; +module.exports = {}; diff --git a/server/sonar-web/config/jest/DataDogReporter.js b/server/sonar-web/config/jest/DataDogReporter.js index 2e307eb5742..194a92ed009 100644 --- a/server/sonar-web/config/jest/DataDogReporter.js +++ b/server/sonar-web/config/jest/DataDogReporter.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable no-console */ const fs = require('fs'); diff --git a/server/sonar-web/config/jest/FileStub.js b/server/sonar-web/config/jest/FileStub.js index 5c263301d34..41bbfb86b1c 100644 --- a/server/sonar-web/config/jest/FileStub.js +++ b/server/sonar-web/config/jest/FileStub.js @@ -17,4 +17,5 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + module.exports = 'test-file-stub'; diff --git a/server/sonar-web/config/jest/GlobalSetup.js b/server/sonar-web/config/jest/GlobalSetup.js index 156fd1ef94e..4d6044b7464 100644 --- a/server/sonar-web/config/jest/GlobalSetup.js +++ b/server/sonar-web/config/jest/GlobalSetup.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + module.exports = () => { process.env.TZ = 'utc'; }; diff --git a/server/sonar-web/eslint-local-rules/jest.config.js b/server/sonar-web/config/jest/JestPreprocess.js index 3829dabb3df..11ec326b4d1 100644 --- a/server/sonar-web/eslint-local-rules/jest.config.js +++ b/server/sonar-web/config/jest/JestPreprocess.js @@ -17,16 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -module.exports = { - testRegex: '(/__tests__/.*|\\-test)\\.(t|j)s$', - transform: { - '^.+\\.(t|j)s$': [ - '@swc/jest', - { - jsc: { - target: 'es2018', - }, - }, - ], - }, + +// These are merged with the default babel.config.js file, no need to repeat what's already in there +const babelOptions = { + presets: ['@babel/preset-env'], + plugins: ['babel-plugin-twin', 'babel-plugin-macros'], }; + +module.exports = require('babel-jest').default.createTransformer(babelOptions); diff --git a/server/sonar-web/config/jest/SetupFailOnConsole.ts b/server/sonar-web/config/jest/SetupFailOnConsole.ts index 2e0f3df81c0..182cafd7e37 100644 --- a/server/sonar-web/config/jest/SetupFailOnConsole.ts +++ b/server/sonar-web/config/jest/SetupFailOnConsole.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import failOnConsole from 'jest-fail-on-console'; const IGNORED_ERROR_MESSAGES: string[] = [ // react-virtualized & react-draggable use `findDOMNode` which is deprecated diff --git a/server/sonar-web/config/jest/SetupJestAxe.ts b/server/sonar-web/config/jest/SetupJestAxe.ts index 76855c59aa8..1c9eea5244f 100644 --- a/server/sonar-web/config/jest/SetupJestAxe.ts +++ b/server/sonar-web/config/jest/SetupJestAxe.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { axe, toHaveNoViolations } from 'jest-axe'; expect.extend({ diff --git a/server/sonar-web/config/jest/SetupReactTestingLibrary.ts b/server/sonar-web/config/jest/SetupReactTestingLibrary.ts index d847ef36ad7..6101edc2143 100644 --- a/server/sonar-web/config/jest/SetupReactTestingLibrary.ts +++ b/server/sonar-web/config/jest/SetupReactTestingLibrary.ts @@ -17,12 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import '@testing-library/jest-dom'; import { configure, screen, waitFor } from '@testing-library/react'; import userEvent, { PointerEventsCheckLevel } from '@testing-library/user-event'; configure({ - asyncUtilTimeout: 3000, + asyncUtilTimeout: 6000, }); expect.extend({ @@ -52,6 +53,7 @@ expect.extend({ }; await user.keyboard('{Escape}'); + await user.unhover(received); await waitFor(() => { expect(screen.queryByRole('tooltip')).not.toBeInTheDocument(); diff --git a/server/sonar-web/config/jest/SetupTestEnvironment.ts b/server/sonar-web/config/jest/SetupTestEnvironment.ts index a5d27ff84f8..7038eb22109 100644 --- a/server/sonar-web/config/jest/SetupTestEnvironment.ts +++ b/server/sonar-web/config/jest/SetupTestEnvironment.ts @@ -17,25 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React from 'react'; (window as any).React = React; -const MockObserver = { - observe: jest.fn(), - unobserve: jest.fn(), - disconnect: jest.fn(), -}; - -const content = document.createElement('div'); -content.id = 'content'; -document.documentElement.appendChild(content); - const baseUrl = ''; (window as any).baseUrl = baseUrl; -Element.prototype.scrollIntoView = () => {}; - jest.mock('../../src/main/js/helpers/l10n', () => ({ ...jest.requireActual('../../src/main/js/helpers/l10n'), hasMessage: () => true, @@ -44,6 +33,16 @@ jest.mock('../../src/main/js/helpers/l10n', () => ({ [messageKey, ...parameters].join('.'), })); +global.___loader = { + enqueue: jest.fn(), +}; + +const MockObserver = { + observe: jest.fn(), + unobserve: jest.fn(), + disconnect: jest.fn(), +}; + const MockIntersectionObserverEntries = [{ isIntersecting: true }]; (window as any).IntersectionObserver = jest.fn().mockImplementation((callback) => { @@ -51,6 +50,12 @@ const MockIntersectionObserverEntries = [{ isIntersecting: true }]; return MockObserver; }); +Element.prototype.scrollIntoView = () => {}; + +const content = document.createElement('div'); +content.id = 'content'; +document.documentElement.appendChild(content); + // ResizeObserver const MockResizeObserverEntries = [ diff --git a/server/sonar-web/config/jest/SetupTheme.js b/server/sonar-web/config/jest/SetupTheme.js index df46303834c..601040da4bf 100644 --- a/server/sonar-web/config/jest/SetupTheme.js +++ b/server/sonar-web/config/jest/SetupTheme.js @@ -17,8 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ThemeContext } from '@emotion/react'; -import { lightTheme } from 'design-system'; +// WARNING! Using '~design-system' below would break tests in the src/main/js/design-system folder! +import { lightTheme } from '../../src/main/js/design-system/theme/light'; // Hack : override the default value of the context used for theme by emotion // This allows tests to get the theme value without specifiying a theme provider diff --git a/server/sonar-web/config/polyfills.ts b/server/sonar-web/config/jest/jest.polyfills.js index 6b3c500d786..6d9764ff447 100644 --- a/server/sonar-web/config/polyfills.ts +++ b/server/sonar-web/config/jest/jest.polyfills.js @@ -17,5 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import 'core-js/stable'; import 'whatwg-fetch'; + +// Polyfills for Jest, because we need these for msw but jsdom doesn't provide them +import { ReadableStream, TextDecoder, TextEncoder } from 'node:util'; + +Object.defineProperties(globalThis, { + TextDecoder: { value: TextDecoder }, + TextEncoder: { value: TextEncoder }, + ReadableStream: { value: ReadableStream }, +}); diff --git a/server/sonar-web/design-system/.eslintrc b/server/sonar-web/design-system/.eslintrc deleted file mode 100644 index 01e7937531f..00000000000 --- a/server/sonar-web/design-system/.eslintrc +++ /dev/null @@ -1,98 +0,0 @@ -{ - "extends": ["sonarqube", "./.eslintrc-typescript"], - "plugins": ["header", "typescript-sort-keys", "eslint-plugin-local-rules"], - "root": true, - "rules": { - // Custom SonarCloud config that differs from eslint-config-sonarqube - "camelcase": "off", - "react/forbid-component-props": [ - "error", - { - "forbid": [ - { - "propName": "dangerouslySetInnerHTML", - "message": "Use the SafeHTMLInjection component instead of 'dangerouslySetInnerHTML', to prevent CSS injection along other XSS attacks" - } - ] - } - ], - "react/forbid-dom-props": [ - "error", - { - "forbid": [ - { - "propName": "dangerouslySetInnerHTML", - "message": "Use the SafeHTMLInjection component instead of 'dangerouslySetInnerHTML', to prevent CSS injection along other XSS attacks" - } - ] - } - ], - "react/jsx-sort-props": "error", - "react/jsx-pascal-case": [2, { "allowNamespace": true }], - "react/jsx-no-constructed-context-values": "error", - "react/jsx-uses-react": "off", - "react/no-unstable-nested-components": ["error", { "allowAsProps": true }], - "react/react-in-jsx-scope": "off", - "testing-library/no-node-access": ["error", { "allowContainerFirstChild": true }], - "no-implicit-coercion": [2, { "boolean": true, "number": true, "string": true }], - "jest/no-large-snapshots": ["warn", { "maxSize": 200 }], - "import/no-default-export": "warn", - - // Local rules - "local-rules/use-componentqualifier-enum": "warn", - "local-rules/use-metrickey-enum": "warn", - "local-rules/use-metrictype-enum": "warn", - "local-rules/use-visibility-enum": "warn", - "local-rules/convert-class-to-function-component": "warn", - "local-rules/no-conditional-rendering-of-spinner": "warn", - "local-rules/use-jest-mocked": "warn", - - // New rules added after updating eslint packages to more recent versions than eslint-config-sonarqube - "jest/prefer-mock-promise-shorthand": "error", - "header/header": [ - "error", - "block", - [ - "", - " * SonarQube", - " * Copyright (C) 2009-2024 SonarSource SA", - " * mailto:info AT sonarsource DOT com", - " *", - " * This program is free software; you can redistribute it and/or", - " * modify it under the terms of the GNU Lesser General Public", - " * License as published by the Free Software Foundation; either", - " * version 3 of the License, or (at your option) any later version.", - " *", - " * This program is distributed in the hope that it will be useful,", - " * but WITHOUT ANY WARRANTY; without even the implied warranty of", - " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU", - " * Lesser General Public License for more details.", - " *", - " * You should have received a copy of the GNU Lesser General Public License", - " * along with this program; if not, write to the Free Software Foundation,", - " * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.", - " " - ], - 1 - ], - "typescript-sort-keys/interface": "error", - "promise/catch-or-return": ["warn", { "allowThen": true, "allowFinally": true }] - }, - "overrides": [ - { - "files": ["*-stories.tsx"], - "rules": { - "react/function-component-definition": "off" - } - }, - { - "files": ["*-test.tsx"], - "rules": { - "react/jsx-no-constructed-context-values": "off" - } - } - ], - "settings": { - "testing-library/utils-module": "~helpers/testUtils" - } -} diff --git a/server/sonar-web/design-system/.eslintrc-typescript b/server/sonar-web/design-system/.eslintrc-typescript deleted file mode 100644 index 9a811f7c994..00000000000 --- a/server/sonar-web/design-system/.eslintrc-typescript +++ /dev/null @@ -1,63 +0,0 @@ -{ - "extends": [ - "plugin:@typescript-eslint/recommended-type-checked", - "plugin:@typescript-eslint/stylistic-type-checked", - "plugin:@typescript-eslint/strict" - ], - "parserOptions": { - "project": "./tsconfig.json" - }, - "rules": { - "@typescript-eslint/adjacent-overload-signatures": "warn", - "@typescript-eslint/array-type": [ - "warn", - { - "default": "array-simple" - } - ], - "@typescript-eslint/await-thenable": "off", - "@typescript-eslint/ban-ts-comment": "warn", - "@typescript-eslint/ban-types": "warn", - "@typescript-eslint/consistent-indexed-object-style": "off", - "@typescript-eslint/default-param-last": "warn", - "@typescript-eslint/no-array-constructor": "warn", - "@typescript-eslint/no-confusing-non-null-assertion": "off", - "@typescript-eslint/no-confusing-void-expression": "warn", - "@typescript-eslint/no-empty-function": "warn", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-extra-non-null-assertion": "off", - "@typescript-eslint/no-floating-promises": "warn", - "@typescript-eslint/no-for-in-array": "warn", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-invalid-this": "warn", - "@typescript-eslint/no-loss-of-precision": "warn", - "@typescript-eslint/no-misused-new": "warn", - "@typescript-eslint/no-misused-promises": "warn", - "@typescript-eslint/no-namespace": "warn", - "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off", - "@typescript-eslint/no-non-null-asserted-optional-chain": "off", - "@typescript-eslint/no-redundant-type-constituents": "warn", - "@typescript-eslint/no-this-alias": "warn", - "@typescript-eslint/no-unnecessary-type-assertion": "off", - "@typescript-eslint/no-unnecessary-type-constraint": "warn", - "@typescript-eslint/no-unsafe-argument": "warn", - "@typescript-eslint/no-unsafe-assignment": "warn", - "@typescript-eslint/no-unsafe-call": "warn", - "@typescript-eslint/no-unsafe-enum-comparison": "warn", - "@typescript-eslint/no-unsafe-member-access": "warn", - "@typescript-eslint/no-unsafe-return": "warn", - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-var-requires": "warn", - "@typescript-eslint/non-nullable-type-assertion-style": "off", - "@typescript-eslint/prefer-as-const": "warn", - "@typescript-eslint/prefer-namespace-keyword": "warn", - "@typescript-eslint/prefer-nullish-coalescing": "warn", - "@typescript-eslint/require-await": "warn", - "@typescript-eslint/restrict-plus-operands": "warn", - "@typescript-eslint/restrict-template-expressions": "warn", - "@typescript-eslint/switch-exhaustiveness-check": "warn", - "@typescript-eslint/triple-slash-reference": "warn", - "@typescript-eslint/unbound-method": "off" - } -} diff --git a/server/sonar-web/design-system/.gitignore b/server/sonar-web/design-system/.gitignore deleted file mode 100644 index c3af857904e..00000000000 --- a/server/sonar-web/design-system/.gitignore +++ /dev/null @@ -1 +0,0 @@ -lib/ diff --git a/server/sonar-web/design-system/babel.config.js b/server/sonar-web/design-system/babel.config.js deleted file mode 100644 index f13f6b1e042..00000000000 --- a/server/sonar-web/design-system/babel.config.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = { - plugins: [ - 'babel-plugin-macros', - [ - '@emotion/babel-plugin-jsx-pragmatic', - { - export: 'jsx', - import: '__cssprop', - module: '@emotion/react', - }, - ], - ['@babel/plugin-transform-react-jsx', { pragma: '__cssprop' }, 'twin.macro'], - '@emotion', - ], -}; diff --git a/server/sonar-web/design-system/build.gradle b/server/sonar-web/design-system/build.gradle deleted file mode 100644 index a2d2c511c2b..00000000000 --- a/server/sonar-web/design-system/build.gradle +++ /dev/null @@ -1,47 +0,0 @@ -sonar { - properties { - property 'sonar.projectName', "${projectTitle} :: Web :: Design System" - property "sonar.sources", "src" - property "sonar.exclusions", "src/**/__tests__/**,src/types/**,src/@types/**,src/helpers/testUtils.tsx" - property "sonar.tests", "src" - property "sonar.test.inclusions", "src/**/__tests__/**" - property "sonar.eslint.reportPaths", "eslint-report/eslint-report.json" - property "sonar.javascript.lcov.reportPaths", "./coverage/lcov.info" - property "sonar.coverage.exclusions", "src/components/icons/**/*,src/components/visual-components/**/*" - property "sonar.cpd.exclusions", "**/*" - } -} - -jar.onlyIf {false} -compileJava.onlyIf {false} -processResources.onlyIf {false} - -task "yarn_validate-ci"(type: Exec) { - dependsOn ":server:sonar-web:yarn_run" - - inputs.dir('src') - - ['package.json', '../yarn.lock', 'jest.config.js'].each { - inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE) - } - - outputs.dir('coverage') - outputs.cacheIf { true } - - commandLine osAdaptiveCommand(['npm', 'run', 'validate-ci']) -} - -task "yarn_lint-report-ci"(type: Exec) { - dependsOn ":server:sonar-web:yarn_run" - - ['src'].each { - inputs.dir(it) - } - ['package.json', '../yarn.lock', 'tsconfig.json', '.eslintrc'].each { - inputs.file(it) - } - outputs.dir('eslint-report') - outputs.cacheIf { true } - - commandLine osAdaptiveCommand(['npm', 'run', 'lint-report-ci']) -} diff --git a/server/sonar-web/design-system/config/jest/CSSStub.js b/server/sonar-web/design-system/config/jest/CSSStub.js deleted file mode 100644 index e787e07baed..00000000000 --- a/server/sonar-web/design-system/config/jest/CSSStub.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -module.exports = {}; - diff --git a/server/sonar-web/design-system/config/jest/SetupReactTestingLibrary.ts b/server/sonar-web/design-system/config/jest/SetupReactTestingLibrary.ts deleted file mode 100644 index 59ddcea894f..00000000000 --- a/server/sonar-web/design-system/config/jest/SetupReactTestingLibrary.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import '@testing-library/jest-dom'; -import { configure, fireEvent, screen, waitFor } from '@testing-library/react'; -import React from 'react'; - -configure({ - asyncUtilTimeout: 3000, -}); -global.React = React; - -expect.extend({ - async toHaveATooltipWithContent(received: any, content: string) { - if (!(received instanceof Element)) { - return { - pass: false, - message: () => `Received object is not an HTMLElement, and cannot have a tooltip`, - }; - } - - fireEvent.pointerEnter(received); - const tooltip = await screen.findByRole('tooltip'); - - const result = tooltip.textContent?.includes(content) - ? { - pass: true, - message: () => `Tooltip content "${tooltip.textContent}" contains expected "${content}"`, - } - : { - pass: false, - message: () => - `Tooltip content "${tooltip.textContent}" does not contain expected "${content}"`, - }; - - fireEvent.pointerLeave(received); - - await waitFor(() => { - expect(screen.queryByRole('tooltip')).not.toBeInTheDocument(); - }); - - return result; - }, -}); diff --git a/server/sonar-web/design-system/config/jest/SetupTestEnvironment.js b/server/sonar-web/design-system/config/jest/SetupTestEnvironment.js deleted file mode 100644 index c74def902a5..00000000000 --- a/server/sonar-web/design-system/config/jest/SetupTestEnvironment.js +++ /dev/null @@ -1,157 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import 'whatwg-fetch'; - -const content = document.createElement('div'); -content.id = 'content'; -document.documentElement.appendChild(content); - -Element.prototype.scrollIntoView = () => {}; - -global.___loader = { - enqueue: jest.fn(), -}; - -const MockResizeObserverEntries = [ - { - contentRect: { - width: 100, - height: 200, - }, - }, -]; - -const MockResizeObserver = { - observe: jest.fn(), - unobserve: jest.fn(), - disconnect: jest.fn(), -}; - -global.ResizeObserver = jest.fn().mockImplementation((callback) => { - callback(MockResizeObserverEntries, MockResizeObserver); - return MockResizeObserver; -}); - -// Copied from pollyfill.io -// To be remove when upgrading jsdom https://github.com/jsdom/jsdom/releases/tag/22.1.0 -// jest-environment-jsdom to v30 -function number(v) { - return v === undefined ? 0 : Number(v); -} - -function different(u, v) { - return u !== v && !(isNaN(u) && isNaN(v)); -} - -global.DOMRect = function DOMRect(xArg, yArg, wArg, hArg) { - var x, y, width, height, left, right, top, bottom; - - x = number(xArg); - y = number(yArg); - width = number(wArg); - height = number(hArg); - - Object.defineProperties(this, { - x: { - get: function () { - return x; - }, - set: function (newX) { - if (different(x, newX)) { - x = newX; - left = right = undefined; - } - }, - enumerable: true, - }, - y: { - get: function () { - return y; - }, - set: function (newY) { - if (different(y, newY)) { - y = newY; - top = bottom = undefined; - } - }, - enumerable: true, - }, - width: { - get: function () { - return width; - }, - set: function (newWidth) { - if (different(width, newWidth)) { - width = newWidth; - left = right = undefined; - } - }, - enumerable: true, - }, - height: { - get: function () { - return height; - }, - set: function (newHeight) { - if (different(height, newHeight)) { - height = newHeight; - top = bottom = undefined; - } - }, - enumerable: true, - }, - left: { - get: function () { - if (left === undefined) { - left = x + Math.min(0, width); - } - return left; - }, - enumerable: true, - }, - right: { - get: function () { - if (right === undefined) { - right = x + Math.max(0, width); - } - return right; - }, - enumerable: true, - }, - top: { - get: function () { - if (top === undefined) { - top = y + Math.min(0, height); - } - return top; - }, - enumerable: true, - }, - bottom: { - get: function () { - if (bottom === undefined) { - bottom = y + Math.max(0, height); - } - return bottom; - }, - enumerable: true, - }, - }); -}; diff --git a/server/sonar-web/design-system/config/jest/SetupTheme.js b/server/sonar-web/design-system/config/jest/SetupTheme.js deleted file mode 100644 index 800f2e3fab0..00000000000 --- a/server/sonar-web/design-system/config/jest/SetupTheme.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import { ThemeContext } from '@emotion/react'; -import { lightTheme } from '../../src/theme'; - -// Hack : override the default value of the context used for theme by emotion -// This allows tests to get the theme value without specifiying a theme provider -ThemeContext['_currentValue'] = lightTheme; -ThemeContext['_currentValue2'] = lightTheme; diff --git a/server/sonar-web/design-system/jest.config.js b/server/sonar-web/design-system/jest.config.js deleted file mode 100644 index 4086af734ba..00000000000 --- a/server/sonar-web/design-system/jest.config.js +++ /dev/null @@ -1,73 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -const babelConfig = require('./babel.config'); - -babelConfig.presets = [ - ['@babel/preset-env', { targets: { node: 'current' } }], - '@babel/preset-typescript', -]; - -module.exports = { - coverageDirectory: '<rootDir>/coverage', - collectCoverageFrom: [ - 'src/components/**/*.{ts,tsx,js}', - 'src/helpers/**/*.{ts,tsx,js}', - 'src/hooks/**/*.{ts,tsx,js}', - 'src/sonar-aligned/**/*.{ts,tsx,js}', - '!src/helpers/{keycodes,testUtils}.{ts,tsx}', - ], - coverageReporters: ['lcovonly', 'text'], - globals: { - 'ts-jest': { - diagnostics: false, - }, - }, - moduleFileExtensions: ['ts', 'tsx', 'js', 'json'], - moduleNameMapper: { - '^.+\\.(md|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': - '<rootDir>/config/jest/FileStub.js', - '^.+\\.css$': '<rootDir>/config/jest/CSSStub.js', - }, - setupFiles: [ - '<rootDir>/config/jest/SetupTestEnvironment.js', - '<rootDir>/config/jest/SetupTheme.js', - ], - setupFilesAfterEnv: [ - '<rootDir>/config/jest/SetupReactTestingLibrary.ts', - '<rootDir>/../config/jest/SetupFailOnConsole.ts', - ], - snapshotSerializers: ['@emotion/jest/serializer'], - testEnvironment: 'jsdom', - testPathIgnorePatterns: [ - '<rootDir>/config/jest', - '<rootDir>/node_modules', - '<rootDir>/scripts', - '<rootDir>/lib', - ], - testRegex: '(/__tests__/.*|\\-test)\\.(ts|tsx|js)$', - transform: { - '^.+\\.(t|j)sx?$': ['babel-jest', babelConfig], - }, - transformIgnorePatterns: ['/node_modules/(?!(d3-.+))/'], - reporters: [ - 'default' - ], - testTimeout: 60000, -}; diff --git a/server/sonar-web/design-system/package.json b/server/sonar-web/design-system/package.json deleted file mode 100644 index 70405278cac..00000000000 --- a/server/sonar-web/design-system/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "name": "design-system", - "version": "1.0.0", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "scripts": { - "format": "prettier --write --list-different \"src/**/*.{ts,tsx}\"", - "format-check": "prettier --check \"src/**/*.{ts,tsx}\"", - "build": "yarn lint && yarn ts-check && vite build", - "build:no-checks": "vite build", - "build-release": "yarn install --immutable && yarn build", - "lint": "eslint --ext js,ts,tsx,snap src", - "lint-report-ci": "yarn install --immutable && eslint --ext js,ts,tsx -f json -o eslint-report/eslint-report.json src || yarn lint", - "test": "jest --workerIdleMemoryLimit=1G", - "test-ci": "NODE_OPTIONS=\"-r dd-trace/ci/init\" jest --coverage --maxWorkers=5 --workerIdleMemoryLimit=2G --ci", - "ts-check": "tsc --noEmit", - "validate-ci": "yarn install --immutable && yarn ts-check && yarn format-check && yarn test-ci" - }, - "devDependencies": { - "@babel/core": "7.25.2", - "@babel/plugin-transform-react-jsx": "7.25.2", - "@babel/preset-env": "7.25.4", - "@babel/preset-typescript": "7.24.7", - "@emotion/babel-plugin": "11.12.0", - "@emotion/babel-plugin-jsx-pragmatic": "0.3.0", - "@sonarsource/echoes-react": "0.9.0", - "@testing-library/dom": "10.4.0", - "@testing-library/jest-dom": "6.5.0", - "@testing-library/react": "16.0.1", - "@testing-library/user-event": "14.5.2", - "@types/d3-array": "3.2.1", - "@types/d3-hierarchy": "3.1.7", - "@types/d3-shape": "3.1.6", - "@types/d3-zoom": "3.0.8", - "@types/lodash": "4.17.9", - "@types/react": "18.3.11", - "@types/react-highlight-words": "0.20.0", - "@types/react-modal": "3.16.3", - "@types/react-virtualized": "9.21.30", - "@typescript-eslint/parser": "7.18.0", - "@vitejs/plugin-react": "4.3.2", - "autoprefixer": "10.4.20", - "dd-trace": "5.23.0", - "eslint": "8.57.1", - "eslint-plugin-header": "3.1.1", - "eslint-plugin-import": "2.30.0", - "eslint-plugin-local-rules": "3.0.2", - "eslint-plugin-typescript-sort-keys": "3.2.0", - "history": "5.3.0", - "jest": "29.7.0", - "postcss": "8.4.47", - "postcss-calc": "10.0.2", - "prettier": "3.3.3", - "prettier-plugin-organize-imports": "4.1.0", - "twin.macro": "3.4.1", - "typescript": "5.6.2", - "vite": "5.4.8", - "vite-plugin-dts": "4.2.3", - "whatwg-fetch": "3.6.20" - }, - "peerDependencies": { - "@emotion/react": "11.11.4", - "@emotion/styled": "11.13.0", - "@primer/octicons-react": "19.11.0", - "@types/dompurify": "3.0.5", - "classnames": "2.5.1", - "clipboard": "2.0.11", - "d3-array": "3.2.4", - "d3-hierarchy": "3.1.2", - "d3-scale": "4.0.2", - "d3-selection": "3.0.0", - "d3-shape": "3.2.0", - "d3-zoom": "3.0.0", - "date-fns": "4.1.0", - "dompurify": "3.1.7", - "lodash": "4.17.21", - "react": "18.3.1", - "react-day-picker": "8.10.0", - "react-dom": "18.3.1", - "react-helmet-async": "2.0.4", - "react-highlight-words": "0.20.0", - "react-intl": "6.6.8", - "react-joyride": "2.8.2", - "react-modal": "3.16.1", - "react-router-dom": "6.26.1", - "react-select": "5.7.7", - "react-virtualized": "9.22.5", - "tailwindcss": "3.4.10" - }, - "babelMacros": { - "twin": { - "config": "../tailwind.config.js", - "preset": "emotion" - } - }, - "dependencies": { - "highlight.js": "11.10.0", - "highlightjs-apex": "1.4.0", - "highlightjs-cobol": "0.3.3", - "highlightjs-sap-abap": "0.3.0", - "react-toastify": "10.0.5" - } -} diff --git a/server/sonar-web/design-system/src/@types/emotion.d.ts b/server/sonar-web/design-system/src/@types/emotion.d.ts deleted file mode 100644 index b0547f49f0e..00000000000 --- a/server/sonar-web/design-system/src/@types/emotion.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import '@emotion/react'; -import { Theme as SQTheme } from '../types/theme'; - -declare module '@emotion/react' { - export interface Theme extends SQTheme {} -} diff --git a/server/sonar-web/design-system/src/@types/jest.d.ts b/server/sonar-web/design-system/src/@types/jest.d.ts deleted file mode 100644 index 87289603cc0..00000000000 --- a/server/sonar-web/design-system/src/@types/jest.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -declare namespace jest { - interface Matchers<R> { - toHaveATooltipWithContent(content: string): Promise<CustomMatcherResult>; - toHaveNoA11yViolations(): Promise<CustomMatcherResult>; - } -} diff --git a/server/sonar-web/design-system/tsconfig.json b/server/sonar-web/design-system/tsconfig.json deleted file mode 100644 index 22b2e4e8bec..00000000000 --- a/server/sonar-web/design-system/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "extends": "../tsconfig.base", - "compilerOptions": { - "allowSyntheticDefaultImports": true, - "baseUrl": ".", - "declaration": true, - "declarationMap": true, - "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "lib": ["dom", "dom.iterable", "es2022"], - "jsx": "react-jsx", - "module": "commonjs", - "noEmit": true, - "paths": { - "~components/*": ["src/components/*"], - "~helpers/*": ["src/helpers/*"], - "~icons/*": ["src/icons/*"], - "~types/*": ["src/types/*"], - "~utils/*": ["src/utils/*"], - "~sonar-aligned/*": ["src/sonar-aligned/*"] - }, - "resolveJsonModule": true, - "skipLibCheck": true - }, - "include": ["./src/**/*"] -} diff --git a/server/sonar-web/design-system/vite.config.js b/server/sonar-web/design-system/vite.config.js deleted file mode 100644 index 47300754bae..00000000000 --- a/server/sonar-web/design-system/vite.config.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import react from '@vitejs/plugin-react'; -import autoprefixer from 'autoprefixer'; -import { resolve } from 'node:path'; -import postCssCalc from 'postcss-calc'; -import tailwind from 'tailwindcss'; -import { defineConfig } from 'vite'; -import dts from 'vite-plugin-dts'; -import babelConfig from './babel.config'; -import * as packageJson from './package.json'; - -// https://vitejs.dev/config/ -export default defineConfig({ - build: { - lib: { - entry: resolve('src', 'index.ts'), - name: 'MIUI', - formats: ['es'], - fileName: (_format) => `index.js`, - }, - outDir: 'lib', - rollupOptions: { - external: [...Object.keys(packageJson.peerDependencies)], - }, - }, - css: { - postcss: { - plugins: [tailwind('../tailwind.config.js'), autoprefixer, postCssCalc], - }, - }, - esbuild: { - // https://github.com/vitejs/vite/issues/8644#issuecomment-1159308803 - logOverride: { 'this-is-undefined-in-esm': 'silent' }, - }, - optimizeDeps: { - esbuildOptions: { - target: 'es2022', - }, - }, - plugins: [ - react({ - babel: babelConfig, - }), - dts({ - entryRoot: 'src', - }), - ], -}); diff --git a/server/sonar-web/eslint-local-rules/__tests__/no-api-imports.js b/server/sonar-web/eslint-local-rules/__tests__/no-api-imports-test.js index fc52557fc88..fc52557fc88 100644 --- a/server/sonar-web/eslint-local-rules/__tests__/no-api-imports.js +++ b/server/sonar-web/eslint-local-rules/__tests__/no-api-imports-test.js diff --git a/server/sonar-web/eslint-local-rules/__tests__/no-within.js b/server/sonar-web/eslint-local-rules/__tests__/no-within-test.js index 34f446b077a..34f446b077a 100644 --- a/server/sonar-web/eslint-local-rules/__tests__/no-within.js +++ b/server/sonar-web/eslint-local-rules/__tests__/no-within-test.js diff --git a/server/sonar-web/eslint-local-rules/convert-class-to-function-component.js b/server/sonar-web/eslint-local-rules/convert-class-to-function-component.js index 37030fd9267..a32c16c236f 100644 --- a/server/sonar-web/eslint-local-rules/convert-class-to-function-component.js +++ b/server/sonar-web/eslint-local-rules/convert-class-to-function-component.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + module.exports = { meta: { messages: { @@ -32,7 +33,7 @@ module.exports = { n.type === 'MethodDefinition' || (n.type === 'PropertyDefinition' && n.value && - n.value.type === 'ArrowFunctionExpression') + n.value.type === 'ArrowFunctionExpression'), ); if (methods.length === 1 && methods[0].key.name === 'render') { context.report({ node, messageId: 'convertClassToFunctionComponent' }); diff --git a/server/sonar-web/eslint-local-rules/index.js b/server/sonar-web/eslint-local-rules/index.js index e80671fb5a5..625bc309eec 100644 --- a/server/sonar-web/eslint-local-rules/index.js +++ b/server/sonar-web/eslint-local-rules/index.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + module.exports = { 'use-jest-mocked': require('./use-jest-mocked'), 'convert-class-to-function-component': require('./convert-class-to-function-component'), diff --git a/server/sonar-web/eslint-local-rules/no-api-imports.js b/server/sonar-web/eslint-local-rules/no-api-imports.js index 628ea5bb7f6..007276ed867 100644 --- a/server/sonar-web/eslint-local-rules/no-api-imports.js +++ b/server/sonar-web/eslint-local-rules/no-api-imports.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + // no-import-from-specific-folder.js module.exports = { diff --git a/server/sonar-web/eslint-local-rules/no-conditional-rendering-of-spinner.js b/server/sonar-web/eslint-local-rules/no-conditional-rendering-of-spinner.js index 06ed0a9fa55..859100d8742 100644 --- a/server/sonar-web/eslint-local-rules/no-conditional-rendering-of-spinner.js +++ b/server/sonar-web/eslint-local-rules/no-conditional-rendering-of-spinner.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + module.exports = { meta: { messages: { diff --git a/server/sonar-web/eslint-local-rules/no-implicit-coercion.js b/server/sonar-web/eslint-local-rules/no-implicit-coercion.js index 39a8c6f4f69..68875f00c45 100644 --- a/server/sonar-web/eslint-local-rules/no-implicit-coercion.js +++ b/server/sonar-web/eslint-local-rules/no-implicit-coercion.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + module.exports = { meta: { type: 'suggestion', diff --git a/server/sonar-web/eslint-local-rules/no-within.js b/server/sonar-web/eslint-local-rules/no-within.js index 51cfe741531..efff8b0d7c8 100644 --- a/server/sonar-web/eslint-local-rules/no-within.js +++ b/server/sonar-web/eslint-local-rules/no-within.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + // For now lets enable it on this extension // once we have made the refactoring we can add it to sonar-web and all other extension. module.exports = { diff --git a/server/sonar-web/eslint-local-rules/test-config/tsconfig.json b/server/sonar-web/eslint-local-rules/test-config/tsconfig.json index d8d83231bd7..988ec11e634 100644 --- a/server/sonar-web/eslint-local-rules/test-config/tsconfig.json +++ b/server/sonar-web/eslint-local-rules/test-config/tsconfig.json @@ -1,4 +1,6 @@ { - "extends": "../../tsconfig.base", - "include": ["./react.tsx"] -} + "extends": "../../tsconfig", + "include": [ + "./react.tsx" + ] +}
\ No newline at end of file diff --git a/server/sonar-web/eslint-local-rules/use-await-expect-async-matcher.js b/server/sonar-web/eslint-local-rules/use-await-expect-async-matcher.js index a8732403e07..48977d9c3e9 100644 --- a/server/sonar-web/eslint-local-rules/use-await-expect-async-matcher.js +++ b/server/sonar-web/eslint-local-rules/use-await-expect-async-matcher.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + module.exports = { meta: { fixable: 'code', diff --git a/server/sonar-web/eslint-local-rules/use-componentqualifier-enum.js b/server/sonar-web/eslint-local-rules/use-componentqualifier-enum.js index 3ccabbf5897..1c45ae9916a 100644 --- a/server/sonar-web/eslint-local-rules/use-componentqualifier-enum.js +++ b/server/sonar-web/eslint-local-rules/use-componentqualifier-enum.js @@ -17,5 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + const { useEnum } = require('./lib/use-enum'); module.exports = useEnum(['APP', 'DIR', 'FIL', 'VW', 'TRK', 'SVW', 'UTS'], 'ComponentQualifier'); diff --git a/server/sonar-web/eslint-local-rules/use-jest-mocked.js b/server/sonar-web/eslint-local-rules/use-jest-mocked.js index 368409fe3c0..f57fc3f05d2 100644 --- a/server/sonar-web/eslint-local-rules/use-jest-mocked.js +++ b/server/sonar-web/eslint-local-rules/use-jest-mocked.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + module.exports = { meta: { messages: { diff --git a/server/sonar-web/eslint-local-rules/use-metrickey-enum.js b/server/sonar-web/eslint-local-rules/use-metrickey-enum.js index f580f15e48c..b3cdec021d1 100644 --- a/server/sonar-web/eslint-local-rules/use-metrickey-enum.js +++ b/server/sonar-web/eslint-local-rules/use-metrickey-enum.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + const { useEnum } = require('./lib/use-enum'); module.exports = useEnum( [ @@ -148,5 +149,5 @@ module.exports = useEnum( 'wont_fix_issues', ], 'MetricKey', - 'representing metric keys' + 'representing metric keys', ); diff --git a/server/sonar-web/eslint-local-rules/use-metrictype-enum.js b/server/sonar-web/eslint-local-rules/use-metrictype-enum.js index 06928b33dd0..be8d18e1fd4 100644 --- a/server/sonar-web/eslint-local-rules/use-metrictype-enum.js +++ b/server/sonar-web/eslint-local-rules/use-metrictype-enum.js @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + const { useEnum } = require('./lib/use-enum'); module.exports = useEnum( ['RATING', 'PERCENT', 'INT', 'LEVEL', 'SHORT_INT', 'SHORT_WORK_DUR', 'DATA'], 'MetricType', - 'representing metric types' + 'representing metric types', ); diff --git a/server/sonar-web/eslint-local-rules/use-visibility-enum.js b/server/sonar-web/eslint-local-rules/use-visibility-enum.js index 911111bd00d..797b6a24e2b 100644 --- a/server/sonar-web/eslint-local-rules/use-visibility-enum.js +++ b/server/sonar-web/eslint-local-rules/use-visibility-enum.js @@ -17,5 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + const { useEnum } = require('./lib/use-enum'); module.exports = useEnum(['public', 'private'], 'Visibility'); diff --git a/server/sonar-web/jest.config.js b/server/sonar-web/jest.config.js index c4ddb33a975..3099d29334e 100644 --- a/server/sonar-web/jest.config.js +++ b/server/sonar-web/jest.config.js @@ -17,6 +17,37 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +const esModules = [ + 'd3', + 'd3-array', + 'd3-scale', + 'highlightjs-', + '@sonarsource/echoes-react', + // Jupyterlab + '@jupyterlab/nbformat', + // React markdown + 'react-markdown', + 'devlop', + 'hast-util-', + 'property-information', + 'space-separated-tokens', + 'comma-separated-tokens', + 'unist-util-', + 'vfile', + 'estree-util-is-identifier-name', + 'html-url-attributes', + 'remark-', + 'mdast-util-', + 'micromark', + 'decode-named-character-reference', + 'character-entities', + 'trim-lines', + 'unified', + 'bail', + 'is-plain-obj', + 'trough', +].join('|'); + module.exports = { coverageDirectory: '<rootDir>/coverage', collectCoverageFrom: ['src/main/js/**/*.{ts,tsx,js}', '!helpers/{keycodes,testUtils}.{ts,tsx}'], @@ -26,11 +57,14 @@ module.exports = { '^.+\\.(md|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/config/jest/FileStub.js', '^~sonar-aligned/(.*)': '<rootDir>/src/main/js/sonar-aligned/$1', + '^~design-system': '<rootDir>/src/main/js/design-system/index.ts', '^.+\\.css$': '<rootDir>/config/jest/CSSStub.js', + // Jest is using the wrong d3 built package: https://github.com/facebook/jest/issues/12036 + '^d3-(.*)$': `<rootDir>/node_modules/d3-$1/dist/d3-$1.min.js`, }, globalSetup: '<rootDir>/config/jest/GlobalSetup.js', setupFiles: [ - '<rootDir>/config/polyfills.ts', + '<rootDir>/config/jest/jest.polyfills.js', '<rootDir>/config/jest/SetupTestEnvironment.ts', '<rootDir>/config/jest/SetupTheme.js', ], @@ -41,24 +75,13 @@ module.exports = { ], snapshotSerializers: ['@emotion/jest/serializer'], testEnvironment: 'jsdom', - testPathIgnorePatterns: [ - '<rootDir>/config', - '<rootDir>/design-system', - '<rootDir>/node_modules', - '<rootDir>/scripts', - ], + testPathIgnorePatterns: ['<rootDir>/config', '<rootDir>/node_modules', '<rootDir>/scripts'], testRegex: '(/__tests__/.*|\\-test)\\.(ts|tsx|js)$', + // Our ts,tsx and js files need some babel transformation to be understood by nodejs transform: { - '^.+\\.(t|j)sx?$': [ - '@swc/jest', - { - jsc: { - target: 'es2018', - }, - }, - ], + '^.+\\.[jt]sx?$': `<rootDir>/config/jest/JestPreprocess.js`, }, - transformIgnorePatterns: ['/node_modules/(?!(d3-.+))/'], + transformIgnorePatterns: [`/node_modules/(?!${esModules})`], reporters: [ 'default', [ diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index ca3163a31b7..cba1b568d50 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -4,9 +4,6 @@ "description": "Put your technical debt under control", "repository": "SonarSource/sonarqube", "license": "LGPL-3.0", - "workspaces": [ - "design-system" - ], "dependencies": { "@emotion/react": "11.11.4", "@emotion/styled": "11.13.0", @@ -30,6 +27,10 @@ "diff": "7.0.0", "dompurify": "3.1.7", "formik": "2.4.6", + "highlight.js": "11.10.0", + "highlightjs-apex": "1.4.0", + "highlightjs-cobol": "0.3.3", + "highlightjs-sap-abap": "0.3.0", "lodash": "4.17.21", "lunr": "2.3.9", "react": "18.3.1", @@ -44,6 +45,7 @@ "react-modal": "3.16.1", "react-router-dom": "6.26.2", "react-select": "5.7.7", + "react-toastify": "10.0.5", "react-virtualized": "9.22.5", "regenerator-runtime": "0.14.1", "shared-store-hook": "0.0.4", @@ -58,8 +60,6 @@ "@emotion/babel-plugin": "11.12.0", "@emotion/jest": "11.13.0", "@jupyterlab/nbformat": "4.2.5", - "@swc/core": "1.7.28", - "@swc/jest": "0.2.36", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.5.0", "@testing-library/react": "16.0.1", @@ -71,6 +71,7 @@ "@types/d3-scale": "4.0.8", "@types/d3-selection": "3.0.10", "@types/d3-shape": "3.1.6", + "@types/d3-zoom": "3.0.8", "@types/diff": "5.2.2", "@types/dompurify": "3.0.5", "@types/jest": "29.5.13", @@ -87,12 +88,15 @@ "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", "@typescript-eslint/rule-tester": "7.18.0", + "@vitejs/plugin-legacy": "5.4.2", + "@vitejs/plugin-react": "4.3.2", "autoprefixer": "10.4.20", - "browserslist-to-esbuild": "2.1.1", + "babel-jest": "29.7.0", + "babel-plugin-twin": "1.1.0", + "browserslist": "4.24.0", "chalk": "4.1.2", "chokidar": "3.6.0", "dd-trace": "5.23.0", - "design-system": "1.0.0", "eslint": "8.57.1", "eslint-config-sonarqube": "2.1.3", "eslint-plugin-header": "3.1.1", @@ -107,6 +111,7 @@ "eslint-plugin-testing-library": "6.3.0", "eslint-plugin-typescript-sort-keys": "3.2.0", "fs-extra": "11.2.0", + "history": "5.3.0", "http-proxy": "1.18.1", "jest": "29.7.0", "jest-axe": "9.0.0", @@ -114,7 +119,6 @@ "jest-fail-on-console": "3.3.1", "jest-junit": "16.0.0", "jest-slow-test-reporter": "1.0.0", - "jsdom": "25.0.1", "openapi-types": "12.1.3", "path-browserify": "1.0.1", "postcss": "8.4.47", @@ -124,7 +128,8 @@ "rollup-plugin-license": "3.5.3", "rollup-plugin-visualizer": "5.12.0", "tailwindcss": "3.4.13", - "turbo": "2.1.3", + "terser": "5.36.0", + "twin.macro": "3.4.1", "typescript": "5.6.2", "vite": "5.4.8", "vite-plugin-babel-macros": "1.0.6", @@ -138,7 +143,7 @@ "chunks-analyze": "BUNDLE_ANALYSIS=true yarn build", "test": "jest --workerIdleMemoryLimit=1G", "test-ci": "NODE_OPTIONS=\"-r dd-trace/ci/init\" jest --coverage --maxWorkers=5 --workerIdleMemoryLimit=2G --ci", - "test-eslint-local-rules": "jest -c eslint-local-rules/jest.config.js", + "test-eslint-local-rules": "jest eslint-local-rules", "format": "prettier --write --list-different \"src/main/js/**/*.{js,ts,tsx,css}\"", "format-check": "prettier --check \"src/main/js/**/*.{js,ts,tsx,css}\"", "lint": "eslint --ext js,ts,tsx --quiet src/main/js", @@ -154,15 +159,18 @@ "engines": { "node": ">=18.20" }, - "browser": { - "path": "path-browserify" + "babelMacros": { + "twin": { + "config": "./tailwind.config.js", + "preset": "emotion" + } }, "browserslist": [ "defaults and supports es6-module", - "Chrome >= 61", - "Edge >= 18", - "Firefox >= 60", - "Safari >= 11" + "Chrome >= 66", + "Edge >= 88", + "Firefox >= 78", + "Safari >= 12" ], "packageManager": "yarn@4.2.2" } diff --git a/server/sonar-web/scripts/build-design-system.js b/server/sonar-web/scripts/build-design-system.js deleted file mode 100644 index 31d7fff8ba2..00000000000 --- a/server/sonar-web/scripts/build-design-system.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -/* eslint-disable no-console */ -process.env.NODE_ENV = 'development'; - -const chalk = require('chalk'); -const { spawn } = require('child_process'); - -function buildDesignSystem({ callback, force } = {}) { - process.chdir(`${__dirname}/..`); - - const build = spawn('npx', [ - 'turbo', - 'run', - ...(force ? ['--force=true'] : []), - 'design-system#build:no-checks', - ]); - - build.stdout.on('data', (data) => { - console.log(chalk.green.bold(data.toString())); - }); - - build.stderr.on('data', (data) => { - console.log(chalk.red.bold(data.toString())); - }); - - build.on('exit', function (code) { - if (code === 0 && callback) { - callback(); - } - }); -} - -module.exports = { buildDesignSystem }; diff --git a/server/sonar-web/scripts/update-cwes.js b/server/sonar-web/scripts/update-cwes.js index 5d7c5d0ee35..63df5390ea9 100644 --- a/server/sonar-web/scripts/update-cwes.js +++ b/server/sonar-web/scripts/update-cwes.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable no-console */ /** @@ -49,7 +50,7 @@ const STANDARDS_JSON_FILE = path.join( 'main', 'js', 'helpers', - 'standards.json' + 'standards.json', ); const xmlContent = readXMLContent(process.argv[2]); @@ -76,11 +77,11 @@ function getCWEs(xml) { const weaknesses = document.window.document.querySelectorAll('Weaknesses Weakness'); const cwes = { unknown: { - title: 'No CWE associated' - } + title: 'No CWE associated', + }, }; - weaknesses.forEach(weakness => { + weaknesses.forEach((weakness) => { const id = weakness.getAttribute('ID'); const title = weakness.getAttribute('Name'); let description = ''; @@ -119,7 +120,7 @@ function writeToStandardsJson(cwes) { fs.writeFileSync(STANDARDS_JSON_FILE, JSON.stringify(json, undefined, 2)); } catch (e) { console.error( - chalk.red(`Failed to write data to standards.json ('${STANDARDS_JSON_FILE}') file`) + chalk.red(`Failed to write data to standards.json ('${STANDARDS_JSON_FILE}') file`), ); throw e; } diff --git a/server/sonar-web/scripts/utils.js b/server/sonar-web/scripts/utils.js index 09c3e92dc3e..5e4534fbddd 100644 --- a/server/sonar-web/scripts/utils.js +++ b/server/sonar-web/scripts/utils.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + const fs = require('fs'); const path = require('path'); const { promisify } = require('util'); @@ -29,7 +30,7 @@ const extensionsL10nFilepaths = [ '../../../private/core-extension-enterprise-server/src/main/resources/org/sonar/l10n/governance.properties', '../../../private/core-extension-license/src/main/resources/org/sonar/l10n/license.properties', '../../../private/core-extension-developer-server/src/main/resources/org/sonar/l10n/developer-server.properties', - '../../../private/core-extension-securityreport/src/main/resources/org/sonar/l10n/securityreport.properties' + '../../../private/core-extension-securityreport/src/main/resources/org/sonar/l10n/securityreport.properties', ]; const STATUS_OK = 200; @@ -37,10 +38,10 @@ const STATUS_ERROR = 500; function getFileMessage(filename) { return readFileAsync(path.resolve(__dirname, filename), 'utf-8').then( - content => { + (content) => { const messages = {}; const lines = content.split('\n'); - lines.forEach(line => { + lines.forEach((line) => { const parts = line.split('='); if (parts.length > 1) { messages[parts[0]] = parts.slice(1).join('='); @@ -48,23 +49,23 @@ function getFileMessage(filename) { }); return messages; }, - () => ({}) + () => ({}), ); } function getMessages() { return Promise.all( - [l10nFilePath, ...extensionsL10nFilepaths].map(filename => getFileMessage(filename)) - ).then(filesMessages => filesMessages.reduce((acc, messages) => ({ ...acc, ...messages }), {})); + [l10nFilePath, ...extensionsL10nFilepaths].map((filename) => getFileMessage(filename)), + ).then((filesMessages) => filesMessages.reduce((acc, messages) => ({ ...acc, ...messages }), {})); } function handleL10n(res) { getMessages() - .then(messages => { + .then((messages) => { res.writeHead(STATUS_OK, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ effectiveLocale: 'en', messages })); }) - .catch(e => { + .catch((e) => { console.error(e); res.writeHead(STATUS_ERROR); res.end(e); diff --git a/server/sonar-web/scripts/validate-package-json.js b/server/sonar-web/scripts/validate-package-json.js index 7d8521b8795..9ce80af1831 100644 --- a/server/sonar-web/scripts/validate-package-json.js +++ b/server/sonar-web/scripts/validate-package-json.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + const { dependencies, devDependencies } = require('../package.json'); const dependenciesArray = Object.entries(dependencies); diff --git a/server/sonar-web/design-system/src/@types/css.d.ts b/server/sonar-web/src/main/js/@types/css.d.ts index 4e0b0b027f7..c705508154d 100644 --- a/server/sonar-web/design-system/src/@types/css.d.ts +++ b/server/sonar-web/src/main/js/@types/css.d.ts @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as CSS from 'csstype'; + +import 'csstype'; declare module 'csstype' { - interface Properties extends CSS.Properties { + interface Properties { // Support any CSS Custom Property in style prop of components [index: `--${string}`]: string | number; } diff --git a/server/sonar-web/src/main/js/@types/emotion.d.ts b/server/sonar-web/src/main/js/@types/emotion.d.ts index 114d5a860aa..4d80913ad6d 100644 --- a/server/sonar-web/src/main/js/@types/emotion.d.ts +++ b/server/sonar-web/src/main/js/@types/emotion.d.ts @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import '@emotion/react'; -import { Theme as SQTheme } from 'design-system'; +import { Theme as SQTheme } from '~design-system'; declare module '@emotion/react' { export interface Theme extends SQTheme {} diff --git a/server/sonar-web/design-system/src/@types/highlightjs-apex.d.ts b/server/sonar-web/src/main/js/@types/highlightjs-apex.d.ts index 53105468258..b7b1a7dc2ff 100644 --- a/server/sonar-web/design-system/src/@types/highlightjs-apex.d.ts +++ b/server/sonar-web/src/main/js/@types/highlightjs-apex.d.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + declare module 'highlightjs-apex' { import { LanguageFn } from 'highlight.js'; diff --git a/server/sonar-web/design-system/src/@types/highlightjs-sap-abap.d.ts b/server/sonar-web/src/main/js/@types/highlightjs-sap-abap.d.ts index 809be1324a7..1e8c0f4b2c2 100644 --- a/server/sonar-web/design-system/src/@types/highlightjs-sap-abap.d.ts +++ b/server/sonar-web/src/main/js/@types/highlightjs-sap-abap.d.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + declare module 'highlightjs-sap-abap' { import { LanguageFn } from 'highlight.js'; diff --git a/server/sonar-web/src/main/js/@types/json.d.ts b/server/sonar-web/src/main/js/@types/json.d.ts index 722bce5f6c0..9eb9035f5ff 100644 --- a/server/sonar-web/src/main/js/@types/json.d.ts +++ b/server/sonar-web/src/main/js/@types/json.d.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + declare module '*.json' { const value: any; export default value; diff --git a/server/sonar-web/src/main/js/@types/lunr.d.ts b/server/sonar-web/src/main/js/@types/lunr.d.ts index a10e8ce3905..0ac1160ceb0 100644 --- a/server/sonar-web/src/main/js/@types/lunr.d.ts +++ b/server/sonar-web/src/main/js/@types/lunr.d.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + declare module 'lunr' { export interface Lunr { add(doc: any): void; diff --git a/server/sonar-web/src/main/js/@types/md.d.ts b/server/sonar-web/src/main/js/@types/md.d.ts index 6a41b0c11b4..cfacf21e1c6 100644 --- a/server/sonar-web/src/main/js/@types/md.d.ts +++ b/server/sonar-web/src/main/js/@types/md.d.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + declare module '*.md' { const value: string; export default value; diff --git a/server/sonar-web/src/main/js/api/alm-integrations.ts b/server/sonar-web/src/main/js/api/alm-integrations.ts index b6e2d5047af..8958403d766 100644 --- a/server/sonar-web/src/main/js/api/alm-integrations.ts +++ b/server/sonar-web/src/main/js/api/alm-integrations.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { get, parseError, post, postJSON } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/alm-settings.ts b/server/sonar-web/src/main/js/api/alm-settings.ts index 08f5b1b17a5..04d745c804f 100644 --- a/server/sonar-web/src/main/js/api/alm-settings.ts +++ b/server/sonar-web/src/main/js/api/alm-settings.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { get, HttpStatus, parseError, parseJSON, post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/application.ts b/server/sonar-web/src/main/js/api/application.ts index aa60a842041..dc35a60c483 100644 --- a/server/sonar-web/src/main/js/api/application.ts +++ b/server/sonar-web/src/main/js/api/application.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { Visibility } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/api/auth.ts b/server/sonar-web/src/main/js/api/auth.ts index 9ef2a2dff5b..32a5a9a4bf9 100644 --- a/server/sonar-web/src/main/js/api/auth.ts +++ b/server/sonar-web/src/main/js/api/auth.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { request } from '../helpers/request'; export function logIn(login: string, password: string): Promise<Response> { diff --git a/server/sonar-web/src/main/js/api/branches.ts b/server/sonar-web/src/main/js/api/branches.ts index 213091b3eb5..531d7c522a5 100644 --- a/server/sonar-web/src/main/js/api/branches.ts +++ b/server/sonar-web/src/main/js/api/branches.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/ce.ts b/server/sonar-web/src/main/js/api/ce.ts index 72a15a36e38..ed6b049e723 100644 --- a/server/sonar-web/src/main/js/api/ce.ts +++ b/server/sonar-web/src/main/js/api/ce.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/component-report.ts b/server/sonar-web/src/main/js/api/component-report.ts index 0f3cd52dc1a..f540d92c2c8 100644 --- a/server/sonar-web/src/main/js/api/component-report.ts +++ b/server/sonar-web/src/main/js/api/component-report.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/components.ts b/server/sonar-web/src/main/js/api/components.ts index 21375f6bd90..b98c6c1e0cf 100644 --- a/server/sonar-web/src/main/js/api/components.ts +++ b/server/sonar-web/src/main/js/api/components.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; diff --git a/server/sonar-web/src/main/js/api/cves.ts b/server/sonar-web/src/main/js/api/cves.ts index a8e01d80042..91ca28f0a6c 100644 --- a/server/sonar-web/src/main/js/api/cves.ts +++ b/server/sonar-web/src/main/js/api/cves.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import axios from 'axios'; import { Cve } from '../types/cves'; diff --git a/server/sonar-web/src/main/js/api/dependencies.ts b/server/sonar-web/src/main/js/api/dependencies.ts index 94498055268..a4cd1695e5e 100644 --- a/server/sonar-web/src/main/js/api/dependencies.ts +++ b/server/sonar-web/src/main/js/api/dependencies.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import axios from 'axios'; import { BranchLikeParameters } from '../sonar-aligned/types/branch-like'; import { DependenciesResponse } from '../types/dependencies'; diff --git a/server/sonar-web/src/main/js/api/dop-translation.ts b/server/sonar-web/src/main/js/api/dop-translation.ts index 5025492d374..ad5e5b7093d 100644 --- a/server/sonar-web/src/main/js/api/dop-translation.ts +++ b/server/sonar-web/src/main/js/api/dop-translation.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import axios from 'axios'; import { BoundProject, diff --git a/server/sonar-web/src/main/js/api/editions.ts b/server/sonar-web/src/main/js/api/editions.ts index 5b8ba747a45..2e3c2025b00 100644 --- a/server/sonar-web/src/main/js/api/editions.ts +++ b/server/sonar-web/src/main/js/api/editions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { License } from '../types/editions'; diff --git a/server/sonar-web/src/main/js/api/favorites.ts b/server/sonar-web/src/main/js/api/favorites.ts index 5b59a269231..5f0e90a4aae 100644 --- a/server/sonar-web/src/main/js/api/favorites.ts +++ b/server/sonar-web/src/main/js/api/favorites.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getJSON } from '~sonar-aligned/helpers/request'; import { post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/features.ts b/server/sonar-web/src/main/js/api/features.ts index a5856b65c29..e1e518781a2 100644 --- a/server/sonar-web/src/main/js/api/features.ts +++ b/server/sonar-web/src/main/js/api/features.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getJSON } from '~sonar-aligned/helpers/request'; import { Feature } from '../types/features'; diff --git a/server/sonar-web/src/main/js/api/fix-suggestions.ts b/server/sonar-web/src/main/js/api/fix-suggestions.ts index e0a7049abc2..04eba994fc5 100644 --- a/server/sonar-web/src/main/js/api/fix-suggestions.ts +++ b/server/sonar-web/src/main/js/api/fix-suggestions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { axiosToCatch } from '../helpers/request'; import { SuggestedFix } from '../types/fix-suggestions'; diff --git a/server/sonar-web/src/main/js/api/github-provisioning.ts b/server/sonar-web/src/main/js/api/github-provisioning.ts index 1cb688d5755..cebc5010068 100644 --- a/server/sonar-web/src/main/js/api/github-provisioning.ts +++ b/server/sonar-web/src/main/js/api/github-provisioning.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import axios from 'axios'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; diff --git a/server/sonar-web/src/main/js/api/gitlab-provisioning.ts b/server/sonar-web/src/main/js/api/gitlab-provisioning.ts index e69a372d799..14335c8ec04 100644 --- a/server/sonar-web/src/main/js/api/gitlab-provisioning.ts +++ b/server/sonar-web/src/main/js/api/gitlab-provisioning.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import axios from 'axios'; import { DevopsRolesMapping, diff --git a/server/sonar-web/src/main/js/api/group-memberships.ts b/server/sonar-web/src/main/js/api/group-memberships.ts index e13cbff3727..310f7b7a193 100644 --- a/server/sonar-web/src/main/js/api/group-memberships.ts +++ b/server/sonar-web/src/main/js/api/group-memberships.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import axios from 'axios'; import { GroupMembership, Paging } from '../types/types'; diff --git a/server/sonar-web/src/main/js/api/issue-filters.ts b/server/sonar-web/src/main/js/api/issue-filters.ts index c360c1be273..0a115b85dbd 100644 --- a/server/sonar-web/src/main/js/api/issue-filters.ts +++ b/server/sonar-web/src/main/js/api/issue-filters.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { post } from '../helpers/request'; export function toggleIssueFilter(id: string): Promise<void> { diff --git a/server/sonar-web/src/main/js/api/issues.ts b/server/sonar-web/src/main/js/api/issues.ts index 751e6959760..b369019d2bd 100644 --- a/server/sonar-web/src/main/js/api/issues.ts +++ b/server/sonar-web/src/main/js/api/issues.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import getCoverageStatus from '../components/SourceViewer/helpers/getCoverageStatus'; diff --git a/server/sonar-web/src/main/js/api/l10n.ts b/server/sonar-web/src/main/js/api/l10n.ts index 604d7bccd91..ee1ae273fd4 100644 --- a/server/sonar-web/src/main/js/api/l10n.ts +++ b/server/sonar-web/src/main/js/api/l10n.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getJSON } from '~sonar-aligned/helpers/request'; import { L10nBundleRequestParams, L10nBundleRequestResponse } from '../types/l10nBundle'; diff --git a/server/sonar-web/src/main/js/api/languages.ts b/server/sonar-web/src/main/js/api/languages.ts index 6c23e1e73e9..f23cf1d6e75 100644 --- a/server/sonar-web/src/main/js/api/languages.ts +++ b/server/sonar-web/src/main/js/api/languages.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { Language } from '../types/languages'; diff --git a/server/sonar-web/src/main/js/api/measures.ts b/server/sonar-web/src/main/js/api/measures.ts index 2cc7089cdca..84fc70b5341 100644 --- a/server/sonar-web/src/main/js/api/measures.ts +++ b/server/sonar-web/src/main/js/api/measures.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; diff --git a/server/sonar-web/src/main/js/api/messages.ts b/server/sonar-web/src/main/js/api/messages.ts index 983ae9a2715..deee9b7a5b7 100644 --- a/server/sonar-web/src/main/js/api/messages.ts +++ b/server/sonar-web/src/main/js/api/messages.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/metrics.ts b/server/sonar-web/src/main/js/api/metrics.ts index f6b35e44858..1645e946e6f 100644 --- a/server/sonar-web/src/main/js/api/metrics.ts +++ b/server/sonar-web/src/main/js/api/metrics.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { Metric } from '../types/types'; diff --git a/server/sonar-web/src/main/js/api/mocks/AlmSettingsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/AlmSettingsServiceMock.ts index 92bc429ab42..e701e92f6e4 100644 --- a/server/sonar-web/src/main/js/api/mocks/AlmSettingsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/AlmSettingsServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { mockAlmSettingsInstance } from '../../helpers/mocks/alm-settings'; import { diff --git a/server/sonar-web/src/main/js/api/mocks/ApplicationServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/ApplicationServiceMock.ts index 66203fbf897..d9af117c009 100644 --- a/server/sonar-web/src/main/js/api/mocks/ApplicationServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/ApplicationServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { Visibility } from '~sonar-aligned/types/component'; import { getApplicationDetails, getApplicationLeak } from '../application'; diff --git a/server/sonar-web/src/main/js/api/mocks/BranchesServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/BranchesServiceMock.ts index 37add6e354c..e3ccc71338b 100644 --- a/server/sonar-web/src/main/js/api/mocks/BranchesServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/BranchesServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { Branch, PullRequest } from '../../types/branch-like'; import { diff --git a/server/sonar-web/src/main/js/api/mocks/ComponentsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/ComponentsServiceMock.ts index 1d1ed348c38..55cf9a0878d 100644 --- a/server/sonar-web/src/main/js/api/mocks/ComponentsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/ComponentsServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep, pick } from 'lodash'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; import { Visibility } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/api/mocks/ComputeEngineServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/ComputeEngineServiceMock.ts index a8a37b79cba..70fba8a61ae 100644 --- a/server/sonar-web/src/main/js/api/mocks/ComputeEngineServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/ComputeEngineServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { differenceInMilliseconds, isAfter, isBefore } from 'date-fns'; import { cloneDeep, groupBy, sortBy } from 'lodash'; import { PAGE_SIZE } from '../../apps/background-tasks/constants'; diff --git a/server/sonar-web/src/main/js/api/mocks/CveServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/CveServiceMock.ts index 87e574cb7d0..6456bddc697 100644 --- a/server/sonar-web/src/main/js/api/mocks/CveServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/CveServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { mockCve } from '../../helpers/testMocks'; import { Cve } from '../../types/cves'; diff --git a/server/sonar-web/src/main/js/api/mocks/DopTranslationServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/DopTranslationServiceMock.ts index 0a5cf06c26d..adf7c33c8ea 100644 --- a/server/sonar-web/src/main/js/api/mocks/DopTranslationServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/DopTranslationServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep, omit } from 'lodash'; import { mockGitHubConfiguration } from '../../helpers/mocks/dop-translation'; import { mockPaging } from '../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/api/mocks/FixIssueServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/FixIssueServiceMock.ts index 56520b2c040..4ea23011cab 100644 --- a/server/sonar-web/src/main/js/api/mocks/FixIssueServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/FixIssueServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { checkSuggestionServiceStatus, diff --git a/server/sonar-web/src/main/js/api/mocks/GithubProvisioningServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/GithubProvisioningServiceMock.ts index aa0c6b78d03..31a9c31d4a3 100644 --- a/server/sonar-web/src/main/js/api/mocks/GithubProvisioningServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/GithubProvisioningServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { mockTask } from '../../helpers/mocks/tasks'; import { diff --git a/server/sonar-web/src/main/js/api/mocks/GitlabProvisioningServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/GitlabProvisioningServiceMock.ts index ab66b53b0f7..df81238eb66 100644 --- a/server/sonar-web/src/main/js/api/mocks/GitlabProvisioningServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/GitlabProvisioningServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep, omit } from 'lodash'; import { mockGitlabConfiguration } from '../../helpers/mocks/alm-integrations'; import { mockPaging } from '../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/api/mocks/GroupMembersipsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/GroupMembersipsServiceMock.ts index fb6470a0b22..95bc2496b93 100644 --- a/server/sonar-web/src/main/js/api/mocks/GroupMembersipsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/GroupMembersipsServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { mockGroupMembership } from '../../helpers/testMocks'; import { GroupMembership } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/api/mocks/GroupsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/GroupsServiceMock.ts index 443e7bfae9a..735c7bd707c 100644 --- a/server/sonar-web/src/main/js/api/mocks/GroupsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/GroupsServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { mockGroup, mockIdentityProvider } from '../../helpers/testMocks'; import { Group, IdentityProvider, Paging, Provider } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/api/mocks/IssuesServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/IssuesServiceMock.ts index 347105e1294..55c970a84e9 100644 --- a/server/sonar-web/src/main/js/api/mocks/IssuesServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/IssuesServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep, uniqueId } from 'lodash'; import { RuleDescriptionSections } from '../../apps/coding-rules/rule'; diff --git a/server/sonar-web/src/main/js/api/mocks/MeasuresServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/MeasuresServiceMock.ts index 45a5dedc2b0..19f1b585379 100644 --- a/server/sonar-web/src/main/js/api/mocks/MeasuresServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/MeasuresServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/api/mocks/MessagesServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/MessagesServiceMock.ts index 3bcecdd41d4..f7c8529ad33 100644 --- a/server/sonar-web/src/main/js/api/mocks/MessagesServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/MessagesServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { checkMessageDismissed, diff --git a/server/sonar-web/src/main/js/api/mocks/NavigationServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/NavigationServiceMock.ts index f391a82f89e..1492deaedc8 100644 --- a/server/sonar-web/src/main/js/api/mocks/NavigationServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/NavigationServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { mockAppState } from '../../helpers/testMocks'; import { AppState } from '../../types/appstate'; diff --git a/server/sonar-web/src/main/js/api/mocks/NewCodeDefinitionServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/NewCodeDefinitionServiceMock.ts index c34c1b4d7be..f2640e1818d 100644 --- a/server/sonar-web/src/main/js/api/mocks/NewCodeDefinitionServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/NewCodeDefinitionServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { mockNewCodePeriod, diff --git a/server/sonar-web/src/main/js/api/mocks/NotificationsMock.ts b/server/sonar-web/src/main/js/api/mocks/NotificationsMock.ts index 21081afd055..bdfd0b07d29 100644 --- a/server/sonar-web/src/main/js/api/mocks/NotificationsMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/NotificationsMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { AddRemoveNotificationParameters, diff --git a/server/sonar-web/src/main/js/api/mocks/PermissionsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/PermissionsServiceMock.ts index 80a300ac1ca..ff0a2150172 100644 --- a/server/sonar-web/src/main/js/api/mocks/PermissionsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/PermissionsServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { chunk, cloneDeep, remove, uniq } from 'lodash'; import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; import { diff --git a/server/sonar-web/src/main/js/api/mocks/PluginsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/PluginsServiceMock.ts index 76a0a9967cf..ca61b843a87 100644 --- a/server/sonar-web/src/main/js/api/mocks/PluginsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/PluginsServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep, omit } from 'lodash'; import { mockAvailablePlugin, diff --git a/server/sonar-web/src/main/js/api/mocks/ProjectActivityServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/ProjectActivityServiceMock.ts index 8140dab432f..752fb327392 100644 --- a/server/sonar-web/src/main/js/api/mocks/ProjectActivityServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/ProjectActivityServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { chunk, cloneDeep, uniqueId } from 'lodash'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; import { parseDate } from '../../helpers/dates'; diff --git a/server/sonar-web/src/main/js/api/mocks/ProjectBadgesServiceMock.tsx b/server/sonar-web/src/main/js/api/mocks/ProjectBadgesServiceMock.tsx index 0e1839aa8b9..a1bbab25d5e 100644 --- a/server/sonar-web/src/main/js/api/mocks/ProjectBadgesServiceMock.tsx +++ b/server/sonar-web/src/main/js/api/mocks/ProjectBadgesServiceMock.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getProjectBadgesToken, renewProjectBadgesToken } from '../project-badges'; jest.mock('../project-badges'); diff --git a/server/sonar-web/src/main/js/api/mocks/ProjectDumpServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/ProjectDumpServiceMock.ts index 7de3795d365..b2f68ee1ccb 100644 --- a/server/sonar-web/src/main/js/api/mocks/ProjectDumpServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/ProjectDumpServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { TaskStatuses, TaskTypes } from '../../types/tasks'; import { doExport, doImport, getStatus } from '../project-dump'; diff --git a/server/sonar-web/src/main/js/api/mocks/ProjectLinksServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/ProjectLinksServiceMock.ts index bd15c1889a7..69b207fb240 100644 --- a/server/sonar-web/src/main/js/api/mocks/ProjectLinksServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/ProjectLinksServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { ProjectLink } from '../../types/types'; import { createLink, deleteLink, getProjectLinks } from '../projectLinks'; diff --git a/server/sonar-web/src/main/js/api/mocks/ProjectsManagementServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/ProjectsManagementServiceMock.ts index 57c6ed0de05..946c89eeea0 100644 --- a/server/sonar-web/src/main/js/api/mocks/ProjectsManagementServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/ProjectsManagementServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; import { mockProject } from '../../helpers/mocks/projects'; diff --git a/server/sonar-web/src/main/js/api/mocks/ProjectsServiceMock.tsx b/server/sonar-web/src/main/js/api/mocks/ProjectsServiceMock.tsx index 4a6f946d9f3..dd0f98528b2 100644 --- a/server/sonar-web/src/main/js/api/mocks/ProjectsServiceMock.tsx +++ b/server/sonar-web/src/main/js/api/mocks/ProjectsServiceMock.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MeasuresForProjects } from '../../types/measures'; import { Dict } from '../../types/types'; import { ComponentRaw, Facet, getScannableProjects, searchProjects } from '../components'; diff --git a/server/sonar-web/src/main/js/api/mocks/QualityGatesServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/QualityGatesServiceMock.ts index 50db7db263f..4046cc56883 100644 --- a/server/sonar-web/src/main/js/api/mocks/QualityGatesServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/QualityGatesServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep, flatten, omit, remove } from 'lodash'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { Project } from '../../apps/quality-gates/components/Projects'; diff --git a/server/sonar-web/src/main/js/api/mocks/QualityProfilesServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/QualityProfilesServiceMock.ts index f1b3ef928c1..b7bec2d3d18 100644 --- a/server/sonar-web/src/main/js/api/mocks/QualityProfilesServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/QualityProfilesServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { ProfileChangelogEvent } from '../../apps/quality-profiles/types'; import { RequestData } from '../../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/mocks/ScimProvisioningServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/ScimProvisioningServiceMock.ts index 73022e4f0e7..bf3b2358058 100644 --- a/server/sonar-web/src/main/js/api/mocks/ScimProvisioningServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/ScimProvisioningServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { activateScim, deactivateScim, fetchIsScimEnabled } from '../scim-provisioning'; jest.mock('../scim-provisioning'); diff --git a/server/sonar-web/src/main/js/api/mocks/SecurityHotspotServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/SecurityHotspotServiceMock.ts index 03633cb3297..ecc70a7b852 100644 --- a/server/sonar-web/src/main/js/api/mocks/SecurityHotspotServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/SecurityHotspotServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep, times } from 'lodash'; import { mockHotspot, diff --git a/server/sonar-web/src/main/js/api/mocks/SettingsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/SettingsServiceMock.ts index 4300806e713..11fe9a6d5ce 100644 --- a/server/sonar-web/src/main/js/api/mocks/SettingsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/SettingsServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep, isArray, isObject, isString } from 'lodash'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; import { HousekeepingPolicy } from '../../apps/audit-logs/utils'; diff --git a/server/sonar-web/src/main/js/api/mocks/SystemServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/SystemServiceMock.ts index 2476e88b6bb..6ee53bb29c8 100644 --- a/server/sonar-web/src/main/js/api/mocks/SystemServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/SystemServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep, uniqueId } from 'lodash'; import { Provider, SysInfoCluster, SysInfoLogging, SysInfoStandalone } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/api/mocks/TimeMachineServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/TimeMachineServiceMock.ts index c292c70ebc4..8b5f501a4e1 100644 --- a/server/sonar-web/src/main/js/api/mocks/TimeMachineServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/TimeMachineServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { chunk, cloneDeep, times } from 'lodash'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/api/mocks/UserTokensMock.ts b/server/sonar-web/src/main/js/api/mocks/UserTokensMock.ts index 5601b2cb721..a59e468f35e 100644 --- a/server/sonar-web/src/main/js/api/mocks/UserTokensMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/UserTokensMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep, last } from 'lodash'; import { mockUserToken } from '../../helpers/mocks/token'; import { NewUserToken, TokenType, UserToken } from '../../types/token'; diff --git a/server/sonar-web/src/main/js/api/mocks/UsersServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/UsersServiceMock.ts index 92b87cf1b01..1a3614476f0 100644 --- a/server/sonar-web/src/main/js/api/mocks/UsersServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/UsersServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isAfter, isBefore } from 'date-fns'; import { cloneDeep, isEmpty, isUndefined, omitBy } from 'lodash'; import { HttpStatus } from '../../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/mocks/WebApiServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/WebApiServiceMock.ts index 52231c68e6f..11e32e2a0b9 100644 --- a/server/sonar-web/src/main/js/api/mocks/WebApiServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/WebApiServiceMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { OpenAPIV3 } from 'openapi-types'; import { mockAction } from '../../helpers/mocks/webapi'; diff --git a/server/sonar-web/src/main/js/api/mocks/WebhooksMock.ts b/server/sonar-web/src/main/js/api/mocks/WebhooksMock.ts index d439ecf6bb1..2495cefc089 100644 --- a/server/sonar-web/src/main/js/api/mocks/WebhooksMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/WebhooksMock.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { createWebhook, deleteWebhook, diff --git a/server/sonar-web/src/main/js/api/mocks/data/branches.ts b/server/sonar-web/src/main/js/api/mocks/data/branches.ts index 2a52bac58c6..737439dba32 100644 --- a/server/sonar-web/src/main/js/api/mocks/data/branches.ts +++ b/server/sonar-web/src/main/js/api/mocks/data/branches.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mockBranch, mockPullRequest } from '../../../helpers/mocks/branch-like'; export function mockBranchList() { diff --git a/server/sonar-web/src/main/js/api/mocks/data/components.ts b/server/sonar-web/src/main/js/api/mocks/data/components.ts index b724a319643..8f3289cc082 100644 --- a/server/sonar-web/src/main/js/api/mocks/data/components.ts +++ b/server/sonar-web/src/main/js/api/mocks/data/components.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { times } from 'lodash'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { mockComponent } from '../../../helpers/mocks/component'; diff --git a/server/sonar-web/src/main/js/api/mocks/data/ids.ts b/server/sonar-web/src/main/js/api/mocks/data/ids.ts index 98e8b00bae4..a0ed7f2d489 100644 --- a/server/sonar-web/src/main/js/api/mocks/data/ids.ts +++ b/server/sonar-web/src/main/js/api/mocks/data/ids.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { SecurityStandard, Standards } from '../../../types/security'; // Component tree. diff --git a/server/sonar-web/src/main/js/api/mocks/data/issues.ts b/server/sonar-web/src/main/js/api/mocks/data/issues.ts index ca1710ce1cd..0a62a929b9c 100644 --- a/server/sonar-web/src/main/js/api/mocks/data/issues.ts +++ b/server/sonar-web/src/main/js/api/mocks/data/issues.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { keyBy, times } from 'lodash'; import { mockSnippetsByComponent } from '../../../helpers/mocks/sources'; import { mockLoggedInUser, mockRawIssue } from '../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/api/mocks/data/measures.ts b/server/sonar-web/src/main/js/api/mocks/data/measures.ts index 315fd23504c..593f2eb22f5 100644 --- a/server/sonar-web/src/main/js/api/mocks/data/measures.ts +++ b/server/sonar-web/src/main/js/api/mocks/data/measures.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { keyBy } from 'lodash'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { isDiffMetric } from '../../../helpers/measures'; diff --git a/server/sonar-web/src/main/js/api/mocks/data/qualityProfiles.ts b/server/sonar-web/src/main/js/api/mocks/data/qualityProfiles.ts index 080f8e4b259..92c4a2be777 100644 --- a/server/sonar-web/src/main/js/api/mocks/data/qualityProfiles.ts +++ b/server/sonar-web/src/main/js/api/mocks/data/qualityProfiles.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mockQualityProfile } from '../../../helpers/testMocks'; import { QP_1, QP_2, QP_2_Parent, QP_3, QP_4, QP_5, QP_6 } from './ids'; diff --git a/server/sonar-web/src/main/js/api/mocks/data/rules.ts b/server/sonar-web/src/main/js/api/mocks/data/rules.ts index b32fc913940..9da3532c4f4 100644 --- a/server/sonar-web/src/main/js/api/mocks/data/rules.ts +++ b/server/sonar-web/src/main/js/api/mocks/data/rules.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { RuleDescriptionSections } from '../../../apps/coding-rules/rule'; import { mockRule, mockRuleActivation, mockRuleDetails } from '../../../helpers/testMocks'; import { diff --git a/server/sonar-web/src/main/js/api/mocks/data/utils.ts b/server/sonar-web/src/main/js/api/mocks/data/utils.ts index 340fb1bd3e4..f6f592a32e7 100644 --- a/server/sonar-web/src/main/js/api/mocks/data/utils.ts +++ b/server/sonar-web/src/main/js/api/mocks/data/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { flatMap, map } from 'lodash'; import { Component } from '../../../types/types'; import { ComponentTree } from './components'; diff --git a/server/sonar-web/src/main/js/api/mocks/data/web-api.ts b/server/sonar-web/src/main/js/api/mocks/data/web-api.ts index e6aeb205ecf..7b849beb088 100644 --- a/server/sonar-web/src/main/js/api/mocks/data/web-api.ts +++ b/server/sonar-web/src/main/js/api/mocks/data/web-api.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { OpenAPIV3 } from 'openapi-types'; import { InternalExtension } from '../../../apps/web-api-v2/types'; diff --git a/server/sonar-web/src/main/js/api/mocks/data/webhooks.ts b/server/sonar-web/src/main/js/api/mocks/data/webhooks.ts index 4e0e2ba7128..5ddfe55f17d 100644 --- a/server/sonar-web/src/main/js/api/mocks/data/webhooks.ts +++ b/server/sonar-web/src/main/js/api/mocks/data/webhooks.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { mockComponent } from '../../../helpers/mocks/component'; diff --git a/server/sonar-web/src/main/js/api/navigation.ts b/server/sonar-web/src/main/js/api/navigation.ts index 1df68cfb3f4..76353a672fb 100644 --- a/server/sonar-web/src/main/js/api/navigation.ts +++ b/server/sonar-web/src/main/js/api/navigation.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; diff --git a/server/sonar-web/src/main/js/api/newCodeDefinition.ts b/server/sonar-web/src/main/js/api/newCodeDefinition.ts index a779c897cc7..8a9157dceb4 100644 --- a/server/sonar-web/src/main/js/api/newCodeDefinition.ts +++ b/server/sonar-web/src/main/js/api/newCodeDefinition.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/notifications.ts b/server/sonar-web/src/main/js/api/notifications.ts index f146613a72b..051ee91e0e6 100644 --- a/server/sonar-web/src/main/js/api/notifications.ts +++ b/server/sonar-web/src/main/js/api/notifications.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/permissions.ts b/server/sonar-web/src/main/js/api/permissions.ts index 26a5e0c4438..6c92873c609 100644 --- a/server/sonar-web/src/main/js/api/permissions.ts +++ b/server/sonar-web/src/main/js/api/permissions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { Visibility } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/api/plugins.ts b/server/sonar-web/src/main/js/api/plugins.ts index 9850b5d8775..2c5a0b5d72f 100644 --- a/server/sonar-web/src/main/js/api/plugins.ts +++ b/server/sonar-web/src/main/js/api/plugins.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/project-badges.ts b/server/sonar-web/src/main/js/api/project-badges.ts index 84b1ea6132b..d858465a7cb 100644 --- a/server/sonar-web/src/main/js/api/project-badges.ts +++ b/server/sonar-web/src/main/js/api/project-badges.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/project-dump.ts b/server/sonar-web/src/main/js/api/project-dump.ts index f76a9d5c503..92d2bca0bf8 100644 --- a/server/sonar-web/src/main/js/api/project-dump.ts +++ b/server/sonar-web/src/main/js/api/project-dump.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/project-management.ts b/server/sonar-web/src/main/js/api/project-management.ts index 02caf215ae7..073f0bc880b 100644 --- a/server/sonar-web/src/main/js/api/project-management.ts +++ b/server/sonar-web/src/main/js/api/project-management.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/api/projectActivity.ts b/server/sonar-web/src/main/js/api/projectActivity.ts index baf4c8ac5b2..622d8370c11 100644 --- a/server/sonar-web/src/main/js/api/projectActivity.ts +++ b/server/sonar-web/src/main/js/api/projectActivity.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; diff --git a/server/sonar-web/src/main/js/api/projectLinks.ts b/server/sonar-web/src/main/js/api/projectLinks.ts index 223d326811c..18b508e96bf 100644 --- a/server/sonar-web/src/main/js/api/projectLinks.ts +++ b/server/sonar-web/src/main/js/api/projectLinks.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post, postJSON } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/quality-gates.ts b/server/sonar-web/src/main/js/api/quality-gates.ts index 257e45f64f2..ec210060b66 100644 --- a/server/sonar-web/src/main/js/api/quality-gates.ts +++ b/server/sonar-web/src/main/js/api/quality-gates.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; diff --git a/server/sonar-web/src/main/js/api/quality-profiles.ts b/server/sonar-web/src/main/js/api/quality-profiles.ts index 2c293b4bb84..c01cfc20907 100644 --- a/server/sonar-web/src/main/js/api/quality-profiles.ts +++ b/server/sonar-web/src/main/js/api/quality-profiles.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { map } from 'lodash'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; diff --git a/server/sonar-web/src/main/js/api/regulatory-report.ts b/server/sonar-web/src/main/js/api/regulatory-report.ts index 913f78e1cc5..13aff7d1496 100644 --- a/server/sonar-web/src/main/js/api/regulatory-report.ts +++ b/server/sonar-web/src/main/js/api/regulatory-report.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getBaseUrl } from '../helpers/system'; export function getRegulatoryReportUrl(project: string, branch?: string): string { diff --git a/server/sonar-web/src/main/js/api/rules.ts b/server/sonar-web/src/main/js/api/rules.ts index 8c88414b393..a1af5c27051 100644 --- a/server/sonar-web/src/main/js/api/rules.ts +++ b/server/sonar-web/src/main/js/api/rules.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { HttpStatusCode } from 'axios'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; diff --git a/server/sonar-web/src/main/js/api/scim-provisioning.ts b/server/sonar-web/src/main/js/api/scim-provisioning.ts index 6c002fe777c..ac2632c8140 100644 --- a/server/sonar-web/src/main/js/api/scim-provisioning.ts +++ b/server/sonar-web/src/main/js/api/scim-provisioning.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/security-hotspots.ts b/server/sonar-web/src/main/js/api/security-hotspots.ts index eeb40e168bf..bde0dac9dd9 100644 --- a/server/sonar-web/src/main/js/api/security-hotspots.ts +++ b/server/sonar-web/src/main/js/api/security-hotspots.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; diff --git a/server/sonar-web/src/main/js/api/sources.ts b/server/sonar-web/src/main/js/api/sources.ts index 6c84d1c57ba..0578126a19e 100644 --- a/server/sonar-web/src/main/js/api/sources.ts +++ b/server/sonar-web/src/main/js/api/sources.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { get, parseText } from '../helpers/request'; import { BranchParameters } from '../sonar-aligned/types/branch-like'; diff --git a/server/sonar-web/src/main/js/api/static.ts b/server/sonar-web/src/main/js/api/static.ts index 6e8dd8e33dc..909823d53b2 100644 --- a/server/sonar-web/src/main/js/api/static.ts +++ b/server/sonar-web/src/main/js/api/static.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { checkStatus, request } from '../helpers/request'; export function getPluginStaticFileContent(pluginKey: string, staticFilePath: string) { diff --git a/server/sonar-web/src/main/js/api/system.ts b/server/sonar-web/src/main/js/api/system.ts index 40cfd9a7de3..b2928529b18 100644 --- a/server/sonar-web/src/main/js/api/system.ts +++ b/server/sonar-web/src/main/js/api/system.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import axios from 'axios'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; diff --git a/server/sonar-web/src/main/js/api/time-machine.ts b/server/sonar-web/src/main/js/api/time-machine.ts index 7e40683a9f8..b5db251fde9 100644 --- a/server/sonar-web/src/main/js/api/time-machine.ts +++ b/server/sonar-web/src/main/js/api/time-machine.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; diff --git a/server/sonar-web/src/main/js/api/user-tokens.ts b/server/sonar-web/src/main/js/api/user-tokens.ts index d56ef0ac78c..6a16cc3b1f9 100644 --- a/server/sonar-web/src/main/js/api/user-tokens.ts +++ b/server/sonar-web/src/main/js/api/user-tokens.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post, postJSON } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/api/user_groups.ts b/server/sonar-web/src/main/js/api/user_groups.ts index a2c9de1dc16..9c69a7e8b63 100644 --- a/server/sonar-web/src/main/js/api/user_groups.ts +++ b/server/sonar-web/src/main/js/api/user_groups.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import axios from 'axios'; import { Group, Paging } from '../types/types'; diff --git a/server/sonar-web/src/main/js/api/users.ts b/server/sonar-web/src/main/js/api/users.ts index ac0d45f45eb..d3e094f0a03 100644 --- a/server/sonar-web/src/main/js/api/users.ts +++ b/server/sonar-web/src/main/js/api/users.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import axios from 'axios'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; diff --git a/server/sonar-web/src/main/js/api/web-api.ts b/server/sonar-web/src/main/js/api/web-api.ts index 778df47f539..acea083ee99 100644 --- a/server/sonar-web/src/main/js/api/web-api.ts +++ b/server/sonar-web/src/main/js/api/web-api.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { OpenAPIV3 } from 'openapi-types'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; diff --git a/server/sonar-web/src/main/js/api/webhooks.ts b/server/sonar-web/src/main/js/api/webhooks.ts index 70683aaabab..20047594b22 100644 --- a/server/sonar-web/src/main/js/api/webhooks.ts +++ b/server/sonar-web/src/main/js/api/webhooks.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { post, postJSON } from '../helpers/request'; diff --git a/server/sonar-web/src/main/js/app/components/AdminContainer.tsx b/server/sonar-web/src/main/js/app/components/AdminContainer.tsx index 9d485ca07a8..faa3e3c4fa3 100644 --- a/server/sonar-web/src/main/js/app/components/AdminContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/AdminContainer.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { createPortal } from 'react-dom'; import { Helmet } from 'react-helmet-async'; diff --git a/server/sonar-web/src/main/js/app/components/AdminContext.tsx b/server/sonar-web/src/main/js/app/components/AdminContext.tsx index 943ed99f631..f54cc2416c2 100644 --- a/server/sonar-web/src/main/js/app/components/AdminContext.tsx +++ b/server/sonar-web/src/main/js/app/components/AdminContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { PendingPluginResult } from '../../types/plugins'; import { SysStatus } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/app/components/AlmSynchronisationWarning.tsx b/server/sonar-web/src/main/js/app/components/AlmSynchronisationWarning.tsx index c7b7663fa7c..ff930ec835a 100644 --- a/server/sonar-web/src/main/js/app/components/AlmSynchronisationWarning.tsx +++ b/server/sonar-web/src/main/js/app/components/AlmSynchronisationWarning.tsx @@ -21,9 +21,9 @@ import styled from '@emotion/styled'; import { Link, Spinner } from '@sonarsource/echoes-react'; import { formatDistance } from 'date-fns'; -import { CheckIcon, FlagMessage, FlagWarningIcon, themeColor } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { CheckIcon, FlagMessage, FlagWarningIcon, themeColor } from '~design-system'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { AlmKeys } from '../../types/alm-settings'; import { AlmSyncStatus } from '../../types/provisioning'; diff --git a/server/sonar-web/src/main/js/app/components/App.tsx b/server/sonar-web/src/main/js/app/components/App.tsx index f7fb6cf4b7d..1d360cdbc1d 100644 --- a/server/sonar-web/src/main/js/app/components/App.tsx +++ b/server/sonar-web/src/main/js/app/components/App.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { Outlet } from 'react-router-dom'; import { AppState } from '../../types/appstate'; diff --git a/server/sonar-web/src/main/js/app/components/ChangeInCalculationPill.tsx b/server/sonar-web/src/main/js/app/components/ChangeInCalculationPill.tsx index e8b3fc1340f..bd227f7ef3e 100644 --- a/server/sonar-web/src/main/js/app/components/ChangeInCalculationPill.tsx +++ b/server/sonar-web/src/main/js/app/components/ChangeInCalculationPill.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Popover } from '@sonarsource/echoes-react'; -import { Pill, PillVariant } from 'design-system'; import * as React from 'react'; +import { Pill, PillVariant } from '~design-system'; import DocumentationLink from '../../components/common/DocumentationLink'; import { DocLink } from '../../helpers/doc-links'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx index af79c64c70b..34913e58aff 100644 --- a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx @@ -17,12 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CenteredLayout, Spinner } from 'design-system'; + import { differenceBy } from 'lodash'; import * as React from 'react'; import { createPortal } from 'react-dom'; import { Helmet } from 'react-helmet-async'; import { Outlet } from 'react-router-dom'; +import { CenteredLayout, Spinner } from '~design-system'; import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/app/components/ComponentContainerNotFound.tsx b/server/sonar-web/src/main/js/app/components/ComponentContainerNotFound.tsx index f12021725d3..47010fd7931 100644 --- a/server/sonar-web/src/main/js/app/components/ComponentContainerNotFound.tsx +++ b/server/sonar-web/src/main/js/app/components/ComponentContainerNotFound.tsx @@ -19,9 +19,8 @@ */ import { Link } from '@sonarsource/echoes-react'; -import { Card, CenteredLayout, SubHeading } from 'design-system'; -import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { Card, CenteredLayout, SubHeading } from '~design-system'; import { translate } from '../../helpers/l10n'; export interface ComponentContainerNotFoundProps { diff --git a/server/sonar-web/src/main/js/app/components/DocumentationRedirect.tsx b/server/sonar-web/src/main/js/app/components/DocumentationRedirect.tsx index ebfdf4c0cc9..18a19c796ed 100644 --- a/server/sonar-web/src/main/js/app/components/DocumentationRedirect.tsx +++ b/server/sonar-web/src/main/js/app/components/DocumentationRedirect.tsx @@ -19,7 +19,6 @@ */ import { LinkStandalone } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { useLocation } from 'react-router-dom'; import { useUncataloguedDocUrl } from '../../helpers/docs'; diff --git a/server/sonar-web/src/main/js/app/components/FormattingHelp.tsx b/server/sonar-web/src/main/js/app/components/FormattingHelp.tsx index ddb3bbf1659..90d8b51aec2 100644 --- a/server/sonar-web/src/main/js/app/components/FormattingHelp.tsx +++ b/server/sonar-web/src/main/js/app/components/FormattingHelp.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { Helmet } from 'react-helmet-async'; import { CellComponent, ContentCell, @@ -25,9 +27,7 @@ import { Table, TableRow, Title, -} from 'design-system'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; +} from '~design-system'; import { translate } from '../../helpers/l10n'; const COLUMNS = ['50%', '50%']; diff --git a/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx b/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx index 3a6c1eb24c1..6a11aa2eac1 100644 --- a/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx +++ b/server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useGitHubSyncStatusQuery } from '../../queries/identity-provider/github'; import { AlmKeys } from '../../types/alm-settings'; import AlmSynchronisationWarning from './AlmSynchronisationWarning'; diff --git a/server/sonar-web/src/main/js/app/components/GitLabSynchronisationWarning.tsx b/server/sonar-web/src/main/js/app/components/GitLabSynchronisationWarning.tsx index 4afc872b933..1f8acfd27f1 100644 --- a/server/sonar-web/src/main/js/app/components/GitLabSynchronisationWarning.tsx +++ b/server/sonar-web/src/main/js/app/components/GitLabSynchronisationWarning.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useGitLabSyncStatusQuery } from '../../queries/identity-provider/gitlab'; import { AlmKeys } from '../../types/alm-settings'; import AlmSynchronisationWarning from './AlmSynchronisationWarning'; diff --git a/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx b/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx index 0944705d8de..ef24aadaf96 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx @@ -20,9 +20,8 @@ import { ThemeProvider } from '@emotion/react'; import styled from '@emotion/styled'; -import { lightTheme, themeColor } from 'design-system'; -import * as React from 'react'; import { Outlet, useLocation } from 'react-router-dom'; +import { lightTheme, themeColor } from '~design-system'; import A11yProvider from '~sonar-aligned/components/a11y/A11yProvider'; import A11ySkipLinks from '~sonar-aligned/components/a11y/A11ySkipLinks'; import SuggestionsProvider from '../../components/embed-docs-modal/SuggestionsProvider'; diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx index 6636295d126..786421988b2 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx @@ -20,9 +20,8 @@ import styled from '@emotion/styled'; import { LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react'; -import { FlagMessage, LAYOUT_VIEWPORT_MIN_WIDTH, themeBorder, themeColor } from 'design-system'; -import React from 'react'; import { useIntl } from 'react-intl'; +import { FlagMessage, LAYOUT_VIEWPORT_MIN_WIDTH, themeBorder, themeColor } from '~design-system'; import InstanceMessage from '../../components/common/InstanceMessage'; import AppVersionStatus from '../../components/shared/AppVersionStatus'; import { DocLink } from '../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooterBranding.tsx b/server/sonar-web/src/main/js/app/components/GlobalFooterBranding.tsx index 6c266081bd8..27a6e7a2ea4 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooterBranding.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalFooterBranding.tsx @@ -19,7 +19,6 @@ */ import { Link, LinkHighlight } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { isOfficial } from '../../helpers/system'; export default function GlobalFooterBranding() { diff --git a/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx b/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx index 6684f2e5e7d..0c2b2a94c98 100644 --- a/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx +++ b/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx @@ -19,8 +19,8 @@ */ import { LinkStandalone } from '@sonarsource/echoes-react'; -import { ContentCell, Key, KeyboardHint, Modal, SubTitle, Table, TableRow } from 'design-system'; import * as React from 'react'; +import { ContentCell, Key, KeyboardHint, Modal, SubTitle, Table, TableRow } from '~design-system'; import { isInput } from '../../helpers/keyboardEventHelpers'; import { KeyboardKeys } from '../../helpers/keycodes'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/app/components/Landing.tsx b/server/sonar-web/src/main/js/app/components/Landing.tsx index 75e572dc7df..359906b6f42 100644 --- a/server/sonar-web/src/main/js/app/components/Landing.tsx +++ b/server/sonar-web/src/main/js/app/components/Landing.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Navigate, To } from 'react-router-dom'; import { getHomePageUrl } from '../../helpers/urls'; import { CurrentUser, isLoggedIn } from '../../types/users'; diff --git a/server/sonar-web/src/main/js/app/components/LicensePromptModal.tsx b/server/sonar-web/src/main/js/app/components/LicensePromptModal.tsx index b205bf441c0..59d6fd25324 100644 --- a/server/sonar-web/src/main/js/app/components/LicensePromptModal.tsx +++ b/server/sonar-web/src/main/js/app/components/LicensePromptModal.tsx @@ -19,9 +19,8 @@ */ import { Link } from '@sonarsource/echoes-react'; -import { Modal } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Modal } from '~design-system'; import { translate } from '../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/app/components/MigrationContainer.tsx b/server/sonar-web/src/main/js/app/components/MigrationContainer.tsx index 58271556dcb..9d58cb9ca6f 100644 --- a/server/sonar-web/src/main/js/app/components/MigrationContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/MigrationContainer.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Navigate, Outlet } from 'react-router-dom'; import { getSystemStatus } from '../../helpers/system'; diff --git a/server/sonar-web/src/main/js/app/components/NonAdminPagesContainer.tsx b/server/sonar-web/src/main/js/app/components/NonAdminPagesContainer.tsx index fec94ea941a..448a8531a54 100644 --- a/server/sonar-web/src/main/js/app/components/NonAdminPagesContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/NonAdminPagesContainer.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CenteredLayout, FlagMessage } from 'design-system'; + import * as React from 'react'; import { Outlet } from 'react-router-dom'; +import { CenteredLayout, FlagMessage } from '~design-system'; import { translate } from '../../helpers/l10n'; import { isApplication } from '../../types/component'; import { ComponentContext } from './componentContext/ComponentContext'; diff --git a/server/sonar-web/src/main/js/app/components/NotFound.tsx b/server/sonar-web/src/main/js/app/components/NotFound.tsx index 80559d2dd77..241722a5702 100644 --- a/server/sonar-web/src/main/js/app/components/NotFound.tsx +++ b/server/sonar-web/src/main/js/app/components/NotFound.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Card, CenteredLayout, Link, PageContentFontWrapper, Title } from 'design-system'; -import * as React from 'react'; + import { Helmet } from 'react-helmet-async'; +import { Card, CenteredLayout, Link, PageContentFontWrapper, Title } from '~design-system'; import { translate } from '../../helpers/l10n'; export default function NotFound() { diff --git a/server/sonar-web/src/main/js/app/components/PageTracker.tsx b/server/sonar-web/src/main/js/app/components/PageTracker.tsx index c7afecb7018..5439a51a66b 100644 --- a/server/sonar-web/src/main/js/app/components/PageTracker.tsx +++ b/server/sonar-web/src/main/js/app/components/PageTracker.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; diff --git a/server/sonar-web/src/main/js/app/components/PluginRiskConsent.tsx b/server/sonar-web/src/main/js/app/components/PluginRiskConsent.tsx index a94b983f60b..6b035ddbfd6 100644 --- a/server/sonar-web/src/main/js/app/components/PluginRiskConsent.tsx +++ b/server/sonar-web/src/main/js/app/components/PluginRiskConsent.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Card, CenteredLayout, Title } from 'design-system'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { Card, CenteredLayout, Title } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Router } from '~sonar-aligned/types/router'; import { setSimpleSettingValue } from '../../api/settings'; diff --git a/server/sonar-web/src/main/js/app/components/ProjectAdminContainer.tsx b/server/sonar-web/src/main/js/app/components/ProjectAdminContainer.tsx index 4c48662bcd6..87a8360d756 100644 --- a/server/sonar-web/src/main/js/app/components/ProjectAdminContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/ProjectAdminContainer.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { Outlet } from 'react-router-dom'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; diff --git a/server/sonar-web/src/main/js/app/components/RecentHistory.ts b/server/sonar-web/src/main/js/app/components/RecentHistory.ts index b01e67f8e8e..7dfae6ee209 100644 --- a/server/sonar-web/src/main/js/app/components/RecentHistory.ts +++ b/server/sonar-web/src/main/js/app/components/RecentHistory.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { get, remove, save } from '../../helpers/storage'; const RECENT_HISTORY = 'sonar_recent_history'; diff --git a/server/sonar-web/src/main/js/app/components/ResetPassword.tsx b/server/sonar-web/src/main/js/app/components/ResetPassword.tsx index 7e669fc20a0..abc30f16fb5 100644 --- a/server/sonar-web/src/main/js/app/components/ResetPassword.tsx +++ b/server/sonar-web/src/main/js/app/components/ResetPassword.tsx @@ -17,15 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { Helmet } from 'react-helmet-async'; import { FlagMessage, LargeCenteredLayout, PageContentFontWrapper, SubHeading, Title, -} from 'design-system'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; +} from '~design-system'; import ResetPasswordForm from '../../components/common/ResetPasswordForm'; import { whenLoggedIn } from '../../components/hoc/whenLoggedIn'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx b/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx index e1876f58752..8879c9c2453 100644 --- a/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { Outlet } from 'react-router-dom'; import GlobalFooter from './GlobalFooter'; diff --git a/server/sonar-web/src/main/js/app/components/SimpleSessionsContainer.tsx b/server/sonar-web/src/main/js/app/components/SimpleSessionsContainer.tsx index 9509e39d75a..98ccad33108 100644 --- a/server/sonar-web/src/main/js/app/components/SimpleSessionsContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/SimpleSessionsContainer.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Outlet } from 'react-router-dom'; import GlobalFooter from './GlobalFooter'; import PageTracker from './PageTracker'; diff --git a/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx b/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx index cbe15716b5e..cce2c4419d6 100644 --- a/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx +++ b/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx @@ -19,6 +19,9 @@ */ import { Button, ButtonVariety, IconCheck, LinkStandalone } from '@sonarsource/echoes-react'; +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; +import { useSearchParams } from 'react-router-dom'; import { Card, CardSeparator, @@ -28,10 +31,7 @@ import { Note, OrderedList, Title, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; -import { useSearchParams } from 'react-router-dom'; +} from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { whenLoggedIn } from '../../components/hoc/whenLoggedIn'; import { translate, translateWithParameters } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/app/components/StartupModal.tsx b/server/sonar-web/src/main/js/app/components/StartupModal.tsx index ac2f66081bf..cf318eec3f2 100644 --- a/server/sonar-web/src/main/js/app/components/StartupModal.tsx +++ b/server/sonar-web/src/main/js/app/components/StartupModal.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { differenceInDays } from 'date-fns'; import * as React from 'react'; import { showLicense } from '../../api/editions'; diff --git a/server/sonar-web/src/main/js/app/components/SystemAnnouncement.tsx b/server/sonar-web/src/main/js/app/components/SystemAnnouncement.tsx index 98fafd9d601..63726204e27 100644 --- a/server/sonar-web/src/main/js/app/components/SystemAnnouncement.tsx +++ b/server/sonar-web/src/main/js/app/components/SystemAnnouncement.tsx @@ -19,9 +19,9 @@ */ import styled from '@emotion/styled'; -import { FlagWarningIcon, themeBorder, themeColor } from 'design-system'; import { keyBy, throttle } from 'lodash'; import * as React from 'react'; +import { FlagWarningIcon, themeBorder, themeColor } from '~design-system'; import { getValues } from '../../api/settings'; import { Feature } from '../../types/features'; import { GlobalSettingKeys } from '../../types/settings'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx index eca5c6fba67..54ed12766d7 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/AdminContainer-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import * as React from 'react'; import { Route, useOutletContext } from 'react-router-dom'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/App-test.tsx index 110b311ad23..6bf918d255b 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/App-test.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { mockAppState } from '../../../helpers/testMocks'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import { App } from '../App'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/CalculationChangeMessage-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/CalculationChangeMessage-test.tsx index fa213e0394c..6d0f8cfc6b8 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/CalculationChangeMessage-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/CalculationChangeMessage-test.tsx @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; import { Outlet, Route } from 'react-router-dom'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx index 5facef0fe93..6dc78f333ea 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React, { useContext } from 'react'; +import { useContext } from 'react'; import { Route } from 'react-router-dom'; import * as withRouter from '~sonar-aligned/components/hoc/withRouter'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainerNotFound-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainerNotFound-test.tsx index 7ba42ae3aef..a29e1904890 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainerNotFound-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/ComponentContainerNotFound-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import ComponentContainerNotFound from '../ComponentContainerNotFound'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/DocumentationRedirect-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/DocumentationRedirect-test.tsx index d037784c4fa..7548030891f 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/DocumentationRedirect-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/DocumentationRedirect-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { Route } from 'react-router-dom'; import { mockAppState } from '../../../helpers/testMocks'; import { renderAppRoutes } from '../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/FormattingHelp-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/FormattingHelp-test.tsx index a12c4435ef7..0d0193fda67 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/FormattingHelp-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/FormattingHelp-test.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { byRole } from '~sonar-aligned/helpers/testSelector'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import FormattingHelp from '../FormattingHelp'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx index af63bda5f0b..70e84d95c97 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx @@ -19,7 +19,6 @@ */ import { addDays, subDays } from 'date-fns'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import SystemServiceMock from '../../../api/mocks/SystemServiceMock'; import { mockAppState } from '../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/KeyboardShortcutsModal-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/KeyboardShortcutsModal-test.tsx index a70df884cf8..6a64ce4ca46 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/KeyboardShortcutsModal-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/KeyboardShortcutsModal-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import KeyboardShortcutsModal from '../KeyboardShortcutsModal'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/Landing-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/Landing-test.tsx index 63c6350abc8..5cb372177db 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/Landing-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/Landing-test.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { byText } from '~sonar-aligned/helpers/testSelector'; import { mockCurrentUser, mockLoggedInUser } from '../../../helpers/testMocks'; import { renderApp } from '../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/MigrationContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/MigrationContainer-test.tsx index d9266f10e24..44197a385c7 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/MigrationContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/MigrationContainer-test.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Route } from 'react-router-dom'; import { byText } from '~sonar-aligned/helpers/testSelector'; import { getSystemStatus } from '../../../helpers/system'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/NonAdminPagesContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/NonAdminPagesContainer-test.tsx index 77664e5beb1..4e4e73d12ba 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/NonAdminPagesContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/NonAdminPagesContainer-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; -import * as React from 'react'; import { MemoryRouter, Route, Routes } from 'react-router-dom'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { mockComponent } from '../../../helpers/mocks/component'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/PageTracker-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/PageTracker-test.tsx index 4c5325159c2..3dd4ff44f6d 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/PageTracker-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/PageTracker-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import * as React from 'react'; import { Link } from 'react-router-dom'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/PluginRiskConsent-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/PluginRiskConsent-test.tsx index dcf81c8b8d8..e2a31181693 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/PluginRiskConsent-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/PluginRiskConsent-test.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; +import { setImmediate } from 'timers'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import { setSimpleSettingValue } from '../../../api/settings'; import { mockLoggedInUser, mockRouter } from '../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/ProjectAdminContainer-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/ProjectAdminContainer-test.tsx index 048d615b186..4bbfd713e60 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/ProjectAdminContainer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/ProjectAdminContainer-test.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Route } from 'react-router-dom'; import { byText } from '~sonar-aligned/helpers/testSelector'; import handleRequiredAuthorization from '../../../app/utils/handleRequiredAuthorization'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/RecentHistory-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/RecentHistory-test.tsx index a6a79a9abd9..a9b491812f7 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/RecentHistory-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/RecentHistory-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier } from '~sonar-aligned/types/component'; import { get, remove, save } from '../../../helpers/storage'; import RecentHistory, { History } from '../RecentHistory'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/ResetPassword-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/ResetPassword-test.tsx index 622c16562a7..c4697b5cb77 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/ResetPassword-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/ResetPassword-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byLabelText, byRole } from '~sonar-aligned/helpers/testSelector'; import { mockLoggedInUser } from '../../../helpers/testMocks'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/SonarLintConnection-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/SonarLintConnection-test.tsx index 1914cdf185f..09466e24fdb 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/SonarLintConnection-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/SonarLintConnection-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import UserTokensMock from '../../../api/mocks/UserTokensMock'; import handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication'; import { sendUserToken } from '../../../helpers/sonarlint'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx index cbfc693f4fb..0fe62d2a16c 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { showLicense } from '../../../api/editions'; import { save } from '../../../helpers/storage'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/SystemAnnouncement-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/SystemAnnouncement-test.tsx index a79f529c34c..5fd8f62c631 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/SystemAnnouncement-test.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/SystemAnnouncement-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { fireEvent, screen } from '@testing-library/react'; -import * as React from 'react'; import { getValues } from '../../../api/settings'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import { Feature } from '../../../types/features'; diff --git a/server/sonar-web/src/main/js/app/components/__tests__/UpdateNotification-it.tsx b/server/sonar-web/src/main/js/app/components/__tests__/UpdateNotification-it.tsx index 95edfabe6fa..9082fd8791f 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/UpdateNotification-it.tsx +++ b/server/sonar-web/src/main/js/app/components/__tests__/UpdateNotification-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import { addDays, formatISO, subDays } from 'date-fns'; -import * as React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import { getSystemUpgrades } from '../../../api/system'; import { UpdateUseCase } from '../../../components/upgrade/utils'; diff --git a/server/sonar-web/src/main/js/app/components/admin/StickyTable.tsx b/server/sonar-web/src/main/js/app/components/admin/StickyTable.tsx index 8110023b26e..69bb9af301d 100644 --- a/server/sonar-web/src/main/js/app/components/admin/StickyTable.tsx +++ b/server/sonar-web/src/main/js/app/components/admin/StickyTable.tsx @@ -19,7 +19,7 @@ */ import styled from '@emotion/styled'; -import { LAYOUT_GLOBAL_NAV_HEIGHT, Table, themeColor } from 'design-system'; +import { LAYOUT_GLOBAL_NAV_HEIGHT, Table, themeColor } from '~design-system'; export const LAYOUT_ADMIN_NAV_HEIGHT = 92; diff --git a/server/sonar-web/src/main/js/app/components/admin/withAdminPagesOutletContext.tsx b/server/sonar-web/src/main/js/app/components/admin/withAdminPagesOutletContext.tsx index 2da6e8fce6b..86b1d0e0336 100644 --- a/server/sonar-web/src/main/js/app/components/admin/withAdminPagesOutletContext.tsx +++ b/server/sonar-web/src/main/js/app/components/admin/withAdminPagesOutletContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { useOutletContext } from 'react-router-dom'; import { AdminPagesContext } from '../../../types/admin'; diff --git a/server/sonar-web/src/main/js/app/components/app-state/AppStateContextProvider.tsx b/server/sonar-web/src/main/js/app/components/app-state/AppStateContextProvider.tsx index f8514e23705..fb245c7d3c6 100644 --- a/server/sonar-web/src/main/js/app/components/app-state/AppStateContextProvider.tsx +++ b/server/sonar-web/src/main/js/app/components/app-state/AppStateContextProvider.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { AppState } from '../../../types/appstate'; import { AppStateContext } from './AppStateContext'; diff --git a/server/sonar-web/src/main/js/app/components/app-state/withAppStateContext.tsx b/server/sonar-web/src/main/js/app/components/app-state/withAppStateContext.tsx index 811c6b249b0..5abc2557fe5 100644 --- a/server/sonar-web/src/main/js/app/components/app-state/withAppStateContext.tsx +++ b/server/sonar-web/src/main/js/app/components/app-state/withAppStateContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; import { AppState } from '../../../types/appstate'; diff --git a/server/sonar-web/src/main/js/app/components/available-features/AvailableFeaturesContext.tsx b/server/sonar-web/src/main/js/app/components/available-features/AvailableFeaturesContext.tsx index c723f4fb451..e8851950500 100644 --- a/server/sonar-web/src/main/js/app/components/available-features/AvailableFeaturesContext.tsx +++ b/server/sonar-web/src/main/js/app/components/available-features/AvailableFeaturesContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { Feature } from '../../../types/features'; diff --git a/server/sonar-web/src/main/js/app/components/available-features/withAvailableFeatures.tsx b/server/sonar-web/src/main/js/app/components/available-features/withAvailableFeatures.tsx index 36355f33366..d8dc006a188 100644 --- a/server/sonar-web/src/main/js/app/components/available-features/withAvailableFeatures.tsx +++ b/server/sonar-web/src/main/js/app/components/available-features/withAvailableFeatures.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; import { Feature } from '../../../types/features'; diff --git a/server/sonar-web/src/main/js/app/components/calculation-notification/CalculationChangeMessage.tsx b/server/sonar-web/src/main/js/app/components/calculation-notification/CalculationChangeMessage.tsx index 14b082b1235..aaee80cca3c 100644 --- a/server/sonar-web/src/main/js/app/components/calculation-notification/CalculationChangeMessage.tsx +++ b/server/sonar-web/src/main/js/app/components/calculation-notification/CalculationChangeMessage.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { FormattedMessage } from 'react-intl'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/app/components/componentContext/ComponentContext.ts b/server/sonar-web/src/main/js/app/components/componentContext/ComponentContext.ts index 1c188bc991c..61bccd51adf 100644 --- a/server/sonar-web/src/main/js/app/components/componentContext/ComponentContext.ts +++ b/server/sonar-web/src/main/js/app/components/componentContext/ComponentContext.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { noop } from 'lodash'; import * as React from 'react'; import { ComponentContextShape } from '../../../types/component'; diff --git a/server/sonar-web/src/main/js/app/components/componentContext/withComponentContext.tsx b/server/sonar-web/src/main/js/app/components/componentContext/withComponentContext.tsx index 9086a57de6f..2301608b7af 100644 --- a/server/sonar-web/src/main/js/app/components/componentContext/withComponentContext.tsx +++ b/server/sonar-web/src/main/js/app/components/componentContext/withComponentContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/app/components/current-user/CurrentUserContext.ts b/server/sonar-web/src/main/js/app/components/current-user/CurrentUserContext.ts index 042369cd213..74191488f24 100644 --- a/server/sonar-web/src/main/js/app/components/current-user/CurrentUserContext.ts +++ b/server/sonar-web/src/main/js/app/components/current-user/CurrentUserContext.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { noop } from 'lodash'; import * as React from 'react'; import { useContext } from 'react'; diff --git a/server/sonar-web/src/main/js/app/components/current-user/CurrentUserContextProvider.tsx b/server/sonar-web/src/main/js/app/components/current-user/CurrentUserContextProvider.tsx index ff4edfe7c79..2cb559b224a 100644 --- a/server/sonar-web/src/main/js/app/components/current-user/CurrentUserContextProvider.tsx +++ b/server/sonar-web/src/main/js/app/components/current-user/CurrentUserContextProvider.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { CurrentUser, HomePage, NoticeType } from '../../../types/users'; import { CurrentUserContext } from './CurrentUserContext'; diff --git a/server/sonar-web/src/main/js/app/components/current-user/withCurrentUserContext.tsx b/server/sonar-web/src/main/js/app/components/current-user/withCurrentUserContext.tsx index f5643d57cfd..e052e819639 100644 --- a/server/sonar-web/src/main/js/app/components/current-user/withCurrentUserContext.tsx +++ b/server/sonar-web/src/main/js/app/components/current-user/withCurrentUserContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; import { CurrentUserContext, CurrentUserContextInterface } from './CurrentUserContext'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/CreateApplicationForm.tsx b/server/sonar-web/src/main/js/app/components/extensions/CreateApplicationForm.tsx index bc7a4705069..cc336ae3ea3 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/CreateApplicationForm.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/CreateApplicationForm.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { ButtonSecondary, FormField, @@ -24,8 +26,7 @@ import { InputTextArea, Modal, RadioButton, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; import { createApplication } from '../../../api/application'; import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx b/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx index 99ecd9893e4..c1da696ae96 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/Extension.tsx @@ -17,13 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { withTheme } from '@emotion/react'; import { QueryClient } from '@tanstack/react-query'; -import { addGlobalErrorMessage, Theme } from 'design-system'; import { isEqual } from 'lodash'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { injectIntl, WrappedComponentProps } from 'react-intl'; +import { addGlobalErrorMessage, Theme } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location, Router } from '~sonar-aligned/types/router'; import { getExtensionStart } from '../../../helpers/extensions'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/GlobalAdminPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/GlobalAdminPageExtension.tsx index ed6214bc608..2e515670d2d 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/GlobalAdminPageExtension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/GlobalAdminPageExtension.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useOutletContext, useParams } from 'react-router-dom'; import { AdminPagesContext } from '../../../types/admin'; import NotFound from '../NotFound'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/GlobalPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/GlobalPageExtension.tsx index 1fcedaa91b5..ee5f63a37c9 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/GlobalPageExtension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/GlobalPageExtension.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useParams } from 'react-router-dom'; import { AppState } from '../../../types/appstate'; import NotFound from '../NotFound'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/PortfolioPage.tsx b/server/sonar-web/src/main/js/app/components/extensions/PortfolioPage.tsx index 27cc12f8ace..1fec68bb9b9 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/PortfolioPage.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/PortfolioPage.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import ProjectPageExtension from './ProjectPageExtension'; export default function PortfolioPage() { diff --git a/server/sonar-web/src/main/js/app/components/extensions/PortfoliosPage.tsx b/server/sonar-web/src/main/js/app/components/extensions/PortfoliosPage.tsx index 36640a9b5e5..0503ae98ab1 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/PortfoliosPage.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/PortfoliosPage.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import GlobalPageExtension from './GlobalPageExtension'; export default function PortfoliosPage() { diff --git a/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx index b25d4659cbc..f052ffba02c 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { useParams } from 'react-router-dom'; import { useRefreshBranches } from '../../../queries/branch'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/ProjectPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/ProjectPageExtension.tsx index c4d6598aef6..b290cf34b03 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/ProjectPageExtension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/ProjectPageExtension.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { useParams } from 'react-router-dom'; import { useCurrentBranchQuery } from '../../../queries/branch'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx b/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx index eaf06a5ab20..1f5b09b60f7 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx @@ -20,9 +20,9 @@ import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { addGlobalErrorMessage, lightTheme } from 'design-system'; -import * as React from 'react'; import { IntlShape } from 'react-intl'; +import { setImmediate } from 'timers'; +import { addGlobalErrorMessage, lightTheme } from '~design-system'; import { getEnhancedWindow } from '../../../../helpers/browser'; import { installExtensionsHandler } from '../../../../helpers/extensionsHandler'; import { @@ -35,8 +35,8 @@ import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { ExtensionStartMethodParameter } from '../../../../types/extension'; import Extension, { ExtensionProps } from '../Extension'; -jest.mock('design-system', () => ({ - ...jest.requireActual('design-system'), +jest.mock('~design-system', () => ({ + ...jest.requireActual('~design-system'), addGlobalErrorMessage: jest.fn(), })); diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalAdminPageExtension-test.tsx b/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalAdminPageExtension-test.tsx index 8ce78ba24ea..62bbb5f383c 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalAdminPageExtension-test.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalAdminPageExtension-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { Outlet, Route } from 'react-router-dom'; import { renderAppRoutes } from '../../../../helpers/testReactTestingUtils'; import { AdminPagesContext } from '../../../../types/admin'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalPageExtension-test.tsx b/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalPageExtension-test.tsx index c7fa6572f36..52eb9774ab7 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalPageExtension-test.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalPageExtension-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { mockAppState } from '../../../../helpers/testMocks'; import { renderApp } from '../../../../helpers/testReactTestingUtils'; import { Extension } from '../../../../types/types'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectAdminPageExtension-test.tsx b/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectAdminPageExtension-test.tsx index 7822f93f5c1..c94f760d7d1 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectAdminPageExtension-test.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectAdminPageExtension-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render, screen } from '@testing-library/react'; -import * as React from 'react'; import { HelmetProvider } from 'react-helmet-async'; import { IntlProvider } from 'react-intl'; import { MemoryRouter, Route, Routes } from 'react-router-dom'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectPageExtension-test.tsx b/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectPageExtension-test.tsx index 66b54eddd59..bf2165c9532 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectPageExtension-test.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectPageExtension-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render, screen, waitFor } from '@testing-library/react'; -import * as React from 'react'; import { HelmetProvider } from 'react-helmet-async'; import { IntlProvider } from 'react-intl'; import { MemoryRouter, Route, Routes } from 'react-router-dom'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/exposeLibraries-test.ts b/server/sonar-web/src/main/js/app/components/extensions/__tests__/exposeLibraries-test.ts index e381ad9b1f8..e38b89f466e 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/exposeLibraries-test.ts +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/exposeLibraries-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import exposeLibraries from '../exposeLibraries'; it('should register expected libraries to the window object', () => { diff --git a/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts b/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts index 8c1830be553..d831f918c36 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts +++ b/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { addGlobalSuccessMessage } from 'design-system'; +import { addGlobalSuccessMessage } from '~design-system'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getJSON } from '~sonar-aligned/helpers/request'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearch.tsx b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearch.tsx index 99969f28c53..5d3c988f100 100644 --- a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearch.tsx +++ b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearch.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, ButtonVariety, IconSearch } from '@sonarsource/echoes-react'; -import { DropdownMenu, InputSearch, Popup, PopupZLevel, TextMuted } from 'design-system'; import { debounce, isEmpty, uniqBy } from 'lodash'; import * as React from 'react'; +import { DropdownMenu, InputSearch, Popup, PopupZLevel, TextMuted } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { Router } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResult.tsx b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResult.tsx index 55de63a2874..8de9e756d0b 100644 --- a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResult.tsx +++ b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResult.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { ClockIcon, ItemLink, StarFillIcon, TextBold, TextMuted } from 'design-system'; import * as React from 'react'; +import { ClockIcon, ItemLink, StarFillIcon, TextBold, TextMuted } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { getComponentOverviewUrl } from '../../../helpers/urls'; import { ComponentResult } from './utils'; diff --git a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx index 62bf4d1a0b4..6714b6a437e 100644 --- a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx +++ b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ItemDivider, ItemHeader } from 'design-system'; + import * as React from 'react'; +import { ItemDivider, ItemHeader } from '~design-system'; import { translate } from '../../../helpers/l10n'; import GlobalSearchShowMore from './GlobalSearchShowMore'; import { ComponentResult, More, Results, sortQualifiers } from './utils'; diff --git a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchShowMore.tsx b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchShowMore.tsx index 42417a21f78..af0e86c8514 100644 --- a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchShowMore.tsx +++ b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchShowMore.tsx @@ -20,8 +20,8 @@ import { Spinner } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { ItemButton } from 'design-system'; import * as React from 'react'; +import { ItemButton } from '~design-system'; import { translate } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/app/components/global-search/__tests__/GlobalSearch-it.tsx b/server/sonar-web/src/main/js/app/components/global-search/__tests__/GlobalSearch-it.tsx index 7c9f244d28e..37a2168210b 100644 --- a/server/sonar-web/src/main/js/app/components/global-search/__tests__/GlobalSearch-it.tsx +++ b/server/sonar-web/src/main/js/app/components/global-search/__tests__/GlobalSearch-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { getSuggestions } from '../../../../api/components'; import { mockRouter } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/app/components/global-search/utils.ts b/server/sonar-web/src/main/js/app/components/global-search/utils.ts index b14c5a80025..09df62cee9c 100644 --- a/server/sonar-web/src/main/js/app/components/global-search/utils.ts +++ b/server/sonar-web/src/main/js/app/components/global-search/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { sortBy } from 'lodash'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/app/components/indexation/IndexationContext.ts b/server/sonar-web/src/main/js/app/components/indexation/IndexationContext.ts index 330168eb860..e86ab2ea402 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/IndexationContext.ts +++ b/server/sonar-web/src/main/js/app/components/indexation/IndexationContext.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { createContext } from 'react'; import { IndexationContextInterface } from '../../../types/indexation'; diff --git a/server/sonar-web/src/main/js/app/components/indexation/IndexationContextProvider.tsx b/server/sonar-web/src/main/js/app/components/indexation/IndexationContextProvider.tsx index af9b6263315..4160e67faa9 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/IndexationContextProvider.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/IndexationContextProvider.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable react/no-unused-state */ import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/app/components/indexation/IndexationNotification.tsx b/server/sonar-web/src/main/js/app/components/indexation/IndexationNotification.tsx index 665c9f333e9..84444f6878b 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/IndexationNotification.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/IndexationNotification.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import withIndexationContext, { WithIndexationContextProps, diff --git a/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationHelper.ts b/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationHelper.ts index 06bcb5fabf3..41211329fd7 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationHelper.ts +++ b/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationHelper.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getIndexationStatus } from '../../../api/ce'; import { get, remove, save } from '../../../helpers/storage'; import { IndexationStatus } from '../../../types/indexation'; diff --git a/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx b/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx index fca28a707dd..c1a7473aa79 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx @@ -20,6 +20,7 @@ /* eslint-disable react/no-unused-prop-types */ import styled from '@emotion/styled'; +import { FormattedMessage } from 'react-intl'; import { FlagErrorIcon, FlagSuccessIcon, @@ -29,9 +30,7 @@ import { ThemeColors, themeBorder, themeColor, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/app/components/indexation/PageUnavailableDueToIndexation.tsx b/server/sonar-web/src/main/js/app/components/indexation/PageUnavailableDueToIndexation.tsx index c31b3f3d2f4..d29d1223ec4 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/PageUnavailableDueToIndexation.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/PageUnavailableDueToIndexation.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CenteredLayout, FlagMessage, Link } from 'design-system'; + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { CenteredLayout, FlagMessage, Link } from '~design-system'; import withIndexationContext, { WithIndexationContextProps, } from '../../../components/hoc/withIndexationContext'; diff --git a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationContextProvider-test.tsx b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationContextProvider-test.tsx index a5053335212..13b7b53b5ac 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationContextProvider-test.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationContextProvider-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { waitFor } from '@testing-library/react'; -import * as React from 'react'; import { useContext } from 'react'; import { byText } from '~sonar-aligned/helpers/testSelector'; import { mockAppState } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotification-test.tsx b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotification-test.tsx index bca696b1e32..07cb968d520 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotification-test.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotification-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { act } from '@testing-library/react'; -import * as React from 'react'; import { byText } from '~sonar-aligned/helpers/testSelector'; import { mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotificationHelper-test.tsx b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotificationHelper-test.tsx index 0a95af84112..ee35ded4da1 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotificationHelper-test.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotificationHelper-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { setImmediate } from 'timers'; import { getIndexationStatus } from '../../../../api/ce'; import { get, remove, save } from '../../../../helpers/storage'; diff --git a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotificationRenderer-test.tsx b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotificationRenderer-test.tsx index a9f4e0ca1e1..b9c958ec7ab 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotificationRenderer-test.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotificationRenderer-test.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { IndexationNotificationType } from '../../../../types/indexation'; diff --git a/server/sonar-web/src/main/js/app/components/indexation/__tests__/PageUnavailableDueToIndexation-test.tsx b/server/sonar-web/src/main/js/app/components/indexation/__tests__/PageUnavailableDueToIndexation-test.tsx index e62a141b79e..ecafb8f6ce9 100644 --- a/server/sonar-web/src/main/js/app/components/indexation/__tests__/PageUnavailableDueToIndexation-test.tsx +++ b/server/sonar-web/src/main/js/app/components/indexation/__tests__/PageUnavailableDueToIndexation-test.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { byRole } from '~sonar-aligned/helpers/testSelector'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { PageUnavailableDueToIndexation } from '../PageUnavailableDueToIndexation'; diff --git a/server/sonar-web/src/main/js/app/components/languages/LanguagesContext.ts b/server/sonar-web/src/main/js/app/components/languages/LanguagesContext.ts index 8940750394c..e54aceab103 100644 --- a/server/sonar-web/src/main/js/app/components/languages/LanguagesContext.ts +++ b/server/sonar-web/src/main/js/app/components/languages/LanguagesContext.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { Languages } from '../../../types/languages'; diff --git a/server/sonar-web/src/main/js/app/components/languages/LanguagesContextProvider.tsx b/server/sonar-web/src/main/js/app/components/languages/LanguagesContextProvider.tsx index 67459105fea..c70f8b9929b 100644 --- a/server/sonar-web/src/main/js/app/components/languages/LanguagesContextProvider.tsx +++ b/server/sonar-web/src/main/js/app/components/languages/LanguagesContextProvider.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { keyBy } from 'lodash'; import * as React from 'react'; import { getLanguages } from '../../../api/languages'; diff --git a/server/sonar-web/src/main/js/app/components/languages/__tests__/LanguagesContextProvider-test.tsx b/server/sonar-web/src/main/js/app/components/languages/__tests__/LanguagesContextProvider-test.tsx index b8b93105f48..ab00891d2b3 100644 --- a/server/sonar-web/src/main/js/app/components/languages/__tests__/LanguagesContextProvider-test.tsx +++ b/server/sonar-web/src/main/js/app/components/languages/__tests__/LanguagesContextProvider-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import { getLanguages } from '../../../../api/languages'; diff --git a/server/sonar-web/src/main/js/app/components/languages/withLanguagesContext.tsx b/server/sonar-web/src/main/js/app/components/languages/withLanguagesContext.tsx index 26ab1594769..11572b648d7 100644 --- a/server/sonar-web/src/main/js/app/components/languages/withLanguagesContext.tsx +++ b/server/sonar-web/src/main/js/app/components/languages/withLanguagesContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; import { Languages } from '../../../types/languages'; diff --git a/server/sonar-web/src/main/js/app/components/metrics/MetricsContext.tsx b/server/sonar-web/src/main/js/app/components/metrics/MetricsContext.tsx index 8aaea20cddb..0e3d905282d 100644 --- a/server/sonar-web/src/main/js/app/components/metrics/MetricsContext.tsx +++ b/server/sonar-web/src/main/js/app/components/metrics/MetricsContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { Dict, Metric } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/app/components/metrics/MetricsContextProvider.tsx b/server/sonar-web/src/main/js/app/components/metrics/MetricsContextProvider.tsx index ccb116a36f0..88223042e43 100644 --- a/server/sonar-web/src/main/js/app/components/metrics/MetricsContextProvider.tsx +++ b/server/sonar-web/src/main/js/app/components/metrics/MetricsContextProvider.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { keyBy } from 'lodash'; import * as React from 'react'; import { getAllMetrics } from '../../../api/metrics'; diff --git a/server/sonar-web/src/main/js/app/components/metrics/RatingComponent.tsx b/server/sonar-web/src/main/js/app/components/metrics/RatingComponent.tsx index 50714c4d1a1..45ee1d1e85a 100644 --- a/server/sonar-web/src/main/js/app/components/metrics/RatingComponent.tsx +++ b/server/sonar-web/src/main/js/app/components/metrics/RatingComponent.tsx @@ -19,8 +19,8 @@ */ import { Spinner, Tooltip } from '@sonarsource/echoes-react'; -import { MetricsRatingBadge, RatingEnum } from 'design-system'; import * as React from 'react'; +import { MetricsRatingBadge, RatingEnum } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { getLeakValue } from '../../../components/measure/utils'; diff --git a/server/sonar-web/src/main/js/app/components/metrics/__tests__/MetricsContextProvider-test.tsx b/server/sonar-web/src/main/js/app/components/metrics/__tests__/MetricsContextProvider-test.tsx index 9e2ced6baff..d61d2b37ab4 100644 --- a/server/sonar-web/src/main/js/app/components/metrics/__tests__/MetricsContextProvider-test.tsx +++ b/server/sonar-web/src/main/js/app/components/metrics/__tests__/MetricsContextProvider-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/app/components/metrics/withMetricsContext.tsx b/server/sonar-web/src/main/js/app/components/metrics/withMetricsContext.tsx index d2a502d4ce3..a0c303db260 100644 --- a/server/sonar-web/src/main/js/app/components/metrics/withMetricsContext.tsx +++ b/server/sonar-web/src/main/js/app/components/metrics/withMetricsContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; import { Dict, Metric } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx index 29c0ecc681d..35e1e25dfa7 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TopBar } from 'design-system'; + import * as React from 'react'; +import { TopBar } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import NCDAutoUpdateMessage from '../../../../components/new-code-definition/NCDAutoUpdateMessage'; import { getBranchLikeDisplayName } from '../../../../helpers/branch-like'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavProjectBindingErrorNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavProjectBindingErrorNotif.tsx index bcc5b4834a4..3d344003c62 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavProjectBindingErrorNotif.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavProjectBindingErrorNotif.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { FlagWarningIcon, Link, themeBorder, themeColor } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagWarningIcon, Link, themeBorder, themeColor } from '~design-system'; import { PULL_REQUEST_DECORATION_BINDING_CATEGORY } from '../../../../apps/settings/constants'; import { translate } from '../../../../helpers/l10n'; import { getProjectSettingsUrl } from '../../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/Header.tsx b/server/sonar-web/src/main/js/app/components/nav/component/Header.tsx index 896976a7841..f2e609e7688 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/Header.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/Header.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { Component } from '../../../../types/types'; import { CurrentUser } from '../../../../types/users'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx index 092f2dd6f57..8e836e52c47 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx @@ -19,8 +19,7 @@ */ import { DropdownMenu } from '@sonarsource/echoes-react'; -import { DisabledTabLink, NavBarTabLink, NavBarTabs } from 'design-system'; -import * as React from 'react'; +import { DisabledTabLink, NavBarTabLink, NavBarTabs } from '~design-system'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import { getBranchLikeQuery, isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx index d302a4e650f..96deda8942a 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock'; import BranchesServiceMock from '../../../../../api/mocks/BranchesServiceMock'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavProjectBindingErrorNotif-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavProjectBindingErrorNotif-test.tsx index f0f04232ce4..6527484896a 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavProjectBindingErrorNotif-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavProjectBindingErrorNotif-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { mockComponent } from '../../../../../helpers/mocks/component'; import { renderComponent } from '../../../../../helpers/testReactTestingUtils'; import ComponentNavProjectBindingErrorNotif, { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Header-test.tsx index 8ae39c39aa9..7d7000073c4 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Header-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock'; import BranchesServiceMock from '../../../../../api/mocks/BranchesServiceMock'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Menu-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Menu-test.tsx index a8b1519b245..3d5e6505de4 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Menu-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/Menu-test.tsx @@ -20,7 +20,6 @@ import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import BranchesServiceMock from '../../../../../api/mocks/BranchesServiceMock'; import { mockComponent } from '../../../../../helpers/mocks/component'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/utils-test.ts b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/utils-test.ts index 2d1f0813825..9c670b03c8c 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier } from '~sonar-aligned/types/component'; import { mockBranch } from '../../../../../helpers/mocks/branch-like'; import { mockComponent } from '../../../../../helpers/mocks/component'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx index ca84fc527de..3f72585ddc7 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx @@ -19,8 +19,7 @@ */ import { Link } from '@sonarsource/echoes-react'; -import { HelperHintIcon } from 'design-system'; -import React from 'react'; +import { HelperHintIcon } from '~design-system'; import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { DocLink } from '../../../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx index 86f2fcf9d8a..0b5480e49fa 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Button } from '@sonarsource/echoes-react'; -import { Popup, PopupPlacement, PopupZLevel } from 'design-system'; import * as React from 'react'; +import { Popup, PopupPlacement, PopupZLevel } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import EscKeydownHandler from '../../../../../components/controls/EscKeydownHandler'; import FocusOutHandler from '../../../../../components/controls/FocusOutHandler'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLike.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLike.tsx index d154102a747..bedbc684831 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLike.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLike.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ChevronDownIcon, TextMuted } from 'design-system'; + import * as React from 'react'; +import { ChevronDownIcon, TextMuted } from '~design-system'; import BranchLikeIcon from '../../../../../components/icon-mappers/BranchLikeIcon'; import { getBranchLikeDisplayName } from '../../../../../helpers/branch-like'; import { BranchLike, BranchStatusData } from '../../../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation.tsx index def592a6601..d738326b376 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate, translateWithParameters } from '../../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx index 9dca663b31c..7faaff1de44 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DropdownMenu, InputSearch, ItemDivider, Link } from 'design-system'; + import * as React from 'react'; +import { DropdownMenu, InputSearch, ItemDivider, Link } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { isBranch, isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItem.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItem.tsx index c822b99a1cc..f8abb5e6441 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItem.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItem.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { Badge, ItemButton, TextBold, TextMuted } from 'design-system'; import * as React from 'react'; +import { Badge, ItemButton, TextBold, TextMuted } from '~design-system'; import { isMainBranch } from '~sonar-aligned/helpers/branch-like'; import BranchLikeIcon from '../../../../../components/icon-mappers/BranchLikeIcon'; import { getBranchLikeDisplayName } from '../../../../../helpers/branch-like'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItemList.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItemList.tsx index 11c787cfa5e..5b84a3ccf6a 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItemList.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItemList.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HelperHintIcon, ItemDivider, ItemHeader } from 'design-system'; + import * as React from 'react'; +import { HelperHintIcon, ItemDivider, ItemHeader } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { getBranchLikeKey, isSameBranchLike } from '../../../../../helpers/branch-like'; import { translate } from '../../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/PRLink.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/PRLink.tsx index a55d7576d50..1325cc7c632 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/PRLink.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/PRLink.tsx @@ -19,7 +19,6 @@ */ import { LinkStandalone } from '@sonarsource/echoes-react'; -import React from 'react'; import { Image } from '~sonar-aligned/components/common/Image'; import { isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { translate, translateWithParameters } from '../../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/QualityGateStatus.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/QualityGateStatus.tsx index f68bd5d8f6d..ca8baf5c313 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/QualityGateStatus.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/QualityGateStatus.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { QualityGateIndicator } from 'design-system'; -import React from 'react'; +import { QualityGateIndicator } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { BranchLike } from '../../../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/utils.ts b/server/sonar-web/src/main/js/app/components/nav/component/utils.ts index 5fdf10e0c16..bbbd1e3890e 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/utils.ts +++ b/server/sonar-web/src/main/js/app/components/nav/component/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isBranch } from '~sonar-aligned/helpers/branch-like'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { BranchLike } from '../../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx index f14fafb3c57..4bcbfd95288 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import EmbedDocsPopupHelper from '../../../../components/embed-docs-modal/EmbedDocsPopupHelper'; import { CurrentUser } from '../../../../types/users'; import withCurrentUserContext from '../../current-user/withCurrentUserContext'; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx index 305d5880c26..86bbba863cf 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { MainMenu, MainMenuItem } from 'design-system'; import * as React from 'react'; import { NavLink } from 'react-router-dom'; +import { MainMenu, MainMenuItem } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { isMySet } from '../../../../apps/issues/utils'; import Link from '../../../../components/common/Link'; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMore.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMore.tsx index ab4a4150bd4..22ce2083a08 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMore.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMore.tsx @@ -19,8 +19,7 @@ */ import { DropdownMenu, DropdownMenuAlign } from '@sonarsource/echoes-react'; -import { MainMenuItem } from 'design-system'; -import * as React from 'react'; +import { MainMenuItem } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { AppState } from '../../../../types/appstate'; import { Extension } from '../../../../types/types'; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx index b4919242746..b9498eb89f1 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, DropdownMenu, DropdownMenuAlign, Tooltip } from '@sonarsource/echoes-react'; -import { Avatar, BareButton } from 'design-system'; import * as React from 'react'; +import { Avatar, BareButton } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { getBaseUrl } from '../../../../helpers/system'; import { GlobalSettingKeys } from '../../../../types/settings'; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserMenu.tsx index 4542d126bc4..39d6508e423 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserMenu.tsx @@ -19,7 +19,6 @@ */ import { DropdownMenu } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { translate } from '../../../../helpers/l10n'; export function GlobalNavUserMenu() { diff --git a/server/sonar-web/src/main/js/app/components/nav/global/MainSonarQubeBar.tsx b/server/sonar-web/src/main/js/app/components/nav/global/MainSonarQubeBar.tsx index 96fbcf8a690..dc200ed30e2 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/MainSonarQubeBar.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/MainSonarQubeBar.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { MainAppBar, SonarQubeLogo } from 'design-system'; import * as React from 'react'; +import { MainAppBar, SonarQubeLogo } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { translate } from '../../../../helpers/l10n'; import { GlobalSettingKeys } from '../../../../types/settings'; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNav-test.tsx b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNav-test.tsx index 5300fa901f9..400fd09a084 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNav-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNav-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import React from 'react'; import { mockAppState, mockCurrentUser, mockLocation } from '../../../../../helpers/testMocks'; import { renderApp } from '../../../../../helpers/testReactTestingUtils'; import GlobalNav from '../GlobalNav'; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavMenu-test.tsx b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavMenu-test.tsx index ec162f1c027..d36f978a1d6 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavMenu-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavMenu-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { mockAppState, mockCurrentUser } from '../../../../../helpers/testMocks'; import { renderApp } from '../../../../../helpers/testReactTestingUtils'; import GlobalNavMenu from '../GlobalNavMenu'; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavUser-test.tsx b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavUser-test.tsx index d6d58becb43..e2eccbba5e1 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavUser-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/GlobalNavUser-test.tsx @@ -20,7 +20,6 @@ import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { mockCurrentUser, mockLoggedInUser } from '../../../../../helpers/testMocks'; import { renderApp } from '../../../../../helpers/testReactTestingUtils'; import { CurrentUser } from '../../../../../types/users'; diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/PendingPluginsActionNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/PendingPluginsActionNotif.tsx index 0f4a3e428b6..fd5ed23cc89 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/PendingPluginsActionNotif.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/PendingPluginsActionNotif.tsx @@ -19,9 +19,9 @@ */ import { Button, ButtonGroup } from '@sonarsource/echoes-react'; -import { FlagMessage } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage } from '~design-system'; import { cancelPendingPlugins } from '../../../../api/plugins'; import InstanceMessage from '../../../../components/common/InstanceMessage'; import RestartButton from '../../../../components/common/RestartButton'; diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx index 516b1cca0c7..83f76c732b9 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx @@ -19,9 +19,9 @@ */ import { DropdownMenu, DropdownMenuAlign } from '@sonarsource/echoes-react'; -import { LightLabel, NavBarTabLink, NavBarTabs, TopBar } from 'design-system'; import * as React from 'react'; import { Location } from 'react-router-dom'; +import { LightLabel, NavBarTabLink, NavBarTabs, TopBar } from '~design-system'; import withLocation from '../../../../components/hoc/withLocation'; import { translate } from '../../../../helpers/l10n'; import { getBaseUrl } from '../../../../helpers/system'; diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SystemRestartNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/SystemRestartNotif.tsx index 566fe405590..e8dad0f4817 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/SystemRestartNotif.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/SystemRestartNotif.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, Link } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Link } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { getInstance } from '../../../../helpers/system'; diff --git a/server/sonar-web/src/main/js/app/components/promotion-notification/PromotionNotification.tsx b/server/sonar-web/src/main/js/app/components/promotion-notification/PromotionNotification.tsx index c4387b5af82..9e828b956e3 100644 --- a/server/sonar-web/src/main/js/app/components/promotion-notification/PromotionNotification.tsx +++ b/server/sonar-web/src/main/js/app/components/promotion-notification/PromotionNotification.tsx @@ -20,8 +20,8 @@ import styled from '@emotion/styled'; import { Button } from '@sonarsource/echoes-react'; -import { ButtonPrimary, themeBorder, themeColor } from 'design-system'; import * as React from 'react'; +import { ButtonPrimary, themeBorder, themeColor } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { dismissNotice } from '../../../api/users'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/app/components/promotion-notification/__tests__/PromotionNotification-test.tsx b/server/sonar-web/src/main/js/app/components/promotion-notification/__tests__/PromotionNotification-test.tsx index 547ed35b153..66ec203c920 100644 --- a/server/sonar-web/src/main/js/app/components/promotion-notification/__tests__/PromotionNotification-test.tsx +++ b/server/sonar-web/src/main/js/app/components/promotion-notification/__tests__/PromotionNotification-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { dismissNotice } from '../../../../api/users'; import { mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/app/components/update-notification/UpdateNotification.tsx b/server/sonar-web/src/main/js/app/components/update-notification/UpdateNotification.tsx index 8e6109a8c3e..40fdb8b963a 100644 --- a/server/sonar-web/src/main/js/app/components/update-notification/UpdateNotification.tsx +++ b/server/sonar-web/src/main/js/app/components/update-notification/UpdateNotification.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Banner } from 'design-system'; + import { groupBy, isEmpty, mapValues } from 'lodash'; -import * as React from 'react'; +import { Banner } from '~design-system'; import DismissableAlert from '../../../components/ui/DismissableAlert'; import SystemUpgradeButton from '../../../components/upgrade/SystemUpgradeButton'; import { UpdateUseCase } from '../../../components/upgrade/utils'; diff --git a/server/sonar-web/src/main/js/app/components/update-notification/helpers.ts b/server/sonar-web/src/main/js/app/components/update-notification/helpers.ts index 89d700f8a5d..0eb3b558b84 100644 --- a/server/sonar-web/src/main/js/app/components/update-notification/helpers.ts +++ b/server/sonar-web/src/main/js/app/components/update-notification/helpers.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Variant } from 'design-system'; import { isEmpty } from 'lodash'; +import { Variant } from '~design-system'; import { UpdateUseCase, sortUpgrades } from '../../../components/upgrade/utils'; import { SystemUpgrade } from '../../../types/system'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/app/index.ts b/server/sonar-web/src/main/js/app/index.ts index 7ee55bb9baa..8ad4712c238 100644 --- a/server/sonar-web/src/main/js/app/index.ts +++ b/server/sonar-web/src/main/js/app/index.ts @@ -18,14 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* NOTE: esbuild will transpile the _syntax_ down to what the browsers listed in package.json */ -/* understand. It will _not_, however, polyfill missing API methods, such as */ -/* String.prototype.replaceAll. This is why we also import core-js. */ -import 'core-js/stable'; -/* */ import axios from 'axios'; -import { addGlobalErrorMessage } from 'design-system'; import 'react-day-picker/dist/style.css'; +import { addGlobalErrorMessage } from '~design-system'; import { getAvailableFeatures } from '../api/features'; import { getGlobalNavigation } from '../api/navigation'; import { getCurrentUser } from '../api/users'; diff --git a/server/sonar-web/src/main/js/app/styles/GlobalStyles.tsx b/server/sonar-web/src/main/js/app/styles/GlobalStyles.tsx index 46fb9294f48..dc5e4af3c5e 100644 --- a/server/sonar-web/src/main/js/app/styles/GlobalStyles.tsx +++ b/server/sonar-web/src/main/js/app/styles/GlobalStyles.tsx @@ -19,9 +19,8 @@ */ import { Global, css, useTheme } from '@emotion/react'; -import { themeColor } from 'design-system'; -import React from 'react'; import twDefaultTheme from 'tailwindcss/defaultTheme'; +import { themeColor } from '~design-system'; export function GlobalStyles() { const theme = useTheme(); diff --git a/server/sonar-web/src/main/js/app/styles/sonar.ts b/server/sonar-web/src/main/js/app/styles/sonar.ts index 5aa66548f47..e51bb8c6e00 100644 --- a/server/sonar-web/src/main/js/app/styles/sonar.ts +++ b/server/sonar-web/src/main/js/app/styles/sonar.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* * The esbuild postcss plugin fails to handle CSS `@import` */ diff --git a/server/sonar-web/src/main/js/app/utils/NavigateWithParams.tsx b/server/sonar-web/src/main/js/app/utils/NavigateWithParams.tsx index bcf1974e0a2..06dd07f9b9a 100644 --- a/server/sonar-web/src/main/js/app/utils/NavigateWithParams.tsx +++ b/server/sonar-web/src/main/js/app/utils/NavigateWithParams.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Navigate, Params, useLocation, useParams, useSearchParams } from 'react-router-dom'; import { Dict } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/app/utils/NavigateWithSearchAndHash.tsx b/server/sonar-web/src/main/js/app/utils/NavigateWithSearchAndHash.tsx index bb96efb24f6..301de08d9c2 100644 --- a/server/sonar-web/src/main/js/app/utils/NavigateWithSearchAndHash.tsx +++ b/server/sonar-web/src/main/js/app/utils/NavigateWithSearchAndHash.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Navigate, useLocation } from 'react-router-dom'; export interface NavigateWithSearchAndHashProps { diff --git a/server/sonar-web/src/main/js/app/utils/__tests__/NavigateWithParams-test.tsx b/server/sonar-web/src/main/js/app/utils/__tests__/NavigateWithParams-test.tsx index 888cf43d315..8a5a6d97f7b 100644 --- a/server/sonar-web/src/main/js/app/utils/__tests__/NavigateWithParams-test.tsx +++ b/server/sonar-web/src/main/js/app/utils/__tests__/NavigateWithParams-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; -import React from 'react'; import { MemoryRouter, Params, Route, Routes } from 'react-router-dom'; import { CatchAll } from '../../../helpers/testReactTestingUtils'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/app/utils/__tests__/handleRequiredAuthorization-test.ts b/server/sonar-web/src/main/js/app/utils/__tests__/handleRequiredAuthorization-test.ts index 77a15c419dd..6cb4a692f3b 100644 --- a/server/sonar-web/src/main/js/app/utils/__tests__/handleRequiredAuthorization-test.ts +++ b/server/sonar-web/src/main/js/app/utils/__tests__/handleRequiredAuthorization-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import handleRequiredAuthorization from '../handleRequiredAuthorization'; const originalLocation = window.location; diff --git a/server/sonar-web/src/main/js/app/utils/exportModulesAsGlobals.ts b/server/sonar-web/src/main/js/app/utils/exportModulesAsGlobals.ts index c1799ef5d5f..00f43e0530a 100644 --- a/server/sonar-web/src/main/js/app/utils/exportModulesAsGlobals.ts +++ b/server/sonar-web/src/main/js/app/utils/exportModulesAsGlobals.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as EmotionReact from '@emotion/react'; import EmotionStyled from '@emotion/styled'; import * as DateFns from 'date-fns'; diff --git a/server/sonar-web/src/main/js/app/utils/handleRequiredAuthorization.ts b/server/sonar-web/src/main/js/app/utils/handleRequiredAuthorization.ts index 9caf50302ff..e38d189668d 100644 --- a/server/sonar-web/src/main/js/app/utils/handleRequiredAuthorization.ts +++ b/server/sonar-web/src/main/js/app/utils/handleRequiredAuthorization.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getBaseUrl } from '../../helpers/system'; export default function handleRequiredAuthorization() { diff --git a/server/sonar-web/src/main/js/app/utils/isValidUri.ts b/server/sonar-web/src/main/js/app/utils/isValidUri.ts index 57032193c20..d4e53530495 100644 --- a/server/sonar-web/src/main/js/app/utils/isValidUri.ts +++ b/server/sonar-web/src/main/js/app/utils/isValidUri.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isWebUri } from 'valid-url'; export default function (url: string): boolean { diff --git a/server/sonar-web/src/main/js/app/utils/setPublicPath.js b/server/sonar-web/src/main/js/app/utils/setPublicPath.js index 26323d80d76..eb123bf7309 100644 --- a/server/sonar-web/src/main/js/app/utils/setPublicPath.js +++ b/server/sonar-web/src/main/js/app/utils/setPublicPath.js @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable no-undef */ // make __webpack_public_path__ a free variable // see https://github.com/webpack/webpack/issues/443 diff --git a/server/sonar-web/src/main/js/app/utils/startReactApp.tsx b/server/sonar-web/src/main/js/app/utils/startReactApp.tsx index d2031afbc0b..e0dfffd5cdc 100644 --- a/server/sonar-web/src/main/js/app/utils/startReactApp.tsx +++ b/server/sonar-web/src/main/js/app/utils/startReactApp.tsx @@ -22,8 +22,6 @@ import { ThemeProvider } from '@emotion/react'; import styled from '@emotion/styled'; import { EchoesProvider } from '@sonarsource/echoes-react'; import { QueryClientProvider } from '@tanstack/react-query'; -import { ToastMessageContainer, lightTheme } from 'design-system'; -import * as React from 'react'; import { createRoot } from 'react-dom/client'; import { Helmet, HelmetProvider } from 'react-helmet-async'; import { IntlShape, RawIntlProvider } from 'react-intl'; @@ -33,6 +31,7 @@ import { createBrowserRouter, createRoutesFromElements, } from 'react-router-dom'; +import { ToastMessageContainer, lightTheme } from '~design-system'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; import accountRoutes from '../../apps/account/routes'; import auditLogsRoutes from '../../apps/audit-logs/routes'; @@ -119,12 +118,8 @@ function renderComponentRoutes() { element={<ProjectPageExtension />} /> {projectIssuesRoutes()} -<<<<<<< HEAD {dependenciesRoutes()} - <Route path="security_hotspots" element={<SecurityHotspotsApp />} /> -======= {securityHotspotsRoutes()} ->>>>>>> 6803c465323 (SONAR-23205 Add lazy loading on most routes to improve build and dev server perfs) {projectQualityGateRoutes()} {projectQualityProfilesRoutes()} {projectInfoRoutes()} diff --git a/server/sonar-web/src/main/js/apps/account/Account.tsx b/server/sonar-web/src/main/js/apps/account/Account.tsx index 66bc4c26dd5..8f16428327c 100644 --- a/server/sonar-web/src/main/js/apps/account/Account.tsx +++ b/server/sonar-web/src/main/js/apps/account/Account.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper, TopBar } from 'design-system'; import * as React from 'react'; import { createPortal } from 'react-dom'; import { Helmet } from 'react-helmet-async'; import { Outlet } from 'react-router-dom'; +import { LargeCenteredLayout, PageContentFontWrapper, TopBar } from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import { useCurrentLoginUser } from '../../app/components/current-user/CurrentUserContext'; import { translate, translateWithParameters } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/account/__tests__/Account-it.tsx b/server/sonar-web/src/main/js/apps/account/__tests__/Account-it.tsx index 00b579921c7..4d979dfc1b0 100644 --- a/server/sonar-web/src/main/js/apps/account/__tests__/Account-it.tsx +++ b/server/sonar-web/src/main/js/apps/account/__tests__/Account-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; -import React from 'react'; import { Outlet, Route } from 'react-router-dom'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { getMyProjects, getScannableProjects } from '../../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/account/components/Nav.tsx b/server/sonar-web/src/main/js/apps/account/components/Nav.tsx index 68625aca7bc..fca2422eef9 100644 --- a/server/sonar-web/src/main/js/apps/account/components/Nav.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/Nav.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NavBarTabLink, NavBarTabs } from 'design-system'; -import * as React from 'react'; + +import { NavBarTabLink, NavBarTabs } from '~design-system'; import { translate } from '../../../helpers/l10n'; export default function Nav() { diff --git a/server/sonar-web/src/main/js/apps/account/components/UserCard.tsx b/server/sonar-web/src/main/js/apps/account/components/UserCard.tsx index 0f4461ab637..28366d9e574 100644 --- a/server/sonar-web/src/main/js/apps/account/components/UserCard.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/UserCard.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Avatar } from 'design-system'; -import * as React from 'react'; + +import { Avatar } from '~design-system'; import { LoggedInUser } from '../../../types/users'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx b/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx index 89191506cd8..0f055ddf171 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.tsx @@ -19,7 +19,6 @@ */ import { Heading } from '@sonarsource/echoes-react'; -import * as React from 'react'; import NotificationsList from '../../../components/notifications/NotificationsList'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx b/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx index 4cc70e2d1f0..866120cf614 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx @@ -19,9 +19,8 @@ */ import { Heading, Spinner } from '@sonarsource/echoes-react'; -import { FlagMessage, GreySeparator } from 'design-system'; -import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { FlagMessage, GreySeparator } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { useNotificationsQuery } from '../../../queries/notifications'; import GlobalNotifications from './GlobalNotifications'; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/ProjectModal.tsx b/server/sonar-web/src/main/js/apps/account/notifications/ProjectModal.tsx index 07a67a581ea..e3a1383569d 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/ProjectModal.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/ProjectModal.tsx @@ -19,6 +19,7 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; +import * as React from 'react'; import { DropdownMenu, InputSearch, @@ -28,8 +29,7 @@ import { PopupPlacement, PopupZLevel, Spinner, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { getSuggestions } from '../../../api/components'; import { KeyboardKeys } from '../../../helpers/keycodes'; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.tsx b/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.tsx index ba0b340bc6d..f4462f3bcac 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; -import * as React from 'react'; + +import { Link } from '~design-system'; import NotificationsList from '../../../components/notifications/NotificationsList'; import { getProjectUrl } from '../../../helpers/urls'; import { NotificationProject } from '../../../types/notifications'; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx b/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx index 5833f1fd300..47b5d19ba8a 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx @@ -19,9 +19,9 @@ */ import { Button, ButtonVariety, Heading } from '@sonarsource/echoes-react'; -import { InputSearch, Note } from 'design-system'; import { sortBy, uniqBy } from 'lodash'; import * as React from 'react'; +import { InputSearch, Note } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Notification, NotificationProject } from '../../../types/notifications'; import ProjectModal from './ProjectModal'; diff --git a/server/sonar-web/src/main/js/apps/account/profile/Preferences.tsx b/server/sonar-web/src/main/js/apps/account/profile/Preferences.tsx index f0163106712..1747419c6bc 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/Preferences.tsx +++ b/server/sonar-web/src/main/js/apps/account/profile/Preferences.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SubHeading, Switch } from 'design-system'; + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { SubHeading, Switch } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { getKeyboardShortcutEnabled, diff --git a/server/sonar-web/src/main/js/apps/account/profile/Profile.tsx b/server/sonar-web/src/main/js/apps/account/profile/Profile.tsx index ef49cf4a4ea..aa0c42450db 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/Profile.tsx +++ b/server/sonar-web/src/main/js/apps/account/profile/Profile.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { GreySeparator, HelperHintIcon, SubHeading, Title } from 'design-system'; -import * as React from 'react'; + import { Helmet } from 'react-helmet-async'; +import { GreySeparator, HelperHintIcon, SubHeading, Title } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/account/profile/UserExternalIdentity.tsx b/server/sonar-web/src/main/js/apps/account/profile/UserExternalIdentity.tsx index 2ed4bc8bba1..58092ac6b47 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/UserExternalIdentity.tsx +++ b/server/sonar-web/src/main/js/apps/account/profile/UserExternalIdentity.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { getTextColor } from 'design-system'; import * as React from 'react'; +import { getTextColor } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { getIdentityProviders } from '../../../api/users'; import { IdentityProvider } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx b/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx index 841ff8048f7..6607d10f288 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx +++ b/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Card, DiscreetLink, @@ -25,8 +26,7 @@ import { QualityGateIndicator, SubHeading, UnorderedList, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { Status } from '~sonar-aligned/types/common'; import { MetricType } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx b/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx index 8c8c9897231..173e0439019 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import ListFooter from '../../../components/controls/ListFooter'; import { translate } from '../../../helpers/l10n'; import { MyProject } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx b/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx index bce70221074..c962e8c2375 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx +++ b/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Spinner, Title } from 'design-system'; + import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { Spinner, Title } from '~design-system'; import { getMyProjects } from '../../../api/components'; import { translate } from '../../../helpers/l10n'; import { MyProject } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/account/routes.tsx b/server/sonar-web/src/main/js/apps/account/routes.tsx index 688d5abb7f5..f92b319cd2f 100644 --- a/server/sonar-web/src/main/js/apps/account/routes.tsx +++ b/server/sonar-web/src/main/js/apps/account/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import Account from './Account'; import Notifications from './notifications/Notifications'; diff --git a/server/sonar-web/src/main/js/apps/account/security/Security.tsx b/server/sonar-web/src/main/js/apps/account/security/Security.tsx index 0539ef8aff4..f2a07861f41 100644 --- a/server/sonar-web/src/main/js/apps/account/security/Security.tsx +++ b/server/sonar-web/src/main/js/apps/account/security/Security.tsx @@ -19,7 +19,6 @@ */ import { Heading } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { useCurrentLoginUser } from '../../../app/components/current-user/CurrentUserContext'; import ResetPasswordForm from '../../../components/common/ResetPasswordForm'; diff --git a/server/sonar-web/src/main/js/apps/account/security/Tokens.tsx b/server/sonar-web/src/main/js/apps/account/security/Tokens.tsx index a0d7051dda6..71e6789f94b 100644 --- a/server/sonar-web/src/main/js/apps/account/security/Tokens.tsx +++ b/server/sonar-web/src/main/js/apps/account/security/Tokens.tsx @@ -19,7 +19,6 @@ */ import { Heading } from '@sonarsource/echoes-react'; -import * as React from 'react'; import InstanceMessage from '../../../components/common/InstanceMessage'; import { translate } from '../../../helpers/l10n'; import TokensForm from '../../users/components/TokensForm'; diff --git a/server/sonar-web/src/main/js/apps/audit-logs/components/AuditApp.tsx b/server/sonar-web/src/main/js/apps/audit-logs/components/AuditApp.tsx index cd1b18a7b3f..3643286e688 100644 --- a/server/sonar-web/src/main/js/apps/audit-logs/components/AuditApp.tsx +++ b/server/sonar-web/src/main/js/apps/audit-logs/components/AuditApp.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getValue } from '../../../api/settings'; import withAdminPagesOutletContext from '../../../app/components/admin/withAdminPagesOutletContext'; diff --git a/server/sonar-web/src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx b/server/sonar-web/src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx index cadc1390946..21b7e50b8ae 100644 --- a/server/sonar-web/src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx @@ -20,16 +20,15 @@ import { Link, RadioButtonGroup } from '@sonarsource/echoes-react'; import { subDays } from 'date-fns'; +import { Helmet } from 'react-helmet-async'; +import { FormattedMessage } from 'react-intl'; import { DateRangePicker, LargeCenteredLayout, PageContentFontWrapper, PopupZLevel, Title, -} from 'design-system'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { now } from '../../../helpers/dates'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/audit-logs/components/DownloadButton.tsx b/server/sonar-web/src/main/js/apps/audit-logs/components/DownloadButton.tsx index d59dad97e29..31ac4d0547d 100644 --- a/server/sonar-web/src/main/js/apps/audit-logs/components/DownloadButton.tsx +++ b/server/sonar-web/src/main/js/apps/audit-logs/components/DownloadButton.tsx @@ -19,8 +19,7 @@ */ import { endOfDay, startOfDay, subDays } from 'date-fns'; -import { ButtonPrimary } from 'design-system'; -import * as React from 'react'; +import { ButtonPrimary } from '~design-system'; import { now } from '../../../helpers/dates'; import { translate } from '../../../helpers/l10n'; import '../style.css'; diff --git a/server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/AuditApp-it.tsx b/server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/AuditApp-it.tsx index bc12f0e5a6e..889e943b41f 100644 --- a/server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/AuditApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/AuditApp-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import { getDate, getMonth, getYear, subDays } from 'date-fns'; import { byPlaceholderText, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/apps/audit-logs/routes.tsx b/server/sonar-web/src/main/js/apps/audit-logs/routes.tsx index 7178d9ff58d..9b79d0dbe36 100644 --- a/server/sonar-web/src/main/js/apps/audit-logs/routes.tsx +++ b/server/sonar-web/src/main/js/apps/audit-logs/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/audit-logs/utils.ts b/server/sonar-web/src/main/js/apps/audit-logs/utils.ts index 04cdb7d81f4..1fa25e230bd 100644 --- a/server/sonar-web/src/main/js/apps/audit-logs/utils.ts +++ b/server/sonar-web/src/main/js/apps/audit-logs/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum HousekeepingPolicy { Weekly = 'Weekly', Monthly = 'Monthly', diff --git a/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-it.tsx b/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-it.tsx index 7077417fb09..82a1be4c295 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-it.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/__tests__/utils-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/__tests__/utils-test.tsx index adb620f04f4..22ed02f7209 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/__tests__/utils-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/__tests__/utils-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { formatDuration } from '../utils'; describe('Helpers', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/AnalysisWarningsModal.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/AnalysisWarningsModal.tsx index c6134af333c..b808cb10c2c 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/AnalysisWarningsModal.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/AnalysisWarningsModal.tsx @@ -19,6 +19,7 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; +import * as React from 'react'; import { FlagMessage, HtmlFormatter, @@ -26,8 +27,7 @@ import { SafeHTMLInjection, SanitizeLevel, Spinner, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { dismissAnalysisWarning, getTask } from '../../../api/ce'; import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx index dca8016317f..6e4da5a050a 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx @@ -19,10 +19,10 @@ */ import { Spinner } from '@sonarsource/echoes-react'; -import { LargeCenteredLayout, PageContentFontWrapper } from 'design-system'; import { debounce } from 'lodash'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location, RawQuery, Router } from '~sonar-aligned/types/router'; import { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx index 35b754cf061..dfc233bc957 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Switch } from 'design-system'; + import * as React from 'react'; +import { Switch } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { CURRENTS } from '../constants'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.tsx index 30d379faaca..37722c95158 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DateRangePicker } from 'design-system'; + import * as React from 'react'; +import { DateRangePicker } from '~design-system'; import { translate } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Header.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Header.tsx index 275e3adf8f6..5e3460e49d9 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Header.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Header.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Title } from 'design-system'; -import * as React from 'react'; +import { Title } from '~design-system'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/NoWorkersSupportPopup.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/NoWorkersSupportPopup.tsx index 75de9b1716a..3947432f9cc 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/NoWorkersSupportPopup.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/NoWorkersSupportPopup.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; -import * as React from 'react'; + +import { Link } from '~design-system'; import { translate } from '../../../helpers/l10n'; export default function NoWorkersSupportPopup() { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx index 745c54e4d48..3c5a13fc08c 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/ScannerContext.tsx @@ -19,9 +19,9 @@ */ import { Spinner } from '@sonarsource/echoes-react'; -import { Modal } from 'design-system'; import { noop } from 'lodash'; import * as React from 'react'; +import { Modal } from '~design-system'; import { getTask } from '../../../api/ce'; import { translate } from '../../../helpers/l10n'; import { isDefined } from '../../../helpers/types'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx index 88168451661..eca4b510097 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx @@ -19,8 +19,8 @@ */ import { Button, Label } from '@sonarsource/echoes-react'; -import { InputSearch } from 'design-system'; import * as React from 'react'; +import { InputSearch } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { DEFAULT_FILTERS } from '../constants'; import { Query } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.tsx index e468dce163a..6d3c2f1c82e 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Modal, Spinner } from 'design-system'; + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Modal, Spinner } from '~design-system'; import { getTask } from '../../../api/ce'; import { translate } from '../../../helpers/l10n'; import { Task } from '../../../types/tasks'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx index 60c45253ebb..46e01d7b5dd 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DestructiveIcon, TrashIcon } from 'design-system'; -import * as React from 'react'; + +import { DestructiveIcon, TrashIcon } from '~design-system'; import withAppStateContext from '../../../app/components/app-state/withAppStateContext'; import ConfirmButton from '../../../components/controls/ConfirmButton'; import Tooltip from '../../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingTime.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingTime.tsx index 593e204266e..a22ddc474e9 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingTime.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingTime.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HelperHintIcon } from 'design-system'; -import * as React from 'react'; + +import { HelperHintIcon } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/StatStillFailing.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/StatStillFailing.tsx index 6ce2fada30f..757f82a601e 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/StatStillFailing.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/StatStillFailing.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HelperHintIcon, StandoutLink } from 'design-system'; + import * as React from 'react'; +import { HelperHintIcon, StandoutLink } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Stats.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Stats.tsx index 690495b61ae..044857467d5 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Stats.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Stats.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { Component } from '../../../types/types'; import StatPendingCount from './StatPendingCount'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx index 80acd0afc2e..88cebea732e 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputSelect, LabelValueSelectOption } from 'design-system'; + import * as React from 'react'; +import { InputSelect, LabelValueSelectOption } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { TaskStatuses } from '../../../types/tasks'; import { STATUSES } from '../constants'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Task.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Task.tsx index dbb564cb9c5..7260db2f86a 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Task.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Task.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TableRow } from 'design-system'; + import * as React from 'react'; +import { TableRow } from '~design-system'; import { AppStateContext } from '../../../app/components/app-state/AppStateContext'; import { EditionKey } from '../../../types/editions'; import { Task as ITask } from '../../../types/tasks'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskActions.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskActions.tsx index 47016006858..46707d45d97 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskActions.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskActions.tsx @@ -17,14 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, ButtonVariety, DropdownMenu, IconMoreVertical, } from '@sonarsource/echoes-react'; -import { ActionCell, ItemDangerButton } from 'design-system'; import * as React from 'react'; +import { ActionCell, ItemDangerButton } from '~design-system'; import ConfirmModal from '../../../components/controls/ConfirmModal'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Task, TaskStatuses } from '../../../types/tasks'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx index 80aa8bb1ace..73e4d06e9f9 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { BranchIcon, @@ -25,8 +26,7 @@ import { PullRequestIcon, QualifierIcon, StandoutLink, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; import { translate } from '../../../helpers/l10n'; import { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.tsx index c0440ac55c5..1d17805d2f3 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { differenceInDays } from 'date-fns'; -import { Note, NumericalCell, themeColor } from 'design-system'; -import * as React from 'react'; +import { Note, NumericalCell, themeColor } from '~design-system'; import TimeFormatter from '../../../components/intl/TimeFormatter'; import { isValidDate, parseDate } from '../../../helpers/dates'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskExecutionTime.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskExecutionTime.tsx index be4b3fa74dd..1dd0d9b2bb2 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskExecutionTime.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskExecutionTime.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NumericalCell } from 'design-system'; -import * as React from 'react'; +import { NumericalCell } from '~design-system'; import { formatDuration } from '../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskNodeName.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskNodeName.tsx index aacf82b16de..61991bcab4d 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskNodeName.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskNodeName.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, Note } from 'design-system'; -import * as React from 'react'; + +import { ContentCell, Note } from '~design-system'; interface Props { nodeName?: string; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.tsx index 2fc19066945..dfa61778c28 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { ClockIcon, ContentCell, @@ -24,8 +26,7 @@ import { FlagSuccessIcon, FlagWarningIcon, Spinner, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { TaskStatuses } from '../../../types/tasks'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskSubmitter.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskSubmitter.tsx index 1ad3f3ff06e..ce1b0d44c6d 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskSubmitter.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskSubmitter.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, Note } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { ContentCell, Note } from '~design-system'; import DateFormatter from '../../../components/intl/DateFormatter'; import TimeFormatter from '../../../components/intl/TimeFormatter'; import { isValidDate, parseDate } from '../../../helpers/dates'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.tsx index 2c0171ec3de..3c074abc585 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, NumericalCell, Table, TableRow } from 'design-system'; + import * as React from 'react'; +import { ContentCell, NumericalCell, Table, TableRow } from '~design-system'; import { AppStateContext } from '../../../app/components/app-state/AppStateContext'; import withAppStateContext from '../../../app/components/app-state/withAppStateContext'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx index d7b66d133df..265b54ef88c 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputSelect, LabelValueSelectOption } from 'design-system'; + import * as React from 'react'; +import { InputSelect, LabelValueSelectOption } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { ALL_TYPES } from '../constants'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Workers.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Workers.tsx index 5f51fe69c0c..b7276e3115b 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Workers.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Workers.tsx @@ -17,14 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { FlagWarningIcon, HelperHintIcon, InteractiveIcon, PencilIcon, Spinner, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { getWorkers } from '../../../api/ce'; import Tooltip from '../../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/WorkersForm.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/WorkersForm.tsx index a51afaf9b68..f72124a84ff 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/WorkersForm.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/WorkersForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, InputSelect, Modal } from 'design-system'; import * as React from 'react'; +import { FlagMessage, InputSelect, Modal } from '~design-system'; import { setWorkerCount } from '../../../api/ce'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/constants.ts b/server/sonar-web/src/main/js/apps/background-tasks/constants.ts index fa33ba802a4..74d76b0c638 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/constants.ts +++ b/server/sonar-web/src/main/js/apps/background-tasks/constants.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Query } from './utils'; export const STATUSES = { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/routes.tsx b/server/sonar-web/src/main/js/apps/background-tasks/routes.tsx index f50eb2fb0f9..9590cf2068a 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/routes.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/utils.ts b/server/sonar-web/src/main/js/apps/background-tasks/utils.ts index 2923254ca42..3799a50ac80 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/utils.ts +++ b/server/sonar-web/src/main/js/apps/background-tasks/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ONE_SECOND } from '../../helpers/constants'; import { toShortISO8601String } from '../../helpers/dates'; import { ActivityRequestParameters, Task, TaskStatuses } from '../../types/tasks'; diff --git a/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordApp.tsx b/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordApp.tsx index 8a8e0b6ee6b..8968cd08331 100644 --- a/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordApp.tsx +++ b/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordApp.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordAppRenderer.tsx b/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordAppRenderer.tsx index fbd6149c099..48fd8950618 100644 --- a/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordAppRenderer.tsx @@ -17,7 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { LinkStandalone } from '@sonarsource/echoes-react'; +import * as React from 'react'; +import { Helmet } from 'react-helmet-async'; import { ButtonPrimary, Card, @@ -28,9 +31,7 @@ import { Spinner, SubTitle, Title, -} from 'design-system'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; +} from '~design-system'; import { Location } from '~sonar-aligned/types/router'; import UserPasswordInput, { PasswordChangeHandlerParams, diff --git a/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordApp-it.tsx b/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordApp-it.tsx index a8c86013389..dad34b1295b 100644 --- a/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordApp-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { changePassword } from '../../../api/users'; import { mockAppState } from '../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/apps/change-admin-password/constants.ts b/server/sonar-web/src/main/js/apps/change-admin-password/constants.ts index 3b121d7d190..b6194f760c7 100644 --- a/server/sonar-web/src/main/js/apps/change-admin-password/constants.ts +++ b/server/sonar-web/src/main/js/apps/change-admin-password/constants.ts @@ -17,5 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export const DEFAULT_ADMIN_LOGIN = 'admin'; export const DEFAULT_ADMIN_PASSWORD = 'admin'; diff --git a/server/sonar-web/src/main/js/apps/code/__tests__/Code-it.ts b/server/sonar-web/src/main/js/apps/code/__tests__/Code-it.ts index 27560be451e..4b319d33240 100644 --- a/server/sonar-web/src/main/js/apps/code/__tests__/Code-it.ts +++ b/server/sonar-web/src/main/js/apps/code/__tests__/Code-it.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; diff --git a/server/sonar-web/src/main/js/apps/code/__tests__/utils-test.tsx b/server/sonar-web/src/main/js/apps/code/__tests__/utils-test.tsx index c2c19e55ce4..a5cf4d99164 100644 --- a/server/sonar-web/src/main/js/apps/code/__tests__/utils-test.tsx +++ b/server/sonar-web/src/main/js/apps/code/__tests__/utils-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier } from '~sonar-aligned/types/component'; import { mockMainBranch, mockPullRequest } from '../../../helpers/mocks/branch-like'; import { getCodeMetrics, mostCommonPrefix } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx b/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx index 5c5e4384619..815a97d07da 100644 --- a/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner } from '@sonarsource/echoes-react'; import * as React from 'react'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; diff --git a/server/sonar-web/src/main/js/apps/code/components/CodeAppRenderer.tsx b/server/sonar-web/src/main/js/apps/code/components/CodeAppRenderer.tsx index 03c701c5cb5..ade30f52a35 100644 --- a/server/sonar-web/src/main/js/apps/code/components/CodeAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/CodeAppRenderer.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IconQuestionMark, Spinner, Text } from '@sonarsource/echoes-react'; -import { Card, FlagMessage, KeyboardHint, LargeCenteredLayout } from 'design-system'; import { difference, intersection } from 'lodash'; -import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { Card, FlagMessage, KeyboardHint, LargeCenteredLayout } from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; diff --git a/server/sonar-web/src/main/js/apps/code/components/CodeBreadcrumbs.tsx b/server/sonar-web/src/main/js/apps/code/components/CodeBreadcrumbs.tsx index 91e44b3a0a7..a5f28d13231 100644 --- a/server/sonar-web/src/main/js/apps/code/components/CodeBreadcrumbs.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/CodeBreadcrumbs.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Breadcrumbs } from 'design-system'; -import * as React from 'react'; + +import { Breadcrumbs } from '~design-system'; import { Breadcrumb } from '~sonar-aligned/types/component'; import { BranchLike } from '../../../types/branch-like'; import { ComponentMeasure } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/code/components/Component.tsx b/server/sonar-web/src/main/js/apps/code/components/Component.tsx index 3377e14205e..0e04072939a 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Component.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Component.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner } from '@sonarsource/echoes-react'; -import { ContentCell, NumericalCell, TableRowInteractive } from 'design-system'; -import * as React from 'react'; +import { ContentCell, NumericalCell, TableRowInteractive } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import DateFromNow from '../../../components/intl/DateFromNow'; import { WorkspaceContext } from '../../../components/workspace/context'; diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx index 30d46001e75..08085326415 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, NumericalCell, QualityGateIndicator, RatingCell } from 'design-system'; -import * as React from 'react'; +import { ContentCell, NumericalCell, QualityGateIndicator, RatingCell } from '~design-system'; import Measure from '~sonar-aligned/components/measure/Measure'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { Status } from '~sonar-aligned/types/common'; diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx index d9f096bdfd6..5c80588c2be 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react'; -import { Badge, BranchIcon, LightLabel, Note, QualifierIcon } from 'design-system'; -import * as React from 'react'; +import { Badge, BranchIcon, LightLabel, Note, QualifierIcon } from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentPin.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentPin.tsx index ec687017856..8be0affae43 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentPin.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentPin.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, ButtonVariety, IconPin } from '@sonarsource/echoes-react'; import * as React from 'react'; import { WorkspaceContextShape } from '../../../components/workspace/context'; diff --git a/server/sonar-web/src/main/js/apps/code/components/Components.tsx b/server/sonar-web/src/main/js/apps/code/components/Components.tsx index 8940adf525d..65cfa28964e 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Components.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Components.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, Table, TableRow } from 'design-system'; + import { sortBy, times } from 'lodash'; -import * as React from 'react'; +import { ContentCell, Table, TableRow } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import withKeyboardNavigation from '../../../components/hoc/withKeyboardNavigation'; import { getComponentMeasureUniqueKey } from '../../../helpers/component'; diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentsEmpty.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentsEmpty.tsx index af345f82c14..8f500997bc0 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentsEmpty.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentsEmpty.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, Note, TableRow } from 'design-system'; -import * as React from 'react'; + +import { ContentCell, Note, TableRow } from '~design-system'; import { translate } from '../../../helpers/l10n'; export default function ComponentsEmpty() { diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.tsx index 4ee73fd725e..25be1b623a9 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, NumericalCell, RatingCell } from 'design-system'; -import * as React from 'react'; + +import { ContentCell, NumericalCell, RatingCell } from '~design-system'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { diff --git a/server/sonar-web/src/main/js/apps/code/components/Search.tsx b/server/sonar-web/src/main/js/apps/code/components/Search.tsx index da5d834add2..5082de2df22 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Search.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Search.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { InputSearch, Spinner, ToggleButton } from 'design-system'; import { isEmpty, omit } from 'lodash'; import * as React from 'react'; +import { InputSearch, Spinner, ToggleButton } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; diff --git a/server/sonar-web/src/main/js/apps/code/components/SourceViewerWrapper.tsx b/server/sonar-web/src/main/js/apps/code/components/SourceViewerWrapper.tsx index 71c9840d0f2..22c1205551e 100644 --- a/server/sonar-web/src/main/js/apps/code/components/SourceViewerWrapper.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/SourceViewerWrapper.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner } from '@sonarsource/echoes-react'; -import { ToggleButton } from 'design-system'; import * as React from 'react'; +import { ToggleButton } from '~design-system'; import { Location } from '~sonar-aligned/types/router'; import withKeyboardNavigation from '../../../components/hoc/withKeyboardNavigation'; import SourceViewer from '../../../components/SourceViewer/SourceViewer'; diff --git a/server/sonar-web/src/main/js/apps/code/components/__tests__/SourceViewerWrapper-test.tsx b/server/sonar-web/src/main/js/apps/code/components/__tests__/SourceViewerWrapper-test.tsx index 6f298932e27..0056e489860 100644 --- a/server/sonar-web/src/main/js/apps/code/components/__tests__/SourceViewerWrapper-test.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/__tests__/SourceViewerWrapper-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import ComponentsServiceMock from '../../../../api/mocks/ComponentsServiceMock'; import IssuesServiceMock from '../../../../api/mocks/IssuesServiceMock'; import { mockLocation } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/apps/code/routes.tsx b/server/sonar-web/src/main/js/apps/code/routes.tsx index 11c029616c3..78395cf6fb7 100644 --- a/server/sonar-web/src/main/js/apps/code/routes.tsx +++ b/server/sonar-web/src/main/js/apps/code/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/code/utils.ts b/server/sonar-web/src/main/js/apps/code/utils.ts index caddcc41f85..b75313db6f7 100644 --- a/server/sonar-web/src/main/js/apps/code/utils.ts +++ b/server/sonar-web/src/main/js/apps/code/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRuleDetails-it.ts b/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRuleDetails-it.ts index fdf7ede0ade..37916c840b0 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRuleDetails-it.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRuleDetails-it.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { fireEvent, screen } from '@testing-library/react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import CodingRulesServiceMock, { RULE_TAGS_MOCK } from '../../../api/mocks/CodingRulesServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRules-it.ts b/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRules-it.ts index 711e7dbafb9..a68adfaaf8b 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRules-it.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRules-it.ts @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { screen, within } from '@testing-library/react'; + +import { screen, waitFor, waitForElementToBeRemoved, within } from '@testing-library/react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import CodingRulesServiceMock from '../../../api/mocks/CodingRulesServiceMock'; import SettingsServiceMock from '../../../api/mocks/SettingsServiceMock'; @@ -47,7 +48,7 @@ describe('Rules app list', () => { const { ui } = getPageObjects(); renderCodingRulesApp(); - await ui.appLoaded(); + await ui.listLoaded(); // Renders list rulesHandler @@ -100,7 +101,7 @@ describe('Rules app list', () => { settingsHandler.set(SettingsKey.MQRMode, 'false'); renderCodingRulesApp(); - await ui.appLoaded(); + await ui.listLoaded(); // Renders list rulesHandler @@ -148,7 +149,7 @@ describe('Rules app list', () => { it('combine facet filters', async () => { const { ui, user } = getPageObjects(); renderCodingRulesApp(mockCurrentUser()); - await ui.appLoaded(); + await ui.listLoaded(); expect(ui.getAllRuleListItems()).toHaveLength(11); @@ -184,7 +185,7 @@ describe('Rules app list', () => { it('filter by repository', async () => { const { ui, user } = getPageObjects(); renderCodingRulesApp(mockCurrentUser()); - await ui.appLoaded(); + await ui.listLoaded(); expect(ui.getAllRuleListItems()).toHaveLength(11); @@ -202,7 +203,7 @@ describe('Rules app list', () => { it('filter by quality profile, tag and search by tag, does not show prioritized rule', async () => { const { ui, user } = getPageObjects(); renderCodingRulesApp(mockCurrentUser()); - await ui.appLoaded(); + await ui.listLoaded(); expect(ui.getAllRuleListItems()).toHaveLength(11); @@ -227,7 +228,7 @@ describe('Rules app list', () => { it('filter by clean code category, software quality and severity', async () => { const { ui, user } = getPageObjects(); renderCodingRulesApp(mockCurrentUser()); - await ui.appLoaded(); + await ui.listLoaded(); expect(ui.getAllRuleListItems()).toHaveLength(11); // Filter by clean code category @@ -251,7 +252,7 @@ describe('Rules app list', () => { const { ui, user } = getPageObjects(); settingsHandler.set(SettingsKey.MQRMode, 'false'); renderCodingRulesApp(mockCurrentUser()); - await ui.appLoaded(); + await ui.listLoaded(); expect(ui.getAllRuleListItems()).toHaveLength(11); // Filter by type @@ -267,7 +268,7 @@ describe('Rules app list', () => { it('filter by standards', async () => { const { ui, user } = getPageObjects(); renderCodingRulesApp(mockCurrentUser()); - await ui.appLoaded(); + await ui.listLoaded(); expect(ui.getAllRuleListItems()).toHaveLength(11); await user.click(ui.standardsFacet.get()); @@ -300,7 +301,7 @@ describe('Rules app list', () => { it('filters by search', async () => { const { ui, user } = getPageObjects(); renderCodingRulesApp(mockCurrentUser()); - await ui.appLoaded(); + await ui.listLoaded(); await user.type(ui.searchInput.get(), 'Python'); expect(ui.getAllRuleListItems()).toHaveLength(4); @@ -310,10 +311,10 @@ describe('Rules app list', () => { expect(ui.getAllRuleListItems()).toHaveLength(1); }); - it('filter by quality profileand prioritizedRule', async () => { + it('filter by quality profile and prioritizedRule', async () => { const { ui, user } = getPageObjects(); renderCodingRulesApp(mockCurrentUser(), undefined, [Feature.PrioritizedRules]); - await ui.appLoaded(); + await ui.listLoaded(); expect(ui.getAllRuleListItems()).toHaveLength(11); @@ -344,7 +345,7 @@ describe('Rules app list', () => { const { ui, user } = getPageObjects(); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser()); - await ui.appLoaded(); + await ui.listLoaded(); await user.click(ui.facetItem('C').get()); await user.click(ui.bulkChangeButton.get()); @@ -362,12 +363,11 @@ describe('Rules app list', () => { const { ui, user } = getPageObjects(); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser()); - await ui.appLoaded(); + await ui.listLoaded(); const [selectQPSuccess, selectQPWarning] = rulesHandler.allQualityProfile('java'); const rulesCount = rulesHandler.allRulesCount(); - await ui.bulkActivate(rulesCount, selectQPSuccess); expect( @@ -391,7 +391,7 @@ describe('Rules app list', () => { const { ui } = getPageObjects(); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser()); - await ui.appLoaded(); + await ui.listLoaded(); const [selectQP] = rulesHandler.allQualityProfile('java'); const rulesCount = rulesHandler.allRulesCount(); @@ -413,7 +413,7 @@ describe('Rules app list', () => { const { ui, user } = getPageObjects(); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser(), undefined, [Feature.PrioritizedRules]); - await ui.appLoaded(); + await ui.listLoaded(); await user.click(ui.qpFacet.get()); await user.click(ui.facetItem('QP Bar Python').get()); @@ -441,7 +441,7 @@ describe('Rules app list', () => { await user.click(ui.prioritizedSwitch.get(ui.activateQPDialog.get())); await user.click(ui.activateButton.get(ui.activateQPDialog.get())); - expect(ui.activateButton.getAll()).toHaveLength(1); + await waitFor(() => expect(ui.activateButton.getAll()).toHaveLength(1)); expect(ui.changeButton('QP Bar').get()).toBeInTheDocument(); expect(ui.deactivateButton.getAll()).toHaveLength(1); @@ -478,7 +478,7 @@ describe('Rules app list', () => { settingsHandler.set(SettingsKey.QPAdminCanDisableInheritedRules, 'false'); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser(), undefined, [Feature.PrioritizedRules]); - await ui.appLoaded(); + await ui.listLoaded(); await user.click(ui.qpFacet.get()); await user.click(ui.facetItem('QP Bar Python').get()); @@ -508,8 +508,8 @@ describe('Rules app list', () => { await user.click(ui.revertToParentDefinitionButton.get()); await user.click(ui.yesButton.get()); + await waitForElementToBeRemoved(ui.revertToParentDefinitionButton.query()); expect(ui.getAllRuleListItems()).toHaveLength(1); - expect(ui.revertToParentDefinitionButton.query()).not.toBeInTheDocument(); expect(ui.deactivateButton.get()).toBeInTheDocument(); expect(ui.deactivateButton.get()).toBeDisabled(); expect(ui.changeButton('QP Bar').get()).toBeInTheDocument(); @@ -529,7 +529,7 @@ describe('Rules app list', () => { settingsHandler.set(SettingsKey.QPAdminCanDisableInheritedRules, 'false'); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser(), undefined, [Feature.PrioritizedRules]); - await ui.appLoaded(); + await ui.facetsLoaded(); await user.click(ui.qpFacet.get()); await user.click(ui.facetItem('QP Bar Python').get()); @@ -560,7 +560,7 @@ describe('Rules app list', () => { const { ui, user } = getPageObjects(); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser(), undefined, []); - await ui.appLoaded(); + await ui.facetsLoaded(); await user.click(ui.qpFacet.get()); await user.click(ui.facetItem('QP Bar Python').get()); @@ -586,7 +586,7 @@ describe('Rules app list', () => { await user.click(ui.activateButton.get(ui.activateQPDialog.get())); - expect(ui.activateButton.getAll()).toHaveLength(1); + await waitFor(() => expect(ui.activateButton.getAll()).toHaveLength(1)); expect(ui.changeButton('QP Bar').get()).toBeInTheDocument(); expect(ui.deactivateButton.getAll()).toHaveLength(1); @@ -628,7 +628,7 @@ describe('Rules app list', () => { settingsHandler.set(SettingsKey.QPAdminCanDisableInheritedRules, 'false'); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser(), undefined, [Feature.PrioritizedRules]); - await ui.appLoaded(); + await ui.listLoaded(); await user.click(ui.qpFacet.get()); await user.click(ui.facetItem('QP Bar Python').get()); @@ -665,8 +665,8 @@ describe('Rules app list', () => { await user.click(ui.revertToParentDefinitionButton.get()); await user.click(ui.yesButton.get()); + await waitForElementToBeRemoved(ui.revertToParentDefinitionButton.query()); expect(ui.getAllRuleListItems()).toHaveLength(1); - expect(ui.revertToParentDefinitionButton.query()).not.toBeInTheDocument(); expect(ui.deactivateButton.get()).toBeInTheDocument(); expect(ui.deactivateButton.get()).toBeDisabled(); expect(ui.changeButton('QP Bar').get()).toBeInTheDocument(); @@ -691,7 +691,7 @@ describe('Rules app list', () => { settingsHandler.set(SettingsKey.QPAdminCanDisableInheritedRules, 'false'); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser(), undefined, []); - await ui.appLoaded(); + await ui.facetsLoaded(); await user.click(ui.qpFacet.get()); await user.click(ui.facetItem('QP Bar Python').get()); @@ -719,7 +719,7 @@ describe('Rules app list', () => { settingsHandler.set(SettingsKey.QPAdminCanDisableInheritedRules, 'false'); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser(), undefined, []); - await ui.appLoaded(); + await ui.facetsLoaded(); await user.click(ui.qpFacet.get()); await user.click(ui.facetItem('QP Bar Python').get()); @@ -757,7 +757,7 @@ describe('Rules app list', () => { const { ui, user } = getPageObjects(); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser()); - await ui.appLoaded(); + await ui.facetsLoaded(); await user.click(ui.qpFacet.get()); await user.click(ui.facetItem('QP Bar Python').get()); @@ -774,7 +774,7 @@ describe('Rules app list', () => { mockLoggedInUser(), 'coding_rules?activation=true&tags=cute&qprofile=' + QP_2, ); - await ui.appLoaded(); + await ui.listLoaded(); // Only rule 9 is shown (inherited, activated) expect(ui.getAllRuleListItems()).toHaveLength(1); @@ -784,7 +784,7 @@ describe('Rules app list', () => { it('navigates by keyboard', async () => { const { user, ui } = getPageObjects(); renderCodingRulesApp(); - await ui.appLoaded(); + await ui.listLoaded(); expect( ui.ruleListItemLink('Awsome java rule').get(ui.currentListItem.get()), @@ -812,8 +812,8 @@ describe('redirects', () => { it('should open with permalink', async () => { const { ui } = getPageObjects(); renderCodingRulesApp(undefined, 'coding_rules?rule_key=rule1'); - await ui.appLoaded(); - expect(ui.ruleListItemLink('Awsome java rule').get()).toBeInTheDocument(); + await ui.listLoaded(); + expect(await ui.ruleListItemLink('Awsome java rule').find()).toBeInTheDocument(); expect(ui.ruleListItemLink('Hot hotspot').query()).not.toBeInTheDocument(); }); @@ -824,7 +824,7 @@ describe('redirects', () => { mockLoggedInUser(), 'coding_rules#languages=c,js|impactSoftwareQualities=MAINTAINABILITY|cleanCodeAttributeCategories=INTENTIONAL', ); - await ui.appLoaded(); + await ui.facetsLoaded(); await user.click(ui.cleanCodeCategoriesFacet.get()); expect( await ui.facetItem('issue.clean_code_attribute_category.INTENTIONAL').find(), @@ -845,7 +845,7 @@ describe('redirects', () => { mockLoggedInUser(), 'coding_rules#languages=c,js|severities=MAJOR|types=BUG', ); - await ui.appLoaded(); + await ui.listLoaded(); expect(ui.facetItem(/issue.type.BUG/).get()).toBeChecked(); expect(ui.facetItem(/severity.MAJOR/).get()).toBeChecked(); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CustomRule-it.ts b/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CustomRule-it.ts index cc8644c433a..0deaa28759c 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CustomRule-it.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CustomRule-it.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import CodingRulesServiceMock from '../../../api/mocks/CodingRulesServiceMock'; import SettingsServiceMock from '../../../api/mocks/SettingsServiceMock'; @@ -37,9 +38,9 @@ describe('custom rule', () => { const { ui, user } = getPageObjects(); rulesHandler.setIsAdmin(); renderCodingRulesApp(mockLoggedInUser()); - await ui.appLoaded(); + await ui.facetsLoaded(); - await user.click(ui.templateFacet.get()); + await user.click(await ui.templateFacet.find()); await user.click(ui.facetItem('coding_rules.filters.template.is_template').get()); // Shows only one template rule @@ -172,7 +173,7 @@ describe('custom rule', () => { it('anonymous user cannot modify custom rule', async () => { const { ui } = getPageObjects(); renderCodingRulesApp(undefined, 'coding_rules?open=rule9'); - await ui.appLoaded(); + await ui.facetsLoaded(); expect(ui.editCustomRuleButton.query()).not.toBeInTheDocument(); expect(ui.deleteButton.query()).not.toBeInTheDocument(); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx index 01291c91d3a..46dd78f6c72 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DangerButtonSecondary } from 'design-system'; -import * as React from 'react'; + +import { DangerButtonSecondary } from '~design-system'; import { Profile } from '../../../api/quality-profiles'; import ConfirmButton from '../../../components/controls/ConfirmButton'; import Tooltip from '../../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx index e88e698bc7c..73eb3c8e1af 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; import * as React from 'react'; import { Profile as BaseProfile } from '../../../api/quality-profiles'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx index 34a2c6750f1..e38bd8724d8 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx @@ -19,6 +19,8 @@ */ import { Button, ButtonVariety, Checkbox, Modal, Select, Text } from '@sonarsource/echoes-react'; +import * as React from 'react'; +import { FormattedMessage, useIntl } from 'react-intl'; import { FlagMessage, FormField, @@ -27,9 +29,7 @@ import { Note, SafeHTMLInjection, SanitizeLevel, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage, useIntl } from 'react-intl'; +} from '~design-system'; import { Profile } from '../../../api/quality-profiles'; import { useAvailableFeatures } from '../../../app/components/available-features/withAvailableFeatures'; import DocumentationLink from '../../../components/common/DocumentationLink'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/AttributeCategoryFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/AttributeCategoryFacet.tsx index 76f99ceeb88..24a55ec6f52 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/AttributeCategoryFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/AttributeCategoryFacet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import Facet, { BasicProps } from '../../../components/facets/Facet'; import { CLEAN_CODE_CATEGORIES } from '../../../helpers/constants'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/AvailableSinceFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/AvailableSinceFacet.tsx index ac52b6f2cbf..94d2c7b943c 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/AvailableSinceFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/AvailableSinceFacet.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DatePicker, FacetBox } from 'design-system'; + import * as React from 'react'; import { WrappedComponentProps, injectIntl } from 'react-intl'; +import { DatePicker, FacetBox } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Query } from '../query'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx index 9eb641e5e1c..b25dcb76ad6 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { ButtonPrimary, ButtonSecondary, @@ -25,8 +27,7 @@ import { ItemButton, PopupPlacement, PopupZLevel, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { Profile } from '../../../api/quality-profiles'; import Tooltip from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx index 76fb3dd19f4..3b179d629c0 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, FormField, Modal, Spinner } from 'design-system'; import * as React from 'react'; +import { FlagMessage, FormField, Modal, Spinner } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { Profile, bulkActivateRules, bulkDeactivateRules } from '../../../api/quality-profiles'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesApp.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesApp.tsx index 11a9e393c7f..1625138526e 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesApp.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesApp.tsx @@ -19,6 +19,9 @@ */ import styled from '@emotion/styled'; +import { keyBy } from 'lodash'; +import * as React from 'react'; +import { Helmet } from 'react-helmet-async'; import { InputSearch, LAYOUT_FOOTER_HEIGHT, @@ -27,10 +30,7 @@ import { PageContentFontWrapper, themeBorder, themeColor, -} from 'design-system'; -import { keyBy } from 'lodash'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; +} from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location, RawQuery, Router } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleButton.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleButton.tsx index 6612ba3fec2..2e6fe61a4e4 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleButton.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleButton.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { RuleDetails } from '../../../types/types'; import CustomRuleFormModal from './CustomRuleFormModal'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormFieldsCCT.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormFieldsCCT.tsx index 5482b9a4147..e7e9ee0fc50 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormFieldsCCT.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormFieldsCCT.tsx @@ -17,6 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import React from 'react'; +import { useIntl } from 'react-intl'; import { Checkbox, FormField, @@ -25,9 +28,7 @@ import { LightPrimary, RequiredIcon, TextError, -} from 'design-system'; -import React from 'react'; -import { useIntl } from 'react-intl'; +} from '~design-system'; import SoftwareImpactSeverityIcon from '../../../components/icon-mappers/SoftwareImpactSeverityIcon'; import { CLEAN_CODE_ATTRIBUTES_BY_CATEGORY, diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx index 2c6fb0cd8e6..033a51e30a9 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx @@ -19,6 +19,7 @@ */ import { HttpStatusCode } from 'axios'; +import * as React from 'react'; import { ButtonPrimary, FlagMessage, @@ -31,8 +32,7 @@ import { Modal, SafeHTMLInjection, SanitizeLevel, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { Status } from '~sonar-aligned/types/common'; import FormattingTips from '../../../components/common/FormattingTips'; import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/FacetsList.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/FacetsList.tsx index ec284499b1d..09e6f4d85dc 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/FacetsList.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/FacetsList.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator } from 'design-system'; -import * as React from 'react'; + +import { BasicSeparator } from '~design-system'; import { Profile } from '../../../api/quality-profiles'; import { useAvailableFeatures } from '../../../app/components/available-features/withAvailableFeatures'; import SeverityFacet from '../../../components/facets/SeverityFacet'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/InheritanceFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/InheritanceFacet.tsx index 92080f9afef..621e04251b8 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/InheritanceFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/InheritanceFacet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import Facet, { BasicProps } from '../../../components/facets/Facet'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx index e5180548a6f..676649d3edc 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { KeyboardHint } from 'design-system'; -import * as React from 'react'; + +import { KeyboardHint } from '~design-system'; import PageCounter from '../../../components/common/PageCounter'; import { translate } from '../../../helpers/l10n'; import { Paging } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/PrioritizedRulesFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/PrioritizedRulesFacet.tsx index f739939fd89..2119ca6af5d 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/PrioritizedRulesFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/PrioritizedRulesFacet.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import Facet, { BasicProps } from '../../../components/facets/Facet'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ProfileFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ProfileFacet.tsx index a3713635afc..34fba4ff3cd 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ProfileFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ProfileFacet.tsx @@ -19,9 +19,9 @@ */ import styled from '@emotion/styled'; -import { FacetBox, FacetItem, HelperHintIcon, Note, themeColor } from 'design-system'; import { sortBy } from 'lodash'; import * as React from 'react'; +import { FacetBox, FacetItem, HelperHintIcon, Note, themeColor } from '~design-system'; import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip'; import { Profile } from '../../../api/quality-profiles'; import { DocLink } from '../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/QualityProfileSelector.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/QualityProfileSelector.tsx index 14d5c97f445..48216c0c223 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/QualityProfileSelector.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/QualityProfileSelector.tsx @@ -17,14 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { Dropdown, InputMultiSelect, MultiSelector, PopupPlacement, PopupZLevel, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { Profile } from '../../../api/quality-profiles'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RemoveExtendedDescriptionModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RemoveExtendedDescriptionModal.tsx index e53add9c1e3..6e1dd31b319 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RemoveExtendedDescriptionModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RemoveExtendedDescriptionModal.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal } from 'design-system'; import * as React from 'react'; +import { Modal } from '~design-system'; import { translate } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RepositoryFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RepositoryFacet.tsx index 997f2f4bed1..359a10585c8 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RepositoryFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RepositoryFacet.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Note } from 'design-system'; + import * as React from 'react'; +import { Note } from '~design-system'; import { getRuleRepositories } from '../../../api/rules'; import withLanguagesContext from '../../../app/components/languages/withLanguagesContext'; import { BasicProps } from '../../../components/facets/Facet'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx index eac729a717b..e316ec4b16a 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Button, ButtonVariety } from '@sonarsource/echoes-react'; import { @@ -26,8 +27,7 @@ import { SubHeadingHighlight, themeBorder, themeColor, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { Profile } from '../../../api/quality-profiles'; import ConfirmButton from '../../../components/controls/ConfirmButton'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx index d0799052306..8b6f4c6cd63 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx @@ -17,7 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; +import { sortBy } from 'lodash'; +import * as React from 'react'; import { ButtonSecondary, ContentCell, @@ -27,9 +30,7 @@ import { Table, TableRow, UnorderedList, -} from 'design-system'; -import { sortBy } from 'lodash'; -import * as React from 'react'; +} from '~design-system'; import ConfirmButton from '../../../components/controls/ConfirmButton'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getRuleUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx index 5b1dffbbc25..b586260764a 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety, Spinner } from '@sonarsource/echoes-react'; import { ButtonPrimary, @@ -24,7 +25,7 @@ import { CodeSyntaxHighlighter, InputTextArea, SanitizeLevel, -} from 'design-system'; +} from '~design-system'; import * as React from 'react'; import FormattingTips from '../../../components/common/FormattingTips'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeader.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeader.tsx index abfad7d1414..87ef193f866 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeader.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeader.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IconLink } from '@sonarsource/echoes-react'; -import { ClipboardIconButton, IssueMessageHighlighting, Title } from 'design-system'; -import * as React from 'react'; +import { ClipboardIconButton, IssueMessageHighlighting, Title } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { getPathUrlAsString, getRuleUrl } from '../../../helpers/urls'; import { Dict, RuleDetails } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderActions.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderActions.tsx index 8660d34ebaf..a7761dba16e 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderActions.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderActions.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Note } from 'design-system'; -import * as React from 'react'; +import { Note } from '~design-system'; import TagsList from '../../../components/tags/TagsList'; import { translate } from '../../../helpers/l10n'; import { Dict, RuleDetails } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderMeta.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderMeta.tsx index b8e472a8ee4..579214199bc 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderMeta.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderMeta.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, HelperHintIcon, Link, Note, SeparatorCircleIcon } from 'design-system'; -import React from 'react'; + +import { Badge, HelperHintIcon, Link, Note, SeparatorCircleIcon } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import Tooltip from '../../../components/controls/Tooltip'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderSide.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderSide.tsx index 25b8bc60b9b..24a266dae1f 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderSide.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderSide.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { LightLabel, themeBorder } from 'design-system'; import React from 'react'; +import { LightLabel, themeBorder } from '~design-system'; import { CleanCodeAttributePill } from '../../../components/shared/CleanCodeAttributePill'; import SoftwareImpactPillList from '../../../components/shared/SoftwareImpactPillList'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx index a4080ff26ee..faa28b8d517 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, Link, Spinner, SubTitle, Table, TableRow } from 'design-system'; + import { keyBy } from 'lodash'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { ContentCell, Link, Spinner, SubTitle, Table, TableRow } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { getComponentData } from '../../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx index 316e72a51aa..94718744f82 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx @@ -26,8 +26,7 @@ import { SubHeadingHighlight, Table, TableRow, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { RuleParameter } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx index ca442e52907..11664d3f1ba 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx @@ -20,6 +20,8 @@ import styled from '@emotion/styled'; import { LinkStandalone, Text, Tooltip } from '@sonarsource/echoes-react'; +import { filter, isEqual } from 'lodash'; +import { FormattedMessage } from 'react-intl'; import { ActionCell, CellComponent, @@ -32,10 +34,7 @@ import { Table, TableRow, TableRowInteractive, -} from 'design-system'; -import { filter, isEqual } from 'lodash'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { Profile } from '../../../api/quality-profiles'; import { SOFTWARE_QUALITIES } from '../../../helpers/constants'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsTagsPopup.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsTagsPopup.tsx index 188cde32c99..2e4ac762832 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsTagsPopup.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsTagsPopup.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { MultiSelector } from 'design-system'; + import { difference, uniq, without } from 'lodash'; import * as React from 'react'; +import { MultiSelector } from '~design-system'; import { getRuleTags } from '../../../api/rules'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx index 607c206990d..956491c9049 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx @@ -20,6 +20,7 @@ import styled from '@emotion/styled'; import { Button, ButtonVariety } from '@sonarsource/echoes-react'; +import * as React from 'react'; import { Badge, InheritanceIcon, @@ -28,8 +29,7 @@ import { SeparatorCircleIcon, TextSubdued, themeBorder, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { Profile } from '../../../api/quality-profiles'; import Tooltip from '../../../components/controls/Tooltip'; import { CleanCodeAttributePill } from '../../../components/shared/CleanCodeAttributePill'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/SecurityHotspotFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/SecurityHotspotFacet.tsx index 6921685b547..21018cc2631 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/SecurityHotspotFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/SecurityHotspotFacet.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import Facet, { BasicProps } from '../../../components/facets/Facet'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/SeveritySelect.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/SeveritySelect.tsx index 2822ee68ab4..dad2b8e38b8 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/SeveritySelect.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/SeveritySelect.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { HelperText, Select } from '@sonarsource/echoes-react'; import { isEmpty } from 'lodash'; -import * as React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import SeverityIcon from '../../../components/icon-mappers/SeverityIcon'; import SoftwareImpactSeverityIcon from '../../../components/icon-mappers/SoftwareImpactSeverityIcon'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/SoftwareQualityFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/SoftwareQualityFacet.tsx index 26151da5286..0d846dd8449 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/SoftwareQualityFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/SoftwareQualityFacet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import Facet, { BasicProps } from '../../../components/facets/Facet'; import { SOFTWARE_QUALITIES } from '../../../helpers/constants'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/StatusFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/StatusFacet.tsx index e7d03dc66d2..3b9f9ed66eb 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/StatusFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/StatusFacet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import Facet, { BasicProps } from '../../../components/facets/Facet'; import { RULE_STATUSES } from '../../../helpers/constants'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx index ae3b0b11a13..0e623377c55 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/TagFacet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { uniq } from 'lodash'; import * as React from 'react'; import { getRuleTags } from '../../../api/rules'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/TemplateFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/TemplateFacet.tsx index 3d49c68bcb9..8cf594ced8e 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/TemplateFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/TemplateFacet.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HelperHintIcon } from 'design-system'; + import * as React from 'react'; +import { HelperHintIcon } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import Facet, { BasicProps } from '../../../components/facets/Facet'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/TypeFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/TypeFacet.tsx index 09ba4b0635d..2fc58124f0e 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/TypeFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/TypeFacet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import Facet, { BasicProps } from '../../../components/facets/Facet'; import IssueTypeIcon from '../../../components/icon-mappers/IssueTypeIcon'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/query.ts b/server/sonar-web/src/main/js/apps/coding-rules/query.ts index db6f4b9925f..96937f86c9e 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/query.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/query.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { RawQuery } from '~sonar-aligned/types/router'; import { cleanQuery, diff --git a/server/sonar-web/src/main/js/apps/coding-rules/routes.tsx b/server/sonar-web/src/main/js/apps/coding-rules/routes.tsx index 67a18a55a23..f859fe1fa64 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/routes.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/routes.tsx @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React, { useEffect } from 'react'; + +import { useEffect } from 'react'; import { Route, useLocation, useNavigate } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; import { RawQuery } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule.ts b/server/sonar-web/src/main/js/apps/coding-rules/rule.ts index 1e9cc72ab39..2b4938628b2 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum RuleDescriptionSections { DEFAULT = 'default', INTRODUCTION = 'introduction', diff --git a/server/sonar-web/src/main/js/apps/coding-rules/utils-tests.tsx b/server/sonar-web/src/main/js/apps/coding-rules/utils-tests.tsx index 171143c0eac..3398f943ff7 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/utils-tests.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/utils-tests.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { waitFor } from '@testing-library/react'; + import userEvent from '@testing-library/user-event'; import { byLabelText, @@ -51,6 +51,7 @@ const selectors = { currentListItem: byRole('listitem', { current: true }), // Filters + filtersHeading: byRole('heading', { name: 'filters' }), searchInput: byRole('searchbox', { name: 'search.search_for_rules' }), clearAllFiltersButton: byRole('button', { name: 'clear_all_filters' }), @@ -219,15 +220,19 @@ export function getPageObjects() { const ui = { ...selectors, - async appLoaded() { - await waitFor(() => { - expect(selectors.loading.query()).not.toBeInTheDocument(); - }); + + async listLoaded() { + expect(await selectors.filtersHeading.find()).toBeInTheDocument(); + expect(await selectors.rulesList.find()).toBeInTheDocument(); + }, + + async facetsLoaded() { + expect(await selectors.filtersHeading.find()).toBeInTheDocument(); }, async detailsloaded() { expect(await byRole('heading', { level: 1 }).find()).toBeInTheDocument(); - await ui.appLoaded(); + await ui.facetsLoaded(); }, async bulkActivate(rulesCount: number, profile: Profile) { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/utils.ts b/server/sonar-web/src/main/js/apps/coding-rules/utils.ts index 7997b701db8..9c175abefb5 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/utils.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { omit } from 'lodash'; import { RestRuleDetails, RuleDetails } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/__tests__/ComponentMeasures-it.tsx b/server/sonar-web/src/main/js/apps/component-measures/__tests__/ComponentMeasures-it.tsx index a3f42dde545..03805f6a7ea 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/__tests__/ComponentMeasures-it.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/__tests__/ComponentMeasures-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { times } from 'lodash'; @@ -43,8 +44,9 @@ jest.mock('lodash', () => ({ jest.mock('../../../api/metrics', () => { const { DEFAULT_METRICS } = jest.requireActual('../../../helpers/mocks/metrics'); + const { MetricKey } = jest.requireActual('~sonar-aligned/types/metrics'); const metrics = Object.values(MetricKey).map( - (key) => DEFAULT_METRICS[key] ?? mockMetric({ key }), + (key: MetricKey) => DEFAULT_METRICS[key] ?? mockMetric({ key }), ); return { getAllMetrics: jest.fn().mockResolvedValue(metrics), diff --git a/server/sonar-web/src/main/js/apps/component-measures/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/component-measures/__tests__/utils-test.ts index fac4fe99f9c..bab19b9000d 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/component-measures/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { MeasurePageView } from '../../../types/measures'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/ComponentMeasuresApp.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/ComponentMeasuresApp.tsx index f1a488cb6bd..f9374ff0488 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/ComponentMeasuresApp.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/ComponentMeasuresApp.tsx @@ -21,6 +21,8 @@ import { withTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { Spinner } from '@sonarsource/echoes-react'; +import * as React from 'react'; +import { Helmet } from 'react-helmet-async'; import { FlagMessage, LargeCenteredLayout, @@ -28,9 +30,7 @@ import { PageContentFontWrapper, themeBorder, themeColor, -} from 'design-system'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; +} from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter'; import { getBranchLikeQuery, isPullRequest } from '~sonar-aligned/helpers/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx index 6875d248493..43c1bdd082d 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { differenceInDays } from 'date-fns'; -import { Highlight, Note, themeBorder, themeColor } from 'design-system'; import * as React from 'react'; import { WrappedComponentProps, injectIntl } from 'react-intl'; +import { Highlight, Note, themeBorder, themeColor } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import Tooltip from '../../../components/controls/Tooltip'; import DateFormatter, { longFormatterOption } from '../../../components/intl/DateFormatter'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx index 332801e1d32..70980a390dd 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { keepPreviousData } from '@tanstack/react-query'; -import { Highlight, KeyboardHint } from 'design-system'; import * as React from 'react'; +import { Highlight, KeyboardHint } from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContentHeader.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContentHeader.tsx index 810ba9fb284..0da389ee738 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContentHeader.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContentHeader.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { themeBorder } from 'design-system'; import * as React from 'react'; +import { themeBorder } from '~design-system'; interface Props { left: React.ReactNode; diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx index 1560017daaa..88a8acb03ff 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { LinkStandalone } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import * as React from 'react'; import Measure from '~sonar-aligned/components/measure/Measure'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx index 6a939589dc3..be8f2d70ef7 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { useMetrics } from '../../../app/components/metrics/withMetricsContext'; import SourceViewer from '../../../components/SourceViewer/SourceViewer'; import { getProjectUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx index 7a7913f285a..8df28ed1389 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Select } from '@sonarsource/echoes-react'; import * as React from 'react'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresBreadcrumbs.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresBreadcrumbs.tsx index 28648e7acd1..6c2a73bbe40 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresBreadcrumbs.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresBreadcrumbs.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { Breadcrumbs, ClipboardIconButton, HoverLink } from 'design-system'; import * as React from 'react'; +import { Breadcrumbs, ClipboardIconButton, HoverLink } from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { getBreadcrumbs } from '../../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresEmpty.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresEmpty.tsx index efe76725ca3..bcdfb8617d5 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresEmpty.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresEmpty.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Note } from 'design-system'; -import * as React from 'react'; + +import { Note } from '~design-system'; import { translate } from '../../../helpers/l10n'; export default function MeasuresEmpty() { diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/LeakPeriodLegend-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/LeakPeriodLegend-test.tsx index 879da57177d..806cc0056e6 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/LeakPeriodLegend-test.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/LeakPeriodLegend-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { mockComponentMeasure } from '../../../../helpers/mocks/component'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/config/bubbles.ts b/server/sonar-web/src/main/js/apps/component-measures/config/bubbles.ts index 74b1325d3d6..a63963f7b09 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/config/bubbles.ts +++ b/server/sonar-web/src/main/js/apps/component-measures/config/bubbles.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey } from '~sonar-aligned/types/metrics'; export type BubblesByDomain = Record< diff --git a/server/sonar-web/src/main/js/apps/component-measures/config/complementary.ts b/server/sonar-web/src/main/js/apps/component-measures/config/complementary.ts index bd6c430b8c5..8e82e3fcb12 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/config/complementary.ts +++ b/server/sonar-web/src/main/js/apps/component-measures/config/complementary.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey } from '~sonar-aligned/types/metrics'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/config/domains.ts b/server/sonar-web/src/main/js/apps/component-measures/config/domains.ts index 63a5e81c842..93db7f74622 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/config/domains.ts +++ b/server/sonar-web/src/main/js/apps/component-measures/config/domains.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey } from '~sonar-aligned/types/metrics'; import { SOFTWARE_QUALITY_RATING_METRICS_MAP } from '../../../helpers/constants'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx index 23d50b687ad..1107b0a116a 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx @@ -17,8 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; +import * as React from 'react'; import { BubbleColorVal, HelperHintIcon, @@ -27,8 +29,7 @@ import { BubbleChart as OriginalBubbleChart, themeColor, themeContrast, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ColorRatingsLegend.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ColorRatingsLegend.tsx index b765f2e4a25..ebc774d0aec 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ColorRatingsLegend.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ColorRatingsLegend.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { BubbleColorVal, @@ -24,8 +25,7 @@ import { ColorsLegend, themeColor, themeContrast, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx index 28563b0124e..b70a2520090 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, HoverLink, Note, QualifierIcon } from 'design-system'; -import * as React from 'react'; + import { To } from 'react-router-dom'; +import { ContentCell, HoverLink, Note, QualifierIcon } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { fillBranchLike } from '../../../helpers/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx index 674b934c3b5..b20c7a24f3e 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentsList.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, NumericalCell, Table, TableRow, TableRowInteractive } from 'design-system'; + import { times } from 'lodash'; -import * as React from 'react'; +import { ContentCell, NumericalCell, Table, TableRow, TableRowInteractive } from '~design-system'; import { getLocalizedMetricName } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import { MeasurePageView } from '../../../types/measures'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/EmptyResult.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/EmptyResult.tsx index e5ae84d0dc3..108b4fe4695 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/EmptyResult.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/EmptyResult.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Note } from 'design-system'; -import * as React from 'react'; + +import { Note } from '~design-system'; import { translate } from '../../../helpers/l10n'; export default function EmptyResult() { diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx index 2ef61788977..3b30942af4f 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { FlagMessage } from 'design-system'; import { throttle } from 'lodash'; import * as React from 'react'; +import { FlagMessage } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import ListFooter from '../../../components/controls/ListFooter'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/MeasureCell.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/MeasureCell.tsx index a3de418f7f8..e4661f2acb2 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/MeasureCell.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/MeasureCell.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NumericalCell } from 'design-system'; -import * as React from 'react'; + +import { NumericalCell } from '~design-system'; import Measure from '~sonar-aligned/components/measure/Measure'; import { getCCTMeasureValue, isDiffMetric } from '../../../helpers/measures'; import { BranchLike } from '../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.tsx index 27b3dd2832e..4be906a3b7c 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.tsx @@ -17,7 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { scaleLinear, scaleOrdinal } from 'd3-scale'; +import { isEmpty } from 'lodash'; +import * as React from 'react'; +import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; import { CSSColor, Note, @@ -28,10 +32,7 @@ import { TreeMapItem, themeColor, withTheme, -} from 'design-system'; -import { isEmpty } from 'lodash'; -import * as React from 'react'; -import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; +} from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import ColorBoxLegend from '../../../components/charts/ColorBoxLegend'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/routes.tsx b/server/sonar-web/src/main/js/apps/component-measures/routes.tsx index debc43d2744..bd5fc98bf99 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/routes.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Navigate, Route, useParams, useSearchParams } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; import { searchParamsToQuery } from '~sonar-aligned/helpers/router'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainSubnavigation.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainSubnavigation.tsx index ef1702f1db3..9e336a1ff50 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainSubnavigation.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainSubnavigation.tsx @@ -17,13 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { HelperHintIcon, SubnavigationAccordion, SubnavigationItem, SubnavigationSubheading, -} from 'design-system'; -import React from 'react'; +} from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { getLocalizedCategoryMetricName, diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainSubnavigationItem.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainSubnavigationItem.tsx index cfb2184ff25..4fedd9f8eeb 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainSubnavigationItem.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainSubnavigationItem.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SubnavigationItem } from 'design-system'; -import React from 'react'; + +import { SubnavigationItem } from '~design-system'; import { MeasureEnhanced } from '../../../types/types'; import SubnavigationMeasureValue from './SubnavigationMeasureValue'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx index 618c42a30d3..a2c7f0a950f 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx @@ -17,8 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { withTheme } from '@emotion/react'; import styled from '@emotion/styled'; +import * as React from 'react'; import { LAYOUT_FOOTER_HEIGHT, LAYOUT_GLOBAL_NAV_HEIGHT, @@ -27,8 +29,7 @@ import { SubnavigationItem, themeBorder, themeColor, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import { translate } from '../../../helpers/l10n'; import useFollowScroll from '../../../hooks/useFollowScroll'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/SubnavigationMeasureValue.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/SubnavigationMeasureValue.tsx index 368ceb42fb4..854139a6533 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/SubnavigationMeasureValue.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/SubnavigationMeasureValue.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Note } from 'design-system'; -import React from 'react'; + +import { Note } from '~design-system'; import Measure from '~sonar-aligned/components/measure/Measure'; import { useComponent } from '../../../app/components/componentContext/withComponentContext'; import { isDiffMetric } from '../../../helpers/measures'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/utils.ts b/server/sonar-web/src/main/js/apps/component-measures/utils.ts index f277a75fd35..c4defaf8727 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/utils.ts +++ b/server/sonar-web/src/main/js/apps/component-measures/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { groupBy, memoize, sortBy, toPairs } from 'lodash'; import { isBranch, isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/create/project/Azure/AzurePersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/Azure/AzurePersonalAccessTokenForm.tsx index 26a4acdd163..a9019599b34 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Azure/AzurePersonalAccessTokenForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Azure/AzurePersonalAccessTokenForm.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { FormattedMessage } from 'react-intl'; import { ButtonPrimary, FlagErrorIcon, @@ -26,9 +28,7 @@ import { LightPrimary, Link, Spinner, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { AlmSettingsInstance } from '../../../../types/alm-settings'; import { usePersonalAccessToken } from '../usePersonalAccessToken'; diff --git a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectAccordion.tsx b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectAccordion.tsx index c1cd6b2f34f..d68963f9839 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectAccordion.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectAccordion.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Accordion, FlagMessage, Link, SearchHighlighter, Spinner } from 'design-system'; + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Accordion, FlagMessage, Link, SearchHighlighter, Spinner } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import ListFooter from '../../../../components/controls/ListFooter'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreate.tsx index 7a0fb275869..cbe22ee9c23 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreate.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LabelValueSelectOption } from 'design-system'; -import React, { useCallback, useMemo, useState } from 'react'; + +import { useCallback, useMemo, useState } from 'react'; import { GroupBase } from 'react-select'; +import { LabelValueSelectOption } from '~design-system'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import { getAzureProjects, diff --git a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreateRenderer.tsx index 422dab7e26d..92384fa8db8 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreateRenderer.tsx @@ -17,16 +17,17 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Link, Spinner } from '@sonarsource/echoes-react'; +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { FlagMessage, InputSearch, LightPrimary, PageContentFontWrapper, Title, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { useAppState } from '../../../../app/components/app-state/withAppStateContext'; import { AvailableFeaturesContext } from '../../../../app/components/available-features/AvailableFeaturesContext'; diff --git a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectsList.tsx b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectsList.tsx index f45f62f37cc..be715a603c6 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectsList.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectsList.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, Link } from 'design-system'; + import { uniqBy } from 'lodash'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Link } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import ListFooter from '../../../../components/controls/ListFooter'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudPersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudPersonalAccessTokenForm.tsx index 40d9b01f55d..8138ae8d45a 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudPersonalAccessTokenForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudPersonalAccessTokenForm.tsx @@ -17,7 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Link, Spinner } from '@sonarsource/echoes-react'; +import { FormattedMessage } from 'react-intl'; import { ButtonPrimary, FlagErrorIcon, @@ -25,9 +27,7 @@ import { FormField, InputField, LightPrimary, -} from 'design-system'; -import React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { AlmInstanceBase } from '../../../../types/alm-settings'; import { usePersonalAccessToken } from '../usePersonalAccessToken'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreate.tsx index a9081c898f5..6ec631fb165 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreate.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LabelValueSelectOption } from 'design-system'; -import React, { useCallback, useMemo, useState } from 'react'; + +import { useCallback, useMemo, useState } from 'react'; +import { LabelValueSelectOption } from '~design-system'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import { searchForBitbucketCloudRepositories } from '../../../../api/alm-integrations'; import { BitbucketCloudRepository } from '../../../../types/alm-integration'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreateRender.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreateRender.tsx index a2c3e2cc7c2..c5925974c38 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreateRender.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreateRender.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Link, Spinner } from '@sonarsource/echoes-react'; -import { LightPrimary, Title } from 'design-system'; -import React, { useContext } from 'react'; +import { useContext } from 'react'; import { FormattedMessage } from 'react-intl'; +import { LightPrimary, Title } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { AvailableFeaturesContext } from '../../../../app/components/available-features/AvailableFeaturesContext'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudSearchForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudSearchForm.tsx index 3e49260dbfe..f2c56eabbac 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudSearchForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudSearchForm.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, InputSearch, LightPrimary, Link } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { FlagMessage, InputSearch, LightPrimary, Link } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import ListFooter from '../../../../components/controls/ListFooter'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketImportRepositoryForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketImportRepositoryForm.tsx index 7f30dbe9db7..9347f8370c4 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketImportRepositoryForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketImportRepositoryForm.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, InputSearch, Link } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { FlagMessage, InputSearch, Link } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { translate } from '../../../../helpers/l10n'; import { BitbucketProject, BitbucketRepository } from '../../../../types/alm-integration'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectAccordion.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectAccordion.tsx index 26c88c7b535..71462c7d0b2 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectAccordion.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectAccordion.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Accordion, FlagMessage, Link } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { Accordion, FlagMessage, Link } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { getBaseUrl } from '../../../../helpers/system'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreate.tsx index a0435481bc5..394d290ad1a 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreate.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LabelValueSelectOption } from 'design-system'; -import React, { useCallback, useMemo } from 'react'; + +import { useCallback, useMemo } from 'react'; import { GroupBase } from 'react-select'; +import { LabelValueSelectOption } from '~design-system'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import { getBitbucketServerProjects, diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreateRenderer.tsx index c6d24ce76ef..72431cdb06a 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreateRenderer.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Link, Spinner } from '@sonarsource/echoes-react'; -import { LightPrimary, PageContentFontWrapper, Title } from 'design-system'; import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { LightPrimary, PageContentFontWrapper, Title } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { AvailableFeaturesContext } from '../../../../app/components/available-features/AvailableFeaturesContext'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketRepositories.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketRepositories.tsx index 53d9b214654..a432efa445a 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketRepositories.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketRepositories.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { uniq, without } from 'lodash'; import * as React from 'react'; import { BitbucketProject, BitbucketRepository } from '../../../../types/alm-integration'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketSearchResults.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketSearchResults.tsx index 278e1b453d8..9938ee082a2 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketSearchResults.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketSearchResults.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, Spinner } from 'design-system'; -import * as React from 'react'; + +import { FlagMessage, Spinner } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { BitbucketProject, BitbucketRepository } from '../../../../types/alm-integration'; import BitbucketProjectAccordion from './BitbucketProjectAccordion'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketServerPersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketServerPersonalAccessTokenForm.tsx index 9cae8a1ddc8..08bc7342c96 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketServerPersonalAccessTokenForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketServerPersonalAccessTokenForm.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { FormattedMessage } from 'react-intl'; import { ButtonPrimary, FlagErrorIcon, @@ -26,9 +28,7 @@ import { LightPrimary, Link, Spinner, -} from 'design-system'; -import React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { AlmInstanceBase } from '../../../../types/alm-settings'; import { usePersonalAccessToken } from '../usePersonalAccessToken'; diff --git a/server/sonar-web/src/main/js/apps/create/project/CreateProjectModeSelection.tsx b/server/sonar-web/src/main/js/apps/create/project/CreateProjectModeSelection.tsx index f654001be48..fd4d3343482 100644 --- a/server/sonar-web/src/main/js/apps/create/project/CreateProjectModeSelection.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/CreateProjectModeSelection.tsx @@ -28,8 +28,7 @@ import { LightPrimary, TextMuted, Title, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import withAppStateContext from '../../../app/components/app-state/withAppStateContext'; diff --git a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx index 4eb68e8bb64..1f6c6591392 100644 --- a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { LargeCenteredLayout } from 'design-system'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout } from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location, Router } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx index 43735995971..03555067710 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LabelValueSelectOption } from 'design-system'; -import React, { useCallback, useEffect, useMemo, useState } from 'react'; + +import { useCallback, useEffect, useMemo, useState } from 'react'; +import { LabelValueSelectOption } from '~design-system'; import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter'; import { getGithubOrganizations, getGithubRepositories } from '../../../../api/alm-integrations'; import { GithubOrganization, GithubRepository } from '../../../../types/alm-integration'; diff --git a/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreateRenderer.tsx index 18d2ead9a5c..2e0121a6e63 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreateRenderer.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable react/no-unused-prop-types */ import { Link, Spinner } from '@sonarsource/echoes-react'; -import { DarkLabel, FlagMessage, InputSelect, LightPrimary, Title } from 'design-system'; -import React, { useContext, useEffect, useState } from 'react'; +import { useContext, useEffect, useState } from 'react'; import { FormattedMessage } from 'react-intl'; +import { DarkLabel, FlagMessage, InputSelect, LightPrimary, Title } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { useAppState } from '../../../../app/components/app-state/withAppStateContext'; import { AvailableFeaturesContext } from '../../../../app/components/available-features/AvailableFeaturesContext'; diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx index 379da46bbdc..f7076d374e9 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { FormattedMessage } from 'react-intl'; import { ButtonPrimary, FlagErrorIcon, @@ -26,9 +28,7 @@ import { LightPrimary, Link, Spinner, -} from 'design-system'; -import React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { AlmInstanceBase } from '../../../../types/alm-settings'; import { usePersonalAccessToken } from '../usePersonalAccessToken'; diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx index 09d87aea1b1..44171ecccfd 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LabelValueSelectOption } from 'design-system'; -import React, { useCallback, useMemo } from 'react'; + +import { useCallback, useMemo } from 'react'; +import { LabelValueSelectOption } from '~design-system'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import { getGitlabProjects } from '../../../../api/alm-integrations'; import { GitlabProject } from '../../../../types/alm-integration'; diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx index 974471703d2..2fd143441a8 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Link, Spinner } from '@sonarsource/echoes-react'; -import { LightPrimary, Title } from 'design-system'; -import React, { useContext, useEffect, useState } from 'react'; +import { useContext, useEffect, useState } from 'react'; import { FormattedMessage } from 'react-intl'; +import { LightPrimary, Title } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { AvailableFeaturesContext } from '../../../../app/components/available-features/AvailableFeaturesContext'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx index 02c29d3343f..662f4a6a829 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Link } from '@sonarsource/echoes-react'; -import { FlagMessage, InputSearch, LightPrimary } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, InputSearch, LightPrimary } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import ListFooter from '../../../../components/controls/ListFooter'; import Tooltip from '../../../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/Azure-it.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/Azure-it.tsx index 358d7db3b8b..139b9a7fbdb 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/Azure-it.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/Azure-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { searchAzureRepositories } from '../../../../api/alm-integrations'; import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock'; @@ -99,7 +99,7 @@ it('should ask for PAT when it is not set yet and show the import project featur await user.keyboard('secret'); await user.click(screen.getByRole('button', { name: 'save' })); - expect(screen.getByText('Azure project')).toBeInTheDocument(); + expect(await screen.findByText('Azure project')).toBeInTheDocument(); expect(screen.getByText('Azure project 2')).toBeInTheDocument(); // eslint-disable-next-line jest-dom/prefer-in-document expect(screen.getAllByText('onboarding.create_project.repository_imported')).toHaveLength(1); diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx index d71369d4d9f..d3ee2e65328 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { searchForBitbucketServerRepositories } from '../../../../api/alm-integrations'; import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock'; @@ -103,7 +103,7 @@ it('should ask for PAT when it is not set yet and show the import project featur expect(screen.getByRole('button', { name: 'save' })).toBeEnabled(); await user.click(screen.getByRole('button', { name: 'save' })); - expect(screen.getByText('Bitbucket Project 1')).toBeInTheDocument(); + expect(await screen.findByText('Bitbucket Project 1')).toBeInTheDocument(); expect(screen.getByText('Bitbucket Project 2')).toBeInTheDocument(); }); diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketCloud-it.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketCloud-it.tsx index c12621de729..5f25b130475 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketCloud-it.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketCloud-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { searchForBitbucketCloudRepositories } from '../../../../api/alm-integrations'; import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock'; @@ -122,7 +122,7 @@ it('should ask for PAT when it is not set yet and show the import project featur expect(screen.getByRole('button', { name: 'save' })).toBeEnabled(); await user.click(screen.getByRole('button', { name: 'save' })); - expect(screen.getByText('BitbucketCloud Repo 1')).toBeInTheDocument(); + expect(await screen.findByText('BitbucketCloud Repo 1')).toBeInTheDocument(); expect(screen.getByText('BitbucketCloud Repo 2')).toBeInTheDocument(); }); diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-it.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-it.tsx index ceb37315dcd..382d5e8d62b 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-it.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock'; import DopTranslationServiceMock from '../../../../api/mocks/DopTranslationServiceMock'; import NewCodeDefinitionServiceMock from '../../../../api/mocks/NewCodeDefinitionServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHub-it.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHub-it.tsx index 2ed43d55d56..8c6fdd0f93e 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHub-it.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHub-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { getGithubRepositories } from '../../../../api/alm-integrations'; import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock'; @@ -127,7 +127,7 @@ it('should show import project feature when the authentication is successfull', expect(await ui.instanceSelector.find()).toBeInTheDocument(); - await user.click(ui.organizationSelector.get()); + await user.click(await ui.organizationSelector.find()); await user.click(byRole('option', { name: /org-1/ }).get()); expect(await ui.project1.find()).toBeInTheDocument(); @@ -180,7 +180,7 @@ it('should import several projects', async () => { expect(await ui.instanceSelector.find()).toBeInTheDocument(); - await user.click(ui.organizationSelector.get()); + await user.click(await ui.organizationSelector.find()); await user.click(byRole('option', { name: /org-1/ }).get()); expect(await ui.project1.find()).toBeInTheDocument(); @@ -246,7 +246,7 @@ it('should show search filter when the authentication is successful', async () = expect(await ui.instanceSelector.find()).toBeInTheDocument(); - await user.click(ui.organizationSelector.get()); + await user.click(await ui.organizationSelector.find()); await user.click(byRole('option', { name: /org-1/ }).get()); const inputSearch = screen.getByRole('searchbox'); @@ -272,7 +272,7 @@ it('should have load more', async () => { expect(await ui.instanceSelector.find()).toBeInTheDocument(); - await user.click(ui.organizationSelector.get()); + await user.click(await ui.organizationSelector.find()); await user.click(byRole('option', { name: /org-1/ }).get()); const loadMore = await screen.findByRole('button', { name: 'show_more' }); @@ -302,7 +302,7 @@ it('should show no result message when there are no projects', async () => { expect(await ui.instanceSelector.find()).toBeInTheDocument(); - await user.click(ui.organizationSelector.get()); + await user.click(await ui.organizationSelector.find()); await user.click(byRole('option', { name: /org-1/ }).get()); expect(screen.getByText('no_results')).toBeInTheDocument(); diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx index 04a2ead7fb7..ca52dfa93b4 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { getGitlabProjects } from '../../../../api/alm-integrations'; import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/Manual-it.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/Manual-it.tsx index 7669f07e814..bc85b5227ca 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/Manual-it.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/Manual-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/ManualProjectCreate-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/ManualProjectCreate-test.tsx index 5c5d13ea5b1..237989e0573 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/ManualProjectCreate-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/ManualProjectCreate-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import { doesComponentExists } from '../../../../api/components'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/MonorepoProjectCreate-it.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/MonorepoProjectCreate-it.tsx index 2d03e74765b..ce4a24d6a91 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/MonorepoProjectCreate-it.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/MonorepoProjectCreate-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import AlmIntegrationsServiceMock from '../../../../api/mocks/AlmIntegrationsServiceMock'; import AlmSettingsServiceMock from '../../../../api/mocks/AlmSettingsServiceMock'; @@ -131,7 +131,7 @@ describe('github monorepo project setup', () => { expect(await ui.dopSettingSelector.find()).toBeInTheDocument(); expect(ui.monorepoProjectTitle.query()).not.toBeInTheDocument(); - await user.click(ui.organizationSelector.get()); + await user.click(await ui.organizationSelector.find()); await user.click(byRole('option', { name: 'org-1' }).get()); expect(ui.monorepoProjectTitle.query()).not.toBeInTheDocument(); @@ -157,7 +157,7 @@ describe('github monorepo project setup', () => { expect(await ui.dopSettingSelector.find()).toBeInTheDocument(); expect(ui.monorepoProjectTitle.query()).not.toBeInTheDocument(); - await user.click(ui.organizationSelector.get()); + await user.click(await ui.organizationSelector.find()); await user.click(byRole('option', { name: 'org-1' }).get()); expect(ui.monorepoProjectTitle.query()).not.toBeInTheDocument(); @@ -178,7 +178,7 @@ describe('github monorepo project setup', () => { expect(await ui.dopSettingSelector.find()).toBeInTheDocument(); expect(ui.monorepoProjectTitle.query()).not.toBeInTheDocument(); - await user.click(ui.organizationSelector.get()); + await user.click(await ui.organizationSelector.find()); await user.click(byRole('option', { name: 'org-1' }).get()); expect(ui.monorepoProjectTitle.query()).not.toBeInTheDocument(); @@ -206,7 +206,7 @@ describe('github monorepo project setup', () => { expect(ui.submitButton.get()).toBeEnabled(); await user.type(projects[0], '-1'); - expect(ui.submitButton.get()).toBeDisabled(); + await waitFor(() => expect(ui.submitButton.get()).toBeDisabled()); await user.clear(projects[1]); expect(ui.submitButton.get()).toBeDisabled(); diff --git a/server/sonar-web/src/main/js/apps/create/project/components/AlmRepoItem.tsx b/server/sonar-web/src/main/js/apps/create/project/components/AlmRepoItem.tsx index ff1a907b764..addf8added9 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/AlmRepoItem.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/AlmRepoItem.tsx @@ -17,8 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; +import React from 'react'; import { ButtonSecondary, CheckIcon, @@ -28,8 +30,7 @@ import { LightPrimary, Link, themeBorder, -} from 'design-system'; -import React from 'react'; +} from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { getProjectUrl } from '../../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/create/project/components/AlmSettingsInstanceDropdown.tsx b/server/sonar-web/src/main/js/apps/create/project/components/AlmSettingsInstanceDropdown.tsx index ab601b743ff..3b4da85b6f8 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/AlmSettingsInstanceDropdown.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/AlmSettingsInstanceDropdown.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DarkLabel } from 'design-system'; -import * as React from 'react'; + +import { DarkLabel } from '~design-system'; import AlmSettingsInstanceSelector from '../../../../components/devops-platform/AlmSettingsInstanceSelector'; import { hasMessage, translate, translateWithParameters } from '../../../../helpers/l10n'; import { AlmKeys, AlmSettingsInstance } from '../../../../types/alm-settings'; diff --git a/server/sonar-web/src/main/js/apps/create/project/components/DopSettingDropdown.tsx b/server/sonar-web/src/main/js/apps/create/project/components/DopSettingDropdown.tsx index 38a182477aa..e06210c6e35 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/DopSettingDropdown.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/DopSettingDropdown.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { DarkLabel, InputSelect, LabelValueSelectOption, Note } from 'design-system'; -import * as React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import { OptionProps, SingleValueProps, components } from 'react-select'; +import { DarkLabel, InputSelect, LabelValueSelectOption, Note } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { AlmKeys } from '../../../../types/alm-settings'; import { DopSetting } from '../../../../types/dop-translation'; diff --git a/server/sonar-web/src/main/js/apps/create/project/components/NewCodeDefinitionSelection.tsx b/server/sonar-web/src/main/js/apps/create/project/components/NewCodeDefinitionSelection.tsx index 04bfcf42525..fca5f2354e4 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/NewCodeDefinitionSelection.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/NewCodeDefinitionSelection.tsx @@ -19,6 +19,11 @@ */ import { ButtonIcon, ButtonSize, ButtonVariety, IconX } from '@sonarsource/echoes-react'; +import { omit } from 'lodash'; +import * as React from 'react'; +import { useEffect } from 'react'; +import { FormattedMessage, useIntl } from 'react-intl'; +import { useNavigate, unstable_usePrompt as usePrompt } from 'react-router-dom'; import { ButtonPrimary, ButtonSecondary, @@ -28,12 +33,7 @@ import { Title, addGlobalErrorMessage, addGlobalSuccessMessage, -} from 'design-system'; -import { omit } from 'lodash'; -import * as React from 'react'; -import { useEffect } from 'react'; -import { FormattedMessage, useIntl } from 'react-intl'; -import { useNavigate, unstable_usePrompt as usePrompt } from 'react-router-dom'; +} from '~design-system'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import NewCodeDefinitionSelector from '../../../../components/new-code-definition/NewCodeDefinitionSelector'; diff --git a/server/sonar-web/src/main/js/apps/create/project/components/ProjectValidation.tsx b/server/sonar-web/src/main/js/apps/create/project/components/ProjectValidation.tsx index 481711667b9..3e0c8452f0a 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/ProjectValidation.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/ProjectValidation.tsx @@ -17,7 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; +import { isEmpty } from 'lodash'; +import * as React from 'react'; import { ButtonSecondary, Card, @@ -28,9 +31,7 @@ import { Note, TextError, TrashIcon, -} from 'design-system'; -import { isEmpty } from 'lodash'; -import * as React from 'react'; +} from '~design-system'; import { doesComponentExists } from '../../../../api/components'; import { translate } from '../../../../helpers/l10n'; import { validateProjectKey } from '../../../../helpers/projects'; diff --git a/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx b/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx index 9fb6f764e22..96698cdf231 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx @@ -20,9 +20,9 @@ import styled from '@emotion/styled'; import { Button, ButtonVariety, Checkbox } from '@sonarsource/echoes-react'; -import { InputSearch, LightPrimary, themeBorder, themeColor } from 'design-system'; -import React, { useCallback, useMemo } from 'react'; +import { useCallback, useMemo } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { InputSearch, LightPrimary, themeBorder, themeColor } from '~design-system'; import ListFooter from '../../../../components/controls/ListFooter'; import { getBaseUrl } from '../../../../helpers/system'; import { GithubRepository, GitlabProject } from '../../../../types/alm-integration'; diff --git a/server/sonar-web/src/main/js/apps/create/project/components/WrongBindingCountAlert.tsx b/server/sonar-web/src/main/js/apps/create/project/components/WrongBindingCountAlert.tsx index ae192efde48..bb81b7a0f6b 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/WrongBindingCountAlert.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/WrongBindingCountAlert.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Link } from '@sonarsource/echoes-react'; -import { FlagMessage } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage } from '~design-system'; import { useAppState } from '../../../../app/components/app-state/withAppStateContext'; import { translate } from '../../../../helpers/l10n'; import { getGlobalSettingsUrl } from '../../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/create/project/components/__tests__/AlmRepoItem-test.tsx b/server/sonar-web/src/main/js/apps/create/project/components/__tests__/AlmRepoItem-test.tsx index c0252616835..2546ea7190e 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/__tests__/AlmRepoItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/__tests__/AlmRepoItem-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import React from 'react'; import { renderComponent } from '../../../../../helpers/testReactTestingUtils'; import { FCProps } from '../../../../../types/misc'; import AlmRepoItem from '../AlmRepoItem'; diff --git a/server/sonar-web/src/main/js/apps/create/project/manual/ManualProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/manual/ManualProjectCreate.tsx index bc7a765f741..d17ba31e634 100644 --- a/server/sonar-web/src/main/js/apps/create/project/manual/ManualProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/manual/ManualProjectCreate.tsx @@ -20,6 +20,9 @@ import { ButtonIcon, ButtonSize, ButtonVariety, IconX } from '@sonarsource/echoes-react'; import classNames from 'classnames'; +import { isEmpty } from 'lodash'; +import * as React from 'react'; +import { FormattedMessage, useIntl } from 'react-intl'; import { ButtonPrimary, ButtonSecondary, @@ -31,10 +34,7 @@ import { Link, Note, Title, -} from 'design-system'; -import { isEmpty } from 'lodash'; -import * as React from 'react'; -import { FormattedMessage, useIntl } from 'react-intl'; +} from '~design-system'; import { getValue } from '../../../../api/settings'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx index 26b76f55a26..ed624d6a7fd 100644 --- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Title } from 'design-system'; import React from 'react'; import { FormattedMessage } from 'react-intl'; import { GroupBase } from 'react-select'; +import { Title } from '~design-system'; import { LabelValueSelectOption } from '../../../../helpers/search'; import { AlmKeys } from '../../../../types/alm-settings'; import { DopSetting } from '../../../../types/dop-translation'; diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoNoOrganisations.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoNoOrganisations.tsx index dedfb39d97f..b4d34a9f07a 100644 --- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoNoOrganisations.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoNoOrganisations.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Link } from '@sonarsource/echoes-react'; -import { FlagMessage } from 'design-system'; -import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { FlagMessage } from '~design-system'; import { useAppState } from '../../../../app/components/app-state/withAppStateContext'; import { AlmKeys } from '../../../../types/alm-settings'; diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoOrganisationSelector.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoOrganisationSelector.tsx index f6b1bb279ce..bef644a793a 100644 --- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoOrganisationSelector.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoOrganisationSelector.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Link, Spinner } from '@sonarsource/echoes-react'; -import { DarkLabel, FlagMessage, InputSelect } from 'design-system'; -import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { DarkLabel, FlagMessage, InputSelect } from '~design-system'; import { useAppState } from '../../../../app/components/app-state/withAppStateContext'; import { LabelValueSelectOption } from '../../../../helpers/search'; import { AlmKeys } from '../../../../types/alm-settings'; diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx index a8771bfaa58..abced34ba2b 100644 --- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety, Spinner } from '@sonarsource/echoes-react'; -import { BlueGreySeparator } from 'design-system'; import React, { useEffect, useRef } from 'react'; import { FormattedMessage } from 'react-intl'; import { GroupBase } from 'react-select'; +import { BlueGreySeparator } from '~design-system'; import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getComponents } from '../../../../api/project-management'; diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectHeader.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectHeader.tsx index 46224ae6513..c4898838f22 100644 --- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectHeader.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectHeader.tsx @@ -19,9 +19,8 @@ */ import { LinkStandalone } from '@sonarsource/echoes-react'; -import { LightPrimary, Title } from 'design-system'; -import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { LightPrimary, Title } from '~design-system'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx index 32692270ed5..608dee8357a 100644 --- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { SubTitle } from 'design-system'; -import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { SubTitle } from '~design-system'; import { ProjectData, ProjectValidationCard } from '../components/ProjectValidation'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoRepositorySelector.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoRepositorySelector.tsx index 24bb13e715d..1abd43bfcac 100644 --- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoRepositorySelector.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoRepositorySelector.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react'; -import { DarkLabel, FlagMessage, InputSelect } from 'design-system'; -import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import { GroupBase } from 'react-select'; +import { DarkLabel, FlagMessage, InputSelect } from '~design-system'; import { LabelValueSelectOption } from '../../../../helpers/search'; import { getProjectUrl } from '../../../../helpers/urls'; import { AlmKeys } from '../../../../types/alm-settings'; diff --git a/server/sonar-web/src/main/js/apps/create/project/types.ts b/server/sonar-web/src/main/js/apps/create/project/types.ts index cbda3f656ef..94d7fcaa71f 100644 --- a/server/sonar-web/src/main/js/apps/create/project/types.ts +++ b/server/sonar-web/src/main/js/apps/create/project/types.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum CreateProjectModes { Manual = 'manual', AzureDevOps = 'azure', diff --git a/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts b/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts index 1b5efc45a3a..e0fd6e84fc0 100644 --- a/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts +++ b/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useEffect, useState } from 'react'; import { checkPersonalAccessTokenIsValid, diff --git a/server/sonar-web/src/main/js/apps/create/project/useProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/useProjectCreate.tsx index 13486d0d261..a4ce0cdf6b7 100644 --- a/server/sonar-web/src/main/js/apps/create/project/useProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/useProjectCreate.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useCallback, useEffect, useMemo, useState } from 'react'; import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter'; import { isDefined } from '../../../helpers/types'; diff --git a/server/sonar-web/src/main/js/apps/create/project/useProjectRepositorySearch.tsx b/server/sonar-web/src/main/js/apps/create/project/useProjectRepositorySearch.tsx index 69adbfc788c..af9f0319b14 100644 --- a/server/sonar-web/src/main/js/apps/create/project/useProjectRepositorySearch.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/useProjectRepositorySearch.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isEmpty } from 'lodash'; import { useCallback, useEffect, useRef, useState } from 'react'; import { AzureRepository, BitbucketRepository } from '../../../types/alm-integration'; diff --git a/server/sonar-web/src/main/js/apps/create/project/useRepositorySearch.tsx b/server/sonar-web/src/main/js/apps/create/project/useRepositorySearch.tsx index d8a8fe536a1..f678ceda632 100644 --- a/server/sonar-web/src/main/js/apps/create/project/useRepositorySearch.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/useRepositorySearch.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { AlmKeys } from '../../../types/alm-settings'; import { DopSetting } from '../../../types/dop-translation'; diff --git a/server/sonar-web/src/main/js/apps/dependencies/DependenciesApp.tsx b/server/sonar-web/src/main/js/apps/dependencies/DependenciesApp.tsx index 712383f65c2..bd7dc34513b 100644 --- a/server/sonar-web/src/main/js/apps/dependencies/DependenciesApp.tsx +++ b/server/sonar-web/src/main/js/apps/dependencies/DependenciesApp.tsx @@ -17,12 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Spinner, Text } from '@sonarsource/echoes-react'; -import { InputSearch, LargeCenteredLayout } from 'design-system'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { Helmet } from 'react-helmet-async'; import { FormattedMessage } from 'react-intl'; +import { InputSearch, LargeCenteredLayout } from '~design-system'; import withComponentContext from '../../app/components/componentContext/withComponentContext'; import DocumentationLink from '../../components/common/DocumentationLink'; import { DocLink } from '../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/apps/dependencies/__tests__/DependenciesApp-it.tsx b/server/sonar-web/src/main/js/apps/dependencies/__tests__/DependenciesApp-it.tsx index 1e3526328d1..3eca30fb38b 100644 --- a/server/sonar-web/src/main/js/apps/dependencies/__tests__/DependenciesApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/dependencies/__tests__/DependenciesApp-it.tsx @@ -21,7 +21,7 @@ import { byRole, byText } from '../../../sonar-aligned/helpers/testSelector'; import userEvent from '@testing-library/user-event'; -import { DEBOUNCE_DELAY } from 'design-system'; +import { DEBOUNCE_DELAY } from '~design-system'; import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock'; import DependenciesServiceMock from '../../../api/mocks/DependenciesServiceMock'; import SettingsServiceMock from '../../../api/mocks/SettingsServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/dependencies/components/DependencyListItem.tsx b/server/sonar-web/src/main/js/apps/dependencies/components/DependencyListItem.tsx index 83ae36c7d84..8bb5eb88f64 100644 --- a/server/sonar-web/src/main/js/apps/dependencies/components/DependencyListItem.tsx +++ b/server/sonar-web/src/main/js/apps/dependencies/components/DependencyListItem.tsx @@ -19,10 +19,8 @@ */ import { IconArrowRight, LinkStandalone, Text } from '@sonarsource/echoes-react'; -import { Card, Pill, PillHighlight, PillVariant } from 'design-system'; -import React from 'react'; - import { FormattedMessage } from 'react-intl'; +import { Card, Pill, PillHighlight, PillVariant } from '~design-system'; import SoftwareImpactSeverityIcon from '../../../components/icon-mappers/SoftwareImpactSeverityIcon'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { isDefined } from '../../../helpers/types'; diff --git a/server/sonar-web/src/main/js/apps/dependencies/routes.tsx b/server/sonar-web/src/main/js/apps/dependencies/routes.tsx index 0c9ab45fb5c..1c9ec296b2c 100644 --- a/server/sonar-web/src/main/js/apps/dependencies/routes.tsx +++ b/server/sonar-web/src/main/js/apps/dependencies/routes.tsx @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '../../sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/groups/GroupsApp.tsx b/server/sonar-web/src/main/js/apps/groups/GroupsApp.tsx index 22414a46fca..c2f76cfaef3 100644 --- a/server/sonar-web/src/main/js/apps/groups/GroupsApp.tsx +++ b/server/sonar-web/src/main/js/apps/groups/GroupsApp.tsx @@ -18,10 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputSearch, LargeCenteredLayout, PageContentFontWrapper } from 'design-system'; -import * as React from 'react'; import { useState } from 'react'; import { Helmet } from 'react-helmet-async'; +import { InputSearch, LargeCenteredLayout, PageContentFontWrapper } from '~design-system'; import GitHubSynchronisationWarning from '../../app/components/GitHubSynchronisationWarning'; import GitLabSynchronisationWarning from '../../app/components/GitLabSynchronisationWarning'; import ListFooter from '../../components/controls/ListFooter'; diff --git a/server/sonar-web/src/main/js/apps/groups/__tests__/GroupsApp-it.tsx b/server/sonar-web/src/main/js/apps/groups/__tests__/GroupsApp-it.tsx index b62a2d7bf8d..95cc085f456 100644 --- a/server/sonar-web/src/main/js/apps/groups/__tests__/GroupsApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/groups/__tests__/GroupsApp-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import DopTranslationServiceMock from '../../../api/mocks/DopTranslationServiceMock'; import GithubProvisioningServiceMock from '../../../api/mocks/GithubProvisioningServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/DeleteGroupForm.tsx b/server/sonar-web/src/main/js/apps/groups/components/DeleteGroupForm.tsx index a2e24dcf85d..3a7e94775e3 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/DeleteGroupForm.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/DeleteGroupForm.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal } from 'design-system'; -import * as React from 'react'; +import { Modal } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { useDeleteGroupMutation } from '../../../queries/groups'; import { Group } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx b/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx index c9c5b88802f..722e0c660d5 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/EditMembersModal.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, Modal, TextMuted } from 'design-system'; + import { find } from 'lodash'; import * as React from 'react'; +import { FlagMessage, Modal, TextMuted } from '~design-system'; import SelectList, { SelectListFilter, SelectListSearchParams, diff --git a/server/sonar-web/src/main/js/apps/groups/components/GroupForm.tsx b/server/sonar-web/src/main/js/apps/groups/components/GroupForm.tsx index 69facff1770..331d053daee 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/GroupForm.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/GroupForm.tsx @@ -19,9 +19,9 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FormField, InputField, InputTextArea, Modal } from 'design-system'; import * as React from 'react'; import { useState } from 'react'; +import { FormField, InputField, InputTextArea, Modal } from '~design-system'; import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; import { translate } from '../../../helpers/l10n'; import { useCreateGroupMutation, useUpdateGroupMutation } from '../../../queries/groups'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/Header.tsx b/server/sonar-web/src/main/js/apps/groups/components/Header.tsx index 407d79de670..9f1c9aac206 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/Header.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/Header.tsx @@ -19,9 +19,9 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Title } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Title } from '~design-system'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/List.tsx b/server/sonar-web/src/main/js/apps/groups/components/List.tsx index fa780549169..31c53a5f0c8 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/List.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/List.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, NumericalCell, TableRow } from 'design-system'; + import { sortBy } from 'lodash'; -import * as React from 'react'; +import { ContentCell, NumericalCell, TableRow } from '~design-system'; import { StickyTable } from '../../../app/components/admin/StickyTable'; import { translate } from '../../../helpers/l10n'; import { Group, Provider } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/ListItem.tsx b/server/sonar-web/src/main/js/apps/groups/components/ListItem.tsx index 5857c62f360..8b8d2dc63b4 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/ListItem.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/ListItem.tsx @@ -19,6 +19,7 @@ */ import { ButtonIcon, DropdownMenu, IconMoreVertical } from '@sonarsource/echoes-react'; +import { useState } from 'react'; import { Badge, ContentCell, @@ -27,9 +28,7 @@ import { Spinner, TableRow, TrashIcon, -} from 'design-system'; -import * as React from 'react'; -import { useState } from 'react'; +} from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { useGroupMembersCountQuery } from '../../../queries/group-memberships'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/Members.tsx b/server/sonar-web/src/main/js/apps/groups/components/Members.tsx index b8041247d88..0a5a5e8f008 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/Members.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/Members.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InteractiveIcon, MenuIcon, PencilIcon } from 'design-system'; + import * as React from 'react'; +import { InteractiveIcon, MenuIcon, PencilIcon } from '~design-system'; import { translateWithParameters } from '../../../helpers/l10n'; import { Group } from '../../../types/types'; import EditMembersModal from './EditMembersModal'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/ViewMembersModal.tsx b/server/sonar-web/src/main/js/apps/groups/components/ViewMembersModal.tsx index 3f007ab886e..db3d76c0dbb 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/ViewMembersModal.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/ViewMembersModal.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, InputSearch, Modal, Spinner, TextMuted } from 'design-system'; + import * as React from 'react'; +import { Badge, InputSearch, Modal, Spinner, TextMuted } from '~design-system'; import ListFooter from '../../../components/controls/ListFooter'; import { translate } from '../../../helpers/l10n'; import { useGroupMembersQuery } from '../../../queries/group-memberships'; diff --git a/server/sonar-web/src/main/js/apps/groups/routes.tsx b/server/sonar-web/src/main/js/apps/groups/routes.tsx index 7f46c245ae3..84955897f45 100644 --- a/server/sonar-web/src/main/js/apps/groups/routes.tsx +++ b/server/sonar-web/src/main/js/apps/groups/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/IssueApp-it.tsx b/server/sonar-web/src/main/js/apps/issues/__tests__/IssueApp-it.tsx index 2eee2ba88b5..1e03aaa26df 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/IssueApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/IssueApp-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { range } from 'lodash'; @@ -51,17 +52,21 @@ jest.mock('../sidebar/Sidebar', () => { }; }); -jest.mock('../../../components/common/ScreenPositionHelper', () => ({ - __esModule: true, - default: class ScreenPositionHelper extends React.Component<{ - children: (args: { top: number }) => React.ReactNode; - }> { - render() { - // eslint-disable-next-line testing-library/no-node-access - return this.props.children({ top: 10 }); - } - }, -})); +jest.mock('../../../components/common/ScreenPositionHelper', () => { + const React = jest.requireActual('react'); + + return { + __esModule: true, + default: class ScreenPositionHelper extends React.Component<{ + children: (args: { top: number }) => React.ReactNode; + }> { + render() { + // eslint-disable-next-line testing-library/no-node-access + return this.props.children({ top: 10 }); + } + }, + }; +}); jest.mock('../../../api/cves', () => ({ getCve: jest.fn(), diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/IssueHeader-it.tsx b/server/sonar-web/src/main/js/apps/issues/__tests__/IssueHeader-it.tsx index e2b018befcd..5d0fea5266f 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/IssueHeader-it.tsx +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/IssueHeader-it.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import SettingsServiceMock from '../../../api/mocks/SettingsServiceMock'; import { WorkspaceContext } from '../../../components/workspace/context'; diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-Filtering-it.tsx b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-Filtering-it.tsx index 8a1d2e47689..ed965bf5401 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-Filtering-it.tsx +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-Filtering-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { screen, within } from '@testing-library/react'; + +import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { renderOwaspTop102021Category } from '../../../helpers/security-standard'; import { mockLoggedInUser, mockRawIssue } from '../../../helpers/testMocks'; import { Feature } from '../../../types/features'; @@ -43,7 +43,7 @@ jest.mock('../components/IssuesList', () => { return ( <> {props.issues.map((i) => ( - <section key={i.key} aria-label={i.message}> + <section key={i.key} aria-label={i.message} data-moar={`scope: ${i.scope}`}> {i.message} </section> ))} @@ -68,27 +68,41 @@ beforeEach(() => { describe('issues app filtering', () => { it('should combine sidebar filters properly', async () => { - jest.useFakeTimers(); issuesHandler.setPageSize(50); - const user = userEvent.setup({ advanceTimers: jest.advanceTimersByTime }); + const user = userEvent.setup(); renderIssueApp(undefined, [Feature.PrioritizedRules]); await waitOnDataLoaded(); // Select CC responsible category (should make the first issue disappear) await user.click(await ui.responsibleCategoryFilter.find()); + await waitFor(() => { + expect(ui.issueItems.getAll()).toHaveLength(10); + }); expect(ui.issueItem1.query()).not.toBeInTheDocument(); // Select responsible + Maintainability quality await user.click(ui.softwareQualityMaintainabilityFilter.get()); + await waitFor(() => { + expect(ui.issueItems.getAll()).toHaveLength(9); + }); expect(ui.issueItem5.query()).not.toBeInTheDocument(); // Select MEDIUM severity await user.click(ui.mediumSeverityFilter.get()); + await waitFor(() => { + expect(ui.issueItems.getAll()).toHaveLength(8); + }); expect(ui.issueItem8.query()).not.toBeInTheDocument(); // Expand scope and set code smells + major severity + main scope await user.click(ui.scopeFacet.get()); + await waitFor(() => expect(ui.mainScopeFilter.get()).toBeEnabled()); await user.click(ui.mainScopeFilter.get()); + + await waitFor(() => { + expect(ui.issueItems.getAll()).toHaveLength(6); + }); + expect(ui.issueItem4.query()).not.toBeInTheDocument(); // Check that filters were applied as expected @@ -96,18 +110,22 @@ describe('issues app filtering', () => { // Status await user.click(ui.issueStatusFacet.get()); + await waitFor(() => expect(ui.openStatusFilter.get()).toBeEnabled()); await user.click(ui.openStatusFilter.get()); + await waitFor(() => { + expect(ui.issueItems.getAll()).toHaveLength(3); + }); expect(ui.issueItem6.query()).not.toBeInTheDocument(); // Issue 6 should vanish // Ctrl+click on confirmed status await user.keyboard('{Control>}'); await user.click(ui.confirmedStatusFilter.get()); await user.keyboard('{/Control}'); - expect(ui.issueItem6.get()).toBeInTheDocument(); // Issue 6 should come back + expect(await ui.issueItem6.find()).toBeInTheDocument(); // Issue 6 should come back // Rule await user.click(ui.ruleFacet.get()); - await user.click(screen.getByRole('checkbox', { name: 'other' })); + await user.click(await screen.findByRole('checkbox', { name: 'other' })); // Name should apply to the rule expect(screen.getByRole('checkbox', { name: '(HTML) Advanced rule' })).toBeInTheDocument(); @@ -120,7 +138,7 @@ describe('issues app filtering', () => { // Project await user.click(ui.projectFacet.get()); expect( - screen.getByRole('checkbox', { name: 'org.sonarsource.javascript:javascript' }), + await screen.findByRole('checkbox', { name: 'org.sonarsource.javascript:javascript' }), ).toHaveTextContent('SonarJS'); await user.click( screen.getByRole('checkbox', { name: 'org.sonarsource.javascript:javascript' }), @@ -128,13 +146,13 @@ describe('issues app filtering', () => { // Assignee await user.click(ui.assigneeFacet.get()); - await user.click(screen.getByRole('checkbox', { name: 'email2@sonarsource.com' })); + await user.click(await screen.findByRole('checkbox', { name: 'email2@sonarsource.com' })); await user.click(screen.getByRole('checkbox', { name: 'email1@sonarsource.com' })); // Change assignee // Author await user.click(ui.authorFacet.get()); await user.type(ui.authorFacetSearch.get(), 'email'); - await user.click(screen.getByRole('checkbox', { name: 'email4@sonarsource.com' })); + await user.click(await screen.findByRole('checkbox', { name: 'email4@sonarsource.com' })); await user.click(screen.getByRole('checkbox', { name: 'email3@sonarsource.com' })); // Change author // No filters from standard mode @@ -142,10 +160,15 @@ describe('issues app filtering', () => { expect(ui.standardSeverityFacet.query()).not.toBeInTheDocument(); // Prioritized Rule - expect(ui.issueItem7.get()).toBeInTheDocument(); + expect(await ui.issueItem7.find()).toBeInTheDocument(); await user.click(ui.prioritizedRuleFacet.get()); + await waitFor(() => expect(ui.prioritizedRuleFilter.get()).toBeEnabled()); await user.click(ui.prioritizedRuleFilter.get()); + await waitFor(() => { + expect(ui.issueItems.getAll()).toHaveLength(1); + }); + expect(ui.issueItem1.query()).not.toBeInTheDocument(); expect(ui.issueItem2.query()).not.toBeInTheDocument(); expect(ui.issueItem3.query()).not.toBeInTheDocument(); @@ -166,7 +189,7 @@ describe('issues app filtering', () => { await user.click(ui.clearAssigneeFacet.get()); await user.click(ui.clearAuthorFacet.get()); await user.click(ui.clearPrioritizedRuleFacet.get()); - expect(ui.issueItem1.get()).toBeInTheDocument(); + expect(await ui.issueItem1.find()).toBeInTheDocument(); expect(ui.issueItem2.get()).toBeInTheDocument(); expect(ui.issueItem3.get()).toBeInTheDocument(); expect(ui.issueItem4.get()).toBeInTheDocument(); @@ -174,15 +197,12 @@ describe('issues app filtering', () => { expect(ui.issueItem6.get()).toBeInTheDocument(); expect(ui.issueItem7.get()).toBeInTheDocument(); expect(ui.issueItem10.get()).toBeInTheDocument(); - jest.runOnlyPendingTimers(); - jest.useRealTimers(); }); it('should combine sidebar filters properly in standard mode', async () => { - jest.useFakeTimers(); issuesHandler.setPageSize(50); settingsHandler.set(SettingsKey.MQRMode, 'false'); - const user = userEvent.setup({ advanceTimers: jest.advanceTimersByTime }); + const user = userEvent.setup(); renderIssueApp(undefined, [Feature.PrioritizedRules]); await waitOnDataLoaded(); @@ -197,7 +217,7 @@ describe('issues app filtering', () => { expect(ui.issueItem1.query()).not.toBeInTheDocument(); expect(ui.issueItem2.query()).not.toBeInTheDocument(); - expect(ui.issueItem3.get()).toBeInTheDocument(); + expect(await ui.issueItem3.find()).toBeInTheDocument(); expect(ui.issueItem4.query()).not.toBeInTheDocument(); expect(ui.issueItem5.get()).toBeInTheDocument(); expect(ui.issueItem6.get()).toBeInTheDocument(); @@ -207,7 +227,7 @@ describe('issues app filtering', () => { // Clear filters one by one await user.click(ui.clearIssueTypeFacet.get()); await user.click(ui.clearStandardSeverityFacet.get()); - expect(ui.issueItem1.get()).toBeInTheDocument(); + expect(await ui.issueItem1.find()).toBeInTheDocument(); expect(ui.issueItem2.get()).toBeInTheDocument(); expect(ui.issueItem3.get()).toBeInTheDocument(); expect(ui.issueItem4.get()).toBeInTheDocument(); @@ -215,8 +235,6 @@ describe('issues app filtering', () => { expect(ui.issueItem6.get()).toBeInTheDocument(); expect(ui.issueItem7.get()).toBeInTheDocument(); expect(ui.issueItem10.get()).toBeInTheDocument(); - jest.runOnlyPendingTimers(); - jest.useRealTimers(); }); it('should properly filter by code variants', async () => { @@ -228,7 +246,7 @@ describe('issues app filtering', () => { await user.click(screen.getByRole('checkbox', { name: /variant 1/ })); expect(ui.issueItem1.query()).not.toBeInTheDocument(); - expect(ui.issueItem7.get()).toBeInTheDocument(); + expect(await ui.issueItem7.find()).toBeInTheDocument(); // Clear filter await user.click(ui.clearCodeVariantsFacet.get()); @@ -276,7 +294,7 @@ describe('issues app filtering', () => { await user.click(screen.getByText('1', { selector: 'button' })); await user.click(screen.getByText('10')); - expect(ui.issueItem1.get()).toBeInTheDocument(); + expect(await ui.issueItem1.find()).toBeInTheDocument(); expect(ui.issueItem2.query()).not.toBeInTheDocument(); expect(ui.issueItem3.query()).not.toBeInTheDocument(); expect(ui.issueItem4.query()).not.toBeInTheDocument(); @@ -293,7 +311,7 @@ describe('issues app filtering', () => { await waitOnDataLoaded(); // By default, it should show all issues - expect(ui.issueItem2.get()).toBeInTheDocument(); + expect(await ui.issueItem2.find()).toBeInTheDocument(); expect(ui.issueItem3.get()).toBeInTheDocument(); // Only show my issues @@ -303,7 +321,7 @@ describe('issues app filtering', () => { // Show all issues again await user.click(screen.getByRole('radio', { name: 'all' })); - expect(ui.issueItem2.get()).toBeInTheDocument(); + expect(await ui.issueItem2.find()).toBeInTheDocument(); expect(ui.issueItem3.get()).toBeInTheDocument(); }); diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-it.tsx b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-it.tsx index 32df1479e9d..e2817522cac 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { screen, within } from '@testing-library/react'; + +import { screen, waitForElementToBeRemoved, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { mockLoggedInUser } from '../../../helpers/testMocks'; import { IssueType } from '../../../types/issues'; @@ -81,13 +81,15 @@ describe('issues app', () => { const user = userEvent.setup(); renderIssueApp(); + await waitForElementToBeRemoved(screen.queryByText('issues.loading_issues')); + // Navigate to 2nd issue await user.keyboard('{ArrowDown}'); // Select it await user.keyboard('{ArrowRight}'); expect( - screen.getByRole('heading', { name: issuesHandler.list[1].issue.message }), + await screen.findByRole('heading', { name: issuesHandler.list[1].issue.message }), ).toBeInTheDocument(); // Go back @@ -230,7 +232,7 @@ describe('issues app', () => { expect(screen.getByRole('button', { name: 'bulk_change' })).toBeDisabled(); // Select all issues - await user.click(screen.getByRole('checkbox', { name: 'issues.select_all_issues' })); + await user.click(await screen.findByRole('checkbox', { name: 'issues.select_all_issues' })); expect( screen.getByRole('button', { name: 'issues.bulk_change_X_issues.11' }), ).toBeInTheDocument(); diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesAppActivity-it.tsx b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesAppActivity-it.tsx index 5c6fec5e121..d3b7f186f71 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesAppActivity-it.tsx +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesAppActivity-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; @@ -41,17 +42,20 @@ jest.mock('../sidebar/Sidebar', () => { }; }); -jest.mock('../../../components/common/ScreenPositionHelper', () => ({ - __esModule: true, - default: class ScreenPositionHelper extends React.Component<{ - children: (args: { top: number }) => React.ReactNode; - }> { - render() { - // eslint-disable-next-line testing-library/no-node-access - return this.props.children({ top: 10 }); - } - }, -})); +jest.mock('../../../components/common/ScreenPositionHelper', () => { + const React = jest.requireActual('react'); + return { + __esModule: true, + default: class ScreenPositionHelper extends React.Component<{ + children: (args: { top: number }) => React.ReactNode; + }> { + render() { + // eslint-disable-next-line testing-library/no-node-access + return this.props.children({ top: 10 }); + } + }, + }; +}); beforeEach(() => { issuesHandler.reset(); diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesAppGuides-it.tsx b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesAppGuides-it.tsx index 46c995952ea..f4694e7163c 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesAppGuides-it.tsx +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesAppGuides-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { waitForElementToBeRemoved } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; @@ -45,17 +46,20 @@ jest.mock('../sidebar/Sidebar', () => { }; }); -jest.mock('../../../components/common/ScreenPositionHelper', () => ({ - __esModule: true, - default: class ScreenPositionHelper extends React.Component<{ - children: (args: { top: number }) => React.ReactNode; - }> { - render() { - // eslint-disable-next-line testing-library/no-node-access - return this.props.children({ top: 10 }); - } - }, -})); +jest.mock('../../../components/common/ScreenPositionHelper', () => { + const React = jest.requireActual('react'); + return { + __esModule: true, + default: class ScreenPositionHelper extends React.Component<{ + children: (args: { top: number }) => React.ReactNode; + }> { + render() { + // eslint-disable-next-line testing-library/no-node-access + return this.props.children({ top: 10 }); + } + }, + }; +}); describe('issue guides', () => { beforeEach(() => { @@ -234,7 +238,7 @@ describe('issue guides', () => { expect(await ui.guidePopup.find()).toBeInTheDocument(); await user.click(ui.guidePopup.byRole('button', { name: 'next' }).get()); - expect(ui.guidePopup.get()).toHaveTextContent('guiding.step_x_of_y.2.3'); + expect(await ui.guidePopup.find()).toHaveTextContent('guiding.step_x_of_y.2.3'); await user.click(ui.issueItemAction1.get()); diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesSourceViewer-it.tsx b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesSourceViewer-it.tsx index 498a6a41b16..5f0747d8eea 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesSourceViewer-it.tsx +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/IssuesSourceViewer-it.tsx @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { screen } from '@testing-library/react'; + +import { screen, waitForElementToBeRemoved } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { keyBy } from 'lodash'; import { byLabelText, byRole } from '~sonar-aligned/helpers/testSelector'; @@ -118,8 +119,8 @@ describe('issues source viewer', () => { renderProjectIssuesApp('project/issues?issues=issue1&open=issue1&id=myproject'); await waitOnDataLoaded(); + expect(await ui.line45.find()).toBeInTheDocument(); expect(ui.line44.query()).not.toBeInTheDocument(); - expect(ui.line45.get()).toBeInTheDocument(); expect(ui.line199.query()).not.toBeInTheDocument(); // Expand lines below snippet @@ -141,7 +142,7 @@ describe('issues source viewer', () => { expect(ui.line199.query()).not.toBeInTheDocument(); - await user.click(ui.expandAllLines.get()); + await user.click(await ui.expandAllLines.find()); // All lines should be rendered now expect(ui.line199.get()).toBeInTheDocument(); @@ -156,7 +157,7 @@ describe('issues source viewer', () => { expect(ui.line44.query()).not.toBeInTheDocument(); // There currently are two snippet shown - expect(screen.getAllByRole('table')).toHaveLength(2); + expect(await screen.findAllByRole('table')).toHaveLength(2); // Expand lines above second snippet await user.click(ui.expandLinesAbove.get()); @@ -229,7 +230,7 @@ describe('issues source viewer', () => { await screen.findByRole('button', { name: 'Issue on Jupyter Notebook' }), ).toBeInTheDocument(); - expect(screen.queryByText('issue.preview.jupyter_notebook.error')).not.toBeInTheDocument(); + await waitForElementToBeRemoved(screen.queryByText('issue.preview.jupyter_notebook.error')); expect(screen.getByTestId('hljs-sonar-underline')).toHaveTextContent('matplotlib'); expect(screen.getByText(/pylab/, { exact: false })).toBeInTheDocument(); }); @@ -282,7 +283,7 @@ describe('issues source viewer', () => { await screen.findByRole('button', { name: 'Issue on Jupyter Notebook' }), ).toBeInTheDocument(); - expect(screen.queryByText('issue.preview.jupyter_notebook.error')).not.toBeInTheDocument(); + await waitForElementToBeRemoved(screen.queryByText('issue.preview.jupyter_notebook.error')); const underlined = screen.getAllByTestId('hljs-sonar-underline'); expect(underlined).toHaveLength(4); diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts b/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts index f985d8ff01f..0e4683a5996 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mockIssue } from '../../../helpers/testMocks'; import { enableLocationsNavigator, selectFlow } from '../actions'; import { State } from '../components/IssuesApp'; diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts index b740749ec9d..9480f5f3bbe 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { CleanCodeAttributeCategory, SoftwareImpactSeverity, diff --git a/server/sonar-web/src/main/js/apps/issues/actions.ts b/server/sonar-web/src/main/js/apps/issues/actions.ts index 5cb44fd82e6..111a2e4bb6c 100644 --- a/server/sonar-web/src/main/js/apps/issues/actions.ts +++ b/server/sonar-web/src/main/js/apps/issues/actions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { State } from './components/IssuesApp'; import { getLocations } from './utils'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.tsx b/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.tsx index 3884dd476ec..3a52755ea23 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.tsx @@ -19,6 +19,9 @@ */ import { Checkbox, RadioButtonGroup, Spinner } from '@sonarsource/echoes-react'; +import { countBy, flattenDeep, pickBy, sortBy } from 'lodash'; +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { ButtonPrimary, FlagMessage, @@ -27,10 +30,7 @@ import { InputTextArea, LightLabel, Modal, -} from 'design-system'; -import { countBy, flattenDeep, pickBy, sortBy } from 'lodash'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { bulkChangeIssues, searchIssueTags } from '../../../api/issues'; import FormattingTips from '../../../components/common/FormattingTips'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/ComponentBreadcrumbs.tsx b/server/sonar-web/src/main/js/apps/issues/components/ComponentBreadcrumbs.tsx index 52fd0c40ce8..b4863b11110 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/ComponentBreadcrumbs.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/ComponentBreadcrumbs.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { Badge, BranchIcon, themeBorder } from 'design-system'; -import * as React from 'react'; +import { Badge, BranchIcon, themeBorder } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { collapsePath, limitComponentName } from '../../../helpers/path'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueDetails.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueDetails.tsx index 414426f0a50..b6f788ab3d0 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueDetails.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueDetails.tsx @@ -20,6 +20,7 @@ import styled from '@emotion/styled'; import { Spinner } from '@sonarsource/echoes-react'; +import { Helmet } from 'react-helmet-async'; import { FlagMessage, LargeCenteredLayout, @@ -27,9 +28,7 @@ import { PageContentFontWrapper, themeBorder, themeColor, -} from 'design-system'; -import React from 'react'; -import { Helmet } from 'react-helmet-async'; +} from '~design-system'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; import { IssueSuggestionCodeTab } from '../../../components/rules/IssueSuggestionCodeTab'; import IssueTabViewer from '../../../components/rules/IssueTabViewer'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueGuide.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueGuide.tsx index adab9244364..85cc72ff484 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueGuide.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueGuide.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SpotlightTour, SpotlightTourStep } from 'design-system'; import React, { useState } from 'react'; import { FormattedMessage } from 'react-intl'; import { CallBackProps } from 'react-joyride'; +import { SpotlightTour, SpotlightTourStep } from '~design-system'; import { dismissNotice } from '../../../api/users'; import { CurrentUserContext } from '../../../app/components/current-user/CurrentUserContext'; import DocumentationLink from '../../../components/common/DocumentationLink'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx index 452e18f2faa..c8bb64115ca 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx @@ -17,7 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IconLink } from '@sonarsource/echoes-react'; +import * as React from 'react'; import { Badge, BasicSeparator, @@ -26,8 +28,7 @@ import { Link, Note, PageContentFontWrapper, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { getComponentIssuesUrl } from '~sonar-aligned/helpers/urls'; import { setIssueAssignee } from '../../../api/issues'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderMeta.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderMeta.tsx index dad97f8a926..71029d0aab6 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderMeta.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderMeta.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Tooltip } from '@sonarsource/echoes-react'; -import { LightLabel, Note, SeparatorCircleIcon } from 'design-system'; -import React from 'react'; +import { LightLabel, Note, SeparatorCircleIcon } from '~design-system'; import DateFromNow from '../../../components/intl/DateFromNow'; import IssuePrioritized from '../../../components/issue/components/IssuePrioritized'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderSide.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderSide.tsx index 81a093dabee..c6a34afb332 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderSide.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderSide.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Spinner } from '@sonarsource/echoes-react'; -import { LightLabel, themeBorder } from 'design-system'; import React from 'react'; +import { LightLabel, themeBorder } from '~design-system'; import { CleanCodeAttributePill } from '../../../components/shared/CleanCodeAttributePill'; import SoftwareImpactPillList from '../../../components/shared/SoftwareImpactPillList'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueNewStatusAndTransitionGuide.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueNewStatusAndTransitionGuide.tsx index eade6d01630..8a29d1854ae 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueNewStatusAndTransitionGuide.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueNewStatusAndTransitionGuide.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SpotlightTour, SpotlightTourStep } from 'design-system'; import React, { useState } from 'react'; import { useIntl } from 'react-intl'; import { CallBackProps } from 'react-joyride'; +import { SpotlightTour, SpotlightTourStep } from '~design-system'; import { useCurrentUser } from '../../../app/components/current-user/CurrentUserContext'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { SCREEN_POSITION_COMPUTE_DELAY } from '../../../components/common/ScreenPositionHelper'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueOpenInIdeButton.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueOpenInIdeButton.tsx index f336cc20ec2..995fa8fe06d 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueOpenInIdeButton.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueOpenInIdeButton.tsx @@ -19,9 +19,9 @@ */ import { DropdownMenu } from '@sonarsource/echoes-react'; -import { addGlobalErrorMessage, addGlobalSuccessMessage, ButtonSecondary } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { addGlobalErrorMessage, addGlobalSuccessMessage, ButtonSecondary } from '~design-system'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueReviewHistory.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueReviewHistory.tsx index cc7b2e74d1b..28bcc0adb64 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueReviewHistory.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueReviewHistory.tsx @@ -19,6 +19,7 @@ */ import styled from '@emotion/styled'; +import * as React from 'react'; import { DangerButtonPrimary, DestructiveIcon, @@ -31,8 +32,7 @@ import { SanitizeLevel, TrashIcon, themeBorder, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { getIssueChangelog } from '../../../api/issues'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import IssueChangelogDiff from '../../../components/issue/components/IssueChangelogDiff'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueReviewHistoryAndComments.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueReviewHistoryAndComments.tsx index eaf4194e02f..2de82ba8398 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueReviewHistoryAndComments.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueReviewHistoryAndComments.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { PageTitle } from 'design-system'; import * as React from 'react'; +import { PageTitle } from '~design-system'; import { addIssueComment, deleteIssueComment, editIssueComment } from '../../../api/issues'; import { updateIssue } from '../../../components/issue/actions'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueSourceViewerScrollContext.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueSourceViewerScrollContext.tsx index 5e8a4139be1..56af940a311 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueSourceViewerScrollContext.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueSourceViewerScrollContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React from 'react'; export interface IssueSourceViewerScrollContextInterface { diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx index fd0e23be2c1..3f5cdc1685e 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx @@ -20,6 +20,10 @@ import styled from '@emotion/styled'; import { Checkbox, Spinner } from '@sonarsource/echoes-react'; +import { keyBy, omit, without } from 'lodash'; +import * as React from 'react'; +import { Helmet } from 'react-helmet-async'; +import { FormattedMessage } from 'react-intl'; import { ButtonSecondary, FlagMessage, @@ -29,11 +33,7 @@ import { ToggleButton, themeBorder, themeColor, -} from 'design-system'; -import { keyBy, omit, without } from 'lodash'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { getBranchLikeQuery, isPullRequest } from '~sonar-aligned/helpers/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesCounter.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesCounter.tsx index cb32876e1c4..4e46a3275d1 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesCounter.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesCounter.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import PageCounter from '../../../components/common/PageCounter'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesList.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesList.tsx index 840cc4a65b0..1a4b124fe75 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesList.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesList.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Spinner } from 'design-system'; + import { groupBy } from 'lodash'; import * as React from 'react'; +import { Spinner } from '~design-system'; import IssueItem from '../../../components/issue/Issue'; import { BranchLike } from '../../../types/branch-like'; import { Component, Issue } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesListTitle.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesListTitle.tsx index ddf91162c60..d49114f2dc3 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesListTitle.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesListTitle.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DiscreetLink, LightPrimary, PullRequestIcon, SubTitle } from 'design-system'; -import React from 'react'; + import { useIntl } from 'react-intl'; +import { DiscreetLink, LightPrimary, PullRequestIcon, SubTitle } from '~design-system'; import { getPullRequestUrl } from '../../../helpers/urls'; import { PullRequest } from '../../../types/branch-like'; import { Component } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx index da06770ad3f..b4170ed8aca 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ToggleButton } from 'design-system'; + import * as React from 'react'; +import { ToggleButton } from '~design-system'; import { isJupyterNotebookFile } from '~sonar-aligned/helpers/component'; import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/NoIssues.tsx b/server/sonar-web/src/main/js/apps/issues/components/NoIssues.tsx index 3fb7375712e..9ad81160ee0 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/NoIssues.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/NoIssues.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Highlight } from 'design-system'; -import * as React from 'react'; + +import { Highlight } from '~design-system'; import { translate } from '../../../helpers/l10n'; export default function NoIssues() { diff --git a/server/sonar-web/src/main/js/apps/issues/components/NoMyIssues.tsx b/server/sonar-web/src/main/js/apps/issues/components/NoMyIssues.tsx index 1926d410bf9..1ab65b48ad8 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/NoMyIssues.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/NoMyIssues.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Highlight } from 'design-system'; -import * as React from 'react'; + +import { Highlight } from '~design-system'; import { translate } from '../../../helpers/l10n'; export default function NoMyIssues() { diff --git a/server/sonar-web/src/main/js/apps/issues/components/OpenFixInIde.tsx b/server/sonar-web/src/main/js/apps/issues/components/OpenFixInIde.tsx index fb39a8655d0..d6e1dea6062 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/OpenFixInIde.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/OpenFixInIde.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety, DropdownMenu } from '@sonarsource/echoes-react'; -import { addGlobalErrorMessage } from 'design-system/lib'; -import React, { useCallback, useState } from 'react'; +import { useCallback, useState } from 'react'; +import { addGlobalErrorMessage } from '~design-system'; import { useComponent } from '../../../app/components/componentContext/withComponentContext'; import { useCurrentUser } from '../../../app/components/current-user/CurrentUserContext'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/issues/components/PageActions.tsx index c77ad71029c..7157af63e9a 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/PageActions.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { KeyboardHint } from 'design-system'; -import * as React from 'react'; + +import { KeyboardHint } from '~design-system'; import HomePageSelect from '../../../components/controls/HomePageSelect'; import { translate } from '../../../helpers/l10n'; import { Paging } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/StyledHeader.tsx b/server/sonar-web/src/main/js/apps/issues/components/StyledHeader.tsx index fc1738eef54..44bc7633935 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/StyledHeader.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/StyledHeader.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { Theme, themeColor, themeShadow } from 'design-system'; +import { Theme, themeColor, themeShadow } from '~design-system'; interface StyledHeaderProps { headerHeight: number; diff --git a/server/sonar-web/src/main/js/apps/issues/components/TagsSelect.tsx b/server/sonar-web/src/main/js/apps/issues/components/TagsSelect.tsx index 75423f387f6..72787ab9772 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/TagsSelect.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/TagsSelect.tsx @@ -17,14 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { Dropdown, InputMultiSelect, MultiSelector, PopupPlacement, PopupZLevel, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/issues/components/TotalEffort.tsx b/server/sonar-web/src/main/js/apps/issues/components/TotalEffort.tsx index 648838b3204..155bbc8878b 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/TotalEffort.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/TotalEffort.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/AssigneeSelect-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/AssigneeSelect-test.tsx index 556ebb4090d..e11f22494c5 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/AssigneeSelect-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/AssigneeSelect-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import CurrentUserContextProvider from '../../../../app/components/current-user/CurrentUserContextProvider'; import { mockUserBase } from '../../../../helpers/mocks/users'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-it.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-it.tsx index 09bc572597e..b4c0a24d442 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-it.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { bulkChangeIssues } from '../../../../api/issues'; import CurrentUserContextProvider from '../../../../app/components/current-user/CurrentUserContextProvider'; import { mockIssue, mockLoggedInUser } from '../../../../helpers/testMocks'; @@ -113,7 +113,7 @@ it('should disable the submit button unless some change is configured', async () expect(await screen.findByRole('button', { name: 'apply' })).toBeDisabled(); // Add a tag - await user.click(screen.getByRole('combobox', { name: 'issue.add_tags' })); + await user.click(await screen.findByRole('combobox', { name: 'issue.add_tags' })); await user.click(screen.getByText('tag1')); await user.click(screen.getByText('tag2')); diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/ComponentBreadcrumbs-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/ComponentBreadcrumbs-test.tsx index abec2ed9706..4397045143c 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/ComponentBreadcrumbs-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/ComponentBreadcrumbs-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { mockComponent } from '../../../../helpers/mocks/component'; import { mockIssue } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssueOpenInIdeButton-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssueOpenInIdeButton-test.tsx index 550f9e79ccf..4c9840dfd80 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssueOpenInIdeButton-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssueOpenInIdeButton-test.tsx @@ -20,9 +20,8 @@ import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { addGlobalErrorMessage, addGlobalSuccessMessage } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { addGlobalErrorMessage, addGlobalSuccessMessage } from '~design-system'; import UserTokensMock from '../../../../api/mocks/UserTokensMock'; import DocumentationLink from '../../../../components/common/DocumentationLink'; import { DocLink } from '../../../../helpers/doc-links'; @@ -39,8 +38,8 @@ jest.mock('../../../../helpers/sonarlint', () => ({ probeSonarLintServers: jest.fn(), })); -jest.mock('design-system', () => ({ - ...jest.requireActual('design-system'), +jest.mock('~design-system', () => ({ + ...jest.requireActual('~design-system'), addGlobalErrorMessage: jest.fn(), addGlobalSuccessMessage: jest.fn(), })); diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesNewStatusAndTransitionGuide-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesNewStatusAndTransitionGuide-test.tsx index 361b63f0e8a..7c31426c1c2 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesNewStatusAndTransitionGuide-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesNewStatusAndTransitionGuide-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import React from 'react'; import IssuesServiceMock from '../../../../api/mocks/IssuesServiceMock'; @@ -44,18 +45,18 @@ it('should display status guide', async () => { renderIssueNewStatusGuide(); expect(await ui.guidePopup.find()).toBeInTheDocument(); - expect(ui.guidePopup.get()).toHaveTextContent('guiding.issue_accept.1.title'); + expect(ui.guidePopup.get()).toHaveTextContent(/guiding.issue_accept.1.title/); await user.click(ui.guidePopup.byRole('button', { name: 'next' }).get()); - expect(ui.guidePopup.get()).toHaveTextContent('guiding.issue_accept.2.title'); + expect(await ui.guidePopup.find()).toHaveTextContent(/guiding.issue_accept.2.title/); await user.click(ui.guidePopup.byRole('button', { name: 'go_back' }).get()); - expect(ui.guidePopup.get()).toHaveTextContent('guiding.issue_accept.1.title'); + expect(await ui.guidePopup.find()).toHaveTextContent(/guiding.issue_accept.1.title/); await user.click(ui.guidePopup.byRole('button', { name: 'next' }).get()); - await user.click(ui.guidePopup.byRole('button', { name: 'next' }).get()); - expect(ui.guidePopup.get()).toHaveTextContent('guiding.issue_accept.3.title'); + await user.click(await ui.guidePopup.byRole('button', { name: 'next' }).find()); + expect(await ui.guidePopup.find()).toHaveTextContent(/guiding.issue_accept.3.title/); expect(ui.guidePopup.byRole('button', { name: 'Next' }).query()).not.toBeInTheDocument(); await user.click(ui.guidePopup.byRole('button', { name: 'close' }).get()); @@ -82,7 +83,7 @@ it('should skip guide', async () => { renderIssueNewStatusGuide(); expect(await ui.guidePopup.find()).toBeInTheDocument(); - expect(ui.guidePopup.get()).toHaveTextContent('guiding.issue_accept.1.title'); + expect(ui.guidePopup.get()).toHaveTextContent(/guiding.issue_accept.1.title/); await user.click(ui.guidePopup.byRole('button', { name: 'skip' }).get()); diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/OpenFixInIde-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/OpenFixInIde-test.tsx index d64448a24f5..b7791d518da 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/OpenFixInIde-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/OpenFixInIde-test.tsx @@ -21,7 +21,7 @@ import { useQueryClient } from '@tanstack/react-query'; import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React, { ComponentProps } from 'react'; +import { ComponentProps } from 'react'; import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock'; import { ComponentContext } from '../../../../app/components/componentContext/ComponentContext'; import { mockComponent } from '../../../../helpers/mocks/component'; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx index e6444f83480..c976b67b556 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx @@ -17,12 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Button, ButtonVariety, Spinner } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { FlagMessage, IssueMessageHighlighting, LineFinding, themeColor } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, IssueMessageHighlighting, LineFinding, themeColor } from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { getSources } from '../../../api/components'; import { TabKeys } from '../../../components/rules/IssueTabViewer'; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewer.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewer.tsx index 7045ac78671..dab73936448 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewer.tsx @@ -19,9 +19,9 @@ */ import { Spinner } from '@sonarsource/echoes-react'; -import { FlagMessage } from 'design-system'; import { findLastIndex, keyBy } from 'lodash'; import * as React from 'react'; +import { FlagMessage } from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getComponentForSourceViewer, getDuplications, getSources } from '../../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx index 08c95db1ca8..602038293f6 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx @@ -17,10 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { ButtonIcon, ButtonVariety, IconUnfold } from '@sonarsource/echoes-react'; import classNames from 'classnames'; +import * as React from 'react'; import { ChevronRightIcon, ClipboardIconButton, @@ -29,8 +31,7 @@ import { Link, Spinner, themeColor, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { getComponentIssuesUrl } from '~sonar-aligned/helpers/urls'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx index 74bc910f699..bc6d34f9076 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx @@ -17,7 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; +import { debounce, throttle } from 'lodash'; +import React from 'react'; import { CodeViewerExpander, SonarCodeColorizer, @@ -26,9 +29,7 @@ import { UnfoldUpIcon, themeColor, withTheme, -} from 'design-system'; -import { debounce, throttle } from 'lodash'; -import React from 'react'; +} from '~design-system'; import Line from '../../../components/SourceViewer/components/Line'; import { symbolsByLine } from '../../../components/SourceViewer/helpers/indexing'; import { getSecondaryIssueLocationsForLine } from '../../../components/SourceViewer/helpers/issueLocations'; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/IssueSourceViewerHeader-test.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/IssueSourceViewerHeader-test.tsx index b034c810cd0..f573a4bd390 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/IssueSourceViewerHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/IssueSourceViewerHeader-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitForElementToBeRemoved } from '@testing-library/react'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock'; import { AvailableFeaturesContext } from '../../../../app/components/available-features/AvailableFeaturesContext'; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/SnippetViewer-test.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/SnippetViewer-test.tsx index 7666a785d68..a9f3352d4f7 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/SnippetViewer-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/SnippetViewer-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { range } from 'lodash'; -import * as React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import { mockSourceLine, mockSourceViewerFile } from '../../../../helpers/mocks/sources'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/utils-test.ts index 824d98a4891..7306dca2151 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mockSnippetsByComponent } from '../../../../helpers/mocks/sources'; import { mockFlowLocation, mockIssue } from '../../../../helpers/testMocks'; import { createSnippets, expandSnippet, groupLocationsByComponent } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/utils.ts b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/utils.ts index feb94e50c9d..d89eeb26980 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/utils.ts +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { sortBy } from 'lodash'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { decorateWithUnderlineFlags } from '../../../helpers/code-viewer'; diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueItemLocationsQuantity.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueItemLocationsQuantity.tsx index 5dc6902547c..cbec08244be 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueItemLocationsQuantity.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueItemLocationsQuantity.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ExecutionFlowIcon } from 'design-system'; -import * as React from 'react'; + +import { ExecutionFlowIcon } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { FlowType, Issue } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocation.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocation.tsx index 0a4a2f4e719..186bb11448f 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocation.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocation.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; -import { LocationMarker, StyledMarker, themeColor } from 'design-system'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; +import { LocationMarker, StyledMarker, themeColor } from '~design-system'; import { translate } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocations.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocations.tsx index 891335d79b1..f6ac03ec102 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocations.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocations.tsx @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React, { useMemo } from 'react'; + +import { useMemo } from 'react'; import { FlowLocation, Issue } from '../../../types/types'; import IssueLocation from './IssueLocation'; import IssueLocationsCrossFile from './IssueLocationsCrossFile'; diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsCrossFile.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsCrossFile.tsx index 8ac33d714d0..8cccdf9a410 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsCrossFile.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsCrossFile.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { BareButton, themeBorder, themeContrast } from 'design-system'; -import React, { PureComponent } from 'react'; +import { PureComponent } from 'react'; +import { BareButton, themeBorder, themeContrast } from '~design-system'; import { translateWithParameters } from '../../../helpers/l10n'; import { collapsePath } from '../../../helpers/path'; import { FlowLocation, Issue } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsNavigator.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsNavigator.tsx index 22bc6fc1ec4..bf8491d477d 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsNavigator.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsNavigator.tsx @@ -17,14 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; +import { Fragment, useCallback, useRef } from 'react'; import { BareButton, ExecutionFlowAccordion, SubnavigationFlowSeparator, themeBorder, -} from 'design-system'; -import React, { Fragment, useCallback, useRef } from 'react'; +} from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Flow, FlowType, Issue } from '../../../types/types'; import { getLocations, getTypedFlows } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsNavigatorKeyboardHint.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsNavigatorKeyboardHint.tsx index 3c52226e9a4..19f5587ee4a 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsNavigatorKeyboardHint.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsNavigatorKeyboardHint.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { KeyboardHint } from 'design-system'; -import * as React from 'react'; + +import { KeyboardHint } from '~design-system'; import { KeyboardKeys } from '../../../helpers/keycodes'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssue.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssue.tsx index a6be2eef8bf..64c50c6608e 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssue.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssue.tsx @@ -17,16 +17,17 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; +import { noop } from 'lodash'; +import * as React from 'react'; import { BareButton, IssueMessageHighlighting, SubnavigationItem, themeColor, themeContrast, -} from 'design-system'; -import { noop } from 'lodash'; -import * as React from 'react'; +} from '~design-system'; import { Issue } from '../../../types/types'; import IssueItemLocationsQuantity from './IssueItemLocationsQuantity'; import IssueLocationsNavigator from './IssueLocationsNavigator'; diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssueComponentName.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssueComponentName.tsx index dd24e7277e7..0a591640626 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssueComponentName.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssueComponentName.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { LightLabel, SubnavigationHeading, themeBorder } from 'design-system'; -import * as React from 'react'; +import { LightLabel, SubnavigationHeading, themeBorder } from '~design-system'; import { collapsePath } from '../../../helpers/path'; const COLLAPSE_PATH_LIMIT = 8; diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssuesList.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssuesList.tsx index 8d989f2d7f3..66a29ca7b93 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssuesList.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssuesList.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { themeBorder, themeColor, themeShadow } from 'design-system'; import * as React from 'react'; +import { themeBorder, themeColor, themeShadow } from '~design-system'; import ListFooter from '../../../components/controls/ListFooter'; import { Issue, Paging } from '../../../types/types'; import SubnavigationIssue from './SubnavigationIssue'; diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssuesListHeader.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssuesListHeader.tsx index 440c922ed06..dc0e7859b7e 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssuesListHeader.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssuesListHeader.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { Spinner, SubnavigationHeading, themeShadow } from 'design-system'; -import * as React from 'react'; +import { Spinner, SubnavigationHeading, themeShadow } from '~design-system'; import { Paging } from '../../../types/types'; import IssuesCounter from '../components/IssuesCounter'; diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/__tests__/SubnavigationIssues-it.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/__tests__/SubnavigationIssues-it.tsx index 50ae8bd376c..27c717d205a 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/__tests__/SubnavigationIssues-it.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/__tests__/SubnavigationIssues-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import { mockFlowLocation, mockIssue, mockPaging } from '../../../../helpers/testMocks'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/apps/issues/jupyter-notebook/JupyterNotebookIssueViewer.tsx b/server/sonar-web/src/main/js/apps/issues/jupyter-notebook/JupyterNotebookIssueViewer.tsx index 4d4ea9066d8..ba5eb20b4ef 100644 --- a/server/sonar-web/src/main/js/apps/issues/jupyter-notebook/JupyterNotebookIssueViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/jupyter-notebook/JupyterNotebookIssueViewer.tsx @@ -17,15 +17,16 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ICodeCell, INotebookContent, isCode } from '@jupyterlab/nbformat'; import { Spinner } from '@sonarsource/echoes-react'; +import React from 'react'; import { FlagMessage, hljsUnderlinePlugin, IssueMessageHighlighting, LineFinding, -} from 'design-system'; -import React from 'react'; +} from '~design-system'; import { JupyterCodeCell } from '~sonar-aligned/components/SourceViewer/JupyterNotebookViewer'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { getOffsetsForIssue } from '~sonar-aligned/helpers/json-issue-mapper'; diff --git a/server/sonar-web/src/main/js/apps/issues/routes.tsx b/server/sonar-web/src/main/js/apps/issues/routes.tsx index 48cbe65591f..9d525e9098c 100644 --- a/server/sonar-web/src/main/js/apps/issues/routes.tsx +++ b/server/sonar-web/src/main/js/apps/issues/routes.tsx @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React, { useEffect } from 'react'; + +import { useEffect } from 'react'; import { Route, useNavigate, useSearchParams } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; import { omitNil } from '../../helpers/request'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx index b5d11b91224..b41eb63cb48 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { omit, sortBy, without } from 'lodash'; import * as React from 'react'; import Avatar from '../../../components/ui/Avatar'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/AttributeCategoryFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/AttributeCategoryFacet.tsx index 3937024d332..8582e8784b3 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/AttributeCategoryFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/AttributeCategoryFacet.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { CLEAN_CODE_CATEGORIES } from '../../../helpers/constants'; import { CleanCodeAttributeCategory } from '../../../types/clean-code-taxonomy'; import { CommonProps, SimpleListStyleFacet } from './SimpleListStyleFacet'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.tsx index f6a898e0d17..fc8fc817ae9 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { omit } from 'lodash'; import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx index d1f8b48fc79..8bec820112c 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isSameDay } from 'date-fns'; -import { BarChart, DateRangePicker, FacetBox, FacetItem, Note } from 'design-system'; import { isEmpty, max } from 'lodash'; import * as React from 'react'; import { WrappedComponentProps, injectIntl } from 'react-intl'; +import { BarChart, DateRangePicker, FacetBox, FacetItem, Note } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { longFormatterOption } from '../../../components/intl/DateFormatter'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx index 90b5e8136a4..aef4368580b 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { QualifierIcon } from 'design-system'; + import { omit } from 'lodash'; import * as React from 'react'; +import { QualifierIcon } from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { getDirectories } from '../../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsColumns.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsColumns.tsx index eb187929ace..4c594d55461 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsColumns.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsColumns.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; export function FacetItemsColumns({ children }: React.PropsWithChildren<{}>) { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsList.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsList.tsx index aefe1787821..d1bb3274e4d 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsList.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsList.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; export type FacetItemsListProps = diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx index f04e4358334..fc755e7deb1 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { QualifierIcon } from 'design-system'; + import { omit } from 'lodash'; import * as React from 'react'; +import { QualifierIcon } from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { getFiles } from '../../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/FiltersHeader.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/FiltersHeader.tsx index a2c414dd1d1..213a9317b3e 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/FiltersHeader.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/FiltersHeader.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { BasicSeparator, PageTitle } from 'design-system'; -import * as React from 'react'; +import { BasicSeparator, PageTitle } from '~design-system'; import { translate } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/IssueStatusFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/IssueStatusFacet.tsx index 2ec223bde6d..ce359af8b08 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/IssueStatusFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/IssueStatusFacet.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FacetBox, FacetItem } from 'design-system'; + import { isEqual, sortBy, without } from 'lodash'; -import * as React from 'react'; import { useIntl } from 'react-intl'; +import { FacetBox, FacetItem } from '~design-system'; import { DEFAULT_ISSUES_QUERY } from '../../../components/shared/utils'; import { ISSUE_STATUSES } from '../../../helpers/constants'; import { IssueStatus } from '../../../types/issues'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx index 049fea05af4..039b562107f 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { omit, uniqBy } from 'lodash'; import * as React from 'react'; import withLanguagesContext from '../../../app/components/languages/withLanguagesContext'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacet.tsx index 2076119b7ed..141a5683c23 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacet.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FacetBox, FacetItem, FlagMessage, InputSearch, Note } from 'design-system'; + import { max, sortBy, values, without } from 'lodash'; import * as React from 'react'; +import { FacetBox, FacetItem, FlagMessage, InputSearch, Note } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { RawQuery } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacetFooter.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacetFooter.tsx index 6ed1ab5f241..1e6e4c92f45 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacetFooter.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacetFooter.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DiscreetLink } from 'design-system'; -import * as React from 'react'; +import { DiscreetLink } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/MultipleSelectionHint.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/MultipleSelectionHint.tsx index 504ca0bd657..70c11d2931d 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/MultipleSelectionHint.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/MultipleSelectionHint.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { KeyboardHint } from 'design-system'; -import * as React from 'react'; + +import { KeyboardHint } from '~design-system'; import { translate } from '../../../helpers/l10n'; export function MultipleSelectionHint({ diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/PeriodFilter.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/PeriodFilter.tsx index 3ac157eba62..e512b5ab28a 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/PeriodFilter.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/PeriodFilter.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, FacetItem } from 'design-system'; + import * as React from 'react'; +import { BasicSeparator, FacetItem } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { CodeScope } from '../../../helpers/urls'; import { Query } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/PrioritizedRuleFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/PrioritizedRuleFacet.tsx index c793a92ecc0..c9218d3fcc4 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/PrioritizedRuleFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/PrioritizedRuleFacet.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FacetBox, FacetItem } from 'design-system'; -import * as React from 'react'; import { useIntl } from 'react-intl'; +import { FacetBox, FacetItem } from '~design-system'; import { Dict } from '../../../types/types'; import { Query, formatFacetStat } from '../utils'; import { FacetItemsList } from './FacetItemsList'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx index 35989c1a078..ee9881a4307 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx @@ -20,7 +20,6 @@ import { IconProject, Spinner } from '@sonarsource/echoes-react'; import { omit } from 'lodash'; -import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { getTree, searchProjects } from '../../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.tsx index b7806a225bc..c340e4b664a 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { omit } from 'lodash'; import * as React from 'react'; import { searchRules } from '../../../api/rules'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ScopeFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/ScopeFacet.tsx index 3a830ac4842..cb88c0ab70d 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ScopeFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ScopeFacet.tsx @@ -19,9 +19,8 @@ */ import { IconFile, IconFileCode } from '@sonarsource/echoes-react'; -import { FacetBox, FacetItem } from 'design-system'; import { without } from 'lodash'; -import * as React from 'react'; +import { FacetBox, FacetItem } from '~design-system'; import { SOURCE_SCOPES } from '../../../helpers/constants'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx index f8930f85993..d6d2620533e 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, FlagMessage, Link } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { BasicSeparator, FlagMessage, Link } from '~design-system'; import { isBranch, isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/SimpleListStyleFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/SimpleListStyleFacet.tsx index 9494ad6b641..edf2f5aa239 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/SimpleListStyleFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/SimpleListStyleFacet.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FacetBox, FacetItem } from 'design-system'; + import { without } from 'lodash'; import * as React from 'react'; +import { FacetBox, FacetItem } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Dict } from '../../../types/types'; import { Query, formatFacetStat } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/SoftwareQualityFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/SoftwareQualityFacet.tsx index 30ac79485c3..34a1edbf186 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/SoftwareQualityFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/SoftwareQualityFacet.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { SOFTWARE_QUALITIES } from '../../../helpers/constants'; import { SoftwareQuality } from '../../../types/clean-code-taxonomy'; import { CommonProps, SimpleListStyleFacet } from './SimpleListStyleFacet'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx index 67a7c48c2ed..5c127a1df4b 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable react/no-unused-prop-types */ -import { FacetBox, FacetItem, Note, TextMuted } from 'design-system'; import { omit, sortBy, without } from 'lodash'; import * as React from 'react'; +import { FacetBox, FacetItem, Note, TextMuted } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { highlightTerm } from '../../../helpers/search'; import { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx index 913d5dde428..4ff4ec1765d 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { omit } from 'lodash'; import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.tsx index 7b886923d85..cc7d661267c 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.tsx @@ -19,9 +19,9 @@ */ import { IconBug, IconCodeSmell, IconVulnerability } from '@sonarsource/echoes-react'; -import { FacetBox, FacetItem } from 'design-system'; import { orderBy, without } from 'lodash'; import * as React from 'react'; +import { FacetBox, FacetItem } from '~design-system'; import { ISSUE_TYPES } from '../../../helpers/constants'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/VariantFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/VariantFacet.tsx index e63684e0844..11fa8bce2fa 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/VariantFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/VariantFacet.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FacetBox, FacetItem, Note } from 'design-system'; + import { orderBy, sortBy, without } from 'lodash'; import * as React from 'react'; +import { FacetBox, FacetItem, Note } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Dict } from '../../../types/types'; import { Query, formatFacetStat } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/ListStyleFacetFooter-test.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/ListStyleFacetFooter-test.tsx index d031f39fce3..0b7fc153f19 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/ListStyleFacetFooter-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/ListStyleFacetFooter-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { ListStyleFacetFooter, Props } from '../ListStyleFacetFooter'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/Sidebar-it.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/Sidebar-it.tsx index 99aac64ccbe..f2b29ef55f4 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/Sidebar-it.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/Sidebar-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; -import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock'; import { mockComponent } from '../../../../helpers/mocks/component'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/SimpleListStyleFacet-test.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/SimpleListStyleFacet-test.tsx index 94cd19a939c..dc6753d4482 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/SimpleListStyleFacet-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/SimpleListStyleFacet-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import * as React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/apps/issues/test-utils.tsx b/server/sonar-web/src/main/js/apps/issues/test-utils.tsx index ff9963c4461..dccf87e7503 100644 --- a/server/sonar-web/src/main/js/apps/issues/test-utils.tsx +++ b/server/sonar-web/src/main/js/apps/issues/test-utils.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { waitFor } from '@testing-library/react'; -import React from 'react'; + +import { waitForElementToBeRemoved } from '@testing-library/react'; import { Outlet, Route } from 'react-router-dom'; import { byPlaceholderText, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector'; import BranchesServiceMock from '../../api/mocks/BranchesServiceMock'; @@ -183,9 +183,8 @@ export const ui = { }; export async function waitOnDataLoaded() { - await waitFor(() => { - expect(ui.loading.query()).not.toBeInTheDocument(); - }); + expect(await ui.loading.find()).toBeInTheDocument(); + await waitForElementToBeRemoved(ui.loading.query()); } export function renderIssueApp( diff --git a/server/sonar-web/src/main/js/apps/issues/utils.ts b/server/sonar-web/src/main/js/apps/issues/utils.ts index ba190bbe98d..a2d9c8a5364 100644 --- a/server/sonar-web/src/main/js/apps/issues/utils.ts +++ b/server/sonar-web/src/main/js/apps/issues/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { intersection, isArray, uniq } from 'lodash'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx index 0e0feb96711..209f085211e 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx @@ -20,10 +20,10 @@ import styled from '@emotion/styled'; import { Button, ButtonVariety, Link, LinkStandalone, Spinner } from '@sonarsource/echoes-react'; -import { Card, CenteredLayout, Note, Title } from 'design-system'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { FormattedMessage } from 'react-intl'; +import { Card, CenteredLayout, Note, Title } from '~design-system'; import { getMigrationsStatus, getSystemStatus, migrateDatabase } from '../../../api/system'; import DocumentationLink from '../../../components/common/DocumentationLink'; import InstanceMessage from '../../../components/common/InstanceMessage'; diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/MaintenanceAppContainer.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/MaintenanceAppContainer.tsx index 29004e256a1..72ebb92c6f3 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/MaintenanceAppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/components/MaintenanceAppContainer.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useSearchParams } from 'react-router-dom'; import { omitNil } from '../../../helpers/request'; import App from './App'; diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/MigrationProgress.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/MigrationProgress.tsx index 4c2c597ab63..73363746394 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/MigrationProgress.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/components/MigrationProgress.tsx @@ -19,10 +19,9 @@ */ import styled from '@emotion/styled'; -import * as React from 'react'; -import { themeColor } from 'design-system'; import { FormattedMessage } from 'react-intl'; +import { themeColor } from '~design-system'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/SetupAppContainer.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/SetupAppContainer.tsx index 1f79fda0675..29cda599167 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/SetupAppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/components/SetupAppContainer.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useSearchParams } from 'react-router-dom'; import { omitNil } from '../../../helpers/request'; diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/App-test.tsx index c6c2a974967..e5448f6341c 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/App-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byText } from '~sonar-aligned/helpers/testSelector'; import { getMigrationsStatus, getSystemStatus, migrateDatabase } from '../../../../api/system'; import { mockLocation } from '../../../../helpers/testMocks'; @@ -261,7 +261,7 @@ describe('Setup', () => { title = await screen.findByRole('heading', { name: 'maintenance.database_migration' }); expect(title).toBeInTheDocument(); - expect(byText(/maintenance.running.progress/).get()).toBeInTheDocument(); + expect(await byText(/maintenance.running.progress/).find()).toBeInTheDocument(); // Trigger refresh; migration done. jest.runOnlyPendingTimers(); diff --git a/server/sonar-web/src/main/js/apps/maintenance/routes.tsx b/server/sonar-web/src/main/js/apps/maintenance/routes.tsx index eecbe4a18ee..2d1dd2cf72b 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/routes.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Route } from 'react-router-dom'; import MaintenanceAppContainer from './components/MaintenanceAppContainer'; import SetupAppContainer from './components/SetupAppContainer'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/App.tsx b/server/sonar-web/src/main/js/apps/marketplace/App.tsx index cc305eb0f2b..f2eed687138 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/App.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/App.tsx @@ -18,6 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { sortBy, uniqBy } from 'lodash'; +import * as React from 'react'; +import { Helmet } from 'react-helmet-async'; +import { FormattedMessage } from 'react-intl'; import { BasicSeparator, FlagMessage, @@ -25,11 +29,7 @@ import { PageContentFontWrapper, Spinner, SubTitle, -} from 'design-system'; -import { sortBy, uniqBy } from 'lodash'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location, Router } from '~sonar-aligned/types/router'; import { getAvailablePlugins, getInstalledPlugins } from '../../api/plugins'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx b/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx index 15a91464c32..2a310bd2f6d 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Card, Link } from 'design-system'; + import * as React from 'react'; +import { Card, Link } from '~design-system'; import { getMarketplaceNavigation } from '../../api/navigation'; import { getAllEditionsAbove, getEditionUrl } from '../../helpers/editions'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/Header.tsx b/server/sonar-web/src/main/js/apps/marketplace/Header.tsx index 46b2d4999b9..eb225d1db0f 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/Header.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/Header.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Title } from 'design-system'; -import * as React from 'react'; + +import { Title } from '~design-system'; import { translate } from '../../helpers/l10n'; import { EditionKey } from '../../types/editions'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/MarketplaceAppContainer.tsx b/server/sonar-web/src/main/js/apps/marketplace/MarketplaceAppContainer.tsx index 611340d0312..5b9dc42fc5b 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/MarketplaceAppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/MarketplaceAppContainer.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location } from '~sonar-aligned/types/router'; import AdminContext from '../../app/components/AdminContext'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx b/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx index 45f250947d3..0d60109508f 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Card, Table, TableRow } from 'design-system'; + import { sortBy } from 'lodash'; -import * as React from 'react'; +import { Card, Table, TableRow } from '~design-system'; import { translate } from '../../helpers/l10n'; import { PendingPlugin, Plugin, isAvailablePlugin, isInstalledPlugin } from '../../types/plugins'; import PluginAvailable from './components/PluginAvailable'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/Search.tsx b/server/sonar-web/src/main/js/apps/marketplace/Search.tsx index 8afebdcf298..38d30f50b8a 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/Search.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/Search.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputSearch, ToggleButton } from 'design-system'; + import * as React from 'react'; +import { InputSearch, ToggleButton } from '~design-system'; import { translate } from '../../helpers/l10n'; import { Query } from './utils'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/__tests__/MarketplaceApp-it.tsx b/server/sonar-web/src/main/js/apps/marketplace/__tests__/MarketplaceApp-it.tsx index dbcea4e86c9..98c9ec2003c 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/__tests__/MarketplaceApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/__tests__/MarketplaceApp-it.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { NavigationServiceMock } from '../../../api/mocks/NavigationServiceMock'; import PluginsServiceMock from '../../../api/mocks/PluginsServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx index e749448dd4e..dd74dddb1ef 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SubHeading, UnorderedList } from 'design-system'; -import * as React from 'react'; +import { SubHeading, UnorderedList } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { Edition, EditionKey } from '../../../types/editions'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx index 2b77281abb6..503a24fe388 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { ButtonSecondary, CheckIcon, Checkbox, Link, Spinner } from 'design-system'; import * as React from 'react'; +import { ButtonSecondary, CheckIcon, Checkbox, Link, Spinner } from '~design-system'; import { installPlugin, uninstallPlugin, updatePlugin } from '../../../api/plugins'; import Tooltip from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginAvailable.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginAvailable.tsx index 4e6df25032f..5f4efa9a379 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginAvailable.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginAvailable.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { Badge, ContentCell, UnorderedList } from 'design-system'; -import * as React from 'react'; +import { Badge, ContentCell, UnorderedList } from '~design-system'; import { translateWithParameters } from '../../../helpers/l10n'; import { AvailablePlugin, InstalledPlugin } from '../../../types/plugins'; import PluginChangeLogButton from './PluginChangeLogButton'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLog.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLog.tsx index 7c86eda1cf1..7b7fc95f2b5 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLog.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLog.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { UnorderedList } from 'design-system'; + import { sortBy } from 'lodash'; -import * as React from 'react'; +import { UnorderedList } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Release, Update } from '../../../types/plugins'; import PluginChangeLogItem from './PluginChangeLogItem'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx index e815a15d673..386e4f2950a 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { DropdownToggler } from 'design-system'; import * as React from 'react'; +import { DropdownToggler } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Release, Update } from '../../../types/plugins'; import PluginChangeLog from './PluginChangeLog'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogItem.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogItem.tsx index 8e63e555798..fafb7a6acf8 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogItem.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogItem.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, Link, ListItem, Note } from 'design-system'; -import * as React from 'react'; + +import { Badge, Link, ListItem, Note } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import DateFormatter from '../../../components/intl/DateFormatter'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginDescription.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginDescription.tsx index 3ff5cb76cef..d497af1de5c 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginDescription.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginDescription.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, CellComponent } from 'design-system'; -import * as React from 'react'; + +import { Badge, CellComponent } from '~design-system'; import { Plugin } from '../../../types/plugins'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginInstalled.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginInstalled.tsx index 66730e8d6d6..9dae001a77d 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginInstalled.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginInstalled.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { ContentCell, ListItem, UnorderedList } from 'design-system'; -import * as React from 'react'; +import { ContentCell, ListItem, UnorderedList } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { InstalledPlugin } from '../../../types/plugins'; import PluginDescription from './PluginDescription'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginLicense.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginLicense.tsx index 67def352cc2..688d9987628 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginLicense.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginLicense.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ListItem } from 'design-system'; + import { isEmpty } from 'lodash'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { ListItem } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginOrganization.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginOrganization.tsx index ac97e348544..d36cf103a2e 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginOrganization.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginOrganization.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link, ListItem } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { Link, ListItem } from '~design-system'; import { Plugin } from '../../../types/plugins'; export interface PluginOrganizationProps { diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginRiskConsentBox.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginRiskConsentBox.tsx index d8accd8107c..0d36feab95d 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginRiskConsentBox.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginRiskConsentBox.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Card, DarkLabel } from 'design-system'; -import * as React from 'react'; +import { Card, DarkLabel } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { EditionKey } from '../../../types/editions'; import { RiskConsent } from '../../../types/plugins'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginStatus.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginStatus.tsx index e543fa1421a..e1d33841d13 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginStatus.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginStatus.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; -import * as React from 'react'; + +import { FlagMessage } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Plugin } from '../../../types/plugins'; import PluginActions from './PluginActions'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateButton.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateButton.tsx index d25f34030e5..dd4ffef419e 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateButton.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateButton.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ButtonSecondary } from 'design-system'; + import * as React from 'react'; +import { ButtonSecondary } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Update } from '../../../types/plugins'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx index a88090e8943..f2d6315ac9e 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, ListItem } from 'design-system'; -import * as React from 'react'; + +import { Badge, ListItem } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; import { Release, Update } from '../../../types/plugins'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdates.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdates.tsx index c20f5791ce4..29b64f645d0 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdates.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdates.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ListItem, UnorderedList } from 'design-system'; -import * as React from 'react'; + +import { ListItem, UnorderedList } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Update } from '../../../types/plugins'; import PluginUpdateItem from './PluginUpdateItem'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUrls.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUrls.tsx index a17788db2d6..bc8ff64e253 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUrls.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUrls.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link, ListItem } from 'design-system'; -import * as React from 'react'; + +import { Link, ListItem } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Plugin } from '../../../types/plugins'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/routes.tsx b/server/sonar-web/src/main/js/apps/marketplace/routes.tsx index 8dedc452273..be4bfd38053 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/routes.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/utils.ts b/server/sonar-web/src/main/js/apps/marketplace/utils.ts index c1e53f6dac6..dfe6a1e7a76 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/utils.ts +++ b/server/sonar-web/src/main/js/apps/marketplace/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { findLastIndex, memoize } from 'lodash'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { RawQuery } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/ActivityPanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/ActivityPanel.tsx index 6bbf5eaf39a..9d496254333 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/ActivityPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/ActivityPanel.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner } from '@sonarsource/echoes-react'; -import { BasicSeparator, Card } from 'design-system'; import * as React from 'react'; +import { BasicSeparator, Card } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import GraphsHeader from '../../../components/activity-graph/GraphsHeader'; import GraphsHistory from '../../../components/activity-graph/GraphsHistory'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/AiCodeAssuranceWarrning.tsx b/server/sonar-web/src/main/js/apps/overview/branches/AiCodeAssuranceWarrning.tsx index 289a6d9eb5c..94e6a919ba5 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/AiCodeAssuranceWarrning.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/AiCodeAssuranceWarrning.tsx @@ -20,9 +20,8 @@ import styled from '@emotion/styled'; import { ButtonIcon, ButtonVariety, IconX } from '@sonarsource/echoes-react'; -import { themeBorder } from 'design-system'; -import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { themeBorder } from '~design-system'; import { MessageTypes } from '../../../api/messages'; import { translate } from '../../../helpers/l10n'; import { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/Analysis.tsx b/server/sonar-web/src/main/js/apps/overview/branches/Analysis.tsx index fd40ed024ae..aabe4c4ec67 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/Analysis.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/Analysis.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { QualityGateIndicator } from 'design-system'; + import { sortBy } from 'lodash'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { QualityGateIndicator } from '~design-system'; import { Status } from '~sonar-aligned/types/common'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/AnalysisVariations.tsx b/server/sonar-web/src/main/js/apps/overview/branches/AnalysisVariations.tsx index 9c05d456efe..f72ce901ba2 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/AnalysisVariations.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/AnalysisVariations.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { TrendDirection, TrendIcon, TrendType, themeColor } from 'design-system'; -import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { TrendDirection, TrendIcon, TrendType, themeColor } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { AnalysisMeasuresVariations } from '../../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/ApplicationLeakPeriodInfo.tsx b/server/sonar-web/src/main/js/apps/overview/branches/ApplicationLeakPeriodInfo.tsx index 1e8e5359a86..7f3fb02edc9 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/ApplicationLeakPeriodInfo.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/ApplicationLeakPeriodInfo.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HelperHintIcon } from 'design-system'; + import * as React from 'react'; +import { HelperHintIcon } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import DateFromNow from '../../../components/intl/DateFromNow'; import { translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/ApplicationNonCaycProjectWarning.tsx b/server/sonar-web/src/main/js/apps/overview/branches/ApplicationNonCaycProjectWarning.tsx index 203e8888a39..9c08d51c251 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/ApplicationNonCaycProjectWarning.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/ApplicationNonCaycProjectWarning.tsx @@ -19,7 +19,6 @@ */ import { Link } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { getProjectQueryUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/BranchMetaTopBar.tsx b/server/sonar-web/src/main/js/apps/overview/branches/BranchMetaTopBar.tsx index 75248625512..d8bd4920359 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/BranchMetaTopBar.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/BranchMetaTopBar.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, IconSlideshow } from '@sonarsource/echoes-react'; -import { SeparatorCircleIcon } from 'design-system'; -import React from 'react'; import { useIntl } from 'react-intl'; +import { SeparatorCircleIcon } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { getCurrentPage } from '../../../app/components/nav/component/utils'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx index ddf4d2ec60b..9b884da5c8b 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { sortBy, uniq } from 'lodash'; import * as React from 'react'; import { getBranchLikeQuery, isMainBranch } from '~sonar-aligned/helpers/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx index e6cd122544f..84bd1f58f53 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverviewRenderer.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CardSeparator, CenteredLayout, PageContentFontWrapper } from 'design-system'; + import * as React from 'react'; import { useState } from 'react'; +import { CardSeparator, CenteredLayout, PageContentFontWrapper } from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/BranchSummaryStyles.tsx b/server/sonar-web/src/main/js/apps/overview/branches/BranchSummaryStyles.tsx index dc44ad87def..0e3cc957729 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/BranchSummaryStyles.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/BranchSummaryStyles.tsx @@ -19,7 +19,7 @@ */ import styled from '@emotion/styled'; -import { themeColor } from 'design-system/lib'; +import { themeColor } from '~design-system'; export const GridContainer = styled.div` --column-grids-gaps: var(--echoes-dimension-space-600); diff --git a/server/sonar-web/src/main/js/apps/overview/branches/CaycPromotionGuide.tsx b/server/sonar-web/src/main/js/apps/overview/branches/CaycPromotionGuide.tsx index c0a713d45fa..763d54dfd3f 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/CaycPromotionGuide.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/CaycPromotionGuide.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SpotlightTour, SpotlightTourStep } from 'design-system'; -import React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { SpotlightTour, SpotlightTourStep } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx b/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx index 2d28faa1387..675a5644bd9 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx @@ -19,7 +19,6 @@ */ import { Link } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from '../../../helpers/l10n'; import { getQualityGateUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/DismissablePromotedSection.tsx b/server/sonar-web/src/main/js/apps/overview/branches/DismissablePromotedSection.tsx index aa1f6e92636..e71cd3de89c 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/DismissablePromotedSection.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/DismissablePromotedSection.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { ButtonIcon, ButtonSize, ButtonVariety, Heading, IconX } from '@sonarsource/echoes-react'; -import { ButtonPrimary, ButtonSecondary, themeBorder, themeColor } from 'design-system'; -import React, { useState } from 'react'; +import { useState } from 'react'; +import { ButtonPrimary, ButtonSecondary, themeBorder, themeColor } from '~design-system'; import { translate } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/Event.tsx b/server/sonar-web/src/main/js/apps/overview/branches/Event.tsx index 86638afb2c4..05cf1a00db9 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/Event.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/Event.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, QualityGateIndicator } from 'design-system'; + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Badge, QualityGateIndicator } from '~design-system'; import { isDefinitionChangeEvent } from '../../../components/activity-graph/DefinitionChangeEventInner'; import { isRichQualityGateEvent } from '../../../components/activity-graph/RichQualityGateEventInner'; import { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/FailedConditions.tsx b/server/sonar-web/src/main/js/apps/overview/branches/FailedConditions.tsx index 18d271de5ed..60db65c5b04 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/FailedConditions.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/FailedConditions.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CardSeparator, TextError } from 'design-system'; + import _ from 'lodash'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { CardSeparator, TextError } from '~design-system'; import { isDiffMetric } from '../../../helpers/measures'; import { BranchLike } from '../../../types/branch-like'; import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/FirstAnalysisNextStepsNotif.tsx b/server/sonar-web/src/main/js/apps/overview/branches/FirstAnalysisNextStepsNotif.tsx index 1f8e2309902..7a095b6652b 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/FirstAnalysisNextStepsNotif.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/FirstAnalysisNextStepsNotif.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { Link } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/LeakPeriodInfo.tsx b/server/sonar-web/src/main/js/apps/overview/branches/LeakPeriodInfo.tsx index ce427fc8b75..3d15bc0892c 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/LeakPeriodInfo.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/LeakPeriodInfo.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { isApplicationNewCodePeriod } from '../../../helpers/new-code-period'; import { ApplicationPeriod } from '../../../types/application'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelNoNewCode.tsx b/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelNoNewCode.tsx index c0617ca2c3f..0205bf962d1 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelNoNewCode.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelNoNewCode.tsx @@ -19,9 +19,8 @@ */ import { Link } from '@sonarsource/echoes-react'; -import { Note, getTabPanelId } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Note, getTabPanelId } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx index 244e289b2af..0062bba0551 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx @@ -17,9 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Text, TextSize } from '@sonarsource/echoes-react'; import classNames from 'classnames'; +import { isEmpty } from 'lodash'; +import { FormattedMessage, useIntl } from 'react-intl'; import { LightLabel, NoDataIcon, @@ -28,10 +31,7 @@ import { TrendUpCircleIcon, getTabPanelId, themeColor, -} from 'design-system'; -import { isEmpty } from 'lodash'; -import React from 'react'; -import { FormattedMessage, useIntl } from 'react-intl'; +} from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/NoCodeWarning.tsx b/server/sonar-web/src/main/js/apps/overview/branches/NoCodeWarning.tsx index e9821ae8010..dcd3a6e4ccc 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/NoCodeWarning.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/NoCodeWarning.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; + import * as React from 'react'; +import { FlagMessage } from '~design-system'; import { isMainBranch } from '~sonar-aligned/helpers/branch-like'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/OverallCodeMeasuresPanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/OverallCodeMeasuresPanel.tsx index e2aa9d5bc01..a159348cc85 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/OverallCodeMeasuresPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/OverallCodeMeasuresPanel.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { NoDataIcon, SnoozeCircleIcon, TextSubdued, getTabPanelId } from 'design-system'; -import * as React from 'react'; import { useIntl } from 'react-intl'; +import { NoDataIcon, SnoozeCircleIcon, TextSubdued, getTabPanelId } from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/ProjectLeakPeriodInfo.tsx b/server/sonar-web/src/main/js/apps/overview/branches/ProjectLeakPeriodInfo.tsx index 141bfdf85aa..9d745d32484 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/ProjectLeakPeriodInfo.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/ProjectLeakPeriodInfo.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { longFormatterOption } from '../../../components/intl/DateFormatter'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/PromotedSection.tsx b/server/sonar-web/src/main/js/apps/overview/branches/PromotedSection.tsx index ef111823780..49cbc4e5357 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/PromotedSection.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/PromotedSection.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { themeBorder, themeColor } from 'design-system'; import React from 'react'; +import { themeBorder, themeColor } from '~design-system'; interface Props { content: React.ReactNode; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateCondition.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateCondition.tsx index c0391986fac..2cc6a4e6c7f 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateCondition.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateCondition.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { LinkBox, TextMuted } from 'design-system'; import * as React from 'react'; import { Path } from 'react-router-dom'; +import { LinkBox, TextMuted } from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateConditions.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateConditions.tsx index 3b9fc353c0b..b040e062aec 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateConditions.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateConditions.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CardSeparator, Link } from 'design-system'; + import { sortBy } from 'lodash'; import * as React from 'react'; +import { CardSeparator, Link } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx index ab4451a094e..3d99144d688 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { LinkStandalone, Spinner } from '@sonarsource/echoes-react'; -import { CardSeparator, InfoCard, TextError } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { CardSeparator, InfoCard, TextError } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { DocLink } from '../../../helpers/doc-links'; import { useDocUrl } from '../../../helpers/docs'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanelSection.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanelSection.tsx index 345d80b2e07..5453085d468 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanelSection.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanelSection.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BorderlessAccordion, CardSeparator } from 'design-system'; + import * as React from 'react'; +import { BorderlessAccordion, CardSeparator } from '~design-system'; import { translateWithParameters } from '../../../helpers/l10n'; import { QualityGateStatus } from '../../../types/quality-gates'; import { QualityGate } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateSimplifiedCondition.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateSimplifiedCondition.tsx index 4cb93fdb7ef..0b4c656ecc5 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateSimplifiedCondition.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateSimplifiedCondition.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Highlight, LinkBox } from 'design-system'; -import * as React from 'react'; + +import { Highlight, LinkBox } from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { getComponentIssuesUrl } from '~sonar-aligned/helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatus.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatus.tsx index 0420b284b9a..cb48bd85576 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatus.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatus.tsx @@ -19,8 +19,7 @@ */ import { Display } from '@sonarsource/echoes-react'; -import { Note, QualityGateIndicator } from 'design-system'; -import React from 'react'; +import { Note, QualityGateIndicator } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { translate } from '../../../helpers/l10n'; import { Status } from '../../../sonar-aligned/types/common'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/ReplayTour.tsx b/server/sonar-web/src/main/js/apps/overview/branches/ReplayTour.tsx index 14de43615a9..40494cb1127 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/ReplayTour.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/ReplayTour.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SpotlightTour, SpotlightTourStep } from 'design-system'; -import React from 'react'; +import { SpotlightTour, SpotlightTourStep } from '~design-system'; import { DocLink } from '../../../helpers/doc-links'; import { useDocUrl } from '../../../helpers/docs'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx index 3f3cb6f1dc1..694dd594eaa 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { LinkHighlight, LinkStandalone, Text, Tooltip } from '@sonarsource/echoes-react'; -import { Badge, themeColor } from 'design-system'; -import * as React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { Badge, themeColor } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { getComponentIssuesUrl } from '~sonar-aligned/helpers/urls'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureRating.tsx b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureRating.tsx index c990b5f26ac..d05ab30fb1f 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureRating.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureRating.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { RatingEnum } from 'design-system/lib'; -import * as React from 'react'; + import { useCallback } from 'react'; import { useIntl } from 'react-intl'; +import { RatingEnum } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import RatingComponent from '../../../app/components/metrics/RatingComponent'; import RatingTooltipContent from '../../../components/measure/RatingTooltipContent'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/SonarLintPromotion.tsx b/server/sonar-web/src/main/js/apps/overview/branches/SonarLintPromotion.tsx index 3520e7ab4ec..3ab5c7f9e99 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/SonarLintPromotion.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/SonarLintPromotion.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DiscreetLink, InfoCard } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { DiscreetLink, InfoCard } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; import { SonarLintLogo } from '../../../components/logos/SonarLintLogo'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx index 2dff299120e..8fe1a828b96 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx @@ -20,9 +20,9 @@ import { Spinner } from '@sonarsource/echoes-react'; import { isBefore, sub } from 'date-fns'; -import { ButtonLink, Card, FlagMessage, Tabs, themeBorder } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { ButtonLink, Card, FlagMessage, Tabs, themeBorder } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ActivityPanel-it.tsx b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ActivityPanel-it.tsx index b250935267b..ffc54fa17be 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ActivityPanel-it.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ActivityPanel-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; -import * as React from 'react'; import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock'; import { mockComponent } from '../../../../helpers/mocks/component'; import { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-it.tsx b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-it.tsx index e4fc40a4682..8fe0b15c627 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-it.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MetricKey } from '~sonar-aligned/types/metrics'; @@ -755,7 +755,9 @@ it.each([ // wait for loading await screen.findByText('overview.quality_gate'); - expect(screen.queryByText('overview.project.next_steps.set_up_ci') === null).toBe(expected); + await waitFor(() => { + expect(screen.queryByText('overview.project.next_steps.set_up_ci') === null).toBe(expected); + }); }, ); diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ProjectLeakPeriodInfo-test.tsx b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ProjectLeakPeriodInfo-test.tsx index 0eb9d17a1b4..7c8b4f7fa31 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ProjectLeakPeriodInfo-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ProjectLeakPeriodInfo-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { differenceInDays } from 'date-fns'; -import * as React from 'react'; import { IntlShape } from 'react-intl'; import { mockPeriod } from '../../../../helpers/testMocks'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/QualityGatePanelSection-test.tsx b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/QualityGatePanelSection-test.tsx index ad94d7c022a..c36387e051b 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/QualityGatePanelSection-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/QualityGatePanelSection-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import { Status } from '~sonar-aligned/types/common'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/SonarLintPromotion-test.tsx b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/SonarLintPromotion-test.tsx index 4dcd3f55b63..9a1a1fc0ffe 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/SonarLintPromotion-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/SonarLintPromotion-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { mockQualityGateStatusCondition } from '../../../../helpers/mocks/quality-gates'; import { mockCurrentUser } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/test-utils.ts b/server/sonar-web/src/main/js/apps/overview/branches/test-utils.ts index eef3c9f2c65..29a0dfdb699 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/test-utils.ts +++ b/server/sonar-web/src/main/js/apps/overview/branches/test-utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import { byLabelText, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector'; import { SoftwareImpactSeverity, SoftwareQuality } from '../../../types/clean-code-taxonomy'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/AfterMergeNote.tsx b/server/sonar-web/src/main/js/apps/overview/components/AfterMergeNote.tsx index 308f3b6aab1..d7fddc87112 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/AfterMergeNote.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/AfterMergeNote.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Note } from 'design-system'; -import React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { Note } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { findMeasure } from '../../../helpers/measures'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/AnalysisErrorMessage.tsx b/server/sonar-web/src/main/js/apps/overview/components/AnalysisErrorMessage.tsx index a5daa75ba3d..d11e12812c9 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/AnalysisErrorMessage.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/AnalysisErrorMessage.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; -import React from 'react'; + import { FormattedMessage } from 'react-intl'; import { useLocation } from 'react-router-dom'; +import { Link } from '~design-system'; import { isBranch, isMainBranch, isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { hasMessage, translate } from '../../../helpers/l10n'; import { getComponentBackgroundTaskUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/AnalysisErrorModal.tsx b/server/sonar-web/src/main/js/apps/overview/components/AnalysisErrorModal.tsx index 933c04c4924..923b44d64a4 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/AnalysisErrorModal.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/AnalysisErrorModal.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Modal } from 'design-system'; -import * as React from 'react'; +import { Modal } from '~design-system'; import { hasMessage, translate } from '../../../helpers/l10n'; import { Task } from '../../../types/tasks'; import { Component } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/AnalysisLicenseError.tsx b/server/sonar-web/src/main/js/apps/overview/components/AnalysisLicenseError.tsx index 4f038e9d551..ec18fb64382 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/AnalysisLicenseError.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/AnalysisLicenseError.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { AppStateContext } from '../../../app/components/app-state/AppStateContext'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/AnalysisStatus.tsx b/server/sonar-web/src/main/js/apps/overview/components/AnalysisStatus.tsx index fa1a30d7b9e..3523073e5f3 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/AnalysisStatus.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/AnalysisStatus.tsx @@ -20,8 +20,8 @@ import { Link, Spinner } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { FlagMessage } from 'design-system'; import * as React from 'react'; +import { FlagMessage } from '~design-system'; import { useComponent } from '../../../app/components/componentContext/withComponentContext'; import { translate } from '../../../helpers/l10n'; import { useBranchWarningQuery } from '../../../queries/branch'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/AnalysisWarningsModal.tsx b/server/sonar-web/src/main/js/apps/overview/components/AnalysisWarningsModal.tsx index 3390089477d..4a3bcdb11af 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/AnalysisWarningsModal.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/AnalysisWarningsModal.tsx @@ -19,6 +19,7 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; +import * as React from 'react'; import { FlagMessage, HtmlFormatter, @@ -26,8 +27,7 @@ import { SafeHTMLInjection, SanitizeLevel, Spinner, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; import { translate } from '../../../helpers/l10n'; import { useDismissBranchWarningMutation } from '../../../queries/branch'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/App.tsx b/server/sonar-web/src/main/js/apps/overview/components/App.tsx index 89e87134d9a..25e3a609ec6 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/App.tsx @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.tsx b/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.tsx index 3f52c59c316..50cf4213f2e 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.tsx @@ -20,9 +20,9 @@ import styled from '@emotion/styled'; import { Spinner } from '@sonarsource/echoes-react'; -import { FlagMessage, LargeCenteredLayout, PageContentFontWrapper } from 'design-system'; import * as React from 'react'; import { Navigate } from 'react-router-dom'; +import { FlagMessage, LargeCenteredLayout, PageContentFontWrapper } from '~design-system'; import { isBranch, isMainBranch } from '~sonar-aligned/helpers/branch-like'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { getScannableProjects } from '../../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/IgnoredConditionWarning.tsx b/server/sonar-web/src/main/js/apps/overview/components/IgnoredConditionWarning.tsx index c9cc1e9fea0..2ecf07dfa59 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/IgnoredConditionWarning.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/IgnoredConditionWarning.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, HelperHintIcon } from 'design-system'; -import React from 'react'; + +import { FlagMessage, HelperHintIcon } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/IssueMeasuresCardInner.tsx b/server/sonar-web/src/main/js/apps/overview/components/IssueMeasuresCardInner.tsx index 4676d3ec19c..b565510c6ca 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/IssueMeasuresCardInner.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/IssueMeasuresCardInner.tsx @@ -17,12 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { Badge, NoDataIcon, themeColor } from 'design-system'; import * as React from 'react'; import { Path } from 'react-router-dom'; +import { Badge, NoDataIcon, themeColor } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { localizeMetric } from '../../../helpers/measures'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/LastAnalysisLabel.tsx b/server/sonar-web/src/main/js/apps/overview/components/LastAnalysisLabel.tsx index e4afb3c688d..6f3482f7728 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/LastAnalysisLabel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/LastAnalysisLabel.tsx @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; import { useIntl } from 'react-intl'; import DateFromNow from '../../../components/intl/DateFromNow'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCard.tsx b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCard.tsx index 02251afceb1..7d4add80290 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCard.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCard.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react'; -import { Badge, themeColor } from 'design-system'; import * as React from 'react'; import { To } from 'react-router-dom'; +import { Badge, themeColor } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { localizeMetric } from '../../../helpers/measures'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardNumber.tsx b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardNumber.tsx index ae16789d347..937c82230d4 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardNumber.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardNumber.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LightLabel, TextError } from 'design-system'; + import * as React from 'react'; import { useIntl } from 'react-intl'; import { To } from 'react-router-dom'; +import { LightLabel, TextError } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardPercent.tsx b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardPercent.tsx index 762fa4ac9f4..62b3dd41e5c 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardPercent.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardPercent.tsx @@ -20,10 +20,10 @@ import { LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { CoverageIndicator, DuplicationsIndicator, LightLabel, TextError } from 'design-system'; import * as React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import { To } from 'react-router-dom'; +import { CoverageIndicator, DuplicationsIndicator, LightLabel, TextError } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { duplicationRatingConverter, getLeakValue } from '../../../components/measure/utils'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/ZeroNewIssuesSimplificationGuide.tsx b/server/sonar-web/src/main/js/apps/overview/components/ZeroNewIssuesSimplificationGuide.tsx index 2c3bdb0743e..388585a6273 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/ZeroNewIssuesSimplificationGuide.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/ZeroNewIssuesSimplificationGuide.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SpotlightTour, SpotlightTourStep } from 'design-system'; + import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { SpotlightTour, SpotlightTourStep } from '~design-system'; import { dismissNotice } from '../../../api/users'; import { CurrentUserContext } from '../../../app/components/current-user/CurrentUserContext'; import Link from '../../../components/common/Link'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisErrorMessage-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisErrorMessage-test.tsx index 0958050e43f..cbaf37f699e 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisErrorMessage-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisErrorMessage-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock'; import { mockComponent } from '../../../../helpers/mocks/component'; import { mockTask } from '../../../../helpers/mocks/tasks'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisErrorModal-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisErrorModal-test.tsx index eaeb834eaf5..26185d1202e 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisErrorModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisErrorModal-test.tsx @@ -19,7 +19,6 @@ */ import { screen } from '@testing-library/react'; -import * as React from 'react'; import { mockComponent } from '../../../../helpers/mocks/component'; import { mockTask } from '../../../../helpers/mocks/tasks'; import { renderApp } from '../../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisLicenseError-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisLicenseError-test.tsx index c5a8b5f44c2..089ad2bec51 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisLicenseError-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisLicenseError-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { isValidLicense } from '../../../../api/editions'; import { mockTask } from '../../../../helpers/mocks/tasks'; import { mockAppState } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisStatus-it.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisStatus-it.tsx index 921fc5c9cad..28f2d8f8ba8 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisStatus-it.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisStatus-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock'; import ComputeEngineServiceMock from '../../../../api/mocks/ComputeEngineServiceMock'; import { useComponent } from '../../../../app/components/componentContext/withComponentContext'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisWarningsModal-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisWarningsModal-test.tsx index 4f3e735b19e..55b36264c88 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisWarningsModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/AnalysisWarningsModal-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { mockComponent } from '../../../../helpers/mocks/component'; import { mockTaskWarning } from '../../../../helpers/mocks/tasks'; import { mockCurrentUser } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/App-test.tsx index b8b7cca42d3..16c3a1cf387 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/App-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; -import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { getScannableProjects } from '../../../../api/components'; import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/useLicenseIsValid.ts b/server/sonar-web/src/main/js/apps/overview/components/useLicenseIsValid.ts index 8693d6b5fbc..0d21d75726f 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/useLicenseIsValid.ts +++ b/server/sonar-web/src/main/js/apps/overview/components/useLicenseIsValid.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React, { useEffect } from 'react'; import { isValidLicense } from '../../../api/editions'; diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGateConditions.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGateConditions.tsx index e4ee0a0dd8f..7d386dbda9e 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGateConditions.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGateConditions.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { Badge, ButtonSecondary, themeBorder, themeColor } from 'design-system'; -import React from 'react'; import { useIntl } from 'react-intl'; +import { Badge, ButtonSecondary, themeBorder, themeColor } from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx index f2719e08a55..85e70b4d105 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx @@ -17,8 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IconQuestionMark, Tooltip, TooltipSide } from '@sonarsource/echoes-react'; import classNames from 'classnames'; +import * as React from 'react'; +import { useIntl } from 'react-intl'; import { Card, LightLabel, @@ -27,9 +30,7 @@ import { TextSubdued, TrendDownCircleIcon, TrendUpCircleIcon, -} from 'design-system'; -import * as React from 'react'; -import { useIntl } from 'react-intl'; +} from '~design-system'; import { getComponentIssuesUrl, getComponentSecurityHotspotsUrl, diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx index d896877f22d..03dd399f4d7 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { useIntl } from 'react-intl'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx index 8621c4c1b3d..5407440d983 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, CenteredLayout, PageContentFontWrapper, Spinner } from 'design-system'; + import { uniq } from 'lodash'; -import * as React from 'react'; +import { BasicSeparator, CenteredLayout, PageContentFontWrapper, Spinner } from '~design-system'; import { enhanceConditionWithMeasure, enhanceMeasuresWithMetrics } from '../../../helpers/measures'; import { isDefined } from '../../../helpers/types'; import { useBranchStatusQuery } from '../../../queries/branch'; diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/SonarLintAd.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/SonarLintAd.tsx index d6c355e5c71..d3217e4d2c5 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/SonarLintAd.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/SonarLintAd.tsx @@ -17,7 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; +import React from 'react'; +import { useIntl } from 'react-intl'; import { Card, CheckIcon, @@ -28,9 +31,7 @@ import { StandoutLink, SubTitle, SubnavigationFlowSeparator, -} from 'design-system'; -import React from 'react'; -import { useIntl } from 'react-intl'; +} from '~design-system'; import { Status } from '~sonar-aligned/types/common'; import { useCurrentUser } from '../../../app/components/current-user/CurrentUserContext'; import useLocalStorage from '../../../hooks/useLocalStorage'; diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/PullRequestOverview-it.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/PullRequestOverview-it.tsx index f6952019b2b..76c955398bc 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/PullRequestOverview-it.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/PullRequestOverview-it.tsx @@ -17,12 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; -import { ComponentQualifier } from '~sonar-aligned/types/component'; -import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; +import { MetricKey } from '~sonar-aligned/types/metrics'; import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock'; import { fetchQualityGate, getQualityGateProjectStatus } from '../../../../api/quality-gates'; import CurrentUserContextProvider from '../../../../app/components/current-user/CurrentUserContextProvider'; @@ -32,7 +31,7 @@ import { mockQualityGate, mockQualityGateProjectCondition, } from '../../../../helpers/mocks/quality-gates'; -import { mockLoggedInUser, mockMeasure, mockMetric } from '../../../../helpers/testMocks'; +import { mockLoggedInUser } from '../../../../helpers/testMocks'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { ComponentPropsType } from '../../../../helpers/testUtils'; import { CaycStatus } from '../../../../types/types'; @@ -44,6 +43,9 @@ jest.mock('../../../../api/ce', () => ({ })); jest.mock('../../../../api/measures', () => { + const { mockMeasure, mockMetric } = jest.requireActual('../../../../helpers/testMocks'); + const { ComponentQualifier } = jest.requireActual('~sonar-aligned/types/component'); + const { MetricKey, MetricType } = jest.requireActual('~sonar-aligned/types/metrics'); return { ...jest.requireActual('../../../../sonar-aligned/types/metrics'), getMeasuresWithPeriodAndMetrics: jest.fn().mockResolvedValue({ diff --git a/server/sonar-web/src/main/js/apps/overview/routes.tsx b/server/sonar-web/src/main/js/apps/overview/routes.tsx index 1a2249ef833..817bd01c56e 100644 --- a/server/sonar-web/src/main/js/apps/overview/routes.tsx +++ b/server/sonar-web/src/main/js/apps/overview/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/overview/utils.tsx b/server/sonar-web/src/main/js/apps/overview/utils.tsx index 23134935448..6ddb82ea2c1 100644 --- a/server/sonar-web/src/main/js/apps/overview/utils.tsx +++ b/server/sonar-web/src/main/js/apps/overview/utils.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { memoize } from 'lodash'; -import React from 'react'; import { IntlShape } from 'react-intl'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx index b4b2447ac81..612885ea523 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, DropdownMenu, IconMoreVertical } from '@sonarsource/echoes-react'; import { difference } from 'lodash'; import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.tsx index b99a253841b..a1110617b6f 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge } from 'design-system'; + import { sortBy } from 'lodash'; -import * as React from 'react'; +import { Badge } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { PermissionTemplate } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/DeleteForm.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/DeleteForm.tsx index 7b9d1267f15..70f79762ce5 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/DeleteForm.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/DeleteForm.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal, Spinner } from 'design-system'; import * as React from 'react'; import { useState } from 'react'; +import { Modal, Spinner } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { PermissionTemplate } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Form.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Form.tsx index be36d557d86..483b85867c2 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Form.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Form.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FormField, InputField, InputTextArea, Modal, Spinner } from 'design-system'; import * as React from 'react'; +import { FormField, InputField, InputTextArea, Modal, Spinner } from '~design-system'; import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Header.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Header.tsx index 0b2000d8b58..b134992f7e7 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Header.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Header.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Spinner, Title } from 'design-system'; -import React, { useState } from 'react'; +import { useState } from 'react'; +import { Spinner, Title } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { Router } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Home.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Home.tsx index 15705cbc40c..66ed2c43c16 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Home.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Home.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper } from 'design-system'; -import * as React from 'react'; + import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Permission, PermissionTemplate } from '../../../types/types'; import Header from './Header'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/List.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/List.tsx index 0447ab0b9a5..633d60b2217 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/List.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/List.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Table } from 'design-system'; -import * as React from 'react'; + +import { Table } from '~design-system'; import { Permission, PermissionTemplate } from '../../../types/types'; import ListHeader from './ListHeader'; import ListItem from './ListItem'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.tsx index ecfa5dbf88a..daba3e88cdd 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, FlagMessage, HelperHintIcon, TableRow } from 'design-system'; + import * as React from 'react'; +import { ContentCell, FlagMessage, HelperHintIcon, TableRow } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import InstanceMessage from '../../../components/common/InstanceMessage'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.tsx index d2aba35ddfa..0b8b89fc89a 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, TableRow } from 'design-system'; -import * as React from 'react'; + +import { ContentCell, TableRow } from '~design-system'; import { PermissionTemplate } from '../../../types/types'; import ActionsCell from './ActionsCell'; import NameCell from './NameCell'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.tsx index e918926d1a2..3c708fb32c7 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, ContentCell, Link } from 'design-system'; -import * as React from 'react'; + +import { CodeSnippet, ContentCell, Link } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { PermissionTemplate } from '../../../types/types'; import { PERMISSION_TEMPLATES_PATH } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx index 7deea79a972..43d540f8bd8 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, HelperHintIcon } from 'design-system'; -import * as React from 'react'; + +import { ContentCell, HelperHintIcon } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ProvisioningWarning.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/ProvisioningWarning.tsx index a286ab247e9..a12b285dc93 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ProvisioningWarning.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ProvisioningWarning.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; -import React from 'react'; + +import { FlagMessage } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { useGithubProvisioningEnabledQuery } from '../../../queries/identity-provider/github'; import { useGilabProvisioningEnabledQuery } from '../../../queries/identity-provider/gitlab'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx index 22d0ef3b1f9..e8b428aefab 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper } from 'design-system'; + import { without } from 'lodash'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper } from '~design-system'; import * as api from '../../../api/permissions'; import AllHoldersList from '../../../components/permissions/AllHoldersList'; import { FilterOption } from '../../../components/permissions/SearchForm'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateDetails.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateDetails.tsx index 296c5da3042..012f1f97277 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateDetails.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateDetails.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { PermissionTemplate } from '../../../types/types'; import Defaults from './Defaults'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateHeader.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateHeader.tsx index 51e7713b608..b965cc6ec98 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateHeader.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/TemplateHeader.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link, Title } from 'design-system'; -import * as React from 'react'; + +import { Link, Title } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { PermissionTemplate } from '../../../types/types'; import { PERMISSION_TEMPLATES_PATH } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/PermissionTemplatesApp-it.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/PermissionTemplatesApp-it.tsx index a7e00e7e97a..be62205b647 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/PermissionTemplatesApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/PermissionTemplatesApp-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; @@ -65,7 +66,7 @@ describe('rendering', () => { await ui.appLoaded(); // Lists all templates. - expect(ui.templateLink('Permission Template 1').get()).toBeInTheDocument(); + expect(await ui.templateLink('Permission Template 1').find()).toBeInTheDocument(); expect(ui.templateLink('Permission Template 2').get()).toBeInTheDocument(); // Shows warning for browse and code viewer permissions. diff --git a/server/sonar-web/src/main/js/apps/permission-templates/routes.tsx b/server/sonar-web/src/main/js/apps/permission-templates/routes.tsx index 9dbdef25593..5b62445362d 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/routes.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/utils.ts b/server/sonar-web/src/main/js/apps/permission-templates/utils.ts index 4e378b464db..86e34ce7eb0 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/utils.ts +++ b/server/sonar-web/src/main/js/apps/permission-templates/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { sortBy } from 'lodash'; import { Permission, PermissionTemplate } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.tsx index e7f8be8d33b..abc6822f46d 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Title } from 'design-system'; -import * as React from 'react'; + +import { Title } from '~design-system'; import { translate } from '../../../../helpers/l10n'; export default function PageHeader() { diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx index 57566f63873..cb600b701c2 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper } from 'design-system'; import { without } from 'lodash'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import * as api from '../../../../api/permissions'; import withAppStateContext, { diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/PermissionsGlobal-it.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/PermissionsGlobal-it.tsx index 2aea662cae4..b5f614462ce 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/PermissionsGlobal-it.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/PermissionsGlobal-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { without } from 'lodash'; @@ -67,7 +68,8 @@ describe('rendering', () => { const user = userEvent.setup(); const ui = getPageObject(user); renderPermissionsGlobalApp(); - await ui.appLoaded(); + + expect(await ui.pageTitle.find()).toBeInTheDocument(); without( flattenPermissionsList(PERMISSIONS_ORDER_GLOBAL), @@ -91,7 +93,8 @@ describe('rendering', () => { const user = userEvent.setup(); const ui = getPageObject(user); renderPermissionsGlobalApp(mockAppState({ qualifiers: [qualifier] })); - await ui.appLoaded(); + + expect(await ui.pageTitle.find()).toBeInTheDocument(); permissions.forEach((permission) => { expect(ui.globalPermissionCheckbox('johndoe', permission).get()).toBeInTheDocument(); diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx index 1c642dc64ac..6c47af9e198 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { ButtonPrimary, FlagMessage, @@ -24,8 +26,7 @@ import { InputSelect, LabelValueSelectOption, Modal, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { applyTemplateToProject, getPermissionTemplates } from '../../../../api/permissions'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { PermissionTemplate } from '../../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx index 419e7b6a536..ae1906f47e4 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.tsx @@ -19,8 +19,8 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, Title } from 'design-system'; import * as React from 'react'; +import { FlagMessage, Title } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; import GitHubSynchronisationWarning from '../../../../app/components/GitHubSynchronisationWarning'; diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx index dd458cd1b06..5daa3306d15 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper } from 'design-system'; + import { noop, without } from 'lodash'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper } from '~design-system'; import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; import * as api from '../../../../api/permissions'; import { getComponents } from '../../../../api/project-management'; diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectVisibility.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectVisibility.tsx index abb7a4706f0..0c2caed0398 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectVisibility.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectVisibility.tsx @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import VisibilitySelector from '../../../../components/common/VisibilitySelector'; import { useIsGitHubProjectQuery, diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx index 7c649c75e27..46211a1db0b 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; -import * as React from 'react'; +import { FlagMessage } from '~design-system'; import ConfirmModal from '../../../../components/controls/ConfirmModal'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/PermissionsProject-it.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/PermissionsProject-it.tsx index c1d2be79d89..75bebf943af 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/PermissionsProject-it.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/PermissionsProject-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; @@ -92,9 +93,8 @@ describe('rendering', () => { const user = userEvent.setup(); const ui = getPageObject(user); renderPermissionsProjectApp({ qualifier, visibility: Visibility.Private }); - await ui.appLoaded(); - expect(screen.getByText(description)).toBeInTheDocument(); + expect(await screen.findByText(description)).toBeInTheDocument(); permissions.forEach((permission) => { expect(ui.projectPermissionCheckbox('johndoe', permission).get()).toBeInTheDocument(); }); diff --git a/server/sonar-web/src/main/js/apps/permissions/routes.tsx b/server/sonar-web/src/main/js/apps/permissions/routes.tsx index c2fa8129d22..1d3f57a68ac 100644 --- a/server/sonar-web/src/main/js/apps/permissions/routes.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/permissions/test-utils.ts b/server/sonar-web/src/main/js/apps/permissions/test-utils.ts index 2e2eb11c4ee..080fbec4f22 100644 --- a/server/sonar-web/src/main/js/apps/permissions/test-utils.ts +++ b/server/sonar-web/src/main/js/apps/permissions/test-utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { waitFor } from '@testing-library/react'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.ts index 2d940fa9691..ceaba67fe2e 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { DEFAULT_GRAPH } from '../../../components/activity-graph/utils'; import * as dates from '../../../helpers/dates'; import { GraphType, ProjectAnalysisEventCategory } from '../../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx index 418cc66b740..06d19395a9b 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DestructiveIcon, InteractiveIcon, PencilIcon, TrashIcon } from 'design-system'; + import * as React from 'react'; +import { DestructiveIcon, InteractiveIcon, PencilIcon, TrashIcon } from '~design-system'; import EventInner from '../../../components/activity-graph/EventInner'; import Tooltip from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/Events.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/Events.tsx index bd7940fa931..7342015ac3f 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/Events.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/Events.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { sortBy } from 'lodash'; import * as React from 'react'; import { AnalysisEvent, ProjectAnalysisEventCategory } from '../../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx index c7cc6ee879e..c55aec00f8a 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { isEqual } from 'date-fns'; -import { Badge, HelperHintIcon, LightLabel, Spinner, themeColor } from 'design-system'; import * as React from 'react'; +import { Badge, HelperHintIcon, LightLabel, Spinner, themeColor } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import DateFormatter from '../../../components/intl/DateFormatter'; import { toShortISO8601String } from '../../../helpers/dates'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.tsx index a95d3e5b059..f67de7666e0 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { ButtonIcon, @@ -26,9 +27,9 @@ import { IconMoreVertical, } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { HelperHintIcon, themeBorder, themeColor } from 'design-system'; import * as React from 'react'; import { WrappedComponentProps, injectIntl } from 'react-intl'; +import { HelperHintIcon, themeBorder, themeColor } from '~design-system'; import ClickEventBoundary from '../../../components/controls/ClickEventBoundary'; import Tooltip from '../../../components/controls/Tooltip'; import { formatterOption } from '../../../components/intl/DateTimeFormatter'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx index b51a8650651..9ab33dd9f2a 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner } from '@sonarsource/echoes-react'; import React from 'react'; import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppRenderer.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppRenderer.tsx index de667ada90b..c5c9b8b55ad 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppRenderer.tsx @@ -19,14 +19,13 @@ */ import styled from '@emotion/styled'; +import { Helmet } from 'react-helmet-async'; import { LargeCenteredLayout, PageContentFontWrapper, themeBorder, themeColor, -} from 'design-system'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; +} from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx index 69bae180595..51b7db8fee5 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { DateRangePicker, PopupZLevel } from 'design-system'; import * as React from 'react'; +import { DateRangePicker, PopupZLevel } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Query } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx index fa05b8f0303..ebf076627bb 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; import { debounce, findLast, maxBy, minBy, sortBy } from 'lodash'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage } from '~design-system'; import GraphsHeader from '../../../components/activity-graph/GraphsHeader'; import GraphsHistory from '../../../components/activity-graph/GraphsHistory'; import GraphsZoom from '../../../components/activity-graph/GraphsZoom'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageFilters.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageFilters.tsx index 5a1bcea0ee8..0ee0d13708c 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageFilters.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageFilters.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputSelect, LabelValueSelectOption } from 'design-system'; + import * as React from 'react'; +import { InputSelect, LabelValueSelectOption } from '~design-system'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-it.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-it.tsx index ce6c00ae23e..c44155f4a92 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { keyBy, times } from 'lodash'; -import React from 'react'; import { Route } from 'react-router-dom'; import { byLabelText, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx index 8bc24ceda69..d5b6fc43e9a 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { InputField, Modal } from 'design-system'; import * as React from 'react'; +import { InputField, Modal } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { useCreateEventMutation } from '../../../../queries/project-analyses'; import { ParsedAnalysis } from '../../../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx index c2d16c56b63..686461c56e2 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/ChangeEventForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { InputField, Modal } from 'design-system'; import * as React from 'react'; +import { InputField, Modal } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { useChangeEventMutation } from '../../../../queries/project-analyses'; import { AnalysisEvent } from '../../../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx index b7b1668e426..fe8717980b8 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal } from 'design-system'; -import * as React from 'react'; +import { Modal } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { useDeleteAnalysisMutation } from '../../../../queries/project-analyses'; import { ParsedAnalysis } from '../../../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx index 3b7db392427..b6492cc22e9 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal } from 'design-system'; -import * as React from 'react'; +import { Modal } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { useDeleteEventMutation } from '../../../../queries/project-analyses'; import { AnalysisEvent } from '../../../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/routes.tsx b/server/sonar-web/src/main/js/apps/projectActivity/routes.tsx index 31cbc16ae8c..50e3a5b4873 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/utils.ts b/server/sonar-web/src/main/js/apps/projectActivity/utils.ts index 95bde09ef29..a93df4ef785 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/utils.ts +++ b/server/sonar-web/src/main/js/apps/projectActivity/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { startOfDay } from 'date-fns'; import { isEqual, uniq } from 'lodash'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/ProjectBranchesApp.tsx b/server/sonar-web/src/main/js/apps/projectBranches/ProjectBranchesApp.tsx index 90f0f0bdef2..56780045367 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/ProjectBranchesApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/ProjectBranchesApp.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper, Title } from 'design-system'; + import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper, Title } from '~design-system'; import withComponentContext from '../../app/components/componentContext/withComponentContext'; import { translate } from '../../helpers/l10n'; import { withBranchLikes } from '../../queries/branch'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/__tests__/ProjectBranchesApp-it.tsx b/server/sonar-web/src/main/js/apps/projectBranches/__tests__/ProjectBranchesApp-it.tsx index 9016dbe4031..8131ea60af8 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/__tests__/ProjectBranchesApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/__tests__/ProjectBranchesApp-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byLabelText, byRole } from '~sonar-aligned/helpers/testSelector'; import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock'; import SettingsServiceMock from '../../../api/mocks/SettingsServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeRow.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeRow.tsx index 6d875243266..65cf3719958 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeRow.tsx @@ -17,14 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, ButtonVariety, DropdownMenu, IconMoreVertical, } from '@sonarsource/echoes-react'; -import { ActionCell, Badge, ContentCell, TableRowInteractive } from 'design-system'; import * as React from 'react'; +import { ActionCell, Badge, ContentCell, TableRowInteractive } from '~design-system'; import { isBranch, isMainBranch, isPullRequest } from '~sonar-aligned/helpers/branch-like'; import QualityGateStatus from '../../../app/components/nav/component/branch-like/QualityGateStatus'; import BranchLikeIcon from '../../../components/icon-mappers/BranchLikeIcon'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTable.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTable.tsx index 8f838a058f9..825aec26503 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTable.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTable.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ActionCell, ContentCell, HelperHintIcon, Table, TableRow } from 'design-system'; + import * as React from 'react'; +import { ActionCell, ContentCell, HelperHintIcon, Table, TableRow } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { getBranchLikeKey } from '../../../helpers/branch-like'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTabs.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTabs.tsx index 51aaf5af4de..9d671e5d0a6 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTabs.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTabs.tsx @@ -19,9 +19,8 @@ */ import { IconGitBranch, IconPullrequest } from '@sonarsource/echoes-react'; -import { ToggleButton, getTabId, getTabPanelId } from 'design-system'; -import * as React from 'react'; import { useState } from 'react'; +import { ToggleButton, getTabId, getTabPanelId } from '~design-system'; import { isBranch, isMainBranch, isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { sortBranches, sortPullRequests } from '../../../helpers/branch-like'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchPurgeSetting.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchPurgeSetting.tsx index 8e28307aba5..1289aea75a4 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchPurgeSetting.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchPurgeSetting.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HelperHintIcon, Spinner, Switch } from 'design-system'; -import * as React from 'react'; + +import { HelperHintIcon, Spinner, Switch } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { isMainBranch } from '~sonar-aligned/helpers/branch-like'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/DeleteBranchModal.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/DeleteBranchModal.tsx index 74d97992aa5..71433384631 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/DeleteBranchModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/DeleteBranchModal.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Modal } from '~design-system'; import { isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { getBranchLikeDisplayName } from '../../../helpers/branch-like'; import { useDeletBranchMutation } from '../../../queries/branch'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/LifetimeInformation.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/LifetimeInformation.tsx index b2c93d7179d..e48e62d3935 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/LifetimeInformation.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/LifetimeInformation.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getValue } from '../../../api/settings'; import withAppStateContext from '../../../app/components/app-state/withAppStateContext'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/LifetimeInformationRenderer.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/LifetimeInformationRenderer.tsx index 2f902d4e4f5..3137a132fa4 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/LifetimeInformationRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/LifetimeInformationRenderer.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link, Spinner } from 'design-system'; + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Link, Spinner } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/RenameBranchModal.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/RenameBranchModal.tsx index 238ba52113e..95d5a4f23ef 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/RenameBranchModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/RenameBranchModal.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FormField, InputField, Modal } from 'design-system'; import * as React from 'react'; import { useState } from 'react'; import { FormattedMessage } from 'react-intl'; +import { FormField, InputField, Modal } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { useRenameMainBranchMutation } from '../../../queries/branch'; import { MainBranch } from '../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/SetAsMainBranchModal.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/SetAsMainBranchModal.tsx index c306584011d..8719079a5cb 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/SetAsMainBranchModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/SetAsMainBranchModal.tsx @@ -19,9 +19,9 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, Modal } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Modal } from '~design-system'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/routes.tsx b/server/sonar-web/src/main/js/apps/projectBranches/routes.tsx index 5efbbd4a633..02ac41ae9f0 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx b/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx index 87a48fd31e6..f55cd891e99 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CenteredLayout, PageContentFontWrapper } from 'design-system'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { CenteredLayout, PageContentFontWrapper } from '~design-system'; import { ComponentContext } from '../../app/components/componentContext/ComponentContext'; import { translate } from '../../helpers/l10n'; import Form from './Form'; diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/Form.tsx b/server/sonar-web/src/main/js/apps/projectDeletion/Form.tsx index 23df77720b9..3c968bee02d 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/Form.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/Form.tsx @@ -19,8 +19,7 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { addGlobalSuccessMessage } from 'design-system'; -import * as React from 'react'; +import { addGlobalSuccessMessage } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; import { Router } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/Header.tsx b/server/sonar-web/src/main/js/apps/projectDeletion/Header.tsx index 6fad30895d7..67e2c13a8a3 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/Header.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/Header.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Title } from 'design-system'; -import * as React from 'react'; + +import { Title } from '~design-system'; import { isPortfolioLike } from '~sonar-aligned/helpers/component'; import { translate } from '../../helpers/l10n'; import { isApplication } from '../../types/component'; diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/ProjectDeletionApp-it.tsx b/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/ProjectDeletionApp-it.tsx index d57c66693f5..10680f9691e 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/ProjectDeletionApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/ProjectDeletionApp-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { deleteApplication } from '../../../api/application'; diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/routes.tsx b/server/sonar-web/src/main/js/apps/projectDeletion/routes.tsx index d6974af0f41..535788eabe4 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/projectDump/ProjectDumpApp.tsx b/server/sonar-web/src/main/js/apps/projectDump/ProjectDumpApp.tsx index bae2834be5d..dda0b1da9fb 100644 --- a/server/sonar-web/src/main/js/apps/projectDump/ProjectDumpApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectDump/ProjectDumpApp.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, LargeCenteredLayout, PageContentFontWrapper, Title } from 'design-system'; -import * as React from 'react'; + import { Helmet } from 'react-helmet-async'; +import { BasicSeparator, LargeCenteredLayout, PageContentFontWrapper, Title } from '~design-system'; import withAvailableFeatures, { WithAvailableFeaturesProps, } from '../../app/components/available-features/withAvailableFeatures'; diff --git a/server/sonar-web/src/main/js/apps/projectDump/__tests__/ProjectDumpApp-it.tsx b/server/sonar-web/src/main/js/apps/projectDump/__tests__/ProjectDumpApp-it.tsx index f289cbbb866..8c1875ffaab 100644 --- a/server/sonar-web/src/main/js/apps/projectDump/__tests__/ProjectDumpApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectDump/__tests__/ProjectDumpApp-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { act, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/apps/projectDump/components/Export.tsx b/server/sonar-web/src/main/js/apps/projectDump/components/Export.tsx index 2431737c7e2..9876c968640 100644 --- a/server/sonar-web/src/main/js/apps/projectDump/components/Export.tsx +++ b/server/sonar-web/src/main/js/apps/projectDump/components/Export.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, Spinner } from '@sonarsource/echoes-react'; -import { FlagMessage, Link } from 'design-system'; import { noop } from 'lodash'; -import * as React from 'react'; +import { FlagMessage, Link } from '~design-system'; import DateFromNow from '../../../components/intl/DateFromNow'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectDump/components/Import.tsx b/server/sonar-web/src/main/js/apps/projectDump/components/Import.tsx index 2f9a9d73b34..267602f0c4f 100644 --- a/server/sonar-web/src/main/js/apps/projectDump/components/Import.tsx +++ b/server/sonar-web/src/main/js/apps/projectDump/components/Import.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, Spinner } from '@sonarsource/echoes-react'; -import { FlagMessage, Link } from 'design-system'; import { noop } from 'lodash'; import * as React from 'react'; +import { FlagMessage, Link } from '~design-system'; import DateFromNow from '../../../components/intl/DateFromNow'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectDump/routes.tsx b/server/sonar-web/src/main/js/apps/projectDump/routes.tsx index b757c6c7f93..b0f806cafd8 100644 --- a/server/sonar-web/src/main/js/apps/projectDump/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projectDump/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/ProjectInformationApp.tsx b/server/sonar-web/src/main/js/apps/projectInformation/ProjectInformationApp.tsx index 764111dae0e..bcc3d3d4268 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/ProjectInformationApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/ProjectInformationApp.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Card, LargeCenteredLayout, PageContentFontWrapper, Title } from 'design-system'; -import React, { useEffect, useState } from 'react'; + +import { useEffect, useState } from 'react'; +import { Card, LargeCenteredLayout, PageContentFontWrapper, Title } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { getMeasures } from '../../api/measures'; import withAvailableFeatures, { diff --git a/server/sonar-web/src/main/js/apps/projectInformation/__tests__/ProjectInformationApp-it.tsx b/server/sonar-web/src/main/js/apps/projectInformation/__tests__/ProjectInformationApp-it.tsx index 856e28c9c67..473923080d8 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/__tests__/ProjectInformationApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/__tests__/ProjectInformationApp-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/AboutProject.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/AboutProject.tsx index 1bd26ac2efd..cef354b5931 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/AboutProject.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/AboutProject.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { BasicSeparator, SubHeading, SubTitle } from 'design-system'; -import React, { PropsWithChildren, useEffect, useState } from 'react'; +import { PropsWithChildren, useEffect, useState } from 'react'; import { FormattedMessage } from 'react-intl'; +import { BasicSeparator, SubHeading, SubTitle } from '~design-system'; import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; import { getProjectLinks } from '../../../api/projectLinks'; import { useAvailableFeatures } from '../../../app/components/available-features/withAvailableFeatures'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaDescription.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaDescription.tsx index 1aaab5d3555..1f8ee2be88d 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaDescription.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaDescription.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SubHeading, TextMuted } from 'design-system'; -import * as React from 'react'; + +import { SubHeading, TextMuted } from '~design-system'; import { translate } from '../../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaKey.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaKey.tsx index d1af8cf829b..57d72f61f32 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaKey.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaKey.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ClipboardIconButton, CodeSnippet, HelperHintIcon, SubHeading } from 'design-system'; -import * as React from 'react'; + +import { ClipboardIconButton, CodeSnippet, HelperHintIcon, SubHeading } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaLinks.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaLinks.tsx index 1d3189f1b09..41d8dbd8e6d 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaLinks.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaLinks.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SubHeading } from 'design-system'; -import React from 'react'; +import { SubHeading } from '~design-system'; import MetaLink from '../../../../components/common/MetaLink'; import { translate } from '../../../../helpers/l10n'; import { orderLinks } from '../../../../helpers/projectLinks'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityGate.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityGate.tsx index 7325d31cb2e..58c5d34997e 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityGate.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityGate.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link, Note, StyledMutedText, SubHeading } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { Link, Note, StyledMutedText, SubHeading } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { getQualityGateUrl } from '../../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityProfiles.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityProfiles.tsx index 746fab901f2..b7fb2514ee1 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityProfiles.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityProfiles.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, Link, SubHeading } from 'design-system'; + import React, { useContext, useEffect } from 'react'; +import { Badge, Link, SubHeading } from '~design-system'; import { ComponentQualityProfile } from '~sonar-aligned/types/component'; import { searchRules } from '../../../../api/rules'; import { LanguagesContext } from '../../../../app/components/languages/LanguagesContext'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaSize.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaSize.tsx index e4541232019..63913b08057 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaSize.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaSize.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DrilldownLink, Note, SizeIndicator, SubHeading } from 'design-system'; -import * as React from 'react'; + +import { DrilldownLink, Note, SizeIndicator, SubHeading } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaTags.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaTags.tsx index ad7ce87ca7b..15267e94c9f 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaTags.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaTags.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner } from '@sonarsource/echoes-react'; -import { MultiSelector, SubHeading, Tags } from 'design-system'; import { difference, without } from 'lodash'; -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; +import { MultiSelector, SubHeading, Tags } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { searchProjectTags, setApplicationTags, setProjectTags } from '../../../../api/components'; import Tooltip from '../../../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaVisibility.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaVisibility.tsx index a6e5e2646a1..6e1a9e86605 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaVisibility.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaVisibility.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SubHeading } from 'design-system'; -import * as React from 'react'; + +import { SubHeading } from '~design-system'; import { Visibility } from '~sonar-aligned/types/component'; import PrivacyBadgeContainer from '../../../../components/common/PrivacyBadgeContainer'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaKey-test.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaKey-test.tsx index c569908cf17..d21043099e8 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaKey-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaKey-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { renderComponent } from '../../../../../helpers/testReactTestingUtils'; import MetaKey from '../MetaKey'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaQualityProfiles-test.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaQualityProfiles-test.tsx index e46e9b580b6..e9a4852c8e4 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaQualityProfiles-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaQualityProfiles-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { searchRules } from '../../../../../api/rules'; import { LanguagesContext } from '../../../../../app/components/languages/LanguagesContext'; import { mockLanguage, mockPaging, mockQualityProfile } from '../../../../../helpers/testMocks'; @@ -55,7 +55,7 @@ it('should render correctly', async () => { renderMetaQualityprofiles(); expect(await screen.findByText('overview.deleted_profile.javascript')).toBeInTheDocument(); - expect(screen.getByText('overview.deprecated_profile.10')).toBeInTheDocument(); + expect(await screen.findByText('overview.deprecated_profile.10')).toBeInTheDocument(); }); function renderMetaQualityprofiles( diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaTags-test.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaTags-test.tsx index 3766af65652..fed49df2ddb 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaTags-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaTags-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import * as React from 'react'; @@ -98,7 +99,11 @@ it('should set tags for an app', async () => { }); function renderMetaTags(componentOverride: Partial<Component> = {}) { - function Component(componentOverride: Partial<Parameters<typeof MetaTags>[0]>) { + function Component({ + componentOverride, + }: { + componentOverride: Partial<React.ComponentProps<typeof MetaTags>['component']>; + }) { const [component, setComponent] = React.useState( mockComponent({ configuration: { @@ -117,5 +122,5 @@ function renderMetaTags(componentOverride: Partial<Component> = {}) { return <MetaTags component={component} onComponentChange={handleComponentChange} />; } - return renderComponent(<Component {...componentOverride} />); + return renderComponent(<Component componentOverride={componentOverride} />); } diff --git a/server/sonar-web/src/main/js/apps/projectInformation/badges/ProjectBadges.tsx b/server/sonar-web/src/main/js/apps/projectInformation/badges/ProjectBadges.tsx index da0c3962add..247e5e68d7b 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/badges/ProjectBadges.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/badges/ProjectBadges.tsx @@ -19,6 +19,8 @@ */ import { Spinner } from '@sonarsource/echoes-react'; +import { isEmpty } from 'lodash'; +import { useState } from 'react'; import { BasicSeparator, ButtonSecondary, @@ -29,10 +31,7 @@ import { InputSelect, SubTitle, ToggleButton, -} from 'design-system'; -import { isEmpty } from 'lodash'; -import * as React from 'react'; -import { useState } from 'react'; +} from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/badges/__tests__/ProjectBadges-test.tsx b/server/sonar-web/src/main/js/apps/projectInformation/badges/__tests__/ProjectBadges-test.tsx index 2354d1f4950..294ff302f0c 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/badges/__tests__/ProjectBadges-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/badges/__tests__/ProjectBadges-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { getProjectBadgesToken } from '../../../../api/project-badges'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/badges/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/projectInformation/badges/__tests__/utils-test.ts index 06710bbd7e1..2140e21db63 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/badges/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/projectInformation/badges/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Location } from '~sonar-aligned/types/router'; import { MetricKey } from '../../../../sonar-aligned/types/metrics'; import { BadgeOptions, BadgeType, getBadgeSnippet, getBadgeUrl } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/badges/utils.ts b/server/sonar-web/src/main/js/apps/projectInformation/badges/utils.ts index 904c2357c4b..ab009794680 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/badges/utils.ts +++ b/server/sonar-web/src/main/js/apps/projectInformation/badges/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getLocalizedMetricName, translate } from '../../../helpers/l10n'; import { omitNil } from '../../../helpers/request'; import { getHostUrl, getPathUrlAsString, getProjectUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/notifications/ProjectNotifications.tsx b/server/sonar-web/src/main/js/apps/projectInformation/notifications/ProjectNotifications.tsx index 97619cf7b7d..72e0d01af3c 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/notifications/ProjectNotifications.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/notifications/ProjectNotifications.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, SubTitle } from 'design-system'; -import * as React from 'react'; + +import { FlagMessage, SubTitle } from '~design-system'; import NotificationsList from '../../../components/notifications/NotificationsList'; import { translate } from '../../../helpers/l10n'; import { Component } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/RegulatoryReport.tsx b/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/RegulatoryReport.tsx index 70307484945..2aa09fce8ec 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/RegulatoryReport.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/RegulatoryReport.tsx @@ -18,6 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { isEmpty, orderBy } from 'lodash'; +import * as React from 'react'; +import { useState } from 'react'; +import { FormattedMessage } from 'react-intl'; import { BasicSeparator, DownloadButton, @@ -25,11 +29,7 @@ import { FormField, InputSelect, SubTitle, -} from 'design-system'; -import { isEmpty, orderBy } from 'lodash'; -import * as React from 'react'; -import { useState } from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { isMainBranch } from '~sonar-aligned/helpers/branch-like'; import { getBranches } from '../../../api/branches'; import { getRegulatoryReportUrl } from '../../../api/regulatory-report'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/__tests__/RegulatoryReport-it.tsx b/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/__tests__/RegulatoryReport-it.tsx index 6384b2547bc..2a5aab06cf5 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/__tests__/RegulatoryReport-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/__tests__/RegulatoryReport-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock'; import { mockBranch, mockMainBranch } from '../../../../helpers/mocks/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/routes.tsx b/server/sonar-web/src/main/js/apps/projectInformation/routes.tsx index 61f6295b5b1..b610f07c24e 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/projectKey/ProjectKeyApp.tsx b/server/sonar-web/src/main/js/apps/projectKey/ProjectKeyApp.tsx index c9577dffcec..5e941b47821 100644 --- a/server/sonar-web/src/main/js/apps/projectKey/ProjectKeyApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectKey/ProjectKeyApp.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper, Title } from 'design-system'; -import * as React from 'react'; + import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper, Title } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Router } from '~sonar-aligned/types/router'; import { changeKey } from '../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/projectKey/UpdateForm.tsx b/server/sonar-web/src/main/js/apps/projectKey/UpdateForm.tsx index 7d20cbb1b82..a9337558cc5 100644 --- a/server/sonar-web/src/main/js/apps/projectKey/UpdateForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectKey/UpdateForm.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { ButtonPrimary, ButtonSecondary, @@ -24,8 +26,7 @@ import { FormField, InputField, Note, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import ConfirmButton from '../../components/controls/ConfirmButton'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { validateProjectKey } from '../../helpers/projects'; diff --git a/server/sonar-web/src/main/js/apps/projectKey/__tests__/ProjectKeyApp-it.tsx b/server/sonar-web/src/main/js/apps/projectKey/__tests__/ProjectKeyApp-it.tsx index 7e91c2e6d48..a440f949f32 100644 --- a/server/sonar-web/src/main/js/apps/projectKey/__tests__/ProjectKeyApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectKey/__tests__/ProjectKeyApp-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { last } from 'lodash'; -import React from 'react'; import { Route } from 'react-router-dom'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/projectKey/routes.tsx b/server/sonar-web/src/main/js/apps/projectKey/routes.tsx index 592c0751106..997b3811615 100644 --- a/server/sonar-web/src/main/js/apps/projectKey/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projectKey/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/CreationModal.tsx b/server/sonar-web/src/main/js/apps/projectLinks/CreationModal.tsx index f5833dc98ca..6302f3a8053 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/CreationModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/CreationModal.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FormField, InputField, Modal } from 'design-system'; import * as React from 'react'; +import { FormField, InputField, Modal } from '~design-system'; import MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/Header.tsx b/server/sonar-web/src/main/js/apps/projectLinks/Header.tsx index 3cc3a2da89a..6fe02a595ce 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/Header.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/Header.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Title } from 'design-system'; import * as React from 'react'; +import { Title } from '~design-system'; import { translate } from '../../helpers/l10n'; import CreationModal from './CreationModal'; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinkRow.tsx b/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinkRow.tsx index 8f1de5d40c8..35d0a22d1b7 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinkRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinkRow.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, ButtonSize, ButtonVariety, IconDelete } from '@sonarsource/echoes-react'; -import { ActionCell, ContentCell, Link, Note, TableRow } from 'design-system'; import * as React from 'react'; +import { ActionCell, ContentCell, Link, Note, TableRow } from '~design-system'; import isValidUri from '../../app/utils/isValidUri'; import ConfirmButton from '../../components/controls/ConfirmButton'; import { translate, translateWithParameters } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinkTable.tsx b/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinkTable.tsx index 4c3731c448d..629b9e7b421 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinkTable.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinkTable.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ActionCell, ContentCell, Note, Table, TableRow } from 'design-system'; -import * as React from 'react'; + +import { ActionCell, ContentCell, Note, Table, TableRow } from '~design-system'; import { translate } from '../../helpers/l10n'; import { orderLinks } from '../../helpers/projectLinks'; import { ProjectLink } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinksApp.tsx b/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinksApp.tsx index eb6e1fce254..e6bf4c573da 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinksApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/ProjectLinksApp.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper, Spinner } from 'design-system'; + import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper, Spinner } from '~design-system'; import { createLink, deleteLink, getProjectLinks } from '../../api/projectLinks'; import withComponentContext from '../../app/components/componentContext/withComponentContext'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/ProjectLinksApp-it.tsx b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/ProjectLinksApp-it.tsx index 2faf16836ee..b3b3fbf9c80 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/ProjectLinksApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/ProjectLinksApp-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import { last } from 'lodash'; -import React from 'react'; import { Route } from 'react-router-dom'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import ProjectLinksServiceMock from '../../../api/mocks/ProjectLinksServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/routes.tsx b/server/sonar-web/src/main/js/apps/projectLinks/routes.tsx index d7718698ade..c8d742d9d50 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/AppHeader.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/AppHeader.tsx index bd9d0cc49c2..aa2bf3e66a8 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/AppHeader.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/AppHeader.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HeadingDark, Link, Title } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { HeadingDark, Link, Title } from '~design-system'; import { DocLink } from '../../../helpers/doc-links'; import { useDocUrl } from '../../../helpers/docs'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchList.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchList.tsx index c9b86380519..f828baf6632 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchList.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchList.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ActionCell, ContentCell, Spinner, Table, TableRow } from 'design-system'; + import * as React from 'react'; +import { ActionCell, ContentCell, Spinner, Table, TableRow } from '~design-system'; import { isBranch } from '~sonar-aligned/helpers/branch-like'; import { listBranchesNewCodeDefinition, diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchListRow.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchListRow.tsx index 1e6e56b3ab8..d14f7713ba4 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchListRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchListRow.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, ButtonSize, @@ -31,8 +32,7 @@ import { ContentCell, FlagWarningIcon, TableRowInteractive, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import BranchLikeIcon from '../../../components/icon-mappers/BranchLikeIcon'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx index 301ede63c7f..030aba4cd55 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal, PageContentFontWrapper, Spinner } from 'design-system'; import { noop } from 'lodash'; import * as React from 'react'; +import { Modal, PageContentFontWrapper, Spinner } from '~design-system'; import { setNewCodeDefinition } from '../../../api/newCodeDefinition'; import NewCodeDefinitionDaysOption from '../../../components/new-code-definition/NewCodeDefinitionDaysOption'; import NewCodeDefinitionPreviousVersionOption from '../../../components/new-code-definition/NewCodeDefinitionPreviousVersionOption'; diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingAnalysis.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingAnalysis.tsx index 3cadd905aa8..9154a48da8f 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingAnalysis.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingAnalysis.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { subDays } from 'date-fns'; -import { SelectionCard } from 'design-system'; -import * as React from 'react'; import { useEffect, useState } from 'react'; +import { SelectionCard } from '~design-system'; import { getProjectActivity } from '../../../api/projectActivity'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import NewCodeDefinitionAnalysisWarning from '../../../components/new-code-definition/NewCodeDefinitionAnalysisWarning'; diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingReferenceBranch.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingReferenceBranch.tsx index 6c5f3ea5c0b..10d64eb50c1 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingReferenceBranch.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingReferenceBranch.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, FlagErrorIcon, FormField, InputSelect, SelectionCard } from 'design-system'; -import * as React from 'react'; + import { MenuPlacement, OptionProps, components } from 'react-select'; +import { Badge, FlagErrorIcon, FormField, InputSelect, SelectionCard } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import { NewCodeDefinitionLevels } from '../../../components/new-code-definition/utils'; import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionApp.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionApp.tsx index 955daf83711..6e90abfe658 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionApp.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HeadingDark, LargeCenteredLayout, PageContentFontWrapper, Spinner } from 'design-system'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { Helmet } from 'react-helmet-async'; +import { HeadingDark, LargeCenteredLayout, PageContentFontWrapper, Spinner } from '~design-system'; import { isBranch } from '~sonar-aligned/helpers/branch-like'; import withAppStateContext from '../../../app/components/app-state/withAppStateContext'; import withAvailableFeatures, { diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx index 6e6d6252f41..4c48c66643f 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx @@ -19,9 +19,9 @@ */ import { Button, ButtonGroup, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, RadioButton } from 'design-system'; import { noop } from 'lodash'; import * as React from 'react'; +import { FlagMessage, RadioButton } from '~design-system'; import GlobalNewCodeDefinitionDescription from '../../../components/new-code-definition/GlobalNewCodeDefinitionDescription'; import NewCodeDefinitionDaysOption from '../../../components/new-code-definition/NewCodeDefinitionDaysOption'; import NewCodeDefinitionPreviousVersionOption from '../../../components/new-code-definition/NewCodeDefinitionPreviousVersionOption'; diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/ProjectNewCodeDefinitionApp-it.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/ProjectNewCodeDefinitionApp-it.tsx index 9ef1cf8280b..8758e89fc38 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/ProjectNewCodeDefinitionApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/ProjectNewCodeDefinitionApp-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import { last } from 'lodash'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; @@ -162,7 +163,7 @@ it('cannot set specific analysis setting', async () => { await ui.appIsLoaded(); expect(await ui.specificAnalysisRadio.find()).toBeChecked(); - expect(ui.baselineSpecificAnalysisDate.get()).toBeInTheDocument(); + expect(await ui.baselineSpecificAnalysisDate.find()).toBeInTheDocument(); expect(ui.specificAnalysisRadio.get()).toHaveClass('disabled'); expect(ui.specificAnalysisWarning.get()).toBeInTheDocument(); diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/utils-test.ts index 833a5c0c99d..7828619188a 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { NewCodeDefinitionType } from '../../../../types/new-code-definition'; import { getSettingValue, validateSetting } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/routes.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/routes.tsx index 75666bd89fc..86bb711d9ea 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/utils.ts b/server/sonar-web/src/main/js/apps/projectNewCode/utils.ts index 7183c60b743..87c1a45ae57 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/utils.ts +++ b/server/sonar-web/src/main/js/apps/projectNewCode/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isNewCodeDefinitionCompliant } from '../../helpers/new-code-definition'; import { NewCodeDefinitionType } from '../../types/new-code-definition'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateApp.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateApp.tsx index 44939892596..73440e8f568 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateApp.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { addGlobalSuccessMessage } from 'design-system'; + import * as React from 'react'; +import { addGlobalSuccessMessage } from '~design-system'; import { associateGateWithProject, dissociateGateWithProject, diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx index 8378b1c68bc..0c7f724fa00 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx @@ -19,6 +19,9 @@ */ import { LinkStandalone } from '@sonarsource/echoes-react'; +import { Helmet } from 'react-helmet-async'; +import { FormattedMessage } from 'react-intl'; +import { OptionProps, components } from 'react-select'; import { ButtonPrimary, FlagMessage, @@ -32,11 +35,7 @@ import { RadioButton, Spinner, Title, -} from 'design-system'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; -import { FormattedMessage } from 'react-intl'; -import { OptionProps, components } from 'react-select'; +} from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import withAvailableFeatures, { diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateApp-it.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateApp-it.tsx index 78187a855fa..17c466cdfc8 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateApp-it.tsx @@ -20,7 +20,7 @@ import { waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { addGlobalErrorMessage, addGlobalSuccessMessage } from 'design-system'; +import { addGlobalErrorMessage, addGlobalSuccessMessage } from '~design-system'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { QualityGatesServiceMock } from '../../../api/mocks/QualityGatesServiceMock'; import handleRequiredAuthorization from '../../../app/utils/handleRequiredAuthorization'; @@ -37,8 +37,8 @@ jest.mock('../../../api/quality-gates'); jest.mock('../../../app/utils/handleRequiredAuthorization'); -jest.mock('design-system', () => ({ - ...jest.requireActual('design-system'), +jest.mock('~design-system', () => ({ + ...jest.requireActual('~design-system'), addGlobalErrorMessage: jest.fn(), addGlobalSuccessMessage: jest.fn(), })); diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/constants.ts b/server/sonar-web/src/main/js/apps/projectQualityGate/constants.ts index efbcd31653e..6dc8126e105 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/constants.ts +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/constants.ts @@ -17,4 +17,5 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export const USE_SYSTEM_DEFAULT = '-1'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/routes.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/routes.tsx index dbe8257b94f..6938c8d2079 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesApp.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesApp.tsx index dadf5748382..d90383b66be 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesApp.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { addGlobalSuccessMessage } from 'design-system'; + import { differenceBy } from 'lodash'; import * as React from 'react'; +import { addGlobalSuccessMessage } from '~design-system'; import { associateProject, dissociateProject, diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx index 6cf48a25acf..519f401d197 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { groupBy, orderBy } from 'lodash'; +import { Helmet } from 'react-helmet-async'; import { ActionCell, ButtonPrimary, @@ -33,10 +35,7 @@ import { TableRow, TableRowInteractive, Title, -} from 'design-system'; -import { groupBy, orderBy } from 'lodash'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; +} from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { Profile } from '../../api/quality-profiles'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/projectQualityProfilesApp-it.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/projectQualityProfilesApp-it.tsx index efa80ebbb38..66706180c8f 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/projectQualityProfilesApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/projectQualityProfilesApp-it.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import { addGlobalSuccessMessage } from 'design-system'; +import { addGlobalSuccessMessage } from '~design-system'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { ProfileProject, @@ -98,8 +99,8 @@ jest.mock('../../../api/quality-profiles', () => { }; }); -jest.mock('design-system', () => ({ - ...jest.requireActual('design-system'), +jest.mock('~design-system', () => ({ + ...jest.requireActual('~design-system'), addGlobalSuccessMessage: jest.fn(), })); diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/AddLanguageModal.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/AddLanguageModal.tsx index 0368ecfadfe..6bb6117fff4 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/AddLanguageModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/AddLanguageModal.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FormField, InputSelect, Modal } from 'design-system'; import { difference } from 'lodash'; import * as React from 'react'; +import { FormField, InputSelect, Modal } from '~design-system'; import { Profile } from '../../../api/quality-profiles'; import withLanguagesContext from '../../../app/components/languages/withLanguagesContext'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/LanguageProfileSelectOption.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/LanguageProfileSelectOption.tsx index 786bc5d2ee0..e04a51df8c0 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/LanguageProfileSelectOption.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/LanguageProfileSelectOption.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; + import * as React from 'react'; import { components, OptionProps } from 'react-select'; +import { Link } from '~design-system'; import DisableableSelectOption from '../../../components/common/DisableableSelectOption'; import { translate } from '../../../helpers/l10n'; import { LabelValueSelectOption } from '../../../helpers/search'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/SetQualityProfileModal.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/SetQualityProfileModal.tsx index 21acc276587..8cb39b28dad 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/SetQualityProfileModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/SetQualityProfileModal.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { ButtonPrimary, FlagMessage, @@ -24,8 +26,7 @@ import { LightLabel, Modal, RadioButton, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { Profile } from '../../../api/quality-profiles'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Component } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/constants.ts b/server/sonar-web/src/main/js/apps/projectQualityProfiles/constants.ts index efbcd31653e..6dc8126e105 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/constants.ts +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/constants.ts @@ -17,4 +17,5 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export const USE_SYSTEM_DEFAULT = '-1'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/routes.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/routes.tsx index 8acac8ae60b..73a28d98d63 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/types.ts b/server/sonar-web/src/main/js/apps/projectQualityProfiles/types.ts index 8ac065af38a..b0cf2bdf153 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/types.ts +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/types.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Profile } from '../../api/quality-profiles'; export interface ProjectProfile { diff --git a/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts index ce5aedb63bd..8e2f3486dd7 100644 --- a/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { searchProjects } from '../../../api/components'; import { ONE_SECOND } from '../../../helpers/constants'; import { mockComponent } from '../../../helpers/mocks/component'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx index d08bc398621..0dbbf52e078 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx @@ -20,17 +20,17 @@ import styled from '@emotion/styled'; import { Heading, Spinner } from '@sonarsource/echoes-react'; +import { keyBy, mapValues, omitBy, pick } from 'lodash'; +import * as React from 'react'; +import { Helmet } from 'react-helmet-async'; +import { useSearchParams } from 'react-router-dom'; import { LAYOUT_FOOTER_HEIGHT, LargeCenteredLayout, PageContentFontWrapper, themeBorder, themeColor, -} from 'design-system'; -import { keyBy, mapValues, omitBy, pick } from 'lodash'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; -import { useSearchParams } from 'react-router-dom'; +} from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ApplicationCreation.tsx b/server/sonar-web/src/main/js/apps/projects/components/ApplicationCreation.tsx index 5990e6544f2..4ad603a647e 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ApplicationCreation.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ApplicationCreation.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ButtonSecondary } from 'design-system'; + import * as React from 'react'; +import { ButtonSecondary } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx b/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx index 5fb41e705e1..adaaa086853 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { useNavigate } from 'react-router-dom'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/EmptyFavoriteSearch.tsx b/server/sonar-web/src/main/js/apps/projects/components/EmptyFavoriteSearch.tsx index a6c279a5fc4..e0cb4d660b0 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/EmptyFavoriteSearch.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/EmptyFavoriteSearch.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FishVisual, Highlight, StandoutLink } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { FishVisual, Highlight, StandoutLink } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { translate } from '../../../helpers/l10n'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.tsx b/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.tsx index d7b8bcca91f..4ac18fdaca2 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FishVisual, Highlight } from 'design-system'; -import * as React from 'react'; +import { FishVisual, Highlight } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Router } from '~sonar-aligned/types/router'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilter.tsx b/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilter.tsx index 85b7d5b5e78..1852e8802a8 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilter.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ToggleButton } from 'design-system'; + import * as React from 'react'; +import { ToggleButton } from '~design-system'; import { withRouter, WithRouterProps } from '~sonar-aligned/components/hoc/withRouter'; import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.tsx b/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.tsx index a57d4ab60dc..35d025789cb 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import AllProjects from './AllProjects'; export default function FavoriteProjectsContainer(props: any) { diff --git a/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.tsx b/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.tsx index 77180ed4125..b197fab45c5 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Highlight, StandoutLink } from 'design-system'; -import * as React from 'react'; + +import { Highlight, StandoutLink } from '~design-system'; import { translate } from '../../../helpers/l10n'; export default function NoFavoriteProjects() { diff --git a/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx index 66f6fe5c1a6..bdb52180811 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PageHeader.tsx @@ -19,8 +19,7 @@ */ import { ButtonGroup } from '@sonarsource/echoes-react'; -import { InputSearch, LightLabel, LightPrimary } from 'design-system'; -import * as React from 'react'; +import { InputSearch, LightLabel, LightPrimary } from '~design-system'; import { RawQuery } from '~sonar-aligned/types/router'; import HomePageSelect from '../../../components/controls/HomePageSelect'; import Tooltip from '../../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx b/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx index 37632472565..a379f06522f 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { BasicSeparator, StyledPageTitle } from 'design-system'; import { flatMap } from 'lodash'; import * as React from 'react'; +import { BasicSeparator, StyledPageTitle } from '~design-system'; import { RawQuery } from '~sonar-aligned/types/router'; import { translate } from '../../../helpers/l10n'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx index 13e491fe113..3a66e62d788 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx @@ -19,8 +19,8 @@ */ import { InputSize, Select } from '@sonarsource/echoes-react'; -import { StyledPageTitle } from 'design-system'; import * as React from 'react'; +import { StyledPageTitle } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { VIEWS } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenu.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenu.tsx index 3c08f66745f..d864380d37b 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenu.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenu.tsx @@ -19,6 +19,7 @@ */ import { IconChevronDown } from '@sonarsource/echoes-react'; +import * as React from 'react'; import { ButtonSecondary, Dropdown, @@ -26,8 +27,7 @@ import { ItemLink, PopupPlacement, PopupZLevel, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { getAlmSettings } from '../../../api/alm-settings'; import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; import { IMPORT_COMPATIBLE_ALMS } from '../../../helpers/constants'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenuItem.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenuItem.tsx index cc6bda0c5e9..59bc429e964 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenuItem.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenuItem.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ItemLink } from 'design-system'; -import * as React from 'react'; +import { ItemLink } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx index 4b255c17b3c..b940df906c4 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx @@ -20,7 +20,6 @@ import { Spinner } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import * as React from 'react'; import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; import { List, ListRowProps } from 'react-virtualized/dist/commonjs/List'; import EmptySearch from '../../../components/common/EmptySearch'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx index bf18d43871b..18159405996 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx @@ -20,9 +20,9 @@ import { InputSize, Select, SelectOption, Tooltip } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { InteractiveIcon, SortAscendIcon, SortDescendIcon, StyledPageTitle } from 'design-system'; import { sortBy } from 'lodash'; import * as React from 'react'; +import { InteractiveIcon, SortAscendIcon, SortDescendIcon, StyledPageTitle } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { SORTING_LEAK_METRICS, SORTING_METRICS, parseSorting } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx index 11270e4abc3..b677013b682 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { AutoSizerProps } from 'react-virtualized'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { ComponentQualifier } from '~sonar-aligned/types/component'; @@ -86,7 +86,7 @@ it('changes sort and perspective', async () => { await user.click(await ui.sortSelect.find()); await user.click(screen.getByText('projects.sorting.size')); - const projects = ui.projects.getAll(); + const projects = await ui.projects.findAll(); expect(await within(projects[0]).findByRole('link')).toHaveTextContent( 'sonarlint-omnisharp-dotnet', @@ -115,7 +115,7 @@ it('handles showing favorite projects on load', async () => { await user.click(ui.allToggleOption.get()); - expect(ui.projects.getAll()).toHaveLength(20); + expect(await ui.projects.findAll()).toHaveLength(20); }); function renderProjects(navigateTo?: string) { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/CreateApplication-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/CreateApplication-test.tsx index 033c6e6e33d..ff7b799f2c5 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/CreateApplication-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/CreateApplication-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx index 201c00fd968..538342a6f94 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; -import * as React from 'react'; import { MemoryRouter, Route, Routes } from 'react-router-dom'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import { searchProjects } from '../../../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx index 700c48cfcca..184811e2190 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { save } from '../../../../helpers/storage'; import { mockCurrentUser, diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageHeader-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageHeader-test.tsx index 627e9be8c7a..0d17a7233f9 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageHeader-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { getAlmSettings } from '../../../../api/alm-settings'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageSidebar-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageSidebar-test.tsx index 28793462844..f4483b1edb1 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageSidebar-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/PageSidebar-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock'; import { CurrentUserContext } from '../../../../app/components/current-user/CurrentUserContext'; import { mockCurrentUser } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx index 0dab91e1db1..7aeadbb197f 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx @@ -21,6 +21,8 @@ import styled from '@emotion/styled'; import { Link, LinkStandalone } from '@sonarsource/echoes-react'; import classNames from 'classnames'; +import { isEmpty } from 'lodash'; +import { FormattedMessage } from 'react-intl'; import { Badge, Card, @@ -33,10 +35,7 @@ import { Tags, themeBorder, themeColor, -} from 'design-system'; -import { isEmpty } from 'lodash'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import Measure from '~sonar-aligned/components/measure/Measure'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { Status } from '~sonar-aligned/types/common'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardLanguages.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardLanguages.tsx index a1596b0caff..a83a01aeb2b 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardLanguages.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardLanguages.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { sortBy } from 'lodash'; -import * as React from 'react'; import withLanguagesContext from '../../../../app/components/languages/withLanguagesContext'; import Tooltip from '../../../../components/controls/Tooltip'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasure.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasure.tsx index 9a58494823a..27b543b022e 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasure.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasure.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx index 179b9b1bb6f..07822ead3ff 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx @@ -17,13 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { CoverageIndicator, DuplicationsIndicator, Note, PageContentFontWrapper, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import Measure from '~sonar-aligned/components/measure/Measure'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCard-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCard-test.tsx index b6bd24cf673..0927cc2a567 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCard-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCard-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { MeasuresServiceMock } from '../../../../../api/mocks/MeasuresServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardLanguages-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardLanguages-test.tsx index 473f2789a05..c5e18edc2a5 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardLanguages-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardLanguages-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { renderComponent } from '../../../../../helpers/testReactTestingUtils'; import { ProjectCardLanguages } from '../ProjectCardLanguages'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasure-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasure-test.tsx index f808cc28d0d..4f9654ce4c4 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasure-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasure-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { renderComponent } from '../../../../../helpers/testReactTestingUtils'; import ProjectCardMeasure, { ProjectCardMeasureProps } from '../ProjectCardMeasure'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasures-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasures-test.tsx index ac3263e479d..bbaaa1391f8 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasures-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasures-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx index ff6a45eb73f..a1f695e5c60 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CoverageIndicator } from 'design-system'; -import * as React from 'react'; + +import { CoverageIndicator } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { RawQuery } from '~sonar-aligned/types/router'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.tsx index cada4bc8483..12fd75861d1 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DuplicationsIndicator } from 'design-system'; -import * as React from 'react'; + +import { DuplicationsIndicator } from '~design-system'; import { RawQuery } from '~sonar-aligned/types/router'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { duplicationValueToRating, getDuplicationsRatingLabel } from '../../../helpers/ratings'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.tsx index 95be64a967f..229ec9cfe1f 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { uniqBy } from 'lodash'; import * as React from 'react'; import { RawQuery } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewCoverageFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewCoverageFilter.tsx index e46860a1b62..91f821c5ff8 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewCoverageFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewCoverageFilter.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { MetricKey } from '~sonar-aligned/types/metrics'; import CoverageFilter, { Props } from './CoverageFilter'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewDuplicationsFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewDuplicationsFilter.tsx index 7eb9bd2e537..fbc4c3d10a3 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewDuplicationsFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewDuplicationsFilter.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import DuplicationsFilter, { Props } from './DuplicationsFilter'; export default function NewDuplicationsFilter(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx index a3f3ae1366e..38aa88c1a03 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { MetricKey } from '~sonar-aligned/types/metrics'; import { RawQuery } from '~sonar-aligned/types/router'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/QualifierFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/QualifierFilter.tsx index 85bf80a8c35..82438b389b5 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/QualifierFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/QualifierFilter.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FacetBox, FacetItem } from 'design-system'; + import * as React from 'react'; +import { FacetBox, FacetItem } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { RawQuery } from '~sonar-aligned/types/router'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.tsx index 548b70907ec..039aae2f04a 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FacetBox, FacetItem, HelperHintIcon, QualityGateIndicator } from 'design-system'; + import { without } from 'lodash'; import * as React from 'react'; +import { FacetBox, FacetItem, HelperHintIcon, QualityGateIndicator } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { Status } from '~sonar-aligned/types/common'; import { RawQuery } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/RangeFacetBase.tsx b/server/sonar-web/src/main/js/apps/projects/filters/RangeFacetBase.tsx index 63ebbd13062..8c54bdd2de3 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/RangeFacetBase.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/RangeFacetBase.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { FacetBox, FacetItem, HighlightedFacetItems, LightLabel } from 'design-system'; import * as React from 'react'; +import { FacetBox, FacetItem, HighlightedFacetItems, LightLabel } from '~design-system'; import { RawQuery } from '~sonar-aligned/types/router'; import { translate } from '../../../helpers/l10n'; import { isDefined } from '../../../helpers/types'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/RatingFacet.tsx b/server/sonar-web/src/main/js/apps/projects/filters/RatingFacet.tsx index a756bb4e0c3..625d2d65923 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/RatingFacet.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/RatingFacet.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner } from '@sonarsource/echoes-react'; -import { MetricsRatingBadge, RatingEnum } from 'design-system'; import * as React from 'react'; import { useIntl } from 'react-intl'; +import { MetricsRatingBadge, RatingEnum } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { RawQuery } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/RatingFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/RatingFilter.tsx index 15d2d5aa270..e8dee7d28c3 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/RatingFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/RatingFilter.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { RawQuery } from '~sonar-aligned/types/router'; import { Facets } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.tsx index 33ff77ced18..f69c7e486d6 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/SizeFilter.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SizeIndicator } from 'design-system'; -import * as React from 'react'; + +import { SizeIndicator } from '~design-system'; import { RawQuery } from '~sonar-aligned/types/router'; import { translate } from '../../../helpers/l10n'; import { getSizeRatingAverageValue, getSizeRatingLabel } from '../../../helpers/ratings'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.tsx index 44e54f6a8f2..1ce8fa8aaff 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/TagsFilter.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { size } from 'lodash'; import * as React from 'react'; import { RawQuery } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/CoverageFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/CoverageFilter-test.tsx index 084d553ccc2..7d22d1d6de1 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/CoverageFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/CoverageFilter-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { ComponentPropsType } from '../../../../helpers/testUtils'; import CoverageFilter from '../CoverageFilter'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/LanguagesFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/LanguagesFilter-test.tsx index 83207a7d632..3251e01ed61 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/LanguagesFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/LanguagesFilter-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { ComponentPropsType } from '../../../../helpers/testUtils'; import { LanguagesFilter } from '../LanguagesFilter'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/QualityGateFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/QualityGateFilter-test.tsx index f5c0d14b80f..1a7b3bdd55f 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/QualityGateFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/QualityGateFilter-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { ComponentPropsType } from '../../../../helpers/testUtils'; import { byRole } from '../../../../sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/TagsFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/TagsFilter-test.tsx index 74fdc3678cb..24de05662b3 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/TagsFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/TagsFilter-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { searchProjectTags } from '../../../../api/components'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import TagsFacet from '../TagsFilter'; diff --git a/server/sonar-web/src/main/js/apps/projects/query.ts b/server/sonar-web/src/main/js/apps/projects/query.ts index cef18e8f55b..64e36dfdfb8 100644 --- a/server/sonar-web/src/main/js/apps/projects/query.ts +++ b/server/sonar-web/src/main/js/apps/projects/query.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { RawQuery } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/projects/routes.tsx b/server/sonar-web/src/main/js/apps/projects/routes.tsx index cf062a6bc9e..43836f7efbf 100644 --- a/server/sonar-web/src/main/js/apps/projects/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projects/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Navigate, Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; import { save } from '../../helpers/storage'; diff --git a/server/sonar-web/src/main/js/apps/projects/types.ts b/server/sonar-web/src/main/js/apps/projects/types.ts index 5287a14da2c..23d3f024f9c 100644 --- a/server/sonar-web/src/main/js/apps/projects/types.ts +++ b/server/sonar-web/src/main/js/apps/projects/types.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; import { Dict } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/projects/utils.ts b/server/sonar-web/src/main/js/apps/projects/utils.ts index b32e4ca015d..8cafffbc8e3 100644 --- a/server/sonar-web/src/main/js/apps/projects/utils.ts +++ b/server/sonar-web/src/main/js/apps/projects/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { invert } from 'lodash'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { Facet, getScannableProjects, searchProjects } from '../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx index c02ff14c8b9..ad5b601c13e 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import * as React from 'react'; import { ButtonPrimary, FlagMessage, @@ -26,8 +27,7 @@ import { LabelValueSelectOption, Modal, Spinner, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { bulkApplyTemplate, getPermissionTemplates } from '../../api/permissions'; import { Project } from '../../api/project-management'; import MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx index 46b70e18ab6..97d97673a95 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety, RadioButtonGroup } from '@sonarsource/echoes-react'; -import { FlagMessage, Modal } from 'design-system'; import React, { useState } from 'react'; +import { FlagMessage, Modal } from '~design-system'; import { Visibility } from '~sonar-aligned/types/component'; import { translate } from '../../helpers/l10n'; import { useGithubProvisioningEnabledQuery } from '../../queries/identity-provider/github'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/DeleteModal.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/DeleteModal.tsx index efffba35cac..7c45b4ac846 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/DeleteModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/DeleteModal.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, Modal } from 'design-system'; import * as React from 'react'; +import { FlagMessage, Modal } from '~design-system'; import { Project, bulkDeleteProjects } from '../../api/project-management'; import { toISO8601WithOffsetString } from '../../helpers/dates'; import { translate, translateWithParameters } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx index 2d712d4042b..da969073440 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { InteractiveIcon, PencilIcon, Title } from 'design-system'; -import * as React from 'react'; import { useState } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; +import { InteractiveIcon, PencilIcon, Title } from '~design-system'; import { Visibility } from '~sonar-aligned/types/component'; import { translate } from '../../helpers/l10n'; import ChangeDefaultVisibilityForm from './ChangeDefaultVisibilityForm'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectManagementApp.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectManagementApp.tsx index cae0045a101..2b2679cd825 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectManagementApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectManagementApp.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper } from 'design-system'; import { debounce, uniq } from 'lodash'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper } from '~design-system'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { Visibility } from '~sonar-aligned/types/component'; import { diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx index 0fdf60c537f..c511b9a4474 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx @@ -19,8 +19,7 @@ */ import { Checkbox, LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react'; -import { ActionCell, Badge, ContentCell, Note, TableRow } from 'design-system'; -import * as React from 'react'; +import { ActionCell, Badge, ContentCell, Note, TableRow } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { Project } from '../../api/project-management'; import PrivacyBadgeContainer from '../../components/common/PrivacyBadgeContainer'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx index 16feb810bb2..303a666e62d 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, ButtonSize, @@ -25,7 +26,7 @@ import { Spinner, } from '@sonarsource/echoes-react'; import { noop } from 'lodash'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { getComponentNavigation } from '../../api/navigation'; import { Project } from '../../api/project-management'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Projects.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Projects.tsx index bc6b4336469..e3292b840da 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Projects.tsx @@ -19,8 +19,7 @@ */ import classNames from 'classnames'; -import { ActionCell, ContentCell, Table, TableRow } from 'design-system'; -import * as React from 'react'; +import { ActionCell, ContentCell, Table, TableRow } from '~design-system'; import { Project } from '../../api/project-management'; import { translate } from '../../helpers/l10n'; import { LoggedInUser } from '../../types/users'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/RestoreAccessModal.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/RestoreAccessModal.tsx index 9bc349a0fd9..d80f90d8baf 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/RestoreAccessModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/RestoreAccessModal.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Modal } from '~design-system'; import { grantPermissionToUser } from '../../api/permissions'; import { Project } from '../../api/project-management'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx index 4ef59d041e0..68b31817c11 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx @@ -18,6 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { sortBy } from 'lodash'; +import * as React from 'react'; +import { OptionProps, SingleValueProps, components } from 'react-select'; import { ButtonSecondary, Checkbox, @@ -27,10 +30,7 @@ import { InputSearch, InputSelect, Spinner, -} from 'design-system'; -import { sortBy } from 'lodash'; -import * as React from 'react'; -import { OptionProps, SingleValueProps, components } from 'react-select'; +} from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { Visibility } from '~sonar-aligned/types/component'; import { Project } from '../../api/project-management'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx index 4c7441c8b9b..32086b4de29 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { byPlaceholderText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; @@ -27,6 +28,7 @@ import GitlabProvisioningServiceMock from '../../../api/mocks/GitlabProvisioning import PermissionsServiceMock from '../../../api/mocks/PermissionsServiceMock'; import ProjectManagementServiceMock from '../../../api/mocks/ProjectsManagementServiceMock'; import SettingsServiceMock from '../../../api/mocks/SettingsServiceMock'; +import { getComponentNavigation } from '../../../api/navigation'; import { mockGitlabConfiguration } from '../../../helpers/mocks/alm-integrations'; import { mockComponent } from '../../../helpers/mocks/component'; import { mockGitHubConfiguration } from '../../../helpers/mocks/dop-translation'; @@ -50,8 +52,10 @@ const githubHandler = new GithubProvisioningServiceMock(dopTranslationHandler); const gitlabHandler = new GitlabProvisioningServiceMock(); const handler = new ProjectManagementServiceMock(settingsHandler); -jest.mock('../../../api/navigation', () => ({ - getComponentNavigation: jest.fn().mockImplementation(async ({ component }) => { +jest.mock('../../../api/navigation', () => ({ getComponentNavigation: jest.fn() })); + +beforeAll(() => { + jest.mocked(getComponentNavigation).mockImplementation(async ({ component }) => { const canBrowseProjectResponse = await permissionsHandler.handleGetPermissionUsersForComponent({ projectKey: component, q: login, @@ -71,8 +75,8 @@ jest.mock('../../../api/navigation', () => ({ }, }), ); - }), -})); + }); +}); const ui = { pageDescription: byText('projects_management.page.description'), @@ -200,9 +204,17 @@ it('should filter projects', async () => { await waitFor(() => expect(ui.row.getAll()).toHaveLength(4)); await user.click(ui.analysisDateFilter.get()); await user.click(await screen.findByRole('gridcell', { name: '5' })); - expect(ui.row.getAll()).toHaveLength(3); + + await waitFor(() => { + expect(ui.row.getAll()).toHaveLength(3); + }); + await user.click(ui.provisionedFilter.get()); - expect(ui.row.getAll()).toHaveLength(2); + + await waitFor(() => { + expect(ui.row.getAll()).toHaveLength(2); + }); + expect(ui.row.getAll()[1]).toHaveTextContent('Project 4'); await user.click(ui.qualifierFilter.get()); @@ -262,7 +274,11 @@ it('should delete projects, but not Portfolios or Applications', async () => { const user = userEvent.setup(); renderProjectManagementApp(); expect(await ui.deleteProjects.find()).toBeDisabled(); - expect(ui.row.getAll()).toHaveLength(5); + + await waitFor(() => { + expect(ui.row.getAll()).toHaveLength(5); + }); + await user.click(ui.checkbox('Project 1').get()); await user.click(ui.checkbox('Project 2').get()); @@ -285,17 +301,21 @@ describe('Bulk permission templates', () => { renderProjectManagementApp(); expect(await ui.bulkApplyButton.find()).toBeDisabled(); - const projects = ui.row.getAll().slice(1); - expect(projects).toHaveLength(11); + + await waitFor(() => { + const projects = ui.row.getAll().slice(1); + expect(projects).toHaveLength(11); + }); + await user.click(ui.checkAll.get()); expect(ui.bulkApplyButton.get()).toBeEnabled(); await user.click(ui.bulkApplyButton.get()); expect(await ui.bulkApplyDialog.find()).toBeInTheDocument(); expect( - ui.bulkApplyDialog + await ui.bulkApplyDialog .byText('permission_templates.bulk_apply_permission_template.apply_to_selected.11') - .get(), + .find(), ).toBeInTheDocument(); await user.click(ui.bulkApplyDialog.by(ui.apply).get()); @@ -315,9 +335,9 @@ describe('Bulk permission templates', () => { expect(await ui.bulkApplyDialog.find()).toBeInTheDocument(); expect( - ui.bulkApplyDialog + await ui.bulkApplyDialog .byText('permission_templates.bulk_apply_permission_template.apply_to_selected.2') - .get(), + .find(), ).toBeInTheDocument(); await user.click(ui.bulkApplyDialog.by(ui.selectTemplate('required')).get()); @@ -343,15 +363,19 @@ describe('Bulk permission templates', () => { renderProjectManagementApp({}, {}, { featureList: [Feature.GithubProvisioning] }); expect(await ui.bulkApplyButton.find()).toBeDisabled(); - const projects = ui.row.getAll().slice(1); - expect(projects).toHaveLength(11); + + await waitFor(() => { + const projects = ui.row.getAll().slice(1); + expect(projects).toHaveLength(11); + }); + await user.click(ui.checkAll.get()); expect(ui.bulkApplyButton.get()).toBeEnabled(); await user.click(ui.bulkApplyButton.get()); expect(await ui.bulkApplyDialog.find()).toBeInTheDocument(); expect( - within(ui.bulkApplyDialog.get()).getByText( + await within(ui.bulkApplyDialog.get()).findByText( 'permission_templates.bulk_apply_permission_template.apply_to_only_managed_projects.alm.github', ), ).toBeInTheDocument(); @@ -372,15 +396,19 @@ describe('Bulk permission templates', () => { renderProjectManagementApp({}, {}, { featureList: [Feature.GitlabProvisioning] }); expect(await ui.bulkApplyButton.find()).toBeDisabled(); - const projects = ui.row.getAll().slice(1); - expect(projects).toHaveLength(11); + + await waitFor(() => { + const projects = ui.row.getAll().slice(1); + expect(projects).toHaveLength(11); + }); + await user.click(ui.checkAll.get()); expect(ui.bulkApplyButton.get()).toBeEnabled(); await user.click(ui.bulkApplyButton.get()); expect(await ui.bulkApplyDialog.find()).toBeInTheDocument(); expect( - within(ui.bulkApplyDialog.get()).getByText( + await within(ui.bulkApplyDialog.get()).findByText( 'permission_templates.bulk_apply_permission_template.apply_to_only_managed_projects.alm.gitlab', ), ).toBeInTheDocument(); @@ -405,15 +433,19 @@ describe('Bulk permission templates', () => { renderProjectManagementApp({}, {}, { featureList: [Feature.GitlabProvisioning] }); expect(await ui.bulkApplyButton.find()).toBeDisabled(); - const projects = ui.row.getAll().slice(1); - expect(projects).toHaveLength(11); + + await waitFor(() => { + const projects = ui.row.getAll().slice(1); + expect(projects).toHaveLength(11); + }); + await user.click(ui.checkAll.get()); expect(ui.bulkApplyButton.get()).toBeEnabled(); await user.click(ui.bulkApplyButton.get()); expect(await ui.bulkApplyDialog.find()).toBeInTheDocument(); expect( - within(ui.bulkApplyDialog.get()).getByText( + await within(ui.bulkApplyDialog.get()).findByText( /permission_templates.bulk_apply_permission_template.apply_to_selected.5/, ), ).toBeInTheDocument(); @@ -444,15 +476,18 @@ it('should not be applied to managed GitHub projects but to local project', asyn renderProjectManagementApp({}, {}, { featureList: [Feature.GithubProvisioning] }); expect(await ui.bulkApplyButton.find()).toBeDisabled(); - const projects = ui.row.getAll().slice(1); - expect(projects).toHaveLength(11); + + await waitFor(() => { + const projects = ui.row.getAll().slice(1); + expect(projects).toHaveLength(11); + }); await user.click(ui.checkAll.get()); expect(ui.bulkApplyButton.get()).toBeEnabled(); await user.click(ui.bulkApplyButton.get()); expect(await ui.bulkApplyDialog.find()).toBeInTheDocument(); expect( - within(ui.bulkApplyDialog.get()).getByText( + await within(ui.bulkApplyDialog.get()).findByText( /permission_templates.bulk_apply_permission_template.apply_to_selected.5/, ), ).toBeInTheDocument(); @@ -493,8 +528,13 @@ it('should load more and change the filter without caching old pages', async () await waitFor(() => expect(ui.row.getAll()).toHaveLength(51)); await user.click(ui.showMore.get()); + + // WaitFor to wait for the rerender + await waitFor(() => { + expect(ui.row.getAll()).toHaveLength(61); + }); const projectRows = ui.row.getAll(); - expect(projectRows).toHaveLength(61); + expect(projectRows[1]).toHaveTextContent('Project 0'); expect(projectRows[60]).toHaveTextContent('Project 59'); @@ -507,8 +547,12 @@ it('should load more and change the filter without caching old pages', async () expect(portfolioRows[1]).toHaveTextContent('Portfolio 0'); await user.click(ui.showMore.get()); + + // WaitFor to wait for the rerender + await waitFor(() => { + expect(ui.row.getAll()).toHaveLength(61); + }); const allPortfolioRows = ui.row.getAll(); - expect(allPortfolioRows).toHaveLength(61); expect(allPortfolioRows[1]).toHaveTextContent('Portfolio 0'); expect(allPortfolioRows[60]).toHaveTextContent('Portfolio 59'); }); @@ -545,7 +589,7 @@ it('should apply template for single object', async () => { expect(ui.applyTemplateDialog.get()).toBeInTheDocument(); - await user.click(ui.applyTemplateDialog.by(ui.selectTemplate('required')).get()); + await user.click(await ui.applyTemplateDialog.by(ui.selectTemplate('required')).find()); await user.click(byRole('option', { name: 'Permission Template 2' }).get()); await user.click(ui.applyTemplateDialog.by(ui.apply).get()); @@ -609,10 +653,11 @@ it('should not allow to restore access on github project for GH user', async () ); await waitFor(() => expect(ui.row.getAll()).toHaveLength(5)); await user.click(await ui.projectActions('Project 4').find()); + expect(await ui.noActionsAvailable.find()).toBeInTheDocument(); expect(ui.restoreAccess.query()).not.toBeInTheDocument(); await user.click(await ui.projectActions('Project 1').find()); + expect(await ui.restoreAccess.find()).toBeInTheDocument(); expect(ui.noActionsAvailable.query()).not.toBeInTheDocument(); - expect(ui.restoreAccess.get()).toBeInTheDocument(); }); it('should show github warning on changing default visibility to admin', async () => { @@ -641,9 +686,9 @@ it('should not apply permissions for github projects', async () => { expect(ui.noActionsAvailable.query()).not.toBeInTheDocument(); expect(ui.showPermissions.get()).toBeInTheDocument(); await user.click(ui.projectActions('Project 1').get()); + expect(await ui.editPermissions.find()).toBeInTheDocument(); expect(ui.applyPermissionTemplate.get()).toBeInTheDocument(); expect(ui.noActionsAvailable.query()).not.toBeInTheDocument(); - expect(ui.editPermissions.get()).toBeInTheDocument(); expect(ui.showPermissions.query()).not.toBeInTheDocument(); }); diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/routes.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/routes.tsx index 0a3c7a85cea..79dca095906 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/routes.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/quality-gates/__tests__/utils-test.ts index ff393111b1b..50d4905a4d0 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/quality-gates/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey } from '~sonar-aligned/types/metrics'; import { mockCondition, mockMetric } from '../../../helpers/testMocks'; import { Condition } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/AIGeneratedIcon.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/AIGeneratedIcon.tsx index e643adf7e0a..a1dae6141b4 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/AIGeneratedIcon.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/AIGeneratedIcon.tsx @@ -20,7 +20,7 @@ import styled from '@emotion/styled'; import { IconSparkle } from '@sonarsource/echoes-react'; -import { themeColor } from 'design-system'; +import { themeColor } from '~design-system'; const AIGeneratedIcon = styled(IconSparkle)` color: ${themeColor('primary')}; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/AddConditionModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/AddConditionModal.tsx index f97e31fa685..fb5a05cc892 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/AddConditionModal.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/AddConditionModal.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety, Modal, RadioButtonGroup } from '@sonarsource/echoes-react'; -import { FormField } from 'design-system'; import { differenceWith, map } from 'lodash'; import * as React from 'react'; +import { FormField } from '~design-system'; import { useAvailableFeatures } from '../../../app/components/available-features/withAvailableFeatures'; import { useMetrics } from '../../../app/components/metrics/withMetricsContext'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx index 4e38f09a6fb..ad5d7b1510f 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx @@ -20,6 +20,9 @@ import { withTheme } from '@emotion/react'; import styled from '@emotion/styled'; +import { useCallback, useEffect } from 'react'; +import { Helmet } from 'react-helmet-async'; +import { useNavigate, useParams } from 'react-router-dom'; import { Card, LAYOUT_FOOTER_HEIGHT, @@ -29,11 +32,7 @@ import { Spinner, themeBorder, themeColor, -} from 'design-system'; -import * as React from 'react'; -import { useCallback, useEffect } from 'react'; -import { Helmet } from 'react-helmet-async'; -import { useNavigate, useParams } from 'react-router-dom'; +} from '~design-system'; import Suggestions from '../../../components/embed-docs-modal/Suggestions'; import '../../../components/search-navigator.css'; import { DocLink } from '../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx index 0df69ce9ad4..b1ed53ff031 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/BuiltInQualityGateBadge.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge } from 'design-system'; -import * as React from 'react'; + +import { Badge } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CaYCConditionsSimplificationGuide.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CaYCConditionsSimplificationGuide.tsx index 5ccb7aad5a5..38989cb2da5 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/CaYCConditionsSimplificationGuide.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CaYCConditionsSimplificationGuide.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SpotlightTour, SpotlightTourStep } from 'design-system'; import React from 'react'; +import { SpotlightTour, SpotlightTourStep } from '~design-system'; import { dismissNotice } from '../../../api/users'; import { CurrentUserContext } from '../../../app/components/current-user/CurrentUserContext'; import DocumentationLink from '../../../components/common/DocumentationLink'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CaycCompliantBanner.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CaycCompliantBanner.tsx index 9e81a10c4b7..7e884af4d50 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/CaycCompliantBanner.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CaycCompliantBanner.tsx @@ -18,14 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { FormattedMessage } from 'react-intl'; import { CardWithPrimaryBackground, CheckIcon, LightLabel, SubHeadingHighlight, -} from 'design-system'; -import React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CaycCondition.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CaycCondition.tsx index 05cef460842..190a1b4a575 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/CaycCondition.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CaycCondition.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { HelperHintIcon, Highlight } from 'design-system'; -import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { HelperHintIcon, Highlight } from '~design-system'; import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CaycFixOptimizeBanner.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CaycFixOptimizeBanner.tsx index ba5ca4d8856..9ef5478de89 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/CaycFixOptimizeBanner.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CaycFixOptimizeBanner.tsx @@ -19,9 +19,9 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { CardWithPrimaryBackground, SubHeadingHighlight } from 'design-system'; import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { CardWithPrimaryBackground, SubHeadingHighlight } from '~design-system'; import DocumentationLink from '../../../components/common/DocumentationLink'; import ModalButton from '../../../components/controls/ModalButton'; import { DocLink } from '../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx index 0ef31a504e3..0716b3bbde6 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonIcon, @@ -25,8 +26,7 @@ import { IconDelete, ModalAlert, } from '@sonarsource/echoes-react'; -import { ActionCell, ContentCell, NumericalCell, TableRow, TextError } from 'design-system'; -import * as React from 'react'; +import { ActionCell, ContentCell, NumericalCell, TableRow, TextError } from '~design-system'; import { useMetrics } from '../../../app/components/metrics/withMetricsContext'; import { getLocalizedMetricName, translate, translateWithParameters } from '../../../helpers/l10n'; import { getOperatorLabel } from '../../../helpers/qualityGates'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionOperator.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionOperator.tsx index 4382b85ea3a..e497de4ad1c 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionOperator.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionOperator.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputSelect, Note } from 'design-system'; + import * as React from 'react'; +import { InputSelect, Note } from '~design-system'; import { getOperatorLabel } from '../../../helpers/qualityGates'; import { Metric } from '../../../types/types'; import { getPossibleOperators } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx index 8a3320b73c5..fa13f27010f 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx @@ -19,10 +19,10 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Link, Modal, SubHeading, Title } from 'design-system'; import { sortBy } from 'lodash'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Link, Modal, SubHeading, Title } from '~design-system'; import { DocLink } from '../../../helpers/doc-links'; import { useDocUrl } from '../../../helpers/docs'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValue.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValue.tsx index 181516dce08..857856a12b8 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValue.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValue.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; -import { themeColor } from 'design-system'; -import * as React from 'react'; +import { themeColor } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { Condition, Metric } from '../../../types/types'; import { getCorrectCaycCondition } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValueDescription.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValueDescription.tsx index e713be7ed20..02b7081a2ea 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValueDescription.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValueDescription.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx index c2fd8cf8712..c815e3a8daa 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx @@ -18,6 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { uniqBy } from 'lodash'; +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { ButtonSecondary, FlagMessage, @@ -30,10 +33,7 @@ import { Note, Spinner, SubHeading, -} from 'design-system'; -import { uniqBy } from 'lodash'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip'; import { useAvailableFeatures } from '../../../app/components/available-features/withAvailableFeatures'; import { useMetrics } from '../../../app/components/metrics/withMetricsContext'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsTable.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsTable.tsx index 074bc1e3294..b0d5bb9565e 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsTable.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsTable.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, NumericalCell, Table, TableRow, Title } from 'design-system'; -import * as React from 'react'; + +import { ContentCell, NumericalCell, Table, TableRow, Title } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Condition as ConditionType, Dict, Metric, QualityGate } from '../../../types/types'; import Condition from './Condition'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx index 5f9eb9f44a3..a14910ba376 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CopyQualityGateForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FormField, InputField, Modal } from 'design-system'; import * as React from 'react'; +import { FormField, InputField, Modal } from '~design-system'; import { useRouter } from '~sonar-aligned/components/hoc/withRouter'; import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx index d823757a924..527615b37ce 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CreateQualityGateForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { FormField, InputField, Modal } from 'design-system'; import * as React from 'react'; +import { FormField, InputField, Modal } from '~design-system'; import { useRouter } from '~sonar-aligned/components/hoc/withRouter'; import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx index a4dfe88e761..3c0669680f6 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal } from 'design-system'; -import * as React from 'react'; +import { Modal } from '~design-system'; import { useRouter } from '~sonar-aligned/components/hoc/withRouter'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getQualityGatesUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx index dbc24083432..b305e95315b 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { useQualityGateQuery } from '../../../queries/quality-gates'; import DetailsContent from './DetailsContent'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx index af4c589e3d8..75c716f3dd9 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, HelperHintIcon, SubTitle } from 'design-system'; + import * as React from 'react'; +import { FlagMessage, HelperHintIcon, SubTitle } from '~design-system'; import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip'; import { translate } from '../../../helpers/l10n'; import { QualityGate } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx index b023410d74b..75d63a98363 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, DropdownMenu, IconMoreVertical, Tooltip } from '@sonarsource/echoes-react'; -import { Badge, ButtonSecondary, DangerButtonPrimary, SubTitle } from 'design-system'; import { countBy } from 'lodash'; import * as React from 'react'; +import { Badge, ButtonSecondary, DangerButtonPrimary, SubTitle } from '~design-system'; import LegacyTooltip from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; import { useSetQualityGateAsDefaultMutation } from '../../../queries/quality-gates'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx index 27857edd757..1a758063098 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonIcon, @@ -25,9 +26,9 @@ import { IconEdit, Modal, } from '@sonarsource/echoes-react'; -import { FormField, Highlight, Note } from 'design-system'; import { isArray } from 'lodash'; import * as React from 'react'; +import { FormField, Highlight, Note } from '~design-system'; import { getLocalizedMetricName, translate, translateWithParameters } from '../../../helpers/l10n'; import { useUpdateConditionMutation } from '../../../queries/quality-gates'; import { Condition, Metric, QualityGate } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx index 6ce82c9c880..715a5375c2b 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Tooltip } from '@sonarsource/echoes-react'; -import { Badge, BareButton, SubnavigationGroup, SubnavigationItem } from 'design-system'; -import * as React from 'react'; import { useNavigate } from 'react-router-dom'; +import { Badge, BareButton, SubnavigationGroup, SubnavigationItem } from '~design-system'; import { useAvailableFeatures } from '../../../app/components/available-features/withAvailableFeatures'; import { translate } from '../../../helpers/l10n'; import { getQualityGateUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx index 91b08676d36..c13f91b0cd8 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.tsx @@ -19,8 +19,8 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { HelperHintIcon, Title } from 'design-system'; import * as React from 'react'; +import { HelperHintIcon, Title } from '~design-system'; import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip'; import ModalButton, { ModalProps } from '../../../components/controls/ModalButton'; import { DocLink } from '../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx index b7b876f50fb..bc9fa482b67 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Select } from '@sonarsource/echoes-react'; import { groupBy, sortBy } from 'lodash'; import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/PermissionItem.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/PermissionItem.tsx index 050f12fa617..092ed0e1f83 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/PermissionItem.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/PermissionItem.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { useIntl } from 'react-intl'; import { ContentCell, DestructiveIcon, @@ -24,9 +26,7 @@ import { Note, TrashIcon, UserGroupIcon, -} from 'design-system'; -import * as React from 'react'; -import { useIntl } from 'react-intl'; +} from '~design-system'; import Avatar from '../../../components/ui/Avatar'; import { Group, isUser } from '../../../types/quality-gates'; import { UserBase } from '../../../types/users'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx index 095ddb2f006..028b5e4aa48 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Note } from 'design-system'; + import { find, without } from 'lodash'; import * as React from 'react'; +import { Note } from '~design-system'; import { associateGateWithProject, dissociateGateWithProject, diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QGRecommendedIcon.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/QGRecommendedIcon.tsx index 4eea2d42b2f..4d7153e0865 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QGRecommendedIcon.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QGRecommendedIcon.tsx @@ -20,7 +20,7 @@ import styled from '@emotion/styled'; import { IconRecommended } from '@sonarsource/echoes-react'; -import { themeColor } from 'design-system'; +import { themeColor } from '~design-system'; const QGRecommendedIcon = styled(IconRecommended)` color: ${themeColor('primary')}; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissions.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissions.tsx index 668238bf60d..4afbc05f299 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissions.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { sortBy } from 'lodash'; import * as React from 'react'; import { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx index c68d7ce6cfe..5bf1e7d965a 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety, IconPeople, SelectAsync } from '@sonarsource/echoes-react'; -import { GenericAvatar, Modal, Note } from 'design-system'; import * as React from 'react'; +import { GenericAvatar, Modal, Note } from '~design-system'; import Avatar from '../../../components/ui/Avatar'; import { translate } from '../../../helpers/l10n'; import { Group as UserGroup, isUser } from '../../../types/quality-gates'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx index 3e8bb3fe389..85624f7bddf 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx @@ -17,7 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; +import { FormattedMessage } from 'react-intl'; import { ButtonSecondary, DangerButtonPrimary, @@ -26,9 +28,7 @@ import { SubTitle, Table, TableRowInteractive, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Group, isUser } from '../../../types/quality-gates'; import { QualityGate } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx index 76c8b5d2547..064061229a2 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/RenameQualityGateForm.tsx @@ -19,8 +19,8 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FormField, InputField, Modal } from 'design-system'; import * as React from 'react'; +import { FormField, InputField, Modal } from '~design-system'; import { useRouter } from '~sonar-aligned/components/hoc/withRouter'; import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.tsx index 9e2a95efbf5..a05052ac162 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputField, InputSelect } from 'design-system'; + import * as React from 'react'; +import { InputField, InputSelect } from '~design-system'; import { LabelValueSelectOption } from '../../../helpers/search'; import { Metric } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx index 443285712e0..e4791e4ca7c 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { byLabelText, byRole, byTestId } from '~sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/routes.tsx b/server/sonar-web/src/main/js/apps/quality-gates/routes.tsx index 4765280f5fb..e260fb2ac82 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/routes.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/utils.ts b/server/sonar-web/src/main/js/apps/quality-gates/utils.ts index c971c53b396..8cfc4f50e87 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/utils.ts +++ b/server/sonar-web/src/main/js/apps/quality-gates/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { sortBy } from 'lodash'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { getLocalizedMetricName } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfileApp-it.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfileApp-it.tsx index f4292e8e7f6..01c7b6779a6 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfileApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfileApp-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; @@ -162,7 +163,7 @@ describe('Admin or user with permission', () => { it('should not be able to grant permission if the profile is built-in', async () => { renderQualityProfile('sonar'); await ui.waitForDataLoaded(); - expect(screen.getByRole('heading', { name: /\bSonar way\b/ })).toBeInTheDocument(); + expect(await screen.findByRole('heading', { name: /\bSonar way\b/ })).toBeInTheDocument(); expect(ui.permissionSection.query()).not.toBeInTheDocument(); }); }); @@ -390,7 +391,7 @@ describe('Admin or user with permission', () => { expect(ui.setAsDefaultButton.get()).toHaveAttribute('aria-disabled', 'true'); }); - it("should be able to delete a Quality Profile and it's children", async () => { + it('should be able to delete a Quality Profile and its children', async () => { const user = userEvent.setup(); renderQualityProfile(); await ui.waitForDataLoaded(); @@ -406,7 +407,7 @@ describe('Admin or user with permission', () => { ).toBeInTheDocument(); await user.click(ui.dialog.byRole('button', { name: 'delete' }).get()); - expect(ui.qualityProfilesHeader.get()).toBeInTheDocument(); + expect(await ui.qualityProfilesHeader.find()).toBeInTheDocument(); // children expect(screen.queryByText('PHP way')).not.toBeInTheDocument(); expect(screen.queryByText('Good old PHP quality profile')).not.toBeInTheDocument(); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfilesApp-it.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfilesApp-it.tsx index 9d0dd72c7a8..a7d0ef1b08b 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfilesApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfilesApp-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/utils-test.ts index efe2be8855b..952eef8430e 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Profile } from '../types'; import { sortProfiles } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx index f8d8c883822..8a303b5e917 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx @@ -17,9 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { LinkStandalone } from '@sonarsource/echoes-react'; import classNames from 'classnames'; import { isSameMinute } from 'date-fns'; +import { sortBy } from 'lodash'; +import { FormattedMessage, useIntl } from 'react-intl'; import { CellComponent, ContentCell, @@ -28,10 +31,7 @@ import { Table, TableRow, TableRowInteractive, -} from 'design-system'; -import { sortBy } from 'lodash'; -import * as React from 'react'; -import { FormattedMessage, useIntl } from 'react-intl'; +} from '~design-system'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import { parseDate } from '../../../helpers/dates'; import { isDefined } from '../../../helpers/types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx index e795ab941e2..09ac776fad1 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, Spinner } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter'; import { parseDate, toISO8601WithOffsetString } from '../../../helpers/dates'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogEmpty.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogEmpty.tsx index b47b6bd6ab8..38de235e901 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogEmpty.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogEmpty.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useIntl } from 'react-intl'; export default function ChangelogEmpty() { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx index a27365e78cb..ceb4d1a48a5 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { DateRangePicker } from 'design-system'; -import * as React from 'react'; import { useIntl } from 'react-intl'; +import { DateRangePicker } from '~design-system'; interface ChangelogSearchProps { dateRange: { from?: Date; to?: Date } | undefined; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.tsx index 1cf60b39fb7..eee35a230ec 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useStandardExperienceMode } from '../../../queries/settings'; import { ProfileChangelogEvent } from '../types'; import CleanCodeAttributeChange from './CleanCodeAttributeChange'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/CleanCodeAttributeChange.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/CleanCodeAttributeChange.tsx index c3c6a9e5fb6..6edee636b08 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/CleanCodeAttributeChange.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/CleanCodeAttributeChange.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useIntl } from 'react-intl'; import { CleanCodeAttribute, CleanCodeAttributeCategory } from '../../../types/clean-code-taxonomy'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ParameterChange.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ParameterChange.tsx index 1998e36ebcf..9e599d4e970 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ParameterChange.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ParameterChange.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { translateWithParameters } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.tsx index 95cd310a8df..e5239a36e3c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import SeverityHelper from '../../../components/shared/SeverityHelper'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SoftwareImpactChange.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SoftwareImpactChange.tsx index ea1a59fae19..39daf06f9ed 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SoftwareImpactChange.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SoftwareImpactChange.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useIntl } from 'react-intl'; import SoftwareImpactSeverityIcon from '../../../components/icon-mappers/SoftwareImpactSeverityIcon'; import { ProfileChangelogEventImpactChange } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-it.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-it.tsx index 8f2c7d2f09a..1a55a3d1fa8 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-it.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.tsx index 17d5027a8fa..3962f23c330 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Spinner } from 'design-system'; -import * as React from 'react'; + +import { Spinner } from '~design-system'; import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter'; import { useProfilesCompareQuery } from '../../../queries/quality-profiles'; import { useGetValueQuery } from '../../../queries/settings'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx index f4098305376..a7b68f9a2e6 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, SearchSelectDropdown } from 'design-system'; + import * as React from 'react'; import { useIntl } from 'react-intl'; import { OptionProps, Options, components } from 'react-select'; +import { Badge, SearchSelectDropdown } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import { Profile } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx index 8bb71661a4d..5c0042c86b2 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { Spinner } from 'design-system'; import * as React from 'react'; import { useIntl } from 'react-intl'; +import { Spinner } from '~design-system'; import { Profile } from '../../../api/quality-profiles'; import { getRuleDetails } from '../../../api/rules'; import Tooltip from '../../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultDeactivation.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultDeactivation.tsx index e650a8ac36c..eb22daf203f 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultDeactivation.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultDeactivation.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DangerButtonSecondary } from 'design-system'; + import { noop } from 'lodash'; import * as React from 'react'; import { useIntl } from 'react-intl'; +import { DangerButtonSecondary } from '~design-system'; import { Profile, deactivateRule } from '../../../api/quality-profiles'; import ConfirmButton from '../../../components/controls/ConfirmButton'; import Tooltip from '../../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx index da85a1fd73c..dd734f1b14f 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { LinkStandalone } from '@sonarsource/echoes-react'; -import { ActionCell, ContentCell, Table, TableRowInteractive } from 'design-system'; import { isEqual } from 'lodash'; -import * as React from 'react'; import { useIntl } from 'react-intl'; +import { ActionCell, ContentCell, Table, TableRowInteractive } from '~design-system'; import { CompareResponse, Profile, RuleCompare } from '../../../api/quality-profiles'; import IssueSeverityIcon from '../../../components/icon-mappers/IssueSeverityIcon'; import { CleanCodeAttributePill } from '../../../components/shared/CleanCodeAttributePill'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultsSummary.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultsSummary.tsx index a72e426d868..9acd0adeb0d 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultsSummary.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultsSummary.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TextError, TextSuccess } from 'design-system'; -import React from 'react'; + import { FormattedMessage, useIntl } from 'react-intl'; +import { TextError, TextSuccess } from '~design-system'; interface Props { additionalCount: number; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx index 941c3fa44e3..16228567fa0 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInQualityProfileBadge.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge } from 'design-system'; -import * as React from 'react'; + +import { Badge } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx index 0bc3426a8a6..ab89b5b5e04 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, Modal } from 'design-system'; -import * as React from 'react'; +import { FlagMessage, Modal } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Profile } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx index f05d289b904..3d7c4745341 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, DropdownMenu, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx index 0aef030ff90..f8c72d29f8d 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { Outlet, useSearchParams } from 'react-router-dom'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileLink.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileLink.tsx index 47a63dc59e4..18f3d615f48 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileLink.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileLink.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { StandoutLink } from 'design-system'; + import * as React from 'react'; +import { StandoutLink } from '~design-system'; import { getProfilePath } from '../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileModalForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileModalForm.tsx index d0b3b274548..474fb31c2ae 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileModalForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileModalForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, FormField, InputField, Modal } from 'design-system'; import * as React from 'react'; +import { FlagMessage, FormField, InputField, Modal } from '~design-system'; import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; import { KeyboardKeys } from '../../../helpers/keycodes'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileNotFound.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileNotFound.tsx index 65f38fc6e79..117ddcb70f9 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileNotFound.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileNotFound.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; -import * as React from 'react'; + import { useIntl } from 'react-intl'; +import { Link } from '~design-system'; import { PROFILE_PATH } from '../constants'; export default function ProfileNotFound() { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/QualityProfilesApp.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/QualityProfilesApp.tsx index dcc2d61c4d9..1d2923588c6 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/QualityProfilesApp.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/QualityProfilesApp.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, Spinner } from 'design-system'; + import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { Outlet } from 'react-router-dom'; +import { LargeCenteredLayout, Spinner } from '~design-system'; import { Actions, getExporters, searchQualityProfiles } from '../../../api/quality-profiles'; import withLanguagesContext from '../../../app/components/languages/withLanguagesContext'; import Suggestions from '../../../components/embed-docs-modal/Suggestions'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx index 1fe08b4a3f9..d6df05e14be 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { TooltipProvider } from '@sonarsource/echoes-react'; import { render, screen } from '@testing-library/react'; -import * as React from 'react'; import { HelmetProvider } from 'react-helmet-async'; import { MemoryRouter, Outlet, Route, Routes } from 'react-router-dom'; import { mockQualityProfile } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/constants.ts b/server/sonar-web/src/main/js/apps/quality-profiles/constants.ts index ec2d3d85064..be44ea80494 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/constants.ts +++ b/server/sonar-web/src/main/js/apps/quality-profiles/constants.ts @@ -17,5 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export const PROFILE_PATH = '/profiles'; export const PROFILE_COMPARE_PATH = `${PROFILE_PATH}/compare`; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.tsx index ccbc2d24746..24eac3ddc61 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.tsx @@ -17,6 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { sortBy } from 'lodash'; +import * as React from 'react'; import { ButtonPrimary, FlagMessage, @@ -24,9 +27,7 @@ import { InputSelect, LabelValueSelectOption, Modal, -} from 'design-system'; -import { sortBy } from 'lodash'; -import * as React from 'react'; +} from '~design-system'; import { changeProfileParent } from '../../../api/quality-profiles'; import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx index d5f7851a994..80094847975 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Modal, Note } from 'design-system'; + import { find, without } from 'lodash'; import * as React from 'react'; +import { Modal, Note } from '~design-system'; import { ProfileProject, associateProject, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx index 7a25678b848..4ab0e9d8cc4 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileDetails.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { FlagMessage, themeColor } from 'design-system'; -import * as React from 'react'; +import { FlagMessage, themeColor } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { withQualityProfilesContext } from '../qualityProfilesContext'; import { Exporter, Profile } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.tsx index eb17451ad5b..635fdddde38 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.tsx @@ -19,8 +19,7 @@ */ import { LinkStandalone } from '@sonarsource/echoes-react'; -import { FlagMessage, SubTitle } from 'design-system'; -import * as React from 'react'; +import { FlagMessage, SubTitle } from '~design-system'; import { getQualityProfileExporterUrl } from '../../../api/quality-profiles'; import { translate } from '../../../helpers/l10n'; import { Exporter, Profile } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx index 849368e199b..9f30e4acf86 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, Breadcrumbs, HoverLink, Link, PageContentFontWrapper } from 'design-system'; -import * as React from 'react'; + import { Helmet } from 'react-helmet-async'; +import { Badge, Breadcrumbs, HoverLink, Link, PageContentFontWrapper } from '~design-system'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import DateFromNow from '../../../components/intl/DateFromNow'; import { AdminPageHeader } from '../../../components/ui/AdminPageHeader'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx index 635efa7538a..83d3d7ff89c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { FlagMessage, Spinner, SubTitle, Table } from 'design-system'; import * as React from 'react'; +import { FlagMessage, Spinner, SubTitle, Table } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { useProfileInheritanceQuery } from '../../../queries/quality-profiles'; import { Profile } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceRow.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceRow.tsx index 26281aa5a69..8c3b618e982 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceRow.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceRow.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { ContentCell, DiscreetLink, TableRow } from 'design-system'; -import * as React from 'react'; +import { ContentCell, DiscreetLink, TableRow } from '~design-system'; import { translateWithParameters } from '../../../helpers/l10n'; import { getRulesUrl } from '../../../helpers/urls'; import { ProfileInheritanceDetails } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissions.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissions.tsx index aa242692384..d24f6e869c5 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissions.tsx @@ -17,6 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { sortBy, uniqBy } from 'lodash'; +import * as React from 'react'; import { ButtonSecondary, CellComponent, @@ -25,9 +28,7 @@ import { SubTitle, Table, TableRow, -} from 'design-system'; -import { sortBy, uniqBy } from 'lodash'; -import * as React from 'react'; +} from '~design-system'; import { SearchUsersGroupsParameters, searchGroups, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx index 4b46d1b2cba..2a94a134792 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FormField, Modal } from 'design-system'; import * as React from 'react'; +import { FormField, Modal } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { useAddGroupMutation, useAddUserMutation } from '../../../queries/quality-profiles'; import { UserSelected } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx index 7ded21ac331..14ee8694425 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsFormSelect.tsx @@ -17,16 +17,17 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { omit } from 'lodash'; +import * as React from 'react'; +import { useIntl } from 'react-intl'; import { Avatar, GenericAvatar, LabelValueSelectOption, SearchSelectDropdown, UserGroupIcon, -} from 'design-system'; -import { omit } from 'lodash'; -import * as React from 'react'; -import { useIntl } from 'react-intl'; +} from '~design-system'; import { SearchUsersGroupsParameters, searchGroups, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx index 48edea8a0e5..afd758f9ed6 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx @@ -17,6 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { DangerButtonPrimary, DestructiveIcon, @@ -24,9 +27,7 @@ import { Modal, TrashIcon, UserGroupIcon, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { removeGroup } from '../../../api/quality-profiles'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Group } from './ProfilePermissions'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx index ebcfe1e2999..efd8330905e 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx @@ -17,6 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { Avatar, DangerButtonPrimary, @@ -24,9 +27,7 @@ import { Modal, Note, TrashIcon, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { removeUser } from '../../../api/quality-profiles'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { UserSelected } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx index 0da921ca31b..678451351f2 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, Link, Spinner } from '@sonarsource/echoes-react'; -import { Badge, ContentCell, SubTitle, Table, TableRow } from 'design-system'; import * as React from 'react'; +import { Badge, ContentCell, SubTitle, Table, TableRow } from '~design-system'; import { getProfileProjects } from '../../../api/quality-profiles'; import ListFooter from '../../../components/controls/ListFooter'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx index 039fc4a7afe..62e3e4785aa 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx @@ -17,8 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Heading, Spinner } from '@sonarsource/echoes-react'; +import { keyBy } from 'lodash'; +import * as React from 'react'; import { ButtonPrimary, ContentCell, @@ -26,9 +29,7 @@ import { Table, TableRow, themeColor, -} from 'design-system'; -import { keyBy } from 'lodash'; -import * as React from 'react'; +} from '~design-system'; import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip'; import { translate } from '../../../helpers/l10n'; import { isDefined } from '../../../helpers/types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesDeprecatedWarning.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesDeprecatedWarning.tsx index 8cc2906e42e..516e5c72525 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesDeprecatedWarning.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesDeprecatedWarning.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, HelperHintIcon, Link } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { FlagMessage, HelperHintIcon, Link } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { translate } from '../../../helpers/l10n'; import { getDeprecatedActiveRulesUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRow.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRow.tsx index 8cd7641e64c..1c2f4a70f00 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRow.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRow.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, Link, Note, NumericalCell, TableRow } from 'design-system'; -import * as React from 'react'; + +import { ContentCell, Link, Note, NumericalCell, TableRow } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx index 6e24853ed66..efd17c06064 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, Link } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Link } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getRulesUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx index 5487a5d10b8..b8e821599c0 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx @@ -17,7 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Select, Spinner } from '@sonarsource/echoes-react'; +import { sortBy } from 'lodash'; +import * as React from 'react'; +import { useRef } from 'react'; +import { useIntl } from 'react-intl'; import { ButtonPrimary, FileInput, @@ -28,11 +33,7 @@ import { Modal, Note, SelectionCard, -} from 'design-system'; -import { sortBy } from 'lodash'; -import * as React from 'react'; -import { useRef } from 'react'; -import { useIntl } from 'react-intl'; +} from '~design-system'; import { Location } from '~sonar-aligned/types/router'; import { changeProfileParent, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/Evolution.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/Evolution.tsx index ca3082e38c8..32ec7d69733 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/Evolution.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/Evolution.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Profile } from '../types'; import EvolutionDeprecated from './EvolutionDeprecated'; import EvolutionRules from './EvolutionRules'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.tsx index 7902e0cc685..d9ea39a75b1 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.tsx @@ -19,10 +19,10 @@ */ import { Heading } from '@sonarsource/echoes-react'; -import { DiscreetLink, FlagMessage, Note } from 'design-system'; import { sortBy } from 'lodash'; import * as React from 'react'; import { useIntl } from 'react-intl'; +import { DiscreetLink, FlagMessage, Note } from '~design-system'; import { isDefined } from '../../../helpers/types'; import { getDeprecatedActiveRulesUrl } from '../../../helpers/urls'; import { Profile } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx index 493df10b0ff..c24814d8c9a 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx @@ -19,10 +19,10 @@ */ import { Heading } from '@sonarsource/echoes-react'; -import { DiscreetLink, Link, Note } from 'design-system'; import { noop, sortBy } from 'lodash'; import * as React from 'react'; import { useIntl } from 'react-intl'; +import { DiscreetLink, Link, Note } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { listRules } from '../../../api/rules'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionStagnant.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionStagnant.tsx index a27fb3fccc2..43310cb9759 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionStagnant.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionStagnant.tsx @@ -19,9 +19,8 @@ */ import { Heading } from '@sonarsource/echoes-react'; -import { DiscreetLink, FlagMessage, Note } from 'design-system'; -import * as React from 'react'; import { useIntl } from 'react-intl'; +import { DiscreetLink, FlagMessage, Note } from '~design-system'; import DateFormatter from '../../../components/intl/DateFormatter'; import { isDefined } from '../../../helpers/types'; import { Profile } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/HomeContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/HomeContainer.tsx index e106f2037a9..41622163e00 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/HomeContainer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/HomeContainer.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useOutletContext, useSearchParams } from 'react-router-dom'; import { QualityProfilesContextProps } from '../qualityProfilesContext'; import Evolution from './Evolution'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/LanguageSelect.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/LanguageSelect.tsx index e962950d18e..b7e84bf3a96 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/LanguageSelect.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/LanguageSelect.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LabelValueSelectOption, SearchSelectDropdown } from 'design-system'; + import * as React from 'react'; import { useIntl } from 'react-intl'; +import { LabelValueSelectOption, SearchSelectDropdown } from '~design-system'; import { useRouter } from '~sonar-aligned/components/hoc/withRouter'; import { PROFILE_PATH } from '../constants'; import { getProfilesForLanguagePath } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx index 0f12c4fae50..5d89c56814c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx @@ -19,9 +19,9 @@ */ import { Button, ButtonGroup, ButtonVariety, Heading, Link } from '@sonarsource/echoes-react'; -import { FlagMessage } from 'design-system'; import * as React from 'react'; import { useIntl } from 'react-intl'; +import { FlagMessage } from '~design-system'; import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Actions } from '../../../api/quality-profiles'; import { DocLink } from '../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx index 9dcbc2c1c7c..69c8598e7aa 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, FlagMessage, HelperHintIcon, Table, TableRow } from 'design-system'; + import { groupBy, pick, sortBy } from 'lodash'; import * as React from 'react'; import { useIntl } from 'react-intl'; +import { ContentCell, FlagMessage, HelperHintIcon, Table, TableRow } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { Language } from '../../../types/languages'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx index e95012d7908..14150bd436a 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ActionCell, Badge, BaseLink, ContentCell, Link, Note, TableRow } from 'design-system'; + import * as React from 'react'; import { useIntl } from 'react-intl'; +import { ActionCell, Badge, BaseLink, ContentCell, Link, Note, TableRow } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import DateFromNow from '../../../components/intl/DateFromNow'; import { getRulesUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx index 18f5c47d627..7c37b852a6a 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FileInput, FlagMessage, FormField, Modal } from 'design-system'; -import * as React from 'react'; import { useRef, useState } from 'react'; import { useIntl } from 'react-intl'; +import { FileInput, FlagMessage, FormField, Modal } from '~design-system'; import { restoreQualityProfile } from '../../../api/quality-profiles'; import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/qualityProfilesContext.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/qualityProfilesContext.tsx index d6d3a5e4e84..758056fc31b 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/qualityProfilesContext.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/qualityProfilesContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React from 'react'; import { useOutletContext } from 'react-router-dom'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/routes.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/routes.tsx index 7909d2d3b96..ebf604a40ec 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/routes.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/types.ts b/server/sonar-web/src/main/js/apps/quality-profiles/types.ts index d6e380ca375..2fbc2391f0e 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/types.ts +++ b/server/sonar-web/src/main/js/apps/quality-profiles/types.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Profile as BaseProfile } from '../../api/quality-profiles'; import { CleanCodeAttribute, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts b/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts index 46ae91e1f65..22c7fcba322 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts +++ b/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { differenceInYears } from 'date-fns'; import { sortBy } from 'lodash'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx index 921187e0374..67f8b187c94 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx @@ -20,6 +20,8 @@ import { withTheme } from '@emotion/react'; import styled from '@emotion/styled'; +import { isEmpty } from 'lodash'; +import { Helmet } from 'react-helmet-async'; import { LAYOUT_FOOTER_HEIGHT, LAYOUT_GLOBAL_NAV_HEIGHT, @@ -29,10 +31,7 @@ import { Spinner, themeBorder, themeColor, -} from 'design-system'; -import { isEmpty } from 'lodash'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; +} from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import { isBranch } from '~sonar-aligned/helpers/branch-like'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsApp-it.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsApp-it.tsx index 8e4e74463e8..79a185ad936 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsApp-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { Route } from 'react-router-dom'; import { byDisplayValue, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector'; import { MetricKey } from '~sonar-aligned/types/metrics'; @@ -371,7 +371,7 @@ describe('navigation', () => { renderSecurityHotspotsApp(); await user.keyboard('{ArrowLeft}'); - expect(ui.codeContent.get()).toBeInTheDocument(); + expect(await ui.codeContent.find()).toBeInTheDocument(); await user.keyboard('{ArrowRight}'); expect(ui.riskContent.get()).toBeInTheDocument(); diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/utils-test.ts index 17d43f94580..9ed537d6099 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/utils-test.ts @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HotspotRatingEnum } from 'design-system'; + +import { HotspotRatingEnum } from '~design-system'; import { mockHotspot, mockRawHotspot } from '../../../helpers/mocks/security-hotspots'; import { mockUser } from '../../../helpers/testMocks'; import { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/Assignee.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/Assignee.tsx index 0b1ea976370..c7fd0dd595d 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/Assignee.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/Assignee.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { noop } from 'lodash'; +import * as React from 'react'; +import { Options, SingleValue } from 'react-select'; import { LabelValueSelectOption, SearchSelectDropdown, addGlobalSuccessMessage, -} from 'design-system'; -import { noop } from 'lodash'; -import * as React from 'react'; -import { Options, SingleValue } from 'react-select'; +} from '~design-system'; import { assignSecurityHotspot } from '../../../api/security-hotspots'; import { getUsers } from '../../../api/users'; import { CurrentUserContext } from '../../../app/components/current-user/CurrentUserContext'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/EmptyHotspotsPage.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/EmptyHotspotsPage.tsx index d59e4f62cc9..217646ed84e 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/EmptyHotspotsPage.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/EmptyHotspotsPage.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Note } from 'design-system'; -import * as React from 'react'; +import { Note } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCategory.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCategory.tsx index f14527b7597..bc5f2554f03 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCategory.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCategory.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { Badge, HotspotRating, HotspotRatingEnum, SubnavigationAccordion } from 'design-system'; -import React, { memo } from 'react'; +import { memo } from 'react'; +import { Badge, HotspotRating, HotspotRatingEnum, SubnavigationAccordion } from '~design-system'; import { RawHotspot } from '../../../types/security-hotspots'; import HotspotListItem from './HotspotListItem'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx index 3c6aa215a12..5bacf756671 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FormField, InputTextArea, Modal } from 'design-system'; import * as React from 'react'; +import { FormField, InputTextArea, Modal } from '~design-system'; import FormattingTips from '../../../components/common/FormattingTips'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotDisabledFilterTooltip.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotDisabledFilterTooltip.tsx index 7171a35f459..ffd7eea771e 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotDisabledFilterTooltip.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotDisabledFilterTooltip.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; -import * as React from 'react'; +import { Link } from '~design-system'; import { DocLink } from '../../../helpers/doc-links'; import { useDocUrl } from '../../../helpers/docs'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx index efa7c66293e..d202890893f 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IconLink } from '@sonarsource/echoes-react'; import { ClipboardIconButton, @@ -25,8 +26,7 @@ import { LightPrimary, Link, StyledPageTitle, -} from 'design-system'; -import React from 'react'; +} from '~design-system'; import { getComponentSecurityHotspotsUrl } from '~sonar-aligned/helpers/urls'; import { translate } from '../../../helpers/l10n'; import { getPathUrlAsString, getRuleUrl } from '../../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeaderRightSection.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeaderRightSection.tsx index 0fb243e5796..cd8cb38fa17 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeaderRightSection.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeaderRightSection.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { HotspotRating, LightLabel } from 'design-system'; import React from 'react'; +import { HotspotRating, LightLabel } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; import { Hotspot, HotspotStatusOption } from '../../../types/security-hotspots'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.tsx index 7935ec3d93a..d69fb65e29a 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { withTheme } from '@emotion/react'; import styled from '@emotion/styled'; -import { HotspotRating, HotspotRatingEnum, SubnavigationHeading, themeColor } from 'design-system'; import { groupBy } from 'lodash'; import * as React from 'react'; +import { HotspotRating, HotspotRatingEnum, SubnavigationHeading, themeColor } from '~design-system'; import ListFooter from '../../../components/controls/ListFooter'; import { translate } from '../../../helpers/l10n'; import { RawHotspot } from '../../../types/security-hotspots'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListItem.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListItem.tsx index 5a5f401526d..41dc8ff8374 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListItem.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListItem.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { BareButton, ExecutionFlowIcon, SubnavigationItem, themeColor } from 'design-system'; -import React, { useCallback } from 'react'; +import { useCallback } from 'react'; import { FormattedMessage } from 'react-intl'; +import { BareButton, ExecutionFlowIcon, SubnavigationItem, themeColor } from '~design-system'; import SingleFileLocationNavigator from '../../../components/locations/SingleFileLocationNavigator'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { RawHotspot } from '../../../types/security-hotspots'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListMeta.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListMeta.tsx index 6fd32b8bc53..c83b6874925 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListMeta.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListMeta.tsx @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from '../../../helpers/l10n'; import { HotspotStatusFilter } from '../../../types/security-hotspots'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotOpenInIdeButton.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotOpenInIdeButton.tsx index 29368488d88..f60977e6b5f 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotOpenInIdeButton.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotOpenInIdeButton.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import * as React from 'react'; import { ButtonSecondary, DropdownMenu, @@ -28,8 +29,7 @@ import { Spinner, addGlobalErrorMessage, addGlobalSuccessMessage, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { openHotspot, probeSonarLintServers } from '../../../helpers/sonarlint'; import { Ide } from '../../../types/sonarlint'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotPrimaryLocationBox.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotPrimaryLocationBox.tsx index 288d4f2899b..b0ed20d9fe4 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotPrimaryLocationBox.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotPrimaryLocationBox.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { IssueMessageHighlighting, LineFinding } from 'design-system'; + import * as React from 'react'; +import { IssueMessageHighlighting, LineFinding } from '~design-system'; import { Hotspot } from '../../../types/security-hotspots'; const SCROLL_DELAY = 100; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistory.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistory.tsx index 75a88ada80d..d40310e66dd 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistory.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistory.tsx @@ -19,6 +19,7 @@ */ import styled from '@emotion/styled'; +import * as React from 'react'; import { DangerButtonPrimary, DestructiveIcon, @@ -31,8 +32,7 @@ import { SanitizeLevel, TrashIcon, themeBorder, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import IssueChangelogDiff from '../../../components/issue/components/IssueChangelogDiff'; import Avatar from '../../../components/ui/Avatar'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx index 184451bc23c..30adaa73463 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistoryAndComments.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { PageTitle } from 'design-system'; import * as React from 'react'; +import { PageTitle } from '~design-system'; import { commentSecurityHotspot, deleteSecurityHotspotComment, diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSidebarHeader.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSidebarHeader.tsx index bcf5b869bcd..46da006d56a 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSidebarHeader.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSidebarHeader.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { CoverageIndicator, DiscreetInteractiveIcon, @@ -29,8 +30,7 @@ import { ItemHeader, PopupZLevel, Spinner, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import Measure from '~sonar-aligned/components/measure/Measure'; import { isBranch } from '~sonar-aligned/helpers/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSimpleList.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSimpleList.tsx index e1745b94966..3f4b40b0085 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSimpleList.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSimpleList.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { withTheme } from '@emotion/react'; import styled from '@emotion/styled'; -import { Badge, QualifierIcon, SubnavigationAccordion, themeColor } from 'design-system'; -import * as React from 'react'; +import { Badge, QualifierIcon, SubnavigationAccordion, themeColor } from '~design-system'; import ListFooter from '../../../components/controls/ListFooter'; import Tooltip from '../../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx index 247f2f0bd60..1ca09229ef0 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { getSources } from '../../../api/components'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainerRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainerRenderer.tsx index bca90e9df1b..f84f277dd73 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainerRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainerRenderer.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { withTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { Spinner } from '@sonarsource/echoes-react'; -import { FlagMessage, themeColor } from 'design-system'; import * as React from 'react'; +import { FlagMessage, themeColor } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import { Hotspot } from '../../../types/security-hotspots'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetHeader.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetHeader.tsx index 84db10765de..c4f7005214f 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetHeader.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetHeader.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { withTheme } from '@emotion/react'; import styled from '@emotion/styled'; -import { ClipboardIconButton, Note, QualifierIcon, themeBorder, themeColor } from 'design-system'; -import React from 'react'; +import { ClipboardIconButton, Note, QualifierIcon, themeBorder, themeColor } from '~design-system'; import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; import { LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotStatusFilter.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotStatusFilter.tsx index 9c9a8b8fdb2..11b8bec7e7a 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotStatusFilter.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotStatusFilter.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { withTheme } from '@emotion/react'; import styled from '@emotion/styled'; -import { DiscreetLink, ToggleButton, themeBorder } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { DiscreetLink, ToggleButton, themeBorder } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { HotspotFilters, HotspotStatusFilter } from '../../../types/security-hotspots'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewer.tsx index e56229dc648..85e6a95853e 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewer.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getRuleDetails } from '../../../api/rules'; import { getSecurityHotspotDetails } from '../../../api/security-hotspots'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerRenderer.tsx index a3ee2d8feff..c7f5a966435 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerRenderer.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; import { fillBranchLike } from '../../../helpers/branch-like'; import { Standards } from '../../../types/security'; @@ -25,7 +25,7 @@ import { Hotspot, HotspotStatusOption } from '../../../types/security-hotspots'; import { Component } from '../../../types/types'; import { HotspotHeader } from './HotspotHeader'; -import { Spinner } from 'design-system'; +import { Spinner } from '~design-system'; import { CurrentUser } from '../../../types/users'; import { RuleDescriptionSection } from '../../coding-rules/rule'; import HotspotReviewHistoryAndComments from './HotspotReviewHistoryAndComments'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerTabs.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerTabs.tsx index 057f225f6e5..1199d17b067 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerTabs.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerTabs.tsx @@ -17,7 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; +import { groupBy, omit } from 'lodash'; +import * as React from 'react'; import { LAYOUT_GLOBAL_NAV_HEIGHT, LAYOUT_PROJECT_NAV_HEIGHT, @@ -26,9 +29,7 @@ import { getTabPanelId, themeColor, themeShadow, -} from 'design-system'; -import { groupBy, omit } from 'lodash'; -import * as React from 'react'; +} from '~design-system'; import { useComponent } from '../../../app/components/componentContext/withComponentContext'; import RuleDescription from '../../../components/rules/RuleDescription'; import { isInput, isShortcut } from '../../../helpers/keyboardEventHelpers'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/StatusUpdateSuccessModal.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/StatusUpdateSuccessModal.tsx index 422a0f918f3..5b2467bd95b 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/StatusUpdateSuccessModal.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/StatusUpdateSuccessModal.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonGroup, ButtonVariety } from '@sonarsource/echoes-react'; -import { Checkbox, Modal, Note } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Checkbox, Modal, Note } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { save } from '../../../helpers/storage'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotDisabledFilterTooltip-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotDisabledFilterTooltip-test.tsx index 9f2061241fa..f04bb2e8661 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotDisabledFilterTooltip-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotDisabledFilterTooltip-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { createEvent, fireEvent, render as rtlRender, screen } from '@testing-library/react'; -import * as React from 'react'; import { HotspotDisabledFilterTooltip } from '../HotspotDisabledFilterTooltip'; it('should render correctly and stop event propagation', () => { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotDisabledFilterTooltip-test.tsx.snap b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotDisabledFilterTooltip-test.tsx.snap index ce907df4286..4f57ff36229 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotDisabledFilterTooltip-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotDisabledFilterTooltip-test.tsx.snap @@ -33,7 +33,7 @@ exports[`should render correctly and stop event propagation 1`] = ` vertical-align: text-bottom!important; } -.e1vbniy50 .emotion-0 { +.e4r8l5e0 .emotion-0 { --color: rgb(189,198,255); --active: rgb(209,215,254); --border: 1px solid rgb(159,169,237); diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/Status.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/Status.tsx index fd4c9563df7..28a8c045dbd 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/Status.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/Status.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HighlightedSection } from 'design-system'; -import * as React from 'react'; + +import { HighlightedSection } from '~design-system'; import { Hotspot, HotspotStatusOption } from '../../../../types/security-hotspots'; import { getStatusOptionFromStatusAndResolution } from '../../utils'; import StatusDescription from './StatusDescription'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusDescription.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusDescription.tsx index 15e3dc4c1f0..1c24ce9ff3a 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusDescription.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusDescription.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { LightLabel, LightPrimary } from 'design-system'; -import * as React from 'react'; +import { LightLabel, LightPrimary } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { HotspotStatusOption } from '../../../../types/security-hotspots'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusReviewButton.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusReviewButton.tsx index ce7f094868d..b3fdaf85c8e 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusReviewButton.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusReviewButton.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; import * as React from 'react'; import withCurrentUserContext from '../../../../app/components/current-user/withCurrentUserContext'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelection.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelection.tsx index 1379cce6366..c0c0f13207b 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelection.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelection.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { setSecurityHotspotStatus } from '../../../../api/security-hotspots'; import { Hotspot, HotspotStatusOption } from '../../../../types/security-hotspots'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx index 02f175802cc..c7a02ad3d0e 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FormField, InputTextArea, Modal, Note, SelectionCard } from 'design-system'; import * as React from 'react'; +import { FormField, InputTextArea, Modal, Note, SelectionCard } from '~design-system'; import FormattingTips from '../../../../components/common/FormattingTips'; import { translate } from '../../../../helpers/l10n'; import { HotspotStatusOption } from '../../../../types/security-hotspots'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/constants.ts b/server/sonar-web/src/main/js/apps/security-hotspots/constants.ts index 80964910f55..9bf452fe0c3 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/constants.ts +++ b/server/sonar-web/src/main/js/apps/security-hotspots/constants.ts @@ -17,4 +17,5 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export const SHOW_STATUS_DIALOG_STORAGE_KEY = 'show_hotspot_success_status_dialog'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/hooks/__tests__/useStickyDetection-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/hooks/__tests__/useStickyDetection-test.tsx index 01b606f3a1b..9ceefbe82d0 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/hooks/__tests__/useStickyDetection-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/hooks/__tests__/useStickyDetection-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { act } from '@testing-library/react'; -import React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { mockIntersectionObserver } from '../../../../helpers/testUtils'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/hooks/useStickyDetection.ts b/server/sonar-web/src/main/js/apps/security-hotspots/hooks/useStickyDetection.ts index 07e218e7db3..398422f33a3 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/hooks/useStickyDetection.ts +++ b/server/sonar-web/src/main/js/apps/security-hotspots/hooks/useStickyDetection.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useEffect, useState } from 'react'; interface Options { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/routes.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/routes.tsx index 7d75b302b05..1b1bd2fd7c2 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/routes.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/utils.ts b/server/sonar-web/src/main/js/apps/security-hotspots/utils.ts index aeb4952dc22..5a7ce2b56e3 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/utils.ts +++ b/server/sonar-web/src/main/js/apps/security-hotspots/utils.ts @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HotspotRatingEnum } from 'design-system'; + import { flatten, groupBy, sortBy } from 'lodash'; +import { HotspotRatingEnum } from '~design-system'; import { renderCASACategory, renderCWECategory, diff --git a/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx b/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx index 1e30ae1f29e..e44730a8428 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx @@ -20,6 +20,7 @@ import styled from '@emotion/styled'; import { Spinner } from '@sonarsource/echoes-react'; +import { Helmet } from 'react-helmet-async'; import { Card, FlagMessage, @@ -29,9 +30,7 @@ import { Title, themeBorder, themeColor, -} from 'design-system'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; +} from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { Location } from '~sonar-aligned/types/router'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx b/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx index 6340b62f60f..bd7e15f1ad6 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { addGlobalErrorMessage } from 'design-system'; import * as React from 'react'; +import { addGlobalErrorMessage } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location } from '~sonar-aligned/types/router'; import { logIn } from '../../../api/auth'; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx index 3fbb7a98667..245ec7d026e 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety, LinkStandalone, Spinner } from '@sonarsource/echoes-react'; -import { FormField, InputField } from 'design-system'; import * as React from 'react'; +import { FormField, InputField } from '~design-system'; import { translate } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/sessions/components/Logout.tsx b/server/sonar-web/src/main/js/apps/sessions/components/Logout.tsx index 0c00fc5f49d..8c3f4a49494 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/Logout.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/Logout.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CenteredLayout, PageContentFontWrapper, addGlobalErrorMessage } from 'design-system'; import * as React from 'react'; +import { CenteredLayout, PageContentFontWrapper, addGlobalErrorMessage } from '~design-system'; import { logOut } from '../../../api/auth'; import RecentHistory from '../../../app/components/RecentHistory'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx b/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx index d398b835d3b..e265d315ba7 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, ThirdPartyButton } from 'design-system'; + import * as React from 'react'; +import { BasicSeparator, ThirdPartyButton } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { translateWithParameters } from '../../../helpers/l10n'; import { getBaseUrl } from '../../../helpers/system'; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.tsx b/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.tsx index d4dd0f9eba2..facb964dc17 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Card, CenteredLayout, Link, PageContentFontWrapper } from 'design-system'; -import * as React from 'react'; + import { Helmet } from 'react-helmet-async'; +import { Card, CenteredLayout, Link, PageContentFontWrapper } from '~design-system'; import { getCookie } from '../../../helpers/cookies'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx index 8a2c2a8d187..6176c880dce 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx @@ -20,8 +20,7 @@ import { waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { addGlobalErrorMessage } from 'design-system'; -import * as React from 'react'; +import { addGlobalErrorMessage } from '~design-system'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { getLoginMessage } from '../../../../api/settings'; import { getIdentityProviders } from '../../../../api/users'; @@ -51,8 +50,8 @@ jest.mock('../../../../api/settings', () => ({ getLoginMessage: jest.fn().mockResolvedValue({ message: '' }), })); -jest.mock('design-system', () => ({ - ...jest.requireActual('design-system'), +jest.mock('~design-system', () => ({ + ...jest.requireActual('~design-system'), addGlobalErrorMessage: jest.fn(), })); diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-it.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-it.tsx index 117879ba867..696d9c73f91 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-it.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-it.tsx @@ -19,8 +19,7 @@ */ import { screen, waitFor } from '@testing-library/react'; -import { addGlobalErrorMessage } from 'design-system'; -import * as React from 'react'; +import { addGlobalErrorMessage } from '~design-system'; import { logOut } from '../../../../api/auth'; import RecentHistory from '../../../../app/components/RecentHistory'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; @@ -30,8 +29,8 @@ jest.mock('../../../../api/auth', () => ({ logOut: jest.fn().mockResolvedValue(true), })); -jest.mock('design-system', () => ({ - ...jest.requireActual('design-system'), +jest.mock('~design-system', () => ({ + ...jest.requireActual('~design-system'), addGlobalErrorMessage: jest.fn(), })); diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-it.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-it.tsx index 97713000d6e..3d729c61286 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-it.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { getCookie } from '../../../../helpers/cookies'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import Unauthorized from '../Unauthorized'; diff --git a/server/sonar-web/src/main/js/apps/sessions/routes.tsx b/server/sonar-web/src/main/js/apps/sessions/routes.tsx index e3e379bac91..4c6a988658b 100644 --- a/server/sonar-web/src/main/js/apps/sessions/routes.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import SimpleSessionsContainer from '../../app/components/SimpleSessionsContainer'; import LoginContainer from './components/LoginContainer'; diff --git a/server/sonar-web/src/main/js/apps/settings/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/settings/__tests__/utils-test.ts index 6ebbeb8acba..530c8a9baa3 100644 --- a/server/sonar-web/src/main/js/apps/settings/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/settings/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { hasMessage } from '../../../helpers/l10n'; import { mockComponent } from '../../../helpers/mocks/component'; import { mockDefinition, mockSettingValue } from '../../../helpers/mocks/settings'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx b/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx index 2fd013f470b..015df89393c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { translate } from '../../../helpers/l10n'; import { ExtendedSettingDefinition } from '../../../types/settings'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx b/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx index f76239120d0..95bd8a9344f 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SubnavigationGroup, SubnavigationItem } from 'design-system'; + import { sortBy } from 'lodash'; import * as React from 'react'; import { useNavigate } from 'react-router-dom'; +import { SubnavigationGroup, SubnavigationItem } from '~design-system'; import withAvailableFeatures, { WithAvailableFeaturesProps, } from '../../../app/components/available-features/withAvailableFeatures'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/AnalysisScope.tsx b/server/sonar-web/src/main/js/apps/settings/components/AnalysisScope.tsx index 1e47c8781f4..49525b34f73 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/AnalysisScope.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/AnalysisScope.tsx @@ -19,8 +19,7 @@ */ import styled from '@emotion/styled'; -import { LightLabel } from 'design-system'; -import * as React from 'react'; +import { LightLabel } from '~design-system'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/CodeFixAdmin.tsx b/server/sonar-web/src/main/js/apps/settings/components/CodeFixAdmin.tsx index 570507d54fb..60f06ccdd44 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/CodeFixAdmin.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/CodeFixAdmin.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Button, @@ -30,15 +31,15 @@ import { } from '@sonarsource/echoes-react'; import { MutationStatus } from '@tanstack/react-query'; import { AxiosError } from 'axios'; +import React, { useEffect } from 'react'; +import { FormattedMessage } from 'react-intl'; import { BasicSeparator, HighlightedSection, themeColor, Title, UnorderedList, -} from 'design-system'; -import React, { useEffect } from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { SuggestionServiceStatusCheckResponse } from '../../../api/fix-suggestions'; import withAvailableFeatures, { WithAvailableFeaturesProps, diff --git a/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx b/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx index 2037998ad75..6c5c46ffb62 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx @@ -19,8 +19,8 @@ */ import { Spinner } from '@sonarsource/echoes-react'; -import { FlagMessage, Note, TextError } from 'design-system'; import * as React from 'react'; +import { FlagMessage, Note, TextError } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { parseError } from '../../../helpers/request'; import { diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx b/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx index 0c81bb8f73f..b0855726ed8 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonGroup, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal, Note } from 'design-system'; import * as React from 'react'; +import { Modal, Note } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { ExtendedSettingDefinition, Setting } from '../../../types/settings'; import { getDefaultValue, getPropertyName, isEmptyValue } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionDescription.tsx b/server/sonar-web/src/main/js/apps/settings/components/DefinitionDescription.tsx index 89604821359..6afc913924e 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionDescription.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionDescription.tsx @@ -19,8 +19,7 @@ */ import { Text, Tooltip } from '@sonarsource/echoes-react'; -import { SafeHTMLInjection, SanitizeLevel, SubHeading } from 'design-system'; -import * as React from 'react'; +import { SafeHTMLInjection, SanitizeLevel, SubHeading } from '~design-system'; import { translateWithParameters } from '../../../helpers/l10n'; import { ExtendedSettingDefinition } from '../../../types/settings'; import { getPropertyDescription, getPropertyName } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.tsx index e9a2060a825..5d79acf8998 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.tsx @@ -19,8 +19,7 @@ */ import styled from '@emotion/styled'; -import { themeBorder } from 'design-system'; -import * as React from 'react'; +import { themeBorder } from '~design-system'; import { SettingDefinitionAndValue } from '../../../types/settings'; import { Component } from '../../../types/types'; import Definition from './Definition'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/Languages.tsx b/server/sonar-web/src/main/js/apps/settings/components/Languages.tsx index ffc76536a5d..bb4ca2eda63 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/Languages.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/Languages.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { InputSize, Select } from '@sonarsource/echoes-react'; -import { SubHeading } from 'design-system'; import * as React from 'react'; +import { SubHeading } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location, Router } from '~sonar-aligned/types/router'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/Mode.tsx b/server/sonar-web/src/main/js/apps/settings/components/Mode.tsx index a5242c88eba..0080d601240 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/Mode.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/Mode.tsx @@ -27,9 +27,9 @@ import { Text, TextSize, } from '@sonarsource/echoes-react'; -import { SelectionCard } from 'design-system'; import * as React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { SelectionCard } from '~design-system'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; import { useSaveSimpleValueMutation, useStandardExperienceMode } from '../../../queries/settings'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/settings/components/PageHeader.tsx index c7934107cc0..581dd6b63e0 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/PageHeader.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Title } from 'design-system'; -import * as React from 'react'; + +import { Title } from '~design-system'; import InstanceMessage from '../../../components/common/InstanceMessage'; import { translate } from '../../../helpers/l10n'; import { ExtendedSettingDefinition } from '../../../types/settings'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/SettingsApp.tsx b/server/sonar-web/src/main/js/apps/settings/components/SettingsApp.tsx index 46a04676ccf..b9417e06e25 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SettingsApp.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/SettingsApp.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getDefinitions } from '../../../api/settings'; import withComponentContext from '../../../app/components/componentContext/withComponentContext'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/SettingsAppRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/SettingsAppRenderer.tsx index 884ce277337..ac2befdba17 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SettingsAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/SettingsAppRenderer.tsx @@ -19,10 +19,10 @@ */ import styled from '@emotion/styled'; -import { LargeCenteredLayout, PageContentFontWrapper, themeBorder } from 'design-system'; import { uniqBy } from 'lodash'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper, themeBorder } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location } from '~sonar-aligned/types/router'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/SettingsSearch.tsx b/server/sonar-web/src/main/js/apps/settings/components/SettingsSearch.tsx index 8ae5057684a..d8b6a78f48a 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SettingsSearch.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/SettingsSearch.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { debounce, keyBy } from 'lodash'; import lunr, { LunrIndex } from 'lunr'; import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx index 0ca4394b761..0b9f66e6f41 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx @@ -17,8 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; +import * as React from 'react'; import { DropdownMenu, InputSearch, @@ -28,8 +30,7 @@ import { Popup, PopupPlacement, themeColor, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { ExtendedSettingDefinition } from '../../../types/settings'; import { Component } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx index 40c4b3a8362..6a9f88834e8 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, Note, SafeHTMLInjection, SanitizeLevel, SubTitle } from 'design-system'; import { groupBy, sortBy } from 'lodash'; import * as React from 'react'; +import { BasicSeparator, Note, SafeHTMLInjection, SanitizeLevel, SubTitle } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location } from '~sonar-aligned/types/router'; import { SettingDefinitionAndValue } from '../../../types/settings'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/AllCategoriesList-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/AllCategoriesList-test.tsx index afba7bd40b1..2f86988cf10 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/AllCategoriesList-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/AllCategoriesList-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { mockComponent } from '../../../../helpers/mocks/component'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { AdditionalCategory } from '../AdditionalCategories'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/AnalysisScope-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/AnalysisScope-test.tsx index 81c54d72b62..dfc9e4c9a83 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/AnalysisScope-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/AnalysisScope-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { uniq } from 'lodash'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import SettingsServiceMock, { DEFAULT_DEFINITIONS_MOCK, diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/CodeFixAdmin-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/CodeFixAdmin-it.tsx index 447c7e9421b..a1f1ca87a23 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/CodeFixAdmin-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/CodeFixAdmin-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { uniq } from 'lodash'; -import * as React from 'react'; import { byRole } from '~sonar-aligned/helpers/testSelector'; import FixIssueServiceMock from '../../../../api/mocks/FixIssueServiceMock'; import SettingsServiceMock, { diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-it.tsx index 6c6c81735ee..50a8becb92c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { last } from 'lodash'; -import React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import SettingsServiceMock, { DEFAULT_DEFINITIONS_MOCK, diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Languages-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Languages-it.tsx index 889dde318b0..976c56de241 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Languages-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Languages-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { last } from 'lodash'; -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import SettingsServiceMock, { DEFAULT_DEFINITIONS_MOCK, diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Mode-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Mode-it.tsx index 6074657a57d..f84120d72c5 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Mode-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Mode-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock'; import { definitions } from '../../../../helpers/mocks/definitions-list'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/NewCodeDefinition-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/NewCodeDefinition-it.tsx index e57acdfe1d8..bfc90fe26ff 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/NewCodeDefinition-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/NewCodeDefinition-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { MessageTypes } from '../../../../api/messages'; import MessagesServiceMock from '../../../../api/mocks/MessagesServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/SettingsApp-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/SettingsApp-it.tsx index 004ff61a176..3496cc44e52 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/SettingsApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/SettingsApp-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { Route } from 'react-router-dom'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx index 7fc9a555001..308a022aea4 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx @@ -19,6 +19,7 @@ */ import { Button, ButtonGroup, ButtonVariety } from '@sonarsource/echoes-react'; +import { FormattedMessage } from 'react-intl'; import { BasicSeparator, ButtonSecondary, @@ -27,9 +28,7 @@ import { FlagSuccessIcon, HelperHintIcon, Spinner, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import DocumentationLink from '../../../../components/common/DocumentationLink'; import Tooltip from '../../../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionForm.tsx index df0104f8119..750aaa3e846 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionForm.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { createAzureConfiguration, diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx index 2a11ebe6f35..f98c0d42053 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { ButtonSecondary, FlagMessage, @@ -25,9 +27,7 @@ import { InputField, InputTextArea, Link, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx index 317878dd22d..e6b39fdb58d 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, Modal, PageContentFontWrapper, Spinner } from 'design-system'; import * as React from 'react'; +import { FlagMessage, Modal, PageContentFontWrapper, Spinner } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { AlmBindingDefinition, diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx index 99cdc5ce918..c1b73663b96 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { noop } from 'lodash'; import * as React from 'react'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx index e0c17e0f337..6dd43685e92 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx @@ -19,9 +19,8 @@ */ import { Link } from '@sonarsource/echoes-react'; -import { FlagMessage, SubTitle, ToggleButton } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, SubTitle, ToggleButton } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { translate } from '../../../../helpers/l10n'; import { isDefined } from '../../../../helpers/types'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx index fb277d721a1..92f2ee124c3 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { AlmBindingDefinition, diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx index 6b510ee45bd..343edc0d3d4 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, Link, Spinner, getTabId, getTabPanelId } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Link, Spinner, getTabId, getTabPanelId } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { AlmBindingDefinition, diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx index 6d4c3ae9c4f..0b62d1d0efb 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Link } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketCloudForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketCloudForm.tsx index b24bedb3748..9fbef27f409 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketCloudForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketCloudForm.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, Link } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Link } from '~design-system'; import DocumentationLink from '../../../../components/common/DocumentationLink'; import { DocLink } from '../../../../helpers/doc-links'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketForm.tsx index 08aef939c04..3f2a2b5a0af 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketForm.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FormField, ToggleButton } from 'design-system'; -import * as React from 'react'; + +import { FormField, ToggleButton } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { AlmKeys, diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketServerForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketServerForm.tsx index 06d1221029b..887f02d423f 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketServerForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketServerForm.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Link } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/CreationTooltip.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/CreationTooltip.tsx index 2fb9dbece83..34f6b6cd70b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/CreationTooltip.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/CreationTooltip.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import withAppStateContext from '../../../../app/components/app-state/withAppStateContext'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx index 7334dd303d1..1958bd844a1 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; import ConfirmModal from '../../../../components/controls/ConfirmModal'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubForm.tsx index bced3853838..a7081087a0f 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubForm.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, Link } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Link } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GitlabForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GitlabForm.tsx index 89793ac4df6..732b36903dc 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GitlabForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GitlabForm.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Link } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionForm-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionForm-test.tsx index 04a868fb9c7..866bbd0f06c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionForm-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock'; import { renderComponent } from '../../../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx index 3278608a84c..f044f926600 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock'; import SettingsServiceMock from '../../../../../api/mocks/SettingsServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx index 8f6e46d7097..5e6ee34d9fe 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx @@ -20,10 +20,10 @@ import { Link, Text } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { FlagMessage, SubTitle, ToggleButton, getTabId, getTabPanelId } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { useSearchParams } from 'react-router-dom'; +import { FlagMessage, SubTitle, ToggleButton, getTabId, getTabPanelId } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { searchParamsToQuery } from '~sonar-aligned/helpers/router'; import withAvailableFeatures, { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationFormField.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationFormField.tsx index 0cedff71375..cd8b7c7dead 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationFormField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationFormField.tsx @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { IconError } from '@sonarsource/echoes-react'; -import { FormField, Highlight, InputField, Note, RequiredIcon, TextError } from 'design-system'; -import React from 'react'; import { useIntl } from 'react-intl'; +import { FormField, Highlight, InputField, Note, RequiredIcon, TextError } from '~design-system'; import { isDefined } from '../../../../helpers/types'; import { DefinitionV2, ExtendedSettingDefinition, SettingType } from '../../../../types/settings'; import { getPropertyDescription, getPropertyName, isSecuredDefinition } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationMultiValuesField.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationMultiValuesField.tsx index 209497489da..df4a780aad4 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationMultiValuesField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationMultiValuesField.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DestructiveIcon, InputField, TrashIcon } from 'design-system'; -import * as React from 'react'; + +import { DestructiveIcon, InputField, TrashIcon } from '~design-system'; import { translateWithParameters } from '../../../../helpers/l10n'; import { DefinitionV2, ExtendedSettingDefinition } from '../../../../types/settings'; import { getPropertyName } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx index 0487d91f586..6d99714d77d 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { InputField, InputTextArea } from 'design-system'; import React, { useEffect } from 'react'; +import { InputField, InputTextArea } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { DefinitionV2, ExtendedSettingDefinition, SettingType } from '../../../../types/settings'; import { isSecuredDefinition } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationToggleField.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationToggleField.tsx index 4f57851a3fe..745a5881a47 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationToggleField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationToggleField.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Switch } from 'design-system'; -import React from 'react'; + +import { Switch } from '~design-system'; interface SamlToggleFieldProps { ariaDescribedby: string; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx index e20089279b1..a474ea305be 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx @@ -19,10 +19,10 @@ */ import { Button, ButtonVariety, RadioButtonGroup } from '@sonarsource/echoes-react'; -import { FormField, Modal } from 'design-system'; import { noop } from 'lodash'; import * as React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { FormField, Modal } from '~design-system'; import DocumentationLink from '../../../../components/common/DocumentationLink'; import { DocLink } from '../../../../helpers/doc-links'; import { useUpdateGitHubConfigurationMutation } from '../../../../queries/dop-translation'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/BitbucketAuthenticationTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/BitbucketAuthenticationTab.tsx index 06a2ed8703d..e91035acaf4 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/BitbucketAuthenticationTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/BitbucketAuthenticationTab.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; -import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage } from '~design-system'; import DocumentationLink from '../../../../components/common/DocumentationLink'; import { DocLink } from '../../../../helpers/doc-links'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationDetails.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationDetails.tsx index 5a5c948305f..bed06e6a8b7 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationDetails.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationDetails.tsx @@ -17,15 +17,16 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Tooltip } from '@sonarsource/echoes-react'; +import { ReactElement } from 'react'; import { ButtonPrimary, ButtonSecondary, DangerButtonSecondary, FlagMessage, SubHeading, -} from 'design-system'; -import React, { ReactElement } from 'react'; +} from '~design-system'; import { translate } from '../../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx index eba9057fa8b..a20de7a3367 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx @@ -19,10 +19,10 @@ */ import { Button, ButtonVariety, Spinner } from '@sonarsource/echoes-react'; -import { FlagMessage, Modal } from 'design-system'; import { keyBy } from 'lodash'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Modal } from '~design-system'; import DocumentationLink from '../../../../components/common/DocumentationLink'; import { AlmAuthDocLinkKeys } from '../../../../helpers/doc-links'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx index 5d6af12b6ed..37cce07bd1c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; -import React from 'react'; + import { useIntl } from 'react-intl'; +import { FlagMessage } from '~design-system'; import ConfirmModal from '../../../../components/controls/ConfirmModal'; import { ProvisioningType } from '../../../../types/provisioning'; import { Provider } from '../../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/DevopsRolesMappingModal.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/DevopsRolesMappingModal.tsx index 0fd95177fe5..2c0a5a7038f 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/DevopsRolesMappingModal.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/DevopsRolesMappingModal.tsx @@ -19,6 +19,7 @@ */ import { Spinner } from '@sonarsource/echoes-react'; +import * as React from 'react'; import { ButtonSecondary, Checkbox, @@ -32,8 +33,7 @@ import { TableRow, TableRowInteractive, TrashIcon, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import PermissionHeader from '../../../../components/permissions/PermissionHeader'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubAuthenticationTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubAuthenticationTab.tsx index 456d1c3f7e6..2f4bac067f3 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubAuthenticationTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubAuthenticationTab.tsx @@ -19,10 +19,10 @@ */ import { Spinner } from '@sonarsource/echoes-react'; -import { ButtonSecondary, FlagMessage, Highlight, Note } from 'design-system/lib'; import { isEmpty, omitBy } from 'lodash'; import React, { FormEvent, useContext, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { ButtonSecondary, FlagMessage, Highlight, Note } from '~design-system'; import GitHubSynchronisationWarning from '../../../../app/components/GitHubSynchronisationWarning'; import { AvailableFeaturesContext } from '../../../../app/components/available-features/AvailableFeaturesContext'; import DocumentationLink from '../../../../components/common/DocumentationLink'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationForm.tsx index e4b71b2ea81..1e67327799e 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationForm.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety, Modal } from '@sonarsource/echoes-react'; -import { FlagMessage } from 'design-system'; import { isEmpty, keyBy } from 'lodash'; import React, { useEffect, useState } from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage } from '~design-system'; import DocumentationLink from '../../../../components/common/DocumentationLink'; import { DocLink } from '../../../../helpers/doc-links'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationValidity.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationValidity.tsx index 50e1e3a6a6d..0a0e95b6f7b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationValidity.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationValidity.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { useEffect, useState } from 'react'; import { ButtonLink, FlagErrorIcon, @@ -27,8 +29,7 @@ import { TextMuted, UnorderedList, Variant, -} from 'design-system'; -import React, { useEffect, useState } from 'react'; +} from '~design-system'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { useCheckGitHubConfigQuery } from '../../../../queries/identity-provider/github'; import { GitHubProvisioningStatus } from '../../../../types/provisioning'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubMappingModal.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubMappingModal.tsx index cfde5ce3396..295a82d5c44 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubMappingModal.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubMappingModal.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { useGithubRolesMappingQuery } from '../../../../queries/identity-provider/github'; import { AlmKeys } from '../../../../types/alm-settings'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx index a5a00bc2822..f5992e7d6ba 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ButtonSecondary, Highlight, Note, Spinner } from 'design-system'; import { isEmpty, omitBy } from 'lodash'; -import React, { FormEvent, useContext, useState } from 'react'; +import { FormEvent, useContext, useState } from 'react'; import { FormattedMessage } from 'react-intl'; +import { ButtonSecondary, Highlight, Note, Spinner } from '~design-system'; import GitLabSynchronisationWarning from '../../../../app/components/GitLabSynchronisationWarning'; import { AvailableFeaturesContext } from '../../../../app/components/available-features/AvailableFeaturesContext'; import DocumentationLink from '../../../../components/common/DocumentationLink'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx index b7324db3e73..44bea0de2cb 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx @@ -19,10 +19,10 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, Modal, Spinner } from 'design-system'; import { keyBy } from 'lodash'; -import React, { SyntheticEvent, useEffect, useState } from 'react'; +import { SyntheticEvent, useEffect, useState } from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Modal, Spinner } from '~design-system'; import DocumentationLink from '../../../../components/common/DocumentationLink'; import { DocLink } from '../../../../helpers/doc-links'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationValidity.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationValidity.tsx index 30c12786759..47a13b07ab1 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationValidity.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationValidity.tsx @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; import { translate } from '../../../../helpers/l10n'; import { GitlabConfiguration } from '../../../../types/provisioning'; import TestConfiguration from './TestConfiguration'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabMappingModal.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabMappingModal.tsx index e74bc66920a..b14f3d20667 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabMappingModal.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabMappingModal.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { useGitlabRolesMappingQuery } from '../../../../queries/identity-provider/gitlab'; import { AlmKeys } from '../../../../types/alm-settings'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/ProvisioningSection.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/ProvisioningSection.tsx index a18e176b0f4..3d101d30f07 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/ProvisioningSection.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/ProvisioningSection.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { FormEvent, ReactElement } from 'react'; import { BasicSeparator, ButtonPrimary, @@ -25,8 +27,7 @@ import { RadioButton, Spinner, SubHeading, -} from 'design-system'; -import React, { FormEvent, ReactElement } from 'react'; +} from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { ProvisioningType } from '../../../../types/provisioning'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/SamlAuthenticationTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/SamlAuthenticationTab.tsx index 7303d45007b..7454cea4533 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/SamlAuthenticationTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/SamlAuthenticationTab.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ButtonSecondary, Spinner } from 'design-system'; import React, { FormEvent } from 'react'; import { FormattedMessage } from 'react-intl'; +import { ButtonSecondary, Spinner } from '~design-system'; import DocumentationLink from '../../../../components/common/DocumentationLink'; import ConfirmModal from '../../../../components/controls/ConfirmModal'; import { DocLink } from '../../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx index aa8d438430b..de66f098d5c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { BasicSeparator, SubHeading } from 'design-system'; -import React, { ReactElement } from 'react'; +import { ReactElement } from 'react'; +import { BasicSeparator, SubHeading } from '~design-system'; import { translate } from '../../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx index e9c58bdb0bd..867b32c371b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx @@ -19,8 +19,8 @@ */ import { Button } from '@sonarsource/echoes-react'; -import { FlagMessage, Spinner, Variant } from 'design-system'; import React from 'react'; +import { FlagMessage, Spinner, Variant } from '~design-system'; import { translate } from '../../../../helpers/l10n'; const intlPrefix = 'settings.authentication.configuration'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Bitbucket-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Bitbucket-it.tsx index 61600662b49..450b1ec5248 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Bitbucket-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Bitbucket-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector'; import SettingsServiceMock from '../../../../../api/mocks/SettingsServiceMock'; import { AvailableFeaturesContext } from '../../../../../app/components/available-features/AvailableFeaturesContext'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Github-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Github-it.tsx index 2fcd562ce05..cdd12ddca6c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Github-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Github-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; -import React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import ComputeEngineServiceMock from '../../../../../api/mocks/ComputeEngineServiceMock'; import DopTranslationServiceMock from '../../../../../api/mocks/DopTranslationServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Gitlab-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Gitlab-it.tsx index 4a68f12ff16..677631333dc 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Gitlab-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Gitlab-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import ComputeEngineServiceMock from '../../../../../api/mocks/ComputeEngineServiceMock'; import GitlabProvisioningServiceMock from '../../../../../api/mocks/GitlabProvisioningServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Scim-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Scim-it.tsx index 5d449067ba7..e94d6417caf 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Scim-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-Scim-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import ScimProvisioningServiceMock from '../../../../../api/mocks/ScimProvisioningServiceMock'; import SettingsServiceMock from '../../../../../api/mocks/SettingsServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-it.tsx index 01d0f3b2dfb..e2cc00d7837 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import DopTranslationServiceMock from '../../../../../api/mocks/DopTranslationServiceMock'; import GithubProvisioningServiceMock from '../../../../../api/mocks/GithubProvisioningServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useSamlConfiguration.ts b/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useSamlConfiguration.ts index 78f3dfb123d..2cb1cf487f0 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useSamlConfiguration.ts +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useSamlConfiguration.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React from 'react'; import { AvailableFeaturesContext } from '../../../../../app/components/available-features/AvailableFeaturesContext'; import { useScimStatusQuery } from '../../../../../queries/identity-provider/scim'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/utils.ts b/server/sonar-web/src/main/js/apps/settings/components/authentication/utils.ts index e602faf6c4a..a85268b579a 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/utils.ts +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { translate } from '../../../../helpers/l10n'; import { GitHubConfigurationResponse } from '../../../../types/dop-translation'; import { SettingType } from '../../../../types/settings'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/email-notification/AuthenticationSelector.tsx b/server/sonar-web/src/main/js/apps/settings/components/email-notification/AuthenticationSelector.tsx index ece46a15cb8..5c28f77d5d8 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/email-notification/AuthenticationSelector.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/email-notification/AuthenticationSelector.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, Note, SelectionCard } from 'design-system/lib'; -import React from 'react'; + +import { BasicSeparator, Note, SelectionCard } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { AuthMethod } from '../../../../types/system'; import { EmailNotificationFormField } from './EmailNotificationFormField'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/email-notification/CommonSMTP.tsx b/server/sonar-web/src/main/js/apps/settings/components/email-notification/CommonSMTP.tsx index 31266135e01..6fa9a570c16 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/email-notification/CommonSMTP.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/email-notification/CommonSMTP.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator } from 'design-system/lib'; -import React from 'react'; + +import { BasicSeparator } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { EmailNotificationFormField } from './EmailNotificationFormField'; import { EmailNotificationGroupProps, HOST, PORT, SECURITY_PROTOCOL } from './utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotification.tsx b/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotification.tsx index 2c2f4c4a822..a6956b39f0b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotification.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotification.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner, Text } from '@sonarsource/echoes-react'; -import { SubTitle } from 'design-system/lib'; import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { SubTitle } from '~design-system'; import { useGetEmailConfiguration } from '../../../../queries/system'; import EmailNotificationConfiguration from './EmailNotificationConfiguration'; import EmailNotificationOverview from './EmailNotificationOverview'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationConfiguration.tsx b/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationConfiguration.tsx index 966260e0c89..4733f28e9e8 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationConfiguration.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationConfiguration.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { NumberedList, NumberedListItem } from 'design-system/lib'; import { noop } from 'lodash'; import React, { useCallback, useEffect } from 'react'; +import { NumberedList, NumberedListItem } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { useSaveEmailConfigurationMutation, diff --git a/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationFormField.tsx b/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationFormField.tsx index 9847276a9f4..df62156c350 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationFormField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationFormField.tsx @@ -26,10 +26,10 @@ import { InputSize, Select, } from '@sonarsource/echoes-react'; -import { FormField, InputField, TextError } from 'design-system/lib'; import { isEmpty, isUndefined } from 'lodash'; import React, { useEffect } from 'react'; import isEmail from 'validator/lib/isEmail'; +import { FormField, InputField, TextError } from '~design-system'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; type InputType = 'email' | 'number' | 'password' | 'select' | 'text'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationOverview.tsx b/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationOverview.tsx index 8685ae4a7f0..09b12080ac2 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationOverview.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailNotificationOverview.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { BasicSeparator, CodeSnippet } from 'design-system/lib'; -import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { BasicSeparator, CodeSnippet } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { AuthMethod, EmailConfiguration } from '../../../../types/system'; import EmailTestModal from './EmailTestModal'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailTestModal.tsx b/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailTestModal.tsx index 962284abd66..81ed7c978c2 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailTestModal.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/email-notification/EmailTestModal.tsx @@ -17,17 +17,18 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety, Modal } from '@sonarsource/echoes-react'; +import { FormEvent, useState } from 'react'; +import { useIntl } from 'react-intl'; +import { isEmail } from 'validator'; import { addGlobalErrorMessage, addGlobalSuccessMessage, FormField, InputField, InputTextArea, -} from 'design-system'; -import React, { FormEvent, useState } from 'react'; -import { useIntl } from 'react-intl'; -import { isEmail } from 'validator'; +} from '~design-system'; import { useCurrentLoginUser } from '../../../../app/components/current-user/CurrentUserContext'; import { translate } from '../../../../helpers/l10n'; import { useSendTestEmailMutation } from '../../../../queries/emails'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/email-notification/SenderInformation.tsx b/server/sonar-web/src/main/js/apps/settings/components/email-notification/SenderInformation.tsx index 3d629d33ed1..450c90ba79e 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/email-notification/SenderInformation.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/email-notification/SenderInformation.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator } from 'design-system/lib'; -import React from 'react'; + +import { BasicSeparator } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { EmailNotificationFormField } from './EmailNotificationFormField'; import { EmailNotificationGroupProps, FROM_ADDRESS, FROM_NAME, SUBJECT_PREFIX } from './utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/email-notification/__tests__/EmailNotification-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/email-notification/__tests__/EmailNotification-it.tsx index fa2929fc4f2..bd8e953b542 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/email-notification/__tests__/EmailNotification-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/email-notification/__tests__/EmailNotification-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { addGlobalSuccessMessage } from 'design-system/lib'; -import React from 'react'; +import { addGlobalSuccessMessage } from '~design-system'; import { byLabelText, byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector'; import SystemServiceMock from '../../../../../api/mocks/SystemServiceMock'; import * as settingsApi from '../../../../../api/settings'; @@ -36,8 +36,8 @@ import EmailNotification from '../EmailNotification'; jest.mock('../../../../../api/system'); jest.mock('../../../../../api/settings'); -jest.mock('design-system', () => ({ - ...jest.requireActual('design-system'), +jest.mock('~design-system', () => ({ + ...jest.requireActual('~design-system'), addGlobalSuccessMessage: jest.fn(), })); diff --git a/server/sonar-web/src/main/js/apps/settings/components/email-notification/utils.ts b/server/sonar-web/src/main/js/apps/settings/components/email-notification/utils.ts index ab13a9a2380..28fdc837142 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/email-notification/utils.ts +++ b/server/sonar-web/src/main/js/apps/settings/components/email-notification/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { AuthMethod, EmailConfiguration, diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.tsx index 4337ca52831..dbcc549d649 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/Input.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { SettingType } from '../../../../types/settings'; import { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.tsx index 9c4337e06d7..15e9e49e400 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Note, Switch } from 'design-system'; + import * as React from 'react'; +import { Note, Switch } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { DefaultSpecializedInputProps } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx index d57d717c4fb..c238492dae7 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx @@ -19,6 +19,7 @@ */ import styled from '@emotion/styled'; +import * as React from 'react'; import { ButtonSecondary, HtmlFormatter, @@ -28,8 +29,7 @@ import { SanitizeLevel, themeBorder, themeColor, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import FormattingTipsWithLink from '../../../../components/common/FormattingTipsWithLink'; import { translate } from '../../../../helpers/l10n'; import { DefaultSpecializedInputProps, getPropertyName } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForJSON.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForJSON.tsx index ea106b989db..f4de761ae5e 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForJSON.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForJSON.tsx @@ -19,8 +19,8 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, InputTextArea } from 'design-system'; import * as React from 'react'; +import { FlagMessage, InputTextArea } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { DefaultSpecializedInputProps, getPropertyName } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForNumber.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForNumber.tsx index 858a3ccb0e7..6f8521442dd 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForNumber.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForNumber.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { DefaultSpecializedInputProps } from '../../utils'; import SimpleInput from './SimpleInput'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSecured.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSecured.tsx index 4dce07d7edf..661b9c5f555 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSecured.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSecured.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { LockIcon } from 'design-system'; import * as React from 'react'; +import { LockIcon } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { DefaultInputProps, diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.tsx index 9ece399691c..f9a48f8c6af 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForSingleSelectList.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { InputSize, Select } from '@sonarsource/echoes-react'; import * as React from 'react'; import { ExtendedSettingDefinition } from '../../../../types/settings'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForString.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForString.tsx index 9eb65edc9ad..d7d6f90a6d4 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForString.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForString.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { DefaultSpecializedInputProps } from '../../utils'; import SimpleInput from './SimpleInput'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForText.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForText.tsx index 43002fdef8d..fdb73e2f229 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForText.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForText.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputTextArea } from 'design-system'; + import * as React from 'react'; +import { InputTextArea } from '~design-system'; import { DefaultSpecializedInputProps, getPropertyName } from '../../utils'; interface Props extends DefaultSpecializedInputProps { diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.tsx index c50bc4e3835..3494d1c682d 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, ButtonVariety, IconDelete } from '@sonarsource/echoes-react'; import * as React from 'react'; import { translateWithParameters } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx index 023e1f2b1c9..294454495a9 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/PrimitiveInput.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { SettingType } from '../../../../types/settings'; import { DefaultSpecializedInputProps } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.tsx index 71297a1e665..193a654f112 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { ActionCell, ContentCell, @@ -25,8 +27,7 @@ import { Table, TableRow, TrashIcon, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translateWithParameters } from '../../../../helpers/l10n'; import { DefaultSpecializedInputProps, diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.tsx index 0ef763ffeac..b1e3433e5fd 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/SimpleInput.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputField } from 'design-system'; + import * as React from 'react'; +import { InputField } from '~design-system'; import { KeyboardKeys } from '../../../../helpers/keycodes'; import { DefaultSpecializedInputProps, getPropertyName } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx index b0c2563c198..45e50207746 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, InputField, Note, RequiredIcon, SubHeading, Switch } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, InputField, Note, RequiredIcon, SubHeading, Switch } from '~design-system'; import withAvailableFeatures, { WithAvailableFeaturesProps, } from '../../../../app/components/available-features/withAvailableFeatures'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx index a5054de5ee8..428b1325c16 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { cloneDeep } from 'lodash'; import * as React from 'react'; import { getAlmSettings, validateProjectAlmBinding } from '../../../../api/alm-settings'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx index 28a1093d711..f240af2d4a6 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx @@ -17,6 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { BasicSeparator, ButtonPrimary, @@ -28,9 +31,7 @@ import { Spinner, SubHeading, SubTitle, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import AlmSettingsInstanceSelector from '../../../../components/devops-platform/AlmSettingsInstanceSelector'; import MandatoryFieldsExplanation from '../../../../components/ui/MandatoryFieldsExplanation'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-it.tsx index 03f1d690a21..10fe90f4906 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock'; import CurrentUserContextProvider from '../../../../../app/components/current-user/CurrentUserContextProvider'; diff --git a/server/sonar-web/src/main/js/apps/settings/constants.ts b/server/sonar-web/src/main/js/apps/settings/constants.ts index fd7a647fe2e..12c0e96a1cf 100644 --- a/server/sonar-web/src/main/js/apps/settings/constants.ts +++ b/server/sonar-web/src/main/js/apps/settings/constants.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { AlmKeys } from '../../types/alm-settings'; import { ExtendedSettingDefinition } from '../../types/settings'; import { Dict } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx index bdc8b5a2f9e..4e0ba47577b 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx +++ b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper, Spinner, Title } from 'design-system'; + import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper, Spinner, Title } from '~design-system'; import { checkSecretKey, generateSecretKey } from '../../../api/settings'; import { translate } from '../../../helpers/l10n'; import EncryptionForm from './EncryptionForm'; diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.tsx b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.tsx index 4617a15b86b..1d8ef1df5fc 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.tsx @@ -18,6 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import * as React from 'react'; +import { useCallback, useState } from 'react'; +import { FormattedMessage } from 'react-intl'; import { ButtonPrimary, ButtonSecondary, @@ -25,10 +28,7 @@ import { CodeSnippet, InputTextArea, Spinner, -} from 'design-system'; -import * as React from 'react'; -import { useCallback, useState } from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { encryptValue } from '../../../api/settings'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.tsx b/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.tsx index 6d64b7ad4ad..18e6c23ba17 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.tsx @@ -18,6 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import * as React from 'react'; +import { useCallback, useState } from 'react'; +import { FormattedMessage } from 'react-intl'; import { ButtonPrimary, ClipboardIconButton, @@ -26,10 +29,7 @@ import { Spinner, SubHeading, UnorderedList, -} from 'design-system'; -import * as React from 'react'; -import { useCallback, useState } from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import DocumentationLink from '../../../components/common/DocumentationLink'; import { DocLink } from '../../../helpers/doc-links'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/__tests__/EncryptionApp-it.tsx b/server/sonar-web/src/main/js/apps/settings/encryption/__tests__/EncryptionApp-it.tsx index cc652ed6323..c0cdcf79eb0 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/__tests__/EncryptionApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/encryption/__tests__/EncryptionApp-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/apps/settings/routes.tsx b/server/sonar-web/src/main/js/apps/settings/routes.tsx index a2ce4ea9874..1d9ba9a6f29 100644 --- a/server/sonar-web/src/main/js/apps/settings/routes.tsx +++ b/server/sonar-web/src/main/js/apps/settings/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/settings/utils.ts b/server/sonar-web/src/main/js/apps/settings/utils.ts index 3154efa57d9..b46e9572eee 100644 --- a/server/sonar-web/src/main/js/apps/settings/utils.ts +++ b/server/sonar-web/src/main/js/apps/settings/utils.ts @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputSizeKeys } from 'design-system'; import { sortBy } from 'lodash'; import { Path } from 'react-router-dom'; +import { InputSizeKeys } from '~design-system'; import { hasMessage, translate } from '../../helpers/l10n'; import { isDefined } from '../../helpers/types'; import { getGlobalSettingsUrl, getProjectSettingsUrl } from '../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/apps/system/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/system/__tests__/utils-test.ts index f392efc8636..d48c7303cc9 100644 --- a/server/sonar-web/src/main/js/apps/system/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/system/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mockClusterSysInfo, mockLogs, mockStandaloneSysInfo } from '../../../helpers/testMocks'; import { SysInfoBase, SysInfoStandalone } from '../../../types/types'; import * as u from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx b/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx index ba99739c585..d03cfa4d816 100644 --- a/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety, RadioButtonGroup } from '@sonarsource/echoes-react'; -import { FlagMessage, Modal } from 'design-system'; import * as React from 'react'; +import { FlagMessage, Modal } from '~design-system'; import { setLogLevel } from '../../../api/system'; import { translate } from '../../../helpers/l10n'; import { LOGS_LEVELS } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/system/components/ClusterSysInfos.tsx b/server/sonar-web/src/main/js/apps/system/components/ClusterSysInfos.tsx index 67a7e68d375..1f4d77506a8 100644 --- a/server/sonar-web/src/main/js/apps/system/components/ClusterSysInfos.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/ClusterSysInfos.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Note, UnorderedList } from 'design-system'; + import { sortBy } from 'lodash'; -import * as React from 'react'; +import { Note, UnorderedList } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { SysInfoAppNode, SysInfoCluster, SysInfoSearchNode } from '../../../types/types'; import { diff --git a/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx index 09cb66272d4..73095f35359 100644 --- a/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/PageActions.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { ButtonPrimary, ChevronDownIcon, @@ -25,8 +27,7 @@ import { InteractiveIcon, ItemDownload, PencilIcon, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { getBaseUrl } from '../../../helpers/system'; import { getFileNameSuffix } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx index a9e10bea8af..ff4252decaa 100644 --- a/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner } from '@sonarsource/echoes-react'; -import { Card, ClipboardButton, FlagMessage, Title } from 'design-system'; -import * as React from 'react'; +import { Card, ClipboardButton, FlagMessage, Title } from '~design-system'; import withAppStateContext from '../../../app/components/app-state/withAppStateContext'; import AppVersionStatus from '../../../components/shared/AppVersionStatus'; import { toShortISO8601String } from '../../../helpers/dates'; diff --git a/server/sonar-web/src/main/js/apps/system/components/StandaloneSysInfos.tsx b/server/sonar-web/src/main/js/apps/system/components/StandaloneSysInfos.tsx index 6a8acbe7f7a..5b54734362b 100644 --- a/server/sonar-web/src/main/js/apps/system/components/StandaloneSysInfos.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/StandaloneSysInfos.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { UnorderedList } from 'design-system'; + import { map } from 'lodash'; -import * as React from 'react'; +import { UnorderedList } from '~design-system'; import { SysInfoStandalone } from '../../../types/types'; import { getHealth, diff --git a/server/sonar-web/src/main/js/apps/system/components/SystemApp.tsx b/server/sonar-web/src/main/js/apps/system/components/SystemApp.tsx index efc7d96a17d..0d142ef634e 100644 --- a/server/sonar-web/src/main/js/apps/system/components/SystemApp.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/SystemApp.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper } from 'design-system'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper } from '~design-system'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location, Router } from '~sonar-aligned/types/router'; import { getSystemInfo } from '../../../api/system'; diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/SystemApp-it.tsx b/server/sonar-web/src/main/js/apps/system/components/__tests__/SystemApp-it.tsx index 756edf56855..f15e9e0128d 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/SystemApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/SystemApp-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { first } from 'lodash'; diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx index ad723d90ffc..117d3cb5111 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Accordion, FlagMessage, SubHeadingHighlight } from 'design-system'; + import { map } from 'lodash'; -import * as React from 'react'; +import { Accordion, FlagMessage, SubHeadingHighlight } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { HealthTypes, SysInfoValueObject } from '../../../../types/types'; import { LogsLevels, getLogsLevel, groupSections } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCauseItem.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCauseItem.tsx index f41956f8013..40e1908e6ba 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCauseItem.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCauseItem.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { FlagMessage } from 'design-system'; -import * as React from 'react'; +import { FlagMessage } from '~design-system'; import { HealthTypes } from '../../../../types/types'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx index 5b6ffb280e7..10a1e68e1ab 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import * as React from 'react'; import StatusIndicator from '../../../../components/common/StatusIndicator'; import Tooltip from '../../../../components/controls/Tooltip'; import { translateWithParameters } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/Section.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/Section.tsx index 331249eba2c..3ff84961aa9 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/Section.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/Section.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, SubHeading, Table, TableRow } from 'design-system'; + import { map } from 'lodash'; -import * as React from 'react'; +import { ContentCell, SubHeading, Table, TableRow } from '~design-system'; import { SysInfoValueObject } from '../../../../types/types'; import SysInfoItem from './SysInfoItem'; diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/SysInfoItem.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/SysInfoItem.tsx index bbbeef434a4..957586ed782 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/SysInfoItem.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/SysInfoItem.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, Table, TableRow } from 'design-system'; + import { map } from 'lodash'; -import * as React from 'react'; +import { ContentCell, Table, TableRow } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { HealthTypes, SysInfoValue } from '../../../../types/types'; import { HEALTH_FIELD, STATE_FIELD } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/system/routes.tsx b/server/sonar-web/src/main/js/apps/system/routes.tsx index cf8319590a6..9b3ae98945f 100644 --- a/server/sonar-web/src/main/js/apps/system/routes.tsx +++ b/server/sonar-web/src/main/js/apps/system/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/system/utils.ts b/server/sonar-web/src/main/js/apps/system/utils.ts index 7e5727e35c7..eef3e567821 100644 --- a/server/sonar-web/src/main/js/apps/system/utils.ts +++ b/server/sonar-web/src/main/js/apps/system/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { each, memoize, omit, omitBy, pickBy, sortBy } from 'lodash'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { RawQuery } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/TutorialsApp.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/TutorialsApp.tsx index c18f871a561..5aaa2551f6f 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/TutorialsApp.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/TutorialsApp.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper } from 'design-system'; -import * as React from 'react'; + +import { LargeCenteredLayout, PageContentFontWrapper } from '~design-system'; import withComponentContext from '../../../app/components/componentContext/withComponentContext'; import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; import TutorialSelection from '../../../components/tutorials/TutorialSelection'; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TutorialsApp-test.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TutorialsApp-test.tsx index 4e10a0b9eae..9a680581f71 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TutorialsApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/__tests__/TutorialsApp-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import SettingsServiceMock from '../../../../api/mocks/SettingsServiceMock'; import UserTokensMock from '../../../../api/mocks/UserTokensMock'; @@ -28,6 +29,14 @@ import routes from '../../routes'; jest.mock('../../../../helpers/handleRequiredAuthentication', () => jest.fn()); +jest.mock('../../../../api/components', () => ({ + getScannableProjects: jest.fn().mockResolvedValue({ projects: [] }), +})); + +jest.mock('../../../../api/alm-settings', () => ({ + getAlmSettingsNoCatch: jest.fn().mockResolvedValue([]), +})); + let settingsMock: SettingsServiceMock; let tokenMock: UserTokensMock; diff --git a/server/sonar-web/src/main/js/apps/tutorials/routes.tsx b/server/sonar-web/src/main/js/apps/tutorials/routes.tsx index d08cadabfc4..3d1bc2dfe34 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/routes.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/users/Header.tsx b/server/sonar-web/src/main/js/apps/users/Header.tsx index 55e53f28f69..9f7fd5b6a04 100644 --- a/server/sonar-web/src/main/js/apps/users/Header.tsx +++ b/server/sonar-web/src/main/js/apps/users/Header.tsx @@ -19,9 +19,9 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Title } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Title } from '~design-system'; import DocumentationLink from '../../components/common/DocumentationLink'; import { DocLink } from '../../helpers/doc-links'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/users/UsersApp.tsx b/server/sonar-web/src/main/js/apps/users/UsersApp.tsx index b8ea9408732..de3e432906b 100644 --- a/server/sonar-web/src/main/js/apps/users/UsersApp.tsx +++ b/server/sonar-web/src/main/js/apps/users/UsersApp.tsx @@ -19,6 +19,8 @@ */ import { subDays, subSeconds } from 'date-fns'; +import { useEffect, useMemo, useState } from 'react'; +import { Helmet } from 'react-helmet-async'; import { HelperHintIcon, InputSearch, @@ -27,9 +29,7 @@ import { PageContentFontWrapper, Spinner, StyledPageTitle, -} from 'design-system'; -import React, { useEffect, useMemo, useState } from 'react'; -import { Helmet } from 'react-helmet-async'; +} from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { getIdentityProviders } from '../../api/users'; import GitHubSynchronisationWarning from '../../app/components/GitHubSynchronisationWarning'; diff --git a/server/sonar-web/src/main/js/apps/users/UsersList.tsx b/server/sonar-web/src/main/js/apps/users/UsersList.tsx index 122d55eea3c..89ffbd48e40 100644 --- a/server/sonar-web/src/main/js/apps/users/UsersList.tsx +++ b/server/sonar-web/src/main/js/apps/users/UsersList.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ActionCell, ContentCell, HelperHintIcon, TableRow } from 'design-system'; -import * as React from 'react'; + +import { ActionCell, ContentCell, HelperHintIcon, TableRow } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { StickyTable } from '../../app/components/admin/StickyTable'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/users/__tests__/UserForm-it.tsx b/server/sonar-web/src/main/js/apps/users/__tests__/UserForm-it.tsx index 8898d1de6f2..67364076f71 100644 --- a/server/sonar-web/src/main/js/apps/users/__tests__/UserForm-it.tsx +++ b/server/sonar-web/src/main/js/apps/users/__tests__/UserForm-it.tsx @@ -19,7 +19,6 @@ */ import userEvent from '@testing-library/user-event'; -import React from 'react'; import UsersServiceMock from '../../../api/mocks/UsersServiceMock'; import { mockRestUser } from '../../../helpers/testMocks'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-it.tsx b/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-it.tsx index db081974e0f..2359234e674 100644 --- a/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { screen, waitFor } from '@testing-library/react'; + +import { act, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock'; import DopTranslationServiceMock from '../../../api/mocks/DopTranslationServiceMock'; @@ -741,26 +741,23 @@ it('accessibility', async () => { // user list page should be accessible expect(await ui.aliceRow.find()).toBeInTheDocument(); - await expect(document.body).toHaveNoA11yViolations(); + await act(async () => { + await expect(document.body).toHaveNoA11yViolations(); + }); // user creation dialog should be accessible await user.click(await ui.createUserButton.find()); - expect(await ui.dialogCreateUser.find()).toBeInTheDocument(); await expect(await ui.dialogCreateUser.find()).toHaveNoA11yViolations(); - await user.click(ui.cancelButton.get()); // users group membership dialog should be accessible await user.click(await ui.aliceUpdateGroupButton.find()); - expect(await ui.dialogGroups.find()).toBeInTheDocument(); await expect(await ui.dialogGroups.find()).toHaveNoA11yViolations(); - await user.click(ui.doneButton.get()); // user update dialog should be accessible await user.click(await ui.aliceUpdateButton.find()); await user.click(await byText('update_details').find()); - expect(await ui.dialogUpdateUser.find()).toBeInTheDocument(); await expect(await ui.dialogUpdateUser.find()).toHaveNoA11yViolations(); await user.click(ui.cancelButton.get()); @@ -772,16 +769,14 @@ it('accessibility', async () => { }) .find(), ); - - expect(await ui.dialogTokens.find()).toBeInTheDocument(); await expect(await ui.dialogTokens.find()).toHaveNoA11yViolations(); await user.click(ui.closeButton.get()); // user password dialog should be accessible await user.click(await ui.aliceUpdateButton.find()); await user.click(await byText('my_profile.password.title').find()); - expect(await ui.dialogPasswords.find()).toBeInTheDocument(); await expect(await ui.dialogPasswords.find()).toHaveNoA11yViolations(); + await user.click(ui.cancelButton.get()); }); function renderUsersApp(featureList: Feature[] = [], currentUser?: CurrentUser) { diff --git a/server/sonar-web/src/main/js/apps/users/components/DeactivateForm.tsx b/server/sonar-web/src/main/js/apps/users/components/DeactivateForm.tsx index e1d1c68417c..d14cd6affcd 100644 --- a/server/sonar-web/src/main/js/apps/users/components/DeactivateForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/DeactivateForm.tsx @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { Checkbox, DangerButtonPrimary, @@ -25,9 +27,7 @@ import { LightPrimary, Link, Modal, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { DocLink } from '../../../helpers/doc-links'; import { useDocUrl } from '../../../helpers/docs'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx b/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx index e0db355c694..38bf658caf0 100644 --- a/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/GroupsForm.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, LightPrimary, Modal, Note } from 'design-system'; import { find } from 'lodash'; import * as React from 'react'; +import { FlagMessage, LightPrimary, Modal, Note } from '~design-system'; import SelectList, { SelectListFilter, SelectListSearchParams, diff --git a/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx b/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx index b68d476967b..d22503944a9 100644 --- a/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx @@ -19,8 +19,8 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, FormField, InputField, Modal, addGlobalSuccessMessage } from 'design-system'; import * as React from 'react'; +import { FlagMessage, FormField, InputField, Modal, addGlobalSuccessMessage } from '~design-system'; import { changePassword } from '../../../api/users'; import { CurrentUserContext } from '../../../app/components/current-user/CurrentUserContext'; import UserPasswordInput, { diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx index 3fb53db1e74..ad407f123fb 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx @@ -19,6 +19,8 @@ */ import { Button, ButtonVariety, Heading, Label, Spinner } from '@sonarsource/echoes-react'; +import { isEmpty } from 'lodash'; +import * as React from 'react'; import { ContentCell, GreySeparator, @@ -26,9 +28,7 @@ import { InputSelect, Table, TableRow, -} from 'design-system'; -import { isEmpty } from 'lodash'; -import * as React from 'react'; +} from '~design-system'; import { getScannableProjects } from '../../../api/components'; import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx index 3a8344cdb36..ca298a50cb7 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensFormItem.tsx @@ -21,9 +21,9 @@ import styled from '@emotion/styled'; import { Button, ButtonVariety } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { ContentCell, FlagWarningIcon, TableRow, themeColor } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { ContentCell, FlagWarningIcon, TableRow, themeColor } from '~design-system'; import ConfirmButton from '../../../components/controls/ConfirmButton'; import DateFormatter from '../../../components/intl/DateFormatter'; import DateFromNow from '../../../components/intl/DateFromNow'; diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx index 5404d2b3393..28e550bf671 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Modal } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Modal } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { RestUserDetailed } from '../../../types/users'; import TokensForm from './TokensForm'; diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensFormNewToken.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensFormNewToken.tsx index 11b9ec3d741..2dd9c18fdf9 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensFormNewToken.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensFormNewToken.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ClipboardIconButton, CodeSnippet, FlagMessage } from 'design-system'; -import * as React from 'react'; +import { ClipboardIconButton, CodeSnippet, FlagMessage } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/users/components/UserForm.tsx b/server/sonar-web/src/main/js/apps/users/components/UserForm.tsx index 6f8dbc6d68a..5ea425c132d 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserForm.tsx @@ -19,9 +19,9 @@ */ import { Button, ButtonVariety, IconCheckCircle, IconError, Text } from '@sonarsource/echoes-react'; -import { FlagMessage, FormField, InputField, Modal, Spinner } from 'design-system'; import { debounce } from 'lodash'; import * as React from 'react'; +import { FlagMessage, FormField, InputField, Modal, Spinner } from '~design-system'; import EmailIput, { EmailChangeHandlerParams } from '../../../components/common/EmailInput'; import UserPasswordInput, { PasswordChangeHandlerParams, diff --git a/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx b/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx index 6fbb0e6ccd6..fd0ea26ce11 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, ButtonSize, @@ -24,8 +25,8 @@ import { IconMoreVertical, Spinner, } from '@sonarsource/echoes-react'; -import { ActionCell, Avatar, ContentCell, TableRow } from 'design-system'; import * as React from 'react'; +import { ActionCell, Avatar, ContentCell, TableRow } from '~design-system'; import DateFromNow from '../../../components/intl/DateFromNow'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { useUserGroupsCountQuery } from '../../../queries/group-memberships'; diff --git a/server/sonar-web/src/main/js/apps/users/components/UserListItemIdentity.tsx b/server/sonar-web/src/main/js/apps/users/components/UserListItemIdentity.tsx index 89643dc1f06..2bbd264d0d9 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserListItemIdentity.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserListItemIdentity.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, Note, getTextColor } from 'design-system'; -import * as React from 'react'; +import { Badge, Note, getTextColor } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { translate } from '../../../helpers/l10n'; import { isDefined } from '../../../helpers/types'; diff --git a/server/sonar-web/src/main/js/apps/users/components/UserScmAccountInput.tsx b/server/sonar-web/src/main/js/apps/users/components/UserScmAccountInput.tsx index 6f2fa92b800..c52343c7f99 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserScmAccountInput.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserScmAccountInput.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DestructiveIcon, InputField, TrashIcon } from 'design-system'; -import * as React from 'react'; + +import { DestructiveIcon, InputField, TrashIcon } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; export interface Props { diff --git a/server/sonar-web/src/main/js/apps/users/components/UserScmAccounts.tsx b/server/sonar-web/src/main/js/apps/users/components/UserScmAccounts.tsx index 61a2014f33f..b0fa3cd6e0a 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserScmAccounts.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserScmAccounts.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; + import * as React from 'react'; +import { Link } from '~design-system'; import { translateWithParameters } from '../../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/users/components/ViewGroupsModal.tsx b/server/sonar-web/src/main/js/apps/users/components/ViewGroupsModal.tsx index adf8b46e3a3..b623f855c33 100644 --- a/server/sonar-web/src/main/js/apps/users/components/ViewGroupsModal.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/ViewGroupsModal.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, Modal, ModalSize, Spinner, Text } from '@sonarsource/echoes-react'; -import { Badge, InputSearch } from 'design-system/lib'; import * as React from 'react'; +import { Badge, InputSearch } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { useUserGroupsQuery } from '../../../queries/group-memberships'; import { RestUserDetailed } from '../../../types/users'; diff --git a/server/sonar-web/src/main/js/apps/users/constants.ts b/server/sonar-web/src/main/js/apps/users/constants.ts index 374efbf68c6..bf6a0fd2c75 100644 --- a/server/sonar-web/src/main/js/apps/users/constants.ts +++ b/server/sonar-web/src/main/js/apps/users/constants.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { translate } from '../../helpers/l10n'; import { LabelValueSelectOption } from '../../helpers/search'; import { UserActivity } from './types'; diff --git a/server/sonar-web/src/main/js/apps/users/routes.tsx b/server/sonar-web/src/main/js/apps/users/routes.tsx index 3920d1ca079..ec5a88ce2c1 100644 --- a/server/sonar-web/src/main/js/apps/users/routes.tsx +++ b/server/sonar-web/src/main/js/apps/users/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/users/types.ts b/server/sonar-web/src/main/js/apps/users/types.ts index 21bf8c93d7d..a67de237f11 100644 --- a/server/sonar-web/src/main/js/apps/users/types.ts +++ b/server/sonar-web/src/main/js/apps/users/types.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum UserActivity { AnyActivity = 'ANY_ACTIVITY', ActiveSonarLintUser = 'ACTIVE_SONARLINT_USER', diff --git a/server/sonar-web/src/main/js/apps/users/utils.ts b/server/sonar-web/src/main/js/apps/users/utils.ts index afd3d42e8f3..fe5314a685c 100644 --- a/server/sonar-web/src/main/js/apps/users/utils.ts +++ b/server/sonar-web/src/main/js/apps/users/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { memoize } from 'lodash'; import { RawQuery } from '~sonar-aligned/types/router'; import { cleanQuery, parseAsString, serializeString } from '../../helpers/query'; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/WebApiApp.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/WebApiApp.tsx index 872b3ab08f1..3367c1a95af 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/WebApiApp.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/WebApiApp.tsx @@ -17,13 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Spinner } from '@sonarsource/echoes-react'; -import { LargeCenteredLayout, PageContentFontWrapper, Title } from 'design-system'; import { omit } from 'lodash'; -import React, { useMemo, useState } from 'react'; +import { useMemo, useState } from 'react'; import { Helmet } from 'react-helmet-async'; import { useLocation } from 'react-router-dom'; +import { LargeCenteredLayout, PageContentFontWrapper, Title } from '~design-system'; import { translate } from '../../helpers/l10n'; import { useOpenAPI } from '../../queries/web-api'; import ApiFilterContext from './components/ApiFilterContext'; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx index 85dbd68aae8..50bd6eaf4cb 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byTestId, byText } from '~sonar-aligned/helpers/testSelector'; import WebApiServiceMock from '../../../api/mocks/WebApiServiceMock'; import { renderApp } from '../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/utils-test.ts index cf3c3618b17..a115845861d 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { dereferenceSchema, extractSchemaAndMediaType, mapOpenAPISchema } from '../utils'; describe('dereferenceSchema', () => { diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiFilterContext.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiFilterContext.tsx index 01f90af23b7..5c6a4862bc4 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiFilterContext.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiFilterContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Dispatch, SetStateAction, createContext } from 'react'; const ApiFilterContext = createContext<{ diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiInformation.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiInformation.tsx index 8ce64e9b22d..083e4d18075 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiInformation.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiInformation.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, SubHeading, Title } from 'design-system'; + import { OpenAPIV3 } from 'openapi-types'; -import React from 'react'; +import { Badge, SubHeading, Title } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { ExcludeReferences, InternalExtension } from '../types'; import { getApiEndpointKey } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiParameters.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiParameters.tsx index 8ae9c881ed4..f55349f2c37 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiParameters.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiParameters.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Accordion, Badge, SubHeading, SubTitle, TextMuted } from 'design-system'; + import { groupBy } from 'lodash'; import { OpenAPIV3 } from 'openapi-types'; import React, { useContext } from 'react'; import { FormattedMessage } from 'react-intl'; +import { Accordion, Badge, SubHeading, SubTitle, TextMuted } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { ExcludeReferences, InternalExtension } from '../types'; import { mapOpenAPISchema } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiRequestParameters.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiRequestParameters.tsx index 42bc04e3ce8..e2c83a5aba0 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiRequestParameters.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiRequestParameters.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Accordion, Badge, TextMuted } from 'design-system'; + import { isEmpty } from 'lodash'; import { OpenAPIV3 } from 'openapi-types'; import React, { useContext } from 'react'; import { FormattedMessage } from 'react-intl'; +import { Accordion, Badge, TextMuted } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { ExcludeReferences, InternalExtension } from '../types'; import ApiFilterContext from './ApiFilterContext'; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiRequestSchema.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiRequestSchema.tsx index b7a11e01988..5081774a97c 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiRequestSchema.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiRequestSchema.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Card, CodeSnippet, TextMuted } from 'design-system'; + import { OpenAPIV3 } from 'openapi-types'; -import React from 'react'; +import { Card, CodeSnippet, TextMuted } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { ExcludeReferences } from '../types'; import { extractSchemaAndMediaType } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponseSchema.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponseSchema.tsx index 19cce2011ba..4f28d03d61e 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponseSchema.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponseSchema.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, TextMuted } from 'design-system'; + import { OpenAPIV3 } from 'openapi-types'; -import React from 'react'; +import { CodeSnippet, TextMuted } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { ExcludeReferences } from '../types'; import { extractSchemaAndMediaType } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponseTitle.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponseTitle.tsx index cfa529ef7e1..20a86b870c5 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponseTitle.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponseTitle.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge } from 'design-system'; -import React from 'react'; + +import { Badge } from '~design-system'; import { getResponseCodeClassName } from '../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponses.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponses.tsx index e601f76113c..3bb7311171c 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponses.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiResponses.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Accordion, SubTitle } from 'design-system'; + import { OpenAPIV3 } from 'openapi-types'; import React from 'react'; +import { Accordion, SubTitle } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { ExcludeReferences } from '../types'; import ApiResponseSchema from './ApiResponseSchema'; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiSidebar.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiSidebar.tsx index efc0af390c2..df5b1b912b5 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiSidebar.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiSidebar.tsx @@ -19,6 +19,10 @@ */ import { Checkbox } from '@sonarsource/echoes-react'; +import { sortBy } from 'lodash'; +import { OpenAPIV3 } from 'openapi-types'; +import { Fragment, useContext, useMemo, useState } from 'react'; +import { useLocation, useNavigate } from 'react-router-dom'; import { Badge, BasicSeparator, @@ -27,11 +31,7 @@ import { SubnavigationAccordion, SubnavigationItem, SubnavigationSubheading, -} from 'design-system'; -import { sortBy } from 'lodash'; -import { OpenAPIV3 } from 'openapi-types'; -import React, { Fragment, useContext, useMemo, useState } from 'react'; -import { useLocation, useNavigate } from 'react-router-dom'; +} from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { translate } from '../../../helpers/l10n'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/RestMethodPill.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/RestMethodPill.tsx index b2984e01341..e804080ae0b 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/RestMethodPill.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/RestMethodPill.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { Badge } from 'design-system'; -import React from 'react'; +import { Badge } from '~design-system'; interface Props { method: string; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/routes.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/routes.tsx index e85d40f8c42..46cffc3c8cd 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/routes.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/types.ts b/server/sonar-web/src/main/js/apps/web-api-v2/types.ts index 621601036d3..4e49d51a2c1 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/types.ts +++ b/server/sonar-web/src/main/js/apps/web-api-v2/types.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { OpenAPIV3 } from 'openapi-types'; export type ExcludeReferences<T> = T extends OpenAPIV3.ReferenceObject diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/utils.ts b/server/sonar-web/src/main/js/apps/web-api-v2/utils.ts index fd139a638a6..bc1058a95ed 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/utils.ts +++ b/server/sonar-web/src/main/js/apps/web-api-v2/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mapValues } from 'lodash'; import { OpenAPIV3 } from 'openapi-types'; import { isDefined } from '../../helpers/types'; diff --git a/server/sonar-web/src/main/js/apps/web-api/__tests__/WebApi-it.tsx b/server/sonar-web/src/main/js/apps/web-api/__tests__/WebApi-it.tsx index 17a921d2ed0..823d16aa4ae 100644 --- a/server/sonar-web/src/main/js/apps/web-api/__tests__/WebApi-it.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/__tests__/WebApi-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import WebApiServiceMock from '../../../api/mocks/WebApiServiceMock'; diff --git a/server/sonar-web/src/main/js/apps/web-api/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/web-api/__tests__/utils-test.ts index 4bb4a32487c..e1b65497317 100644 --- a/server/sonar-web/src/main/js/apps/web-api/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/web-api/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { parseVersion } from '../utils'; it('should test parseVersion is working as expected', () => { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx index 9beb4beb9af..5ae91132ce7 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Action.tsx @@ -18,8 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, Card, LinkBox, LinkIcon, SafeHTMLInjection, SubHeading, Tabs } from 'design-system'; import * as React from 'react'; +import { + Badge, + Card, + LinkBox, + LinkIcon, + SafeHTMLInjection, + SubHeading, + Tabs, +} from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { WebApi } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/ActionChangelog.tsx b/server/sonar-web/src/main/js/apps/web-api/components/ActionChangelog.tsx index c49cfe00f72..fccb64234ef 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/ActionChangelog.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/ActionChangelog.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, ListItem, UnorderedList } from 'design-system'; -import * as React from 'react'; + +import { Badge, ListItem, UnorderedList } from '~design-system'; import { WebApi } from '../../../types/types'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/DeprecatedBadge.tsx b/server/sonar-web/src/main/js/apps/web-api/components/DeprecatedBadge.tsx index 894be35d029..27d34202aa2 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/DeprecatedBadge.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/DeprecatedBadge.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge } from 'design-system'; -import * as React from 'react'; + +import { Badge } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { parseVersion } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx index 76ed0840db7..ccde182f63a 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SafeHTMLInjection, SubTitle } from 'design-system'; import { isEmpty } from 'lodash'; -import * as React from 'react'; +import { SafeHTMLInjection, SubTitle } from '~design-system'; import { WebApi } from '../../../types/types'; import { Query, actionsFilter, getActionKey } from '../utils'; import Action from './Action'; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx b/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx index 7d4e5444aa8..739ed1e80d6 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/InternalBadge.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge } from 'design-system'; -import * as React from 'react'; + +import { Badge } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx index a9e9d5dc9bf..19b174fc843 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SubnavigationGroup, SubnavigationItem } from 'design-system'; + import * as React from 'react'; import { useNavigate } from 'react-router-dom'; +import { SubnavigationGroup, SubnavigationItem } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { WebApi } from '../../../types/types'; import { Query, actionsFilter, isDomainPathActive, serializeQuery } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx index b88f080e86e..bcb6a85fa4c 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import * as React from 'react'; import { ContentCell, DarkLabel, @@ -26,8 +27,7 @@ import { SafeHTMLInjection, Table, TableRow, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { WebApi } from '../../../types/types'; import DeprecatedBadge from './DeprecatedBadge'; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/ResponseExample.tsx b/server/sonar-web/src/main/js/apps/web-api/components/ResponseExample.tsx index 06ef9f4f794..1c4564bc968 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/ResponseExample.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/ResponseExample.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { fetchResponseExample as fetchResponseExampleApi } from '../../../api/web-api'; import { WebApi } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx index 64c2948f6d0..a9a3ae3ec56 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Checkbox, HelperHintIcon, InputSearch } from 'design-system'; -import * as React from 'react'; + +import { Checkbox, HelperHintIcon, InputSearch } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { translate } from '../../../helpers/l10n'; import { Query } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx index e5111ae3543..8f96123e392 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx @@ -19,17 +19,17 @@ */ import styled from '@emotion/styled'; +import { maxBy } from 'lodash'; +import * as React from 'react'; +import { Helmet } from 'react-helmet-async'; +import { Params, useParams } from 'react-router-dom'; import { LAYOUT_FOOTER_HEIGHT, LAYOUT_GLOBAL_NAV_HEIGHT, LargeCenteredLayout, PageContentFontWrapper, Title, -} from 'design-system'; -import { maxBy } from 'lodash'; -import * as React from 'react'; -import { Helmet } from 'react-helmet-async'; -import { Params, useParams } from 'react-router-dom'; +} from '~design-system'; import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location, Router } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Actions-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Actions-test.tsx index 289b83c1440..b579be6340e 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Actions-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/Actions-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/apps/web-api/routes.tsx b/server/sonar-web/src/main/js/apps/web-api/routes.tsx index 6f2537898c0..7ed0825c8f3 100644 --- a/server/sonar-web/src/main/js/apps/web-api/routes.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/web-api/utils.ts b/server/sonar-web/src/main/js/apps/web-api/utils.ts index 5a0c87e2e80..3d111653374 100644 --- a/server/sonar-web/src/main/js/apps/web-api/utils.ts +++ b/server/sonar-web/src/main/js/apps/web-api/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { memoize } from 'lodash'; import { RawQuery } from '~sonar-aligned/types/router'; import { diff --git a/server/sonar-web/src/main/js/apps/webhooks/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/webhooks/__tests__/utils-test.ts index bc0708f5245..a9f46e47225 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/webhooks/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { formatPayload } from '../utils'; it('should format payload properly', () => { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx index a1ed019d0ca..a4efd7fdef9 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx @@ -18,10 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LargeCenteredLayout, PageContentFontWrapper, Spinner } from 'design-system'; -import * as React from 'react'; import { useCallback, useEffect, useState } from 'react'; import { Helmet } from 'react-helmet-async'; +import { LargeCenteredLayout, PageContentFontWrapper, Spinner } from '~design-system'; import { createWebhook, deleteWebhook, searchWebhooks, updateWebhook } from '../../../api/webhooks'; import withComponentContext from '../../../app/components/componentContext/withComponentContext'; import Suggestions from '../../../components/embed-docs-modal/Suggestions'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx index f3f1a4fd358..d507b8548a8 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/CreateWebhookForm.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { isWebUri } from 'valid-url'; import InputValidationField from '../../../components/controls/InputValidationField'; import ValidationModal from '../../../components/controls/ValidationModal'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx index dd1bfdc5781..9db0055aabc 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/DeleteWebhookForm.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal } from 'design-system'; import * as React from 'react'; +import { Modal } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { WebhookResponse } from '../../../types/webhook'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveriesForm.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveriesForm.tsx index b3a06927a70..28dc21c0eeb 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveriesForm.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveriesForm.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Modal, Spinner } from 'design-system'; -import * as React from 'react'; + import { useCallback, useEffect, useState } from 'react'; +import { Modal, Spinner } from '~design-system'; import { searchDeliveries } from '../../../api/webhooks'; import ListFooter from '../../../components/controls/ListFooter'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryAccordion.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryAccordion.tsx index 445c4c8c6a1..849f1b47898 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryAccordion.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryAccordion.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagErrorIcon, FlagSuccessIcon, TextAccordion } from 'design-system'; -import * as React from 'react'; + import { useState } from 'react'; import { useIntl } from 'react-intl'; +import { FlagErrorIcon, FlagSuccessIcon, TextAccordion } from '~design-system'; import { getDelivery } from '../../../api/webhooks'; import { longFormatterOption } from '../../../components/intl/DateFormatter'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryItem.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryItem.tsx index d9a1f6e93ec..366426f461a 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryItem.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/DeliveryItem.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, Spinner } from 'design-system'; -import * as React from 'react'; + +import { CodeSnippet, Spinner } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { WebhookDelivery } from '../../../types/webhook'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/LatestDeliveryForm.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/LatestDeliveryForm.tsx index 0f74e43633d..575f12048d4 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/LatestDeliveryForm.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/LatestDeliveryForm.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Modal } from 'design-system'; -import * as React from 'react'; + import { useCallback, useEffect, useState } from 'react'; +import { Modal } from '~design-system'; import { getDelivery } from '../../../api/webhooks'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { WebhookDelivery, WebhookResponse } from '../../../types/webhook'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx index 02c10857831..3e5b0c5e7d0 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/PageActions.tsx @@ -19,7 +19,6 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { useState } from 'react'; import Tooltip from '../../../components/controls/Tooltip'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/PageHeader.tsx index 61db225664d..d06273188d9 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/PageHeader.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link, Title } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Link, Title } from '~design-system'; import { DocLink } from '../../../helpers/doc-links'; import { useDocUrl } from '../../../helpers/docs'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/UpdateWebhookSecretField.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/UpdateWebhookSecretField.tsx index fdc412694cc..ee8f5235dd3 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/UpdateWebhookSecretField.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/UpdateWebhookSecretField.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DiscreetLink, FlagMessage } from 'design-system'; + import { useField } from 'formik'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { DiscreetLink, FlagMessage } from '~design-system'; import InputValidationField from '../../../components/controls/InputValidationField'; import ModalValidationField from '../../../components/controls/ModalValidationField'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookActions.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookActions.tsx index 867d27d490e..82913b5e225 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookActions.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookActions.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { useState } from 'react'; import { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItem.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItem.tsx index 30d435b7980..cc8d04c0d37 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItem.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItem.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ActionCell, ContentCell, TableRowInteractive } from 'design-system'; -import * as React from 'react'; + +import { ActionCell, ContentCell, TableRowInteractive } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { WebhookResponse, WebhookUpdatePayload } from '../../../types/webhook'; import WebhookActions from './WebhookActions'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItemLatestDelivery.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItemLatestDelivery.tsx index 92c817525be..42540d9e088 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItemLatestDelivery.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/WebhookItemLatestDelivery.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, ButtonSize, IconMoreVertical } from '@sonarsource/echoes-react'; -import { FlagErrorIcon, FlagSuccessIcon } from 'design-system'; -import * as React from 'react'; import { useState } from 'react'; +import { FlagErrorIcon, FlagSuccessIcon } from '~design-system'; import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { WebhookResponse } from '../../../types/webhook'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/WebhooksList.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/WebhooksList.tsx index 78989a32aad..bd4b70156e5 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/WebhooksList.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/WebhooksList.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ActionCell, ContentCell, Table, TableRow } from 'design-system'; + import { sortBy } from 'lodash'; -import * as React from 'react'; +import { ActionCell, ContentCell, Table, TableRow } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { WebhookResponse, WebhookUpdatePayload } from '../../../types/webhook'; import WebhookItem from './WebhookItem'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-it.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-it.tsx index 8acc6c74d48..fe25db9483e 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-it.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import WebhooksMock from '../../../../api/mocks/WebhooksMock'; import { mockComponent } from '../../../../helpers/mocks/component'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/routes.tsx b/server/sonar-web/src/main/js/apps/webhooks/routes.tsx index ce4b06474ad..543659e23ad 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/routes.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/routes.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; + import { Route } from 'react-router-dom'; import { lazyLoadComponent } from '~sonar-aligned/helpers/lazyLoadComponent'; diff --git a/server/sonar-web/src/main/js/apps/webhooks/utils.ts b/server/sonar-web/src/main/js/apps/webhooks/utils.ts index a6cb10d3b12..4bc98fd47ff 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/utils.ts +++ b/server/sonar-web/src/main/js/apps/webhooks/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export function formatPayload(payload: string) { try { return JSON.stringify(JSON.parse(payload), undefined, 2); diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.tsx index c41844ccf73..340931d6fa0 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; import { intersection } from 'lodash'; import * as React from 'react'; +import { FlagMessage } from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx index ca0531b8a1f..2f6b811e1c6 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { LightLabel, SonarCodeColorizer, Spinner } from 'design-system'; import * as React from 'react'; +import { LightLabel, SonarCodeColorizer, Spinner } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { decorateWithUnderlineFlags } from '../../helpers/code-viewer'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerContext.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerContext.tsx index cabe53266b5..febd1acd17c 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerContext.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { BranchLike } from '../../types/branch-like'; import { SourceViewerFile } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx index ac85d31cb62..4f74bc8ede3 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx @@ -20,6 +20,7 @@ import styled from '@emotion/styled'; import { LinkStandalone } from '@sonarsource/echoes-react'; +import { useIntl } from 'react-intl'; import { ClipboardIconButton, DrilldownLink, @@ -35,9 +36,7 @@ import { QualifierIcon, themeBorder, themeColor, -} from 'design-system'; -import * as React from 'react'; -import { useIntl } from 'react-intl'; +} from '~design-system'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerPreview.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerPreview.tsx index 4bc81fbc199..02955f3871d 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerPreview.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerPreview.tsx @@ -26,7 +26,7 @@ import { hljsIssueIndicatorPlugin, hljsUnderlinePlugin, UnderlineRangePosition, -} from 'design-system'; +} from '~design-system'; import React, { forwardRef, useEffect, useMemo, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewer-it.tsx b/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewer-it.tsx index bcc29f329b9..a1b5a0a8657 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewer-it.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewer-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byLabelText } from '~sonar-aligned/helpers/testSelector'; import { MetricKey } from '~sonar-aligned/types/metrics'; import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx index 4ec2ff70e53..0f0c43fc4b2 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx @@ -17,15 +17,16 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { groupBy, sortBy } from 'lodash'; +import React, { Fragment, PureComponent } from 'react'; import { DiscreetLink, DuplicationHighlight, FlagMessage, StandoutLink as Link, QualifierIcon, -} from 'design-system'; -import { groupBy, sortBy } from 'lodash'; -import React, { Fragment, PureComponent } from 'react'; +} from '~design-system'; import { isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx index 93fb8144315..374907bc7f4 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { LineCoverage, LineMeta, LineNumber, LineWrapper } from 'design-system'; import { times } from 'lodash'; import * as React from 'react'; +import { LineCoverage, LineMeta, LineNumber, LineWrapper } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getCodeUrl, getPathUrlAsString } from '../../../helpers/urls'; import { Issue, LinearIssueLocation, SourceLine } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.tsx index 0b78769bec5..d3296b3eb74 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import React, { PureComponent, ReactNode, RefObject, createRef } from 'react'; import { CoveredUnderline, CoveredUnderlineLabel, @@ -30,8 +32,7 @@ import { UncoveredUnderline, UncoveredUnderlineLabel, UnderlineLabels, -} from 'design-system'; -import React, { PureComponent, ReactNode, RefObject, createRef } from 'react'; +} from '~design-system'; import { IssueSourceViewerScrollContext } from '../../../apps/issues/components/IssueSourceViewerScrollContext'; import { translate } from '../../../helpers/l10n'; import { LinearIssueLocation, SourceLine } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.tsx index a05afb97244..4fdd9827f80 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DuplicationBlock, LineMeta, OutsideClickHandler, PopupPlacement } from 'design-system'; + import * as React from 'react'; +import { DuplicationBlock, LineMeta, OutsideClickHandler, PopupPlacement } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; import { SourceLine } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.tsx index 17561817e60..957d8fa4ca4 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { IssueIndicatorButton, LineIssuesIndicatorIcon, LineMeta } from 'design-system'; + import { uniq } from 'lodash'; import * as React from 'react'; import { useIntl } from 'react-intl'; +import { IssueIndicatorButton, LineIssuesIndicatorIcon, LineMeta } from '~design-system'; import Tooltip from '../../../components/controls/Tooltip'; import { useStandardExperienceMode } from '../../../queries/settings'; import { Issue, SourceLine } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.tsx index 492d6313156..5f0946a234e 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { BranchLike } from '../../../types/branch-like'; import { LinearIssueLocation, SourceLine, Issue as TypeIssue } from '../../../types/types'; import Issue from '../../issue/Issue'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineOptionsPopup.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineOptionsPopup.tsx index 4bb1ba3316d..7e2b15ca127 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineOptionsPopup.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineOptionsPopup.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DropdownMenu, ItemCopy } from 'design-system'; -import React, { memo } from 'react'; + +import { memo } from 'react'; +import { DropdownMenu, ItemCopy } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { SourceLine } from '../../../types/types'; import { getLineCodeAsPlainText } from '../helpers/lines'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineSCM.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineSCM.tsx index e8db09b6c02..7c3772e5967 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineSCM.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineSCM.tsx @@ -18,14 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { memo, useCallback, useState } from 'react'; import { LineMeta, LineSCMStyled, LineSCMStyledDiv, OutsideClickHandler, PopupPlacement, -} from 'design-system'; -import React, { memo, useCallback, useState } from 'react'; +} from '~design-system'; import { translateWithParameters } from '../../../helpers/l10n'; import { SourceLine } from '../../../types/types'; import Tooltip from '../../controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/SCMPopup.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/SCMPopup.tsx index 4ca3351d3cc..a4caf1a3316 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/SCMPopup.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/SCMPopup.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SCMHighlight } from 'design-system'; -import React, { memo } from 'react'; + +import { memo } from 'react'; +import { SCMHighlight } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { SourceLine } from '../../../types/types'; import DateFormatter from '../../intl/DateFormatter'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/duplications-test.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/duplications-test.ts index fa014ed8009..40d2548262d 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/duplications-test.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/duplications-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getDuplicationBlocksForIndex, isDuplicationBlockInRemovedComponent, diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/highlight-test.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/highlight-test.ts index 4656a40a2ad..96bebd42de1 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/highlight-test.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/highlight-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { highlightSymbol } from '../highlight'; describe('highlightSymbol', () => { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/indexing-test.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/indexing-test.ts index f3a32875688..4e204533f62 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/indexing-test.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/indexing-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mockIssue } from '../../../../helpers/testMocks'; import { issuesByComponentAndLine, symbolsByLine } from '../indexing'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/issueLocations-test.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/issueLocations-test.ts index d136f6fa7c8..b171ebf96dc 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/issueLocations-test.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/issueLocations-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mockSourceLine } from '../../../../helpers/mocks/sources'; import { mockFlowLocation } from '../../../../helpers/testMocks'; import { getLinearLocations, getSecondaryIssueLocationsForLine } from '../issueLocations'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts index 7d778dce69a..4c0a50416b3 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/loadIssues-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier } from '~sonar-aligned/types/component'; import { mockMainBranch } from '../../../../helpers/mocks/branch-like'; import { mockRawIssue } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/duplications.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/duplications.ts index 4d4d16267d4..2c1ba5acbbe 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/duplications.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/duplications.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Duplication, DuplicationBlock } from '../../../types/types'; // TODO Test this function, but I don't get the logic behind it diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/getCoverageStatus.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/getCoverageStatus.ts index 6969205e0c0..225dc376371 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/getCoverageStatus.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/getCoverageStatus.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { SourceLine, SourceLineCoverageStatus } from '../../../types/types'; export default function getCoverageStatus(s: SourceLine): SourceLineCoverageStatus | undefined { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/highlight.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/highlight.ts index bebfb7bd0ab..9237b0a12e2 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/highlight.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/highlight.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { uniq } from 'lodash'; import { LinearIssueLocation } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/indexing.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/indexing.ts index d1e2e1fe786..45a98398646 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/indexing.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/indexing.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { flatten } from 'lodash'; import { Duplication, Issue, LinearIssueLocation, SourceLine } from '../../../types/types'; import { splitByTokens } from './highlight'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts index da1dc7a9b85..983bede74c1 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { FlowLocation, LinearIssueLocation, SourceLine, TextRange } from '../../../types/types'; export function getLinearLocations(textRange: TextRange | undefined): LinearIssueLocation[] { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/lines.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/lines.ts index 33451ca9bd4..9c4a6b3108f 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/lines.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/lines.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { intersection } from 'lodash'; import { LinearIssueLocation } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/helpers/loadIssues.ts b/server/sonar-web/src/main/js/components/SourceViewer/helpers/loadIssues.ts index 4e7652255b6..d925b42ec04 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/helpers/loadIssues.ts +++ b/server/sonar-web/src/main/js/components/SourceViewer/helpers/loadIssues.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { RawQuery } from '~sonar-aligned/types/router'; import { listIssues, searchIssues } from '../../../api/issues'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetric.tsx b/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetric.tsx index f3a9eaff1d1..6e9b3447c57 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetric.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetric.tsx @@ -19,9 +19,9 @@ */ import { Button, IconChevronDown } from '@sonarsource/echoes-react'; -import { Dropdown } from 'design-system'; import { sortBy } from 'lodash'; import * as React from 'react'; +import { Dropdown } from '~design-system'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { CCT_SOFTWARE_QUALITY_METRICS, diff --git a/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetricPopup.tsx b/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetricPopup.tsx index 28cafca7be7..54f5c21705c 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetricPopup.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/AddGraphMetricPopup.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, FlagMessage, MultiSelectMenu } from 'design-system'; import * as React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { Badge, FlagMessage, MultiSelectMenu } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { DEPRECATED_ACTIVITY_METRICS } from '../../helpers/constants'; import { getLocalizedMetricName, translate, translateWithParameters } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/ChartLegend.tsx b/server/sonar-web/src/main/js/components/activity-graph/ChartLegend.tsx index b4ac04e5b24..75b9d5b2f93 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/ChartLegend.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/ChartLegend.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import classNames from 'classnames'; -import { Theme, themeColor } from 'design-system'; -import * as React from 'react'; +import { Theme, themeColor } from '~design-system'; import { LINE_CHART_DASHES } from './utils'; interface Props { diff --git a/server/sonar-web/src/main/js/components/activity-graph/DataTableModal.tsx b/server/sonar-web/src/main/js/components/activity-graph/DataTableModal.tsx index f67b7fa00dd..f4bd358181b 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/DataTableModal.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/DataTableModal.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { FlagMessage, Modal } from 'design-system'; import { filter, slice, sortBy } from 'lodash'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Modal } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { ParsedAnalysis, Serie } from '../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/DefinitionChangeEventInner.tsx b/server/sonar-web/src/main/js/components/activity-graph/DefinitionChangeEventInner.tsx index 58caf7160e4..6b1ae083052 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/DefinitionChangeEventInner.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/DefinitionChangeEventInner.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BareButton, BranchIcon, ChevronDownIcon, Note, StandoutLink } from 'design-system'; + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { BareButton, BranchIcon, ChevronDownIcon, Note, StandoutLink } from '~design-system'; import { isMainBranch } from '~sonar-aligned/helpers/branch-like'; import { translate } from '../../helpers/l10n'; import { getProjectUrl } from '../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/EventInner.tsx b/server/sonar-web/src/main/js/components/activity-graph/EventInner.tsx index ac98fba7d3c..2604c4f5725 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/EventInner.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/EventInner.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Note } from 'design-system'; + import * as React from 'react'; +import { Note } from '~design-system'; import { ComponentContext } from '../../app/components/componentContext/ComponentContext'; import { translate } from '../../helpers/l10n'; import { useCurrentBranchQuery } from '../../queries/branch'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphHistory.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphHistory.tsx index 1317281641b..b6388998833 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphHistory.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphHistory.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { ButtonSecondary } from 'design-system'; import * as React from 'react'; import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; +import { ButtonSecondary } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { AdvancedTimeline } from '../../components/charts/AdvancedTimeline'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx index 2cc024cf64a..d390e385f35 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Spinner, Text } from '@sonarsource/echoes-react'; import { isEqual, uniqBy } from 'lodash'; import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendCustom.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendCustom.tsx index 4dd506acea5..0bd125dc767 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendCustom.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendCustom.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NewCodeLegend } from 'design-system'; -import * as React from 'react'; + +import { NewCodeLegend } from '~design-system'; import Tooltip from '../../components/controls/Tooltip'; import { translate } from '../../helpers/l10n'; import { Serie } from '../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendItem.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendItem.tsx index 76e62d0a627..90e841ffd21 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendItem.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendItem.tsx @@ -20,9 +20,8 @@ import styled from '@emotion/styled'; import classNames from 'classnames'; -import { Badge, CloseIcon, FlagWarningIcon, InteractiveIcon, themeBorder } from 'design-system'; -import * as React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { Badge, CloseIcon, FlagWarningIcon, InteractiveIcon, themeBorder } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { DEPRECATED_ACTIVITY_METRICS } from '../../helpers/constants'; import { translateWithParameters } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendStatic.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendStatic.tsx index e6c009acf14..00f64d7328b 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendStatic.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendStatic.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NewCodeLegend } from 'design-system'; -import * as React from 'react'; + +import { NewCodeLegend } from '~design-system'; import { translate } from '../../helpers/l10n'; import { Serie } from '../../types/project-activity'; import { GraphsLegendItem } from './GraphsLegendItem'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltips.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltips.tsx index f940641a50c..8331a1138dd 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltips.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltips.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Table, TableSeparator, ThemeProp, themeColor, withTheme } from 'design-system'; + import * as React from 'react'; +import { Table, TableSeparator, ThemeProp, themeColor, withTheme } from '~design-system'; import { Popup, PopupPlacement } from '../../components/ui/popups'; import { isDefined } from '../../helpers/types'; import { AnalysisEvent, GraphType, MeasureHistory, Serie } from '../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContent.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContent.tsx index 10386c772c7..c8bbc38cd96 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContent.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContent.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { ChartLegend } from './ChartLegend'; interface Props { diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentCoverage.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentCoverage.tsx index 97f6ab7cff2..297f596e995 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentCoverage.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentCoverage.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TableSeparator } from 'design-system'; -import * as React from 'react'; + +import { TableSeparator } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentDuplication.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentDuplication.tsx index 48e6fd9dc7a..c7ef5149a33 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentDuplication.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentDuplication.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TableSeparator } from 'design-system'; -import * as React from 'react'; + +import { TableSeparator } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentEvents.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentEvents.tsx index cd98c7e1ebc..1c7b6deb38b 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentEvents.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentEvents.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TableSeparator } from 'design-system'; -import * as React from 'react'; + +import { TableSeparator } from '~design-system'; import { AnalysisEvent } from '../../types/project-activity'; import EventInner from './EventInner'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsZoom.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsZoom.tsx index d702f3ebd11..776f8b12830 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsZoom.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsZoom.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; import { ZoomTimeLine } from '../../components/charts/ZoomTimeLine'; import { Serie } from '../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/RichQualityGateEventInner.tsx b/server/sonar-web/src/main/js/components/activity-graph/RichQualityGateEventInner.tsx index 32bcd2c6df0..b59da884261 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/RichQualityGateEventInner.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/RichQualityGateEventInner.tsx @@ -17,15 +17,16 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { BareButton, ChevronDownIcon, Note, QualityGateIndicator, StandoutLink, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { getProjectUrl } from '../../helpers/urls'; import { AnalysisEvent } from '../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/RichQualityProfileEventInner.tsx b/server/sonar-web/src/main/js/components/activity-graph/RichQualityProfileEventInner.tsx index b4307c09210..6db8bf4ea0a 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/RichQualityProfileEventInner.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/RichQualityProfileEventInner.tsx @@ -19,7 +19,6 @@ */ import { Link } from '@sonarsource/echoes-react'; -import React from 'react'; import { useIntl } from 'react-intl'; import { getProfileChangelogPath } from '../../apps/quality-profiles/utils'; import { AnalysisEvent, ProjectAnalysisEventCategory } from '../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/SqUpgradeActivityEventMessage.tsx b/server/sonar-web/src/main/js/components/activity-graph/SqUpgradeActivityEventMessage.tsx index 6caed2f0a8f..cc59fbb0728 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/SqUpgradeActivityEventMessage.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/SqUpgradeActivityEventMessage.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; -import React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { FlagMessage } from '~design-system'; import { AnalysisEvent } from '../../types/project-activity'; interface SqUpgradeActivityEventMessageProps { diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/ActivityGraph-it.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/ActivityGraph-it.tsx index 64e93c3963c..634b4ac1845 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/ActivityGraph-it.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/ActivityGraph-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { times } from 'lodash'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/DataTableModal-it.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/DataTableModal-it.tsx index de33267920c..5bd2c16c450 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/DataTableModal-it.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/DataTableModal-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { times } from 'lodash'; -import * as React from 'react'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { parseDate } from '../../../helpers/dates'; import { diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/EventInner-it.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/EventInner-it.tsx index 0159e1664b2..70d1cbe408b 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/EventInner-it.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/EventInner-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { Route } from 'react-router-dom'; import { isMainBranch } from '~sonar-aligned/helpers/branch-like'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltips-it.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltips-it.tsx index 21457641806..4ef99df5911 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltips-it.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltips-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { parseDate } from '../../../helpers/dates'; import { diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/utils-test.ts b/server/sonar-web/src/main/js/components/activity-graph/__tests__/utils-test.ts index a289f2bae52..446434ec143 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import * as dates from '../../../helpers/dates'; import { mockMeasureHistory, mockSerie } from '../../../helpers/mocks/project-activity'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/utils.ts b/server/sonar-web/src/main/js/components/activity-graph/utils.ts index ebcc1aa3550..9b6562d018b 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/utils.ts +++ b/server/sonar-web/src/main/js/components/activity-graph/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { chunk, flatMap, groupBy, sortBy } from 'lodash'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { diff --git a/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.tsx b/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.tsx index 4e7f000e30c..47c400227f1 100644 --- a/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.tsx +++ b/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { bisector, extent, max } from 'd3-array'; @@ -30,9 +31,9 @@ import { scaleTime, } from 'd3-scale'; import { area, curveBasis, line as d3Line } from 'd3-shape'; -import { CSSColor, ThemeProp, themeColor, withTheme } from 'design-system'; import { flatten, isEqual, sortBy, throttle, uniq } from 'lodash'; import * as React from 'react'; +import { CSSColor, ThemeProp, themeColor, withTheme } from '~design-system'; import { MetricType } from '~sonar-aligned/types/metrics'; import { isDefined } from '../../helpers/types'; import { Chart } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.tsx b/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.tsx index 1eb1c26d4b4..e58453cb7ca 100644 --- a/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.tsx +++ b/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { ScaleLinear, ScaleOrdinal } from 'd3-scale'; -import * as React from 'react'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; interface Props { diff --git a/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.tsx b/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.tsx index a5747967937..0d79a2e980a 100644 --- a/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.tsx +++ b/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { ScaleLinear, ScaleOrdinal } from 'd3-scale'; -import { CSSColor, themeColor } from 'design-system'; import * as React from 'react'; +import { CSSColor, themeColor } from '~design-system'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/components/charts/DonutChart.tsx b/server/sonar-web/src/main/js/components/charts/DonutChart.tsx index 179456b319b..ee7885fa876 100644 --- a/server/sonar-web/src/main/js/components/charts/DonutChart.tsx +++ b/server/sonar-web/src/main/js/components/charts/DonutChart.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { arc as d3Arc, pie as d3Pie, PieArcDatum } from 'd3-shape'; -import * as React from 'react'; export interface DataPoint { fill: string; diff --git a/server/sonar-web/src/main/js/components/charts/LanguageDistribution.tsx b/server/sonar-web/src/main/js/components/charts/LanguageDistribution.tsx index c8a60bbf556..cac224094f8 100644 --- a/server/sonar-web/src/main/js/components/charts/LanguageDistribution.tsx +++ b/server/sonar-web/src/main/js/components/charts/LanguageDistribution.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Histogram } from 'design-system'; + import { sortBy } from 'lodash'; -import * as React from 'react'; +import { Histogram } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import withLanguagesContext from '../../app/components/languages/withLanguagesContext'; diff --git a/server/sonar-web/src/main/js/components/charts/SplitLine.tsx b/server/sonar-web/src/main/js/components/charts/SplitLine.tsx index cc65690d2de..0338936a50b 100644 --- a/server/sonar-web/src/main/js/components/charts/SplitLine.tsx +++ b/server/sonar-web/src/main/js/components/charts/SplitLine.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ScaleLinear, ScalePoint, ScaleTime } from 'd3-scale'; -import * as React from 'react'; import { shouldShowSplitLine } from '../../helpers/activity-graph'; interface Props { diff --git a/server/sonar-web/src/main/js/components/charts/SplitLinePopover.tsx b/server/sonar-web/src/main/js/components/charts/SplitLinePopover.tsx index 5fab13951de..54c2f05ae0d 100644 --- a/server/sonar-web/src/main/js/components/charts/SplitLinePopover.tsx +++ b/server/sonar-web/src/main/js/components/charts/SplitLinePopover.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonIcon, IconInfo, Popover } from '@sonarsource/echoes-react'; import { ScaleTime } from 'd3-scale'; import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.tsx b/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.tsx index e7d1d7711cf..de6e16507b8 100644 --- a/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.tsx +++ b/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.tsx @@ -17,14 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { extent, max } from 'd3-array'; import { ScaleTime, scaleLinear, scalePoint, scaleTime } from 'd3-scale'; import { area, curveBasis, line as d3Line } from 'd3-shape'; -import { CSSColor, DraggableIcon, themeColor } from 'design-system'; import { flatten, sortBy, throttle } from 'lodash'; import * as React from 'react'; import Draggable, { DraggableBounds, DraggableCore, DraggableData } from 'react-draggable'; +import { CSSColor, DraggableIcon, themeColor } from '~design-system'; import { MetricType } from '~sonar-aligned/types/metrics'; import { Chart } from '../../types/types'; import { LINE_CHART_DASHES } from '../activity-graph/utils'; diff --git a/server/sonar-web/src/main/js/components/charts/__tests__/AdvancedTimeline-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/AdvancedTimeline-test.tsx index ed7dfb4d301..ac7d3846ed9 100644 --- a/server/sonar-web/src/main/js/components/charts/__tests__/AdvancedTimeline-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/AdvancedTimeline-test.tsx @@ -17,19 +17,18 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { TooltipProvider } from '@sonarsource/echoes-react'; import { render } from '@testing-library/react'; -import * as React from 'react'; import { MetricType } from '~sonar-aligned/types/metrics'; import { AdvancedTimeline, PropsWithoutTheme } from '../AdvancedTimeline'; // Replace scaleTime with scaleUtc to avoid timezone-dependent snapshots jest.mock('d3-scale', () => { - const { scaleUtc, ...others } = jest.requireActual('d3-scale'); - + const d3scale = jest.requireActual('d3-scale'); return { - ...others, - scaleTime: scaleUtc, + ...d3scale, + scaleTime: d3scale.scaleUtc, }; }); diff --git a/server/sonar-web/src/main/js/components/charts/__tests__/LanguageDistribution-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/LanguageDistribution-test.tsx index d83bd51c064..fa54bc774db 100644 --- a/server/sonar-web/src/main/js/components/charts/__tests__/LanguageDistribution-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/LanguageDistribution-test.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { renderComponent } from '../../../helpers/testReactTestingUtils'; import LanguageDistribution, { LanguageDistributionProps } from '../LanguageDistribution'; diff --git a/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/LanguageDistribution-test.tsx.snap b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/LanguageDistribution-test.tsx.snap index ffb9a7e58e5..1d2f304b0cf 100644 --- a/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/LanguageDistribution-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/LanguageDistribution-test.tsx.snap @@ -10,7 +10,7 @@ exports[`should render correctly 1`] = ` fill: var(--echoes-color-text-subdued); } -.e1vbniy52 .emotion-2 { +.e4r8l5e2 .emotion-2 { fill: rgb(255,255,255); } diff --git a/server/sonar-web/src/main/js/components/common/ActivityLink.tsx b/server/sonar-web/src/main/js/components/common/ActivityLink.tsx index 0d2b577a250..cdcf2fce7bf 100644 --- a/server/sonar-web/src/main/js/components/common/ActivityLink.tsx +++ b/server/sonar-web/src/main/js/components/common/ActivityLink.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { StandoutLink } from 'design-system'; -import * as React from 'react'; + +import { StandoutLink } from '~design-system'; import { translate } from '../../helpers/l10n'; import { getActivityUrl, getMeasureHistoryUrl } from '../../helpers/urls'; import { BranchLike } from '../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/components/common/DisableableSelectOption.tsx b/server/sonar-web/src/main/js/components/common/DisableableSelectOption.tsx index a5a962d15f9..a467bf0f5af 100644 --- a/server/sonar-web/src/main/js/components/common/DisableableSelectOption.tsx +++ b/server/sonar-web/src/main/js/components/common/DisableableSelectOption.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import Tooltip from '../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/components/common/EmailInput.tsx b/server/sonar-web/src/main/js/components/common/EmailInput.tsx index 54b4c96782d..3e42a8fc393 100644 --- a/server/sonar-web/src/main/js/components/common/EmailInput.tsx +++ b/server/sonar-web/src/main/js/components/common/EmailInput.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IconCheckCircle, IconError, Text } from '@sonarsource/echoes-react'; -import { InputField } from 'design-system'; import * as React from 'react'; import isEmail from 'validator/lib/isEmail'; +import { InputField } from '~design-system'; import { translate } from '../../helpers/l10n'; import FocusOutHandler from '../controls/FocusOutHandler'; diff --git a/server/sonar-web/src/main/js/components/common/EmptySearch.tsx b/server/sonar-web/src/main/js/components/common/EmptySearch.tsx index d452db59c42..72c579af28b 100644 --- a/server/sonar-web/src/main/js/components/common/EmptySearch.tsx +++ b/server/sonar-web/src/main/js/components/common/EmptySearch.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FishVisual, Highlight } from 'design-system'; -import * as React from 'react'; + +import { FishVisual, Highlight } from '~design-system'; import { translate } from '../../helpers/l10n'; export default function EmptySearch() { diff --git a/server/sonar-web/src/main/js/components/common/FormattingTips.tsx b/server/sonar-web/src/main/js/components/common/FormattingTips.tsx index 3f9f5bb541a..780df38d9e7 100644 --- a/server/sonar-web/src/main/js/components/common/FormattingTips.tsx +++ b/server/sonar-web/src/main/js/components/common/FormattingTips.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link, Note } from 'design-system'; + import React from 'react'; +import { Link, Note } from '~design-system'; import { translate } from '../../helpers/l10n'; import { getBaseUrl } from '../../helpers/system'; import { getFormattingHelpUrl } from '../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/components/common/FormattingTipsWithLink.tsx b/server/sonar-web/src/main/js/components/common/FormattingTipsWithLink.tsx index 906b9af74f6..b8df1d4382d 100644 --- a/server/sonar-web/src/main/js/components/common/FormattingTipsWithLink.tsx +++ b/server/sonar-web/src/main/js/components/common/FormattingTipsWithLink.tsx @@ -19,9 +19,9 @@ */ import { LinkStandalone } from '@sonarsource/echoes-react'; -import { CodeSnippet } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { CodeSnippet } from '~design-system'; import { translate } from '../../helpers/l10n'; import { getFormattingHelpUrl } from '../../helpers/urls'; diff --git a/server/sonar-web/src/main/js/components/common/InstanceMessage.tsx b/server/sonar-web/src/main/js/components/common/InstanceMessage.tsx index bb01d7d2f4e..3b38f17fc3e 100644 --- a/server/sonar-web/src/main/js/components/common/InstanceMessage.tsx +++ b/server/sonar-web/src/main/js/components/common/InstanceMessage.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getInstance } from '../../helpers/system'; diff --git a/server/sonar-web/src/main/js/components/common/Link.tsx b/server/sonar-web/src/main/js/components/common/Link.tsx index b6685c4447d..5182788dfe7 100644 --- a/server/sonar-web/src/main/js/components/common/Link.tsx +++ b/server/sonar-web/src/main/js/components/common/Link.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as Echoes from '@sonarsource/echoes-react'; -import { OpenNewTabIcon } from 'design-system'; import * as React from 'react'; import { Link as ReactRouterDomLink, LinkProps as ReactRouterDomLinkProps } from 'react-router-dom'; import { isWebUri } from 'valid-url'; +import { OpenNewTabIcon } from '~design-system'; import { translate } from '../../helpers/l10n'; type OriginalLinkProps = ReactRouterDomLinkProps & React.RefAttributes<HTMLAnchorElement>; diff --git a/server/sonar-web/src/main/js/components/common/LocationMessage.tsx b/server/sonar-web/src/main/js/components/common/LocationMessage.tsx index 0f2f1a1d0e6..bf10859e575 100644 --- a/server/sonar-web/src/main/js/components/common/LocationMessage.tsx +++ b/server/sonar-web/src/main/js/components/common/LocationMessage.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/MetaLink.tsx b/server/sonar-web/src/main/js/components/common/MetaLink.tsx index c552160bc75..537b5b805e7 100644 --- a/server/sonar-web/src/main/js/components/common/MetaLink.tsx +++ b/server/sonar-web/src/main/js/components/common/MetaLink.tsx @@ -19,8 +19,8 @@ */ import { LinkStandalone } from '@sonarsource/echoes-react'; -import { CloseIcon, InputField, InteractiveIcon } from 'design-system'; import React, { useState } from 'react'; +import { CloseIcon, InputField, InteractiveIcon } from '~design-system'; import isValidUri from '../../app/utils/isValidUri'; import { translate } from '../../helpers/l10n'; import { getLinkName } from '../../helpers/projectLinks'; diff --git a/server/sonar-web/src/main/js/components/common/PageCounter.tsx b/server/sonar-web/src/main/js/components/common/PageCounter.tsx index 1e6878b9e68..2defc4d3e8d 100644 --- a/server/sonar-web/src/main/js/components/common/PageCounter.tsx +++ b/server/sonar-web/src/main/js/components/common/PageCounter.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx b/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx index 2090c30a993..0d891543cc0 100644 --- a/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx +++ b/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import * as React from 'react'; import { Visibility } from '~sonar-aligned/types/component'; import Tooltip from '../../components/controls/Tooltip'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/common/ResetPasswordForm.tsx b/server/sonar-web/src/main/js/components/common/ResetPasswordForm.tsx index d7cdc2571d1..6c3b71f1caf 100644 --- a/server/sonar-web/src/main/js/components/common/ResetPasswordForm.tsx +++ b/server/sonar-web/src/main/js/components/common/ResetPasswordForm.tsx @@ -19,8 +19,8 @@ */ import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { FlagMessage, FormField, InputField } from 'design-system'; import * as React from 'react'; +import { FlagMessage, FormField, InputField } from '~design-system'; import { changePassword } from '../../api/users'; import MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx b/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx index e155cd1f508..3023e3cde95 100644 --- a/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx +++ b/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { debounce } from 'lodash'; import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/components/common/StatusIndicator.tsx b/server/sonar-web/src/main/js/components/common/StatusIndicator.tsx index a7d6091a509..11fc02db2e0 100644 --- a/server/sonar-web/src/main/js/components/common/StatusIndicator.tsx +++ b/server/sonar-web/src/main/js/components/common/StatusIndicator.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CheckIcon, FlagErrorIcon, FlagWarningIcon } from 'design-system'; -import * as React from 'react'; + +import { CheckIcon, FlagErrorIcon, FlagWarningIcon } from '~design-system'; import { translate } from '../../helpers/l10n'; import { HealthTypes } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/components/common/UserPasswordInput.tsx b/server/sonar-web/src/main/js/components/common/UserPasswordInput.tsx index 98ccd7077cb..4c7f4453484 100644 --- a/server/sonar-web/src/main/js/components/common/UserPasswordInput.tsx +++ b/server/sonar-web/src/main/js/components/common/UserPasswordInput.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IconCheck, IconCheckCircle, IconError, IconX, Text } from '@sonarsource/echoes-react'; -import { FormField, InputField, InputSizeKeys } from 'design-system'; import * as React from 'react'; +import { FormField, InputField, InputSizeKeys } from '~design-system'; import { translate } from '../../helpers/l10n'; import FocusOutHandler from '../controls/FocusOutHandler'; diff --git a/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx b/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx index 4aa0bb6a64f..d70671f2673 100644 --- a/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx +++ b/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { RadioButtonGroup } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import * as React from 'react'; import { Visibility } from '~sonar-aligned/types/component'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/common/__mocks__/ScreenPositionHelper.tsx b/server/sonar-web/src/main/js/components/common/__mocks__/ScreenPositionHelper.tsx index a1f98fb2cbb..95af1031fe7 100644 --- a/server/sonar-web/src/main/js/components/common/__mocks__/ScreenPositionHelper.tsx +++ b/server/sonar-web/src/main/js/components/common/__mocks__/ScreenPositionHelper.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/__tests__/ActivityLink-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/ActivityLink-test.tsx index cea3dc27be0..3f3c60c3d4f 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/ActivityLink-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/ActivityLink-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { mockBranch } from '../../../helpers/mocks/branch-like'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import { GraphType } from '../../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/components/common/__tests__/FormattingTips-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/FormattingTips-test.tsx index 987403d29e2..5a47e0170cd 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/FormattingTips-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/FormattingTips-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import { FCProps } from '../../../types/misc'; import FormattingTips from '../FormattingTips'; diff --git a/server/sonar-web/src/main/js/components/common/__tests__/FormattingTipsWithLink-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/FormattingTipsWithLink-test.tsx index 9d4d7b8ba05..aa6e93fdcd3 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/FormattingTipsWithLink-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/FormattingTipsWithLink-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import FormattingTipsWithLink from '../FormattingTipsWithLink'; diff --git a/server/sonar-web/src/main/js/components/common/__tests__/Link-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/Link-test.tsx index 5984b8201e6..c8a1e5bdd54 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/Link-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/Link-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import Link, { LinkProps } from '../Link'; diff --git a/server/sonar-web/src/main/js/components/controls/ClickEventBoundary.tsx b/server/sonar-web/src/main/js/components/controls/ClickEventBoundary.tsx index 15b920dd61b..df6ad1259b3 100644 --- a/server/sonar-web/src/main/js/components/controls/ClickEventBoundary.tsx +++ b/server/sonar-web/src/main/js/components/controls/ClickEventBoundary.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; export interface ClickEventBoundaryProps { diff --git a/server/sonar-web/src/main/js/components/controls/ComponentReportActions.tsx b/server/sonar-web/src/main/js/components/controls/ComponentReportActions.tsx index 661b6a255e4..4bad639dee6 100644 --- a/server/sonar-web/src/main/js/components/controls/ComponentReportActions.tsx +++ b/server/sonar-web/src/main/js/components/controls/ComponentReportActions.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { addGlobalSuccessMessage } from 'design-system'; import * as React from 'react'; +import { addGlobalSuccessMessage } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { getReportStatus, diff --git a/server/sonar-web/src/main/js/components/controls/ComponentReportActionsRenderer.tsx b/server/sonar-web/src/main/js/components/controls/ComponentReportActionsRenderer.tsx index 222c3668d57..e331cd80522 100644 --- a/server/sonar-web/src/main/js/components/controls/ComponentReportActionsRenderer.tsx +++ b/server/sonar-web/src/main/js/components/controls/ComponentReportActionsRenderer.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ButtonSecondary, ChevronDownIcon, @@ -25,8 +26,7 @@ import { ItemDownload, PopupPlacement, PopupZLevel, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { getReportUrl } from '../../api/component-report'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { Branch } from '../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/components/controls/ConfirmButton.tsx b/server/sonar-web/src/main/js/components/controls/ConfirmButton.tsx index 448c817abf8..b364c98bd67 100644 --- a/server/sonar-web/src/main/js/components/controls/ConfirmButton.tsx +++ b/server/sonar-web/src/main/js/components/controls/ConfirmButton.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as Echoes from '@sonarsource/echoes-react'; import * as React from 'react'; import ConfirmModal, { ConfirmModalProps } from './ConfirmModal'; diff --git a/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx b/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx index 8d460a59c89..8df75495320 100644 --- a/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx +++ b/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as Echoes from '@sonarsource/echoes-react'; import { Button, ButtonVariety, ModalAlert } from '@sonarsource/echoes-react'; import React from 'react'; diff --git a/server/sonar-web/src/main/js/components/controls/DocumentClickHandler.tsx b/server/sonar-web/src/main/js/components/controls/DocumentClickHandler.tsx index e00842c69fb..b0b9a2cbdb9 100644 --- a/server/sonar-web/src/main/js/components/controls/DocumentClickHandler.tsx +++ b/server/sonar-web/src/main/js/components/controls/DocumentClickHandler.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; interface Props { diff --git a/server/sonar-web/src/main/js/components/controls/EscKeydownHandler.tsx b/server/sonar-web/src/main/js/components/controls/EscKeydownHandler.tsx index 471efbf78b3..a5a51b4571e 100644 --- a/server/sonar-web/src/main/js/components/controls/EscKeydownHandler.tsx +++ b/server/sonar-web/src/main/js/components/controls/EscKeydownHandler.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { KeyboardKeys } from '../../helpers/keycodes'; diff --git a/server/sonar-web/src/main/js/components/controls/Favorite.tsx b/server/sonar-web/src/main/js/components/controls/Favorite.tsx index c5f7941da77..6564a6714da 100644 --- a/server/sonar-web/src/main/js/components/controls/Favorite.tsx +++ b/server/sonar-web/src/main/js/components/controls/Favorite.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FavoriteButton } from 'design-system'; + import * as React from 'react'; +import { FavoriteButton } from '~design-system'; import { addFavorite, removeFavorite } from '../../api/favorites'; import { translate, translateWithParameters } from '../../helpers/l10n'; import Tooltip from './Tooltip'; diff --git a/server/sonar-web/src/main/js/components/controls/FocusOutHandler.tsx b/server/sonar-web/src/main/js/components/controls/FocusOutHandler.tsx index f1ba687b826..7081867d20e 100644 --- a/server/sonar-web/src/main/js/components/controls/FocusOutHandler.tsx +++ b/server/sonar-web/src/main/js/components/controls/FocusOutHandler.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; interface Props extends React.BaseHTMLAttributes<HTMLDivElement> { diff --git a/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx b/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx index 6bbdd29c686..460402bd51b 100644 --- a/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx +++ b/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button } from '@sonarsource/echoes-react'; -import { DiscreetInteractiveIcon, HomeFillIcon, HomeIcon } from 'design-system'; -import React from 'react'; import { useIntl } from 'react-intl'; +import { DiscreetInteractiveIcon, HomeFillIcon, HomeIcon } from '~design-system'; import { setHomePage } from '../../api/users'; import { CurrentUserContextInterface } from '../../app/components/current-user/CurrentUserContext'; import withCurrentUserContext from '../../app/components/current-user/withCurrentUserContext'; diff --git a/server/sonar-web/src/main/js/components/controls/InputValidationField.tsx b/server/sonar-web/src/main/js/components/controls/InputValidationField.tsx index de41934095f..889436fcedb 100644 --- a/server/sonar-web/src/main/js/components/controls/InputValidationField.tsx +++ b/server/sonar-web/src/main/js/components/controls/InputValidationField.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputField } from 'design-system'; + import * as React from 'react'; +import { InputField } from '~design-system'; import ModalValidationField from './ModalValidationField'; interface Props { diff --git a/server/sonar-web/src/main/js/components/controls/ListFooter.tsx b/server/sonar-web/src/main/js/components/controls/ListFooter.tsx index 92ee6ea37cd..ad59e52af57 100644 --- a/server/sonar-web/src/main/js/components/controls/ListFooter.tsx +++ b/server/sonar-web/src/main/js/components/controls/ListFooter.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Button } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { Spinner } from 'design-system'; import * as React from 'react'; +import { Spinner } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { translate, translateWithParameters } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/controls/ManagedFilter.tsx b/server/sonar-web/src/main/js/components/controls/ManagedFilter.tsx index cea36543a27..99de8ec6025 100644 --- a/server/sonar-web/src/main/js/components/controls/ManagedFilter.tsx +++ b/server/sonar-web/src/main/js/components/controls/ManagedFilter.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ToggleButton } from 'design-system'; -import * as React from 'react'; + +import { ToggleButton } from '~design-system'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { Provider } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/components/controls/ModalButton.tsx b/server/sonar-web/src/main/js/components/controls/ModalButton.tsx index 0a2f9eecea0..d87b638e6ae 100644 --- a/server/sonar-web/src/main/js/components/controls/ModalButton.tsx +++ b/server/sonar-web/src/main/js/components/controls/ModalButton.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as Echoes from '@sonarsource/echoes-react'; import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/components/controls/ModalValidationField.tsx b/server/sonar-web/src/main/js/components/controls/ModalValidationField.tsx index 5ca20e8ce94..753dc4263bb 100644 --- a/server/sonar-web/src/main/js/components/controls/ModalValidationField.tsx +++ b/server/sonar-web/src/main/js/components/controls/ModalValidationField.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { FlagErrorIcon, FlagSuccessIcon, FormField, Note, themeColor } from 'design-system'; import * as React from 'react'; +import { FlagErrorIcon, FlagSuccessIcon, FormField, Note, themeColor } from '~design-system'; import { translate } from '../../helpers/l10n'; interface Props { diff --git a/server/sonar-web/src/main/js/components/controls/OutsideClickHandler.tsx b/server/sonar-web/src/main/js/components/controls/OutsideClickHandler.tsx index 7949fd5352e..df72bfbf4fc 100644 --- a/server/sonar-web/src/main/js/components/controls/OutsideClickHandler.tsx +++ b/server/sonar-web/src/main/js/components/controls/OutsideClickHandler.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { findDOMNode } from 'react-dom'; diff --git a/server/sonar-web/src/main/js/components/controls/ScreenPositionFixer.tsx b/server/sonar-web/src/main/js/components/controls/ScreenPositionFixer.tsx index b0a128c175e..3d401474848 100644 --- a/server/sonar-web/src/main/js/components/controls/ScreenPositionFixer.tsx +++ b/server/sonar-web/src/main/js/components/controls/ScreenPositionFixer.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throttle } from 'lodash'; import * as React from 'react'; import { findDOMNode } from 'react-dom'; diff --git a/server/sonar-web/src/main/js/components/controls/SelectList.tsx b/server/sonar-web/src/main/js/components/controls/SelectList.tsx index 94fe045a27a..c0e6e469433 100644 --- a/server/sonar-web/src/main/js/components/controls/SelectList.tsx +++ b/server/sonar-web/src/main/js/components/controls/SelectList.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputSearch, PageContentFontWrapper, ToggleButton } from 'design-system'; + import * as React from 'react'; +import { InputSearch, PageContentFontWrapper, ToggleButton } from '~design-system'; import { translate } from '../../helpers/l10n'; import ListFooter from './ListFooter'; import SelectListListContainer from './SelectListListContainer'; diff --git a/server/sonar-web/src/main/js/components/controls/SelectListListContainer.tsx b/server/sonar-web/src/main/js/components/controls/SelectListListContainer.tsx index c718565b9d9..1ea73e206d8 100644 --- a/server/sonar-web/src/main/js/components/controls/SelectListListContainer.tsx +++ b/server/sonar-web/src/main/js/components/controls/SelectListListContainer.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { Checkbox, ListItem, UnorderedList, themeBorder } from 'design-system'; import * as React from 'react'; +import { Checkbox, ListItem, UnorderedList, themeBorder } from '~design-system'; import { translate } from '../../helpers/l10n'; import { SelectListFilter } from './SelectList'; import SelectListListElement from './SelectListListElement'; diff --git a/server/sonar-web/src/main/js/components/controls/SelectListListElement.tsx b/server/sonar-web/src/main/js/components/controls/SelectListListElement.tsx index f68a6ee66fb..59dfe201feb 100644 --- a/server/sonar-web/src/main/js/components/controls/SelectListListElement.tsx +++ b/server/sonar-web/src/main/js/components/controls/SelectListListElement.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Checkbox, ListItem } from 'design-system'; + import * as React from 'react'; +import { Checkbox, ListItem } from '~design-system'; interface Props { disabled?: boolean; diff --git a/server/sonar-web/src/main/js/components/controls/Tooltip.tsx b/server/sonar-web/src/main/js/components/controls/Tooltip.tsx index 3bb6d08fa3f..472d3e9af39 100644 --- a/server/sonar-web/src/main/js/components/controls/Tooltip.tsx +++ b/server/sonar-web/src/main/js/components/controls/Tooltip.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; import { throttle, uniqueId } from 'lodash'; import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/components/controls/UpDownKeyboardHandler.tsx b/server/sonar-web/src/main/js/components/controls/UpDownKeyboardHandler.tsx index 85e935c21bb..b833c14c39e 100644 --- a/server/sonar-web/src/main/js/components/controls/UpDownKeyboardHandler.tsx +++ b/server/sonar-web/src/main/js/components/controls/UpDownKeyboardHandler.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { isShortcut, isTextarea } from '../../helpers/keyboardEventHelpers'; import { KeyboardKeys } from '../../helpers/keycodes'; diff --git a/server/sonar-web/src/main/js/components/controls/ValidationForm.tsx b/server/sonar-web/src/main/js/components/controls/ValidationForm.tsx index 7adc3a3d8a5..219bace86bc 100644 --- a/server/sonar-web/src/main/js/components/controls/ValidationForm.tsx +++ b/server/sonar-web/src/main/js/components/controls/ValidationForm.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Formik, FormikHelpers, FormikProps, FormikValues } from 'formik'; import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/components/controls/ValidationModal.tsx b/server/sonar-web/src/main/js/components/controls/ValidationModal.tsx index 9f12993c289..6570cf46729 100644 --- a/server/sonar-web/src/main/js/components/controls/ValidationModal.tsx +++ b/server/sonar-web/src/main/js/components/controls/ValidationModal.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { Modal } from 'design-system'; import { FormikValues } from 'formik'; import * as React from 'react'; +import { Modal } from '~design-system'; import { translate } from '../../helpers/l10n'; import ValidationForm, { ChildrenProps } from './ValidationForm'; diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/ComponentReportActions-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ComponentReportActions-test.tsx index 8fc443d6fb9..90e2a375dd1 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/ComponentReportActions-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ComponentReportActions-test.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { addGlobalSuccessMessage } from 'design-system'; -import * as React from 'react'; +import { addGlobalSuccessMessage } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { getReportStatus, @@ -34,8 +34,8 @@ import { mockAppState, mockCurrentUser, mockLoggedInUser } from '../../../helper import { renderApp } from '../../../helpers/testReactTestingUtils'; import { ComponentReportActions } from '../ComponentReportActions'; -jest.mock('design-system', () => ({ - ...jest.requireActual('design-system'), +jest.mock('~design-system', () => ({ + ...jest.requireActual('~design-system'), addGlobalSuccessMessage: jest.fn(), })); diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/Favorite-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/Favorite-test.tsx index 5d3751a418c..4a9146f2454 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/Favorite-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/Favorite-test.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; +import { setImmediate } from 'timers'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { addFavorite, removeFavorite } from '../../../api/favorites'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/HomePageSelect-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/HomePageSelect-test.tsx index e3ef11db92c..e184dbef93e 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/HomePageSelect-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/HomePageSelect-test.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; +import { setImmediate } from 'timers'; import { setHomePage } from '../../../api/users'; import { mockLoggedInUser } from '../../../helpers/testMocks'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/ListFooter-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ListFooter-test.tsx index fe03b68b10b..26d426ffddb 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/ListFooter-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ListFooter-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import ListFooter, { ListFooterProps } from '../ListFooter'; diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/SelectList-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/SelectList-test.tsx index 4d8d0ee3d72..178a17959db 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/SelectList-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/SelectList-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import SelectList, { SelectListFilter } from '../SelectList'; diff --git a/server/sonar-web/src/main/js/components/devops-platform/AlmSettingsInstanceSelector.tsx b/server/sonar-web/src/main/js/components/devops-platform/AlmSettingsInstanceSelector.tsx index 040d7ad7095..dd4e9013639 100644 --- a/server/sonar-web/src/main/js/components/devops-platform/AlmSettingsInstanceSelector.tsx +++ b/server/sonar-web/src/main/js/components/devops-platform/AlmSettingsInstanceSelector.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputSelect, LabelValueSelectOption, Note } from 'design-system'; -import * as React from 'react'; + import { OptionProps, SingleValueProps, components } from 'react-select'; +import { InputSelect, LabelValueSelectOption, Note } from '~design-system'; import { translate } from '../../helpers/l10n'; import { AlmInstanceBase } from '../../types/alm-settings'; diff --git a/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopupHelper.tsx b/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopupHelper.tsx index cd4afdd4a4b..f2562e8ed81 100644 --- a/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopupHelper.tsx +++ b/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopupHelper.tsx @@ -25,7 +25,6 @@ import { DropdownMenuAlign, IconQuestionMark, } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { translate } from '../../helpers/l10n'; import { EmbedDocsPopup } from './EmbedDocsPopup'; diff --git a/server/sonar-web/src/main/js/components/facets/Facet.tsx b/server/sonar-web/src/main/js/components/facets/Facet.tsx index 70e47a6a07c..c4b03fd76e8 100644 --- a/server/sonar-web/src/main/js/components/facets/Facet.tsx +++ b/server/sonar-web/src/main/js/components/facets/Facet.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { FacetBox, FacetItem } from 'design-system'; import { orderBy, sortBy, without } from 'lodash'; import * as React from 'react'; +import { FacetBox, FacetItem } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { FacetKey } from '../../apps/coding-rules/query'; diff --git a/server/sonar-web/src/main/js/components/facets/SeverityFacet.tsx b/server/sonar-web/src/main/js/components/facets/SeverityFacet.tsx index 3f7cae9eca6..1ec8d6223e3 100644 --- a/server/sonar-web/src/main/js/components/facets/SeverityFacet.tsx +++ b/server/sonar-web/src/main/js/components/facets/SeverityFacet.tsx @@ -19,9 +19,9 @@ */ import { Popover } from '@sonarsource/echoes-react'; -import { BareButton, HelperHintIcon } from 'design-system'; import * as React from 'react'; import { useIntl } from 'react-intl'; +import { BareButton, HelperHintIcon } from '~design-system'; import { IMPACT_SEVERITIES } from '../../helpers/constants'; import { DocLink } from '../../helpers/doc-links'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/hoc/__tests__/withIndexationGuard-test.tsx b/server/sonar-web/src/main/js/components/hoc/__tests__/withIndexationGuard-test.tsx index 64ec85edeb0..34fefeb8ff3 100644 --- a/server/sonar-web/src/main/js/components/hoc/__tests__/withIndexationGuard-test.tsx +++ b/server/sonar-web/src/main/js/components/hoc/__tests__/withIndexationGuard-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; -import * as React from 'react'; import { IndexationContext } from '../../../app/components/indexation/IndexationContext'; import withIndexationGuard from '../withIndexationGuard'; diff --git a/server/sonar-web/src/main/js/components/hoc/whenLoggedIn.tsx b/server/sonar-web/src/main/js/components/hoc/whenLoggedIn.tsx index 3065ca26ae7..f17cddd2d18 100644 --- a/server/sonar-web/src/main/js/components/hoc/whenLoggedIn.tsx +++ b/server/sonar-web/src/main/js/components/hoc/whenLoggedIn.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; import withCurrentUserContext from '../../app/components/current-user/withCurrentUserContext'; diff --git a/server/sonar-web/src/main/js/components/hoc/withCLanguageFeature.tsx b/server/sonar-web/src/main/js/components/hoc/withCLanguageFeature.tsx index 135a77637bb..8a71491526f 100644 --- a/server/sonar-web/src/main/js/components/hoc/withCLanguageFeature.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withCLanguageFeature.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; import { LanguagesContext } from '../../app/components/languages/LanguagesContext'; diff --git a/server/sonar-web/src/main/js/components/hoc/withIndexationContext.tsx b/server/sonar-web/src/main/js/components/hoc/withIndexationContext.tsx index add93b45545..fd1e05c9756 100644 --- a/server/sonar-web/src/main/js/components/hoc/withIndexationContext.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withIndexationContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; import { IndexationContext } from '../../app/components/indexation/IndexationContext'; diff --git a/server/sonar-web/src/main/js/components/hoc/withIndexationGuard.tsx b/server/sonar-web/src/main/js/components/hoc/withIndexationGuard.tsx index 0c8f89cdef8..c170b2f76e0 100644 --- a/server/sonar-web/src/main/js/components/hoc/withIndexationGuard.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withIndexationGuard.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import PageUnavailableDueToIndexation from '../../app/components/indexation/PageUnavailableDueToIndexation'; diff --git a/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx b/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx index 867e79c0dad..eab7ab09de8 100644 --- a/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; import { getComponentMeasureUniqueKey } from '../../helpers/component'; diff --git a/server/sonar-web/src/main/js/components/hoc/withLocation.tsx b/server/sonar-web/src/main/js/components/hoc/withLocation.tsx index a1ef0fe8d38..98b43324e3e 100644 --- a/server/sonar-web/src/main/js/components/hoc/withLocation.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withLocation.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { Location, useLocation } from 'react-router-dom'; diff --git a/server/sonar-web/src/main/js/components/hoc/withScrollTo.tsx b/server/sonar-web/src/main/js/components/hoc/withScrollTo.tsx index 73723ef90db..e200e339003 100644 --- a/server/sonar-web/src/main/js/components/hoc/withScrollTo.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withScrollTo.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { findDOMNode } from 'react-dom'; import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils'; diff --git a/server/sonar-web/src/main/js/components/icon-mappers/BranchLikeIcon.tsx b/server/sonar-web/src/main/js/components/icon-mappers/BranchLikeIcon.tsx index ba2e719fc8d..88f699a1e46 100644 --- a/server/sonar-web/src/main/js/components/icon-mappers/BranchLikeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icon-mappers/BranchLikeIcon.tsx @@ -19,8 +19,7 @@ */ import { IconBranch, IconGitBranch, IconProps, IconPullrequest } from '@sonarsource/echoes-react'; -import { StyledMutedText } from 'design-system'; -import * as React from 'react'; +import { StyledMutedText } from '~design-system'; import { isMainBranch, isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { BranchLike } from '../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/components/icon-mappers/IssueSeverityIcon.tsx b/server/sonar-web/src/main/js/components/icon-mappers/IssueSeverityIcon.tsx index 2494535a558..14c23b5a793 100644 --- a/server/sonar-web/src/main/js/components/icon-mappers/IssueSeverityIcon.tsx +++ b/server/sonar-web/src/main/js/components/icon-mappers/IssueSeverityIcon.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import React from 'react'; import { IconProps, SeverityBlockerIcon, @@ -24,8 +26,7 @@ import { SeverityInfoIcon, SeverityMajorIcon, SeverityMinorIcon, -} from 'design-system'; -import React from 'react'; +} from '~design-system'; import { IssueSeverity } from '../../types/issues'; import { Dict } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/components/icon-mappers/IssueStatusIcon.tsx b/server/sonar-web/src/main/js/components/icon-mappers/IssueStatusIcon.tsx index 1bcdf1b3f67..ace0e4df0de 100644 --- a/server/sonar-web/src/main/js/components/icon-mappers/IssueStatusIcon.tsx +++ b/server/sonar-web/src/main/js/components/icon-mappers/IssueStatusIcon.tsx @@ -17,14 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { IconProps, StatusConfirmedIcon, StatusOpenIcon, StatusReopenedIcon, StatusResolvedIcon, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { IssueStatus } from '../../types/issues'; import { Dict } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/components/icon-mappers/IssueTypeIcon.tsx b/server/sonar-web/src/main/js/components/icon-mappers/IssueTypeIcon.tsx index 28762ca30f5..55d97562711 100644 --- a/server/sonar-web/src/main/js/components/icon-mappers/IssueTypeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icon-mappers/IssueTypeIcon.tsx @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { BugIcon, CodeSmellIcon, IconProps, SecurityHotspotIcon, VulnerabilityIcon, -} from 'design-system'; -import React from 'react'; +} from '~design-system'; import { IssueType } from '../../types/issues'; export interface Props extends IconProps { diff --git a/server/sonar-web/src/main/js/components/icon-mappers/SeverityIcon.tsx b/server/sonar-web/src/main/js/components/icon-mappers/SeverityIcon.tsx index 8fd49b16a26..0dccb20ae3a 100644 --- a/server/sonar-web/src/main/js/components/icon-mappers/SeverityIcon.tsx +++ b/server/sonar-web/src/main/js/components/icon-mappers/SeverityIcon.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { IconProps, SeverityBlockerIcon, @@ -24,8 +26,7 @@ import { SeverityInfoIcon, SeverityMajorIcon, SeverityMinorIcon, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate } from '../../helpers/l10n'; import { isDefined } from '../../helpers/types'; import { Dict } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/components/icon-mappers/SoftwareImpactSeverityIcon.tsx b/server/sonar-web/src/main/js/components/icon-mappers/SoftwareImpactSeverityIcon.tsx index 9f3ce0ca77b..5b337c39542 100644 --- a/server/sonar-web/src/main/js/components/icon-mappers/SoftwareImpactSeverityIcon.tsx +++ b/server/sonar-web/src/main/js/components/icon-mappers/SoftwareImpactSeverityIcon.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { IconProps, SoftwareImpactSeverityBlockerIcon, @@ -24,8 +26,7 @@ import { SoftwareImpactSeverityInfoIcon, SoftwareImpactSeverityLowIcon, SoftwareImpactSeverityMediumIcon, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate } from '../../helpers/l10n'; import { useStandardExperienceMode } from '../../queries/settings'; import { SoftwareImpactSeverity } from '../../types/clean-code-taxonomy'; diff --git a/server/sonar-web/src/main/js/components/icon-mappers/__tests__/BranchLikeIcon-test.tsx b/server/sonar-web/src/main/js/components/icon-mappers/__tests__/BranchLikeIcon-test.tsx index ca0f9e94792..f7350f550e3 100644 --- a/server/sonar-web/src/main/js/components/icon-mappers/__tests__/BranchLikeIcon-test.tsx +++ b/server/sonar-web/src/main/js/components/icon-mappers/__tests__/BranchLikeIcon-test.tsx @@ -19,7 +19,6 @@ */ import { render, screen } from '@testing-library/react'; -import * as React from 'react'; import { mockBranch, mockMainBranch, mockPullRequest } from '../../../helpers/mocks/branch-like'; import BranchLikeIcon, { BranchLikeIconProps } from '../../icon-mappers/BranchLikeIcon'; diff --git a/server/sonar-web/src/main/js/components/intl/DateFormatter.tsx b/server/sonar-web/src/main/js/components/intl/DateFormatter.tsx index 32f219681eb..22286f71ccb 100644 --- a/server/sonar-web/src/main/js/components/intl/DateFormatter.tsx +++ b/server/sonar-web/src/main/js/components/intl/DateFormatter.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { FormatDateOptions, FormattedDate } from 'react-intl'; import { parseDate } from '../../helpers/dates'; diff --git a/server/sonar-web/src/main/js/components/intl/DateFromNow.tsx b/server/sonar-web/src/main/js/components/intl/DateFromNow.tsx index 0ce35a9d808..4cb3fb23123 100644 --- a/server/sonar-web/src/main/js/components/intl/DateFromNow.tsx +++ b/server/sonar-web/src/main/js/components/intl/DateFromNow.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { differenceInHours } from 'date-fns'; import * as React from 'react'; import { FormattedRelativeTime } from 'react-intl'; diff --git a/server/sonar-web/src/main/js/components/intl/DateTimeFormatter.tsx b/server/sonar-web/src/main/js/components/intl/DateTimeFormatter.tsx index f9e2bf91606..5cf5b770911 100644 --- a/server/sonar-web/src/main/js/components/intl/DateTimeFormatter.tsx +++ b/server/sonar-web/src/main/js/components/intl/DateTimeFormatter.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { FormatDateOptions, FormattedDate } from 'react-intl'; import { parseDate } from '../../helpers/dates'; diff --git a/server/sonar-web/src/main/js/components/intl/TimeFormatter.tsx b/server/sonar-web/src/main/js/components/intl/TimeFormatter.tsx index 31819ceed66..83de9dbf257 100644 --- a/server/sonar-web/src/main/js/components/intl/TimeFormatter.tsx +++ b/server/sonar-web/src/main/js/components/intl/TimeFormatter.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { FormatDateOptions, FormattedTime } from 'react-intl'; import { parseDate } from '../../helpers/dates'; diff --git a/server/sonar-web/src/main/js/components/intl/__mocks__/DateFromNow.tsx b/server/sonar-web/src/main/js/components/intl/__mocks__/DateFromNow.tsx index 78587050671..5e3640363f7 100644 --- a/server/sonar-web/src/main/js/components/intl/__mocks__/DateFromNow.tsx +++ b/server/sonar-web/src/main/js/components/intl/__mocks__/DateFromNow.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { ParsableDate } from '../../../types/dates'; diff --git a/server/sonar-web/src/main/js/components/intl/__tests__/DateFormatter-test.tsx b/server/sonar-web/src/main/js/components/intl/__tests__/DateFormatter-test.tsx index d90dae0919b..ba14f5a1f82 100644 --- a/server/sonar-web/src/main/js/components/intl/__tests__/DateFormatter-test.tsx +++ b/server/sonar-web/src/main/js/components/intl/__tests__/DateFormatter-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import * as React from 'react'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/components/intl/__tests__/DateFromNow-test.tsx b/server/sonar-web/src/main/js/components/intl/__tests__/DateFromNow-test.tsx index 27b71680df6..4133bd00f09 100644 --- a/server/sonar-web/src/main/js/components/intl/__tests__/DateFromNow-test.tsx +++ b/server/sonar-web/src/main/js/components/intl/__tests__/DateFromNow-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import DateFromNow, { DateFromNowProps } from '../DateFromNow'; diff --git a/server/sonar-web/src/main/js/components/intl/__tests__/DateTimeFormatter-test.tsx b/server/sonar-web/src/main/js/components/intl/__tests__/DateTimeFormatter-test.tsx index a5e50a95096..dd4c4c04aca 100644 --- a/server/sonar-web/src/main/js/components/intl/__tests__/DateTimeFormatter-test.tsx +++ b/server/sonar-web/src/main/js/components/intl/__tests__/DateTimeFormatter-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import * as React from 'react'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/components/intl/__tests__/TimeFormatter-test.tsx b/server/sonar-web/src/main/js/components/intl/__tests__/TimeFormatter-test.tsx index 53b85c49728..fe81e754ae1 100644 --- a/server/sonar-web/src/main/js/components/intl/__tests__/TimeFormatter-test.tsx +++ b/server/sonar-web/src/main/js/components/intl/__tests__/TimeFormatter-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import * as React from 'react'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/components/intl/__tests__/dateUtils-test.ts b/server/sonar-web/src/main/js/components/intl/__tests__/dateUtils-test.ts index 00b68064415..5d7e250e6f6 100644 --- a/server/sonar-web/src/main/js/components/intl/__tests__/dateUtils-test.ts +++ b/server/sonar-web/src/main/js/components/intl/__tests__/dateUtils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getRelativeTimeProps } from '../dateUtils'; const mockDateNow = jest.spyOn(Date, 'now'); diff --git a/server/sonar-web/src/main/js/components/intl/dateUtils.ts b/server/sonar-web/src/main/js/components/intl/dateUtils.ts index 872e37aa07c..aac31d5bad5 100644 --- a/server/sonar-web/src/main/js/components/intl/dateUtils.ts +++ b/server/sonar-web/src/main/js/components/intl/dateUtils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { differenceInDays, differenceInMonths, diff --git a/server/sonar-web/src/main/js/components/issue/Issue.tsx b/server/sonar-web/src/main/js/components/issue/Issue.tsx index 5a9d5807fbf..33ab12234e3 100644 --- a/server/sonar-web/src/main/js/components/issue/Issue.tsx +++ b/server/sonar-web/src/main/js/components/issue/Issue.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { flow } from 'lodash'; import * as React from 'react'; import { useCallback } from 'react'; diff --git a/server/sonar-web/src/main/js/components/issue/__tests__/Issue-it.tsx b/server/sonar-web/src/main/js/components/issue/__tests__/Issue-it.tsx index 4093fd2b572..8269688ec26 100644 --- a/server/sonar-web/src/main/js/components/issue/__tests__/Issue-it.tsx +++ b/server/sonar-web/src/main/js/components/issue/__tests__/Issue-it.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { omit, pick } from 'lodash'; diff --git a/server/sonar-web/src/main/js/components/issue/__tests__/actions-test.ts b/server/sonar-web/src/main/js/components/issue/__tests__/actions-test.ts index ce9caa0e67b..45fea41b231 100644 --- a/server/sonar-web/src/main/js/components/issue/__tests__/actions-test.ts +++ b/server/sonar-web/src/main/js/components/issue/__tests__/actions-test.ts @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { setImmediate } from 'timers'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { parseIssueFromResponse } from '../../../helpers/issues'; import { mockComponent } from '../../../helpers/mocks/component'; diff --git a/server/sonar-web/src/main/js/components/issue/actions.ts b/server/sonar-web/src/main/js/components/issue/actions.ts index 4a92b7e4f14..2845ab40fca 100644 --- a/server/sonar-web/src/main/js/components/issue/actions.ts +++ b/server/sonar-web/src/main/js/components/issue/actions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throwGlobalError } from '~sonar-aligned/helpers/error'; import { parseIssueFromResponse } from '../../helpers/issues'; import { IssueResponse } from '../../types/issues'; diff --git a/server/sonar-web/src/main/js/components/issue/components/DeprecatedFieldTooltip.tsx b/server/sonar-web/src/main/js/components/issue/components/DeprecatedFieldTooltip.tsx index f8d1933f182..6484133da9a 100644 --- a/server/sonar-web/src/main/js/components/issue/components/DeprecatedFieldTooltip.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/DeprecatedFieldTooltip.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { translate } from '../../../helpers/l10n'; export interface DeprecatedTooltipProps { diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx index 9377e2076b1..d28648a19f0 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HighlightRing } from 'design-system'; -import * as React from 'react'; + +import { HighlightRing } from '~design-system'; import { IssueActions } from '../../../types/issues'; import { Issue } from '../../../types/types'; import IssueAssign from './IssueAssign'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx index 25b64de6e52..3f7b03a91e6 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LabelValueSelectOption, PopupZLevel, SearchSelectDropdown } from 'design-system'; + import * as React from 'react'; import { Options, SingleValue } from 'react-select'; +import { LabelValueSelectOption, PopupZLevel, SearchSelectDropdown } from '~design-system'; import { getUsers } from '../../../api/users'; import { CurrentUserContext } from '../../../app/components/current-user/CurrentUserContext'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueChangelogDiff.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueChangelogDiff.tsx index 379cb4e4c81..d4af6b8303b 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueChangelogDiff.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueChangelogDiff.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { IssueChangelogDiff as TypeIssueChangelogDiff } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx index f01da238768..51b3b682d3a 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { IssueMessageHighlighting, StandoutLink } from 'design-system'; + import * as React from 'react'; +import { IssueMessageHighlighting, StandoutLink } from '~design-system'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { getComponentIssuesUrl } from '~sonar-aligned/helpers/urls'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueMetaBar.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueMetaBar.tsx index 553a209ebb8..a56759bedc5 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueMetaBar.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueMetaBar.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; -import { Badge, CommentIcon, SeparatorCircleIcon } from 'design-system'; import * as React from 'react'; +import { Badge, CommentIcon, SeparatorCircleIcon } from '~design-system'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { isDefined } from '../../../helpers/types'; import { Issue } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssuePrioritized.tsx b/server/sonar-web/src/main/js/components/issue/components/IssuePrioritized.tsx index 56ac778de7f..b9e8221b623 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssuePrioritized.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssuePrioritized.tsx @@ -19,8 +19,7 @@ */ import { Tooltip } from '@sonarsource/echoes-react'; -import { TextSubdued } from 'design-system'; -import * as React from 'react'; +import { TextSubdued } from '~design-system'; import { translate } from '../../../helpers/l10n'; export default function IssuePrioritized() { diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueSeverity.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueSeverity.tsx index 57fd9b6bb70..e5eb59c552a 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueSeverity.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueSeverity.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { IconProps, TextSubdued } from 'design-system'; -import * as React from 'react'; +import { IconProps, TextSubdued } from '~design-system'; import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip'; import { DocLink } from '../../../helpers/doc-links'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx index f3fa3136df0..cf677b0953a 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { PopupPlacement, Tags } from 'design-system'; + import * as React from 'react'; +import { PopupPlacement, Tags } from '~design-system'; import { setIssueTags } from '../../../api/issues'; import withComponentContext from '../../../app/components/componentContext/withComponentContext'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx index 46215799b4e..e9487f8a9ce 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import { useStandardExperienceMode } from '../../../queries/settings'; import { BranchLike } from '../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx index efef44b214e..b839b72ce70 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx @@ -17,7 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; +import * as React from 'react'; import { Dropdown, DropdownMenuWrapper, @@ -25,8 +27,7 @@ import { PopupPlacement, PopupZLevel, SearchSelectDropdownControl, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { addIssueComment, setIssueTransition } from '../../../api/issues'; import { SESSION_STORAGE_TRANSITION_GUIDE_KEY } from '../../../apps/issues/components/IssueNewStatusAndTransitionGuide'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTransitionItem.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTransitionItem.tsx index 7fadcb6fa4f..bd08b87178d 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTransitionItem.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTransitionItem.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IconQuestionMark } from '@sonarsource/echoes-react'; -import { ItemButton, PageContentFontWrapper, TextBold, TextMuted } from 'design-system'; import * as React from 'react'; import { useIntl } from 'react-intl'; +import { ItemButton, PageContentFontWrapper, TextBold, TextMuted } from '~design-system'; import { translate } from '../../../helpers/l10n'; import HelpTooltip from '../../../sonar-aligned/components/controls/HelpTooltip'; import { IssueTransition } from '../../../types/issues'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTransitionOverlay.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTransitionOverlay.tsx index efbceff8d45..bb2d212cfe3 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTransitionOverlay.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTransitionOverlay.tsx @@ -17,6 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { useState } from 'react'; +import { useIntl } from 'react-intl'; import { ButtonPrimary, ButtonSecondary, @@ -25,10 +28,7 @@ import { ItemDivider, PageContentFontWrapper, Spinner, -} from 'design-system'; -import * as React from 'react'; -import { useState } from 'react'; -import { useIntl } from 'react-intl'; +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { IssueActions, IssueTransition } from '../../../types/issues'; import { Issue } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueType.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueType.tsx index 83bb80f2b32..e20acdd9991 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueType.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueType.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { IconProps, TextSubdued } from 'design-system'; -import * as React from 'react'; +import { IconProps, TextSubdued } from '~design-system'; import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip'; import { DocLink } from '../../../helpers/doc-links'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueView.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueView.tsx index 917cf5e641d..7331ad86e4b 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueView.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueView.tsx @@ -21,8 +21,8 @@ import styled from '@emotion/styled'; import { Checkbox } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { BasicSeparator, themeBorder } from 'design-system'; import * as React from 'react'; +import { BasicSeparator, themeBorder } from '~design-system'; import { deleteIssueComment, editIssueComment } from '../../../api/issues'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/components/issue/components/SonarLintBadge.tsx b/server/sonar-web/src/main/js/components/issue/components/SonarLintBadge.tsx index a2e552b0ea1..c67ce5ddd1f 100644 --- a/server/sonar-web/src/main/js/components/issue/components/SonarLintBadge.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/SonarLintBadge.tsx @@ -19,7 +19,6 @@ */ import { LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from '../../../helpers/l10n'; import Link from '../../common/Link'; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelogDiff-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelogDiff-test.tsx index 345c7e10aef..28710fab0d0 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelogDiff-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelogDiff-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { mockIssueChangelogDiff } from '../../../../helpers/mocks/issues'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import IssueChangelogDiff, { IssueChangelogDiffProps } from '../IssueChangelogDiff'; diff --git a/server/sonar-web/src/main/js/components/issue/helpers.ts b/server/sonar-web/src/main/js/components/issue/helpers.ts index ff521134cc8..a8bd5cec665 100644 --- a/server/sonar-web/src/main/js/components/issue/helpers.ts +++ b/server/sonar-web/src/main/js/components/issue/helpers.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IssueTransition } from '../../types/issues'; export function isTransitionDeprecated(transition: IssueTransition) { diff --git a/server/sonar-web/src/main/js/components/issue/popups/IssueTagsPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/IssueTagsPopup.tsx index 0e91805feb2..ba29278d1e7 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/IssueTagsPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/IssueTagsPopup.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { MultiSelector } from 'design-system'; + import { difference, noop, without } from 'lodash'; import * as React from 'react'; +import { MultiSelector } from '~design-system'; import { searchIssueTags } from '../../../api/issues'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/locations/SingleFileLocationNavigator.tsx b/server/sonar-web/src/main/js/components/locations/SingleFileLocationNavigator.tsx index ae799a3e19f..c1f70579984 100644 --- a/server/sonar-web/src/main/js/components/locations/SingleFileLocationNavigator.tsx +++ b/server/sonar-web/src/main/js/components/locations/SingleFileLocationNavigator.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; -import { IssueMessageHighlighting, LocationMarker, StyledMarker, themeColor } from 'design-system'; import * as React from 'react'; +import { IssueMessageHighlighting, LocationMarker, StyledMarker, themeColor } from '~design-system'; import { translateWithParameters } from '../../helpers/l10n'; import { MessageFormatting } from '../../types/issues'; import LocationMessage from '../common/LocationMessage'; diff --git a/server/sonar-web/src/main/js/components/logos/SonarLintLogo.tsx b/server/sonar-web/src/main/js/components/logos/SonarLintLogo.tsx index 460ca3b7fd8..b50a0b02dd7 100644 --- a/server/sonar-web/src/main/js/components/logos/SonarLintLogo.tsx +++ b/server/sonar-web/src/main/js/components/logos/SonarLintLogo.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { uniqueId } from 'lodash'; import * as React from 'react'; import { isDefined } from '../../helpers/types'; diff --git a/server/sonar-web/src/main/js/components/measure/MeasureIndicator.tsx b/server/sonar-web/src/main/js/components/measure/MeasureIndicator.tsx index 0754a3d529a..3b92e916fe3 100644 --- a/server/sonar-web/src/main/js/components/measure/MeasureIndicator.tsx +++ b/server/sonar-web/src/main/js/components/measure/MeasureIndicator.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CoverageIndicator, DuplicationsIndicator } from 'design-system'; -import * as React from 'react'; + +import { CoverageIndicator, DuplicationsIndicator } from '~design-system'; import Measure from '~sonar-aligned/components/measure/Measure'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { BranchLike } from '../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/components/measure/RatingTooltipContent.tsx b/server/sonar-web/src/main/js/components/measure/RatingTooltipContent.tsx index 693c9dddc8d..9d6d8c39d49 100644 --- a/server/sonar-web/src/main/js/components/measure/RatingTooltipContent.tsx +++ b/server/sonar-web/src/main/js/components/measure/RatingTooltipContent.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import withAppStateContext from '../../app/components/app-state/withAppStateContext'; diff --git a/server/sonar-web/src/main/js/components/measure/__tests__/MeasureIndicator-test.tsx b/server/sonar-web/src/main/js/components/measure/__tests__/MeasureIndicator-test.tsx index 8cc7f9e5e22..6116d16c949 100644 --- a/server/sonar-web/src/main/js/components/measure/__tests__/MeasureIndicator-test.tsx +++ b/server/sonar-web/src/main/js/components/measure/__tests__/MeasureIndicator-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '@testing-library/react'; -import * as React from 'react'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { Status } from '../../../apps/overview/utils'; import MeasureIndicator from '../MeasureIndicator'; diff --git a/server/sonar-web/src/main/js/components/measure/__tests__/utils-test.tsx b/server/sonar-web/src/main/js/components/measure/__tests__/utils-test.tsx index 917ba43c3a8..8555f2037f0 100644 --- a/server/sonar-web/src/main/js/components/measure/__tests__/utils-test.tsx +++ b/server/sonar-web/src/main/js/components/measure/__tests__/utils-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { duplicationRatingConverter } from '../utils'; describe('duplicationRatingConverter', () => { diff --git a/server/sonar-web/src/main/js/components/measure/utils.ts b/server/sonar-web/src/main/js/components/measure/utils.ts index f37449d3e98..2cac1271245 100644 --- a/server/sonar-web/src/main/js/components/measure/utils.ts +++ b/server/sonar-web/src/main/js/components/measure/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey } from '../../sonar-aligned/types/metrics'; import { Dict, Measure, MeasureEnhanced, MeasureIntern, Metric } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/components/new-code-definition/BranchNCDAutoUpdateMessage.tsx b/server/sonar-web/src/main/js/components/new-code-definition/BranchNCDAutoUpdateMessage.tsx index f77f9224414..d69ef516c07 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/BranchNCDAutoUpdateMessage.tsx +++ b/server/sonar-web/src/main/js/components/new-code-definition/BranchNCDAutoUpdateMessage.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DismissableFlagMessage, Link } from 'design-system'; -import React, { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { DismissableFlagMessage, Link } from '~design-system'; import { MessageTypes, checkMessageDismissed, setMessageDismissed } from '../../api/messages'; import { DocLink } from '../../helpers/doc-links'; import { useDocUrl } from '../../helpers/docs'; diff --git a/server/sonar-web/src/main/js/components/new-code-definition/GlobalNewCodeDefinitionDescription.tsx b/server/sonar-web/src/main/js/components/new-code-definition/GlobalNewCodeDefinitionDescription.tsx index fcf2ab84676..9a494a0613d 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/GlobalNewCodeDefinitionDescription.tsx +++ b/server/sonar-web/src/main/js/components/new-code-definition/GlobalNewCodeDefinitionDescription.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TextSubdued } from 'design-system'; -import * as React from 'react'; +import { TextSubdued } from '~design-system'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { NewCodeDefinition, NewCodeDefinitionType } from '../../types/new-code-definition'; diff --git a/server/sonar-web/src/main/js/components/new-code-definition/NCDAutoUpdateMessage.tsx b/server/sonar-web/src/main/js/components/new-code-definition/NCDAutoUpdateMessage.tsx index 1fefe601252..a86eb5d6b93 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/NCDAutoUpdateMessage.tsx +++ b/server/sonar-web/src/main/js/components/new-code-definition/NCDAutoUpdateMessage.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Banner, Link } from 'design-system'; -import React, { useCallback, useEffect, useMemo, useState } from 'react'; + +import { useCallback, useEffect, useMemo, useState } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { Banner, Link } from '~design-system'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { MessageTypes, checkMessageDismissed, setMessageDismissed } from '../../api/messages'; import { CurrentUserContextInterface } from '../../app/components/current-user/CurrentUserContext'; diff --git a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionAnalysisWarning.tsx b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionAnalysisWarning.tsx index 855eccd3754..82ad023bee1 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionAnalysisWarning.tsx +++ b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionAnalysisWarning.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, Link } from 'design-system'; -import * as React from 'react'; +import { FlagMessage, Link } from '~design-system'; import { DocLink } from '../../helpers/doc-links'; import { useDocUrl } from '../../helpers/docs'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx index 4a4629cc763..85b78f02688 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx +++ b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx @@ -18,17 +18,16 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { noop } from 'lodash'; +import { useCallback, useEffect, useMemo, useState } from 'react'; +import { FormattedMessage } from 'react-intl'; import { DismissableFlagMessage, FlagErrorIcon, InputField, Note, SelectionCard, -} from 'design-system'; -import { noop } from 'lodash'; -import * as React from 'react'; -import { useCallback, useEffect, useMemo, useState } from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { MessageTypes, checkMessageDismissed, setMessageDismissed } from '../../api/messages'; import { DocLink } from '../../helpers/doc-links'; import { translate, translateWithParameters } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionPreviousVersionOption.tsx b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionPreviousVersionOption.tsx index 5e877851503..d5b794fbe53 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionPreviousVersionOption.tsx +++ b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionPreviousVersionOption.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { SelectionCard } from 'design-system'; -import * as React from 'react'; + +import { SelectionCard } from '~design-system'; import { translate } from '../../helpers/l10n'; import { NewCodeDefinitionType } from '../../types/new-code-definition'; diff --git a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx index ee0c157055e..35e1d24eb62 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx +++ b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { FlagMessage, PageContentFontWrapper, RadioButton, SelectionCard } from 'design-system'; import { noop } from 'lodash'; import * as React from 'react'; +import { FlagMessage, PageContentFontWrapper, RadioButton, SelectionCard } from '~design-system'; import { getNewCodeDefinition } from '../../api/newCodeDefinition'; import { translate } from '../../helpers/l10n'; import { diff --git a/server/sonar-web/src/main/js/components/new-code-definition/__tests__/NCDAutoUpdateMessage-test.tsx b/server/sonar-web/src/main/js/components/new-code-definition/__tests__/NCDAutoUpdateMessage-test.tsx index 5e74c7d1473..75326e0af95 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/__tests__/NCDAutoUpdateMessage-test.tsx +++ b/server/sonar-web/src/main/js/components/new-code-definition/__tests__/NCDAutoUpdateMessage-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React from 'react'; import { Route } from 'react-router-dom'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { MessageTypes } from '../../../api/messages'; diff --git a/server/sonar-web/src/main/js/components/new-code-definition/utils.ts b/server/sonar-web/src/main/js/components/new-code-definition/utils.ts index b9eaae2bed0..9c691d82af3 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/utils.ts +++ b/server/sonar-web/src/main/js/components/new-code-definition/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { hasGlobalPermission } from '../../helpers/users'; import { NewCodeDefinition, diff --git a/server/sonar-web/src/main/js/components/notifications/NotificationsList.tsx b/server/sonar-web/src/main/js/components/notifications/NotificationsList.tsx index f1d3f9f5334..661f8335893 100644 --- a/server/sonar-web/src/main/js/components/notifications/NotificationsList.tsx +++ b/server/sonar-web/src/main/js/components/notifications/NotificationsList.tsx @@ -20,10 +20,9 @@ import { Checkbox, Spinner } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { CellComponent, Table, TableRowInteractive } from 'design-system'; -import * as React from 'react'; import { useCallback } from 'react'; import { FormattedMessage } from 'react-intl'; +import { CellComponent, Table, TableRowInteractive } from '~design-system'; import { hasMessage, translate, translateWithParameters } from '../../helpers/l10n'; import { useAddNotificationMutation, diff --git a/server/sonar-web/src/main/js/components/permissions/AllHoldersList.tsx b/server/sonar-web/src/main/js/components/permissions/AllHoldersList.tsx index 3828b10a77b..33830099a4d 100644 --- a/server/sonar-web/src/main/js/components/permissions/AllHoldersList.tsx +++ b/server/sonar-web/src/main/js/components/permissions/AllHoldersList.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, Spinner } from 'design-system'; + import * as React from 'react'; +import { BasicSeparator, Spinner } from '~design-system'; import { Paging, PermissionDefinition, diff --git a/server/sonar-web/src/main/js/components/permissions/GroupHolder.tsx b/server/sonar-web/src/main/js/components/permissions/GroupHolder.tsx index 1c2e15b7a0a..c7c7a272cd6 100644 --- a/server/sonar-web/src/main/js/components/permissions/GroupHolder.tsx +++ b/server/sonar-web/src/main/js/components/permissions/GroupHolder.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Badge, ContentCell, TableRowInteractive, UserGroupIcon } from 'design-system'; -import * as React from 'react'; +import { Badge, ContentCell, TableRowInteractive, UserGroupIcon } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { isPermissionDefinitionGroup } from '../../helpers/permissions'; diff --git a/server/sonar-web/src/main/js/components/permissions/HoldersList.tsx b/server/sonar-web/src/main/js/components/permissions/HoldersList.tsx index a43f9f21e09..0dfbb375f55 100644 --- a/server/sonar-web/src/main/js/components/permissions/HoldersList.tsx +++ b/server/sonar-web/src/main/js/components/permissions/HoldersList.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, Table, TableRow, TableSeparator } from 'design-system'; import { partition } from 'lodash'; import * as React from 'react'; +import { ContentCell, Table, TableRow, TableSeparator } from '~design-system'; import UseQuery from '../../helpers/UseQuery'; import { translate } from '../../helpers/l10n'; import { isPermissionDefinitionGroup } from '../../helpers/permissions'; diff --git a/server/sonar-web/src/main/js/components/permissions/PermissionCell.tsx b/server/sonar-web/src/main/js/components/permissions/PermissionCell.tsx index 5146ce3bead..ab871566f6c 100644 --- a/server/sonar-web/src/main/js/components/permissions/PermissionCell.tsx +++ b/server/sonar-web/src/main/js/components/permissions/PermissionCell.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { Checkbox, CheckboxCell } from 'design-system'; -import * as React from 'react'; +import { Checkbox, CheckboxCell } from '~design-system'; import { translateWithParameters } from '../../helpers/l10n'; import { isPermissionDefinitionGroup } from '../../helpers/permissions'; import { diff --git a/server/sonar-web/src/main/js/components/permissions/PermissionHeader.tsx b/server/sonar-web/src/main/js/components/permissions/PermissionHeader.tsx index 0df8399d0bf..f25c86e27dd 100644 --- a/server/sonar-web/src/main/js/components/permissions/PermissionHeader.tsx +++ b/server/sonar-web/src/main/js/components/permissions/PermissionHeader.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { BareButton, ContentCell, HelperHintIcon } from 'design-system'; import * as React from 'react'; +import { BareButton, ContentCell, HelperHintIcon } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { isPermissionDefinitionGroup } from '../../helpers/permissions'; diff --git a/server/sonar-web/src/main/js/components/permissions/SearchForm.tsx b/server/sonar-web/src/main/js/components/permissions/SearchForm.tsx index eebfe18f82e..fd94aaaa6c4 100644 --- a/server/sonar-web/src/main/js/components/permissions/SearchForm.tsx +++ b/server/sonar-web/src/main/js/components/permissions/SearchForm.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { InputSearch, ToggleButton } from 'design-system'; -import * as React from 'react'; + +import { InputSearch, ToggleButton } from '~design-system'; import { translate } from '../../helpers/l10n'; export type FilterOption = 'all' | 'users' | 'groups'; diff --git a/server/sonar-web/src/main/js/components/permissions/UserHolder.tsx b/server/sonar-web/src/main/js/components/permissions/UserHolder.tsx index a3f2133775a..f3c95711946 100644 --- a/server/sonar-web/src/main/js/components/permissions/UserHolder.tsx +++ b/server/sonar-web/src/main/js/components/permissions/UserHolder.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Avatar, ContentCell, Note, TableRowInteractive } from 'design-system'; -import * as React from 'react'; +import { Avatar, ContentCell, Note, TableRowInteractive } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { isPermissionDefinitionGroup } from '../../helpers/permissions'; diff --git a/server/sonar-web/src/main/js/components/permissions/usePermissionChange.tsx b/server/sonar-web/src/main/js/components/permissions/usePermissionChange.tsx index 1d9381a70f2..2bddd7d9e5f 100644 --- a/server/sonar-web/src/main/js/components/permissions/usePermissionChange.tsx +++ b/server/sonar-web/src/main/js/components/permissions/usePermissionChange.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { without } from 'lodash'; import React from 'react'; import { FormattedMessage } from 'react-intl'; diff --git a/server/sonar-web/src/main/js/components/rules/CveDetails.tsx b/server/sonar-web/src/main/js/components/rules/CveDetails.tsx index 958b3e10820..c5b6b84816e 100644 --- a/server/sonar-web/src/main/js/components/rules/CveDetails.tsx +++ b/server/sonar-web/src/main/js/components/rules/CveDetails.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ContentCell, Table, TableRow } from 'design-system'; -import React from 'react'; + +import { ContentCell, Table, TableRow } from '~design-system'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { Cve } from '../../types/cves'; import DateFormatter from '../intl/DateFormatter'; diff --git a/server/sonar-web/src/main/js/components/rules/IssueSuggestionCodeTab.tsx b/server/sonar-web/src/main/js/components/rules/IssueSuggestionCodeTab.tsx index 7ee5e86902b..55525b6b8e7 100644 --- a/server/sonar-web/src/main/js/components/rules/IssueSuggestionCodeTab.tsx +++ b/server/sonar-web/src/main/js/components/rules/IssueSuggestionCodeTab.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonVariety } from '@sonarsource/echoes-react'; -import { InProgressVisual, OverviewQGNotComputedIcon, OverviewQGPassedIcon } from 'design-system'; -import React from 'react'; +import { InProgressVisual, OverviewQGNotComputedIcon, OverviewQGPassedIcon } from '~design-system'; import { translate } from '../../helpers/l10n'; import { usePrefetchSuggestion, useUnifiedSuggestionsQuery } from '../../queries/fix-suggestions'; import { useRawSourceQuery } from '../../queries/sources'; diff --git a/server/sonar-web/src/main/js/components/rules/IssueSuggestionFileSnippet.tsx b/server/sonar-web/src/main/js/components/rules/IssueSuggestionFileSnippet.tsx index 232695b9e61..397fa877005 100644 --- a/server/sonar-web/src/main/js/components/rules/IssueSuggestionFileSnippet.tsx +++ b/server/sonar-web/src/main/js/components/rules/IssueSuggestionFileSnippet.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { max } from 'lodash'; -import React, { Fragment, useCallback, useEffect, useState } from 'react'; +import { Fragment, useCallback, useEffect, useState } from 'react'; import { ClipboardIconButton, @@ -28,7 +29,7 @@ import { LineCodeEllipsisStyled, SonarCodeColorizer, themeColor, -} from 'design-system'; +} from '~design-system'; import { OpenFixInIde } from '../../apps/issues/components/OpenFixInIde'; import { IssueSourceViewerHeader } from '../../apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/rules/IssueSuggestionLine.tsx b/server/sonar-web/src/main/js/components/rules/IssueSuggestionLine.tsx index 6dbc7341f9f..bc041592846 100644 --- a/server/sonar-web/src/main/js/components/rules/IssueSuggestionLine.tsx +++ b/server/sonar-web/src/main/js/components/rules/IssueSuggestionLine.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { CodeSyntaxHighlighter, @@ -25,8 +26,7 @@ import { SuggestedLineWrapper, themeBorder, themeColor, -} from 'design-system'; -import React from 'react'; +} from '~design-system'; import { LineTypeEnum } from '../../queries/fix-suggestions'; type LineType = 'code' | 'added' | 'removed'; diff --git a/server/sonar-web/src/main/js/components/rules/IssueTabViewer.tsx b/server/sonar-web/src/main/js/components/rules/IssueTabViewer.tsx index f81b7d994f6..cf742fc25b6 100644 --- a/server/sonar-web/src/main/js/components/rules/IssueTabViewer.tsx +++ b/server/sonar-web/src/main/js/components/rules/IssueTabViewer.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { LAYOUT_FOOTER_HEIGHT, ToggleButton } from 'design-system'; import { cloneDeep, debounce, groupBy } from 'lodash'; import * as React from 'react'; import { Location } from 'react-router-dom'; +import { LAYOUT_FOOTER_HEIGHT, ToggleButton } from '~design-system'; import { dismissNotice } from '../../api/users'; import { CurrentUserContextInterface } from '../../app/components/current-user/CurrentUserContext'; import withCurrentUserContext from '../../app/components/current-user/withCurrentUserContext'; diff --git a/server/sonar-web/src/main/js/components/rules/MoreInfoRuleDescription.tsx b/server/sonar-web/src/main/js/components/rules/MoreInfoRuleDescription.tsx index c59bf878380..7b992db0ed4 100644 --- a/server/sonar-web/src/main/js/components/rules/MoreInfoRuleDescription.tsx +++ b/server/sonar-web/src/main/js/components/rules/MoreInfoRuleDescription.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Button } from '@sonarsource/echoes-react'; -import { FlagMessage, SubTitle, themeBorder, themeColor } from 'design-system'; import * as React from 'react'; +import { FlagMessage, SubTitle, themeBorder, themeColor } from '~design-system'; import { RuleDescriptionSection } from '../../apps/coding-rules/rule'; import { translate } from '../../helpers/l10n'; import { Dict } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/components/rules/OtherContextOption.tsx b/server/sonar-web/src/main/js/components/rules/OtherContextOption.tsx index df50f6774c4..76050fe6759 100644 --- a/server/sonar-web/src/main/js/components/rules/OtherContextOption.tsx +++ b/server/sonar-web/src/main/js/components/rules/OtherContextOption.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CheckIcon, CloseIcon, Link } from 'design-system'; -import * as React from 'react'; + +import { CheckIcon, CloseIcon, Link } from '~design-system'; import { translate } from '../../helpers/l10n'; export default function OtherContextOption() { diff --git a/server/sonar-web/src/main/js/components/rules/RuleDescription.tsx b/server/sonar-web/src/main/js/components/rules/RuleDescription.tsx index 428f65a9ecd..275280497be 100644 --- a/server/sonar-web/src/main/js/components/rules/RuleDescription.tsx +++ b/server/sonar-web/src/main/js/components/rules/RuleDescription.tsx @@ -17,7 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; +import * as React from 'react'; import { CodeSyntaxHighlighter, FlagMessage, @@ -26,8 +28,7 @@ import { ToggleButton, themeBorder, themeColor, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { RuleDescriptionSection, RuleDescriptionSections } from '../../apps/coding-rules/rule'; import applyCodeDifferences from '../../helpers/code-difference'; import { translate, translateWithParameters } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/rules/RuleTabViewer.tsx b/server/sonar-web/src/main/js/components/rules/RuleTabViewer.tsx index b400b60359c..68c17f4e1ca 100644 --- a/server/sonar-web/src/main/js/components/rules/RuleTabViewer.tsx +++ b/server/sonar-web/src/main/js/components/rules/RuleTabViewer.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { ToggleButton, getTabId, getTabPanelId } from 'design-system'; import { cloneDeep, debounce, groupBy, isEqual } from 'lodash'; import * as React from 'react'; import { Location } from 'react-router-dom'; +import { ToggleButton, getTabId, getTabPanelId } from '~design-system'; import { dismissNotice } from '../../api/users'; import { CurrentUserContextInterface } from '../../app/components/current-user/CurrentUserContext'; import withCurrentUserContext from '../../app/components/current-user/withCurrentUserContext'; diff --git a/server/sonar-web/src/main/js/components/rules/TabSelectorContext.ts b/server/sonar-web/src/main/js/components/rules/TabSelectorContext.ts index 5f1a4d6e90e..bad4e8f4e5a 100644 --- a/server/sonar-web/src/main/js/components/rules/TabSelectorContext.ts +++ b/server/sonar-web/src/main/js/components/rules/TabSelectorContext.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { noop } from 'lodash'; import { createContext } from 'react'; import { TabKeys } from './IssueTabViewer'; diff --git a/server/sonar-web/src/main/js/components/rules/educationPrinciples/DefenseInDepth.tsx b/server/sonar-web/src/main/js/components/rules/educationPrinciples/DefenseInDepth.tsx index bfca99e5f8b..3012cf712eb 100644 --- a/server/sonar-web/src/main/js/components/rules/educationPrinciples/DefenseInDepth.tsx +++ b/server/sonar-web/src/main/js/components/rules/educationPrinciples/DefenseInDepth.tsx @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; export default function DefenseInDepth() { return ( diff --git a/server/sonar-web/src/main/js/components/rules/educationPrinciples/NeverTrustUserInput.tsx b/server/sonar-web/src/main/js/components/rules/educationPrinciples/NeverTrustUserInput.tsx index deb991714ac..6f21824be86 100644 --- a/server/sonar-web/src/main/js/components/rules/educationPrinciples/NeverTrustUserInput.tsx +++ b/server/sonar-web/src/main/js/components/rules/educationPrinciples/NeverTrustUserInput.tsx @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; export default function NeverTrustUserInput() { return ( diff --git a/server/sonar-web/src/main/js/components/shared/AnalysisMissingInfoMessage.tsx b/server/sonar-web/src/main/js/components/shared/AnalysisMissingInfoMessage.tsx index c9dd40bf03a..e1fb38c0d1e 100644 --- a/server/sonar-web/src/main/js/components/shared/AnalysisMissingInfoMessage.tsx +++ b/server/sonar-web/src/main/js/components/shared/AnalysisMissingInfoMessage.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; -import * as React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; +import { FlagMessage } from '~design-system'; import { DocLink } from '../../helpers/doc-links'; import { useStandardExperienceMode } from '../../queries/settings'; import DocumentationLink from '../common/DocumentationLink'; diff --git a/server/sonar-web/src/main/js/components/shared/AppVersionStatus.tsx b/server/sonar-web/src/main/js/components/shared/AppVersionStatus.tsx index a22ec5113d3..8b9452fe2ff 100644 --- a/server/sonar-web/src/main/js/components/shared/AppVersionStatus.tsx +++ b/server/sonar-web/src/main/js/components/shared/AppVersionStatus.tsx @@ -19,7 +19,7 @@ */ import { LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react'; -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import { useAppState } from '../../app/components/app-state/withAppStateContext'; import { DocLink } from '../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/components/shared/CleanCodeAttributePill.tsx b/server/sonar-web/src/main/js/components/shared/CleanCodeAttributePill.tsx index 9e386598774..3f45f75d7d6 100644 --- a/server/sonar-web/src/main/js/components/shared/CleanCodeAttributePill.tsx +++ b/server/sonar-web/src/main/js/components/shared/CleanCodeAttributePill.tsx @@ -19,8 +19,7 @@ */ import { Popover } from '@sonarsource/echoes-react'; -import { Pill, PillVariant } from 'design-system'; -import React from 'react'; +import { Pill, PillVariant } from '~design-system'; import { DocLink } from '../../helpers/doc-links'; import { translate } from '../../helpers/l10n'; import { CleanCodeAttribute, CleanCodeAttributeCategory } from '../../types/clean-code-taxonomy'; diff --git a/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx b/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx index e1687e5e53a..c313ccaa720 100644 --- a/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx +++ b/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { getComponentIssuesUrl } from '~sonar-aligned/helpers/urls'; diff --git a/server/sonar-web/src/main/js/components/shared/IssueTypePill.tsx b/server/sonar-web/src/main/js/components/shared/IssueTypePill.tsx index 57d7f6ea0b5..6d7265ac4aa 100644 --- a/server/sonar-web/src/main/js/components/shared/IssueTypePill.tsx +++ b/server/sonar-web/src/main/js/components/shared/IssueTypePill.tsx @@ -20,9 +20,8 @@ import { Tooltip } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { Pill, PillVariant } from 'design-system'; -import React from 'react'; import { useIntl } from 'react-intl'; +import { Pill, PillVariant } from '~design-system'; import { IssueSeverity, IssueType } from '../../types/issues'; import IssueTypeIcon from '../icon-mappers/IssueTypeIcon'; import SoftwareImpactSeverityIcon from '../icon-mappers/SoftwareImpactSeverityIcon'; diff --git a/server/sonar-web/src/main/js/components/shared/SeverityHelper.tsx b/server/sonar-web/src/main/js/components/shared/SeverityHelper.tsx index 01f55e11098..6fee4db5236 100644 --- a/server/sonar-web/src/main/js/components/shared/SeverityHelper.tsx +++ b/server/sonar-web/src/main/js/components/shared/SeverityHelper.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isEmpty } from 'lodash'; -import * as React from 'react'; import { translate } from '../../helpers/l10n'; import SeverityIcon from '../icon-mappers/SeverityIcon'; diff --git a/server/sonar-web/src/main/js/components/shared/SoftwareImpactPill.tsx b/server/sonar-web/src/main/js/components/shared/SoftwareImpactPill.tsx index 88b531e6232..0c2892d202f 100644 --- a/server/sonar-web/src/main/js/components/shared/SoftwareImpactPill.tsx +++ b/server/sonar-web/src/main/js/components/shared/SoftwareImpactPill.tsx @@ -20,10 +20,9 @@ import { Popover } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { Pill, PillVariant } from 'design-system'; import { noop } from 'lodash'; -import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Pill, PillVariant } from '~design-system'; import { DocLink } from '../../helpers/doc-links'; import { translate } from '../../helpers/l10n'; import { SoftwareImpactSeverity } from '../../types/clean-code-taxonomy'; diff --git a/server/sonar-web/src/main/js/components/shared/SoftwareImpactPillList.tsx b/server/sonar-web/src/main/js/components/shared/SoftwareImpactPillList.tsx index 0275abea56c..28857e63ac3 100644 --- a/server/sonar-web/src/main/js/components/shared/SoftwareImpactPillList.tsx +++ b/server/sonar-web/src/main/js/components/shared/SoftwareImpactPillList.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; import React from 'react'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/shared/StatusHelper.tsx b/server/sonar-web/src/main/js/components/shared/StatusHelper.tsx index d1ac8b4f964..da26dbc0996 100644 --- a/server/sonar-web/src/main/js/components/shared/StatusHelper.tsx +++ b/server/sonar-web/src/main/js/components/shared/StatusHelper.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { translate } from '../../helpers/l10n'; import { IssueStatus } from '../../types/issues'; import IssueStatusIcon from '../icon-mappers/IssueStatusIcon'; diff --git a/server/sonar-web/src/main/js/components/shared/TypeHelper.tsx b/server/sonar-web/src/main/js/components/shared/TypeHelper.tsx index 93797c99828..6701e58ce8c 100644 --- a/server/sonar-web/src/main/js/components/shared/TypeHelper.tsx +++ b/server/sonar-web/src/main/js/components/shared/TypeHelper.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { IconProps } from 'design-system'; -import * as React from 'react'; + +import { IconProps } from '~design-system'; import { translate } from '../../helpers/l10n'; import { IssueType, RuleType } from '../../types/types'; import IssueTypeIcon from '../icon-mappers/IssueTypeIcon'; diff --git a/server/sonar-web/src/main/js/components/shared/__tests__/utils-test.ts b/server/sonar-web/src/main/js/components/shared/__tests__/utils-test.ts index f28c1d35718..54303ef1ce7 100644 --- a/server/sonar-web/src/main/js/components/shared/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/components/shared/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey } from '~sonar-aligned/types/metrics'; import { propsToIssueParams } from '../utils'; diff --git a/server/sonar-web/src/main/js/components/shared/utils.ts b/server/sonar-web/src/main/js/components/shared/utils.ts index 0b5639bb921..5726c655dcf 100644 --- a/server/sonar-web/src/main/js/components/shared/utils.ts +++ b/server/sonar-web/src/main/js/components/shared/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey } from '~sonar-aligned/types/metrics'; import { IssueStatus } from '../../types/issues'; import { Dict } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/components/tags/TagsList.tsx b/server/sonar-web/src/main/js/components/tags/TagsList.tsx index 888f95d7a16..668862b8cbf 100644 --- a/server/sonar-web/src/main/js/components/tags/TagsList.tsx +++ b/server/sonar-web/src/main/js/components/tags/TagsList.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { PopupPlacement, Tags } from 'design-system'; + import * as React from 'react'; +import { PopupPlacement, Tags } from '~design-system'; import { translate, translateWithParameters } from '../../helpers/l10n'; import Tooltip from '../controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/components/templates/FilterBarTemplate.tsx b/server/sonar-web/src/main/js/components/templates/FilterBarTemplate.tsx index af9e4679bc2..cdd3b82e928 100644 --- a/server/sonar-web/src/main/js/components/templates/FilterBarTemplate.tsx +++ b/server/sonar-web/src/main/js/components/templates/FilterBarTemplate.tsx @@ -17,8 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; +import React from 'react'; import { LAYOUT_FILTERBAR_HEADER, LAYOUT_FOOTER_HEIGHT, @@ -26,8 +28,7 @@ import { LAYOUT_PROJECT_NAV_HEIGHT, themeBorder, themeColor, -} from 'design-system'; -import React from 'react'; +} from '~design-system'; import { translate } from '../../helpers/l10n'; import useFollowScroll from '../../hooks/useFollowScroll'; diff --git a/server/sonar-web/src/main/js/components/templates/__tests__/FilterBarTemplate-test.tsx b/server/sonar-web/src/main/js/components/templates/__tests__/FilterBarTemplate-test.tsx index a6c9cea12a5..d20d9838d51 100644 --- a/server/sonar-web/src/main/js/components/templates/__tests__/FilterBarTemplate-test.tsx +++ b/server/sonar-web/src/main/js/components/templates/__tests__/FilterBarTemplate-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import React from 'react'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import { FCProps } from '../../../types/misc'; import FilterBarTemplate from '../FilterBarTemplate'; diff --git a/server/sonar-web/src/main/js/components/tutorials/TutorialSelection.tsx b/server/sonar-web/src/main/js/components/tutorials/TutorialSelection.tsx index de5310699d2..704f236c9ab 100644 --- a/server/sonar-web/src/main/js/components/tutorials/TutorialSelection.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/TutorialSelection.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { withRouter } from '~sonar-aligned/components/hoc/withRouter'; import { Location } from '~sonar-aligned/types/router'; diff --git a/server/sonar-web/src/main/js/components/tutorials/TutorialSelectionRenderer.tsx b/server/sonar-web/src/main/js/components/tutorials/TutorialSelectionRenderer.tsx index f885f379a11..9e37fe68868 100644 --- a/server/sonar-web/src/main/js/components/tutorials/TutorialSelectionRenderer.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/TutorialSelectionRenderer.tsx @@ -19,6 +19,7 @@ */ import { LinkHighlight, LinkStandalone, Spinner } from '@sonarsource/echoes-react'; +import * as React from 'react'; import { Breadcrumbs, FlagMessage, @@ -27,8 +28,7 @@ import { LightPrimary, SubTitle, Title, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { isMainBranch } from '~sonar-aligned/helpers/branch-like'; import { AnalysisStatus } from '../../apps/overview/components/AnalysisStatus'; diff --git a/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelection-it.tsx b/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelection-it.tsx index 194d057137a..b9c978add87 100644 --- a/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelection-it.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelection-it.tsx @@ -21,7 +21,6 @@ import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; -import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { getScannableProjects } from '../../../api/components'; import AlmSettingsServiceMock from '../../../api/mocks/AlmSettingsServiceMock'; diff --git a/server/sonar-web/src/main/js/components/tutorials/__tests__/utils-test.ts b/server/sonar-web/src/main/js/components/tutorials/__tests__/utils-test.ts index 8cf3bce1026..fb52b838d07 100644 --- a/server/sonar-web/src/main/js/components/tutorials/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/components/tutorials/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mockAlmSettingsInstance, mockProjectBitbucketCloudBindingResponse, diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/AzurePipelinesTutorial.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/AzurePipelinesTutorial.tsx index 8f024dd20d1..612a436a74c 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/AzurePipelinesTutorial.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/AzurePipelinesTutorial.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, Title, TutorialStep, TutorialStepList } from 'design-system'; + import * as React from 'react'; +import { BasicSeparator, Title, TutorialStep, TutorialStepList } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { AlmKeys } from '../../../types/alm-settings'; import { Component } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/BranchAnalysisStepContent.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/BranchAnalysisStepContent.tsx index 811e2ce5829..793fabb44e3 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/BranchAnalysisStepContent.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/BranchAnalysisStepContent.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import withLanguagesContext from '../../../app/components/languages/withLanguagesContext'; import { Languages } from '../../../types/languages'; import { Component } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/ExtensionInstallationStepContent.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/ExtensionInstallationStepContent.tsx index 1602e94bbb1..414a24bc59e 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/ExtensionInstallationStepContent.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/ExtensionInstallationStepContent.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { Link } from '~design-system'; import { translate } from '../../../helpers/l10n'; export default function ExtensionInstallationStepContent() { diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/JavaToolInstallation.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/JavaToolInstallation.tsx index dfba69a5fb8..9c0094faa01 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/JavaToolInstallation.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/JavaToolInstallation.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ListItem, NumberedListItem, UnorderedList } from 'design-system'; + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { ListItem, NumberedListItem, UnorderedList } from '~design-system'; import { translate } from '../../../helpers/l10n'; function renderSentenceWithFieldAndValue(props: { diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/ServiceEndpointStepContent.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/ServiceEndpointStepContent.tsx index febf010cbff..98fd3ac400d 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/ServiceEndpointStepContent.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/ServiceEndpointStepContent.tsx @@ -17,14 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { ButtonSecondary, ClipboardIconButton, NumberedList, NumberedListItem, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { TokenType } from '../../../types/token'; import { Component } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/AzurePipelinesTutorial-it.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/AzurePipelinesTutorial-it.tsx index 7837ca6c18f..acf7367d681 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/AzurePipelinesTutorial-it.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/AzurePipelinesTutorial-it.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; -import * as React from 'react'; import UserTokensMock from '../../../../api/mocks/UserTokensMock'; import { mockComponent } from '../../../../helpers/mocks/component'; import { mockLanguage, mockLoggedInUser } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AlertClassicEditor.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AlertClassicEditor.tsx index 2124f129f3f..ef02074c701 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AlertClassicEditor.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AlertClassicEditor.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, Link } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Link } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AnalysisCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AnalysisCommand.tsx index b28e92c5cc0..863c3f6b0cb 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AnalysisCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AnalysisCommand.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { BuildTools, TutorialConfig } from '../../types'; import ClangGCC from './ClangGCC'; import DotNet from './DotNet'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/ClangGCC.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/ClangGCC.tsx index 8fac8158624..d5de1ada394 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/ClangGCC.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/ClangGCC.tsx @@ -17,14 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; import { CodeSnippet, ListItem, NumberedList, NumberedListItem, UnorderedList, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { getHostUrl } from '../../../../helpers/urls'; import { CompilationInfo } from '../../components/CompilationInfo'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/DotNet.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/DotNet.tsx index 3b90315ce8c..697f1aef98c 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/DotNet.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/DotNet.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NumberedList, NumberedListItem } from 'design-system'; -import * as React from 'react'; + +import { NumberedList, NumberedListItem } from '~design-system'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; import { BuildTools } from '../../types'; import AlertClassicEditor from './AlertClassicEditor'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/JavaGradle.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/JavaGradle.tsx index 506c9861f3c..3672bebd092 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/JavaGradle.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/JavaGradle.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ListItem, NumberedList, NumberedListItem, UnorderedList } from 'design-system'; -import * as React from 'react'; + +import { ListItem, NumberedList, NumberedListItem, UnorderedList } from '~design-system'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; import { BuildTools } from '../../types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/JavaMaven.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/JavaMaven.tsx index b9923852080..b23a3d9dc62 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/JavaMaven.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/JavaMaven.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ListItem, NumberedList, NumberedListItem, UnorderedList } from 'design-system'; -import * as React from 'react'; + +import { ListItem, NumberedList, NumberedListItem, UnorderedList } from '~design-system'; import { translate, translateWithParameters } from '../../../../helpers/l10n'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; import { BuildTools } from '../../types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/Other.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/Other.tsx index 2d07425f18a..1ce9d0275c5 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/Other.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/Other.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NumberedList, NumberedListItem } from 'design-system'; -import * as React from 'react'; + +import { NumberedList, NumberedListItem } from '~design-system'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; import { BuildTools } from '../../types'; import AlertClassicEditor from './AlertClassicEditor'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/PrepareAnalysisCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/PrepareAnalysisCommand.tsx index 2f484e85a68..195d747c382 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/PrepareAnalysisCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/PrepareAnalysisCommand.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ClipboardIconButton, CodeSnippet, ListItem, UnorderedList } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { ClipboardIconButton, CodeSnippet, ListItem, UnorderedList } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { InlineSnippet } from '../../components/InlineSnippet'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/PublishSteps.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/PublishSteps.tsx index 74a9c5fcaee..3c4651a026c 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/PublishSteps.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/PublishSteps.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, FlagMessage, Link, NumberedListItem } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { BasicSeparator, FlagMessage, Link, NumberedListItem } from '~design-system'; import withAvailableFeatures, { WithAvailableFeaturesProps, } from '../../../../app/components/available-features/withAvailableFeatures'; diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/AnalysisCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/AnalysisCommand.tsx index bc0bfade9c9..f5d58781e3b 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/AnalysisCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/AnalysisCommand.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Dictionary } from 'lodash'; -import * as React from 'react'; import withAvailableFeatures, { WithAvailableFeaturesProps, } from '../../../app/components/available-features/withAvailableFeatures'; diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/BitbucketPipelinesTutorial.tsx b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/BitbucketPipelinesTutorial.tsx index 08e8672d118..57dff1f9aeb 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/BitbucketPipelinesTutorial.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/BitbucketPipelinesTutorial.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, Title, TutorialStep, TutorialStepList } from 'design-system'; + import * as React from 'react'; +import { BasicSeparator, Title, TutorialStep, TutorialStepList } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; import { Component } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/PreambuleYaml.tsx b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/PreambuleYaml.tsx index c8d40198f57..45ca2f48852 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/PreambuleYaml.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/PreambuleYaml.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Component } from '../../../types/types'; import DefaultProjectKey from '../components/DefaultProjectKey'; import GradleBuild from '../components/GradleBuild'; diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/RepositoryVariables.tsx b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/RepositoryVariables.tsx index 0eab6c241d0..4a08ed78697 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/RepositoryVariables.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/RepositoryVariables.tsx @@ -17,10 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { LinkStandalone } from '@sonarsource/echoes-react'; -import { BasicSeparator, ClipboardIconButton, NumberedList, NumberedListItem } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { + BasicSeparator, + ClipboardIconButton, + NumberedList, + NumberedListItem, +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { useProjectBindingQuery } from '../../../queries/devops-integration'; import { AlmSettingsInstance } from '../../../types/alm-settings'; diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/BitbucketPipelinesTutorial-it.tsx b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/BitbucketPipelinesTutorial-it.tsx index e4a6c586fde..8989652009d 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/BitbucketPipelinesTutorial-it.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/BitbucketPipelinesTutorial-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React from 'react'; import AlmSettingsServiceMock from '../../../../api/mocks/AlmSettingsServiceMock'; import UserTokensMock from '../../../../api/mocks/UserTokensMock'; import { mockAlmSettingsInstance } from '../../../../helpers/mocks/alm-settings'; diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/CFamily.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/CFamily.ts index 45cf9a2f670..3d6c82d4e88 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/CFamily.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/CFamily.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { AutoConfig, BuildTools, OSs } from '../../types'; import { SONAR_SCANNER_CLI_LATEST_VERSION, diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Dart.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Dart.ts index 3bb69f1b23f..493bf3d2e79 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Dart.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Dart.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Arch, OSs } from '../../types'; import { SONAR_SCANNER_CLI_LATEST_VERSION, getScannerUrlSuffix } from '../../utils'; import { BuildToolExampleBuilder } from '../AnalysisCommand'; diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/DotNet.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/DotNet.ts index b8d8907b105..011c5a33909 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/DotNet.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/DotNet.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { BuildToolExampleBuilder } from '../AnalysisCommand'; const dotNetExample: BuildToolExampleBuilder = ({ diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts index 45cb5b262e8..e07016ab260 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { BuildToolExampleBuilder } from '../AnalysisCommand'; const gradleExample: BuildToolExampleBuilder = ({ branchesEnabled, mainBranchName }) => { diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Maven.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Maven.ts index 41809d2d6e2..007649713f0 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Maven.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Maven.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { BuildToolExampleBuilder } from '../AnalysisCommand'; const mavenExample: BuildToolExampleBuilder = ({ diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Others.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Others.ts index a20417061ff..b24d85780aa 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Others.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Others.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { BuildToolExampleBuilder } from '../AnalysisCommand'; const othersExample: BuildToolExampleBuilder = ({ branchesEnabled, mainBranchName }) => { diff --git a/server/sonar-web/src/main/js/components/tutorials/components/AllSet.tsx b/server/sonar-web/src/main/js/components/tutorials/components/AllSet.tsx index 600bbdc6bc4..4c7c3bf8354 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/AllSet.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/AllSet.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { animated, config, useSpring } from '@react-spring/web'; -import { CheckIcon, FlagVisual, SubTitle } from 'design-system'; import * as React from 'react'; +import { CheckIcon, FlagVisual, SubTitle } from '~design-system'; import withAvailableFeatures, { WithAvailableFeaturesProps, } from '../../../app/components/available-features/withAvailableFeatures'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/BuildConfigSelection.tsx b/server/sonar-web/src/main/js/components/tutorials/components/BuildConfigSelection.tsx index 9cfff92517a..bc40231bde1 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/BuildConfigSelection.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/BuildConfigSelection.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; -import * as React from 'react'; + +import { FlagMessage } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { AutoConfig, BuildTools, TutorialConfig, TutorialModes } from '../types'; import { getBuildToolOptions, isCFamily, supportsAutoConfig } from '../utils'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/CompilationInfo.tsx b/server/sonar-web/src/main/js/components/tutorials/components/CompilationInfo.tsx index 8fb49d3c82f..2572a61c009 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/CompilationInfo.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/CompilationInfo.tsx @@ -19,9 +19,8 @@ */ import { LinkStandalone as Link } from '@sonarsource/echoes-react'; -import { FlagMessage } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage } from '~design-system'; import { DocLink } from '../../../helpers/doc-links'; import { useDocUrl } from '../../../helpers/docs'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/CreateYmlFile.tsx b/server/sonar-web/src/main/js/components/tutorials/components/CreateYmlFile.tsx index d660cc93961..6502720b7af 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/CreateYmlFile.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/CreateYmlFile.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ClipboardIconButton, CodeSnippet, NumberedListItem } from 'design-system'; + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { ClipboardIconButton, CodeSnippet, NumberedListItem } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { InlineSnippet } from './InlineSnippet'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/DefaultProjectKey.tsx b/server/sonar-web/src/main/js/components/tutorials/components/DefaultProjectKey.tsx index b8e4cb95a09..3aa5e421cc0 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/DefaultProjectKey.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/DefaultProjectKey.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, FlagMessage, NumberedListItem } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { CodeSnippet, FlagMessage, NumberedListItem } from '~design-system'; import { Component } from '../../../types/types'; import SentenceWithFilename from './SentenceWithFilename'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/EditTokenModal.tsx b/server/sonar-web/src/main/js/components/tutorials/components/EditTokenModal.tsx index 105e1f20e2d..876ae1689f9 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/EditTokenModal.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/EditTokenModal.tsx @@ -17,6 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { ButtonSecondary, ClipboardIconButton, @@ -29,9 +32,7 @@ import { Modal, Spinner, TrashIcon, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { generateToken, getTokens, revokeToken } from '../../../api/user-tokens'; import { translate, translateWithParameters } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/GithubCFamilyExampleRepositories.tsx b/server/sonar-web/src/main/js/components/tutorials/components/GithubCFamilyExampleRepositories.tsx index d06ad32d487..eaf7bdf367d 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/GithubCFamilyExampleRepositories.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/GithubCFamilyExampleRepositories.tsx @@ -20,8 +20,7 @@ import { LinkStandalone } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { Card, LightLabel } from 'design-system'; -import React from 'react'; +import { Card, LightLabel } from '~design-system'; import { Image } from '~sonar-aligned/components/common/Image'; import { translate } from '../../../helpers/l10n'; import { OSs, TutorialModes } from '../types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/GradleBuild.tsx b/server/sonar-web/src/main/js/components/tutorials/components/GradleBuild.tsx index df697fd690d..66e0e908767 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/GradleBuild.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/GradleBuild.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ClipboardIconButton, CodeSnippet, NumberedListItem } from 'design-system'; -import React from 'react'; import { FormattedMessage } from 'react-intl'; +import { ClipboardIconButton, CodeSnippet, NumberedListItem } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Component } from '../../../types/types'; import { GradleBuildDSL } from '../types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/GradleBuildSelection.tsx b/server/sonar-web/src/main/js/components/tutorials/components/GradleBuildSelection.tsx index 0b6a70584c9..87b6ca36aef 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/GradleBuildSelection.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/GradleBuildSelection.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ToggleButton } from 'design-system'; + import React from 'react'; +import { ToggleButton } from '~design-system'; import { GradleBuildDSL } from '../types'; interface Props { diff --git a/server/sonar-web/src/main/js/components/tutorials/components/InlineSnippet.tsx b/server/sonar-web/src/main/js/components/tutorials/components/InlineSnippet.tsx index 28da3238a26..5d180a47ef7 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/InlineSnippet.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/InlineSnippet.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { CodeSnippet } from 'design-system'; -import * as React from 'react'; +import { CodeSnippet } from '~design-system'; import { FCProps } from '../../../types/misc'; export function InlineSnippet({ diff --git a/server/sonar-web/src/main/js/components/tutorials/components/LabelActionPair.tsx b/server/sonar-web/src/main/js/components/tutorials/components/LabelActionPair.tsx index d3b5ca8679f..a06d2146260 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/LabelActionPair.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/LabelActionPair.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { translate } from '../../../helpers/l10n'; export interface LabelActionPairProps { diff --git a/server/sonar-web/src/main/js/components/tutorials/components/LabelValuePair.tsx b/server/sonar-web/src/main/js/components/tutorials/components/LabelValuePair.tsx index e768bb244d3..852fa803932 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/LabelValuePair.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/LabelValuePair.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ClipboardIconButton } from 'design-system'; -import * as React from 'react'; + +import { ClipboardIconButton } from '~design-system'; import { translate } from '../../../helpers/l10n'; export interface LabelValuePairProps { diff --git a/server/sonar-web/src/main/js/components/tutorials/components/ProjectTokenScopeInfo.tsx b/server/sonar-web/src/main/js/components/tutorials/components/ProjectTokenScopeInfo.tsx index 8d3ba1de36c..a4c3b7f1ac8 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/ProjectTokenScopeInfo.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/ProjectTokenScopeInfo.tsx @@ -19,9 +19,8 @@ */ import classNames from 'classnames'; -import { FlagMessage, Link } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Link } from '~design-system'; import { DocLink } from '../../../helpers/doc-links'; import { useDocUrl } from '../../../helpers/docs'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/RenderOptions.tsx b/server/sonar-web/src/main/js/components/tutorials/components/RenderOptions.tsx index cb379b20db4..25d29b0b143 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/RenderOptions.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/RenderOptions.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ToggleButton } from 'design-system'; -import * as React from 'react'; + +import { ToggleButton } from '~design-system'; import { translate } from '../../../helpers/l10n'; export interface RenderOptionsProps { diff --git a/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithFilename.tsx b/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithFilename.tsx index 83f3c052c59..c49a06c58cb 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithFilename.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithFilename.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; import { translate } from '../../../helpers/l10n'; import { InlineSnippet } from './InlineSnippet'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithHighlights.tsx b/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithHighlights.tsx index 9769acf5faa..0a6c4f0f1c9 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithHighlights.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithHighlights.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; import { translate } from '../../../helpers/l10n'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/Step.tsx b/server/sonar-web/src/main/js/components/tutorials/components/Step.tsx index d521c8625bc..0984f00490f 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/Step.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/Step.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/no-noninteractive-tabindex */ import styled from '@emotion/styled'; -import { Card, TutorialStep, TutorialStepList, themeBorder, themeColor } from 'design-system'; import * as React from 'react'; +import { Card, TutorialStep, TutorialStepList, themeBorder, themeColor } from '~design-system'; interface Props { finished?: boolean; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/TokenStepGenerator.tsx b/server/sonar-web/src/main/js/components/tutorials/components/TokenStepGenerator.tsx index 7f173010596..c1640000c96 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/TokenStepGenerator.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/TokenStepGenerator.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ButtonSecondary } from 'design-system'; + import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { ButtonSecondary } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Component } from '../../../types/types'; import { LoggedInUser } from '../../../types/users'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/YamlFileStep.tsx b/server/sonar-web/src/main/js/components/tutorials/components/YamlFileStep.tsx index d1b01e6835a..ab5897c1217 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/YamlFileStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/YamlFileStep.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NumberedList, NumberedListItem } from 'design-system'; + import * as React from 'react'; +import { NumberedList, NumberedListItem } from '~design-system'; import { withCLanguageFeature } from '../../hoc/withCLanguageFeature'; import { TutorialConfig, TutorialModes } from '../types'; import BuildConfigSelection from './BuildConfigSelection'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/__tests__/EditTokenModal-test.tsx b/server/sonar-web/src/main/js/components/tutorials/components/__tests__/EditTokenModal-test.tsx index ca6a31afb2a..36b13c13432 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/__tests__/EditTokenModal-test.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/__tests__/EditTokenModal-test.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; -import * as React from 'react'; import UserTokensMock from '../../../../api/mocks/UserTokensMock'; import { mockComponent } from '../../../../helpers/mocks/component'; import { mockUserToken } from '../../../../helpers/mocks/token'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/__tests__/GithubCFamilyExampleRepositories-test.tsx b/server/sonar-web/src/main/js/components/tutorials/components/__tests__/GithubCFamilyExampleRepositories-test.tsx index 9bf422f62c2..6751c8a44b8 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/__tests__/GithubCFamilyExampleRepositories-test.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/__tests__/GithubCFamilyExampleRepositories-test.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { byRole } from '~sonar-aligned/helpers/testSelector'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { OSs, TutorialModes } from '../../types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/AnalysisCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/AnalysisCommand.tsx index ddcfe597564..e4d1d300cac 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/AnalysisCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/AnalysisCommand.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import withAvailableFeatures, { WithAvailableFeaturesProps, } from '../../../app/components/available-features/withAvailableFeatures'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/GitHubActionTutorial.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/GitHubActionTutorial.tsx index 6bad8ad02d4..06dbe899891 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/GitHubActionTutorial.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/GitHubActionTutorial.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, Title, TutorialStep, TutorialStepList } from 'design-system'; + import * as React from 'react'; +import { BasicSeparator, Title, TutorialStep, TutorialStepList } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; import { Component } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/SecretStep.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/SecretStep.tsx index 82669d1f110..acb6dfef1db 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/SecretStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/SecretStep.tsx @@ -17,16 +17,16 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Link, LinkStandalone } from '@sonarsource/echoes-react'; +import { FormattedMessage } from 'react-intl'; import { BasicSeparator, ClipboardIconButton, FlagMessage, NumberedList, NumberedListItem, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { useProjectBindingQuery } from '../../../queries/devops-integration'; import { AlmSettingsInstance } from '../../../types/alm-settings'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/__tests__/GithubActionTutorial-it.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/__tests__/GithubActionTutorial-it.tsx index 12c20815c99..2e5f29a69cc 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/__tests__/GithubActionTutorial-it.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/__tests__/GithubActionTutorial-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React from 'react'; import AlmSettingsServiceMock from '../../../../api/mocks/AlmSettingsServiceMock'; import UserTokensMock from '../../../../api/mocks/UserTokensMock'; import { mockAlmSettingsInstance } from '../../../../helpers/mocks/alm-settings'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx index b4081a07c94..beb74fefcc9 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NumberedListItem } from 'design-system'; + import * as React from 'react'; +import { NumberedListItem } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { Component } from '../../../../types/types'; import { CompilationInfo } from '../../components/CompilationInfo'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Dart.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Dart.tsx index 44c989c4e6d..b5eb0dfeb2d 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Dart.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Dart.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, Link, NumberedListItem } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { CodeSnippet, Link, NumberedListItem } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx index cfb0fdf3ec7..baa22814624 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Component } from '../../../../types/types'; import CreateYmlFile from '../../components/CreateYmlFile'; import { GITHUB_ACTIONS_RUNS_ON_WINDOWS } from '../constants'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx index 985c0cc62a6..971a27728cc 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Component } from '../../../../types/types'; import CreateYmlFile from '../../components/CreateYmlFile'; import GradleBuild from '../../components/GradleBuild'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx index 36270867aa6..db8713ed716 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Component } from '../../../../types/types'; import CreateYmlFile from '../../components/CreateYmlFile'; import { GITHUB_ACTIONS_RUNS_ON_LINUX } from '../constants'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/MonorepoDocLinkFallback.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/MonorepoDocLinkFallback.tsx index 5a6cd34cf3c..b1b73a8d452 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/MonorepoDocLinkFallback.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/MonorepoDocLinkFallback.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NumberedListItem } from 'design-system'; -import * as React from 'react'; +import { NumberedListItem } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { translate } from '../../../../helpers/l10n'; import DocumentationLink from '../../../common/DocumentationLink'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Others.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Others.tsx index e3659384edd..73963402ecc 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Others.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Others.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Component } from '../../../../types/types'; import CreateYmlFile from '../../components/CreateYmlFile'; import DefaultProjectKey from '../../components/DefaultProjectKey'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/constants.ts b/server/sonar-web/src/main/js/components/tutorials/github-action/constants.ts index 815379044f3..b8dd07dddd7 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/constants.ts +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/constants.ts @@ -17,5 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export const GITHUB_ACTIONS_RUNS_ON_LINUX = 'ubuntu-latest'; export const GITHUB_ACTIONS_RUNS_ON_WINDOWS = 'windows-latest'; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/utils.ts b/server/sonar-web/src/main/js/components/tutorials/github-action/utils.ts index 4a5dacf2b45..191a45f5101 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/utils.ts +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export function generateGitHubActionsYaml( mainBranchName: string, branchesEnabled: boolean, diff --git a/server/sonar-web/src/main/js/components/tutorials/gitlabci/EnvironmentVariablesStep.tsx b/server/sonar-web/src/main/js/components/tutorials/gitlabci/EnvironmentVariablesStep.tsx index 260e3bf6536..103b2c85690 100644 --- a/server/sonar-web/src/main/js/components/tutorials/gitlabci/EnvironmentVariablesStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/gitlabci/EnvironmentVariablesStep.tsx @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { FormattedMessage } from 'react-intl'; import { BasicSeparator, ClipboardIconButton, @@ -25,9 +27,7 @@ import { NumberedListItem, TutorialStep, UnorderedList, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Component } from '../../../types/types'; import { LoggedInUser } from '../../../types/users'; diff --git a/server/sonar-web/src/main/js/components/tutorials/gitlabci/GitLabCITutorial.tsx b/server/sonar-web/src/main/js/components/tutorials/gitlabci/GitLabCITutorial.tsx index 0b778d63c6e..0869bc56b0a 100644 --- a/server/sonar-web/src/main/js/components/tutorials/gitlabci/GitLabCITutorial.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/gitlabci/GitLabCITutorial.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, Title, TutorialStepList } from 'design-system'; + import * as React from 'react'; +import { BasicSeparator, Title, TutorialStepList } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { AlmKeys } from '../../../types/alm-settings'; import { Component } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/gitlabci/YmlFileStep.tsx b/server/sonar-web/src/main/js/components/tutorials/gitlabci/YmlFileStep.tsx index 6ca29e6a793..699a1a89747 100644 --- a/server/sonar-web/src/main/js/components/tutorials/gitlabci/YmlFileStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/gitlabci/YmlFileStep.tsx @@ -17,6 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { ClipboardIconButton, CodeSnippet, @@ -24,9 +27,7 @@ import { NumberedList, NumberedListItem, TutorialStep, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import withAvailableFeatures, { WithAvailableFeaturesProps, } from '../../../app/components/available-features/withAvailableFeatures'; diff --git a/server/sonar-web/src/main/js/components/tutorials/gitlabci/__tests__/GitLabCITutorial-it.tsx b/server/sonar-web/src/main/js/components/tutorials/gitlabci/__tests__/GitLabCITutorial-it.tsx index 93c062e5fa6..d657785904b 100644 --- a/server/sonar-web/src/main/js/components/tutorials/gitlabci/__tests__/GitLabCITutorial-it.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/gitlabci/__tests__/GitLabCITutorial-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React from 'react'; import UserTokensMock from '../../../../api/mocks/UserTokensMock'; import { mockComponent } from '../../../../helpers/mocks/component'; import { mockLanguage, mockLoggedInUser } from '../../../../helpers/testMocks'; diff --git a/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/PipeCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/PipeCommand.tsx index 161620d17e8..d1b1406b0df 100644 --- a/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/PipeCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/PipeCommand.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet } from 'design-system'; -import * as React from 'react'; + +import { CodeSnippet } from '~design-system'; import { CompilationInfo } from '../../components/CompilationInfo'; import { Arch, AutoConfig, BuildTools, OSs, TutorialConfig } from '../../types'; import { diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsStep.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsStep.tsx index 079af4ae849..6d4bd85c4a7 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsStep.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NumberedList, NumberedListItem, TutorialStep } from 'design-system'; + import * as React from 'react'; +import { NumberedList, NumberedListItem, TutorialStep } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Component } from '../../../types/types'; import { withCLanguageFeature } from '../../hoc/withCLanguageFeature'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsTutorial.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsTutorial.tsx index 40368aa7222..b92c7bae787 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsTutorial.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsTutorial.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BasicSeparator, Title, TutorialStepList } from 'design-system'; + import * as React from 'react'; +import { BasicSeparator, Title, TutorialStepList } from '~design-system'; import withAvailableFeatures, { WithAvailableFeaturesProps, } from '../../../app/components/available-features/withAvailableFeatures'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/MultiBranchPipelineStep.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/MultiBranchPipelineStep.tsx index 9655bc5fc29..804587d6462 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/MultiBranchPipelineStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/MultiBranchPipelineStep.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { CodeSnippet, ListItem, @@ -24,8 +25,7 @@ import { NumberedListItem, TutorialStep, UnorderedList, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { AlmKeys, diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/PipelineStep.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/PipelineStep.tsx index db8c76c3447..933f0526002 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/PipelineStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/PipelineStep.tsx @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ListItem, NumberedList, NumberedListItem, TutorialStep, UnorderedList, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { AlmKeys } from '../../../types/alm-settings'; import LabelActionPair from '../components/LabelActionPair'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/PreRequisitesStep.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/PreRequisitesStep.tsx index c1c1246f064..0db0e390f7a 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/PreRequisitesStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/PreRequisitesStep.tsx @@ -19,9 +19,8 @@ */ import { Text } from '@sonarsource/echoes-react'; -import { FlagMessage, Link, TutorialStep } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { FlagMessage, Link, TutorialStep } from '~design-system'; import { DocLink } from '../../../helpers/doc-links'; import { useDocUrl } from '../../../helpers/docs'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/SelectAlmStep.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/SelectAlmStep.tsx index 5fab28775e9..61a8f8e2141 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/SelectAlmStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/SelectAlmStep.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ToggleButton, TutorialStep } from 'design-system'; -import * as React from 'react'; + +import { ToggleButton, TutorialStep } from '~design-system'; import { hasMessage, translate } from '../../../helpers/l10n'; import { AlmKeys } from '../../../types/alm-settings'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStep.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStep.tsx index 504b7693884..d1c6307f582 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStep.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable react/no-unused-prop-types */ -import { NumberedList, TutorialStep } from 'design-system'; -import * as React from 'react'; +import { NumberedList, TutorialStep } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { AlmKeys, diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepBitbucket.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepBitbucket.tsx index 884e7fb04ba..ac2b039f586 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepBitbucket.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepBitbucket.tsx @@ -17,9 +17,15 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, FlagMessage, ListItem, NumberedListItem, UnorderedList } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { + CodeSnippet, + FlagMessage, + ListItem, + NumberedListItem, + UnorderedList, +} from '~design-system'; import { translate } from '../../../helpers/l10n'; import { stripTrailingSlash } from '../../../helpers/urls'; import { diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepGitLab.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepGitLab.tsx index 3781a5f650d..fb83ddf7d3b 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepGitLab.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepGitLab.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, ListItem, NumberedListItem, UnorderedList } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { CodeSnippet, ListItem, NumberedListItem, UnorderedList } from '~design-system'; import { translate } from '../../../helpers/l10n'; import LabelActionPair from '../components/LabelActionPair'; import SentenceWithHighlights from '../components/SentenceWithHighlights'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepGithub.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepGithub.tsx index 9574d4c0bd6..0a163efc7fb 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepGithub.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepGithub.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, Link, ListItem, NumberedListItem, UnorderedList } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { CodeSnippet, Link, ListItem, NumberedListItem, UnorderedList } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../../types/alm-settings'; import LabelActionPair from '../components/LabelActionPair'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/JenkinsTutorial-it.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/JenkinsTutorial-it.tsx index 00da86bece4..643c6a3688d 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/JenkinsTutorial-it.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/JenkinsTutorial-it.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import AlmSettingsServiceMock from '../../../../api/mocks/AlmSettingsServiceMock'; import UserTokensMock from '../../../../api/mocks/UserTokensMock'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CFamily.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CFamily.tsx index bdefe1c1706..9ad4da48260 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CFamily.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CFamily.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NumberedListItem } from 'design-system'; import * as React from 'react'; +import { NumberedListItem } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { CompilationInfo } from '../../components/CompilationInfo'; import DefaultProjectKey from '../../components/DefaultProjectKey'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CreateJenkinsfileBulletPoint.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CreateJenkinsfileBulletPoint.tsx index 4d6d9b2ad4f..03dfea255c8 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CreateJenkinsfileBulletPoint.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CreateJenkinsfileBulletPoint.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, FlagMessage, HelperHintIcon, NumberedListItem } from 'design-system'; + import * as React from 'react'; +import { CodeSnippet, FlagMessage, HelperHintIcon, NumberedListItem } from '~design-system'; import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; import SentenceWithFilename from '../../components/SentenceWithFilename'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNet.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNet.tsx index bf5e5a08d76..f98236c303c 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNet.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNet.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { NumberedListItem } from 'design-system'; import * as React from 'react'; +import { NumberedListItem } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { Component } from '../../../../types/types'; import RenderOptions from '../../components/RenderOptions'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetCore.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetCore.tsx index 111a36ef891..e43ad85a7e0 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetCore.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetCore.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, NumberedListItem } from 'design-system'; -import * as React from 'react'; + +import { CodeSnippet, NumberedListItem } from '~design-system'; import SentenceWithFilename from '../../components/SentenceWithFilename'; import { OSs } from '../../types'; import { DotNetCoreFrameworkProps, OSDotNet } from './DotNet'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetFramework.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetFramework.tsx index e4a744adcc4..8aa437ef78e 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetFramework.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetFramework.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, NumberedListItem } from 'design-system'; -import * as React from 'react'; + +import { CodeSnippet, NumberedListItem } from '~design-system'; import SentenceWithFilename from '../../components/SentenceWithFilename'; import { DotNetCoreFrameworkProps } from './DotNet'; import DotNetPrereqsMSBuild from './DotNetPrereqsMSBuild'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetPrereqsMSBuild.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetPrereqsMSBuild.tsx index 704a042cd03..bfd2e07f37b 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetPrereqsMSBuild.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetPrereqsMSBuild.tsx @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ClipboardIconButton, FlagMessage, ListItem, NumberedListItem, OrderedList, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { InlineSnippet } from '../../components/InlineSnippet'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetPrereqsScanner.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetPrereqsScanner.tsx index 702613124bf..8d7e160a05f 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetPrereqsScanner.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetPrereqsScanner.tsx @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ClipboardIconButton, FlagMessage, ListItem, NumberedListItem, OrderedList, -} from 'design-system'; -import * as React from 'react'; +} from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { InlineSnippet } from '../../components/InlineSnippet'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Gradle.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Gradle.tsx index f4fdd185217..a711e1fe81d 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Gradle.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Gradle.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, NumberedListItem } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { CodeSnippet, NumberedListItem } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import GradleBuildSelection from '../../components/GradleBuildSelection'; import { InlineSnippet } from '../../components/InlineSnippet'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Maven.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Maven.tsx index edbce95c872..987c53e7f88 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Maven.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Maven.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { LanguageProps } from '../JenkinsStep'; import CreateJenkinsfileBulletPoint from './CreateJenkinsfileBulletPoint'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Other.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Other.tsx index ca8480f30fd..5709af9026d 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Other.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Other.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import DefaultProjectKey from '../../components/DefaultProjectKey'; import { LanguageProps } from '../JenkinsStep'; import CreateJenkinsfileBulletPoint from './CreateJenkinsfileBulletPoint'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/BuildToolForm.tsx b/server/sonar-web/src/main/js/components/tutorials/other/BuildToolForm.tsx index 67445debac4..2750f5258f7 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/BuildToolForm.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/BuildToolForm.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { translate } from '../../../helpers/l10n'; import { withCLanguageFeature } from '../../hoc/withCLanguageFeature'; import BuildConfigSelection from '../components/BuildConfigSelection'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/DoneNextSteps.tsx b/server/sonar-web/src/main/js/components/tutorials/other/DoneNextSteps.tsx index 141f04dc95e..3112e280764 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/DoneNextSteps.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/DoneNextSteps.tsx @@ -21,9 +21,9 @@ import styled from '@emotion/styled'; import { animated, config, useSpring } from '@react-spring/web'; import { LinkStandalone as Link } from '@sonarsource/echoes-react'; -import { BasicSeparator, FlagVisual } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { BasicSeparator, FlagVisual } from '~design-system'; import withAppStateContext from '../../../app/components/app-state/withAppStateContext'; import { DocLink } from '../../../helpers/doc-links'; import { useDocUrl } from '../../../helpers/docs'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/OtherTutorial.tsx b/server/sonar-web/src/main/js/components/tutorials/other/OtherTutorial.tsx index 98e4080383f..a67daca8fc4 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/OtherTutorial.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/OtherTutorial.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LightLabel, PageContentFontWrapper, Title } from 'design-system'; + import * as React from 'react'; +import { LightLabel, PageContentFontWrapper, Title } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Component } from '../../../types/types'; import { LoggedInUser } from '../../../types/users'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/ProjectAnalysisStep.tsx b/server/sonar-web/src/main/js/components/tutorials/other/ProjectAnalysisStep.tsx index ed8fb265cd1..2359bb76f52 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/ProjectAnalysisStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/ProjectAnalysisStep.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { noop } from 'lodash'; import * as React from 'react'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/TokenStep.tsx b/server/sonar-web/src/main/js/components/tutorials/other/TokenStep.tsx index 3045d4a407c..8d33c3a7b4b 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/TokenStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/TokenStep.tsx @@ -20,6 +20,9 @@ import { keyframes } from '@emotion/react'; import styled from '@emotion/styled'; +import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; +import { SingleValue } from 'react-select'; import { ButtonPrimary, ButtonSecondary, @@ -37,10 +40,7 @@ import { ToggleButton, ToggleButtonsOption, TrashIcon, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; -import { SingleValue } from 'react-select'; +} from '~design-system'; import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip'; import { generateToken, getTokens, revokeToken } from '../../../api/user-tokens'; import { DocLink } from '../../../helpers/doc-links'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/__tests__/DoneNextSteps-it.tsx b/server/sonar-web/src/main/js/components/tutorials/other/__tests__/DoneNextSteps-it.tsx index eabfd98ff04..9edff911e5b 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/__tests__/DoneNextSteps-it.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/__tests__/DoneNextSteps-it.tsx @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { mockAppState } from '../../../../helpers/testMocks'; import { renderApp } from '../../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/__tests__/OtherTutorial-it.tsx b/server/sonar-web/src/main/js/components/tutorials/other/__tests__/OtherTutorial-it.tsx index b6f15c19ae8..54ed99f2475 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/__tests__/OtherTutorial-it.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/__tests__/OtherTutorial-it.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; -import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; import UserTokensMock from '../../../../api/mocks/UserTokensMock'; import { mockComponent } from '../../../../helpers/mocks/component'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/AnalysisCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/AnalysisCommand.tsx index 59437d570f4..cbaabc71a3a 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/AnalysisCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/AnalysisCommand.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Component } from '../../../../types/types'; import { Arch, AutoConfig, BuildTools, OSs, TutorialConfig } from '../../types'; import ClangGCCCustom from './ClangGCCCommand'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/ClangGCCCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/ClangGCCCommand.tsx index 0498b2c2c46..07c995fc8eb 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/ClangGCCCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/ClangGCCCommand.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Component } from '../../../../types/types'; import { CompilationInfo } from '../../components/CompilationInfo'; import { Arch, OSs } from '../../types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNet.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNet.tsx index 6ff8bda1751..4f57980ae56 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNet.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNet.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { translate } from '../../../../helpers/l10n'; import { Component } from '../../../../types/types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetCore.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetCore.tsx index c48c32e4dbe..4790ade6f7e 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetCore.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetCore.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, FlagMessage, SubHeading } from 'design-system'; -import * as React from 'react'; + +import { CodeSnippet, FlagMessage, SubHeading } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { DotNetProps } from './DotNet'; import DotNetExecute from './DotNetExecute'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetExecute.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetExecute.tsx index feaffb6accb..84261fe4a57 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetExecute.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetExecute.tsx @@ -19,9 +19,8 @@ */ import { LinkStandalone as Link } from '@sonarsource/echoes-react'; -import { CodeSnippet, SubHeading } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { CodeSnippet, SubHeading } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetFramework.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetFramework.tsx index 63258d75f16..e2be7f35f8b 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetFramework.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetFramework.tsx @@ -19,9 +19,8 @@ */ import { LinkStandalone as Link } from '@sonarsource/echoes-react'; -import { SubHeading } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { SubHeading } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadBuildWrapper.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadBuildWrapper.tsx index d0af71072b8..f369e91d457 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadBuildWrapper.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadBuildWrapper.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, DownloadButton, SubHeading } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { CodeSnippet, DownloadButton, SubHeading } from '~design-system'; import { translate } from '../../../../helpers/l10n'; import { getBaseUrl } from '../../../../helpers/system'; import { InlineSnippet } from '../../components/InlineSnippet'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx index 60bbf2424a8..1b00d642687 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx @@ -19,15 +19,14 @@ */ import { Link } from '@sonarsource/echoes-react'; +import { FormattedMessage } from 'react-intl'; import { ClipboardIconButton, CodeSnippet, NumberedList, NumberedListItem, SubHeading, -} from 'design-system'; -import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; +} from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecBuildWrapper.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecBuildWrapper.tsx index a18b91f2e91..0646f9c26ac 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecBuildWrapper.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecBuildWrapper.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, Link, SubHeading } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { CodeSnippet, Link, SubHeading } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecScanner.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecScanner.tsx index d59b4006abb..84f2c4262b9 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecScanner.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecScanner.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, Link, SubHeading } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { CodeSnippet, Link, SubHeading } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx index b37180da5ad..6328925b383 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, Link, Note, SubHeading } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { CodeSnippet, Link, Note, SubHeading } from '~design-system'; import { GRADLE_SCANNER_VERSION } from '../../../../helpers/constants'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaMaven.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaMaven.tsx index df8f19ce85e..6942f7a479e 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaMaven.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaMaven.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { CodeSnippet, Link, SubHeading } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { CodeSnippet, Link, SubHeading } from '~design-system'; import { DocLink } from '../../../../helpers/doc-links'; import { useDocUrl } from '../../../../helpers/docs'; import { translate } from '../../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/Other.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/Other.tsx index 82500b1e060..646283c0008 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/Other.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/Other.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { Component } from '../../../../types/types'; import { Arch, OSs } from '../../types'; import DownloadScanner from './DownloadScanner'; diff --git a/server/sonar-web/src/main/js/components/tutorials/test-utils.ts b/server/sonar-web/src/main/js/components/tutorials/test-utils.ts index 2aff448489b..aee023dcbeb 100644 --- a/server/sonar-web/src/main/js/components/tutorials/test-utils.ts +++ b/server/sonar-web/src/main/js/components/tutorials/test-utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { byLabelText, byRole, byText } from '~sonar-aligned/helpers/testSelector'; import { BuildTools, GradleBuildDSL, OSs, TutorialModes } from './types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/types.ts b/server/sonar-web/src/main/js/components/tutorials/types.ts index 13f22602cc5..77eb740a45f 100644 --- a/server/sonar-web/src/main/js/components/tutorials/types.ts +++ b/server/sonar-web/src/main/js/components/tutorials/types.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum TutorialModes { Local = 'local', Jenkins = 'jenkins', diff --git a/server/sonar-web/src/main/js/components/tutorials/utils.ts b/server/sonar-web/src/main/js/components/tutorials/utils.ts index 14746271ee8..8a230b701e6 100644 --- a/server/sonar-web/src/main/js/components/tutorials/utils.ts +++ b/server/sonar-web/src/main/js/components/tutorials/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { GRADLE_SCANNER_VERSION } from '../../helpers/constants'; import { convertGithubApiUrlToLink, stripTrailingSlash } from '../../helpers/urls'; import { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../types/alm-settings'; diff --git a/server/sonar-web/src/main/js/components/ui/AdminPageHeader.tsx b/server/sonar-web/src/main/js/components/ui/AdminPageHeader.tsx index 356732ce473..1b3463c8c32 100644 --- a/server/sonar-web/src/main/js/components/ui/AdminPageHeader.tsx +++ b/server/sonar-web/src/main/js/components/ui/AdminPageHeader.tsx @@ -17,11 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { withTheme } from '@emotion/react'; import styled from '@emotion/styled'; import classNames from 'classnames'; -import { themeColor } from 'design-system'; -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; +import { themeColor } from '~design-system'; interface Props { children?: ReactNode; diff --git a/server/sonar-web/src/main/js/components/ui/Avatar.tsx b/server/sonar-web/src/main/js/components/ui/Avatar.tsx index 8239c5752c5..b8d6d67d0ab 100644 --- a/server/sonar-web/src/main/js/components/ui/Avatar.tsx +++ b/server/sonar-web/src/main/js/components/ui/Avatar.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Avatar as BaseAvatar } from 'design-system'; + import * as React from 'react'; +import { Avatar as BaseAvatar } from '~design-system'; import { AppStateContext } from '../../app/components/app-state/AppStateContext'; import { FCProps } from '../../types/misc'; import { GlobalSettingKeys } from '../../types/settings'; diff --git a/server/sonar-web/src/main/js/components/ui/DismissableAlert.tsx b/server/sonar-web/src/main/js/components/ui/DismissableAlert.tsx index f3e0125f092..34bed88ab14 100644 --- a/server/sonar-web/src/main/js/components/ui/DismissableAlert.tsx +++ b/server/sonar-web/src/main/js/components/ui/DismissableAlert.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { Banner, Variant } from 'design-system'; import * as React from 'react'; +import { Banner, Variant } from '~design-system'; import { get, save } from '../../helpers/storage'; export interface DismissableAlertProps { diff --git a/server/sonar-web/src/main/js/components/ui/FilesCounter.tsx b/server/sonar-web/src/main/js/components/ui/FilesCounter.tsx index 29b5d9f616e..08d43dda6b2 100644 --- a/server/sonar-web/src/main/js/components/ui/FilesCounter.tsx +++ b/server/sonar-web/src/main/js/components/ui/FilesCounter.tsx @@ -17,10 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; -import { Note, themeColor } from 'design-system'; -import React from 'react'; +import { Note, themeColor } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { MetricType } from '~sonar-aligned/types/metrics'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/ui/MandatoryFieldsExplanation.tsx b/server/sonar-web/src/main/js/components/ui/MandatoryFieldsExplanation.tsx index aec0fe22472..197d11b84f0 100644 --- a/server/sonar-web/src/main/js/components/ui/MandatoryFieldsExplanation.tsx +++ b/server/sonar-web/src/main/js/components/ui/MandatoryFieldsExplanation.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { LightLabel, RequiredIcon } from 'design-system'; -import * as React from 'react'; + import { FormattedMessage } from 'react-intl'; +import { LightLabel, RequiredIcon } from '~design-system'; import { translate } from '../../helpers/l10n'; export interface MandatoryFieldsExplanationProps { diff --git a/server/sonar-web/src/main/js/components/ui/Rating.tsx b/server/sonar-web/src/main/js/components/ui/Rating.tsx index e1f7b038233..03111cbe6c4 100644 --- a/server/sonar-web/src/main/js/components/ui/Rating.tsx +++ b/server/sonar-web/src/main/js/components/ui/Rating.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; import * as React from 'react'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/AdminPageHeader-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/AdminPageHeader-test.tsx index b0b37b2b09b..85f551df6b9 100644 --- a/server/sonar-web/src/main/js/components/ui/__tests__/AdminPageHeader-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/AdminPageHeader-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import React from 'react'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import { AdminPageHeader } from '../AdminPageHeader'; diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-test.tsx index 705becdf9b8..9177d69cfde 100644 --- a/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import * as React from 'react'; import { mockAppState } from '../../../helpers/testMocks'; import { renderComponent } from '../../../helpers/testReactTestingUtils'; import Avatar from '../Avatar'; diff --git a/server/sonar-web/src/main/js/components/ui/popups.tsx b/server/sonar-web/src/main/js/components/ui/popups.tsx index ad732d3dd99..f381c6854c0 100644 --- a/server/sonar-web/src/main/js/components/ui/popups.tsx +++ b/server/sonar-web/src/main/js/components/ui/popups.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable prefer-destructuring */ import classNames from 'classnames'; diff --git a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeButton.tsx b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeButton.tsx index 9e318506cd2..f6ee51f0630 100644 --- a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeButton.tsx +++ b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeButton.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Link } from '@sonarsource/echoes-react'; -import { ButtonSecondary } from 'design-system'; import * as React from 'react'; +import { ButtonSecondary } from '~design-system'; import { translate } from '../../helpers/l10n'; import { SystemUpgrade } from '../../types/system'; import SystemUpgradeForm from './SystemUpgradeForm'; diff --git a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeForm.tsx b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeForm.tsx index b378248c135..73739e28939 100644 --- a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeForm.tsx +++ b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeForm.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, Link, Modal } from 'design-system'; + import { filter, flatMap, isEmpty, negate } from 'lodash'; -import * as React from 'react'; +import { FlagMessage, Link, Modal } from '~design-system'; import { useAppState } from '../../app/components/app-state/withAppStateContext'; import { BANNER_VARIANT } from '../../app/components/update-notification/helpers'; import { translate } from '../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeIntermediate.tsx b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeIntermediate.tsx index 47c53228c02..448506a56d7 100644 --- a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeIntermediate.tsx +++ b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeIntermediate.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Accordion, BasicSeparator, Link, Note } from 'design-system'; + import * as React from 'react'; +import { Accordion, BasicSeparator, Link, Note } from '~design-system'; import { translate } from '../../helpers/l10n'; import { SystemUpgrade } from '../../types/system'; import DateFormatter from '../intl/DateFormatter'; diff --git a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeItem.tsx b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeItem.tsx index 8ad9a91bb50..bc187305969 100644 --- a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeItem.tsx +++ b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeItem.tsx @@ -18,9 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { DownloadButton, Link, SubHeading } from 'design-system'; -import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { DownloadButton, Link, SubHeading } from '~design-system'; import { DocLink } from '../../helpers/doc-links'; import { getEdition, diff --git a/server/sonar-web/src/main/js/components/upgrade/__tests__/SystemUpgrade-test.tsx b/server/sonar-web/src/main/js/components/upgrade/__tests__/SystemUpgrade-test.tsx index 3e9900d1cf6..dd19f764342 100644 --- a/server/sonar-web/src/main/js/components/upgrade/__tests__/SystemUpgrade-test.tsx +++ b/server/sonar-web/src/main/js/components/upgrade/__tests__/SystemUpgrade-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; diff --git a/server/sonar-web/src/main/js/components/upgrade/__tests__/utils-test.ts b/server/sonar-web/src/main/js/components/upgrade/__tests__/utils-test.ts index 844f946fb48..dacc523ab36 100644 --- a/server/sonar-web/src/main/js/components/upgrade/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/components/upgrade/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { SystemUpgrade } from '../../../types/system'; import * as u from '../utils'; diff --git a/server/sonar-web/src/main/js/components/upgrade/utils.ts b/server/sonar-web/src/main/js/components/upgrade/utils.ts index 625dc4a1e12..42a0df22bc2 100644 --- a/server/sonar-web/src/main/js/components/upgrade/utils.ts +++ b/server/sonar-web/src/main/js/components/upgrade/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { groupBy, sortBy } from 'lodash'; import { SystemUpgrade } from '../../types/system'; diff --git a/server/sonar-web/src/main/js/components/workspace/Workspace.tsx b/server/sonar-web/src/main/js/components/workspace/Workspace.tsx index 47a9198734a..b91ce7f4239 100644 --- a/server/sonar-web/src/main/js/components/workspace/Workspace.tsx +++ b/server/sonar-web/src/main/js/components/workspace/Workspace.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { omit, uniqBy } from 'lodash'; import * as React from 'react'; import { getRulesApp } from '../../api/rules'; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentTitle.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentTitle.tsx index c81a9328d26..af605d075b0 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentTitle.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentTitle.tsx @@ -17,9 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; -import { QualifierIcon } from 'design-system'; +import { QualifierIcon } from '~design-system'; import { translate } from '../../helpers/l10n'; import { collapsePath } from '../../helpers/path'; import { isDefined } from '../../helpers/types'; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentViewer.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentViewer.tsx index 9a35b138a1a..df2172d1348 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentViewer.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentViewer.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { SourceViewerFile } from '../../types/types'; import SourceViewer from '../SourceViewer/SourceViewer'; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx index 937e24e1984..3cc7b6f2bcc 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx @@ -17,7 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; +import * as React from 'react'; +import { DraggableCore, DraggableData } from 'react-draggable'; import { CloseIcon, CollapseIcon, @@ -26,9 +29,7 @@ import { InteractiveIcon, MinimizeIcon, themeColor, -} from 'design-system'; -import * as React from 'react'; -import { DraggableCore, DraggableData } from 'react-draggable'; +} from '~design-system'; import { translate } from '../../helpers/l10n'; import Tooltip from '../controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceNav.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceNav.tsx index 97ea88c06c0..6192662e3c1 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceNav.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceNav.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import * as React from 'react'; import WorkspaceNavComponent from './WorkspaceNavComponent'; import { ComponentDescriptor } from './context'; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceNavComponent.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceNavComponent.tsx index 07424c8ff26..f62cf96ffa3 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceNavComponent.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceNavComponent.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import WorkspaceComponentTitle from './WorkspaceComponentTitle'; import WorkspaceNavItem from './WorkspaceNavItem'; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceNavItem.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceNavItem.tsx index b5cd9db3356..5eeb5d5a419 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceNavItem.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceNavItem.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { CloseIcon, InteractiveIcon, themeColor } from 'design-system'; import * as React from 'react'; +import { CloseIcon, InteractiveIcon, themeColor } from '~design-system'; import { translate } from '../../helpers/l10n'; export interface Props { diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspacePortal.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspacePortal.tsx index 2c4e6d7ebd7..3078f108bdf 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspacePortal.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspacePortal.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { createPortal } from 'react-dom'; diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/Workspace-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/Workspace-test.tsx index f3762a582b3..a259d958b6e 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/Workspace-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/Workspace-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import * as React from 'react'; import { byRole, byText } from '~sonar-aligned/helpers/testSelector'; @@ -45,6 +46,9 @@ jest.mock('../../../api/rules', () => ({ // Simplify the SourceViewer jest.mock('../../SourceViewer/SourceViewer', () => { + const { useEffect } = jest.requireActual('react'); + const { ComponentQualifier } = jest.requireActual('~sonar-aligned/types/component'); + function SourceViewer({ component, onLoaded, @@ -53,7 +57,7 @@ jest.mock('../../SourceViewer/SourceViewer', () => { onLoaded: (component: { path: string; q: string }) => void; }) { // Trigger the "loadComponent" to update the name of the component - React.useEffect(() => { + useEffect(() => { onLoaded({ path: `path/to/component/${component}`, q: ComponentQualifier.File }); }, [component, onLoaded]); diff --git a/server/sonar-web/src/main/js/components/workspace/context.ts b/server/sonar-web/src/main/js/components/workspace/context.ts index b6d81af7dea..615e53213d3 100644 --- a/server/sonar-web/src/main/js/components/workspace/context.ts +++ b/server/sonar-web/src/main/js/components/workspace/context.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { createContext } from 'react'; import { BranchLike } from '../../types/branch-like'; import { Dict } from '../../types/types'; diff --git a/server/sonar-web/design-system/README.md b/server/sonar-web/src/main/js/design-system/README.md index c85e257d539..c85e257d539 100644 --- a/server/sonar-web/design-system/README.md +++ b/server/sonar-web/src/main/js/design-system/README.md diff --git a/server/sonar-web/design-system/src/components/Accordion.tsx b/server/sonar-web/src/main/js/design-system/components/Accordion.tsx index 024a4eb8774..024a4eb8774 100644 --- a/server/sonar-web/design-system/src/components/Accordion.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Accordion.tsx diff --git a/server/sonar-web/design-system/src/components/Badge.tsx b/server/sonar-web/src/main/js/design-system/components/Badge.tsx index a88c457b4e6..90268436259 100644 --- a/server/sonar-web/design-system/src/components/Badge.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Badge.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeBorder, themeColor, themeContrast } from '../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/Banner.tsx b/server/sonar-web/src/main/js/design-system/components/Banner.tsx index a53d34c4341..8500ce7273a 100644 --- a/server/sonar-web/design-system/src/components/Banner.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Banner.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { ReactNode } from 'react'; import { useIntl } from 'react-intl'; diff --git a/server/sonar-web/design-system/src/components/BarChart.tsx b/server/sonar-web/src/main/js/design-system/components/BarChart.tsx index 1601deeea2c..ad149cee618 100644 --- a/server/sonar-web/design-system/src/components/BarChart.tsx +++ b/server/sonar-web/src/main/js/design-system/components/BarChart.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { max } from 'd3-array'; import { ScaleBand, ScaleLinear, scaleBand, scaleLinear } from 'd3-scale'; diff --git a/server/sonar-web/design-system/src/components/BorderlessAccordion.tsx b/server/sonar-web/src/main/js/design-system/components/BorderlessAccordion.tsx index 1fae58315d6..cad39d617ca 100644 --- a/server/sonar-web/design-system/src/components/BorderlessAccordion.tsx +++ b/server/sonar-web/src/main/js/design-system/components/BorderlessAccordion.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; import { uniqueId } from 'lodash'; import * as React from 'react'; diff --git a/server/sonar-web/design-system/src/components/Breadcrumbs.tsx b/server/sonar-web/src/main/js/design-system/components/Breadcrumbs.tsx index 7444361630d..47fa0c0b686 100644 --- a/server/sonar-web/design-system/src/components/Breadcrumbs.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Breadcrumbs.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import React from 'react'; diff --git a/server/sonar-web/design-system/src/components/BubbleChart.tsx b/server/sonar-web/src/main/js/design-system/components/BubbleChart.tsx index 8dbe5e64226..68f915f79d0 100644 --- a/server/sonar-web/design-system/src/components/BubbleChart.tsx +++ b/server/sonar-web/src/main/js/design-system/components/BubbleChart.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { max, min } from 'd3-array'; diff --git a/server/sonar-web/design-system/src/components/ClickEventBoundary.tsx b/server/sonar-web/src/main/js/design-system/components/ClickEventBoundary.tsx index 876e9dda46b..6adbebb915f 100644 --- a/server/sonar-web/design-system/src/components/ClickEventBoundary.tsx +++ b/server/sonar-web/src/main/js/design-system/components/ClickEventBoundary.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React from 'react'; export interface ClickEventBoundaryProps { diff --git a/server/sonar-web/design-system/src/components/CodeSnippet.tsx b/server/sonar-web/src/main/js/design-system/components/CodeSnippet.tsx index 931031b855a..931031b855a 100644 --- a/server/sonar-web/design-system/src/components/CodeSnippet.tsx +++ b/server/sonar-web/src/main/js/design-system/components/CodeSnippet.tsx diff --git a/server/sonar-web/design-system/src/components/CodeSyntaxHighlighter.tsx b/server/sonar-web/src/main/js/design-system/components/CodeSyntaxHighlighter.tsx index 693c3cdde83..339765de82c 100644 --- a/server/sonar-web/design-system/src/components/CodeSyntaxHighlighter.tsx +++ b/server/sonar-web/src/main/js/design-system/components/CodeSyntaxHighlighter.tsx @@ -20,7 +20,38 @@ import styled from '@emotion/styled'; import classNames from 'classnames'; -import hljs, { HighlightResult } from 'highlight.js'; +import { HighlightResult } from 'highlight.js'; +import hljs from 'highlight.js/lib/core'; +import actionscript from 'highlight.js/lib/languages/actionscript'; +import bash from 'highlight.js/lib/languages/bash'; +import c from 'highlight.js/lib/languages/c'; +import cpp from 'highlight.js/lib/languages/cpp'; +import csharp from 'highlight.js/lib/languages/csharp'; +import css from 'highlight.js/lib/languages/css'; +import dart from 'highlight.js/lib/languages/dart'; +import docker from 'highlight.js/lib/languages/dockerfile'; +import go from 'highlight.js/lib/languages/go'; +import gradle from 'highlight.js/lib/languages/gradle'; +import java from 'highlight.js/lib/languages/java'; +import javascript from 'highlight.js/lib/languages/javascript'; +import json from 'highlight.js/lib/languages/json'; +import kotlin from 'highlight.js/lib/languages/kotlin'; +import objectivec from 'highlight.js/lib/languages/objectivec'; +import pgsql from 'highlight.js/lib/languages/pgsql'; +import php from 'highlight.js/lib/languages/php'; +import plaintext from 'highlight.js/lib/languages/plaintext'; +import powershell from 'highlight.js/lib/languages/powershell'; +import properties from 'highlight.js/lib/languages/properties'; +import python from 'highlight.js/lib/languages/python'; +import ruby from 'highlight.js/lib/languages/ruby'; +import scala from 'highlight.js/lib/languages/scala'; +import shell from 'highlight.js/lib/languages/shell'; +import sql from 'highlight.js/lib/languages/sql'; +import swift from 'highlight.js/lib/languages/swift'; +import typescript from 'highlight.js/lib/languages/typescript'; +import vbnet from 'highlight.js/lib/languages/vbnet'; +import xml from 'highlight.js/lib/languages/xml'; +import yaml from 'highlight.js/lib/languages/yaml'; import apex from 'highlightjs-apex'; import cobol from 'highlightjs-cobol'; import abap from 'highlightjs-sap-abap'; @@ -29,14 +60,51 @@ import { themeColor, themeContrast } from '../helpers/theme'; import { hljsIssueIndicatorPlugin, hljsUnderlinePlugin } from '../sonar-aligned'; import { SafeHTMLInjection, SanitizeLevel } from '../sonar-aligned/helpers/sanitize'; +// Supported Languages: https://highlightjs.readthedocs.io/en/latest/supported-languages.html +// Registering languages individually reduce the packaged size to ~62kb instead of ~440kb +// Terraform package is outdated an unmaintained +hljs.registerLanguage('actionscript', actionscript); +hljs.registerLanguage('bash', bash); +hljs.registerLanguage('c', c); +hljs.registerLanguage('cpp', cpp); +hljs.registerLanguage('csharp', csharp); +hljs.registerLanguage('css', css); +hljs.registerLanguage('docker', docker); +hljs.registerLanguage('go', go); +hljs.registerLanguage('gradle', gradle); +hljs.registerLanguage('java', java); +hljs.registerLanguage('javascript', javascript); +hljs.registerLanguage('json', json); +hljs.registerLanguage('dart', dart); +hljs.registerLanguage('kotlin', kotlin); +hljs.registerLanguage('objectivec', objectivec); +hljs.registerLanguage('pgsql', pgsql); +hljs.registerLanguage('php', php); +hljs.registerLanguage('plaintext', plaintext); +hljs.registerLanguage('powershell', powershell); +hljs.registerLanguage('properties', properties); +hljs.registerLanguage('python', python); +hljs.registerLanguage('ruby', ruby); +hljs.registerLanguage('scala', scala); +hljs.registerLanguage('shell', shell); +hljs.registerLanguage('sql', sql); +hljs.registerLanguage('swift', swift); +hljs.registerLanguage('typescript', typescript); +hljs.registerLanguage('vbnet', vbnet); +hljs.registerLanguage('xml', xml); +hljs.registerLanguage('yaml', yaml); hljs.registerLanguage('abap', abap); hljs.registerLanguage('apex', apex); hljs.registerLanguage('cobol', cobol); +// By default, highlight js will treat unknown language as plaintext hljs.registerAliases('azureresourcemanager', { languageName: 'json' }); hljs.registerAliases('flex', { languageName: 'actionscript' }); hljs.registerAliases('objc', { languageName: 'objectivec' }); hljs.registerAliases('plsql', { languageName: 'pgsql' }); +hljs.registerAliases('ipynb', { languageName: 'python' }); +// tsql plugin doesn't work with Vite and is ~13kb in size +hljs.registerAliases('tsql', { languageName: 'sql' }); hljs.registerAliases('secrets', { languageName: 'markdown' }); hljs.registerAliases('web', { languageName: 'xml' }); hljs.registerAliases(['cloudformation', 'kubernetes'], { languageName: 'yaml' }); diff --git a/server/sonar-web/design-system/src/components/ColorsLegend.tsx b/server/sonar-web/src/main/js/design-system/components/ColorsLegend.tsx index b1b111d0d47..a0ee2c2efc1 100644 --- a/server/sonar-web/design-system/src/components/ColorsLegend.tsx +++ b/server/sonar-web/src/main/js/design-system/components/ColorsLegend.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/CoverageIndicator.tsx b/server/sonar-web/src/main/js/design-system/components/CoverageIndicator.tsx index a6eb05c1009..90fc23b11df 100644 --- a/server/sonar-web/design-system/src/components/CoverageIndicator.tsx +++ b/server/sonar-web/src/main/js/design-system/components/CoverageIndicator.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor } from '../helpers/theme'; import { DonutChart } from './DonutChart'; diff --git a/server/sonar-web/design-system/src/components/DonutChart.tsx b/server/sonar-web/src/main/js/design-system/components/DonutChart.tsx index 4fc1e638445..f4c1554400d 100644 --- a/server/sonar-web/design-system/src/components/DonutChart.tsx +++ b/server/sonar-web/src/main/js/design-system/components/DonutChart.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { arc as d3Arc, pie as d3Pie, PieArcDatum } from 'd3-shape'; export interface DataPoint { diff --git a/server/sonar-web/design-system/src/components/Dropdown.tsx b/server/sonar-web/src/main/js/design-system/components/Dropdown.tsx index cf972125f20..bdfe49daac6 100644 --- a/server/sonar-web/design-system/src/components/Dropdown.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Dropdown.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React from 'react'; import { PopupPlacement, PopupZLevel } from '../helpers/positioning'; import { InputSizeKeys } from '../types/theme'; diff --git a/server/sonar-web/design-system/src/components/DropdownMenu.tsx b/server/sonar-web/src/main/js/design-system/components/DropdownMenu.tsx index 1251298bfcb..1251298bfcb 100644 --- a/server/sonar-web/design-system/src/components/DropdownMenu.tsx +++ b/server/sonar-web/src/main/js/design-system/components/DropdownMenu.tsx diff --git a/server/sonar-web/design-system/src/components/DropdownToggler.tsx b/server/sonar-web/src/main/js/design-system/components/DropdownToggler.tsx index c41ea91ab8b..ead84fb690c 100644 --- a/server/sonar-web/design-system/src/components/DropdownToggler.tsx +++ b/server/sonar-web/src/main/js/design-system/components/DropdownToggler.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import EscKeydownHandler from './EscKeydownHandler'; import { FocusOutHandler } from './FocusOutHandler'; import { OutsideClickHandler } from './OutsideClickHandler'; diff --git a/server/sonar-web/design-system/src/components/DuplicationsIndicator.tsx b/server/sonar-web/src/main/js/design-system/components/DuplicationsIndicator.tsx index 9a00372a892..a98399e2e23 100644 --- a/server/sonar-web/design-system/src/components/DuplicationsIndicator.tsx +++ b/server/sonar-web/src/main/js/design-system/components/DuplicationsIndicator.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor } from '../helpers/theme'; import { isDefined } from '../helpers/types'; diff --git a/server/sonar-web/design-system/src/components/EscKeydownHandler.tsx b/server/sonar-web/src/main/js/design-system/components/EscKeydownHandler.tsx index e0d5cf404e3..c2609e72c69 100644 --- a/server/sonar-web/design-system/src/components/EscKeydownHandler.tsx +++ b/server/sonar-web/src/main/js/design-system/components/EscKeydownHandler.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React from 'react'; import { Key } from '../helpers/keyboard'; diff --git a/server/sonar-web/design-system/src/components/ExecutionFlowAccordion.tsx b/server/sonar-web/src/main/js/design-system/components/ExecutionFlowAccordion.tsx index 04d8c44f668..28510140db9 100644 --- a/server/sonar-web/design-system/src/components/ExecutionFlowAccordion.tsx +++ b/server/sonar-web/src/main/js/design-system/components/ExecutionFlowAccordion.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { ReactNode } from 'react'; diff --git a/server/sonar-web/design-system/src/components/FacetBox.tsx b/server/sonar-web/src/main/js/design-system/components/FacetBox.tsx index d392798c9df..4b1a4adee2a 100644 --- a/server/sonar-web/design-system/src/components/FacetBox.tsx +++ b/server/sonar-web/src/main/js/design-system/components/FacetBox.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { uniqueId } from 'lodash'; diff --git a/server/sonar-web/design-system/src/components/FacetItem.tsx b/server/sonar-web/src/main/js/design-system/components/FacetItem.tsx index 84ce1aa0920..84ce1aa0920 100644 --- a/server/sonar-web/design-system/src/components/FacetItem.tsx +++ b/server/sonar-web/src/main/js/design-system/components/FacetItem.tsx diff --git a/server/sonar-web/design-system/src/components/FailedQGConditionLink.tsx b/server/sonar-web/src/main/js/design-system/components/FailedQGConditionLink.tsx index 3704dff64f3..31205dd1dd4 100644 --- a/server/sonar-web/design-system/src/components/FailedQGConditionLink.tsx +++ b/server/sonar-web/src/main/js/design-system/components/FailedQGConditionLink.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeColor } from '../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/FavoriteButton.tsx b/server/sonar-web/src/main/js/design-system/components/FavoriteButton.tsx index ef31b04fcb7..12264c9c07f 100644 --- a/server/sonar-web/design-system/src/components/FavoriteButton.tsx +++ b/server/sonar-web/src/main/js/design-system/components/FavoriteButton.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; import * as React from 'react'; import { InteractiveIcon } from './InteractiveIcon'; diff --git a/server/sonar-web/design-system/src/components/FlowStep.tsx b/server/sonar-web/src/main/js/design-system/components/FlowStep.tsx index 1c4ed82be74..cf9c68832e9 100644 --- a/server/sonar-web/design-system/src/components/FlowStep.tsx +++ b/server/sonar-web/src/main/js/design-system/components/FlowStep.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeColor } from '../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/FocusOutHandler.tsx b/server/sonar-web/src/main/js/design-system/components/FocusOutHandler.tsx index 9b66d9e9b58..ba0d7a2182d 100644 --- a/server/sonar-web/design-system/src/components/FocusOutHandler.tsx +++ b/server/sonar-web/src/main/js/design-system/components/FocusOutHandler.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; interface Props extends React.BaseHTMLAttributes<HTMLDivElement> { diff --git a/server/sonar-web/design-system/src/components/HighlightRing.tsx b/server/sonar-web/src/main/js/design-system/components/HighlightRing.tsx index 7fc9c54251e..af090074c86 100644 --- a/server/sonar-web/design-system/src/components/HighlightRing.tsx +++ b/server/sonar-web/src/main/js/design-system/components/HighlightRing.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeColor } from '../helpers'; diff --git a/server/sonar-web/design-system/src/components/HighlightedSection.tsx b/server/sonar-web/src/main/js/design-system/components/HighlightedSection.tsx index f9ab787b8d1..e065c3063f4 100644 --- a/server/sonar-web/design-system/src/components/HighlightedSection.tsx +++ b/server/sonar-web/src/main/js/design-system/components/HighlightedSection.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeBorder, themeColor } from '../helpers'; diff --git a/server/sonar-web/design-system/src/components/Histogram.tsx b/server/sonar-web/src/main/js/design-system/components/Histogram.tsx index 12d70dfa433..56e5ed029af 100644 --- a/server/sonar-web/design-system/src/components/Histogram.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Histogram.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable @typescript-eslint/prefer-optional-chain */ import styled from '@emotion/styled'; import { max } from 'd3-array'; diff --git a/server/sonar-web/design-system/src/components/HotspotRating.tsx b/server/sonar-web/src/main/js/design-system/components/HotspotRating.tsx index 8358f67e11c..9ae63255288 100644 --- a/server/sonar-web/design-system/src/components/HotspotRating.tsx +++ b/server/sonar-web/src/main/js/design-system/components/HotspotRating.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { HotspotRatingEnum, HotspotRatingLabel } from '../types/measures'; import { SeverityCriticalIcon, SeverityMajorIcon, SeverityMinorIcon } from './icons'; diff --git a/server/sonar-web/design-system/src/components/HtmlFormatter.tsx b/server/sonar-web/src/main/js/design-system/components/HtmlFormatter.tsx index 84377e23e21..85e5984d1e2 100644 --- a/server/sonar-web/design-system/src/components/HtmlFormatter.tsx +++ b/server/sonar-web/src/main/js/design-system/components/HtmlFormatter.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeBorder, themeColor } from '../helpers'; diff --git a/server/sonar-web/design-system/src/components/IlllustredSelectionCard.tsx b/server/sonar-web/src/main/js/design-system/components/IlllustredSelectionCard.tsx index 9114842a6c0..4030d6e7639 100644 --- a/server/sonar-web/design-system/src/components/IlllustredSelectionCard.tsx +++ b/server/sonar-web/src/main/js/design-system/components/IlllustredSelectionCard.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { ReactNode } from 'react'; diff --git a/server/sonar-web/design-system/src/components/InteractiveIcon.tsx b/server/sonar-web/src/main/js/design-system/components/InteractiveIcon.tsx index 292af594cc4..292af594cc4 100644 --- a/server/sonar-web/design-system/src/components/InteractiveIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/InteractiveIcon.tsx diff --git a/server/sonar-web/design-system/src/components/IssueMessageHighlighting.tsx b/server/sonar-web/src/main/js/design-system/components/IssueMessageHighlighting.tsx index 5347c117af0..b7cb86bb5ad 100644 --- a/server/sonar-web/design-system/src/components/IssueMessageHighlighting.tsx +++ b/server/sonar-web/src/main/js/design-system/components/IssueMessageHighlighting.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import * as React from 'react'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/KeyboardHint.tsx b/server/sonar-web/src/main/js/design-system/components/KeyboardHint.tsx index 935ce9275b7..2950d93ac24 100644 --- a/server/sonar-web/design-system/src/components/KeyboardHint.tsx +++ b/server/sonar-web/src/main/js/design-system/components/KeyboardHint.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { Key } from '../helpers/keyboard'; diff --git a/server/sonar-web/design-system/src/components/KeyboardHintKeys.tsx b/server/sonar-web/src/main/js/design-system/components/KeyboardHintKeys.tsx index 44ac3e6c4ba..78afa567e79 100644 --- a/server/sonar-web/design-system/src/components/KeyboardHintKeys.tsx +++ b/server/sonar-web/src/main/js/design-system/components/KeyboardHintKeys.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/Link.tsx b/server/sonar-web/src/main/js/design-system/components/Link.tsx index ed4114e1be3..ed4114e1be3 100644 --- a/server/sonar-web/design-system/src/components/Link.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Link.tsx diff --git a/server/sonar-web/design-system/src/components/LocationMarker.tsx b/server/sonar-web/src/main/js/design-system/components/LocationMarker.tsx index fb7dfd480a0..083e948d09d 100644 --- a/server/sonar-web/design-system/src/components/LocationMarker.tsx +++ b/server/sonar-web/src/main/js/design-system/components/LocationMarker.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { forwardRef, LegacyRef } from 'react'; diff --git a/server/sonar-web/design-system/src/components/MainAppBar.tsx b/server/sonar-web/src/main/js/design-system/components/MainAppBar.tsx index ab1c28403ec..49f95ce83d9 100644 --- a/server/sonar-web/design-system/src/components/MainAppBar.tsx +++ b/server/sonar-web/src/main/js/design-system/components/MainAppBar.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { throttle } from 'lodash'; diff --git a/server/sonar-web/design-system/src/components/MainMenu.tsx b/server/sonar-web/src/main/js/design-system/components/MainMenu.tsx index 9143980e950..f3168936a3f 100644 --- a/server/sonar-web/design-system/src/components/MainMenu.tsx +++ b/server/sonar-web/src/main/js/design-system/components/MainMenu.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/MainMenuItem.tsx b/server/sonar-web/src/main/js/design-system/components/MainMenuItem.tsx index c2f33f554bf..9c1b226e21e 100644 --- a/server/sonar-web/design-system/src/components/MainMenuItem.tsx +++ b/server/sonar-web/src/main/js/design-system/components/MainMenuItem.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { LAYOUT_GLOBAL_NAV_HEIGHT } from '../helpers/constants'; diff --git a/server/sonar-web/design-system/src/components/MultiSelector.tsx b/server/sonar-web/src/main/js/design-system/components/MultiSelector.tsx index ebbc3c06830..f8509cbbbe9 100644 --- a/server/sonar-web/design-system/src/components/MultiSelector.tsx +++ b/server/sonar-web/src/main/js/design-system/components/MultiSelector.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MultiSelectMenu } from './input/MultiSelectMenu'; interface Props { diff --git a/server/sonar-web/design-system/src/components/NavBarTabs.tsx b/server/sonar-web/src/main/js/design-system/components/NavBarTabs.tsx index 999716d190d..999716d190d 100644 --- a/server/sonar-web/design-system/src/components/NavBarTabs.tsx +++ b/server/sonar-web/src/main/js/design-system/components/NavBarTabs.tsx diff --git a/server/sonar-web/design-system/src/components/NavLink.tsx b/server/sonar-web/src/main/js/design-system/components/NavLink.tsx index bbdcd845e2c..cee447b2d5e 100644 --- a/server/sonar-web/design-system/src/components/NavLink.tsx +++ b/server/sonar-web/src/main/js/design-system/components/NavLink.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React from 'react'; import { NavLink as RouterNavLink, NavLinkProps as RouterNavLinkProps } from 'react-router-dom'; diff --git a/server/sonar-web/design-system/src/components/NewCodeLegend.tsx b/server/sonar-web/src/main/js/design-system/components/NewCodeLegend.tsx index 85a7863d68b..85a7863d68b 100644 --- a/server/sonar-web/design-system/src/components/NewCodeLegend.tsx +++ b/server/sonar-web/src/main/js/design-system/components/NewCodeLegend.tsx diff --git a/server/sonar-web/design-system/src/components/OutsideClickHandler.tsx b/server/sonar-web/src/main/js/design-system/components/OutsideClickHandler.tsx index 85a960207f4..1cefb116eb5 100644 --- a/server/sonar-web/design-system/src/components/OutsideClickHandler.tsx +++ b/server/sonar-web/src/main/js/design-system/components/OutsideClickHandler.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React from 'react'; import { findDOMNode } from 'react-dom'; diff --git a/server/sonar-web/design-system/src/components/Pill.tsx b/server/sonar-web/src/main/js/design-system/components/Pill.tsx index bcd2b2f246c..9b4c18e563f 100644 --- a/server/sonar-web/design-system/src/components/Pill.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Pill.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { css } from '@emotion/react'; import styled from '@emotion/styled'; import { forwardRef, ReactNode } from 'react'; diff --git a/server/sonar-web/design-system/src/components/QualityGateIndicator.tsx b/server/sonar-web/src/main/js/design-system/components/QualityGateIndicator.tsx index 47f1c9033e6..ed6ac0258a5 100644 --- a/server/sonar-web/design-system/src/components/QualityGateIndicator.tsx +++ b/server/sonar-web/src/main/js/design-system/components/QualityGateIndicator.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import React from 'react'; import { useIntl } from 'react-intl'; diff --git a/server/sonar-web/design-system/src/components/SearchHighlighter.tsx b/server/sonar-web/src/main/js/design-system/components/SearchHighlighter.tsx index 9720992b898..7d82599fc12 100644 --- a/server/sonar-web/design-system/src/components/SearchHighlighter.tsx +++ b/server/sonar-web/src/main/js/design-system/components/SearchHighlighter.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { deburr } from 'lodash'; import * as React from 'react'; diff --git a/server/sonar-web/design-system/src/components/SelectionCard.tsx b/server/sonar-web/src/main/js/design-system/components/SelectionCard.tsx index 74f7e24f024..d529d589caf 100644 --- a/server/sonar-web/design-system/src/components/SelectionCard.tsx +++ b/server/sonar-web/src/main/js/design-system/components/SelectionCard.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { useIntl } from 'react-intl'; diff --git a/server/sonar-web/design-system/src/components/Separator.tsx b/server/sonar-web/src/main/js/design-system/components/Separator.tsx index d02b4507225..9a1cb89d1a2 100644 --- a/server/sonar-web/design-system/src/components/Separator.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Separator.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeColor } from '../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/SizeIndicator.tsx b/server/sonar-web/src/main/js/design-system/components/SizeIndicator.tsx index 526b9832b4c..4154df9bd09 100644 --- a/server/sonar-web/design-system/src/components/SizeIndicator.tsx +++ b/server/sonar-web/src/main/js/design-system/components/SizeIndicator.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { inRange } from 'lodash'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/SonarCodeColorizer.tsx b/server/sonar-web/src/main/js/design-system/components/SonarCodeColorizer.tsx index 4b1d1915fcf..17c8c6beba5 100644 --- a/server/sonar-web/design-system/src/components/SonarCodeColorizer.tsx +++ b/server/sonar-web/src/main/js/design-system/components/SonarCodeColorizer.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeColor } from '../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/SonarQubeLogo.tsx b/server/sonar-web/src/main/js/design-system/components/SonarQubeLogo.tsx index db229fd9ee7..e83aed8a988 100644 --- a/server/sonar-web/design-system/src/components/SonarQubeLogo.tsx +++ b/server/sonar-web/src/main/js/design-system/components/SonarQubeLogo.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; const SonarQubeLogoSvg = styled.svg` diff --git a/server/sonar-web/design-system/src/components/Spinner.tsx b/server/sonar-web/src/main/js/design-system/components/Spinner.tsx index f8215fc5739..5910ae45e0e 100644 --- a/server/sonar-web/design-system/src/components/Spinner.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Spinner.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { keyframes } from '@emotion/react'; import styled from '@emotion/styled'; import classNames from 'classnames'; diff --git a/server/sonar-web/design-system/src/components/SpotlightTour.tsx b/server/sonar-web/src/main/js/design-system/components/SpotlightTour.tsx index 69131fcaec7..857e167ac3c 100644 --- a/server/sonar-web/design-system/src/components/SpotlightTour.tsx +++ b/server/sonar-web/src/main/js/design-system/components/SpotlightTour.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { keyframes } from '@emotion/react'; import styled from '@emotion/styled'; import { diff --git a/server/sonar-web/design-system/src/components/Switch.tsx b/server/sonar-web/src/main/js/design-system/components/Switch.tsx index 23a4b968e4b..23a4b968e4b 100644 --- a/server/sonar-web/design-system/src/components/Switch.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Switch.tsx diff --git a/server/sonar-web/design-system/src/components/Tabs.tsx b/server/sonar-web/src/main/js/design-system/components/Tabs.tsx index 8bc9dec8b74..8bc9dec8b74 100644 --- a/server/sonar-web/design-system/src/components/Tabs.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Tabs.tsx diff --git a/server/sonar-web/design-system/src/components/Tags.tsx b/server/sonar-web/src/main/js/design-system/components/Tags.tsx index 9fd333135b6..4b90ac8e5aa 100644 --- a/server/sonar-web/design-system/src/components/Tags.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Tags.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import * as React from 'react'; diff --git a/server/sonar-web/design-system/src/components/Text.tsx b/server/sonar-web/src/main/js/design-system/components/Text.tsx index 71275eb2237..71275eb2237 100644 --- a/server/sonar-web/design-system/src/components/Text.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Text.tsx diff --git a/server/sonar-web/design-system/src/components/TextAccordion.tsx b/server/sonar-web/src/main/js/design-system/components/TextAccordion.tsx index cb709b249fc..897e07fe5fb 100644 --- a/server/sonar-web/design-system/src/components/TextAccordion.tsx +++ b/server/sonar-web/src/main/js/design-system/components/TextAccordion.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { uniqueId } from 'lodash'; diff --git a/server/sonar-web/design-system/src/components/Tooltip.tsx b/server/sonar-web/src/main/js/design-system/components/Tooltip.tsx index 124fafaafdf..3dba3938bb2 100644 --- a/server/sonar-web/design-system/src/components/Tooltip.tsx +++ b/server/sonar-web/src/main/js/design-system/components/Tooltip.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { keyframes, ThemeContext } from '@emotion/react'; import styled from '@emotion/styled'; import classNames from 'classnames'; diff --git a/server/sonar-web/design-system/src/components/TopBar.tsx b/server/sonar-web/src/main/js/design-system/components/TopBar.tsx index 98d6c6a2388..e20691538a9 100644 --- a/server/sonar-web/design-system/src/components/TopBar.tsx +++ b/server/sonar-web/src/main/js/design-system/components/TopBar.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { LAYOUT_VIEWPORT_MIN_WIDTH } from '../helpers'; diff --git a/server/sonar-web/design-system/src/components/TreeMap.tsx b/server/sonar-web/src/main/js/design-system/components/TreeMap.tsx index cde2e536907..43229aae254 100644 --- a/server/sonar-web/design-system/src/components/TreeMap.tsx +++ b/server/sonar-web/src/main/js/design-system/components/TreeMap.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { hierarchy as d3Hierarchy, treemap as d3Treemap } from 'd3-hierarchy'; import { sortBy } from 'lodash'; diff --git a/server/sonar-web/design-system/src/components/TreeMapRect.tsx b/server/sonar-web/src/main/js/design-system/components/TreeMapRect.tsx index 45ece8b7fe5..0bda2755703 100644 --- a/server/sonar-web/design-system/src/components/TreeMapRect.tsx +++ b/server/sonar-web/src/main/js/design-system/components/TreeMapRect.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { scaleLinear } from 'd3-scale'; import React from 'react'; diff --git a/server/sonar-web/design-system/src/components/TutorialStep.tsx b/server/sonar-web/src/main/js/design-system/components/TutorialStep.tsx index b54f815b53e..f91f90ae80e 100644 --- a/server/sonar-web/design-system/src/components/TutorialStep.tsx +++ b/server/sonar-web/src/main/js/design-system/components/TutorialStep.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeBorder, themeColor } from '../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/TutorialStepList.tsx b/server/sonar-web/src/main/js/design-system/components/TutorialStepList.tsx index 97a051b6f31..42fe45b04fe 100644 --- a/server/sonar-web/design-system/src/components/TutorialStepList.tsx +++ b/server/sonar-web/src/main/js/design-system/components/TutorialStepList.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; const StyledTutorialStepList = styled.ol` diff --git a/server/sonar-web/design-system/src/components/__tests__/Badge-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Badge-test.tsx index 5429ccc2a16..31062bf85e3 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Badge-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Badge-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../helpers/testUtils'; import { Badge } from '../Badge'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Banner-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Banner-test.tsx index f4ba243fd5d..0de1f631038 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Banner-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Banner-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { renderWithContext } from '../../helpers/testUtils'; import { Note } from '../../sonar-aligned'; diff --git a/server/sonar-web/design-system/src/components/__tests__/BarChart-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/BarChart-test.tsx index d901b588f78..f5a295a1362 100644 --- a/server/sonar-web/design-system/src/components/__tests__/BarChart-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/BarChart-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { render } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/BorderlessAccordion-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/BorderlessAccordion-test.tsx index 3813d5c3706..82ea71b0776 100644 --- a/server/sonar-web/design-system/src/components/__tests__/BorderlessAccordion-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/BorderlessAccordion-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import * as React from 'react'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Breadcrumbs-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Breadcrumbs-test.tsx index 04f252779fa..d315261928d 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Breadcrumbs-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Breadcrumbs-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { renderWithRouter } from '../../helpers/testUtils'; import { useResizeObserver } from '../../hooks/useResizeObserver'; diff --git a/server/sonar-web/design-system/src/components/__tests__/BubbleChart-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/BubbleChart-test.tsx index f1530542972..ff3f5850749 100644 --- a/server/sonar-web/design-system/src/components/__tests__/BubbleChart-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/BubbleChart-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { AutoSizerProps } from 'react-virtualized'; import { renderWithRouter } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/CodeSnippet-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/CodeSnippet-test.tsx index 0ceec6e391a..e2b2015362b 100644 --- a/server/sonar-web/design-system/src/components/__tests__/CodeSnippet-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/CodeSnippet-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { HelmetProvider } from 'react-helmet-async'; import { renderWithContext } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/CodeSyntaxHighlighter-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/CodeSyntaxHighlighter-test.tsx index 5e603a03565..db00ff319d8 100644 --- a/server/sonar-web/design-system/src/components/__tests__/CodeSyntaxHighlighter-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/CodeSyntaxHighlighter-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '../../helpers/testUtils'; import { CodeSyntaxHighlighter } from '../CodeSyntaxHighlighter'; @@ -31,7 +32,7 @@ it('renders correctly with no code', () => { />, ); - // eslint-disable-next-line testing-library/no-node-access + // eslint-disable-next-line testing-library/no-container, testing-library/no-node-access expect(container.getElementsByClassName('hljs-string').length).toBe(0); }); @@ -47,7 +48,7 @@ it('renders correctly with code', () => { />, ); - // eslint-disable-next-line testing-library/no-node-access + // eslint-disable-next-line testing-library/no-container, testing-library/no-node-access expect(container.getElementsByClassName('hljs-string').length).toBe(1); }); @@ -63,5 +64,6 @@ it('handles html code snippets', () => { />, ); + // eslint-disable-next-line testing-library/no-container, testing-library/no-node-access expect(container.querySelectorAll('pre')).toHaveLength(2); }); diff --git a/server/sonar-web/design-system/src/components/__tests__/ColorsLegend-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/ColorsLegend-test.tsx index 6f3a8cb2c68..29ec4a864f2 100644 --- a/server/sonar-web/design-system/src/components/__tests__/ColorsLegend-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/ColorsLegend-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { renderWithContext } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/CoverageIndicator-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/CoverageIndicator-test.tsx index 648869f9ac9..46223d82e00 100644 --- a/server/sonar-web/design-system/src/components/__tests__/CoverageIndicator-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/CoverageIndicator-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Dropdown-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Dropdown-test.tsx index fce2fd2bc67..bf7e3a51de2 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Dropdown-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Dropdown-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { renderWithRouter } from '../../helpers/testUtils'; import { ButtonSecondary } from '../../sonar-aligned/components/buttons'; diff --git a/server/sonar-web/design-system/src/components/__tests__/DropdownMenu-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/DropdownMenu-test.tsx index 8f855b319b2..e5eb5b80481 100644 --- a/server/sonar-web/design-system/src/components/__tests__/DropdownMenu-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/DropdownMenu-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { noop } from 'lodash'; import { render, renderWithRouter } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/DuplicationsIndicator-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/DuplicationsIndicator-test.tsx index f0c9fbc1405..61b5659c4ad 100644 --- a/server/sonar-web/design-system/src/components/__tests__/DuplicationsIndicator-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/DuplicationsIndicator-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/__tests__/ExecutionFlowAccordion-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/ExecutionFlowAccordion-test.tsx index 9df3b5bf6bf..861322cc032 100644 --- a/server/sonar-web/design-system/src/components/__tests__/ExecutionFlowAccordion-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/ExecutionFlowAccordion-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; import { FCProps } from '../../types/misc'; import { ExecutionFlowAccordion } from '../ExecutionFlowAccordion'; diff --git a/server/sonar-web/design-system/src/components/__tests__/FacetBox-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/FacetBox-test.tsx index 9319c40a681..8b7e2c6dfde 100644 --- a/server/sonar-web/design-system/src/components/__tests__/FacetBox-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/FacetBox-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { renderWithContext } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/FacetItem-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/FacetItem-test.tsx index f56a5669eef..07fe9259687 100644 --- a/server/sonar-web/design-system/src/components/__tests__/FacetItem-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/FacetItem-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { render } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/FavoriteButton-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/FavoriteButton-test.tsx index c2ac6fe2403..002a54a53cb 100644 --- a/server/sonar-web/design-system/src/components/__tests__/FavoriteButton-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/FavoriteButton-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { render } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/FlowStep-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/FlowStep-test.tsx index 819dd07bf6b..5193b20b3b9 100644 --- a/server/sonar-web/design-system/src/components/__tests__/FlowStep-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/FlowStep-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { renderWithRouter } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/__tests__/HighlightedSection-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/HighlightedSection-test.tsx index fb85529315c..97ccc9b8f94 100644 --- a/server/sonar-web/design-system/src/components/__tests__/HighlightedSection-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/HighlightedSection-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; import { HighlightedSection } from '../HighlightedSection'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Histogram-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Histogram-test.tsx index 5b61733a345..33300fbceee 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Histogram-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Histogram-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '../../helpers/testUtils'; import { Histogram } from '../Histogram'; diff --git a/server/sonar-web/design-system/src/components/__tests__/HotspotRating-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/HotspotRating-test.tsx index 34bd9e552ad..4f988f7ad70 100644 --- a/server/sonar-web/design-system/src/components/__tests__/HotspotRating-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/HotspotRating-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../helpers/testUtils'; import { HotspotRatingEnum } from '../../types/measures'; diff --git a/server/sonar-web/design-system/src/components/__tests__/IssueMessageHighlighting-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/IssueMessageHighlighting-test.tsx index e91f62d3d34..623a49e2244 100644 --- a/server/sonar-web/design-system/src/components/__tests__/IssueMessageHighlighting-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/IssueMessageHighlighting-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '@testing-library/react'; import { IssueMessageHighlighting, diff --git a/server/sonar-web/design-system/src/components/__tests__/KeyboardHint-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/KeyboardHint-test.tsx index d9240cdeac2..bb893ab0ef9 100644 --- a/server/sonar-web/design-system/src/components/__tests__/KeyboardHint-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/KeyboardHint-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Key } from '../../helpers/keyboard'; import { render } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/__tests__/KeyboardHintKeys-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/KeyboardHintKeys-test.tsx index f6bfd0ee047..9c4d6763f3b 100644 --- a/server/sonar-web/design-system/src/components/__tests__/KeyboardHintKeys-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/KeyboardHintKeys-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Key } from '../../helpers/keyboard'; import { render } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/__tests__/LineCoverage-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/LineCoverage-test.tsx index f383723283b..5d9ecd41d5a 100644 --- a/server/sonar-web/design-system/src/components/__tests__/LineCoverage-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/LineCoverage-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; import { LineCoverage } from '../code-line/LineCoverage'; diff --git a/server/sonar-web/design-system/src/components/__tests__/LineFinding-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/LineFinding-test.tsx index 038ae20ae92..f21a1b5fb0b 100644 --- a/server/sonar-web/design-system/src/components/__tests__/LineFinding-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/LineFinding-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { render } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/LineNumber-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/LineNumber-test.tsx index e72494cdd7f..f0f8a6beca9 100644 --- a/server/sonar-web/design-system/src/components/__tests__/LineNumber-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/LineNumber-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/__tests__/LineToken-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/LineToken-test.tsx index 214b3bc191a..b351e7b1431 100644 --- a/server/sonar-web/design-system/src/components/__tests__/LineToken-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/LineToken-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ReactNode } from 'react'; import { render } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/__tests__/LineWrapper-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/LineWrapper-test.tsx index 32f97a32f8e..9dc9f4cf410 100644 --- a/server/sonar-web/design-system/src/components/__tests__/LineWrapper-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/LineWrapper-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; import { LineWrapper, SuggestedLineWrapper } from '../code-line/LineWrapper'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Link-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Link-test.tsx index d8bc4c62930..25f212af11a 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Link-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Link-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import * as React from 'react'; import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom'; diff --git a/server/sonar-web/design-system/src/components/__tests__/MainAppBar-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/MainAppBar-test.tsx index 0972b51eac5..ed9e09bef5d 100644 --- a/server/sonar-web/design-system/src/components/__tests__/MainAppBar-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/MainAppBar-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable import/no-extraneous-dependencies */ import { fireEvent, screen } from '@testing-library/react'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Menu-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Menu-test.tsx index 817c7b28f31..687f5aad0e1 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Menu-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Menu-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable import/no-extraneous-dependencies */ import { screen } from '@testing-library/react'; diff --git a/server/sonar-web/design-system/src/components/__tests__/MenuItem-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/MenuItem-test.tsx index 3fd04b23052..b303e8a5208 100644 --- a/server/sonar-web/design-system/src/components/__tests__/MenuItem-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/MenuItem-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable import/no-extraneous-dependencies */ import { screen } from '@testing-library/react'; diff --git a/server/sonar-web/design-system/src/components/__tests__/NavBarTabs-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/NavBarTabs-test.tsx index 554c40c9776..da4bfd5b87f 100644 --- a/server/sonar-web/design-system/src/components/__tests__/NavBarTabs-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/NavBarTabs-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { renderWithRouter } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/__tests__/NavLink-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/NavLink-test.tsx index 6aaa88a9c44..92eaf01d843 100644 --- a/server/sonar-web/design-system/src/components/__tests__/NavLink-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/NavLink-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import * as React from 'react'; import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom'; diff --git a/server/sonar-web/design-system/src/components/__tests__/NewCodeLegend-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/NewCodeLegend-test.tsx index c7929c29baa..d40edf65e1c 100644 --- a/server/sonar-web/design-system/src/components/__tests__/NewCodeLegend-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/NewCodeLegend-test.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import tailwindBaseConfig from '../../../../tailwind.base.config'; +import tailwindBaseConfig from '../../../../../../tailwind.base.config'; import { render } from '../../helpers/testUtils'; import { NewCodeLegend } from '../NewCodeLegend'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Pill-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Pill-test.tsx index 014f020809e..5349c24dd61 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Pill-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Pill-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../helpers/testUtils'; import { Pill, PillVariant } from '../Pill'; diff --git a/server/sonar-web/design-system/src/components/__tests__/QualityGateIndicator-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/QualityGateIndicator-test.tsx index 1b088a14a4b..3562e979105 100644 --- a/server/sonar-web/design-system/src/components/__tests__/QualityGateIndicator-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/QualityGateIndicator-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { IntlShape } from 'react-intl'; import { renderWithContext } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/SelectionCard-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/SelectionCard-test.tsx index ddae065e795..df1fd540881 100644 --- a/server/sonar-web/design-system/src/components/__tests__/SelectionCard-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/SelectionCard-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { renderWithContext } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/SizeIndicator-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/SizeIndicator-test.tsx index d5eebb767cb..5f35af84093 100644 --- a/server/sonar-web/design-system/src/components/__tests__/SizeIndicator-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/SizeIndicator-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Spinner-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Spinner-test.tsx index 03c6ad552d2..4d5d2595f2a 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Spinner-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Spinner-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; import { IntlWrapper } from '../../helpers/testUtils'; import { Spinner } from '../Spinner'; diff --git a/server/sonar-web/design-system/src/components/__tests__/SpotlightTour-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/SpotlightTour-test.tsx index f95b68f1a2a..d015ca429dc 100644 --- a/server/sonar-web/design-system/src/components/__tests__/SpotlightTour-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/SpotlightTour-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { renderWithContext } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Switch-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Switch-test.tsx index 568a9721bba..e1efe8f5d5a 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Switch-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Switch-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { render } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Tabs-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Tabs-test.tsx index b9409245f96..32837740b79 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Tabs-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Tabs-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { renderWithContext } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Tags-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Tags-test.tsx index 7683e281bc8..581bc3fd3cb 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Tags-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Tags-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable import/no-extraneous-dependencies */ import { screen } from '@testing-library/react'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Text-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Text-test.tsx index c9562e9e5f0..115ea4996a3 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Text-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Text-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable import/no-extraneous-dependencies */ import { screen } from '@testing-library/react'; diff --git a/server/sonar-web/design-system/src/components/__tests__/TextAccordion-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/TextAccordion-test.tsx index 53c34a7cbb5..8a5919d35e5 100644 --- a/server/sonar-web/design-system/src/components/__tests__/TextAccordion-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/TextAccordion-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import * as React from 'react'; diff --git a/server/sonar-web/design-system/src/components/__tests__/Tooltip-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/Tooltip-test.tsx index 2d0882b1c3f..8971c0ea191 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Tooltip-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/Tooltip-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../helpers/testUtils'; import { FCProps } from '../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/__tests__/TreeMap-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/TreeMap-test.tsx index a7f2bbc940b..41abad0b4a1 100644 --- a/server/sonar-web/design-system/src/components/__tests__/TreeMap-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/TreeMap-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { render } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/TutorialStep-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/TutorialStep-test.tsx index dbe04632892..c2f82fbfdf4 100644 --- a/server/sonar-web/design-system/src/components/__tests__/TutorialStep-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/TutorialStep-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../helpers/testUtils'; import { TutorialStep } from '../TutorialStep'; diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap index ac2ea24e199..ac2ea24e199 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CoverageIndicator-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/CoverageIndicator-test.tsx.snap index f04fb70a190..f04fb70a190 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CoverageIndicator-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/CoverageIndicator-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/DuplicationsIndicator-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/DuplicationsIndicator-test.tsx.snap index 677207098fe..677207098fe 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/DuplicationsIndicator-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/DuplicationsIndicator-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/FavoriteButton-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/FavoriteButton-test.tsx.snap index ac4eb0e769e..ac4eb0e769e 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/FavoriteButton-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/FavoriteButton-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/Histogram-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/Histogram-test.tsx.snap index e3653d1d3e2..566251156e1 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/Histogram-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/Histogram-test.tsx.snap @@ -57,7 +57,7 @@ exports[`renders correctly with yValues 1`] = ` fill: var(--echoes-color-text-subdued); } -.e1vbniy52 .emotion-2 { +.e4r8l5e2 .emotion-2 { fill: rgb(255,255,255); } @@ -143,7 +143,7 @@ exports[`renders correctly with yValues and yTicks 1`] = ` fill: var(--echoes-color-text-subdued); } -.e1vbniy52 .emotion-2 { +.e4r8l5e2 .emotion-2 { fill: rgb(255,255,255); } @@ -259,7 +259,7 @@ exports[`renders correctly with yValues, yTicks, and yTooltips 1`] = ` fill: var(--echoes-color-text-subdued); } -.e1vbniy52 .emotion-2 { +.e4r8l5e2 .emotion-2 { fill: rgb(255,255,255); } diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/HotspotRating-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/HotspotRating-test.tsx.snap index 741beaababd..741beaababd 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/HotspotRating-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/HotspotRating-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/IssueMessageHighlighting-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/IssueMessageHighlighting-test.tsx.snap index 932cc06d0f8..932cc06d0f8 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/IssueMessageHighlighting-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/IssueMessageHighlighting-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/KeyboardHint-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/KeyboardHint-test.tsx.snap index bc08e8388ec..bc08e8388ec 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/KeyboardHint-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/KeyboardHint-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/KeyboardHintKeys-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/KeyboardHintKeys-test.tsx.snap index 5817a21adb1..5817a21adb1 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/KeyboardHintKeys-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/KeyboardHintKeys-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/LineCoverage-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/LineCoverage-test.tsx.snap index 3be6058daf7..c21478897f5 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/LineCoverage-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/LineCoverage-test.tsx.snap @@ -14,7 +14,7 @@ exports[`should render correctly when covered 1`] = ` user-select: none; } -.e97pm2l13:hover .emotion-0 { +.e19zkvle13:hover .emotion-0 { background-color: rgb(239,242,249); } @@ -58,7 +58,7 @@ exports[`should render correctly when no data 1`] = ` user-select: none; } -.e97pm2l13:hover .emotion-0 { +.e19zkvle13:hover .emotion-0 { background-color: rgb(239,242,249); } @@ -84,7 +84,7 @@ exports[`should render correctly when partially covered with 5/10 conditions 1`] user-select: none; } -.e97pm2l13:hover .emotion-0 { +.e19zkvle13:hover .emotion-0 { background-color: rgb(239,242,249); } @@ -145,7 +145,7 @@ exports[`should render correctly when partially covered without conditions 1`] = user-select: none; } -.e97pm2l13:hover .emotion-0 { +.e19zkvle13:hover .emotion-0 { background-color: rgb(239,242,249); } @@ -206,7 +206,7 @@ exports[`should render correctly when uncovered 1`] = ` user-select: none; } -.e97pm2l13:hover .emotion-0 { +.e19zkvle13:hover .emotion-0 { background-color: rgb(239,242,249); } diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/LineFinding-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/LineFinding-test.tsx.snap index 7e61c609169..7e61c609169 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/LineFinding-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/LineFinding-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/LineWrapper-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/LineWrapper-test.tsx.snap index bb8bcca7efc..bb8bcca7efc 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/LineWrapper-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/LineWrapper-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/TreeMap-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/TreeMap-test.tsx.snap index f9b2a493f78..f9b2a493f78 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/TreeMap-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/__snapshots__/TreeMap-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/__tests__/clipboard-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/clipboard-test.tsx index e073810552e..9b3d3bb7e52 100644 --- a/server/sonar-web/design-system/src/components/__tests__/clipboard-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/clipboard-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitForElementToBeRemoved } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { renderWithContext } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/__tests__/layouts-test.tsx b/server/sonar-web/src/main/js/design-system/components/__tests__/layouts-test.tsx index ba3fc86984a..2e5a2d67961 100644 --- a/server/sonar-web/design-system/src/components/__tests__/layouts-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/__tests__/layouts-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; import { CenteredLayout, LargeCenteredLayout } from '../layouts'; diff --git a/server/sonar-web/design-system/src/components/avatar/Avatar.tsx b/server/sonar-web/src/main/js/design-system/components/avatar/Avatar.tsx index 19ce3d76289..3335bef541a 100644 --- a/server/sonar-web/design-system/src/components/avatar/Avatar.tsx +++ b/server/sonar-web/src/main/js/design-system/components/avatar/Avatar.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { ReactEventHandler, useState } from 'react'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/avatar/GenericAvatar.tsx b/server/sonar-web/src/main/js/design-system/components/avatar/GenericAvatar.tsx index 8a5b892f7eb..36af2b5bbff 100644 --- a/server/sonar-web/design-system/src/components/avatar/GenericAvatar.tsx +++ b/server/sonar-web/src/main/js/design-system/components/avatar/GenericAvatar.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import React from 'react'; diff --git a/server/sonar-web/design-system/src/components/avatar/__tests__/Avatar-test.tsx b/server/sonar-web/src/main/js/design-system/components/avatar/__tests__/Avatar-test.tsx index 6c2b94732b5..c3d5143eb2d 100644 --- a/server/sonar-web/design-system/src/components/avatar/__tests__/Avatar-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/avatar/__tests__/Avatar-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable import/no-extraneous-dependencies */ import { fireEvent, screen } from '@testing-library/react'; diff --git a/server/sonar-web/design-system/src/components/avatar/__tests__/GenericAvatar-test.tsx b/server/sonar-web/src/main/js/design-system/components/avatar/__tests__/GenericAvatar-test.tsx index 8f25e697cbd..2780d89ae2a 100644 --- a/server/sonar-web/design-system/src/components/avatar/__tests__/GenericAvatar-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/avatar/__tests__/GenericAvatar-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../../helpers/testUtils'; import { CustomIcon, IconProps } from '../../icons/Icon'; diff --git a/server/sonar-web/design-system/src/components/avatar/utils.ts b/server/sonar-web/src/main/js/design-system/components/avatar/utils.ts index 7f00a7fa541..f3aa0d48527 100644 --- a/server/sonar-web/design-system/src/components/avatar/utils.ts +++ b/server/sonar-web/src/main/js/design-system/components/avatar/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export type Size = 'xs' | 'sm' | 'md' | 'lg'; export const sizeMap: Record<Size, number> = { diff --git a/server/sonar-web/design-system/src/components/buttons/BareButtons.tsx b/server/sonar-web/src/main/js/design-system/components/buttons/BareButtons.tsx index 546b71710e7..546b71710e7 100644 --- a/server/sonar-web/design-system/src/components/buttons/BareButtons.tsx +++ b/server/sonar-web/src/main/js/design-system/components/buttons/BareButtons.tsx diff --git a/server/sonar-web/design-system/src/components/buttons/ButtonLink.tsx b/server/sonar-web/src/main/js/design-system/components/buttons/ButtonLink.tsx index f36e40c6235..7f008c99676 100644 --- a/server/sonar-web/design-system/src/components/buttons/ButtonLink.tsx +++ b/server/sonar-web/src/main/js/design-system/components/buttons/ButtonLink.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeBorder, themeColor } from '../../helpers'; diff --git a/server/sonar-web/design-system/src/components/buttons/DownloadButton.tsx b/server/sonar-web/src/main/js/design-system/components/buttons/DownloadButton.tsx index e367df53622..d1e34b6f0f7 100644 --- a/server/sonar-web/design-system/src/components/buttons/DownloadButton.tsx +++ b/server/sonar-web/src/main/js/design-system/components/buttons/DownloadButton.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { buttonStyle, PrimaryStyle } from '../../sonar-aligned/components/buttons'; diff --git a/server/sonar-web/design-system/src/components/buttons/WrapperButton.tsx b/server/sonar-web/src/main/js/design-system/components/buttons/WrapperButton.tsx index 30e1bdd2d05..5485cabe5ac 100644 --- a/server/sonar-web/design-system/src/components/buttons/WrapperButton.tsx +++ b/server/sonar-web/src/main/js/design-system/components/buttons/WrapperButton.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { OPACITY_20_PERCENT, themeColor } from '../../helpers'; import { Button, ButtonProps } from '../../sonar-aligned/components/buttons'; diff --git a/server/sonar-web/design-system/src/components/buttons/__tests__/BareButtons-test.tsx b/server/sonar-web/src/main/js/design-system/components/buttons/__tests__/BareButtons-test.tsx index e4ea515472c..0b1e3647b2e 100644 --- a/server/sonar-web/design-system/src/components/buttons/__tests__/BareButtons-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/buttons/__tests__/BareButtons-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../../helpers/testUtils'; import { CodeViewerExpander } from '../BareButtons'; diff --git a/server/sonar-web/design-system/src/components/buttons/__tests__/ButtonLink-test.tsx b/server/sonar-web/src/main/js/design-system/components/buttons/__tests__/ButtonLink-test.tsx index 17aa388de4b..a36b7633a33 100644 --- a/server/sonar-web/design-system/src/components/buttons/__tests__/ButtonLink-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/buttons/__tests__/ButtonLink-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; import { ButtonLink } from '../ButtonLink'; diff --git a/server/sonar-web/design-system/src/components/buttons/index.ts b/server/sonar-web/src/main/js/design-system/components/buttons/index.ts index 723fd19cf7f..72f6032b66d 100644 --- a/server/sonar-web/design-system/src/components/buttons/index.ts +++ b/server/sonar-web/src/main/js/design-system/components/buttons/index.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export * from './BareButtons'; export * from './ButtonLink'; export * from './DownloadButton'; diff --git a/server/sonar-web/design-system/src/components/clipboard.tsx b/server/sonar-web/src/main/js/design-system/components/clipboard.tsx index 530880b86c6..bb7f6bbd0f2 100644 --- a/server/sonar-web/design-system/src/components/clipboard.tsx +++ b/server/sonar-web/src/main/js/design-system/components/clipboard.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Button, ButtonIcon, diff --git a/server/sonar-web/design-system/src/components/code-line/LineCoverage.tsx b/server/sonar-web/src/main/js/design-system/components/code-line/LineCoverage.tsx index 35e60f2a6b2..81a128aa397 100644 --- a/server/sonar-web/design-system/src/components/code-line/LineCoverage.tsx +++ b/server/sonar-web/src/main/js/design-system/components/code-line/LineCoverage.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import React, { memo } from 'react'; diff --git a/server/sonar-web/design-system/src/components/code-line/LineFinding.tsx b/server/sonar-web/src/main/js/design-system/components/code-line/LineFinding.tsx index 42a89edee41..e78688e9abd 100644 --- a/server/sonar-web/design-system/src/components/code-line/LineFinding.tsx +++ b/server/sonar-web/src/main/js/design-system/components/code-line/LineFinding.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { forwardRef, Ref } from 'react'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/code-line/LineIssuePointer.tsx b/server/sonar-web/src/main/js/design-system/components/code-line/LineIssuePointer.tsx index 48b3fd4c5db..e5eb954c038 100644 --- a/server/sonar-web/design-system/src/components/code-line/LineIssuePointer.tsx +++ b/server/sonar-web/src/main/js/design-system/components/code-line/LineIssuePointer.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { createRef, RefObject, useEffect, useState } from 'react'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/code-line/LineIssuesIndicatorIcon.tsx b/server/sonar-web/src/main/js/design-system/components/code-line/LineIssuesIndicatorIcon.tsx index 75e256f4775..80403bab3ee 100644 --- a/server/sonar-web/design-system/src/components/code-line/LineIssuesIndicatorIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/code-line/LineIssuesIndicatorIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { memo } from 'react'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/code-line/LineMarker.tsx b/server/sonar-web/src/main/js/design-system/components/code-line/LineMarker.tsx index 37db11650d7..02993c531a5 100644 --- a/server/sonar-web/design-system/src/components/code-line/LineMarker.tsx +++ b/server/sonar-web/src/main/js/design-system/components/code-line/LineMarker.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { forwardRef, Ref, useCallback, useRef } from 'react'; diff --git a/server/sonar-web/design-system/src/components/code-line/LineNumber.tsx b/server/sonar-web/src/main/js/design-system/components/code-line/LineNumber.tsx index 93d98fb276c..0a414118774 100644 --- a/server/sonar-web/design-system/src/components/code-line/LineNumber.tsx +++ b/server/sonar-web/src/main/js/design-system/components/code-line/LineNumber.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { memo, useState } from 'react'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/code-line/LineStyles.tsx b/server/sonar-web/src/main/js/design-system/components/code-line/LineStyles.tsx index f1c99be7e9b..f1c99be7e9b 100644 --- a/server/sonar-web/design-system/src/components/code-line/LineStyles.tsx +++ b/server/sonar-web/src/main/js/design-system/components/code-line/LineStyles.tsx diff --git a/server/sonar-web/design-system/src/components/code-line/LineToken.tsx b/server/sonar-web/src/main/js/design-system/components/code-line/LineToken.tsx index f16261c08e5..5e40aecd9c1 100644 --- a/server/sonar-web/design-system/src/components/code-line/LineToken.tsx +++ b/server/sonar-web/src/main/js/design-system/components/code-line/LineToken.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { ReactNode, RefObject } from 'react'; diff --git a/server/sonar-web/design-system/src/components/code-line/LineWrapper.tsx b/server/sonar-web/src/main/js/design-system/components/code-line/LineWrapper.tsx index 1d666acd77a..0bc51610e1b 100644 --- a/server/sonar-web/design-system/src/components/code-line/LineWrapper.tsx +++ b/server/sonar-web/src/main/js/design-system/components/code-line/LineWrapper.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { HTMLAttributes } from 'react'; import { themeColor } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/icons/AddNewIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/AddNewIcon.tsx index 83b78dea6b7..83b78dea6b7 100644 --- a/server/sonar-web/design-system/src/components/icons/AddNewIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/AddNewIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/BranchIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/BranchIcon.tsx index 579b6595d80..579b6595d80 100644 --- a/server/sonar-web/design-system/src/components/icons/BranchIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/BranchIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/BugIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/BugIcon.tsx index d4818cfb8e5..d4818cfb8e5 100644 --- a/server/sonar-web/design-system/src/components/icons/BugIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/BugIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/CalendarIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/CalendarIcon.tsx index 1b600d8b42b..1b600d8b42b 100644 --- a/server/sonar-web/design-system/src/components/icons/CalendarIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/CalendarIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/CheckIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/CheckIcon.tsx index bde5e4f4698..bde5e4f4698 100644 --- a/server/sonar-web/design-system/src/components/icons/CheckIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/CheckIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/ChevronDownIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/ChevronDownIcon.tsx index 208219afd0c..208219afd0c 100644 --- a/server/sonar-web/design-system/src/components/icons/ChevronDownIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/ChevronDownIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/ChevronLeftIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/ChevronLeftIcon.tsx index 871ce2bbee1..38c21ef2462 100644 --- a/server/sonar-web/design-system/src/components/icons/ChevronLeftIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/ChevronLeftIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor } from '../../helpers/theme'; import { CustomIcon, IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/ChevronRightIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/ChevronRightIcon.tsx index e50bd57c754..eb09bb6fd29 100644 --- a/server/sonar-web/design-system/src/components/icons/ChevronRightIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/ChevronRightIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor } from '../../helpers/theme'; import { CustomIcon, IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/ClockIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/ClockIcon.tsx index 6c8a8231438..6c8a8231438 100644 --- a/server/sonar-web/design-system/src/components/icons/ClockIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/ClockIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/CloseIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/CloseIcon.tsx index 2c0daebf409..2c0daebf409 100644 --- a/server/sonar-web/design-system/src/components/icons/CloseIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/CloseIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/CodeEllipsisIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/CodeEllipsisIcon.tsx index 36a3df4b3fd..481419392e0 100644 --- a/server/sonar-web/design-system/src/components/icons/CodeEllipsisIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/CodeEllipsisIcon.tsx @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { IconProps } from '~components/icons/Icon'; + +import { IconProps } from '../../components/icons/Icon'; import { UnfoldDownIcon } from './UnfoldDownIcon'; import { UnfoldIcon } from './UnfoldIcon'; import { UnfoldUpIcon } from './UnfoldUpIcon'; diff --git a/server/sonar-web/design-system/src/components/icons/CodeSmellIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/CodeSmellIcon.tsx index e68cc4113e3..e68cc4113e3 100644 --- a/server/sonar-web/design-system/src/components/icons/CodeSmellIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/CodeSmellIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/CollapseIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/CollapseIcon.tsx index 5040cc57804..5040cc57804 100644 --- a/server/sonar-web/design-system/src/components/icons/CollapseIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/CollapseIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/CommentIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/CommentIcon.tsx index f47270b3eba..f47270b3eba 100644 --- a/server/sonar-web/design-system/src/components/icons/CommentIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/CommentIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/CopyIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/CopyIcon.tsx index 700f8612465..700f8612465 100644 --- a/server/sonar-web/design-system/src/components/icons/CopyIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/CopyIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/DirectoryIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/DirectoryIcon.tsx index c3dcaed09df..c3dcaed09df 100644 --- a/server/sonar-web/design-system/src/components/icons/DirectoryIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/DirectoryIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/DotFillIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/DotFillIcon.tsx index de58443fb59..de58443fb59 100644 --- a/server/sonar-web/design-system/src/components/icons/DotFillIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/DotFillIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/DraggableIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/DraggableIcon.tsx index 5e96e17aa9e..07c38690112 100644 --- a/server/sonar-web/design-system/src/components/icons/DraggableIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/DraggableIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { themeColor, themeContrast } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/icons/ExecutionFlowIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/ExecutionFlowIcon.tsx index 500ff41d7df..6a3a37d101e 100644 --- a/server/sonar-web/design-system/src/components/icons/ExecutionFlowIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/ExecutionFlowIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor } from '../../helpers/theme'; import { CustomIcon, IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/ExpandIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/ExpandIcon.tsx index de74960e9e9..de74960e9e9 100644 --- a/server/sonar-web/design-system/src/components/icons/ExpandIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/ExpandIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/FileIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/FileIcon.tsx index fb2a67c26e5..fb2a67c26e5 100644 --- a/server/sonar-web/design-system/src/components/icons/FileIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/FileIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/FilterIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/FilterIcon.tsx index 40a4701b8a6..40a4701b8a6 100644 --- a/server/sonar-web/design-system/src/components/icons/FilterIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/FilterIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/FlagErrorIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/FlagErrorIcon.tsx index ec53a97d751..ec53a97d751 100644 --- a/server/sonar-web/design-system/src/components/icons/FlagErrorIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/FlagErrorIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/FlagInfoIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/FlagInfoIcon.tsx index 04bb2a9cedd..04bb2a9cedd 100644 --- a/server/sonar-web/design-system/src/components/icons/FlagInfoIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/FlagInfoIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/FlagSuccessIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/FlagSuccessIcon.tsx index 06a597a4983..06a597a4983 100644 --- a/server/sonar-web/design-system/src/components/icons/FlagSuccessIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/FlagSuccessIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/FlagWarningIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/FlagWarningIcon.tsx index 8f4e1441d80..8f4e1441d80 100644 --- a/server/sonar-web/design-system/src/components/icons/FlagWarningIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/FlagWarningIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/HelperHintIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/HelperHintIcon.tsx index 08b33e90c88..08b33e90c88 100644 --- a/server/sonar-web/design-system/src/components/icons/HelperHintIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/HelperHintIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/HomeFillIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/HomeFillIcon.tsx index f4e93da93d7..f4e93da93d7 100644 --- a/server/sonar-web/design-system/src/components/icons/HomeFillIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/HomeFillIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/HomeIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/HomeIcon.tsx index 9b350fdfff5..9b350fdfff5 100644 --- a/server/sonar-web/design-system/src/components/icons/HomeIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/HomeIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/Icon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/Icon.tsx index 17d1b67d3d1..17d1b67d3d1 100644 --- a/server/sonar-web/design-system/src/components/icons/Icon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/Icon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/InProgressVisual.tsx b/server/sonar-web/src/main/js/design-system/components/icons/InProgressVisual.tsx index 8ed51369992..5000ba8ea83 100644 --- a/server/sonar-web/design-system/src/components/icons/InProgressVisual.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/InProgressVisual.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { keyframes, useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { themeColor } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/icons/InheritanceIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/InheritanceIcon.tsx index 6aa6c41ba47..6aa6c41ba47 100644 --- a/server/sonar-web/design-system/src/components/icons/InheritanceIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/InheritanceIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/IssueLocationIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/IssueLocationIcon.tsx index d9b9fe01199..d9b9fe01199 100644 --- a/server/sonar-web/design-system/src/components/icons/IssueLocationIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/IssueLocationIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/IssueTypeIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/IssueTypeIcon.tsx index 67b36b0f452..a9efdaaac8c 100644 --- a/server/sonar-web/design-system/src/components/icons/IssueTypeIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/IssueTypeIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IssueType } from '../../types'; import { BugIcon } from './BugIcon'; import { CodeSmellIcon } from './CodeSmellIcon'; diff --git a/server/sonar-web/design-system/src/components/icons/LinkIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/LinkIcon.tsx index 9eb16f90403..9eb16f90403 100644 --- a/server/sonar-web/design-system/src/components/icons/LinkIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/LinkIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/LockIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/LockIcon.tsx index e2aba5a119b..e2aba5a119b 100644 --- a/server/sonar-web/design-system/src/components/icons/LockIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/LockIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/MainBranchIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/MainBranchIcon.tsx index 0de937e2687..0de937e2687 100644 --- a/server/sonar-web/design-system/src/components/icons/MainBranchIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/MainBranchIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/MenuHelpIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/MenuHelpIcon.tsx index ed38a889edb..ed38a889edb 100644 --- a/server/sonar-web/design-system/src/components/icons/MenuHelpIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/MenuHelpIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/MenuIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/MenuIcon.tsx index 3a3dbe9c129..3a3dbe9c129 100644 --- a/server/sonar-web/design-system/src/components/icons/MenuIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/MenuIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/MenuSearchIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/MenuSearchIcon.tsx index 081e8adebfc..081e8adebfc 100644 --- a/server/sonar-web/design-system/src/components/icons/MenuSearchIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/MenuSearchIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/MinimizeIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/MinimizeIcon.tsx index 127e3918343..127e3918343 100644 --- a/server/sonar-web/design-system/src/components/icons/MinimizeIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/MinimizeIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/NoDataIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/NoDataIcon.tsx index b746b9da8ff..49e891e77c4 100644 --- a/server/sonar-web/design-system/src/components/icons/NoDataIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/NoDataIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { CustomIcon, IconProps } from './Icon'; export interface NoDataIconProps extends IconProps { diff --git a/server/sonar-web/design-system/src/components/icons/OpenCloseIndicator.tsx b/server/sonar-web/src/main/js/design-system/components/icons/OpenCloseIndicator.tsx index 473c2fbf002..19db514b28b 100644 --- a/server/sonar-web/design-system/src/components/icons/OpenCloseIndicator.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/OpenCloseIndicator.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ChevronDownIcon } from './ChevronDownIcon'; import { ChevronRightIcon } from './ChevronRightIcon'; import { IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/OpenNewTabIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/OpenNewTabIcon.tsx index b5ca3715322..b5ca3715322 100644 --- a/server/sonar-web/design-system/src/components/icons/OpenNewTabIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/OpenNewTabIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/OverridenIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/OverridenIcon.tsx index c22341838c0..d9b40bea4b4 100644 --- a/server/sonar-web/design-system/src/components/icons/OverridenIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/OverridenIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor } from '../../helpers/theme'; import { CustomIcon, IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/OverviewQGNotComputedIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/OverviewQGNotComputedIcon.tsx index 66ff62e433e..2d1122133fd 100644 --- a/server/sonar-web/design-system/src/components/icons/OverviewQGNotComputedIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/OverviewQGNotComputedIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/icons/OverviewQGPassedIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/OverviewQGPassedIcon.tsx index 5d2adba3cd7..86c6324373e 100644 --- a/server/sonar-web/design-system/src/components/icons/OverviewQGPassedIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/OverviewQGPassedIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/icons/PencilIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/PencilIcon.tsx index 94aff38bc3e..d33a5fffa40 100644 --- a/server/sonar-web/design-system/src/components/icons/PencilIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/PencilIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { PencilIcon as PencilOcticonIcon } from '@primer/octicons-react'; import { OcticonHoc } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/PinIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/PinIcon.tsx index bafc55e50d7..bafc55e50d7 100644 --- a/server/sonar-web/design-system/src/components/icons/PinIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/PinIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/ProjectIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/ProjectIcon.tsx index e553f09d892..e553f09d892 100644 --- a/server/sonar-web/design-system/src/components/icons/ProjectIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/ProjectIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/PullRequestIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/PullRequestIcon.tsx index 0cc9b256453..0cc9b256453 100644 --- a/server/sonar-web/design-system/src/components/icons/PullRequestIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/PullRequestIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/QualifierIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/QualifierIcon.tsx index 976037d15bb..9021b169ee2 100644 --- a/server/sonar-web/design-system/src/components/icons/QualifierIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/QualifierIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor } from '../../helpers/theme'; import { DirectoryIcon } from './DirectoryIcon'; diff --git a/server/sonar-web/design-system/src/components/icons/RecommendedIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/RecommendedIcon.tsx index 7a8be83a51b..7a8be83a51b 100644 --- a/server/sonar-web/design-system/src/components/icons/RecommendedIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/RecommendedIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/RequiredIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/RequiredIcon.tsx index fe75c4bc716..b410de80d2a 100644 --- a/server/sonar-web/design-system/src/components/icons/RequiredIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/RequiredIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeColor } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/icons/SearchIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SearchIcon.tsx index cc02b360ee6..cc02b360ee6 100644 --- a/server/sonar-web/design-system/src/components/icons/SearchIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SearchIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/SecurityFindingIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SecurityFindingIcon.tsx index a0a3ef93a0c..a0a3ef93a0c 100644 --- a/server/sonar-web/design-system/src/components/icons/SecurityFindingIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SecurityFindingIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/SecurityHotspotIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SecurityHotspotIcon.tsx index c8298df6614..c8298df6614 100644 --- a/server/sonar-web/design-system/src/components/icons/SecurityHotspotIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SecurityHotspotIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/SeparatorCircleIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SeparatorCircleIcon.tsx index cffc4f6ffe7..8b880e89742 100644 --- a/server/sonar-web/design-system/src/components/icons/SeparatorCircleIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SeparatorCircleIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeBorder, themeColor } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/icons/SeverityBlockerIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SeverityBlockerIcon.tsx index c9858f6fa3a..bea88299489 100644 --- a/server/sonar-web/design-system/src/components/icons/SeverityBlockerIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SeverityBlockerIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor, themeContrast } from '../../helpers/theme'; import { CustomIcon, IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/SeverityCriticalIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SeverityCriticalIcon.tsx index 5a74e50c2b0..7fa0a5a99fb 100644 --- a/server/sonar-web/design-system/src/components/icons/SeverityCriticalIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SeverityCriticalIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor, themeContrast } from '../../helpers/theme'; import { CustomIcon, IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/SeverityInfoIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SeverityInfoIcon.tsx index a35b214a78a..a35b214a78a 100644 --- a/server/sonar-web/design-system/src/components/icons/SeverityInfoIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SeverityInfoIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/SeverityMajorIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SeverityMajorIcon.tsx index b6f359db826..87f073b5305 100644 --- a/server/sonar-web/design-system/src/components/icons/SeverityMajorIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SeverityMajorIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor, themeContrast } from '../../helpers/theme'; import { CustomIcon, IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/SeverityMinorIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SeverityMinorIcon.tsx index b6d953dc8a2..fa8828169b6 100644 --- a/server/sonar-web/design-system/src/components/icons/SeverityMinorIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SeverityMinorIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor, themeContrast } from '../../helpers/theme'; import { CustomIcon, IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/SnoozeCircleIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SnoozeCircleIcon.tsx index 95f034c7307..7d8319c664a 100644 --- a/server/sonar-web/design-system/src/components/icons/SnoozeCircleIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SnoozeCircleIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor, themeContrast } from '../../helpers'; import { ThemeColors } from '../../types'; diff --git a/server/sonar-web/design-system/src/components/icons/SoftwareImpactSeverityBlockerIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SoftwareImpactSeverityBlockerIcon.tsx index 65451a5ddd6..65451a5ddd6 100644 --- a/server/sonar-web/design-system/src/components/icons/SoftwareImpactSeverityBlockerIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SoftwareImpactSeverityBlockerIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/SoftwareImpactSeverityHighIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SoftwareImpactSeverityHighIcon.tsx index e9734376f44..e9734376f44 100644 --- a/server/sonar-web/design-system/src/components/icons/SoftwareImpactSeverityHighIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SoftwareImpactSeverityHighIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/SoftwareImpactSeverityInfoIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SoftwareImpactSeverityInfoIcon.tsx index 7939c630b8d..62490f2c572 100644 --- a/server/sonar-web/design-system/src/components/icons/SoftwareImpactSeverityInfoIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SoftwareImpactSeverityInfoIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { IconInfo } from '@sonarsource/echoes-react'; import { IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/SoftwareImpactSeverityLowIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SoftwareImpactSeverityLowIcon.tsx index 012f9436b69..012f9436b69 100644 --- a/server/sonar-web/design-system/src/components/icons/SoftwareImpactSeverityLowIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SoftwareImpactSeverityLowIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/SoftwareImpactSeverityMediumIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SoftwareImpactSeverityMediumIcon.tsx index bcf632761d1..bcf632761d1 100644 --- a/server/sonar-web/design-system/src/components/icons/SoftwareImpactSeverityMediumIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SoftwareImpactSeverityMediumIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/SortAscendIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SortAscendIcon.tsx index 8a8ba33ad23..2f85106888e 100644 --- a/server/sonar-web/design-system/src/components/icons/SortAscendIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SortAscendIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { SortAscIcon } from '@primer/octicons-react'; import { OcticonHoc } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/SortDescendIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/SortDescendIcon.tsx index 6b74c2bfd33..99634592da0 100644 --- a/server/sonar-web/design-system/src/components/icons/SortDescendIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/SortDescendIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { SortDescIcon } from '@primer/octicons-react'; import { OcticonHoc } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/StarFillIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/StarFillIcon.tsx index 6fcdd73f8d4..6fcdd73f8d4 100644 --- a/server/sonar-web/design-system/src/components/icons/StarFillIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/StarFillIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/StarIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/StarIcon.tsx index d3106b1e560..d3106b1e560 100644 --- a/server/sonar-web/design-system/src/components/icons/StarIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/StarIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/StatusConfirmedIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/StatusConfirmedIcon.tsx index 078e87740e1..078e87740e1 100644 --- a/server/sonar-web/design-system/src/components/icons/StatusConfirmedIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/StatusConfirmedIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/StatusOpenIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/StatusOpenIcon.tsx index f860ed59146..f860ed59146 100644 --- a/server/sonar-web/design-system/src/components/icons/StatusOpenIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/StatusOpenIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/StatusReopenedIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/StatusReopenedIcon.tsx index 7c42c34f345..7c42c34f345 100644 --- a/server/sonar-web/design-system/src/components/icons/StatusReopenedIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/StatusReopenedIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/StatusResolvedIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/StatusResolvedIcon.tsx index 5a9f9478c96..5a9f9478c96 100644 --- a/server/sonar-web/design-system/src/components/icons/StatusResolvedIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/StatusResolvedIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/TestFileIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/TestFileIcon.tsx index bf5c541f2cd..bf5c541f2cd 100644 --- a/server/sonar-web/design-system/src/components/icons/TestFileIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/TestFileIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/TrashIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/TrashIcon.tsx index 695745e7cde..63a2eb9ef13 100644 --- a/server/sonar-web/design-system/src/components/icons/TrashIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/TrashIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { TrashIcon as BaseTrashIcon } from '@primer/octicons-react'; import { OcticonHoc } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/TrendDownCircleIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/TrendDownCircleIcon.tsx index 87aacd210d3..a52f1878b68 100644 --- a/server/sonar-web/design-system/src/components/icons/TrendDownCircleIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/TrendDownCircleIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor, themeContrast } from '../../helpers'; import { CustomIcon, IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/TrendIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/TrendIcon.tsx index d6e67dec2b6..9b0ec6dc79a 100644 --- a/server/sonar-web/design-system/src/components/icons/TrendIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/TrendIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { IconArrowDownRight, diff --git a/server/sonar-web/design-system/src/components/icons/TrendUpCircleIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/TrendUpCircleIcon.tsx index 3541ad6c138..89e9077b0a1 100644 --- a/server/sonar-web/design-system/src/components/icons/TrendUpCircleIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/TrendUpCircleIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor, themeContrast } from '../../helpers'; import { CustomIcon, IconProps } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/TriangleDownIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/TriangleDownIcon.tsx index a55f62909da..2fb7ea858e1 100644 --- a/server/sonar-web/design-system/src/components/icons/TriangleDownIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/TriangleDownIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { TriangleDownIcon as Octicon } from '@primer/octicons-react'; import { OcticonHoc } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/TriangleLeftIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/TriangleLeftIcon.tsx index b1c16912dc2..53ec906cea1 100644 --- a/server/sonar-web/design-system/src/components/icons/TriangleLeftIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/TriangleLeftIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { TriangleLeftIcon as Octicon } from '@primer/octicons-react'; import { OcticonHoc } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/TriangleRightIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/TriangleRightIcon.tsx index 32dbbc9ca58..386af1e5adc 100644 --- a/server/sonar-web/design-system/src/components/icons/TriangleRightIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/TriangleRightIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { TriangleRightIcon as Octicon } from '@primer/octicons-react'; import { OcticonHoc } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/TriangleUpIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/TriangleUpIcon.tsx index 8218648c408..36dcff58a32 100644 --- a/server/sonar-web/design-system/src/components/icons/TriangleUpIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/TriangleUpIcon.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { TriangleUpIcon as Octicon } from '@primer/octicons-react'; import { OcticonHoc } from './Icon'; diff --git a/server/sonar-web/design-system/src/components/icons/UnfoldDownIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/UnfoldDownIcon.tsx index 4ab6276fd90..4ab6276fd90 100644 --- a/server/sonar-web/design-system/src/components/icons/UnfoldDownIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/UnfoldDownIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/UnfoldIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/UnfoldIcon.tsx index 7bf4b7277bd..7bf4b7277bd 100644 --- a/server/sonar-web/design-system/src/components/icons/UnfoldIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/UnfoldIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/UnfoldUpIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/UnfoldUpIcon.tsx index 02f7bab9e4c..02f7bab9e4c 100644 --- a/server/sonar-web/design-system/src/components/icons/UnfoldUpIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/UnfoldUpIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/UserGroupIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/UserGroupIcon.tsx index 8c4b4a7e6e9..8c4b4a7e6e9 100644 --- a/server/sonar-web/design-system/src/components/icons/UserGroupIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/UserGroupIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/VulnerabilityIcon.tsx b/server/sonar-web/src/main/js/design-system/components/icons/VulnerabilityIcon.tsx index eda4bbad453..eda4bbad453 100644 --- a/server/sonar-web/design-system/src/components/icons/VulnerabilityIcon.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/VulnerabilityIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/__tests__/Icon-test.tsx b/server/sonar-web/src/main/js/design-system/components/icons/__tests__/Icon-test.tsx index 69df3ea0b8a..875785a5e99 100644 --- a/server/sonar-web/design-system/src/components/icons/__tests__/Icon-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/icons/__tests__/Icon-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { CheckIcon } from '@primer/octicons-react'; import { screen } from '@testing-library/react'; import { render } from '../../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/icons/index.ts b/server/sonar-web/src/main/js/design-system/components/icons/index.ts index 45d0a0c4ff9..45d0a0c4ff9 100644 --- a/server/sonar-web/design-system/src/components/icons/index.ts +++ b/server/sonar-web/src/main/js/design-system/components/icons/index.ts diff --git a/server/sonar-web/design-system/src/components/index.ts b/server/sonar-web/src/main/js/design-system/components/index.ts index 8d7292db47b..8d7292db47b 100644 --- a/server/sonar-web/design-system/src/components/index.ts +++ b/server/sonar-web/src/main/js/design-system/components/index.ts diff --git a/server/sonar-web/design-system/src/components/input/Checkbox.tsx b/server/sonar-web/src/main/js/design-system/components/input/Checkbox.tsx index bb61804928b..be242079268 100644 --- a/server/sonar-web/design-system/src/components/input/Checkbox.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/Checkbox.tsx @@ -17,13 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; -import { Spinner } from 'design-system/src/components/Spinner'; import React from 'react'; import tw from 'twin.macro'; import { themeBorder, themeColor, themeContrast } from '../../helpers/theme'; import { CheckIcon } from '../icons/CheckIcon'; import { CustomIcon } from '../icons/Icon'; +import { Spinner } from '../Spinner'; interface Props { checked: boolean; diff --git a/server/sonar-web/design-system/src/components/input/DatePicker.tsx b/server/sonar-web/src/main/js/design-system/components/input/DatePicker.tsx index 52b31445c44..c4df4f6861a 100644 --- a/server/sonar-web/design-system/src/components/input/DatePicker.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/DatePicker.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { format } from 'date-fns'; diff --git a/server/sonar-web/design-system/src/components/input/DatePickerCustomCalendarNavigation.tsx b/server/sonar-web/src/main/js/design-system/components/input/DatePickerCustomCalendarNavigation.tsx index 467fdab81a4..8020048a2bb 100644 --- a/server/sonar-web/design-system/src/components/input/DatePickerCustomCalendarNavigation.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/DatePickerCustomCalendarNavigation.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { format, getYear, diff --git a/server/sonar-web/design-system/src/components/input/DateRangePicker.tsx b/server/sonar-web/src/main/js/design-system/components/input/DateRangePicker.tsx index 316a45d7df1..316a45d7df1 100644 --- a/server/sonar-web/design-system/src/components/input/DateRangePicker.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/DateRangePicker.tsx diff --git a/server/sonar-web/design-system/src/components/input/DiscreetSelect.tsx b/server/sonar-web/src/main/js/design-system/components/input/DiscreetSelect.tsx index 26183140f8b..bea14a8c309 100644 --- a/server/sonar-web/design-system/src/components/input/DiscreetSelect.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/DiscreetSelect.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { GroupBase, OnChangeValue } from 'react-select'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/input/FileInput.tsx b/server/sonar-web/src/main/js/design-system/components/input/FileInput.tsx index bda00ea4070..1388db830d1 100644 --- a/server/sonar-web/design-system/src/components/input/FileInput.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/FileInput.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; import { useCallback, useRef, useState } from 'react'; import { ButtonSecondary } from '../../sonar-aligned/components/buttons/ButtonSecondary'; diff --git a/server/sonar-web/design-system/src/components/input/FormField.tsx b/server/sonar-web/src/main/js/design-system/components/input/FormField.tsx index f40334f0339..f40334f0339 100644 --- a/server/sonar-web/design-system/src/components/input/FormField.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/FormField.tsx diff --git a/server/sonar-web/design-system/src/components/input/InputField.tsx b/server/sonar-web/src/main/js/design-system/components/input/InputField.tsx index 3ba931e3cbe..3ba931e3cbe 100644 --- a/server/sonar-web/design-system/src/components/input/InputField.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/InputField.tsx diff --git a/server/sonar-web/design-system/src/components/input/InputMultiSelect.tsx b/server/sonar-web/src/main/js/design-system/components/input/InputMultiSelect.tsx index 83e3aeb24eb..f809c6f23fd 100644 --- a/server/sonar-web/design-system/src/components/input/InputMultiSelect.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/InputMultiSelect.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { themeBorder } from '../../helpers'; diff --git a/server/sonar-web/design-system/src/components/input/InputSearch.tsx b/server/sonar-web/src/main/js/design-system/components/input/InputSearch.tsx index 9a3acc81743..fc6555485c2 100644 --- a/server/sonar-web/design-system/src/components/input/InputSearch.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/InputSearch.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { IconSearch } from '@sonarsource/echoes-react'; import classNames from 'classnames'; diff --git a/server/sonar-web/design-system/src/components/input/MultiSelectMenu.tsx b/server/sonar-web/src/main/js/design-system/components/input/MultiSelectMenu.tsx index 0515aa6e4c7..0515aa6e4c7 100644 --- a/server/sonar-web/design-system/src/components/input/MultiSelectMenu.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/MultiSelectMenu.tsx diff --git a/server/sonar-web/design-system/src/components/input/MultiSelectMenuOption.tsx b/server/sonar-web/src/main/js/design-system/components/input/MultiSelectMenuOption.tsx index 55f048869dd..55f048869dd 100644 --- a/server/sonar-web/design-system/src/components/input/MultiSelectMenuOption.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/MultiSelectMenuOption.tsx diff --git a/server/sonar-web/design-system/src/components/input/RadioButton.tsx b/server/sonar-web/src/main/js/design-system/components/input/RadioButton.tsx index 12edde48727..12edde48727 100644 --- a/server/sonar-web/design-system/src/components/input/RadioButton.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/RadioButton.tsx diff --git a/server/sonar-web/design-system/src/components/input/SearchSelect.tsx b/server/sonar-web/src/main/js/design-system/components/input/SearchSelect.tsx index ca6b86a4f60..81880590bd6 100644 --- a/server/sonar-web/design-system/src/components/input/SearchSelect.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/SearchSelect.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; import { omit } from 'lodash'; import React from 'react'; diff --git a/server/sonar-web/design-system/src/components/input/SearchSelectDropdown.tsx b/server/sonar-web/src/main/js/design-system/components/input/SearchSelectDropdown.tsx index 2fa9f677311..59bf62daf4f 100644 --- a/server/sonar-web/design-system/src/components/input/SearchSelectDropdown.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/SearchSelectDropdown.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import React from 'react'; import { diff --git a/server/sonar-web/design-system/src/components/input/SearchSelectDropdownControl.tsx b/server/sonar-web/src/main/js/design-system/components/input/SearchSelectDropdownControl.tsx index bfb355172ea..bfb355172ea 100644 --- a/server/sonar-web/design-system/src/components/input/SearchSelectDropdownControl.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/SearchSelectDropdownControl.tsx diff --git a/server/sonar-web/design-system/src/components/input/__tests__/DatePicker-test.tsx b/server/sonar-web/src/main/js/design-system/components/input/__tests__/DatePicker-test.tsx index d86bfc83787..1010da38bbf 100644 --- a/server/sonar-web/design-system/src/components/input/__tests__/DatePicker-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/__tests__/DatePicker-test.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { getMonth, getYear, parseISO } from 'date-fns'; -import { byRole } from '../../../../../src/main/js/sonar-aligned/helpers/testSelector'; +import { byRole } from '~sonar-aligned/helpers/testSelector'; import { renderWithContext } from '../../../helpers/testUtils'; import { DatePicker } from '../DatePicker'; @@ -40,7 +41,11 @@ it('behaves correctly', async () => { const nav = screen.getByRole('navigation'); expect(nav).toBeInTheDocument(); - await user.click(byRole('navigation').byRole('button', { name: 'previous_month_x' }).get()); + await user.click( + byRole('navigation') + .byRole('button', { name: /previous_month_x/ }) + .get(), + ); await user.click(screen.getByText('7')); expect(onChange).toHaveBeenCalled(); @@ -54,7 +59,7 @@ it('behaves correctly', async () => { * Then check that onChange was correctly called with a date in the following month */ await user.click(screen.getByRole('textbox')); - await user.click(screen.getByRole('button', { name: 'next_month_x' })); + await user.click(screen.getByRole('button', { name: /next_month_x/ })); await user.click(screen.getByText('12')); expect(onChange).toHaveBeenCalled(); @@ -98,9 +103,9 @@ it('should disable next navigation when not in the accepted range', async () => }); await user.click(screen.getByRole('textbox')); - await user.click(screen.getByRole('button', { name: 'next_month_x' })); + await user.click(screen.getByRole('button', { name: /next_month_x/ })); - expect(screen.getByRole('button', { name: 'next_month_x' })).toBeDisabled(); + expect(screen.getByRole('button', { name: /next_month_x/ })).toBeDisabled(); }); it('should clear the value', async () => { diff --git a/server/sonar-web/design-system/src/components/input/__tests__/DateRangePicker-test.tsx b/server/sonar-web/src/main/js/design-system/components/input/__tests__/DateRangePicker-test.tsx index 21489a311ed..7f3b976bd3e 100644 --- a/server/sonar-web/design-system/src/components/input/__tests__/DateRangePicker-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/__tests__/DateRangePicker-test.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { formatISO, parseISO } from 'date-fns'; -import { byRole } from '../../../../../src/main/js/sonar-aligned/helpers/testSelector'; +import { byRole } from '~sonar-aligned/helpers/testSelector'; import { IntlWrapper, render } from '../../../helpers/testUtils'; import { DateRangePicker } from '../DateRangePicker'; @@ -46,7 +47,7 @@ it('behaves correctly', async () => { const fromNav = nav.get(); expect(fromNav).toBeInTheDocument(); - await user.click(nav.byRole('button', { name: 'previous_month_x' }).get()); + await user.click(nav.byRole('button', { name: /previous_month_x/ }).get()); await user.click(screen.getByText('7')); expect(fromNav).not.toBeInTheDocument(); @@ -60,8 +61,8 @@ it('behaves correctly', async () => { jest.runAllTimers(); - const previousButton = nav.byRole('button', { name: 'previous_month_x' }); - const nextButton = nav.byRole('button', { name: 'next_month_x' }); + const previousButton = nav.byRole('button', { name: /previous_month_x/ }); + const nextButton = nav.byRole('button', { name: /next_month_x/ }); await user.click(previousButton.get()); await user.click(nextButton.get()); await user.click(previousButton.get()); diff --git a/server/sonar-web/design-system/src/components/input/__tests__/DiscreetSelect-test.tsx b/server/sonar-web/src/main/js/design-system/components/input/__tests__/DiscreetSelect-test.tsx index 4b8c057021d..fdcae349d04 100644 --- a/server/sonar-web/design-system/src/components/input/__tests__/DiscreetSelect-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/__tests__/DiscreetSelect-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { render } from '../../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/input/__tests__/FileInput-test.tsx b/server/sonar-web/src/main/js/design-system/components/input/__tests__/FileInput-test.tsx index 8a38a30d2f4..8a2dc504087 100644 --- a/server/sonar-web/design-system/src/components/input/__tests__/FileInput-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/__tests__/FileInput-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { fireEvent, screen } from '@testing-library/react'; import { render } from '../../../helpers/testUtils'; import { FCProps } from '../../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/input/__tests__/FormField-test.tsx b/server/sonar-web/src/main/js/design-system/components/input/__tests__/FormField-test.tsx index 7f9987e9048..584176f7ef6 100644 --- a/server/sonar-web/design-system/src/components/input/__tests__/FormField-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/__tests__/FormField-test.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import { FCProps } from '~types/misc'; import { render } from '../../../helpers/testUtils'; +import { FCProps } from '../../../types/misc'; import { FormField } from '../FormField'; it('should render correctly', () => { diff --git a/server/sonar-web/design-system/src/components/input/__tests__/InputField-test.tsx b/server/sonar-web/src/main/js/design-system/components/input/__tests__/InputField-test.tsx index ccac9ace735..6b3d74823e9 100644 --- a/server/sonar-web/design-system/src/components/input/__tests__/InputField-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/__tests__/InputField-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; import { InputField } from '../InputField'; diff --git a/server/sonar-web/design-system/src/components/input/__tests__/InputMultiSelect-test.tsx b/server/sonar-web/src/main/js/design-system/components/input/__tests__/InputMultiSelect-test.tsx index a7e59c05fb4..9d666af59c6 100644 --- a/server/sonar-web/design-system/src/components/input/__tests__/InputMultiSelect-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/__tests__/InputMultiSelect-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; import { FCProps } from '../../../types/misc'; import { InputMultiSelect } from '../InputMultiSelect'; diff --git a/server/sonar-web/design-system/src/components/input/__tests__/InputSearch-test.tsx b/server/sonar-web/src/main/js/design-system/components/input/__tests__/InputSearch-test.tsx index 07783a193d5..5b9e9e1088e 100644 --- a/server/sonar-web/design-system/src/components/input/__tests__/InputSearch-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/__tests__/InputSearch-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen, waitFor } from '@testing-library/react'; import { renderWithContext } from '../../../helpers/testUtils'; import { FCProps } from '../../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/input/__tests__/MultiSelectMenu-test.tsx b/server/sonar-web/src/main/js/design-system/components/input/__tests__/MultiSelectMenu-test.tsx index 582ba68bf18..4da8c83284b 100644 --- a/server/sonar-web/design-system/src/components/input/__tests__/MultiSelectMenu-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/__tests__/MultiSelectMenu-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { renderWithContext } from '../../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/input/__tests__/RadioButton-test.tsx b/server/sonar-web/src/main/js/design-system/components/input/__tests__/RadioButton-test.tsx index e10620281e7..67690e1145e 100644 --- a/server/sonar-web/design-system/src/components/input/__tests__/RadioButton-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/__tests__/RadioButton-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { render } from '../../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/input/__tests__/SearchSelectDropdown-test.tsx b/server/sonar-web/src/main/js/design-system/components/input/__tests__/SearchSelectDropdown-test.tsx index 893f886f8c4..0a26150060e 100644 --- a/server/sonar-web/design-system/src/components/input/__tests__/SearchSelectDropdown-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/input/__tests__/SearchSelectDropdown-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { renderWithContext } from '../../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/input/index.ts b/server/sonar-web/src/main/js/design-system/components/input/index.ts index 958e8a66e96..7d61ef5c708 100644 --- a/server/sonar-web/design-system/src/components/input/index.ts +++ b/server/sonar-web/src/main/js/design-system/components/input/index.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export * from './Checkbox'; export * from './DatePicker'; export * from './DateRangePicker'; diff --git a/server/sonar-web/design-system/src/components/layouts.tsx b/server/sonar-web/src/main/js/design-system/components/layouts.tsx index 0daae6ae4de..512556d8c8d 100644 --- a/server/sonar-web/design-system/src/components/layouts.tsx +++ b/server/sonar-web/src/main/js/design-system/components/layouts.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { diff --git a/server/sonar-web/design-system/src/components/lists/ListItem.tsx b/server/sonar-web/src/main/js/design-system/components/lists/ListItem.tsx index 4dc84d231b2..80259aea919 100644 --- a/server/sonar-web/design-system/src/components/lists/ListItem.tsx +++ b/server/sonar-web/src/main/js/design-system/components/lists/ListItem.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/lists/NumberedList.tsx b/server/sonar-web/src/main/js/design-system/components/lists/NumberedList.tsx index 94987331964..42f11169b21 100644 --- a/server/sonar-web/design-system/src/components/lists/NumberedList.tsx +++ b/server/sonar-web/src/main/js/design-system/components/lists/NumberedList.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/lists/NumberedListItem.tsx b/server/sonar-web/src/main/js/design-system/components/lists/NumberedListItem.tsx index 52261123f24..48cb9ed7e0f 100644 --- a/server/sonar-web/design-system/src/components/lists/NumberedListItem.tsx +++ b/server/sonar-web/src/main/js/design-system/components/lists/NumberedListItem.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeColor } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/lists/OrderedList.tsx b/server/sonar-web/src/main/js/design-system/components/lists/OrderedList.tsx index 6ab45595fd2..bea6a0be112 100644 --- a/server/sonar-web/design-system/src/components/lists/OrderedList.tsx +++ b/server/sonar-web/src/main/js/design-system/components/lists/OrderedList.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/lists/UnorderedList.tsx b/server/sonar-web/src/main/js/design-system/components/lists/UnorderedList.tsx index 2bc22ea9278..9a32471c770 100644 --- a/server/sonar-web/design-system/src/components/lists/UnorderedList.tsx +++ b/server/sonar-web/src/main/js/design-system/components/lists/UnorderedList.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/lists/__tests__/NumberedList-test.tsx b/server/sonar-web/src/main/js/design-system/components/lists/__tests__/NumberedList-test.tsx index 539897e88c0..e1977fbb542 100644 --- a/server/sonar-web/design-system/src/components/lists/__tests__/NumberedList-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/lists/__tests__/NumberedList-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../../helpers/testUtils'; import { NumberedList } from '../NumberedList'; diff --git a/server/sonar-web/design-system/src/components/lists/__tests__/UnorderedList-test.tsx b/server/sonar-web/src/main/js/design-system/components/lists/__tests__/UnorderedList-test.tsx index b254db4ddb6..44ccbdc4c0c 100644 --- a/server/sonar-web/design-system/src/components/lists/__tests__/UnorderedList-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/lists/__tests__/UnorderedList-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../../helpers/testUtils'; import { ListItem } from '../ListItem'; diff --git a/server/sonar-web/design-system/src/components/lists/index.ts b/server/sonar-web/src/main/js/design-system/components/lists/index.ts index 1e3b1a6b6d2..0e6853e2eb5 100644 --- a/server/sonar-web/design-system/src/components/lists/index.ts +++ b/server/sonar-web/src/main/js/design-system/components/lists/index.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export * from './ListItem'; export * from './NumberedList'; export * from './NumberedListItem'; diff --git a/server/sonar-web/design-system/src/components/modal/Modal.tsx b/server/sonar-web/src/main/js/design-system/components/modal/Modal.tsx index 680d0a501e4..ea6d5cd381c 100644 --- a/server/sonar-web/design-system/src/components/modal/Modal.tsx +++ b/server/sonar-web/src/main/js/design-system/components/modal/Modal.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Global, css, useTheme } from '@emotion/react'; import { Button } from '@sonarsource/echoes-react'; import classNames from 'classnames'; diff --git a/server/sonar-web/design-system/src/components/modal/ModalBody.tsx b/server/sonar-web/src/main/js/design-system/components/modal/ModalBody.tsx index 4bb9f68df7a..81b78cba5d7 100644 --- a/server/sonar-web/design-system/src/components/modal/ModalBody.tsx +++ b/server/sonar-web/src/main/js/design-system/components/modal/ModalBody.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { ReactNode } from 'react'; diff --git a/server/sonar-web/design-system/src/components/modal/ModalFooter.tsx b/server/sonar-web/src/main/js/design-system/components/modal/ModalFooter.tsx index 52ddd7ed1c0..52ddd7ed1c0 100644 --- a/server/sonar-web/design-system/src/components/modal/ModalFooter.tsx +++ b/server/sonar-web/src/main/js/design-system/components/modal/ModalFooter.tsx diff --git a/server/sonar-web/design-system/src/components/modal/ModalHeader.tsx b/server/sonar-web/src/main/js/design-system/components/modal/ModalHeader.tsx index 2355e5c1ef5..822ec5c97b8 100644 --- a/server/sonar-web/design-system/src/components/modal/ModalHeader.tsx +++ b/server/sonar-web/src/main/js/design-system/components/modal/ModalHeader.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { ReactNode } from 'react'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/modal/__tests__/Modal-test.tsx b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/Modal-test.tsx index bce838c0580..2f57c125ff0 100644 --- a/server/sonar-web/design-system/src/components/modal/__tests__/Modal-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/Modal-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { renderWithContext } from '../../../helpers/testUtils'; import { Modal, PropsWithChildren, PropsWithSections } from '../Modal'; diff --git a/server/sonar-web/design-system/src/components/modal/__tests__/ModalBody-test.tsx b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/ModalBody-test.tsx index 3991d5c0eb0..d57bf781403 100644 --- a/server/sonar-web/design-system/src/components/modal/__tests__/ModalBody-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/ModalBody-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '../../../helpers/testUtils'; import { ModalBody } from '../ModalBody'; diff --git a/server/sonar-web/design-system/src/components/modal/__tests__/ModalFooter-test.tsx b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/ModalFooter-test.tsx index 21549a81caf..423a018986e 100644 --- a/server/sonar-web/design-system/src/components/modal/__tests__/ModalFooter-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/ModalFooter-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { renderWithContext } from '../../../helpers/testUtils'; import { FCProps } from '../../../types/misc'; import { ModalFooter } from '../ModalFooter'; diff --git a/server/sonar-web/design-system/src/components/modal/__tests__/ModalHeader-test.tsx b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/ModalHeader-test.tsx index d122dc4dc6a..7d1842472af 100644 --- a/server/sonar-web/design-system/src/components/modal/__tests__/ModalHeader-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/ModalHeader-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '../../../helpers/testUtils'; import { FCProps } from '../../../types/misc'; import { ModalHeader } from '../ModalHeader'; diff --git a/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalBody-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/__snapshots__/ModalBody-test.tsx.snap index b2f36f6b060..b2f36f6b060 100644 --- a/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalBody-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/__snapshots__/ModalBody-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap index 7b3942e017d..7b3942e017d 100644 --- a/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/__snapshots__/ModalFooter-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalHeader-test.tsx.snap b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/__snapshots__/ModalHeader-test.tsx.snap index 1e7ed6edeb5..1e7ed6edeb5 100644 --- a/server/sonar-web/design-system/src/components/modal/__tests__/__snapshots__/ModalHeader-test.tsx.snap +++ b/server/sonar-web/src/main/js/design-system/components/modal/__tests__/__snapshots__/ModalHeader-test.tsx.snap diff --git a/server/sonar-web/design-system/src/components/popups.tsx b/server/sonar-web/src/main/js/design-system/components/popups.tsx index be51241eae0..c39bff30fbb 100644 --- a/server/sonar-web/design-system/src/components/popups.tsx +++ b/server/sonar-web/src/main/js/design-system/components/popups.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { throttle } from 'lodash'; diff --git a/server/sonar-web/design-system/src/components/subnavigation/SubnavigationAccordion.tsx b/server/sonar-web/src/main/js/design-system/components/subnavigation/SubnavigationAccordion.tsx index 8e68df56f3f..7202abc78bf 100644 --- a/server/sonar-web/design-system/src/components/subnavigation/SubnavigationAccordion.tsx +++ b/server/sonar-web/src/main/js/design-system/components/subnavigation/SubnavigationAccordion.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { ReactNode, useCallback, useState } from 'react'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/subnavigation/SubnavigationGroup.tsx b/server/sonar-web/src/main/js/design-system/components/subnavigation/SubnavigationGroup.tsx index 797eb87d0fc..b17903088bc 100644 --- a/server/sonar-web/design-system/src/components/subnavigation/SubnavigationGroup.tsx +++ b/server/sonar-web/src/main/js/design-system/components/subnavigation/SubnavigationGroup.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { Children, ElementType, Fragment, HtmlHTMLAttributes, ReactNode } from 'react'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/components/subnavigation/SubnavigationHeading.tsx b/server/sonar-web/src/main/js/design-system/components/subnavigation/SubnavigationHeading.tsx index 0c24195963d..991cd37f0e8 100644 --- a/server/sonar-web/design-system/src/components/subnavigation/SubnavigationHeading.tsx +++ b/server/sonar-web/src/main/js/design-system/components/subnavigation/SubnavigationHeading.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeColor, themeContrast } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/subnavigation/SubnavigationItem.tsx b/server/sonar-web/src/main/js/design-system/components/subnavigation/SubnavigationItem.tsx index 7372373aab2..251750e1ce9 100644 --- a/server/sonar-web/design-system/src/components/subnavigation/SubnavigationItem.tsx +++ b/server/sonar-web/src/main/js/design-system/components/subnavigation/SubnavigationItem.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { css } from '@emotion/react'; import styled from '@emotion/styled'; import classNames from 'classnames'; diff --git a/server/sonar-web/design-system/src/components/subnavigation/SubnavigationSubheading.tsx b/server/sonar-web/src/main/js/design-system/components/subnavigation/SubnavigationSubheading.tsx index 7f7cd5bacde..5555ac3d1b7 100644 --- a/server/sonar-web/design-system/src/components/subnavigation/SubnavigationSubheading.tsx +++ b/server/sonar-web/src/main/js/design-system/components/subnavigation/SubnavigationSubheading.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import tw from 'twin.macro'; import { themeColor } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/subnavigation/__tests__/SubnavigationAccordion-test.tsx b/server/sonar-web/src/main/js/design-system/components/subnavigation/__tests__/SubnavigationAccordion-test.tsx index 0690d2372a6..f4f47bf0aca 100644 --- a/server/sonar-web/design-system/src/components/subnavigation/__tests__/SubnavigationAccordion-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/subnavigation/__tests__/SubnavigationAccordion-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { render } from '../../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/subnavigation/__tests__/SubnavigationItem-test.tsx b/server/sonar-web/src/main/js/design-system/components/subnavigation/__tests__/SubnavigationItem-test.tsx index ccf2b33039b..50e566a7668 100644 --- a/server/sonar-web/design-system/src/components/subnavigation/__tests__/SubnavigationItem-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/subnavigation/__tests__/SubnavigationItem-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../../helpers/testUtils'; import { FCProps } from '../../../types/misc'; diff --git a/server/sonar-web/design-system/src/components/subnavigation/index.ts b/server/sonar-web/src/main/js/design-system/components/subnavigation/index.ts index 0c201f9e3bd..3ff8a020faf 100644 --- a/server/sonar-web/design-system/src/components/subnavigation/index.ts +++ b/server/sonar-web/src/main/js/design-system/components/subnavigation/index.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export * from './SubnavigationAccordion'; export * from './SubnavigationGroup'; export * from './SubnavigationHeading'; diff --git a/server/sonar-web/design-system/src/components/toast-message/ToastMessage.tsx b/server/sonar-web/src/main/js/design-system/components/toast-message/ToastMessage.tsx index 50de44f5277..50de44f5277 100644 --- a/server/sonar-web/design-system/src/components/toast-message/ToastMessage.tsx +++ b/server/sonar-web/src/main/js/design-system/components/toast-message/ToastMessage.tsx diff --git a/server/sonar-web/design-system/src/components/toast-message/ToastMessageGlobalStyles.tsx b/server/sonar-web/src/main/js/design-system/components/toast-message/ToastMessageGlobalStyles.tsx index a86653e3e20..b5eaa4a0e87 100644 --- a/server/sonar-web/design-system/src/components/toast-message/ToastMessageGlobalStyles.tsx +++ b/server/sonar-web/src/main/js/design-system/components/toast-message/ToastMessageGlobalStyles.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Global, css } from '@emotion/react'; export function ToastMessageGlobalStyles() { diff --git a/server/sonar-web/design-system/src/components/toast-message/__tests__/ToastMessage-test.tsx b/server/sonar-web/src/main/js/design-system/components/toast-message/__tests__/ToastMessage-test.tsx index e7b86c41656..684f29f71e2 100644 --- a/server/sonar-web/design-system/src/components/toast-message/__tests__/ToastMessage-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/toast-message/__tests__/ToastMessage-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ToastContainer } from 'react-toastify'; import { TOAST_AUTOCLOSE_DELAY } from '../../../helpers/constants'; import { render } from '../../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/components/toast-message/__tests__/toast-utils-test.tsx b/server/sonar-web/src/main/js/design-system/components/toast-message/__tests__/toast-utils-test.tsx index ee77829bfa6..8585a52b6c1 100644 --- a/server/sonar-web/design-system/src/components/toast-message/__tests__/toast-utils-test.tsx +++ b/server/sonar-web/src/main/js/design-system/components/toast-message/__tests__/toast-utils-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { toast } from 'react-toastify'; import { FlagErrorIcon, FlagSuccessIcon } from '../../icons'; import { diff --git a/server/sonar-web/design-system/src/components/toast-message/toast-utils.tsx b/server/sonar-web/src/main/js/design-system/components/toast-message/toast-utils.tsx index 128ae48ce7c..74482d18820 100644 --- a/server/sonar-web/design-system/src/components/toast-message/toast-utils.tsx +++ b/server/sonar-web/src/main/js/design-system/components/toast-message/toast-utils.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ReactNode } from 'react'; import { ToastOptions, toast } from 'react-toastify'; import { FlagErrorIcon, FlagSuccessIcon } from '../icons'; diff --git a/server/sonar-web/design-system/src/components/visual-components/FishVisual.tsx b/server/sonar-web/src/main/js/design-system/components/visual-components/FishVisual.tsx index 045f90d4590..aaa16563685 100644 --- a/server/sonar-web/design-system/src/components/visual-components/FishVisual.tsx +++ b/server/sonar-web/src/main/js/design-system/components/visual-components/FishVisual.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/visual-components/FlagVisual.tsx b/server/sonar-web/src/main/js/design-system/components/visual-components/FlagVisual.tsx index fdf6064bfba..92827199793 100644 --- a/server/sonar-web/design-system/src/components/visual-components/FlagVisual.tsx +++ b/server/sonar-web/src/main/js/design-system/components/visual-components/FlagVisual.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { themeColor } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/components/visual-components/index.ts b/server/sonar-web/src/main/js/design-system/components/visual-components/index.ts index fa826856b3b..8259c122134 100644 --- a/server/sonar-web/design-system/src/components/visual-components/index.ts +++ b/server/sonar-web/src/main/js/design-system/components/visual-components/index.ts @@ -17,5 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export * from './FishVisual'; export * from './FlagVisual'; diff --git a/server/sonar-web/design-system/src/helpers/__tests__/colors-test.ts b/server/sonar-web/src/main/js/design-system/helpers/__tests__/colors-test.ts index 4b66529c78d..76d324c6e80 100644 --- a/server/sonar-web/design-system/src/helpers/__tests__/colors-test.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/__tests__/colors-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as colors from '../colors'; describe('#stringToColor', () => { diff --git a/server/sonar-web/design-system/src/helpers/__tests__/dom-test.ts b/server/sonar-web/src/main/js/design-system/helpers/__tests__/dom-test.ts index 8a2e22a5cff..d900cb22b91 100644 --- a/server/sonar-web/design-system/src/helpers/__tests__/dom-test.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/__tests__/dom-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { findAnchor } from '../dom'; it('should find the correct anchor', () => { diff --git a/server/sonar-web/design-system/src/helpers/__tests__/positioning-test.ts b/server/sonar-web/src/main/js/design-system/helpers/__tests__/positioning-test.ts index 32c2acd2bb6..2eafebe2aa2 100644 --- a/server/sonar-web/design-system/src/helpers/__tests__/positioning-test.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/__tests__/positioning-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { PopupPlacement, popupPositioning } from '../positioning'; const toggleRect = { diff --git a/server/sonar-web/design-system/src/helpers/__tests__/theme-test.ts b/server/sonar-web/src/main/js/design-system/helpers/__tests__/theme-test.ts index 433fbd857e1..aae6affd92f 100644 --- a/server/sonar-web/design-system/src/helpers/__tests__/theme-test.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/__tests__/theme-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as ThemeHelper from '../../helpers/theme'; import { lightTheme } from '../../theme'; diff --git a/server/sonar-web/design-system/src/helpers/colors.ts b/server/sonar-web/src/main/js/design-system/helpers/colors.ts index 2f955ba4f41..93fd0b2eb68 100644 --- a/server/sonar-web/design-system/src/helpers/colors.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/colors.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { CSSColor } from '../types/theme'; /* eslint-disable no-bitwise, no-mixed-operators */ diff --git a/server/sonar-web/design-system/src/helpers/constants.ts b/server/sonar-web/src/main/js/design-system/helpers/constants.ts index 0b18515f3e5..10666ac45bd 100644 --- a/server/sonar-web/design-system/src/helpers/constants.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/constants.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { theme } from 'twin.macro'; export const DEFAULT_LOCALE = 'en'; diff --git a/server/sonar-web/design-system/src/helpers/dom.ts b/server/sonar-web/src/main/js/design-system/helpers/dom.ts index b766f6973d7..03bdf13085a 100644 --- a/server/sonar-web/design-system/src/helpers/dom.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/dom.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /** * This function find the point on the target element using the rect coordinat. * This point will serve as an anchor for rect to be attached diff --git a/server/sonar-web/design-system/src/helpers/index.ts b/server/sonar-web/src/main/js/design-system/helpers/index.ts index 7af0536ce90..7af0536ce90 100644 --- a/server/sonar-web/design-system/src/helpers/index.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/index.ts diff --git a/server/sonar-web/design-system/src/helpers/keyboard.ts b/server/sonar-web/src/main/js/design-system/helpers/keyboard.ts index 1410ca45c95..a95b0d6366f 100644 --- a/server/sonar-web/design-system/src/helpers/keyboard.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/keyboard.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum Key { ArrowLeft = 'ArrowLeft', ArrowUp = 'ArrowUp', diff --git a/server/sonar-web/design-system/src/helpers/positioning.ts b/server/sonar-web/src/main/js/design-system/helpers/positioning.ts index b2105c606b1..9b56acf546d 100644 --- a/server/sonar-web/design-system/src/helpers/positioning.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/positioning.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /** * Positioning rules: * - Bottom = below the block, horizontally centered diff --git a/server/sonar-web/design-system/src/helpers/testUtils.tsx b/server/sonar-web/src/main/js/design-system/helpers/testUtils.tsx index f7dc66aba98..c31a0a5216d 100644 --- a/server/sonar-web/design-system/src/helpers/testUtils.tsx +++ b/server/sonar-web/src/main/js/design-system/helpers/testUtils.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { RenderOptions, RenderResult, render as rtlRender } from '@testing-library/react'; import userEvent, { UserEvent } from '@testing-library/user-event'; import { Options as UserEventsOptions } from '@testing-library/user-event/dist/types/options'; diff --git a/server/sonar-web/design-system/src/helpers/theme.ts b/server/sonar-web/src/main/js/design-system/helpers/theme.ts index 93bac32d55b..adcc56bf650 100644 --- a/server/sonar-web/design-system/src/helpers/theme.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/theme.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { CSSColor, Theme, ThemeColors, ThemeContrasts, ThemedProps } from '../types/theme'; import { getRGBAString } from './colors'; diff --git a/server/sonar-web/design-system/src/helpers/types.ts b/server/sonar-web/src/main/js/design-system/helpers/types.ts index cd30d4d837d..563a2c152d6 100644 --- a/server/sonar-web/design-system/src/helpers/types.ts +++ b/server/sonar-web/src/main/js/design-system/helpers/types.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export function isDefined<T>(x: T | undefined | null): x is T { return x !== undefined && x !== null; } diff --git a/server/sonar-web/design-system/src/hooks/__tests__/useResizeObserver-test.tsx b/server/sonar-web/src/main/js/design-system/hooks/__tests__/useResizeObserver-test.tsx index 1c88fca1941..f9abdf68266 100644 --- a/server/sonar-web/design-system/src/hooks/__tests__/useResizeObserver-test.tsx +++ b/server/sonar-web/src/main/js/design-system/hooks/__tests__/useResizeObserver-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { createRef, useRef } from 'react'; import { render } from '../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/hooks/useResizeObserver.ts b/server/sonar-web/src/main/js/design-system/hooks/useResizeObserver.ts index 3539b6599bd..4dd580e93d3 100644 --- a/server/sonar-web/design-system/src/hooks/useResizeObserver.ts +++ b/server/sonar-web/src/main/js/design-system/hooks/useResizeObserver.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { RefObject, useCallback, useLayoutEffect, useState } from 'react'; // Modified from source: https://codesandbox.io/s/zw8kylol8m diff --git a/server/sonar-web/design-system/src/index.ts b/server/sonar-web/src/main/js/design-system/index.ts index 3bac299b5e3..08e634ab684 100644 --- a/server/sonar-web/design-system/src/index.ts +++ b/server/sonar-web/src/main/js/design-system/index.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export * from './components'; export * from './helpers'; export * from './sonar-aligned'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/Card.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/Card.tsx index 84e38aa6bac..2849511b519 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/Card.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/Card.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import * as React from 'react'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/FlagMessage.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/FlagMessage.tsx index 792f0a2c8dd..af4e821fd60 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/FlagMessage.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/FlagMessage.tsx @@ -17,12 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import * as React from 'react'; import { useIntl } from 'react-intl'; import tw from 'twin.macro'; -import { ThemeColors } from '~types/theme'; import { InteractiveIcon } from '../../components/InteractiveIcon'; import { CloseIcon, @@ -32,6 +32,7 @@ import { FlagWarningIcon, } from '../../components/icons'; import { themeBorder, themeColor, themeContrast } from '../../helpers/theme'; +import { ThemeColors } from '../../types/theme'; export type Variant = 'error' | 'warning' | 'success' | 'info'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/FlagMessageV2.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/FlagMessageV2.tsx index 89c765fdb18..d7c98e40a60 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/FlagMessageV2.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/FlagMessageV2.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { IconCheckCircle, @@ -30,8 +31,8 @@ import classNames from 'classnames'; import { HTMLAttributes } from 'react'; import { IntlShape, useIntl } from 'react-intl'; import tw from 'twin.macro'; -import { ThemeColors } from '~types/theme'; import { themeBorder, themeColor } from '../../helpers/theme'; +import { ThemeColors } from '../../types/theme'; export type FlagMessageV2Variant = 'error' | 'warning' | 'success' | 'info' | 'recommended'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/MetricsRatingBadge.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/MetricsRatingBadge.tsx index 2ca4a739a7f..5e491cf9638 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/MetricsRatingBadge.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/MetricsRatingBadge.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { forwardRef } from 'react'; import tw from 'twin.macro'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/Table.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/Table.tsx index 8fee1ad857f..e5db95df85d 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/Table.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/Table.tsx @@ -17,13 +17,14 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import classNames from 'classnames'; import { isNumber, times } from 'lodash'; import { ComponentProps, ReactNode, createContext, useContext } from 'react'; import tw from 'twin.macro'; -import { FCProps } from '~types/misc'; import { themeBorder, themeColor } from '../../helpers/theme'; +import { FCProps } from '../../types/misc'; interface TableBaseProps extends ComponentProps<'table'> { caption?: ReactNode; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/Text.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/Text.tsx index 40acc49753f..7d517c97dde 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/Text.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/Text.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { themeColor } from '../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/ToggleButton.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/ToggleButton.tsx index c95e335862a..c95e335862a 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/ToggleButton.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/ToggleButton.tsx diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/Card-test.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/Card-test.tsx index 817af9d4da6..c80217f6c9a 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/Card-test.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/Card-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../../helpers/testUtils'; import { Card, GreyCard, LightGreyCard } from '../Card'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/FlagMessage-test.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/FlagMessage-test.tsx index c7f795008a5..e62982ce3d6 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/FlagMessage-test.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/FlagMessage-test.tsx @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { IntlShape } from 'react-intl'; -import { FCProps } from '~types/misc'; import { render } from '../../../helpers/testUtils'; +import { FCProps } from '../../../types/misc'; import { DismissableFlagMessage, FlagMessage, Variant } from '../FlagMessage'; jest.mock( diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/FlagMessageV2-test.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/FlagMessageV2-test.tsx index 5b2dfe95a96..c4691ee45c3 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/FlagMessageV2-test.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/FlagMessageV2-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { ComponentProps } from 'react'; import { IntlShape } from 'react-intl'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/MetricsRatingBadge-test.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/MetricsRatingBadge-test.tsx index 8342ab1ca6c..88bf77aed89 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/MetricsRatingBadge-test.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/MetricsRatingBadge-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../../helpers/testUtils'; import { FCProps } from '../../../types/misc'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/Table-test.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/Table-test.tsx index affcb195bf3..9802899c740 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/Table-test.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/Table-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import { render } from '../../../helpers/testUtils'; import { diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/ToggleButton-test.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/ToggleButton-test.tsx index 7b07cba3ff9..838b9aaaaa8 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/__tests__/ToggleButton-test.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/__tests__/ToggleButton-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { render } from '../../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/BareButton.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/BareButton.tsx index 02b49e3f53d..3b5572c5913 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/BareButton.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/BareButton.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { themeColor } from '../../../helpers'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/Button.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/Button.tsx index 3301bd71d36..3301bd71d36 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/Button.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/Button.tsx diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonPrimary.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/ButtonPrimary.tsx index 9e8230d9634..9011fae73d4 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonPrimary.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/ButtonPrimary.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { css } from '@emotion/react'; import styled from '@emotion/styled'; import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonSecondary.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/ButtonSecondary.tsx index 96112cb2290..0a9945f10f0 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonSecondary.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/ButtonSecondary.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers'; import { Button } from './Button'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonPrimary.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/DangerButtonPrimary.tsx index b192ac9c5cc..9d60d6bf11e 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonPrimary.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/DangerButtonPrimary.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers'; import { Button } from './Button'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonSecondary.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/DangerButtonSecondary.tsx index ed135dd2890..aa714154140 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonSecondary.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/DangerButtonSecondary.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers'; import { Button } from './Button'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ThirdPartyButton.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/ThirdPartyButton.tsx index afc27b57f1c..702c32050d3 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ThirdPartyButton.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/ThirdPartyButton.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import styled from '@emotion/styled'; import { OPACITY_20_PERCENT } from '../../../helpers/constants'; import { themeBorder, themeColor, themeContrast } from '../../../helpers/theme'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/__tests__/ButtonPrimary-test.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/__tests__/ButtonPrimary-test.tsx index af81f1dd7d1..3bea90998ed 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/__tests__/ButtonPrimary-test.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/__tests__/ButtonPrimary-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render, screen } from '@testing-library/react'; import { ButtonPrimary } from '../ButtonPrimary'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/index.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/index.ts index 6ee90cb4fa7..6ee90cb4fa7 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/index.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/buttons/index.ts diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/index.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/index.ts index 4c7641353c3..4c7641353c3 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/index.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/index.ts diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/input/InputSelect.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/input/InputSelect.tsx index 5a0ebf60e02..09c78a502b4 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/input/InputSelect.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/input/InputSelect.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; import { omit } from 'lodash'; import { useMemo } from 'react'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/input/SelectCommon.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/input/SelectCommon.tsx index 66a331362f9..66a331362f9 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/input/SelectCommon.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/input/SelectCommon.tsx diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/input/__tests__/InputSelect-test.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/input/__tests__/InputSelect-test.tsx index f94686b1c53..5b72e42562e 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/input/__tests__/InputSelect-test.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/input/__tests__/InputSelect-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { renderWithContext } from '../../../../helpers/testUtils'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/input/index.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/input/index.ts index b8fd68f2a75..b8fd68f2a75 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/input/index.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/input/index.ts diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/typography/Note.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/typography/Note.tsx index bf259e4fd0c..bf259e4fd0c 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/typography/Note.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/typography/Note.tsx diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/typography/Title.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/typography/Title.tsx index 30f71f3b4af..30f71f3b4af 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/typography/Title.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/typography/Title.tsx diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/typography/index.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/typography/index.ts index 113312da470..113312da470 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/components/typography/index.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/components/typography/index.ts diff --git a/server/sonar-web/design-system/src/sonar-aligned/helpers/__tests__/sanitize-test.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/helpers/__tests__/sanitize-test.tsx index b8be9b99daf..b8be9b99daf 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/helpers/__tests__/sanitize-test.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/helpers/__tests__/sanitize-test.tsx diff --git a/server/sonar-web/design-system/src/sonar-aligned/helpers/__tests__/tabs-test.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/helpers/__tests__/tabs-test.ts index da506329566..b2bb634e174 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/helpers/__tests__/tabs-test.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/helpers/__tests__/tabs-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getTabId, getTabPanelId } from '../tabs'; it('should correctly generate IDs', () => { diff --git a/server/sonar-web/design-system/src/sonar-aligned/helpers/index.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/helpers/index.ts index e288f05e8ee..e288f05e8ee 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/helpers/index.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/helpers/index.ts diff --git a/server/sonar-web/design-system/src/sonar-aligned/helpers/sanitize.tsx b/server/sonar-web/src/main/js/design-system/sonar-aligned/helpers/sanitize.tsx index 1426c567efd..1426c567efd 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/helpers/sanitize.tsx +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/helpers/sanitize.tsx diff --git a/server/sonar-web/design-system/src/sonar-aligned/helpers/tabs.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/helpers/tabs.ts index 74c306100d7..277cf1040ac 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/helpers/tabs.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/helpers/tabs.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export function getTabPanelId(key: string | number) { return `tabpanel-${key}`; } diff --git a/server/sonar-web/design-system/src/sonar-aligned/hljs/HljsIssueIndicatorPlugin.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/hljs/HljsIssueIndicatorPlugin.ts index 782a23d1bea..782a23d1bea 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/hljs/HljsIssueIndicatorPlugin.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/hljs/HljsIssueIndicatorPlugin.ts diff --git a/server/sonar-web/design-system/src/sonar-aligned/hljs/HljsUnderlinePlugin.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/hljs/HljsUnderlinePlugin.ts index 519e3d9b0b1..bca593e8e40 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/hljs/HljsUnderlinePlugin.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/hljs/HljsUnderlinePlugin.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { HighlightResult } from 'highlight.js'; export interface UnderlineRangePosition { diff --git a/server/sonar-web/design-system/src/sonar-aligned/hljs/__tests__/HljsIssueIndicatorPlugin-test.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/hljs/__tests__/HljsIssueIndicatorPlugin-test.ts index 2760ee2c65b..b1c4a34d312 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/hljs/__tests__/HljsIssueIndicatorPlugin-test.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/hljs/__tests__/HljsIssueIndicatorPlugin-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { BeforeHighlightContext, HighlightResult } from 'highlight.js'; import { hljsIssueIndicatorPlugin, HljsIssueIndicatorPlugin } from '../HljsIssueIndicatorPlugin'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/hljs/__tests__/HljsUnderlinePlugin-test.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/hljs/__tests__/HljsUnderlinePlugin-test.ts index 5e3b0db0ff2..aba15bdea86 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/hljs/__tests__/HljsUnderlinePlugin-test.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/hljs/__tests__/HljsUnderlinePlugin-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { HighlightResult } from 'highlight.js'; import { HljsUnderlinePlugin, hljsUnderlinePlugin } from '../HljsUnderlinePlugin'; diff --git a/server/sonar-web/design-system/src/sonar-aligned/hljs/index.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/hljs/index.ts index a0279b93e76..a0279b93e76 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/hljs/index.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/hljs/index.ts diff --git a/server/sonar-web/design-system/src/sonar-aligned/index.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/index.ts index 2a116ed0d06..2a116ed0d06 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/index.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/index.ts diff --git a/server/sonar-web/design-system/src/sonar-aligned/types/index.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/types/index.ts index 076ba52f860..076ba52f860 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/types/index.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/types/index.ts diff --git a/server/sonar-web/design-system/src/sonar-aligned/types/measures.ts b/server/sonar-web/src/main/js/design-system/sonar-aligned/types/measures.ts index b7e402a65f7..b7e402a65f7 100644 --- a/server/sonar-web/design-system/src/sonar-aligned/types/measures.ts +++ b/server/sonar-web/src/main/js/design-system/sonar-aligned/types/measures.ts diff --git a/server/sonar-web/design-system/src/theme/colors.ts b/server/sonar-web/src/main/js/design-system/theme/colors.ts index 18584103ff6..faf51585884 100644 --- a/server/sonar-web/design-system/src/theme/colors.ts +++ b/server/sonar-web/src/main/js/design-system/theme/colors.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export default { white: [255, 255, 255], black: [0, 0, 0], diff --git a/server/sonar-web/design-system/src/theme/index.ts b/server/sonar-web/src/main/js/design-system/theme/index.ts index b1fcad7211c..ddd0b10c444 100644 --- a/server/sonar-web/design-system/src/theme/index.ts +++ b/server/sonar-web/src/main/js/design-system/theme/index.ts @@ -17,5 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export * from './light'; export * from './withTheme'; diff --git a/server/sonar-web/design-system/src/theme/light.ts b/server/sonar-web/src/main/js/design-system/theme/light.ts index f9c0aaa006f..f9c0aaa006f 100644 --- a/server/sonar-web/design-system/src/theme/light.ts +++ b/server/sonar-web/src/main/js/design-system/theme/light.ts diff --git a/server/sonar-web/design-system/src/theme/withTheme.tsx b/server/sonar-web/src/main/js/design-system/theme/withTheme.tsx index f4520ac5501..35b9841f215 100644 --- a/server/sonar-web/design-system/src/theme/withTheme.tsx +++ b/server/sonar-web/src/main/js/design-system/theme/withTheme.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useTheme } from '@emotion/react'; import { Theme } from '../types/theme'; diff --git a/server/sonar-web/design-system/src/types/charts.ts b/server/sonar-web/src/main/js/design-system/types/charts.ts index 14a98b4722e..204b0a710f9 100644 --- a/server/sonar-web/design-system/src/types/charts.ts +++ b/server/sonar-web/src/main/js/design-system/types/charts.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export interface ChartPoint { x: Date; y: number | string | undefined; diff --git a/server/sonar-web/design-system/src/types/index.ts b/server/sonar-web/src/main/js/design-system/types/index.ts index 40d66ffc6c8..b24d64198ce 100644 --- a/server/sonar-web/design-system/src/types/index.ts +++ b/server/sonar-web/src/main/js/design-system/types/index.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export * from './charts'; export * from './issues'; export * from './measures'; diff --git a/server/sonar-web/design-system/src/types/issues.ts b/server/sonar-web/src/main/js/design-system/types/issues.ts index afb536b09fd..52db6b9fe4b 100644 --- a/server/sonar-web/design-system/src/types/issues.ts +++ b/server/sonar-web/src/main/js/design-system/types/issues.ts @@ -17,4 +17,5 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export type IssueType = 'BUG' | 'VULNERABILITY' | 'CODE_SMELL' | 'SECURITY_HOTSPOT'; diff --git a/server/sonar-web/design-system/src/types/measures.ts b/server/sonar-web/src/main/js/design-system/types/measures.ts index 71ee1b988de..427ea92ef74 100644 --- a/server/sonar-web/design-system/src/types/measures.ts +++ b/server/sonar-web/src/main/js/design-system/types/measures.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum DuplicationEnum { A = 'A', B = 'B', diff --git a/server/sonar-web/design-system/src/types/misc.ts b/server/sonar-web/src/main/js/design-system/types/misc.ts index 10bfb3351d1..467399208ad 100644 --- a/server/sonar-web/design-system/src/types/misc.ts +++ b/server/sonar-web/src/main/js/design-system/types/misc.ts @@ -17,5 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export type FCProps<T extends React.FunctionComponent<React.PropsWithChildren<any>>> = Parameters<T>[0]; diff --git a/server/sonar-web/design-system/src/types/quality-gates.ts b/server/sonar-web/src/main/js/design-system/types/quality-gates.ts index 7a2e395ac7d..40fea00492a 100644 --- a/server/sonar-web/design-system/src/types/quality-gates.ts +++ b/server/sonar-web/src/main/js/design-system/types/quality-gates.ts @@ -17,4 +17,5 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export type QGStatus = 'ERROR' | 'OK' | 'NONE' | 'NOT_COMPUTED'; diff --git a/server/sonar-web/design-system/src/types/theme.ts b/server/sonar-web/src/main/js/design-system/types/theme.ts index 2cebeaf2833..9d5dc6f0d00 100644 --- a/server/sonar-web/design-system/src/types/theme.ts +++ b/server/sonar-web/src/main/js/design-system/types/theme.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { lightTheme } from '../theme'; export type InputSizeKeys = 'small' | 'medium' | 'large' | 'full' | 'auto'; diff --git a/server/sonar-web/src/main/js/helpers/UseQuery.tsx b/server/sonar-web/src/main/js/helpers/UseQuery.tsx index 570a9872d00..1880d24a9bf 100644 --- a/server/sonar-web/src/main/js/helpers/UseQuery.tsx +++ b/server/sonar-web/src/main/js/helpers/UseQuery.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { UseQueryResult } from '@tanstack/react-query'; import { ReactElement } from 'react'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/branch-like-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/branch-like-test.ts index 95c5124a450..6d5c7d7c635 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/branch-like-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/branch-like-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getBrancheLikesAsTree, isSameBranchLike, sortBranches } from '../branch-like'; import { mockBranch, mockMainBranch, mockPullRequest } from '../mocks/branch-like'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/code-difference-test.tsx b/server/sonar-web/src/main/js/helpers/__tests__/code-difference-test.tsx index f65317b396d..fee14f5e403 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/code-difference-test.tsx +++ b/server/sonar-web/src/main/js/helpers/__tests__/code-difference-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '@testing-library/react'; -import { SafeHTMLInjection } from 'design-system/lib'; -import React from 'react'; +import { SafeHTMLInjection } from '~design-system'; import applyCodeDifferences from '../code-difference'; it('should apply diff view correctly', () => { diff --git a/server/sonar-web/src/main/js/helpers/__tests__/dates-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/dates-test.ts index 5f6497dcb40..b8bcbde87dd 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/dates-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/dates-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as dates from '../dates'; const { parseDate } = dates; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/error-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/error-test.ts index a07fe44ee9c..22406c3c17e 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/error-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/error-test.ts @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { addGlobalErrorMessage } from 'design-system'; +import { addGlobalErrorMessage } from '~design-system'; import { throwGlobalError } from '~sonar-aligned/helpers/error'; -jest.mock('design-system', () => ({ +jest.mock('~design-system', () => ({ addGlobalErrorMessage: jest.fn(), })); diff --git a/server/sonar-web/src/main/js/helpers/__tests__/extensions-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/extensions-test.ts index 342de908848..996332e0a12 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/extensions-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/extensions-test.ts @@ -17,6 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +import { setImmediate } from 'timers'; import exposeLibraries from '../../app/components/extensions/exposeLibraries'; import { getExtensionStart, installScript, installStyles } from '../extensions'; import { installExtensionsHandler } from '../extensionsHandler'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/extensionsHandler-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/extensionsHandler-test.ts index ae8a169fd4f..12eaeacc978 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/extensionsHandler-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/extensionsHandler-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getExtensionFromCache, getWebAnalyticsPageHandlerFromCache, diff --git a/server/sonar-web/src/main/js/helpers/__tests__/handleRequiredAuthentication-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/handleRequiredAuthentication-test.ts index 8fb8760a0fd..949a93f6986 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/handleRequiredAuthentication-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/handleRequiredAuthentication-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import handleRequiredAuthentication from '../handleRequiredAuthentication'; const originalLocation = window.location; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/issues-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/issues-test.ts index c7f05100c7f..3e900ed8bc5 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/issues-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/issues-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IssueType } from '../../types/issues'; import { parseIssueFromResponse, sortByType } from '../issues'; import { mockIssue } from '../testMocks'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/l10n-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/l10n-test.ts index 9e7e6c4de8f..39d66bb80f8 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/l10n-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/l10n-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Dict } from '../../types/types'; import { getLocalizedCategoryMetricName, diff --git a/server/sonar-web/src/main/js/helpers/__tests__/l10nBundle-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/l10nBundle-test.ts index 43e8208f75f..5ac785375b5 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/l10nBundle-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/l10nBundle-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { fetchL10nBundle } from '../../api/l10n'; import { loadL10nBundle } from '../l10nBundle'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/measures-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/measures-test.ts index 7b5d60a4cf2..09527fbb946 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/measures-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/measures-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey } from '~sonar-aligned/types/metrics'; import { CCT_SOFTWARE_QUALITY_METRICS } from '../constants'; import { diff --git a/server/sonar-web/src/main/js/helpers/__tests__/new-code-definition-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/new-code-definition-test.ts index 808b9d086e2..f7039ffe246 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/new-code-definition-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/new-code-definition-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { NewCodeDefinition, NewCodeDefinitionType } from '../../types/new-code-definition'; import { mockNewCodePeriod } from '../mocks/new-code-definition'; import { diff --git a/server/sonar-web/src/main/js/helpers/__tests__/new-code-period-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/new-code-period-test.ts index ebdc90edd1d..13fe6c3e422 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/new-code-period-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/new-code-period-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { NewCodeDefinitionType } from '../../types/new-code-definition'; import { getNewCodePeriodLabel } from '../new-code-period'; import { mockPeriod } from '../testMocks'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/path-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/path-test.ts index 00d3b727482..2604e250bda 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/path-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/path-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { collapsedDirFromPath, collapsePath, diff --git a/server/sonar-web/src/main/js/helpers/__tests__/permissions-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/permissions-test.ts index 046b32c547a..1c371edf826 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/permissions-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/permissions-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { convertToPermissionDefinitions } from '../permissions'; jest.mock('../l10nBundle', () => ({ diff --git a/server/sonar-web/src/main/js/helpers/__tests__/projectLinks-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/projectLinks-test.ts index ba566323c70..a0d92b076f5 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/projectLinks-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/projectLinks-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getLinkName, isProvided, orderLinks } from '../projectLinks'; it('#isProvided', () => { diff --git a/server/sonar-web/src/main/js/helpers/__tests__/projects-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/projects-test.ts index d212b2c45f6..2a8dcb2d257 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/projects-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/projects-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ProjectKeyValidationResult } from '../../types/component'; import { PROJECT_KEY_MAX_LEN } from '../constants'; import { validateProjectKey } from '../projects'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/qualityGates-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/qualityGates-test.ts index 9854259f611..d33628344a2 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/qualityGates-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/qualityGates-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mockQualityGateApplicationStatus, mockQualityGateProjectStatus, diff --git a/server/sonar-web/src/main/js/helpers/__tests__/query-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/query-test.ts index 7e33d5062c1..bc921f82ec4 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/query-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/query-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { parseDate } from '../dates'; import * as query from '../query'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/ratings-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/ratings-test.ts index 40990a75cef..44b5299f5b4 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/ratings-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/ratings-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getCoverageRatingAverageValue, getCoverageRatingLabel, diff --git a/server/sonar-web/src/main/js/helpers/__tests__/request-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/request-test.ts index 916919a42ac..00801470f44 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/request-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/request-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + /* eslint-disable no-await-in-loop */ import { setImmediate } from 'timers'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/security-standard-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/security-standard-test.ts index b5cc582e35c..de456248356 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/security-standard-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/security-standard-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Standards } from '../../types/security'; import { renderCASACategory, diff --git a/server/sonar-web/src/main/js/helpers/__tests__/sonarlint-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/sonarlint-test.ts index 6f77ba8e461..920728b1388 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/sonarlint-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/sonarlint-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { NewUserToken, TokenType } from '../../types/token'; import { HttpStatus } from '../request'; import { diff --git a/server/sonar-web/src/main/js/helpers/__tests__/stringify-queryparams-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/stringify-queryparams-test.ts index 621bae5d4ea..c490497d781 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/stringify-queryparams-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/stringify-queryparams-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { stringify } from '../stringify-queryparams'; describe('stringify', () => { diff --git a/server/sonar-web/src/main/js/helpers/__tests__/strings-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/strings-test.ts index bd90bc8d3bd..67228a2f376 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/strings-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/strings-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { decodeJwt, latinize } from '../strings'; describe('#decodeJwt', () => { diff --git a/server/sonar-web/src/main/js/helpers/__tests__/system-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/system-test.ts index 13aa4be1886..56a98e50244 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/system-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/system-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { AppVariablesElement } from '../../types/browser'; import { InstanceType } from '../../types/system'; import { initAppVariables } from '../system'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/tokens-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/tokens-test.ts index 01b68ad7fb0..727f0dad026 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/tokens-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/tokens-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getAllValues } from '../../api/settings'; import { SettingsKey } from '../../types/settings'; import { TokenExpiration } from '../../types/token'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts index 9405edfdf25..a67dfa8c0dd 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { searchParamsToQuery } from '~sonar-aligned/helpers/router'; import { queryToSearchString } from '~sonar-aligned/helpers/urls'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/helpers/__tests__/users-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/users-test.ts index 6a598489a5a..7e442b1619a 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/users-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/users-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isSameHomePage } from '../users'; describe('isSameHomePage', () => { diff --git a/server/sonar-web/src/main/js/helpers/branch-like.ts b/server/sonar-web/src/main/js/helpers/branch-like.ts index e0676d7e353..3317e12e38e 100644 --- a/server/sonar-web/src/main/js/helpers/branch-like.ts +++ b/server/sonar-web/src/main/js/helpers/branch-like.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { orderBy } from 'lodash'; import { isBranch, isMainBranch, isPullRequest } from '~sonar-aligned/helpers/branch-like'; import { Branch, BranchLike, BranchLikeTree, PullRequest } from '../types/branch-like'; diff --git a/server/sonar-web/src/main/js/helpers/browser.ts b/server/sonar-web/src/main/js/helpers/browser.ts index 4c8854b8d44..a1260467d63 100644 --- a/server/sonar-web/src/main/js/helpers/browser.ts +++ b/server/sonar-web/src/main/js/helpers/browser.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { EnhancedWindow } from '../types/browser'; export function getEnhancedWindow() { diff --git a/server/sonar-web/src/main/js/helpers/code-difference.ts b/server/sonar-web/src/main/js/helpers/code-difference.ts index 2caaae10460..637ddf8e67d 100644 --- a/server/sonar-web/src/main/js/helpers/code-difference.ts +++ b/server/sonar-web/src/main/js/helpers/code-difference.ts @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { sanitizeHTMLNoSVGNoMathML } from 'design-system'; import { diffLines } from 'diff'; import { groupBy, keyBy } from 'lodash'; +import { sanitizeHTMLNoSVGNoMathML } from '~design-system'; const NUMBER_OF_EXAMPLES = 2; diff --git a/server/sonar-web/src/main/js/helpers/component.ts b/server/sonar-web/src/main/js/helpers/component.ts index 51f7aa6658b..a49547d4324 100644 --- a/server/sonar-web/src/main/js/helpers/component.ts +++ b/server/sonar-web/src/main/js/helpers/component.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentMeasure, ComponentMeasureEnhanced } from '../types/types'; export function getComponentMeasureUniqueKey( diff --git a/server/sonar-web/src/main/js/helpers/cookies.ts b/server/sonar-web/src/main/js/helpers/cookies.ts index b9cb3a25af7..437f446dbe2 100644 --- a/server/sonar-web/src/main/js/helpers/cookies.ts +++ b/server/sonar-web/src/main/js/helpers/cookies.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { memoize } from 'lodash'; import { Dict } from '../types/types'; diff --git a/server/sonar-web/src/main/js/helpers/csv.ts b/server/sonar-web/src/main/js/helpers/csv.ts index e01ea877cb2..f245967a31b 100644 --- a/server/sonar-web/src/main/js/helpers/csv.ts +++ b/server/sonar-web/src/main/js/helpers/csv.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export function csvEscape(value: string): string { const escaped = value.replace(/"/g, '\\"'); return `"${escaped}"`; diff --git a/server/sonar-web/src/main/js/helpers/dates.ts b/server/sonar-web/src/main/js/helpers/dates.ts index de8491b452d..3ad435a1426 100644 --- a/server/sonar-web/src/main/js/helpers/dates.ts +++ b/server/sonar-web/src/main/js/helpers/dates.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ParsableDate } from '../types/dates'; function pad(number: number) { diff --git a/server/sonar-web/src/main/js/helpers/editions.ts b/server/sonar-web/src/main/js/helpers/editions.ts index 9101c6cd327..aec5f2ca932 100644 --- a/server/sonar-web/src/main/js/helpers/editions.ts +++ b/server/sonar-web/src/main/js/helpers/editions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { omitNil } from '../helpers/request'; import { Edition, EditionKey } from '../types/editions'; import { SystemUpgrade } from '../types/system'; diff --git a/server/sonar-web/src/main/js/helpers/extensions.ts b/server/sonar-web/src/main/js/helpers/extensions.ts index 18726200767..272c1359209 100644 --- a/server/sonar-web/src/main/js/helpers/extensions.ts +++ b/server/sonar-web/src/main/js/helpers/extensions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getBaseUrl } from '../helpers/system'; import { ExtensionStartMethod } from '../types/extension'; import { getExtensionFromCache } from './extensionsHandler'; diff --git a/server/sonar-web/src/main/js/helpers/extensionsHandler.ts b/server/sonar-web/src/main/js/helpers/extensionsHandler.ts index 71640a8516a..45443474836 100644 --- a/server/sonar-web/src/main/js/helpers/extensionsHandler.ts +++ b/server/sonar-web/src/main/js/helpers/extensionsHandler.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + // Do not import dependencies in this helper, to keep initial bundle load as small as possible import { ExtensionRegistryEntry, ExtensionStartMethod } from '../types/extension'; diff --git a/server/sonar-web/src/main/js/helpers/globalMessages.ts b/server/sonar-web/src/main/js/helpers/globalMessages.ts index 691fa79f042..f9716befe3c 100644 --- a/server/sonar-web/src/main/js/helpers/globalMessages.ts +++ b/server/sonar-web/src/main/js/helpers/globalMessages.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { addGlobalErrorMessage } from 'design-system'; +import { addGlobalErrorMessage } from '~design-system'; import { parseError } from './request'; export function addGlobalErrorMessageFromAPI(param: Response | string) { diff --git a/server/sonar-web/src/main/js/helpers/handleRequiredAuthentication.ts b/server/sonar-web/src/main/js/helpers/handleRequiredAuthentication.ts index 09a6e7e1201..77f6255e57d 100644 --- a/server/sonar-web/src/main/js/helpers/handleRequiredAuthentication.ts +++ b/server/sonar-web/src/main/js/helpers/handleRequiredAuthentication.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getBaseUrl } from './system'; export default function handleRequiredAuthentication() { diff --git a/server/sonar-web/src/main/js/helpers/issues.ts b/server/sonar-web/src/main/js/helpers/issues.ts index 1a9d364edcc..6f55df61794 100644 --- a/server/sonar-web/src/main/js/helpers/issues.ts +++ b/server/sonar-web/src/main/js/helpers/issues.ts @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { BugIcon, CodeSmellIcon, SecurityHotspotIcon, VulnerabilityIcon } from 'design-system'; + import { flatten, sortBy } from 'lodash'; +import { BugIcon, CodeSmellIcon, SecurityHotspotIcon, VulnerabilityIcon } from '~design-system'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { SoftwareQuality } from '../types/clean-code-taxonomy'; import { IssueType, RawIssue } from '../types/issues'; diff --git a/server/sonar-web/src/main/js/helpers/keyboardEventHelpers.ts b/server/sonar-web/src/main/js/helpers/keyboardEventHelpers.ts index 6a73fad10a0..8cd8f55bd8d 100644 --- a/server/sonar-web/src/main/js/helpers/keyboardEventHelpers.ts +++ b/server/sonar-web/src/main/js/helpers/keyboardEventHelpers.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export function isShortcut(event: KeyboardEvent): boolean { return event.ctrlKey || event.metaKey; } diff --git a/server/sonar-web/src/main/js/helpers/keycodes.ts b/server/sonar-web/src/main/js/helpers/keycodes.ts index f5a601e02c5..a51a2e57dcb 100644 --- a/server/sonar-web/src/main/js/helpers/keycodes.ts +++ b/server/sonar-web/src/main/js/helpers/keycodes.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum KeyboardKeys { LeftArrow = 'ArrowLeft', UpArrow = 'ArrowUp', diff --git a/server/sonar-web/src/main/js/helpers/l10n.ts b/server/sonar-web/src/main/js/helpers/l10n.ts index d21a1a79fa2..920a5a6c577 100644 --- a/server/sonar-web/src/main/js/helpers/l10n.ts +++ b/server/sonar-web/src/main/js/helpers/l10n.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getMessages } from './l10nBundle'; export function hasMessage(...keys: string[]): boolean { diff --git a/server/sonar-web/src/main/js/helpers/l10nBundle.ts b/server/sonar-web/src/main/js/helpers/l10nBundle.ts index d9f975b247e..4fc589c47f8 100644 --- a/server/sonar-web/src/main/js/helpers/l10nBundle.ts +++ b/server/sonar-web/src/main/js/helpers/l10nBundle.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { IntlShape, createIntl, createIntlCache } from 'react-intl'; import { fetchL10nBundle } from '../api/l10n'; import { L10nBundle, L10nBundleRequestParams } from '../types/l10nBundle'; diff --git a/server/sonar-web/src/main/js/helpers/measures.ts b/server/sonar-web/src/main/js/helpers/measures.ts index c3fed3454e3..90044e80d15 100644 --- a/server/sonar-web/src/main/js/helpers/measures.ts +++ b/server/sonar-web/src/main/js/helpers/measures.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { QualityGateStatusCondition, diff --git a/server/sonar-web/src/main/js/helpers/mocks/alm-integrations.ts b/server/sonar-web/src/main/js/helpers/mocks/alm-integrations.ts index dc011bb0ce6..700920c668a 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/alm-integrations.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/alm-integrations.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { AzureProject, AzureRepository, diff --git a/server/sonar-web/src/main/js/helpers/mocks/alm-settings.ts b/server/sonar-web/src/main/js/helpers/mocks/alm-settings.ts index 4c52d60b5c9..f506f6106a7 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/alm-settings.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/alm-settings.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { AlmKeys, AlmSettingsBindingStatus, diff --git a/server/sonar-web/src/main/js/helpers/mocks/application.ts b/server/sonar-web/src/main/js/helpers/mocks/application.ts index 4e7cec4c858..8666da7a209 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/application.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/application.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ApplicationPeriod } from '../../types/application'; export function mockApplicationPeriod( diff --git a/server/sonar-web/src/main/js/helpers/mocks/branch-like.ts b/server/sonar-web/src/main/js/helpers/mocks/branch-like.ts index 0a6a25f1a5f..7eb716e979e 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/branch-like.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/branch-like.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Branch, BranchLike, MainBranch, PullRequest } from '../../types/branch-like'; export function mockBranch(overrides: Partial<Branch> = {}): Branch { diff --git a/server/sonar-web/src/main/js/helpers/mocks/component-report.ts b/server/sonar-web/src/main/js/helpers/mocks/component-report.ts index bbfdb08b77e..8e5c7d3e6d8 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/component-report.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/component-report.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentReportStatus } from '../../types/component-report'; export function mockComponentReportStatus( diff --git a/server/sonar-web/src/main/js/helpers/mocks/component.ts b/server/sonar-web/src/main/js/helpers/mocks/component.ts index b5f40a10449..dcef4629d10 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/component.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/component.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { TreeComponent } from '../../types/component'; diff --git a/server/sonar-web/src/main/js/helpers/mocks/definitions-list.ts b/server/sonar-web/src/main/js/helpers/mocks/definitions-list.ts index 604dc021a22..d7920ab15d7 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/definitions-list.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/definitions-list.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ExtendedSettingDefinition, SettingType } from '../../types/settings'; export const definitions: ExtendedSettingDefinition[] = [ diff --git a/server/sonar-web/src/main/js/helpers/mocks/dom.ts b/server/sonar-web/src/main/js/helpers/mocks/dom.ts index de82a3ad3dc..4c6dabe9fee 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/dom.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/dom.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export function mockHtmlElement<T extends Element>(overrides: Partial<T> = {}): T { return { getBoundingClientRect: () => ({ diff --git a/server/sonar-web/src/main/js/helpers/mocks/dop-translation.ts b/server/sonar-web/src/main/js/helpers/mocks/dop-translation.ts index 80ab2957ab8..d7d1fa53f46 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/dop-translation.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/dop-translation.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { GitHubConfigurationResponse } from '../../types/dop-translation'; import { ProvisioningType } from '../../types/provisioning'; diff --git a/server/sonar-web/src/main/js/helpers/mocks/editions.ts b/server/sonar-web/src/main/js/helpers/mocks/editions.ts index ad3cee8d089..1e40b788151 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/editions.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/editions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { License } from '../../types/editions'; export function mockLicense(override?: Partial<License>) { diff --git a/server/sonar-web/src/main/js/helpers/mocks/issues.ts b/server/sonar-web/src/main/js/helpers/mocks/issues.ts index bb57d300303..1b0f89a7184 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/issues.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/issues.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Query } from '../../apps/issues/utils'; import { IssueChangelog, IssueChangelogDiff } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/helpers/mocks/metrics.ts b/server/sonar-web/src/main/js/helpers/mocks/metrics.ts index 44b98806ac6..13e22197e2b 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/metrics.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/metrics.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Dict, Metric } from '../../types/types'; export const DEFAULT_METRICS: Dict<Metric> = { diff --git a/server/sonar-web/src/main/js/helpers/mocks/new-code-definition.ts b/server/sonar-web/src/main/js/helpers/mocks/new-code-definition.ts index 83054bb7e44..1a1bc1c140f 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/new-code-definition.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/new-code-definition.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { NewCodeDefinition, NewCodeDefinitionBranch, diff --git a/server/sonar-web/src/main/js/helpers/mocks/permissions.ts b/server/sonar-web/src/main/js/helpers/mocks/permissions.ts index 065054d54ef..2a3bfe8f27f 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/permissions.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/permissions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Permission, PermissionGroup, diff --git a/server/sonar-web/src/main/js/helpers/mocks/plugins.ts b/server/sonar-web/src/main/js/helpers/mocks/plugins.ts index a345aed3c2b..58fed3e5f84 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/plugins.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/plugins.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { AvailablePlugin, InstalledPlugin, diff --git a/server/sonar-web/src/main/js/helpers/mocks/project-activity.ts b/server/sonar-web/src/main/js/helpers/mocks/project-activity.ts index f6720c67d7a..f55aa81f76e 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/project-activity.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/project-activity.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { Analysis, diff --git a/server/sonar-web/src/main/js/helpers/mocks/projects.ts b/server/sonar-web/src/main/js/helpers/mocks/projects.ts index 2648066b96e..23e4ac07145 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/projects.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/projects.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component'; import { Project } from '../../api/project-management'; diff --git a/server/sonar-web/src/main/js/helpers/mocks/quality-gates.ts b/server/sonar-web/src/main/js/helpers/mocks/quality-gates.ts index 9549e5e00d3..0e631fc69ee 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/quality-gates.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/quality-gates.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey } from '~sonar-aligned/types/metrics'; import { QualityGateApplicationStatus, diff --git a/server/sonar-web/src/main/js/helpers/mocks/quality-profiles.ts b/server/sonar-web/src/main/js/helpers/mocks/quality-profiles.ts index 7e97204fdc5..95b6bd03b07 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/quality-profiles.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/quality-profiles.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ProfileOption } from '../../apps/projectQualityProfiles/components/LanguageProfileSelectOption'; export function mockProfileOption(overrides: Partial<ProfileOption> = {}): ProfileOption { diff --git a/server/sonar-web/src/main/js/helpers/mocks/react-select.ts b/server/sonar-web/src/main/js/helpers/mocks/react-select.ts index e9dd9779b5d..8ce61866b69 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/react-select.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/react-select.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ClearIndicatorProps, ControlProps, diff --git a/server/sonar-web/src/main/js/helpers/mocks/security-hotspots.ts b/server/sonar-web/src/main/js/helpers/mocks/security-hotspots.ts index 85e1a8cfb98..4c04331dc70 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/security-hotspots.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/security-hotspots.ts @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HotspotRatingEnum } from 'design-system'; + +import { HotspotRatingEnum } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { Standards } from '../../types/security'; import { diff --git a/server/sonar-web/src/main/js/helpers/mocks/settings.ts b/server/sonar-web/src/main/js/helpers/mocks/settings.ts index 343d65c0e7c..fda49343e79 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/settings.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/settings.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ExtendedSettingDefinition, Setting, diff --git a/server/sonar-web/src/main/js/helpers/mocks/sources.ts b/server/sonar-web/src/main/js/helpers/mocks/sources.ts index 3cd1fc937e3..04c8e492dd9 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/sources.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/sources.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier } from '~sonar-aligned/types/component'; import { DuplicatedFile, diff --git a/server/sonar-web/src/main/js/helpers/mocks/system-upgrades.ts b/server/sonar-web/src/main/js/helpers/mocks/system-upgrades.ts index 9b9852d015e..554245568a1 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/system-upgrades.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/system-upgrades.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { SystemUpgrade } from '../../types/system'; export function mockSystemUpgrade(override: Partial<SystemUpgrade> = {}): SystemUpgrade { diff --git a/server/sonar-web/src/main/js/helpers/mocks/tasks.ts b/server/sonar-web/src/main/js/helpers/mocks/tasks.ts index f7554515b06..72a4d7b5b4c 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/tasks.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/tasks.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { uniqueId } from 'lodash'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { Task, TaskStatuses, TaskTypes, TaskWarning } from '../../types/tasks'; diff --git a/server/sonar-web/src/main/js/helpers/mocks/token.ts b/server/sonar-web/src/main/js/helpers/mocks/token.ts index ee56a9ef7b9..75bfb6d9d07 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/token.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/token.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { TokenType, UserToken } from '../../types/token'; export function mockUserToken(overrides: Partial<UserToken> = {}): UserToken { diff --git a/server/sonar-web/src/main/js/helpers/mocks/users.ts b/server/sonar-web/src/main/js/helpers/mocks/users.ts index dbb8b27ecab..5e227bb778f 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/users.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/users.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { UserBase } from '../../types/users'; export function mockUserBase(overrides: Partial<UserBase> = {}): UserBase { diff --git a/server/sonar-web/src/main/js/helpers/mocks/webapi.ts b/server/sonar-web/src/main/js/helpers/mocks/webapi.ts index 53a9886018e..a31b434d10b 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/webapi.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/webapi.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { WebApi } from '../../types/types'; export function mockAction(overrides: Partial<WebApi.Action> = {}): WebApi.Action { diff --git a/server/sonar-web/src/main/js/helpers/mocks/webhook.ts b/server/sonar-web/src/main/js/helpers/mocks/webhook.ts index 95fa82c3665..db0125258cc 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/webhook.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/webhook.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { WebhookDelivery, WebhookResponse } from '../../types/webhook'; import { HttpStatus } from '../request'; diff --git a/server/sonar-web/src/main/js/helpers/new-code-definition.ts b/server/sonar-web/src/main/js/helpers/new-code-definition.ts index 1cebade89da..d3fd64cc022 100644 --- a/server/sonar-web/src/main/js/helpers/new-code-definition.ts +++ b/server/sonar-web/src/main/js/helpers/new-code-definition.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { NewCodeDefinition, NewCodeDefinitionType } from '../types/new-code-definition'; export const DEFAULT_NEW_CODE_DEFINITION_TYPE: NewCodeDefinitionType = diff --git a/server/sonar-web/src/main/js/helpers/new-code-period.ts b/server/sonar-web/src/main/js/helpers/new-code-period.ts index 6a56d205477..98ba6f58e4b 100644 --- a/server/sonar-web/src/main/js/helpers/new-code-period.ts +++ b/server/sonar-web/src/main/js/helpers/new-code-period.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ApplicationPeriod } from '../types/application'; import { NewCodeDefinitionType } from '../types/new-code-definition'; import { Period } from '../types/types'; diff --git a/server/sonar-web/src/main/js/helpers/path.ts b/server/sonar-web/src/main/js/helpers/path.ts index a4ad9708992..4af5716726c 100644 --- a/server/sonar-web/src/main/js/helpers/path.ts +++ b/server/sonar-web/src/main/js/helpers/path.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export function collapsePath(path: string, limit = 30): string { if (typeof path !== 'string') { return ''; diff --git a/server/sonar-web/src/main/js/helpers/permissions.ts b/server/sonar-web/src/main/js/helpers/permissions.ts index 324d6b4cada..212c7c655a8 100644 --- a/server/sonar-web/src/main/js/helpers/permissions.ts +++ b/server/sonar-web/src/main/js/helpers/permissions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Permissions } from '../types/permissions'; import { Dict, PermissionDefinition, PermissionDefinitionGroup } from '../types/types'; import { translate } from './l10n'; diff --git a/server/sonar-web/src/main/js/helpers/preferences.ts b/server/sonar-web/src/main/js/helpers/preferences.ts index 1419a21e0c0..3cbefa2258d 100644 --- a/server/sonar-web/src/main/js/helpers/preferences.ts +++ b/server/sonar-web/src/main/js/helpers/preferences.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { get, save } from './storage'; export const KEYBOARD_SHORTCUTS_ENABLED = 'keyboard_shortcuts_enabled'; diff --git a/server/sonar-web/src/main/js/helpers/projectLinks.ts b/server/sonar-web/src/main/js/helpers/projectLinks.ts index 984c7f62ed4..6ab7547cc1c 100644 --- a/server/sonar-web/src/main/js/helpers/projectLinks.ts +++ b/server/sonar-web/src/main/js/helpers/projectLinks.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { partition, sortBy } from 'lodash'; import { translate } from '../helpers/l10n'; import { ProjectLink } from '../types/types'; diff --git a/server/sonar-web/src/main/js/helpers/projects.ts b/server/sonar-web/src/main/js/helpers/projects.ts index 1da33237eae..0ef593b2931 100644 --- a/server/sonar-web/src/main/js/helpers/projects.ts +++ b/server/sonar-web/src/main/js/helpers/projects.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ProjectKeyValidationResult } from '../types/component'; import { PROJECT_KEY_MAX_LEN } from './constants'; diff --git a/server/sonar-web/src/main/js/helpers/qualityGates.ts b/server/sonar-web/src/main/js/helpers/qualityGates.ts index 0ba8ff57270..e402d31e81a 100644 --- a/server/sonar-web/src/main/js/helpers/qualityGates.ts +++ b/server/sonar-web/src/main/js/helpers/qualityGates.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; import { QualityGateApplicationStatusChildProject, diff --git a/server/sonar-web/src/main/js/helpers/query.ts b/server/sonar-web/src/main/js/helpers/query.ts index 535bdbff08f..b57b627d1b5 100644 --- a/server/sonar-web/src/main/js/helpers/query.ts +++ b/server/sonar-web/src/main/js/helpers/query.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isEqual, isNil, omitBy } from 'lodash'; import { RawQuery } from '~sonar-aligned/types/router'; import { isValidDate, parseDate, toISO8601WithOffsetString, toShortISO8601String } from './dates'; diff --git a/server/sonar-web/src/main/js/helpers/ratings.ts b/server/sonar-web/src/main/js/helpers/ratings.ts index c0fe75cd7e5..7fbd854b1b8 100644 --- a/server/sonar-web/src/main/js/helpers/ratings.ts +++ b/server/sonar-web/src/main/js/helpers/ratings.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + const RATING_GRID_SIZE = 4; export const PERCENT_MULTIPLIER = 100; export const DIFF_METRIC_PREFIX_LENGTH = 4; diff --git a/server/sonar-web/src/main/js/helpers/react-query.ts b/server/sonar-web/src/main/js/helpers/react-query.ts index 9cc311623a4..84f48815364 100644 --- a/server/sonar-web/src/main/js/helpers/react-query.ts +++ b/server/sonar-web/src/main/js/helpers/react-query.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { UseQueryResult } from '@tanstack/react-query'; import { Paging } from '../types/types'; diff --git a/server/sonar-web/src/main/js/helpers/request.ts b/server/sonar-web/src/main/js/helpers/request.ts index ee23d40b0c2..fbfa9facbb9 100644 --- a/server/sonar-web/src/main/js/helpers/request.ts +++ b/server/sonar-web/src/main/js/helpers/request.ts @@ -17,10 +17,12 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import axios, { AxiosResponse } from 'axios'; import { isNil, omitBy } from 'lodash'; import { Dict } from '../types/types'; import { getCookie } from './cookies'; +import handleRequiredAuthentication from './handleRequiredAuthentication'; import { translate } from './l10n'; import { stringify } from './stringify-queryparams'; import { getBaseUrl } from './system'; @@ -161,7 +163,8 @@ export function corsRequest(url: string, mode: RequestMode = 'cors'): Request { export function checkStatus(response: Response, bypassRedirect = false): Promise<Response> { return new Promise((resolve, reject) => { if (response.status === HttpStatus.Unauthorized && !bypassRedirect) { - import('./handleRequiredAuthentication').then((i) => i.default()).then(reject, reject); + handleRequiredAuthentication(); + reject(response); } else if (isSuccessStatus(response.status)) { resolve(response); } else { diff --git a/server/sonar-web/src/main/js/helpers/search.tsx b/server/sonar-web/src/main/js/helpers/search.tsx index 9dff03c7635..768297bf6ae 100644 --- a/server/sonar-web/src/main/js/helpers/search.tsx +++ b/server/sonar-web/src/main/js/helpers/search.tsx @@ -17,7 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; export function highlightTerm(str: string, term: string) { const pos = str.toLowerCase().indexOf(term.toLowerCase()); diff --git a/server/sonar-web/src/main/js/helpers/security-standard.ts b/server/sonar-web/src/main/js/helpers/security-standard.ts index 83a2f46391c..664286744be 100644 --- a/server/sonar-web/src/main/js/helpers/security-standard.ts +++ b/server/sonar-web/src/main/js/helpers/security-standard.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Standards } from '../types/security'; export function getStandards(): Promise<Standards> { diff --git a/server/sonar-web/src/main/js/helpers/sonarlint.ts b/server/sonar-web/src/main/js/helpers/sonarlint.ts index 5fa922fbb54..3a384f1d306 100644 --- a/server/sonar-web/src/main/js/helpers/sonarlint.ts +++ b/server/sonar-web/src/main/js/helpers/sonarlint.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { omit } from 'lodash'; import { generateToken, getTokens } from '../api/user-tokens'; import { getHostUrl } from '../helpers/urls'; diff --git a/server/sonar-web/src/main/js/helpers/storage.ts b/server/sonar-web/src/main/js/helpers/storage.ts index 576376b44da..511e1a8f263 100644 --- a/server/sonar-web/src/main/js/helpers/storage.ts +++ b/server/sonar-web/src/main/js/helpers/storage.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export function save(key: string, value?: string, suffix?: string): void { try { const finalKey = suffix ? `${key}.${suffix}` : key; diff --git a/server/sonar-web/src/main/js/helpers/stringify-queryparams.ts b/server/sonar-web/src/main/js/helpers/stringify-queryparams.ts index aff5a5374ca..903f12debbe 100644 --- a/server/sonar-web/src/main/js/helpers/stringify-queryparams.ts +++ b/server/sonar-web/src/main/js/helpers/stringify-queryparams.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/server/sonar-web/src/main/js/helpers/strings.ts b/server/sonar-web/src/main/js/helpers/strings.ts index afc008c5ed0..f4a7d4b8d02 100644 --- a/server/sonar-web/src/main/js/helpers/strings.ts +++ b/server/sonar-web/src/main/js/helpers/strings.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Dict } from '../types/types'; /* diff --git a/server/sonar-web/src/main/js/helpers/system.ts b/server/sonar-web/src/main/js/helpers/system.ts index 8319ff4d41e..f48c50c0206 100644 --- a/server/sonar-web/src/main/js/helpers/system.ts +++ b/server/sonar-web/src/main/js/helpers/system.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isAfter } from 'date-fns'; import { AppVariablesElement } from '../types/browser'; import { getEnhancedWindow } from './browser'; diff --git a/server/sonar-web/src/main/js/helpers/testMocks.ts b/server/sonar-web/src/main/js/helpers/testMocks.ts index 3abec815549..c1ffa322c1e 100644 --- a/server/sonar-web/src/main/js/helpers/testMocks.ts +++ b/server/sonar-web/src/main/js/helpers/testMocks.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { omit } from 'lodash'; import { To } from 'react-router-dom'; import { ComponentQualifier } from '~sonar-aligned/types/component'; diff --git a/server/sonar-web/src/main/js/helpers/testReactTestingUtils.tsx b/server/sonar-web/src/main/js/helpers/testReactTestingUtils.tsx index 32ce0999cf2..d3044078c47 100644 --- a/server/sonar-web/src/main/js/helpers/testReactTestingUtils.tsx +++ b/server/sonar-web/src/main/js/helpers/testReactTestingUtils.tsx @@ -22,7 +22,6 @@ import { EchoesProvider } from '@sonarsource/echoes-react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { Matcher, RenderResult, render, screen, within } from '@testing-library/react'; import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup'; -import { ToastMessageContainer } from 'design-system'; import { omit } from 'lodash'; import * as React from 'react'; import { HelmetProvider } from 'react-helmet-async'; @@ -37,6 +36,7 @@ import { createRoutesFromElements, parsePath, } from 'react-router-dom'; +import { ToastMessageContainer } from '~design-system'; import { useLocation } from '~sonar-aligned/components/hoc/withRouter'; import AdminContext from '../app/components/AdminContext'; import AppStateContextProvider from '../app/components/app-state/AppStateContextProvider'; diff --git a/server/sonar-web/src/main/js/helpers/testUtils.ts b/server/sonar-web/src/main/js/helpers/testUtils.ts index 07f45fdbfdb..86f18620903 100644 --- a/server/sonar-web/src/main/js/helpers/testUtils.ts +++ b/server/sonar-web/src/main/js/helpers/testUtils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentClass, FunctionComponent } from 'react'; export type ComponentPropsType< diff --git a/server/sonar-web/src/main/js/helpers/tokens.ts b/server/sonar-web/src/main/js/helpers/tokens.ts index cc96d34441c..e61ed92a25a 100644 --- a/server/sonar-web/src/main/js/helpers/tokens.ts +++ b/server/sonar-web/src/main/js/helpers/tokens.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { getAllValues } from '../api/settings'; import { SettingsKey } from '../types/settings'; import { TokenExpiration, UserToken } from '../types/token'; diff --git a/server/sonar-web/src/main/js/helpers/types.ts b/server/sonar-web/src/main/js/helpers/types.ts index cd30d4d837d..563a2c152d6 100644 --- a/server/sonar-web/src/main/js/helpers/types.ts +++ b/server/sonar-web/src/main/js/helpers/types.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export function isDefined<T>(x: T | undefined | null): x is T { return x !== undefined && x !== null; } diff --git a/server/sonar-web/src/main/js/helpers/urls.ts b/server/sonar-web/src/main/js/helpers/urls.ts index 564bb50ffab..3bd4c1e484e 100644 --- a/server/sonar-web/src/main/js/helpers/urls.ts +++ b/server/sonar-web/src/main/js/helpers/urls.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Path, To } from 'react-router-dom'; import { getBranchLikeQuery, diff --git a/server/sonar-web/src/main/js/helpers/users.ts b/server/sonar-web/src/main/js/helpers/users.ts index b7023a5c296..21b7664c62f 100644 --- a/server/sonar-web/src/main/js/helpers/users.ts +++ b/server/sonar-web/src/main/js/helpers/users.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { CurrentUser, HomePage } from '../types/users'; export function hasGlobalPermission(user: CurrentUser, permission: string): boolean { diff --git a/server/sonar-web/src/main/js/hooks/__tests__/useLocalStorage-test.tsx b/server/sonar-web/src/main/js/hooks/__tests__/useLocalStorage-test.tsx index c00cab766ca..474b9b76023 100644 --- a/server/sonar-web/src/main/js/hooks/__tests__/useLocalStorage-test.tsx +++ b/server/sonar-web/src/main/js/hooks/__tests__/useLocalStorage-test.tsx @@ -17,9 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import React from 'react'; import { renderComponent } from '../../helpers/testReactTestingUtils'; import { FCProps } from '../../types/misc'; import useLocalStorage from '../useLocalStorage'; diff --git a/server/sonar-web/src/main/js/hooks/useFollowScroll.ts b/server/sonar-web/src/main/js/hooks/useFollowScroll.ts index e09c32002b3..abb50d586d2 100644 --- a/server/sonar-web/src/main/js/hooks/useFollowScroll.ts +++ b/server/sonar-web/src/main/js/hooks/useFollowScroll.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { throttle } from 'lodash'; import { useEffect, useState } from 'react'; diff --git a/server/sonar-web/src/main/js/hooks/useIntersectionObserver.ts b/server/sonar-web/src/main/js/hooks/useIntersectionObserver.ts index 8eb9681fd65..efee17c5aba 100644 --- a/server/sonar-web/src/main/js/hooks/useIntersectionObserver.ts +++ b/server/sonar-web/src/main/js/hooks/useIntersectionObserver.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { RefObject, useEffect, useState } from 'react'; import { isDefined } from '../helpers/types'; diff --git a/server/sonar-web/src/main/js/hooks/useKeydown.ts b/server/sonar-web/src/main/js/hooks/useKeydown.ts index 13747bc7682..5f75af9d50c 100644 --- a/server/sonar-web/src/main/js/hooks/useKeydown.ts +++ b/server/sonar-web/src/main/js/hooks/useKeydown.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useCallback, useEffect } from 'react'; import { KeyboardKeys } from '../helpers/keycodes'; diff --git a/server/sonar-web/src/main/js/hooks/useLocalStorage.ts b/server/sonar-web/src/main/js/hooks/useLocalStorage.ts index 6ea49f7ead9..7077a536e2e 100644 --- a/server/sonar-web/src/main/js/hooks/useLocalStorage.ts +++ b/server/sonar-web/src/main/js/hooks/useLocalStorage.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React from 'react'; import { get, save } from '../helpers/storage'; diff --git a/server/sonar-web/src/main/js/queries/ai-code-assurance.ts b/server/sonar-web/src/main/js/queries/ai-code-assurance.ts index 2f8096cf859..851baa07822 100644 --- a/server/sonar-web/src/main/js/queries/ai-code-assurance.ts +++ b/server/sonar-web/src/main/js/queries/ai-code-assurance.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions } from '@tanstack/react-query'; import { isProjectAiCodeAssured } from '../api/ai-code-assurance'; import { createQueryHook } from './common'; diff --git a/server/sonar-web/src/main/js/queries/badges.ts b/server/sonar-web/src/main/js/queries/badges.ts index 810b330225e..e3e74ad28dd 100644 --- a/server/sonar-web/src/main/js/queries/badges.ts +++ b/server/sonar-web/src/main/js/queries/badges.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { getProjectBadgesToken, renewProjectBadgesToken } from '../api/project-badges'; diff --git a/server/sonar-web/src/main/js/queries/branch.tsx b/server/sonar-web/src/main/js/queries/branch.tsx index 6c25f797988..ada7254d613 100644 --- a/server/sonar-web/src/main/js/queries/branch.tsx +++ b/server/sonar-web/src/main/js/queries/branch.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { debounce, flatten } from 'lodash'; import * as React from 'react'; diff --git a/server/sonar-web/src/main/js/queries/ce.ts b/server/sonar-web/src/main/js/queries/ce.ts index 8cc36db566c..384f613a3d9 100644 --- a/server/sonar-web/src/main/js/queries/ce.ts +++ b/server/sonar-web/src/main/js/queries/ce.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions } from '@tanstack/react-query'; import { getActivity } from '../api/ce'; import { ActivityRequestParameters } from '../types/tasks'; diff --git a/server/sonar-web/src/main/js/queries/component.ts b/server/sonar-web/src/main/js/queries/component.ts index 8cb47d8dfd1..f678b1ec045 100644 --- a/server/sonar-web/src/main/js/queries/component.ts +++ b/server/sonar-web/src/main/js/queries/component.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions, useQuery, useQueryClient } from '@tanstack/react-query'; import { groupBy, omit } from 'lodash'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; diff --git a/server/sonar-web/src/main/js/queries/cves.ts b/server/sonar-web/src/main/js/queries/cves.ts index 1ad1b89a95b..c168e478403 100644 --- a/server/sonar-web/src/main/js/queries/cves.ts +++ b/server/sonar-web/src/main/js/queries/cves.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions } from '@tanstack/react-query'; import { getCve } from '../api/cves'; import { createQueryHook, StaleTime } from './common'; diff --git a/server/sonar-web/src/main/js/queries/dependencies.ts b/server/sonar-web/src/main/js/queries/dependencies.ts index d74c3b57d4c..7186d299d11 100644 --- a/server/sonar-web/src/main/js/queries/dependencies.ts +++ b/server/sonar-web/src/main/js/queries/dependencies.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions } from '@tanstack/react-query'; import { getDependencies } from '../api/dependencies'; import { BranchLikeParameters } from '../sonar-aligned/types/branch-like'; diff --git a/server/sonar-web/src/main/js/queries/devops-integration.ts b/server/sonar-web/src/main/js/queries/devops-integration.ts index fc5824edfcb..54570683331 100644 --- a/server/sonar-web/src/main/js/queries/devops-integration.ts +++ b/server/sonar-web/src/main/js/queries/devops-integration.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions, useMutation, useQueryClient } from '@tanstack/react-query'; import { useLocation } from 'react-router-dom'; import { diff --git a/server/sonar-web/src/main/js/queries/dop-translation.ts b/server/sonar-web/src/main/js/queries/dop-translation.ts index 44180d545bb..8a5ffb48635 100644 --- a/server/sonar-web/src/main/js/queries/dop-translation.ts +++ b/server/sonar-web/src/main/js/queries/dop-translation.ts @@ -19,7 +19,7 @@ */ import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; -import { addGlobalSuccessMessage } from 'design-system'; +import { addGlobalSuccessMessage } from '~design-system'; import { createGitHubConfiguration, deleteGitHubConfiguration, diff --git a/server/sonar-web/src/main/js/queries/emails.ts b/server/sonar-web/src/main/js/queries/emails.ts index eefc9434876..d80917e985a 100644 --- a/server/sonar-web/src/main/js/queries/emails.ts +++ b/server/sonar-web/src/main/js/queries/emails.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useMutation } from '@tanstack/react-query'; import { sendTestEmail } from '../api/settings'; diff --git a/server/sonar-web/src/main/js/queries/fix-suggestions.tsx b/server/sonar-web/src/main/js/queries/fix-suggestions.tsx index d33a5dea335..8faafa97a5a 100644 --- a/server/sonar-web/src/main/js/queries/fix-suggestions.tsx +++ b/server/sonar-web/src/main/js/queries/fix-suggestions.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { AxiosError } from 'axios'; import { some } from 'lodash'; diff --git a/server/sonar-web/src/main/js/queries/group-memberships.ts b/server/sonar-web/src/main/js/queries/group-memberships.ts index 26ffbb911f7..c1a4c5b1ed2 100644 --- a/server/sonar-web/src/main/js/queries/group-memberships.ts +++ b/server/sonar-web/src/main/js/queries/group-memberships.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { addGroupMembership, diff --git a/server/sonar-web/src/main/js/queries/groups.ts b/server/sonar-web/src/main/js/queries/groups.ts index 5bed2cb38bf..749ec870b48 100644 --- a/server/sonar-web/src/main/js/queries/groups.ts +++ b/server/sonar-web/src/main/js/queries/groups.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { infiniteQueryOptions, useMutation, useQueryClient } from '@tanstack/react-query'; import { createGroup, deleteGroup, getUsersGroups, updateGroup } from '../api/user_groups'; import { getNextPageParam, getPreviousPageParam } from '../helpers/react-query'; diff --git a/server/sonar-web/src/main/js/queries/identity-provider/common.ts b/server/sonar-web/src/main/js/queries/identity-provider/common.ts index ef9c01c3e66..3363d95e103 100644 --- a/server/sonar-web/src/main/js/queries/identity-provider/common.ts +++ b/server/sonar-web/src/main/js/queries/identity-provider/common.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { UseQueryOptions, useQuery } from '@tanstack/react-query'; import { getSystemInfo } from '../../api/system'; import { Provider, SysInfoCluster } from '../../types/types'; diff --git a/server/sonar-web/src/main/js/queries/identity-provider/github.ts b/server/sonar-web/src/main/js/queries/identity-provider/github.ts index 04c03109f11..4afb1964e01 100644 --- a/server/sonar-web/src/main/js/queries/identity-provider/github.ts +++ b/server/sonar-web/src/main/js/queries/identity-provider/github.ts @@ -17,10 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; -import { addGlobalSuccessMessage } from 'design-system'; import { isEqual, keyBy, partition, pick, unionBy } from 'lodash'; import { useContext } from 'react'; +import { addGlobalSuccessMessage } from '~design-system'; import { addGithubRolesMapping, checkConfigurationValidity, diff --git a/server/sonar-web/src/main/js/queries/identity-provider/gitlab.ts b/server/sonar-web/src/main/js/queries/identity-provider/gitlab.ts index 59d56b0ef4a..73130695f07 100644 --- a/server/sonar-web/src/main/js/queries/identity-provider/gitlab.ts +++ b/server/sonar-web/src/main/js/queries/identity-provider/gitlab.ts @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; -import { addGlobalSuccessMessage } from 'design-system'; import { isEqual, keyBy, partition, pick, unionBy } from 'lodash'; +import { addGlobalSuccessMessage } from '~design-system'; import { getActivity } from '../../api/ce'; import { addGitlabRolesMapping, diff --git a/server/sonar-web/src/main/js/queries/identity-provider/scim.ts b/server/sonar-web/src/main/js/queries/identity-provider/scim.ts index 5ead680bd96..423f9b5a022 100644 --- a/server/sonar-web/src/main/js/queries/identity-provider/scim.ts +++ b/server/sonar-web/src/main/js/queries/identity-provider/scim.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { useContext } from 'react'; import { activateScim, deactivateScim, fetchIsScimEnabled } from '../../api/scim-provisioning'; diff --git a/server/sonar-web/src/main/js/queries/import-projects.ts b/server/sonar-web/src/main/js/queries/import-projects.ts index 5de84a7428d..9919446ef81 100644 --- a/server/sonar-web/src/main/js/queries/import-projects.ts +++ b/server/sonar-web/src/main/js/queries/import-projects.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useIsMutating, useMutation } from '@tanstack/react-query'; import { importAzureRepository, diff --git a/server/sonar-web/src/main/js/queries/newCodeDefinition.ts b/server/sonar-web/src/main/js/queries/newCodeDefinition.ts index f3574e8defc..81941f47a21 100644 --- a/server/sonar-web/src/main/js/queries/newCodeDefinition.ts +++ b/server/sonar-web/src/main/js/queries/newCodeDefinition.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + // React-query component for new code definition import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; diff --git a/server/sonar-web/src/main/js/queries/portfolios.ts b/server/sonar-web/src/main/js/queries/portfolios.ts index c8e4182011b..553f805df8f 100644 --- a/server/sonar-web/src/main/js/queries/portfolios.ts +++ b/server/sonar-web/src/main/js/queries/portfolios.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useMutation, useQueryClient } from '@tanstack/react-query'; import { deletePortfolio } from '../api/project-management'; import { invalidateMeasuresByComponentKey } from './measures'; diff --git a/server/sonar-web/src/main/js/queries/project-dump.ts b/server/sonar-web/src/main/js/queries/project-dump.ts index 5f5d7ff00f0..c9a17ef0cbc 100644 --- a/server/sonar-web/src/main/js/queries/project-dump.ts +++ b/server/sonar-web/src/main/js/queries/project-dump.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions, useMutation } from '@tanstack/react-query'; import { doExport, doImport, getStatus } from '../api/project-dump'; import { createQueryHook } from './common'; diff --git a/server/sonar-web/src/main/js/queries/projects.ts b/server/sonar-web/src/main/js/queries/projects.ts index 38921f593ea..136bacb48f2 100644 --- a/server/sonar-web/src/main/js/queries/projects.ts +++ b/server/sonar-web/src/main/js/queries/projects.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions, useMutation, useQueryClient } from '@tanstack/react-query'; import { searchProjects } from '../api/components'; import { deleteProject } from '../api/project-management'; diff --git a/server/sonar-web/src/main/js/queries/quality-gates.ts b/server/sonar-web/src/main/js/queries/quality-gates.ts index 0bb25cda19a..5b2524e4be2 100644 --- a/server/sonar-web/src/main/js/queries/quality-gates.ts +++ b/server/sonar-web/src/main/js/queries/quality-gates.ts @@ -19,7 +19,7 @@ */ import { queryOptions, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; -import { addGlobalSuccessMessage } from 'design-system'; +import { addGlobalSuccessMessage } from '~design-system'; import { BranchParameters } from '~sonar-aligned/types/branch-like'; import { copyQualityGate, diff --git a/server/sonar-web/src/main/js/queries/quality-profiles.ts b/server/sonar-web/src/main/js/queries/quality-profiles.ts index 246b1137894..a50032a8af7 100644 --- a/server/sonar-web/src/main/js/queries/quality-profiles.ts +++ b/server/sonar-web/src/main/js/queries/quality-profiles.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { infiniteQueryOptions, queryOptions, diff --git a/server/sonar-web/src/main/js/queries/rules.ts b/server/sonar-web/src/main/js/queries/rules.ts index 2525d85133a..8a3bd00a07a 100644 --- a/server/sonar-web/src/main/js/queries/rules.ts +++ b/server/sonar-web/src/main/js/queries/rules.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions, useMutation, useQueryClient } from '@tanstack/react-query'; import { createRule, deleteRule, getRuleDetails, searchRules, updateRule } from '../api/rules'; import { mapRestRuleToRule } from '../apps/coding-rules/utils'; diff --git a/server/sonar-web/src/main/js/queries/settings.ts b/server/sonar-web/src/main/js/queries/settings.ts index bcb04f12948..872d41bfe9e 100644 --- a/server/sonar-web/src/main/js/queries/settings.ts +++ b/server/sonar-web/src/main/js/queries/settings.ts @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; -import { addGlobalSuccessMessage } from 'design-system'; +import { addGlobalSuccessMessage } from '~design-system'; import { getValue, getValues, diff --git a/server/sonar-web/src/main/js/queries/sonarlint.ts b/server/sonar-web/src/main/js/queries/sonarlint.ts index 2512bea0ff1..defd65f3fdf 100644 --- a/server/sonar-web/src/main/js/queries/sonarlint.ts +++ b/server/sonar-web/src/main/js/queries/sonarlint.ts @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useMutation } from '@tanstack/react-query'; -import { addGlobalErrorMessage, addGlobalSuccessMessage } from 'design-system/lib'; +import { addGlobalErrorMessage, addGlobalSuccessMessage } from '~design-system'; import { useCurrentUser } from '../app/components/current-user/CurrentUserContext'; import { translate } from '../helpers/l10n'; import { generateSonarLintUserToken, openFixOrIssueInSonarLint } from '../helpers/sonarlint'; diff --git a/server/sonar-web/src/main/js/queries/sources.ts b/server/sonar-web/src/main/js/queries/sources.ts index aacb3a79f53..813b9500332 100644 --- a/server/sonar-web/src/main/js/queries/sources.ts +++ b/server/sonar-web/src/main/js/queries/sources.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions } from '@tanstack/react-query'; import { getRawSource } from '../api/sources'; import { BranchParameters } from '../sonar-aligned/types/branch-like'; diff --git a/server/sonar-web/src/main/js/queries/system.ts b/server/sonar-web/src/main/js/queries/system.ts index 797d4e5c39d..9e0a84983e4 100644 --- a/server/sonar-web/src/main/js/queries/system.ts +++ b/server/sonar-web/src/main/js/queries/system.ts @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { queryOptions, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; -import { addGlobalSuccessMessage } from 'design-system/lib'; +import { addGlobalSuccessMessage } from '~design-system'; import { getEmailConfigurations, getSystemUpgrades, diff --git a/server/sonar-web/src/main/js/queries/users.ts b/server/sonar-web/src/main/js/queries/users.ts index 9d7749d013e..bc62ee5ea22 100644 --- a/server/sonar-web/src/main/js/queries/users.ts +++ b/server/sonar-web/src/main/js/queries/users.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { generateToken, getTokens, revokeToken } from '../api/user-tokens'; import { deleteUser, dismissNotice, getUsers, postUser, updateUser } from '../api/users'; diff --git a/server/sonar-web/src/main/js/queries/web-api.ts b/server/sonar-web/src/main/js/queries/web-api.ts index bbb1ff20863..a3e0e66ced8 100644 --- a/server/sonar-web/src/main/js/queries/web-api.ts +++ b/server/sonar-web/src/main/js/queries/web-api.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { useQuery } from '@tanstack/react-query'; import { fetchOpenAPI, fetchWebApi } from '../api/web-api'; diff --git a/server/sonar-web/src/main/js/queries/withQueryClientHoc.tsx b/server/sonar-web/src/main/js/queries/withQueryClientHoc.tsx index 2bc04314c84..26880b0a382 100644 --- a/server/sonar-web/src/main/js/queries/withQueryClientHoc.tsx +++ b/server/sonar-web/src/main/js/queries/withQueryClientHoc.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { QueryClient, useQueryClient } from '@tanstack/react-query'; -import * as React from 'react'; import { ComponentClass, VFC } from 'react'; export function withQueryClient<P>( diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/SourceViewer/JupyterNotebookViewer.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/SourceViewer/JupyterNotebookViewer.tsx index 1d5dc53e614..580338be33b 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/SourceViewer/JupyterNotebookViewer.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/SourceViewer/JupyterNotebookViewer.tsx @@ -26,10 +26,9 @@ import { isStream, } from '@jupyterlab/nbformat'; import classNames from 'classnames'; -import { CodeSnippet } from 'design-system'; import { isArray } from 'lodash'; -import React from 'react'; import Markdown from 'react-markdown'; +import { CodeSnippet } from '~design-system'; import { translate } from '../../../helpers/l10n'; import { Image } from '../common/Image'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yContext.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yContext.tsx index 74a82833b54..1b9ecdb249c 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yContext.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yContext.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { createContext } from 'react'; import { A11ySkipLink } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yProvider.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yProvider.tsx index 45ae19d0fdf..3a33cd76e3b 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yProvider.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yProvider.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { sortBy } from 'lodash'; import * as React from 'react'; import { A11ySkipLink } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11ySkipLinks.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11ySkipLinks.tsx index c9fd17c3390..1e89bf1392b 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11ySkipLinks.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11ySkipLinks.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; + import { A11yContext } from './A11yContext'; import './A11ySkipLinks.css'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11ySkipTarget.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11ySkipTarget.tsx index 09539828fbb..f36236b0c19 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11ySkipTarget.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11ySkipTarget.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { translate } from '../../../helpers/l10n'; import { A11ySkipLink } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/__tests__/A11yLinks-test.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/__tests__/A11yLinks-test.tsx index 569fe611e64..e9bd38b0693 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/__tests__/A11yLinks-test.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/__tests__/A11yLinks-test.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import userEvent from '@testing-library/user-event'; import * as React from 'react'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/common/Image.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/common/Image.tsx index 83607a1caa2..c30655c5343 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/common/Image.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/common/Image.tsx @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as React from 'react'; import { getBaseUrl } from '../../../helpers/system'; export function Image(props: Readonly<JSX.IntrinsicElements['img']>) { diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/common/__tests__/Image-test.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/common/__tests__/Image-test.tsx index 2b26293a738..1860446ea31 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/common/__tests__/Image-test.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/common/__tests__/Image-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { screen } from '@testing-library/react'; -import React from 'react'; import { renderComponent } from '../../../../helpers/testReactTestingUtils'; import { Image } from '../Image'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/controls/DocHelpTooltip.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/controls/DocHelpTooltip.tsx index 1729843f78f..48735048533 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/controls/DocHelpTooltip.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/controls/DocHelpTooltip.tsx @@ -19,9 +19,9 @@ */ import classNames from 'classnames'; -import { HelperHintIcon } from 'design-system'; import { first, last } from 'lodash'; import * as React from 'react'; +import { HelperHintIcon } from '~design-system'; import DocumentationLink from '../../../components/common/DocumentationLink'; import Link from '../../../components/common/Link'; import Tooltip, { Placement } from '../../../components/controls/Tooltip'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/controls/HelpTooltip.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/controls/HelpTooltip.tsx index 41ad7f597a7..74be6c84567 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/controls/HelpTooltip.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/controls/HelpTooltip.tsx @@ -17,9 +17,10 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import classNames from 'classnames'; -import { HelperHintIcon } from 'design-system'; import * as React from 'react'; +import { HelperHintIcon } from '~design-system'; import Tooltip, { Placement } from '../../../components/controls/Tooltip'; import { translate } from '../../../helpers/l10n'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/controls/__tests__/DocHelpTooltip-test.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/controls/__tests__/DocHelpTooltip-test.tsx index e9cc67e6798..31186bca1b1 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/controls/__tests__/DocHelpTooltip-test.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/controls/__tests__/DocHelpTooltip-test.tsx @@ -19,7 +19,6 @@ */ import userEvent from '@testing-library/user-event'; -import * as React from 'react'; import { byRole, byTestId } from '../../../helpers/testSelector'; import Link from '../../../../components/common/Link'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/hoc/__tests__/utils-test.ts b/server/sonar-web/src/main/js/sonar-aligned/components/hoc/__tests__/utils-test.ts index 4e5fb007613..970797bdd34 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/hoc/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/components/hoc/__tests__/utils-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { getWrappedDisplayName } from '../utils'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/hoc/utils.ts b/server/sonar-web/src/main/js/sonar-aligned/components/hoc/utils.ts index 48fa468256a..7a4980f84eb 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/hoc/utils.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/components/hoc/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import React from 'react'; export function getWrappedDisplayName<P>( diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/hoc/withRouter.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/hoc/withRouter.tsx index 75296fa6d41..2923d44ae60 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/hoc/withRouter.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/hoc/withRouter.tsx @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import * as React from 'react'; import { useMemo } from 'react'; import { diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/measure/Measure.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/measure/Measure.tsx index b195fe6c0ab..ea096ab16b6 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/measure/Measure.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/measure/Measure.tsx @@ -19,9 +19,9 @@ */ import classNames from 'classnames'; -import { QualityGateIndicator, RatingEnum } from 'design-system'; -import React, { useCallback } from 'react'; +import { useCallback } from 'react'; import { useIntl } from 'react-intl'; +import { QualityGateIndicator, RatingEnum } from '~design-system'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { Status } from '~sonar-aligned/types/common'; import { MetricKey, MetricType } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/component-test.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/component-test.ts index e47c73eb8be..ed85b0526b6 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/component-test.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/component-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier } from '~sonar-aligned/types/component'; import { isJupyterNotebookFile, isPortfolioLike } from '../component'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/json-issue-mapper-test.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/json-issue-mapper-test.ts index 1566fb5ad76..472ab8f5177 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/json-issue-mapper-test.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/json-issue-mapper-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import fs from 'fs'; import path from 'path'; import { JsonIssueMapper } from '../json-issue-mapper'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/measures-test.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/measures-test.ts index 5e6273f5f71..223898cb1d1 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/measures-test.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/measures-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { MetricType } from '~sonar-aligned/types/metrics'; import { getMessages } from '../../../helpers/l10nBundle'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/request-test.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/request-test.ts index f065fcb0c24..ef91d50fd21 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/request-test.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/request-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { setImmediate } from 'timers'; import { HttpStatus } from '../../../helpers/request'; import { Dict } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/testSelector-test.tsx b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/testSelector-test.tsx index b0d1006b3f9..28d3c34b96e 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/testSelector-test.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/testSelector-test.tsx @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { render } from '@testing-library/react'; -import React from 'react'; import { byDisplayValue, byLabelText, diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/urls-test.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/urls-test.ts index cffd7e74f77..29e033bc98a 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/urls-test.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/__tests__/urls-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { DEFAULT_ISSUES_QUERY } from '../../../components/shared/utils'; import { SecurityStandard } from '../../../types/security'; import { diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/branch-like.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/branch-like.ts index 71a8a535321..b114a1805ed 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/branch-like.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/branch-like.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { BranchBase, BranchLikeBase, diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/error.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/error.ts index 5dd04ec62b1..875028a0b7b 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/error.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/error.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { addGlobalErrorMessage } from 'design-system'; +import { addGlobalErrorMessage } from '~design-system'; import handleRequiredAuthentication from '../../helpers/handleRequiredAuthentication'; import { HttpStatus, parseError } from '../../helpers/request'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/json-issue-mapper.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/json-issue-mapper.ts index 0dc685684a3..3292e20c6b8 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/json-issue-mapper.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/json-issue-mapper.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Issue } from '../../types/types'; export type PathEntry = diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/lazyLoadComponent.tsx b/server/sonar-web/src/main/js/sonar-aligned/helpers/lazyLoadComponent.tsx index 0d47d9a8b89..9553d038960 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/lazyLoadComponent.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/lazyLoadComponent.tsx @@ -17,8 +17,9 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage } from 'design-system'; + import React, { Component, lazy, Suspense } from 'react'; +import { FlagMessage } from '~design-system'; import { translate } from '../../helpers/l10n'; import { requestTryAndRepeatUntil } from '../../helpers/request'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/mocks/component.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/mocks/component.ts index 85d3136137e..8a073fcf438 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/mocks/component.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/mocks/component.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentBase, ComponentQualifier } from '../../types/component'; export function mockComponentBase(overrides: Partial<ComponentBase> = {}): ComponentBase { diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/request.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/request.ts index efbef3dac20..c6c195f1ad9 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/request.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/request.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { RequestData, get, parseJSON } from '../../helpers/request'; interface CustomHeader { diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/router.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/router.ts index 9ac3547627b..4c90c0b46d5 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/router.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/router.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { RawQuery } from '../types/router'; export function searchParamsToQuery(searchParams: URLSearchParams, omitKey: string[] = []) { diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/testSelector.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/testSelector.ts index b3ceca3e274..73ebc770f00 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/testSelector.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/testSelector.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { BoundFunction, GetByBoundAttribute, diff --git a/server/sonar-web/src/main/js/sonar-aligned/helpers/urls.ts b/server/sonar-web/src/main/js/sonar-aligned/helpers/urls.ts index deddc67a9be..4b93d74362f 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/helpers/urls.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/helpers/urls.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mapValues, omitBy, pick } from 'lodash'; import { Path, URLSearchParamsInit, createSearchParams } from 'react-router-dom'; import { cleanQuery } from '../../helpers/query'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/types/branch-like.ts b/server/sonar-web/src/main/js/sonar-aligned/types/branch-like.ts index f71497a9992..40cc6bd8813 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/types/branch-like.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/types/branch-like.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Status } from './common'; /** diff --git a/server/sonar-web/src/main/js/sonar-aligned/types/common.ts b/server/sonar-web/src/main/js/sonar-aligned/types/common.ts index 24d21cd8e79..4eba6477db0 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/types/common.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/types/common.ts @@ -17,4 +17,5 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export type Status = 'ERROR' | 'OK' | 'NONE'; diff --git a/server/sonar-web/src/main/js/sonar-aligned/types/metrics.ts b/server/sonar-web/src/main/js/sonar-aligned/types/metrics.ts index 7ce4c1604ed..d711330cfa7 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/types/metrics.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/types/metrics.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum MetricKey { accepted_issues = 'accepted_issues', alert_status = 'alert_status', diff --git a/server/sonar-web/src/main/js/sonar-aligned/types/router.ts b/server/sonar-web/src/main/js/sonar-aligned/types/router.ts index c31351b6578..0e010dcce7c 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/types/router.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/types/router.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Location as LocationRouter, NavigateFunction, diff --git a/server/sonar-web/src/main/js/types/__tests__/alm-settings-test.ts b/server/sonar-web/src/main/js/types/__tests__/alm-settings-test.ts index 5af2cd415af..ac74c89ba64 100644 --- a/server/sonar-web/src/main/js/types/__tests__/alm-settings-test.ts +++ b/server/sonar-web/src/main/js/types/__tests__/alm-settings-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { mockBitbucketCloudBindingDefinition, mockGithubBindingDefinition, diff --git a/server/sonar-web/src/main/js/types/__tests__/component-test.ts b/server/sonar-web/src/main/js/types/__tests__/component-test.ts index 1a2d237f6de..3ef86d4c45b 100644 --- a/server/sonar-web/src/main/js/types/__tests__/component-test.ts +++ b/server/sonar-web/src/main/js/types/__tests__/component-test.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentQualifier } from '~sonar-aligned/types/component'; import { isApplication, isFile, isProject, isView } from '../component'; diff --git a/server/sonar-web/src/main/js/types/admin.ts b/server/sonar-web/src/main/js/types/admin.ts index 53c6ff67a6f..c6014a166e9 100644 --- a/server/sonar-web/src/main/js/types/admin.ts +++ b/server/sonar-web/src/main/js/types/admin.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Extension } from './types'; export interface AdminPagesContext { diff --git a/server/sonar-web/src/main/js/types/alm-integration.ts b/server/sonar-web/src/main/js/types/alm-integration.ts index 1932b08ffd6..78ef3a7fa27 100644 --- a/server/sonar-web/src/main/js/types/alm-integration.ts +++ b/server/sonar-web/src/main/js/types/alm-integration.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Dict } from './types'; export interface AzureProject { diff --git a/server/sonar-web/src/main/js/types/alm-settings.ts b/server/sonar-web/src/main/js/types/alm-settings.ts index 845ba04b188..d28cc45271f 100644 --- a/server/sonar-web/src/main/js/types/alm-settings.ts +++ b/server/sonar-web/src/main/js/types/alm-settings.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export const enum AlmKeys { Azure = 'azure', BitbucketServer = 'bitbucket', diff --git a/server/sonar-web/src/main/js/types/application.ts b/server/sonar-web/src/main/js/types/application.ts index 73400e894d4..93b4a2a786f 100644 --- a/server/sonar-web/src/main/js/types/application.ts +++ b/server/sonar-web/src/main/js/types/application.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Visibility } from '~sonar-aligned/types/component'; import { Branch } from './branch-like'; diff --git a/server/sonar-web/src/main/js/types/appstate.ts b/server/sonar-web/src/main/js/types/appstate.ts index 7f284ac3628..d1244fb8882 100644 --- a/server/sonar-web/src/main/js/types/appstate.ts +++ b/server/sonar-web/src/main/js/types/appstate.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { EditionKey } from './editions'; import { GlobalSettingKeys } from './settings'; import { Extension } from './types'; diff --git a/server/sonar-web/src/main/js/types/axios.d.ts b/server/sonar-web/src/main/js/types/axios.d.ts index 340dc60e67e..2984aee51b8 100644 --- a/server/sonar-web/src/main/js/types/axios.d.ts +++ b/server/sonar-web/src/main/js/types/axios.d.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import 'axios'; type IfEquals<X, Y, A = X, B = never> = diff --git a/server/sonar-web/src/main/js/types/branch-like.ts b/server/sonar-web/src/main/js/types/branch-like.ts index ee9b112f073..10fc2e7f470 100644 --- a/server/sonar-web/src/main/js/types/branch-like.ts +++ b/server/sonar-web/src/main/js/types/branch-like.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { BranchBase, PullRequestBase } from '~sonar-aligned/types/branch-like'; import { Status } from '~sonar-aligned/types/common'; import { NewCodeDefinition } from './new-code-definition'; diff --git a/server/sonar-web/src/main/js/types/browser.ts b/server/sonar-web/src/main/js/types/browser.ts index dbcbb4543ba..f9341085013 100644 --- a/server/sonar-web/src/main/js/types/browser.ts +++ b/server/sonar-web/src/main/js/types/browser.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ExtensionStartMethod } from './extension'; import { InstanceType } from './system'; import { SysStatus } from './types'; diff --git a/server/sonar-web/src/main/js/types/clean-code-taxonomy.ts b/server/sonar-web/src/main/js/types/clean-code-taxonomy.ts index d2c2415ded6..6d14b6d1425 100644 --- a/server/sonar-web/src/main/js/types/clean-code-taxonomy.ts +++ b/server/sonar-web/src/main/js/types/clean-code-taxonomy.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum SoftwareImpactSeverity { Blocker = 'BLOCKER', High = 'HIGH', diff --git a/server/sonar-web/src/main/js/types/coding-rules.ts b/server/sonar-web/src/main/js/types/coding-rules.ts index 40e31dd5d8c..a2b7797062d 100644 --- a/server/sonar-web/src/main/js/types/coding-rules.ts +++ b/server/sonar-web/src/main/js/types/coding-rules.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Dict, Paging, Rule, RuleActivation } from './types'; export interface RuleRepository { diff --git a/server/sonar-web/src/main/js/types/component-report.ts b/server/sonar-web/src/main/js/types/component-report.ts index dc738e087e9..588d33d6246 100644 --- a/server/sonar-web/src/main/js/types/component-report.ts +++ b/server/sonar-web/src/main/js/types/component-report.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export interface ComponentReportStatus { canAdmin: boolean; canDownload: boolean; diff --git a/server/sonar-web/src/main/js/types/component.ts b/server/sonar-web/src/main/js/types/component.ts index 5553887957a..f23341ba933 100644 --- a/server/sonar-web/src/main/js/types/component.ts +++ b/server/sonar-web/src/main/js/types/component.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { isPortfolioLike } from '~sonar-aligned/helpers/component'; import { ComponentQualifier, LightComponent, Visibility } from '~sonar-aligned/types/component'; import { Task } from './tasks'; diff --git a/server/sonar-web/src/main/js/types/cves.ts b/server/sonar-web/src/main/js/types/cves.ts index 560eea86354..bfc8442801a 100644 --- a/server/sonar-web/src/main/js/types/cves.ts +++ b/server/sonar-web/src/main/js/types/cves.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export type Cve = { cvssScore?: number; cwes: string[]; diff --git a/server/sonar-web/src/main/js/types/dates.ts b/server/sonar-web/src/main/js/types/dates.ts index 5d9cb86b4d8..a34bc4e35b2 100644 --- a/server/sonar-web/src/main/js/types/dates.ts +++ b/server/sonar-web/src/main/js/types/dates.ts @@ -17,4 +17,5 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export type ParsableDate = string | number | Date; diff --git a/server/sonar-web/src/main/js/types/dependencies.ts b/server/sonar-web/src/main/js/types/dependencies.ts index 0974ce79754..67a0515d228 100644 --- a/server/sonar-web/src/main/js/types/dependencies.ts +++ b/server/sonar-web/src/main/js/types/dependencies.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { SoftwareImpactSeverity } from './clean-code-taxonomy'; import { Paging } from './types'; diff --git a/server/sonar-web/src/main/js/types/editions.ts b/server/sonar-web/src/main/js/types/editions.ts index 0caa7eea7c0..042b8fe8adc 100644 --- a/server/sonar-web/src/main/js/types/editions.ts +++ b/server/sonar-web/src/main/js/types/editions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { SystemUpgradeDownloadUrls } from './system'; export enum EditionKey { diff --git a/server/sonar-web/src/main/js/types/features.ts b/server/sonar-web/src/main/js/types/features.ts index bb5ded65b35..e5451ab0dbb 100644 --- a/server/sonar-web/src/main/js/types/features.ts +++ b/server/sonar-web/src/main/js/types/features.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum Feature { Announcement = 'announcement', BranchSupport = 'branch-support', diff --git a/server/sonar-web/src/main/js/types/fix-suggestions.ts b/server/sonar-web/src/main/js/types/fix-suggestions.ts index 124684ff256..f88606353a1 100644 --- a/server/sonar-web/src/main/js/types/fix-suggestions.ts +++ b/server/sonar-web/src/main/js/types/fix-suggestions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + interface SuggestedChange { endLine: number; newCode: string; diff --git a/server/sonar-web/src/main/js/types/indexation.ts b/server/sonar-web/src/main/js/types/indexation.ts index dd43ce75120..c660181e21a 100644 --- a/server/sonar-web/src/main/js/types/indexation.ts +++ b/server/sonar-web/src/main/js/types/indexation.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + interface IndexationStatusInProgress { completedCount: number; isCompleted: false; diff --git a/server/sonar-web/src/main/js/types/issues.ts b/server/sonar-web/src/main/js/types/issues.ts index 0d91c16488b..4eaba8127e6 100644 --- a/server/sonar-web/src/main/js/types/issues.ts +++ b/server/sonar-web/src/main/js/types/issues.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { CleanCodeAttribute, CleanCodeAttributeCategory, diff --git a/server/sonar-web/src/main/js/types/jest.d.ts b/server/sonar-web/src/main/js/types/jest.d.ts index 8db287d8628..d3ffdb6a54a 100644 --- a/server/sonar-web/src/main/js/types/jest.d.ts +++ b/server/sonar-web/src/main/js/types/jest.d.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + declare namespace jest { interface Matchers<R> { toHaveAPopoverWithContent(content: string): Promise<CustomMatcherResult>; diff --git a/server/sonar-web/src/main/js/types/l10nBundle.ts b/server/sonar-web/src/main/js/types/l10nBundle.ts index 86d1c6c835d..b82c43bc5a0 100644 --- a/server/sonar-web/src/main/js/types/l10nBundle.ts +++ b/server/sonar-web/src/main/js/types/l10nBundle.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Dict } from './types'; export interface L10nBundleRequestParams { diff --git a/server/sonar-web/src/main/js/types/languages.ts b/server/sonar-web/src/main/js/types/languages.ts index dc6d2e9999f..1c19c643d43 100644 --- a/server/sonar-web/src/main/js/types/languages.ts +++ b/server/sonar-web/src/main/js/types/languages.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Dict } from './types'; export interface Language { diff --git a/server/sonar-web/src/main/js/types/measures.ts b/server/sonar-web/src/main/js/types/measures.ts index 57610cf7935..62a23289592 100644 --- a/server/sonar-web/src/main/js/types/measures.ts +++ b/server/sonar-web/src/main/js/types/measures.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { ComponentMeasure, MeasureEnhanced, Metric, Period, PeriodMeasure } from './types'; export interface MeasuresForProjects { diff --git a/server/sonar-web/src/main/js/types/misc.ts b/server/sonar-web/src/main/js/types/misc.ts index 10bfb3351d1..467399208ad 100644 --- a/server/sonar-web/src/main/js/types/misc.ts +++ b/server/sonar-web/src/main/js/types/misc.ts @@ -17,5 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export type FCProps<T extends React.FunctionComponent<React.PropsWithChildren<any>>> = Parameters<T>[0]; diff --git a/server/sonar-web/src/main/js/types/new-code-definition.ts b/server/sonar-web/src/main/js/types/new-code-definition.ts index 43508d55a78..c88ca14c62d 100644 --- a/server/sonar-web/src/main/js/types/new-code-definition.ts +++ b/server/sonar-web/src/main/js/types/new-code-definition.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum NewCodeDefinitionType { PreviousVersion = 'PREVIOUS_VERSION', NumberOfDays = 'NUMBER_OF_DAYS', diff --git a/server/sonar-web/src/main/js/types/notifications.ts b/server/sonar-web/src/main/js/types/notifications.ts index 5a8dc969a88..f2b4be006c1 100644 --- a/server/sonar-web/src/main/js/types/notifications.ts +++ b/server/sonar-web/src/main/js/types/notifications.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum NotificationGlobalType { CeReportTaskFailure = 'CeReportTaskFailure', ChangesOnMyIssue = 'ChangesOnMyIssue', diff --git a/server/sonar-web/src/main/js/types/permissions.ts b/server/sonar-web/src/main/js/types/permissions.ts index 145e38b1114..a5855c20800 100644 --- a/server/sonar-web/src/main/js/types/permissions.ts +++ b/server/sonar-web/src/main/js/types/permissions.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum Permissions { Admin = 'admin', Browse = 'user', diff --git a/server/sonar-web/src/main/js/types/plugins.ts b/server/sonar-web/src/main/js/types/plugins.ts index 4e0f98ee72f..9c98bd12d3b 100644 --- a/server/sonar-web/src/main/js/types/plugins.ts +++ b/server/sonar-web/src/main/js/types/plugins.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export interface Plugin { category?: string; description?: string; diff --git a/server/sonar-web/src/main/js/types/project-activity.ts b/server/sonar-web/src/main/js/types/project-activity.ts index cedb36929ea..2817b193525 100644 --- a/server/sonar-web/src/main/js/types/project-activity.ts +++ b/server/sonar-web/src/main/js/types/project-activity.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Status } from '~sonar-aligned/types/common'; import { MetricKey } from '~sonar-aligned/types/metrics'; diff --git a/server/sonar-web/src/main/js/types/project-dump.ts b/server/sonar-web/src/main/js/types/project-dump.ts index 484e39be0ae..d37f32eaa18 100644 --- a/server/sonar-web/src/main/js/types/project-dump.ts +++ b/server/sonar-web/src/main/js/types/project-dump.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { TaskStatuses } from './tasks'; export interface DumpStatus { diff --git a/server/sonar-web/src/main/js/types/provisioning.ts b/server/sonar-web/src/main/js/types/provisioning.ts index c15fcd5afa0..3c2a4bfefb7 100644 --- a/server/sonar-web/src/main/js/types/provisioning.ts +++ b/server/sonar-web/src/main/js/types/provisioning.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { TaskStatuses } from './tasks'; export type GithubStatusDisabled = { diff --git a/server/sonar-web/src/main/js/types/quality-gates.ts b/server/sonar-web/src/main/js/types/quality-gates.ts index a936351815d..dcd3a0b7d51 100644 --- a/server/sonar-web/src/main/js/types/quality-gates.ts +++ b/server/sonar-web/src/main/js/types/quality-gates.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Status } from '~sonar-aligned/types/common'; import { MetricKey } from '~sonar-aligned/types/metrics'; import { BranchLike } from './branch-like'; diff --git a/server/sonar-web/src/main/js/types/quality-profiles.ts b/server/sonar-web/src/main/js/types/quality-profiles.ts index ec740224d6d..4cda221a21e 100644 --- a/server/sonar-web/src/main/js/types/quality-profiles.ts +++ b/server/sonar-web/src/main/js/types/quality-profiles.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum QualityProfileChangelogFilterMode { MQR = 'MQR', STANDARD = 'STANDARD', diff --git a/server/sonar-web/src/main/js/types/rules.ts b/server/sonar-web/src/main/js/types/rules.ts index 65ee7a19b03..5aa70000b6a 100644 --- a/server/sonar-web/src/main/js/types/rules.ts +++ b/server/sonar-web/src/main/js/types/rules.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum RuleStatus { Ready = 'READY', Beta = 'BETA', diff --git a/server/sonar-web/src/main/js/types/security-hotspots.ts b/server/sonar-web/src/main/js/types/security-hotspots.ts index 249e73b9d2c..db653db0067 100644 --- a/server/sonar-web/src/main/js/types/security-hotspots.ts +++ b/server/sonar-web/src/main/js/types/security-hotspots.ts @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { HotspotRatingEnum } from 'design-system'; + +import { HotspotRatingEnum } from '~design-system'; import { ComponentQualifier } from '~sonar-aligned/types/component'; import { MessageFormatting } from './issues'; import { FlowLocation, IssueChangelog, IssueChangelogDiff, Paging, TextRange } from './types'; diff --git a/server/sonar-web/src/main/js/types/security.ts b/server/sonar-web/src/main/js/types/security.ts index 63ec41c3b42..60a0d1d8d89 100644 --- a/server/sonar-web/src/main/js/types/security.ts +++ b/server/sonar-web/src/main/js/types/security.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Dict } from './types'; export enum SecurityStandard { diff --git a/server/sonar-web/src/main/js/types/settings.ts b/server/sonar-web/src/main/js/types/settings.ts index 4276fda7d15..37d03047be2 100644 --- a/server/sonar-web/src/main/js/types/settings.ts +++ b/server/sonar-web/src/main/js/types/settings.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + import { Dict } from './types'; export const enum SettingsKey { diff --git a/server/sonar-web/src/main/js/types/sonarlint.ts b/server/sonar-web/src/main/js/types/sonarlint.ts index 37fcc43b7b4..6b573395c63 100644 --- a/server/sonar-web/src/main/js/types/sonarlint.ts +++ b/server/sonar-web/src/main/js/types/sonarlint.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export interface Ide { capabilities?: Capabilities; description: string; diff --git a/server/sonar-web/src/main/js/types/system.ts b/server/sonar-web/src/main/js/types/system.ts index 818297fbfaf..a91b1bfe4a6 100644 --- a/server/sonar-web/src/main/js/types/system.ts +++ b/server/sonar-web/src/main/js/types/system.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export interface SystemUpgradeDownloadUrls { downloadDatacenterUrl?: string; downloadDeveloperUrl?: string; diff --git a/server/sonar-web/src/main/js/types/tasks.ts b/server/sonar-web/src/main/js/types/tasks.ts index e1ce9b92992..a09545cdc2f 100644 --- a/server/sonar-web/src/main/js/types/tasks.ts +++ b/server/sonar-web/src/main/js/types/tasks.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum TaskTypes { Report = 'REPORT', IssueSync = 'ISSUE_SYNC', diff --git a/server/sonar-web/src/main/js/types/token.ts b/server/sonar-web/src/main/js/types/token.ts index 7f6beac4171..29ff072b21a 100644 --- a/server/sonar-web/src/main/js/types/token.ts +++ b/server/sonar-web/src/main/js/types/token.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export enum TokenType { Project = 'PROJECT_ANALYSIS_TOKEN', Global = 'GLOBAL_ANALYSIS_TOKEN', diff --git a/server/sonar-web/src/main/js/types/users.ts b/server/sonar-web/src/main/js/types/users.ts index b7090267fdf..e5f889627a7 100644 --- a/server/sonar-web/src/main/js/types/users.ts +++ b/server/sonar-web/src/main/js/types/users.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export interface CurrentUser { dismissedNotices: { [key: string]: boolean }; isLoggedIn: boolean; diff --git a/server/sonar-web/src/main/js/types/webhook.ts b/server/sonar-web/src/main/js/types/webhook.ts index 06d52535e28..10fa08903cf 100644 --- a/server/sonar-web/src/main/js/types/webhook.ts +++ b/server/sonar-web/src/main/js/types/webhook.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export interface WebhookResponse { hasSecret: boolean; key: string; diff --git a/server/sonar-web/tailwind.base.config.js b/server/sonar-web/tailwind.base.config.js index 2a05793daf6..fcbe1e7115d 100644 --- a/server/sonar-web/tailwind.base.config.js +++ b/server/sonar-web/tailwind.base.config.js @@ -150,8 +150,5 @@ module.exports = { preflight: false, // disable preflight }, plugins: [echoesUtilities], - content: [ - path.resolve(__dirname, './src/**/!(__tests__|@types|api)/*.{ts,tsx}'), - path.resolve(__dirname, './design-system/src/**/!(__tests__|@types|theme|helpers)/*.{ts,tsx}'), - ], + content: [path.resolve(__dirname, './src/**/!(__tests__|@types|api)/*.{ts,tsx}')], }; diff --git a/server/sonar-web/tsconfig.base.json b/server/sonar-web/tsconfig.base.json deleted file mode 100644 index b5bcc826844..00000000000 --- a/server/sonar-web/tsconfig.base.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Projects */ - // "incremental": true, /* Enable incremental compilation */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - - - /* ** CAUTION: if the "target" below is changed, */ - /* we must ensure that the version of core-js */ - /* we import polyfills all its features */ - "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - /* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/ - - - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - "jsx": "react", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ - // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - - /* Modules */ - "module": "ESNext", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ - "types": [ /* Specify type package names to be included without being referenced in a source file. */ - "node", - "jest", - "@testing-library/jest-dom" - ], - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "resolveJsonModule": true, /* Enable importing .json files */ - // "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ - "checkJs": false, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ - - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ - // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ - "strictFunctionTypes": false, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ - // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ - "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - // "skipLibCheck": false /* Skip type checking all .d.ts files. */ - } -} diff --git a/server/sonar-web/tsconfig.json b/server/sonar-web/tsconfig.json index feec8dcc0e3..e381aa38736 100644 --- a/server/sonar-web/tsconfig.json +++ b/server/sonar-web/tsconfig.json @@ -1,11 +1,118 @@ { - "extends": "./tsconfig.base", "compilerOptions": { - "baseUrl": ".", - "paths": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Projects */ + // "incremental": true, /* Enable incremental compilation */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + + + /* ** CAUTION: if the "target" below is changed, */ + /* we must ensure that the version of core-js */ + /* we import polyfills all its features */ + "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + /* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/ + + + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + "jsx": "react-jsx", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ + // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + + /* Modules */ + "module": "ESNext", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + "baseUrl": ".", /* Specify the base directory to resolve non-relative module names. */ + "paths": { /* Specify a set of entries that re-map imports to additional lookup locations. */ "~sonar-aligned/*": ["src/main/js/sonar-aligned/*"], + "~design-system": ["src/main/js/design-system/index.ts"], "*": ["./src/main/js/@types/*"] - } + }, + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ + "types": [ /* Specify type package names to be included without being referenced in a source file. */ + "node", + "jest", + "@testing-library/jest-dom" + ], + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "resolveJsonModule": true, /* Enable importing .json files */ + // "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + "checkJs": false, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ + // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ + "strictFunctionTypes": false, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ + // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ + "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + // "skipLibCheck": false /* Skip type checking all .d.ts files. */ }, "parserOptions": { "project": true diff --git a/server/sonar-web/turbo.json b/server/sonar-web/turbo.json deleted file mode 100644 index e137c21ea5c..00000000000 --- a/server/sonar-web/turbo.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://turbo.build/schema.json", - "tasks": { - "design-system#build": { - "outputs": ["lib/**"] - }, - "design-system#build:no-checks": { - "outputs": ["lib/**"] - } - } -} diff --git a/server/sonar-web/vite.config.mjs b/server/sonar-web/vite.config.mjs index f5c3d1fcb2c..715553c3ace 100644 --- a/server/sonar-web/vite.config.mjs +++ b/server/sonar-web/vite.config.mjs @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import legacy from '@vitejs/plugin-legacy'; import react from '@vitejs/plugin-react'; import autoprefixer from 'autoprefixer'; -import browserslistToEsbuild from 'browserslist-to-esbuild'; import path, { resolve } from 'path'; import postCssCalc from 'postcss-calc'; import license from 'rollup-plugin-license'; @@ -32,6 +32,7 @@ import requireTransform from 'vite-plugin-require-transform'; import babelConfig from './babel.config'; import { ALLOWED_LICENSES, ALLOWED_LICENSE_TEXT, generateLicenseText } from './config/license'; import { viteDevServerHtmlPlugin } from './config/vite-dev-server-html-plugin.mjs'; +import packageJson from './package.json'; const DEFAULT_DEV_SERVER_PORT = 3000; const DEFAULT_WS_PROXY_PORT = 3010; @@ -66,8 +67,6 @@ export default ({ mode }) => { }, }, build: { - // reads from the package.json's browserslist to determine transforms required to support those browsers - target: browserslistToEsbuild(), outDir: 'build/webapp', rollupOptions: { // we define all the places where a user can land that requires its own bundle entry point. @@ -90,6 +89,12 @@ export default ({ mode }) => { echoes: ['@sonarsource/echoes-react'], datefns: ['date-fns'], lodash: ['lodash/lodash.js'], + highlightjs: [ + 'highlight.js', + 'highlightjs-apex', + 'highlightjs-cobol', + 'highlightjs-sap-abap', + ], }, }, plugins: [ @@ -147,6 +152,12 @@ export default ({ mode }) => { plugins: [ // additional plugins to allow for the transformation of our existing code to what vite is expecting. requireTransform({}), + legacy({ + modernTargets: packageJson.browserslist, + polyfills: false, + modernPolyfills: true, + renderLegacyChunks: false, + }), react({ babel: babelConfig, }), @@ -169,6 +180,7 @@ export default ({ mode }) => { // in other configs - tsconfig and storybook src: path.resolve(__dirname, 'src'), '~sonar-aligned': path.resolve(__dirname, 'src/main/js/sonar-aligned'), + '~design-system': path.resolve(__dirname, 'src/main/js/design-system/index.ts'), }, }, server: { diff --git a/server/sonar-web/yarn.lock b/server/sonar-web/yarn.lock index f1fe0bcdf7d..789ea5ad6ee 100644 --- a/server/sonar-web/yarn.lock +++ b/server/sonar-web/yarn.lock @@ -133,14 +133,7 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/compat-data@npm:7.24.7" - checksum: 10/6edc09152ca51a22c33741c441f33f9475598fa59edc53369edb74b49f4ea4bef1281f5b0ed2b9b67fb66faef2da2069e21c4eef83405d8326e524b301f4e7e2 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.25.2, @babel/compat-data@npm:^7.25.4": +"@babel/compat-data@npm:^7.25.2": version: 7.25.4 resolution: "@babel/compat-data@npm:7.25.4" checksum: 10/d37a8936cc355a9ca3050102e03d179bdae26bd2e5c99a977637376c192b23637a039795f153c849437a086727628c9860e2c6af92d7151396e2362c09176337 @@ -154,29 +147,6 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:7.25.2, @babel/core@npm:^7.25.2": - version: 7.25.2 - resolution: "@babel/core@npm:7.25.2" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.24.7" - "@babel/generator": "npm:^7.25.0" - "@babel/helper-compilation-targets": "npm:^7.25.2" - "@babel/helper-module-transforms": "npm:^7.25.2" - "@babel/helpers": "npm:^7.25.0" - "@babel/parser": "npm:^7.25.0" - "@babel/template": "npm:^7.25.0" - "@babel/traverse": "npm:^7.25.2" - "@babel/types": "npm:^7.25.2" - convert-source-map: "npm:^2.0.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10/0d6ec10ff430df66f654c089d6f7ef1d9bed0c318ac257ad5f0dfa0caa45666011828ae75f998bcdb279763e892b091b2925d0bc483299e61649d2c7a2245e33 - languageName: node - linkType: hard - "@babel/core@npm:7.25.8, @babel/core@npm:^7.17.7": version: 7.25.8 resolution: "@babel/core@npm:7.25.8" @@ -246,6 +216,29 @@ __metadata: languageName: node linkType: hard +"@babel/core@npm:^7.25.2": + version: 7.25.2 + resolution: "@babel/core@npm:7.25.2" + dependencies: + "@ampproject/remapping": "npm:^2.2.0" + "@babel/code-frame": "npm:^7.24.7" + "@babel/generator": "npm:^7.25.0" + "@babel/helper-compilation-targets": "npm:^7.25.2" + "@babel/helper-module-transforms": "npm:^7.25.2" + "@babel/helpers": "npm:^7.25.0" + "@babel/parser": "npm:^7.25.0" + "@babel/template": "npm:^7.25.0" + "@babel/traverse": "npm:^7.25.2" + "@babel/types": "npm:^7.25.2" + convert-source-map: "npm:^2.0.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.3" + semver: "npm:^6.3.1" + checksum: 10/0d6ec10ff430df66f654c089d6f7ef1d9bed0c318ac257ad5f0dfa0caa45666011828ae75f998bcdb279763e892b091b2925d0bc483299e61649d2c7a2245e33 + languageName: node + linkType: hard + "@babel/generator@npm:^7.16.8": version: 7.16.8 resolution: "@babel/generator@npm:7.16.8" @@ -324,15 +317,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-annotate-as-pure@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-annotate-as-pure@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10/a9017bfc1c4e9f2225b967fbf818004703de7cf29686468b54002ffe8d6b56e0808afa20d636819fcf3a34b89ba72f52c11bdf1d69f303928ee10d92752cad95 - languageName: node - linkType: hard - "@babel/helper-annotate-as-pure@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-annotate-as-pure@npm:7.25.7" @@ -342,16 +326,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/3ddff45d1e086c9c6dcef53ef46521a0c11ddb09fe3ab42dca5af6bb1b1703895a9f4f8056f49fdf53c2dbf6e5cf1ddb4baf17d7e3766c63f051ab8d60a919ee - languageName: node - linkType: hard - "@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.25.7" @@ -403,20 +377,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-compilation-targets@npm:7.24.7" - dependencies: - "@babel/compat-data": "npm:^7.24.7" - "@babel/helper-validator-option": "npm:^7.24.7" - browserslist: "npm:^4.22.2" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10/8f8bc89af70a606ccb208513aa25d83e19b88f91b64a33174f7701a9479e67ddbb0a9c89033265070375cd24e690b93380b3a3ea11e4b3a711d742f0f4699ee7 - languageName: node - linkType: hard - -"@babel/helper-compilation-targets@npm:^7.24.8, @babel/helper-compilation-targets@npm:^7.25.2": +"@babel/helper-compilation-targets@npm:^7.25.2": version: 7.25.2 resolution: "@babel/helper-compilation-targets@npm:7.25.2" dependencies: @@ -442,42 +403,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-create-class-features-plugin@npm:7.24.7" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/helper-member-expression-to-functions": "npm:^7.24.7" - "@babel/helper-optimise-call-expression": "npm:^7.24.7" - "@babel/helper-replace-supers": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/helper-split-export-declaration": "npm:^7.24.7" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/8ecb1c2acc808e1e0c21dccc7ea6899de9a140cb1856946800176b4784de6fccd575661fbff7744bb895d01aa6956ce963446b8577c4c2334293ba5579d5cdb9 - languageName: node - linkType: hard - -"@babel/helper-create-class-features-plugin@npm:^7.25.4": - version: 7.25.4 - resolution: "@babel/helper-create-class-features-plugin@npm:7.25.4" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-member-expression-to-functions": "npm:^7.24.8" - "@babel/helper-optimise-call-expression": "npm:^7.24.7" - "@babel/helper-replace-supers": "npm:^7.25.0" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/traverse": "npm:^7.25.4" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/47218da9fd964af30d41f0635d9e33eed7518e03aa8f10c3eb8a563bb2c14f52be3e3199db5912ae0e26058c23bb511c811e565c55ecec09427b04b867ed13c2 - languageName: node - linkType: hard - "@babel/helper-create-class-features-plugin@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-create-class-features-plugin@npm:7.25.7" @@ -507,32 +432,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-regexp-features-plugin@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.24.7" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - regexpu-core: "npm:^5.3.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/dd7238af30ea6b26a627192422822ae810873fd899150dd8d4348eb107045721a849abcfa2bd04f917493784a93724b8caf6994c31afd16f9347a8a9b9862425 - languageName: node - linkType: hard - -"@babel/helper-create-regexp-features-plugin@npm:^7.25.0, @babel/helper-create-regexp-features-plugin@npm:^7.25.2": - version: 7.25.2 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.25.2" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - regexpu-core: "npm:^5.3.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/33dd627eef9e4229aba66789efd8fb7342fc2667b821d4b7947c7294f6d472cf025ff2db9b358a1e03de98376de44e839f0611a456a57127fd6e4b4dbfc96c51 - languageName: node - linkType: hard - "@babel/helper-create-regexp-features-plugin@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.25.7" @@ -653,26 +552,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-member-expression-to-functions@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/d990752aaff311aba0ca61539e1776c5ba2818836403f9bafac849deb4cd24c082cbde5f23e490b7f3614c95ff67f8d75fa5e2f14cb00586a72c96c158e1127b - languageName: node - linkType: hard - -"@babel/helper-member-expression-to-functions@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-member-expression-to-functions@npm:7.24.8" - dependencies: - "@babel/traverse": "npm:^7.24.8" - "@babel/types": "npm:^7.24.8" - checksum: 10/ac878761cfd0a46c081cda0da75cc186f922cf16e8ecdd0c4fb6dca4330d9fe4871b41a9976224cf9669c9e7fe0421b5c27349f2e99c125fa0be871b327fa770 - languageName: node - linkType: hard - "@babel/helper-member-expression-to-functions@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-member-expression-to-functions@npm:7.25.7" @@ -753,22 +632,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-module-transforms@npm:7.24.7" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-module-imports": "npm:^7.24.7" - "@babel/helper-simple-access": "npm:^7.24.7" - "@babel/helper-split-export-declaration": "npm:^7.24.7" - "@babel/helper-validator-identifier": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/4f2b232bf6d1be8d3a72b084a2a7ac1b0b93ea85717411a11ae1fb6375d4392019e781d8cc155789e649a2caa7eec378dd1404210603d6d4230f042c5feacffb - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.24.8, @babel/helper-module-transforms@npm:^7.25.0, @babel/helper-module-transforms@npm:^7.25.2": +"@babel/helper-module-transforms@npm:^7.25.2": version: 7.25.2 resolution: "@babel/helper-module-transforms@npm:7.25.2" dependencies: @@ -796,15 +660,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-optimise-call-expression@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-optimise-call-expression@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10/da7a7f2d1bb1be4cffd5fa820bd605bc075c7dd014e0458f608bb6f34f450fe9412c8cea93e788227ab396e0e02c162d7b1db3fbcb755a6360e354c485d61df0 - languageName: node - linkType: hard - "@babel/helper-optimise-call-expression@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-optimise-call-expression@npm:7.25.7" @@ -856,13 +711,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/helper-plugin-utils@npm:7.24.8" - checksum: 10/adbc9fc1142800a35a5eb0793296924ee8057fe35c61657774208670468a9fbfbb216f2d0bc46c680c5fefa785e5ff917cc1674b10bd75cdf9a6aa3444780630 - languageName: node - linkType: hard - "@babel/helper-plugin-utils@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-plugin-utils@npm:7.25.7" @@ -877,39 +725,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.8.3": - version: 7.20.2 - resolution: "@babel/helper-plugin-utils@npm:7.20.2" - checksum: 10/7bd5be752998e8bfa616e6fbf1fd8f1a7664039a435d5da11cfd97a320b6eb58e28156f4789b2da242a53ed45994d04632b2e19684c1209e827522a07f0cd022 - languageName: node - linkType: hard - -"@babel/helper-remap-async-to-generator@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-remap-async-to-generator@npm:7.24.7" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-wrap-function": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/4b7c925e71811902c8aa57904044921027eae10ac9b5b029df491ed4abc1ea18b450a7923fd0feb1248ae37703889e72b6c27f2a0e2d5811103c7655c49ad355 - languageName: node - linkType: hard - -"@babel/helper-remap-async-to-generator@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/helper-remap-async-to-generator@npm:7.25.0" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-wrap-function": "npm:^7.25.0" - "@babel/traverse": "npm:^7.25.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/6b1ab73a067008c92e2fe5b7a9f39aab32e7f5a8c5eaf0a864436c21791f708ad8619d4a509febdfe934aeb373af4baa7c7d9f41181b385e09f39eaf11ca108e - languageName: node - linkType: hard - "@babel/helper-remap-async-to-generator@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-remap-async-to-generator@npm:7.25.7" @@ -923,32 +738,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-replace-supers@npm:7.24.7" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.24.7" - "@babel/helper-member-expression-to-functions": "npm:^7.24.7" - "@babel/helper-optimise-call-expression": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/18b7c3709819d008a14953e885748f3e197537f131d8f7ae095fec245506d854ff40b236edb1754afb6467f795aa90ae42a1d961a89557702249bacfc3fdad19 - languageName: node - linkType: hard - -"@babel/helper-replace-supers@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/helper-replace-supers@npm:7.25.0" - dependencies: - "@babel/helper-member-expression-to-functions": "npm:^7.24.8" - "@babel/helper-optimise-call-expression": "npm:^7.24.7" - "@babel/traverse": "npm:^7.25.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/97c6c17780cb9692132f7243f5a21fb6420104cb8ff8752dc03cfc9a1912a243994c0290c77ff096637ab6f2a7363b63811cfc68c2bad44e6b39460ac2f6a63f - languageName: node - linkType: hard - "@babel/helper-replace-supers@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-replace-supers@npm:7.25.7" @@ -1000,16 +789,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.24.7" - dependencies: - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/784a6fdd251a9a7e42ccd04aca087ecdab83eddc60fda76a2950e00eb239cc937d3c914266f0cc476298b52ac3f44ffd04c358e808bd17552a7e008d75494a77 - languageName: node - linkType: hard - "@babel/helper-skip-transparent-expression-wrappers@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.25.7" @@ -1159,13 +938,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-validator-option@npm:7.24.7" - checksum: 10/9689166bf3f777dd424c026841c8cd651e41b21242dbfd4569a53086179a3e744c8eddd56e9d10b54142270141c91581b53af0d7c00c82d552d2540e2a919f7e - languageName: node - linkType: hard - "@babel/helper-validator-option@npm:^7.24.8": version: 7.24.8 resolution: "@babel/helper-validator-option@npm:7.24.8" @@ -1180,29 +952,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-wrap-function@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-wrap-function@npm:7.24.7" - dependencies: - "@babel/helper-function-name": "npm:^7.24.7" - "@babel/template": "npm:^7.24.7" - "@babel/traverse": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10/1c248accfbb09a891293840506e3fbfc807b524abf16fc32115a6e73f760387d2dc7935282b48caa281c8033bf93dc80eca7649250524cfb95da8643771bca02 - languageName: node - linkType: hard - -"@babel/helper-wrap-function@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/helper-wrap-function@npm:7.25.0" - dependencies: - "@babel/template": "npm:^7.25.0" - "@babel/traverse": "npm:^7.25.0" - "@babel/types": "npm:^7.25.0" - checksum: 10/08724128b9c540c02a59f02f9c1c9940fe5363d85d0f30ec826a4f926afdb26fa4ec33ca2b88b4aa745fe3dbe1f44be2969b8a03af259af7945d8cd3262168d3 - languageName: node - linkType: hard - "@babel/helper-wrap-function@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-wrap-function@npm:7.25.7" @@ -1418,7 +1167,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3, @babel/parser@npm:^7.25.6": +"@babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.6": version: 7.25.6 resolution: "@babel/parser@npm:7.25.6" dependencies: @@ -1429,18 +1178,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.25.3": - version: 7.25.3 - resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.25.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/traverse": "npm:^7.25.3" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/9743feb0152f2ac686aaee6dfd41e8ea211989a459d4c2b10b531442f6865057cd1a502515634c25462b155bc58f0710267afed72396780e9b72be25370dd577 - languageName: node - linkType: hard - "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.25.7" @@ -1453,17 +1190,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:7.25.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/5e504bba884a4500e71224d344efb1e70ebbeabd621e07a58f2d3c0d14a71a49c97b4989259a288cdbbfacebfea224397acf1217d26c77aebf9aa35bdd988249 - languageName: node - linkType: hard - "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:7.25.7" @@ -1475,17 +1201,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.25.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/f574beb1d4f723bb9b913ce379259a55b50a308364585ccb83e00d933465c26c04cbbc85a06e6d4c829279eb1021b3236133d486b3ff11cfd90ad815c8b478d2 - languageName: node - linkType: hard - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.25.7" @@ -1497,19 +1212,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/plugin-transform-optional-chaining": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.13.0 - checksum: 10/887f1b8bd0ef61206ece47919fda78a32eef35da31c0d95ab8d7adc8b4722534dc5177c86c8d6d81bcf4343f3c08c6adab2b46cfd2bea8e33c6c04e51306f9cc - languageName: node - linkType: hard - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.25.7" @@ -1523,18 +1225,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.25.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/traverse": "npm:^7.25.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/de04a9342e9a0db1673683112c83cdc52173f489f45aeed864ceba72dfba8c8588e565171e64cb2a408a09269e5fb35c6ab4ef50e3e649c4f8c0c787feb5c048 - languageName: node - linkType: hard - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.25.7" @@ -1578,7 +1268,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-class-properties@npm:^7.12.13, @babel/plugin-syntax-class-properties@npm:^7.8.3": +"@babel/plugin-syntax-class-properties@npm:^7.8.3": version: 7.12.13 resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" dependencies: @@ -1589,50 +1279,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-class-static-block@npm:^7.14.5": - version: 7.14.5 - resolution: "@babel/plugin-syntax-class-static-block@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3e80814b5b6d4fe17826093918680a351c2d34398a914ce6e55d8083d72a9bdde4fbaf6a2dcea0e23a03de26dc2917ae3efd603d27099e2b98380345703bf948 - languageName: node - linkType: hard - -"@babel/plugin-syntax-dynamic-import@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-dynamic-import@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/ce307af83cf433d4ec42932329fad25fa73138ab39c7436882ea28742e1c0066626d224e0ad2988724c82644e41601cef607b36194f695cb78a1fcdc959637bd - languageName: node - linkType: hard - -"@babel/plugin-syntax-export-namespace-from@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-export-namespace-from@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/85740478be5b0de185228e7814451d74ab8ce0a26fcca7613955262a26e99e8e15e9da58f60c754b84515d4c679b590dbd3f2148f0f58025f4ae706f1c5a5d4a - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-assertions@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/bd065cd73ae3dbe69e6f9167aa605da3df77d69bbad2ede95e4aa9e7af7744d5bc1838b928c77338ca62df7691a7adf6e608279be50c18e4b3c70cf77e3013d7 - languageName: node - linkType: hard - "@babel/plugin-syntax-import-assertions@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-syntax-import-assertions@npm:7.25.7" @@ -1644,17 +1290,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-attributes@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/22fc50bd85a491bb8d22065f330a41f60d66f2f2d7a1deb73e80c8a4b5d7a42a092a03f8da18800650eca0fc14585167cc4e5c9fab351f0d390d1592347162ae - languageName: node - linkType: hard - "@babel/plugin-syntax-import-attributes@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-syntax-import-attributes@npm:7.25.7" @@ -1666,7 +1301,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-meta@npm:^7.10.4, @babel/plugin-syntax-import-meta@npm:^7.8.3": +"@babel/plugin-syntax-import-meta@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" dependencies: @@ -1710,18 +1345,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-jsx@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-syntax-jsx@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/a93516ae5b34868ab892a95315027d4e5e38e8bd1cfca6158f2974b0901cbb32bbe64ea10ad5b25f919ddc40c6d8113c4823372909c9c9922170c12b0b1acecb - languageName: node - linkType: hard - -"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4, @babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": +"@babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" dependencies: @@ -1743,7 +1367,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-numeric-separator@npm:^7.10.4, @babel/plugin-syntax-numeric-separator@npm:^7.8.3": +"@babel/plugin-syntax-numeric-separator@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" dependencies: @@ -1787,18 +1411,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-private-property-in-object@npm:^7.14.5": - version: 7.14.5 - resolution: "@babel/plugin-syntax-private-property-in-object@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b317174783e6e96029b743ccff2a67d63d38756876e7e5d0ba53a322e38d9ca452c13354a57de1ad476b4c066dbae699e0ca157441da611117a47af88985ecda - languageName: node - linkType: hard - -"@babel/plugin-syntax-top-level-await@npm:^7.14.5, @babel/plugin-syntax-top-level-await@npm:^7.8.3": +"@babel/plugin-syntax-top-level-await@npm:^7.8.3": version: 7.14.5 resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" dependencies: @@ -1820,17 +1433,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-typescript@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-syntax-typescript@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2518cc06323f5673c93142935879c112fea0ee836dfa9a9ec744fc972fdeaf22a06fe631c23817562aaaddadf64626a4fbba98c300b3e2c828f48f0f1cca0ce0 - languageName: node - linkType: hard - "@babel/plugin-syntax-typescript@npm:^7.7.2": version: 7.16.7 resolution: "@babel/plugin-syntax-typescript@npm:7.16.7" @@ -1854,17 +1456,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-arrow-functions@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6720173645826046878015c579c2ca9d93cdba79a2832f0180f5cf147d9817c85bf9c8338b16d6bdaa71f87809b7a194a6902e6c82ec00b6354aca6b40abe5e6 - languageName: node - linkType: hard - "@babel/plugin-transform-arrow-functions@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-arrow-functions@npm:7.25.7" @@ -1876,20 +1467,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-generator-functions@npm:^7.25.4": - version: 7.25.4 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.25.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-remap-async-to-generator": "npm:^7.25.0" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/traverse": "npm:^7.25.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/0004d910bbec3ef916acf5c7cf8b11671e65d2dd425a82f1101838b9b6243bfdf9578335584d9dedd20acc162796b687930e127c6042484e05b758af695e6cb8 - languageName: node - linkType: hard - "@babel/plugin-transform-async-generator-functions@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-async-generator-functions@npm:7.25.8" @@ -1903,19 +1480,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-to-generator@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.24.7" - dependencies: - "@babel/helper-module-imports": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-remap-async-to-generator": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b2041d9d50b09afef983c4f1dece63fdfc5a8e4646e42591db398bc4322958434d60b3cb0f5d0f9f9dbdad8577e8a1a33ba9859aacc3004bf6d25d094d20193f - languageName: node - linkType: hard - "@babel/plugin-transform-async-to-generator@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-async-to-generator@npm:7.25.7" @@ -1929,17 +1493,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoped-functions@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/33e2fb9f24c11889b2bacbe9c3625f738edafc2136c8206598e0422664267ec5ca9422cb4563cc42039ccfc333fb42ce5f8513382e56c5b02f934005d0d6e8ff - languageName: node - linkType: hard - "@babel/plugin-transform-block-scoped-functions@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.25.7" @@ -1951,17 +1504,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoping@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/plugin-transform-block-scoping@npm:7.25.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/981e565a8ff1e1f8d539b5ff067328517233142b131329d11e6c60405204e2a4a993828c367f7dc729a9608aabebdada869616563816e5f8f1385e91ac0fa4d6 - languageName: node - linkType: hard - "@babel/plugin-transform-block-scoping@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-block-scoping@npm:7.25.7" @@ -1973,18 +1515,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-properties@npm:^7.25.4": - version: 7.25.4 - resolution: "@babel/plugin-transform-class-properties@npm:7.25.4" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.25.4" - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/203a21384303d66fb5d841b77cba8b8994623ff4d26d208e3d05b36858c4919626a8d74871fa4b9195310c2e7883bf180359c4f5a76481ea55190c224d9746f4 - languageName: node - linkType: hard - "@babel/plugin-transform-class-properties@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-class-properties@npm:7.25.7" @@ -1997,19 +1527,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-static-block@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-class-static-block@npm:7.24.7" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10/00b4d35788bcfefb56b6a1d3506ca23f11dd55d4bb5a34eb70397c06283dc7f596cd9d40995c4a6cb897b45ad220de211f854e7a030a05e26a307c8f56b6ba4b - languageName: node - linkType: hard - "@babel/plugin-transform-class-static-block@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-class-static-block@npm:7.25.8" @@ -2022,22 +1539,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.25.4": - version: 7.25.4 - resolution: "@babel/plugin-transform-classes@npm:7.25.4" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-compilation-targets": "npm:^7.25.2" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-replace-supers": "npm:^7.25.0" - "@babel/traverse": "npm:^7.25.4" - globals: "npm:^11.1.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/17db5889803529bec366c6f0602687fdd605c2fec8cb6fe918261cb55cd89e9d8c9aa2aa6f3fd64d36492ce02d7d0752b09a284b0f833c1185f7dad9b9506310 - languageName: node - linkType: hard - "@babel/plugin-transform-classes@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-classes@npm:7.25.7" @@ -2054,18 +1555,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-computed-properties@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-computed-properties@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/template": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/fecf3c770b2dd8e70be6da12d4dd0273de9d8ef4d0f46be98d56fddb3a451932cdc9bb81de3057c9acb903e05ece657886cc31886d5762afa7b0a256db0f791e - languageName: node - linkType: hard - "@babel/plugin-transform-computed-properties@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-computed-properties@npm:7.25.7" @@ -2078,17 +1567,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/plugin-transform-destructuring@npm:7.24.8" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e3bba0bb050592615fbf062ea07ae94f99e9cf22add006eaa66ed672d67ff7051b578a5ea68a7d79f9184fb3c27c65333d86b0b8ea04f9810bcccbeea2ffbe76 - languageName: node - linkType: hard - "@babel/plugin-transform-destructuring@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-destructuring@npm:7.25.7" @@ -2100,18 +1578,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-dotall-regex@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.24.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/51b75638748f6e5adab95b711d3365b8d7757f881c178946618a43b15063ec1160b07f4aa3b116bf3f1e097a88226a01db4cae2c5c4aad4c71fe5568828a03f5 - languageName: node - linkType: hard - "@babel/plugin-transform-dotall-regex@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-dotall-regex@npm:7.25.7" @@ -2124,17 +1590,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-duplicate-keys@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/4284d8fe058c838f80d594bace1380ce02995fa9a271decbece59c40815bc2f7e715807dcbe4d5da8b444716e6d05cc6d79771f500fb044cd0dd00ce4324b619 - languageName: node - linkType: hard - "@babel/plugin-transform-duplicate-keys@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-duplicate-keys@npm:7.25.7" @@ -2146,18 +1601,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:7.25.0" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.0" - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/869c08def8eb80e3619c77e7af962dd82323a8447697298f461624077593c7b7082fc2238989880a0c0ba94bc6442300fd23e33255ac225760bc8bb755268941 - languageName: node - linkType: hard - "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:7.25.7" @@ -2170,18 +1613,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-dynamic-import@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-dynamic-import@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e949c02aa57098d916eb6edcbef0f3f7d62640f37e1a061b0692523964e081f8182f2c4292173b4dbea4edb8d146e65d6a20ce4b6b5f8c33be34bd846ae114ea - languageName: node - linkType: hard - "@babel/plugin-transform-dynamic-import@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-dynamic-import@npm:7.25.8" @@ -2193,18 +1624,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-exponentiation-operator@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.24.7" - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/014b211f73a524ee98441541ddc4f6b067eefcf94d509e99074a45ea8c3f3ad0e36cab6f5f96666ac05b747a21fa6fda949aa25153656bb2821545a4b302e0d4 - languageName: node - linkType: hard - "@babel/plugin-transform-exponentiation-operator@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.25.7" @@ -2217,18 +1636,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-export-namespace-from@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-export-namespace-from@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d59d21945d2fd1ead914bb21f909f75b70ebe0e7627c2b1326ce500babca4c8e4a2513af6899d92e06e87186c61ee5087209345f5102fb4ff5a0e47e7b159a2c - languageName: node - linkType: hard - "@babel/plugin-transform-export-namespace-from@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-export-namespace-from@npm:7.25.8" @@ -2240,18 +1647,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-for-of@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-for-of@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/ea471ad1345f1153f7f72f1f084e74f48dc349272ca1b2d8710b841b015c9861d673e12c3c98d42ab3c640cb6ab88bb9a8da1f4ca9c57a8f71f00815fa23ecef - languageName: node - linkType: hard - "@babel/plugin-transform-for-of@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-for-of@npm:7.25.7" @@ -2264,19 +1659,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-function-name@npm:^7.25.1": - version: 7.25.1 - resolution: "@babel/plugin-transform-function-name@npm:7.25.1" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.24.8" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/traverse": "npm:^7.25.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/1b4cd214c8523f7fa024fcda540ffe5503eda0e0be08b7c21405c96a870b5fe8bb1bda9e23a43a31467bf3dfc3a08edca250cf7f55f09dc40759a1ca6c6d6a4a - languageName: node - linkType: hard - "@babel/plugin-transform-function-name@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-function-name@npm:7.25.7" @@ -2290,18 +1672,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-json-strings@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-json-strings@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/5549dc97fc2d429a089d14ccfd51d8b3ba23c39b79edfe6d754e804fb1d50e6a4c070e73550be514a919c4db1553d8e6f7406178d68756b5959afe025a602cb2 - languageName: node - linkType: hard - "@babel/plugin-transform-json-strings@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-json-strings@npm:7.25.8" @@ -2313,17 +1683,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-literals@npm:^7.25.2": - version: 7.25.2 - resolution: "@babel/plugin-transform-literals@npm:7.25.2" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d9728625a6d55305610dd37057fe1a3473df4f3789fef693c900516caf8958dfb341394ecf69ce9b60c82c422ad2954491a7e4d4533432fd5df812827443d6e9 - languageName: node - linkType: hard - "@babel/plugin-transform-literals@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-literals@npm:7.25.7" @@ -2335,18 +1694,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-logical-assignment-operators@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/e39581cf1f9a43330b8340177c618fdb3232deb03faab1937819ef39327660a1fe94fd0ec2f66d1f5b5f98acba68871a77a9931588011c13dded3d7094ecc9de - languageName: node - linkType: hard - "@babel/plugin-transform-logical-assignment-operators@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.25.8" @@ -2358,17 +1705,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-member-expression-literals@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/837b60ea42fc69a430c8f7fb124247ba009ff6d93187a521fe9f83556fe124715bd46533b1684a3e139f272849a14d1d4faf3397bde13714f99ce0938526ea6f - languageName: node - linkType: hard - "@babel/plugin-transform-member-expression-literals@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-member-expression-literals@npm:7.25.7" @@ -2380,18 +1716,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-amd@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-modules-amd@npm:7.24.7" - dependencies: - "@babel/helper-module-transforms": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/66465ffba49af7a7b7a62995eb58f591ecd23ab42b0c67f8a70020177b3789d2a379bd6cbb68cbd09a69fd75c38a91f5a09ea70f5c8347bf4c6ea81caa0f6c6b - languageName: node - linkType: hard - "@babel/plugin-transform-modules-amd@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-modules-amd@npm:7.25.7" @@ -2404,32 +1728,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.24.7" - dependencies: - "@babel/helper-module-transforms": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-simple-access": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/9bd10cd03cce138a644f4e671025058348d8ff364253122bed60f9a2a32759445b93e8a6501773491cb19906602b18fd26255df0caac425343a1584599b36b24 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-commonjs@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.24.8" - dependencies: - "@babel/helper-module-transforms": "npm:^7.24.8" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-simple-access": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/18e5d229767c7b5b6ff0cbf1a8d2d555965b90201839d0ac2dc043b56857624ea344e59f733f028142a8c1d54923b82e2a0185694ef36f988d797bfbaf59819c - languageName: node - linkType: hard - "@babel/plugin-transform-modules-commonjs@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-modules-commonjs@npm:7.25.7" @@ -2443,20 +1741,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-systemjs@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.25.0" - dependencies: - "@babel/helper-module-transforms": "npm:^7.25.0" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-validator-identifier": "npm:^7.24.7" - "@babel/traverse": "npm:^7.25.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/2c38efdbaf6faf730cdcb0c5e42d2d15bb114eecf184db078319de496b5e3ce68d499e531265a0e13e29f0dcaa001f240773db5c4c078eac7f4456d6c8bddd88 - languageName: node - linkType: hard - "@babel/plugin-transform-modules-systemjs@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-modules-systemjs@npm:7.25.7" @@ -2471,18 +1755,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-umd@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-modules-umd@npm:7.24.7" - dependencies: - "@babel/helper-module-transforms": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/cef9c8917b3c35c3b6cb424dc2e6f74016122f1d25c196e2c7e51eb080d95e96c5d34966c0d5b9d4e17b8e60d455a97ed271317ed104e0e70bff159830a59678 - languageName: node - linkType: hard - "@babel/plugin-transform-modules-umd@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-modules-umd@npm:7.25.7" @@ -2495,18 +1767,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.24.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/b0ecb1afd22946b21fb8f34e826cfbfea4b5337f7592a5ff8af7937eddec4440149c59d2d134b4f21b2ed91b57611f39b19827729e19d99b7c11eaf614435f83 - languageName: node - linkType: hard - "@babel/plugin-transform-named-capturing-groups-regex@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.25.7" @@ -2519,17 +1779,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-new-target@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-new-target@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/91b6a7439b7622f80dc755ddfb9ab083355bedc0b2af18e7c7a948faed14467599609331c8d59cfab4273640e3fc36e4cd02ad5b6dcb4a428f5a8baefc507acc - languageName: node - linkType: hard - "@babel/plugin-transform-new-target@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-new-target@npm:7.25.7" @@ -2541,18 +1790,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/113cd24b6ce4d0a8e54ad9324428244942ce752a3fd38f8b615c3a786641ec18a00a01b662fe4cbebf369358f5904a975bbde0a977b839f2438b16f0d7d1dd36 - languageName: node - linkType: hard - "@babel/plugin-transform-nullish-coalescing-operator@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.25.8" @@ -2564,18 +1801,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-numeric-separator@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-numeric-separator@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/dc5bb0534889d207b1da125635471c42da61a4a4e9e68855f24b1cd04ccdcf8325b2c29112e719913c2097242e7e62d660e0fea2a46f3a9a983c9d02a0ec7a04 - languageName: node - linkType: hard - "@babel/plugin-transform-numeric-separator@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-numeric-separator@npm:7.25.8" @@ -2587,20 +1812,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-rest-spread@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-object-rest-spread@npm:7.24.7" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d586995dc3396bbf8fb75b84f0a3548d923e4c3500bb414641a7fe30762a4ffd82987887fece6381f600d8de2da1e3310fc9a725271724d35f9020fcd5d4b2a3 - languageName: node - linkType: hard - "@babel/plugin-transform-object-rest-spread@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-object-rest-spread@npm:7.25.8" @@ -2614,18 +1825,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-super@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-object-super@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-replace-supers": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/382739a017972d7126416b958ea81b4b950b6275414908a54bfef6aeed9b9fcc6c8d247db3a1134b09a3b355a60039670ce41ee41c626f8acec70f49c3c8d2a6 - languageName: node - linkType: hard - "@babel/plugin-transform-object-super@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-object-super@npm:7.25.7" @@ -2638,18 +1837,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-optional-catch-binding@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/605ae3764354e83f73c1e6430bac29e308806abcce8d1369cf69e4921771ff3592e8f60ba60c15990070d79b8d8740f0841069d64b466b3ce8a8c43e9743da7e - languageName: node - linkType: hard - "@babel/plugin-transform-optional-catch-binding@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.25.8" @@ -2661,32 +1848,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-optional-chaining@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/0835caa8fa8561ba5da8edb82aee93aef8e5145eae33e5400569bb4fae879c596cd35d3bfe7519b222261fc370b1291c499870ca6ad9903e1a71cfaaa27a5454 - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-chaining@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.24.8" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/1f873fb9d86c280b64dfe5ebc59244b459b717ed72a7682da2386db3d9e11fc9d831cfc2e11d37262b4325a7a0e3ccbccfb8cd0b944caf199d3c9e03fff7b0af - languageName: node - linkType: hard - "@babel/plugin-transform-optional-chaining@npm:^7.25.7, @babel/plugin-transform-optional-chaining@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-optional-chaining@npm:7.25.8" @@ -2699,17 +1860,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-parameters@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/41ff6bda926fabfb2e5d90b70621f279330691bed92009297340a8e776cfe9c3f2dda6afbc31dd3cbdccdfa9a5c57f2046e3ccc84f963c3797356df003d1703a - languageName: node - linkType: hard - "@babel/plugin-transform-parameters@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-parameters@npm:7.25.7" @@ -2721,18 +1871,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-private-methods@npm:^7.25.4": - version: 7.25.4 - resolution: "@babel/plugin-transform-private-methods@npm:7.25.4" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.25.4" - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/d5c29ba121d6ce40e8055a632c32e69006c513607145a29701f93b416a8c53a60e53565df417218e2d8b7f1ba73adb837601e8e9d0a3215da50e4c9507f9f1fa - languageName: node - linkType: hard - "@babel/plugin-transform-private-methods@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-private-methods@npm:7.25.7" @@ -2745,20 +1883,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-private-property-in-object@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-private-property-in-object@npm:7.24.7" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/a23ee18340818e292abfcb98b1086a188c81d640b1045e6809e9a3e8add78f9cb26607774de4ed653cbecd4277965dc4f4f1affc3504682209bb2a65fd4251f8 - languageName: node - linkType: hard - "@babel/plugin-transform-private-property-in-object@npm:^7.25.8": version: 7.25.8 resolution: "@babel/plugin-transform-private-property-in-object@npm:7.25.8" @@ -2772,17 +1896,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-property-literals@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-property-literals@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/71708890fe007d45ad7a130150a2ba1fea0205f575b925ca2e1bb65018730636a68e65c634a474e5b658378d72871c337c953560009c081a645e088769bf168a - languageName: node - linkType: hard - "@babel/plugin-transform-property-literals@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-property-literals@npm:7.25.7" @@ -2838,21 +1951,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-jsx@npm:7.25.2": - version: 7.25.2 - resolution: "@babel/plugin-transform-react-jsx@npm:7.25.2" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-module-imports": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/plugin-syntax-jsx": "npm:^7.24.7" - "@babel/types": "npm:^7.25.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/4cab88496285a98853413c9b2525053506728f13d04aefc1b37e6d9f0dc4ea15e0d4c9e59b36b43d0b204bd3c56761e7b0ec56b3ae60a58880a0017b157a0250 - languageName: node - linkType: hard - "@babel/plugin-transform-react-jsx@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-react-jsx@npm:7.25.7" @@ -2880,18 +1978,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-regenerator@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - regenerator-transform: "npm:^0.15.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/70fa2bb36d3e2ce69a25c7227da8ad92307ab7b50cb6dfcc4dc5ce8f1cc79b0fcf997292a1cb3b4ae7cb136f515d1b2c3fb78c927bdba8d719794430403eb0c6 - languageName: node - linkType: hard - "@babel/plugin-transform-regenerator@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-regenerator@npm:7.25.7" @@ -2904,17 +1990,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-reserved-words@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-reserved-words@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/64a2669671bb97c3dee3830a82c3e932fe6e02d56a4053c6ee4453d317b5f436d3d44907fbb0f4fbd8a56ebee34f6aee250e49743b7243d14d00c069215f3113 - languageName: node - linkType: hard - "@babel/plugin-transform-reserved-words@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-reserved-words@npm:7.25.7" @@ -2926,17 +2001,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-shorthand-properties@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/c68c2be965007e0cb6667daa209bc0af877cab4b327ef2e21b2114c38554243c3f7fdcc5b03679b20f72a26d966aa646af771f3165c882067e85a3887647f028 - languageName: node - linkType: hard - "@babel/plugin-transform-shorthand-properties@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-shorthand-properties@npm:7.25.7" @@ -2948,18 +2012,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-spread@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-spread@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/76e2c8544129d727d5a698e2a67d74e438bc35df843adb5f769316ec432c5e1bbb4128123a95b2fe8ef0aec7b26d87efe81d64326291c77ad757ff184d38448a - languageName: node - linkType: hard - "@babel/plugin-transform-spread@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-spread@npm:7.25.7" @@ -2972,17 +2024,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-sticky-regex@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/3b9a99ae043ef363c81bfb097fa7a553fcf7c7d9fddc13dd2b47b3b2e45cf2741a9ca78cfe55f463983b043b365f0f8452f2d5eaadbdea20e6d6de50c16bed25 - languageName: node - linkType: hard - "@babel/plugin-transform-sticky-regex@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-sticky-regex@npm:7.25.7" @@ -2994,17 +2035,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-template-literals@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-template-literals@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/ecf05a8511176d5570cb0d481577a407a4e8a9a430f86522d809e0ac2c823913e854ef9e2a1c83c0bd7c12489d82e1b48fabb52e697e80d6a6962125197593ca - languageName: node - linkType: hard - "@babel/plugin-transform-template-literals@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-template-literals@npm:7.25.7" @@ -3016,17 +2046,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typeof-symbol@npm:^7.24.8": - version: 7.24.8 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.24.8" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/5f113fed94b694ec4a40a27b8628ce736cfa172b69fcffa2833c9a41895032127f3daeea552e94fdb4a3ce4e8cd51de67a670ab87a1f447a0cf55c9cb2d7ed11 - languageName: node - linkType: hard - "@babel/plugin-transform-typeof-symbol@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-typeof-symbol@npm:7.25.7" @@ -3038,20 +2057,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typescript@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-typescript@npm:7.24.7" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/plugin-syntax-typescript": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6a4af5a96a90f08ea679829abc558b8478b8b31b40c84b887f2859110b75ab2c8c48a2cf80193621d988a6b064aefef2a74ea3ccc310166219f87959d06a3033 - languageName: node - linkType: hard - "@babel/plugin-transform-typescript@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-typescript@npm:7.25.7" @@ -3067,17 +2072,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-escapes@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/6b8bca3495acedc89e880942de7b83c263fb5b4c9599594dcf3923e2128ae25f1f4725a295fe101027f75d8ef081ef28319296adf274b5022e57039e42836103 - languageName: node - linkType: hard - "@babel/plugin-transform-unicode-escapes@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-unicode-escapes@npm:7.25.7" @@ -3089,18 +2083,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-property-regex@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.24.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/c0c284bbbdead7e17e059d72e1b288f86b0baacc410398ef6c6c703fe4326b069e68515ccb84359601315cd8e888f9226731d00624b7c6959b1c0853f072b61f - languageName: node - linkType: hard - "@babel/plugin-transform-unicode-property-regex@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.25.7" @@ -3113,18 +2095,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-regex@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.24.7" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/b545310d0d592d75566b9cd158f4b8951e34d07d839656789d179b39b3fd92b32bd387cdfaf33a93e636609f3bfb9bb03d41f3e43be598116c9c6c80cc3418c4 - languageName: node - linkType: hard - "@babel/plugin-transform-unicode-regex@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-unicode-regex@npm:7.25.7" @@ -3137,18 +2107,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-sets-regex@npm:^7.25.4": - version: 7.25.4 - resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.25.4" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.2" - "@babel/helper-plugin-utils": "npm:^7.24.8" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/d5d07d17932656fa4d62fd67ecaa1a5e4c2e92365a924f1a2a8cf8108762f137a30cd55eb3a7d0504258f27a19ad0decca6b62a5c37a5aada709cbb46c4a871f - languageName: node - linkType: hard - "@babel/plugin-transform-unicode-sets-regex@npm:^7.25.7": version: 7.25.7 resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.25.7" @@ -3161,100 +2119,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:7.25.4": - version: 7.25.4 - resolution: "@babel/preset-env@npm:7.25.4" - dependencies: - "@babel/compat-data": "npm:^7.25.4" - "@babel/helper-compilation-targets": "npm:^7.25.2" - "@babel/helper-plugin-utils": "npm:^7.24.8" - "@babel/helper-validator-option": "npm:^7.24.8" - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "npm:^7.25.3" - "@babel/plugin-bugfix-safari-class-field-initializer-scope": "npm:^7.25.0" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.25.0" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.24.7" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "npm:^7.25.0" - "@babel/plugin-proposal-private-property-in-object": "npm:7.21.0-placeholder-for-preset-env.2" - "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/plugin-syntax-class-properties": "npm:^7.12.13" - "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" - "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - "@babel/plugin-syntax-export-namespace-from": "npm:^7.8.3" - "@babel/plugin-syntax-import-assertions": "npm:^7.24.7" - "@babel/plugin-syntax-import-attributes": "npm:^7.24.7" - "@babel/plugin-syntax-import-meta": "npm:^7.10.4" - "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" - "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" - "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" - "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" - "@babel/plugin-transform-arrow-functions": "npm:^7.24.7" - "@babel/plugin-transform-async-generator-functions": "npm:^7.25.4" - "@babel/plugin-transform-async-to-generator": "npm:^7.24.7" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.24.7" - "@babel/plugin-transform-block-scoping": "npm:^7.25.0" - "@babel/plugin-transform-class-properties": "npm:^7.25.4" - "@babel/plugin-transform-class-static-block": "npm:^7.24.7" - "@babel/plugin-transform-classes": "npm:^7.25.4" - "@babel/plugin-transform-computed-properties": "npm:^7.24.7" - "@babel/plugin-transform-destructuring": "npm:^7.24.8" - "@babel/plugin-transform-dotall-regex": "npm:^7.24.7" - "@babel/plugin-transform-duplicate-keys": "npm:^7.24.7" - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "npm:^7.25.0" - "@babel/plugin-transform-dynamic-import": "npm:^7.24.7" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.24.7" - "@babel/plugin-transform-export-namespace-from": "npm:^7.24.7" - "@babel/plugin-transform-for-of": "npm:^7.24.7" - "@babel/plugin-transform-function-name": "npm:^7.25.1" - "@babel/plugin-transform-json-strings": "npm:^7.24.7" - "@babel/plugin-transform-literals": "npm:^7.25.2" - "@babel/plugin-transform-logical-assignment-operators": "npm:^7.24.7" - "@babel/plugin-transform-member-expression-literals": "npm:^7.24.7" - "@babel/plugin-transform-modules-amd": "npm:^7.24.7" - "@babel/plugin-transform-modules-commonjs": "npm:^7.24.8" - "@babel/plugin-transform-modules-systemjs": "npm:^7.25.0" - "@babel/plugin-transform-modules-umd": "npm:^7.24.7" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.24.7" - "@babel/plugin-transform-new-target": "npm:^7.24.7" - "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.24.7" - "@babel/plugin-transform-numeric-separator": "npm:^7.24.7" - "@babel/plugin-transform-object-rest-spread": "npm:^7.24.7" - "@babel/plugin-transform-object-super": "npm:^7.24.7" - "@babel/plugin-transform-optional-catch-binding": "npm:^7.24.7" - "@babel/plugin-transform-optional-chaining": "npm:^7.24.8" - "@babel/plugin-transform-parameters": "npm:^7.24.7" - "@babel/plugin-transform-private-methods": "npm:^7.25.4" - "@babel/plugin-transform-private-property-in-object": "npm:^7.24.7" - "@babel/plugin-transform-property-literals": "npm:^7.24.7" - "@babel/plugin-transform-regenerator": "npm:^7.24.7" - "@babel/plugin-transform-reserved-words": "npm:^7.24.7" - "@babel/plugin-transform-shorthand-properties": "npm:^7.24.7" - "@babel/plugin-transform-spread": "npm:^7.24.7" - "@babel/plugin-transform-sticky-regex": "npm:^7.24.7" - "@babel/plugin-transform-template-literals": "npm:^7.24.7" - "@babel/plugin-transform-typeof-symbol": "npm:^7.24.8" - "@babel/plugin-transform-unicode-escapes": "npm:^7.24.7" - "@babel/plugin-transform-unicode-property-regex": "npm:^7.24.7" - "@babel/plugin-transform-unicode-regex": "npm:^7.24.7" - "@babel/plugin-transform-unicode-sets-regex": "npm:^7.25.4" - "@babel/preset-modules": "npm:0.1.6-no-external-plugins" - babel-plugin-polyfill-corejs2: "npm:^0.4.10" - babel-plugin-polyfill-corejs3: "npm:^0.10.6" - babel-plugin-polyfill-regenerator: "npm:^0.6.1" - core-js-compat: "npm:^3.37.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/45ca65bdc7fa11ca51167804052460eda32bf2e6620c7ba998e2d95bc867595913532ee7d748e97e808eabcc66aabe796bd75c59014d996ec8183fa5a7245862 - languageName: node - linkType: hard - -"@babel/preset-env@npm:7.25.8": +"@babel/preset-env@npm:7.25.8, @babel/preset-env@npm:^7.25.3": version: 7.25.8 resolution: "@babel/preset-env@npm:7.25.8" dependencies: @@ -3361,21 +2226,6 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:7.24.7": - version: 7.24.7 - resolution: "@babel/preset-typescript@npm:7.24.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" - "@babel/helper-validator-option": "npm:^7.24.7" - "@babel/plugin-syntax-jsx": "npm:^7.24.7" - "@babel/plugin-transform-modules-commonjs": "npm:^7.24.7" - "@babel/plugin-transform-typescript": "npm:^7.24.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/995e9783f8e474581e7533d6b10ec1fbea69528cc939ad8582b5937e13548e5215d25a8e2c845e7b351fdaa13139896b5e42ab3bde83918ea4e41773f10861ac - languageName: node - linkType: hard - "@babel/preset-typescript@npm:7.25.7": version: 7.25.7 resolution: "@babel/preset-typescript@npm:7.25.7" @@ -3407,6 +2257,17 @@ __metadata: languageName: node linkType: hard +"@babel/template@npm:^7.12.13, @babel/template@npm:^7.25.7": + version: 7.25.7 + resolution: "@babel/template@npm:7.25.7" + dependencies: + "@babel/code-frame": "npm:^7.25.7" + "@babel/parser": "npm:^7.25.7" + "@babel/types": "npm:^7.25.7" + checksum: 10/49e1e88d2eac17d31ae28d6cf13d6d29c1f49384c4f056a6751c065d6565c351e62c01ce6b11fef5edb5f3a77c87e114ea7326ca384fa618b4834e10cf9b20f3 + languageName: node + linkType: hard + "@babel/template@npm:^7.16.7": version: 7.16.7 resolution: "@babel/template@npm:7.16.7" @@ -3462,17 +2323,6 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/template@npm:7.25.7" - dependencies: - "@babel/code-frame": "npm:^7.25.7" - "@babel/parser": "npm:^7.25.7" - "@babel/types": "npm:^7.25.7" - checksum: 10/49e1e88d2eac17d31ae28d6cf13d6d29c1f49384c4f056a6751c065d6565c351e62c01ce6b11fef5edb5f3a77c87e114ea7326ca384fa618b4834e10cf9b20f3 - languageName: node - linkType: hard - "@babel/template@npm:^7.3.3": version: 7.14.5 resolution: "@babel/template@npm:7.14.5" @@ -3571,7 +2421,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.24.8, @babel/traverse@npm:^7.25.0, @babel/traverse@npm:^7.25.1, @babel/traverse@npm:^7.25.2, @babel/traverse@npm:^7.25.3, @babel/traverse@npm:^7.25.4": +"@babel/traverse@npm:^7.25.2": version: 7.25.6 resolution: "@babel/traverse@npm:7.25.6" dependencies: @@ -3682,7 +2532,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.24.8, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.6": +"@babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.6": version: 7.25.6 resolution: "@babel/types@npm:7.25.6" dependencies: @@ -3784,17 +2634,6 @@ __metadata: languageName: node linkType: hard -"@emotion/babel-plugin-jsx-pragmatic@npm:0.3.0": - version: 0.3.0 - resolution: "@emotion/babel-plugin-jsx-pragmatic@npm:0.3.0" - dependencies: - "@babel/plugin-syntax-jsx": "npm:^7.17.12" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10/752124c6fd0f88c9820c9861988068de50ff7728268d77f0d0f3f4086b063ec033ece5ef4cd3c312962f003ec6f115df5c255dd79ca6aa05f8072ddc51eb05f4 - languageName: node - linkType: hard - "@emotion/babel-plugin@npm:11.12.0, @emotion/babel-plugin@npm:^11.11.0, @emotion/babel-plugin@npm:^11.12.0": version: 11.12.0 resolution: "@emotion/babel-plugin@npm:11.12.0" @@ -4623,15 +3462,6 @@ __metadata: languageName: node linkType: hard -"@jest/create-cache-key-function@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/create-cache-key-function@npm:29.7.0" - dependencies: - "@jest/types": "npm:^29.6.3" - checksum: 10/061ef63b13ec8c8e5d08e4456f03b5cf8c7f9c1cab4fed8402e1479153cafce6eea80420e308ef62027abb7e29b825fcfa06551856bd021d98e92e381bf91723 - languageName: node - linkType: hard - "@jest/environment@npm:^29.7.0": version: 29.7.0 resolution: "@jest/environment@npm:29.7.0" @@ -4915,6 +3745,16 @@ __metadata: languageName: node linkType: hard +"@jridgewell/source-map@npm:^0.3.3": + version: 0.3.6 + resolution: "@jridgewell/source-map@npm:0.3.6" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + checksum: 10/0a9aca9320dc9044014ba0ef989b3a8411b0d778895553e3b7ca2ac0a75a20af4a5ad3f202acfb1879fa40466036a4417e1d5b38305baed8b9c1ebe6e4b3e7f5 + languageName: node + linkType: hard + "@jridgewell/sourcemap-codec@npm:1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.10": version: 1.4.14 resolution: "@jridgewell/sourcemap-codec@npm:1.4.14" @@ -5071,59 +3911,6 @@ __metadata: languageName: node linkType: hard -"@microsoft/api-extractor-model@npm:7.29.6": - version: 7.29.6 - resolution: "@microsoft/api-extractor-model@npm:7.29.6" - dependencies: - "@microsoft/tsdoc": "npm:~0.15.0" - "@microsoft/tsdoc-config": "npm:~0.17.0" - "@rushstack/node-core-library": "npm:5.7.0" - checksum: 10/7339366297a4438e33aef34fac4fa1fea3b7357fefd0a88da18221fa80152397326fb383563106f995899a382119f5c95f357abc3aa7448fcc1a2bee021696aa - languageName: node - linkType: hard - -"@microsoft/api-extractor@npm:7.47.7": - version: 7.47.7 - resolution: "@microsoft/api-extractor@npm:7.47.7" - dependencies: - "@microsoft/api-extractor-model": "npm:7.29.6" - "@microsoft/tsdoc": "npm:~0.15.0" - "@microsoft/tsdoc-config": "npm:~0.17.0" - "@rushstack/node-core-library": "npm:5.7.0" - "@rushstack/rig-package": "npm:0.5.3" - "@rushstack/terminal": "npm:0.14.0" - "@rushstack/ts-command-line": "npm:4.22.6" - lodash: "npm:~4.17.15" - minimatch: "npm:~3.0.3" - resolve: "npm:~1.22.1" - semver: "npm:~7.5.4" - source-map: "npm:~0.6.1" - typescript: "npm:5.4.2" - bin: - api-extractor: bin/api-extractor - checksum: 10/eef9d5087c72e23181aebcc8ee17678a99c27ee54a527a0f347e3a2b1432fc4f660127b3e1b9cc83e7375dfe174ec4699b7e433b91f789837290c943994a8ab2 - languageName: node - linkType: hard - -"@microsoft/tsdoc-config@npm:~0.17.0": - version: 0.17.0 - resolution: "@microsoft/tsdoc-config@npm:0.17.0" - dependencies: - "@microsoft/tsdoc": "npm:0.15.0" - ajv: "npm:~8.12.0" - jju: "npm:~1.4.0" - resolve: "npm:~1.22.2" - checksum: 10/6e20f9b917d20e517b6752cbb46c84ccc4c8be7ce82d7424e413bd7111a2f1497714a72e61ac1a96df97d0050cb98b3a53006316eeb0cfea9bb6d7131432c7a8 - languageName: node - linkType: hard - -"@microsoft/tsdoc@npm:0.15.0, @microsoft/tsdoc@npm:~0.15.0": - version: 0.15.0 - resolution: "@microsoft/tsdoc@npm:0.15.0" - checksum: 10/fd025e5e3966248cd5477b9ddad4e9aa0dd69291f372a207f18a686b3097dcf5ecf38325caf0f4ad2697f1f39fd45b536e4ada6756008b8bcc5eccbc3201313d - languageName: node - linkType: hard - "@nodelib/fs.scandir@npm:2.1.4": version: 2.1.4 resolution: "@nodelib/fs.scandir@npm:2.1.4" @@ -6025,22 +4812,6 @@ __metadata: languageName: node linkType: hard -"@rollup/pluginutils@npm:^5.1.0": - version: 5.1.0 - resolution: "@rollup/pluginutils@npm:5.1.0" - dependencies: - "@types/estree": "npm:^1.0.0" - estree-walker: "npm:^2.0.2" - picomatch: "npm:^2.3.1" - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - checksum: 10/abb15eaec5b36f159ec351b48578401bedcefdfa371d24a914cfdbb1e27d0ebfbf895299ec18ccc343d247e71f2502cba21202bc1362d7ef27d5ded699e5c2b2 - languageName: node - linkType: hard - "@rollup/rollup-android-arm-eabi@npm:4.21.2": version: 4.21.2 resolution: "@rollup/rollup-android-arm-eabi@npm:4.21.2" @@ -6160,64 +4931,6 @@ __metadata: languageName: node linkType: hard -"@rushstack/node-core-library@npm:5.7.0": - version: 5.7.0 - resolution: "@rushstack/node-core-library@npm:5.7.0" - dependencies: - ajv: "npm:~8.13.0" - ajv-draft-04: "npm:~1.0.0" - ajv-formats: "npm:~3.0.1" - fs-extra: "npm:~7.0.1" - import-lazy: "npm:~4.0.0" - jju: "npm:~1.4.0" - resolve: "npm:~1.22.1" - semver: "npm:~7.5.4" - peerDependencies: - "@types/node": "*" - peerDependenciesMeta: - "@types/node": - optional: true - checksum: 10/ed2bd40f5b99fb3853564e0c493f33926cd78008e4e265cb2849f8887ba4d48ea1b1940b6e7286f047ee9a3a419fbf826141c96e4798b7ecf80a4e4709e429bc - languageName: node - linkType: hard - -"@rushstack/rig-package@npm:0.5.3": - version: 0.5.3 - resolution: "@rushstack/rig-package@npm:0.5.3" - dependencies: - resolve: "npm:~1.22.1" - strip-json-comments: "npm:~3.1.1" - checksum: 10/b58a3925a41d7a0e79f4fde7c400a379683cc7b0073c447aba6d36231529a37e7d2f4559f459be785ad862ecb01b618b2d0ff60661046e5223437356155ccb14 - languageName: node - linkType: hard - -"@rushstack/terminal@npm:0.14.0": - version: 0.14.0 - resolution: "@rushstack/terminal@npm:0.14.0" - dependencies: - "@rushstack/node-core-library": "npm:5.7.0" - supports-color: "npm:~8.1.1" - peerDependencies: - "@types/node": "*" - peerDependenciesMeta: - "@types/node": - optional: true - checksum: 10/3a25652cad37d61c7d66a8bf3ea037f45b7fa639e15fc8af4b5e4cf6b45b0b7b534d211e0861b33322cf89888a70f2da97ec1a9675af3ae228998535d347c608 - languageName: node - linkType: hard - -"@rushstack/ts-command-line@npm:4.22.6": - version: 4.22.6 - resolution: "@rushstack/ts-command-line@npm:4.22.6" - dependencies: - "@rushstack/terminal": "npm:0.14.0" - "@types/argparse": "npm:1.0.38" - argparse: "npm:~1.0.9" - string-argv: "npm:~0.3.1" - checksum: 10/18dcdad213ce33bb7a354664e1e58f7f8f94f16f635b27f4e974a93514b7dafb7a08e181a9888d3fb82b846856a44e7e2d417f2fde18686ddb83b28f12eab0e7 - languageName: node - linkType: hard - "@sinclair/typebox@npm:^0.24.1": version: 0.24.51 resolution: "@sinclair/typebox@npm:0.24.51" @@ -6285,151 +4998,6 @@ __metadata: languageName: node linkType: hard -"@swc/core-darwin-arm64@npm:1.7.28": - version: 1.7.28 - resolution: "@swc/core-darwin-arm64@npm:1.7.28" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@swc/core-darwin-x64@npm:1.7.28": - version: 1.7.28 - resolution: "@swc/core-darwin-x64@npm:1.7.28" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@swc/core-linux-arm-gnueabihf@npm:1.7.28": - version: 1.7.28 - resolution: "@swc/core-linux-arm-gnueabihf@npm:1.7.28" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@swc/core-linux-arm64-gnu@npm:1.7.28": - version: 1.7.28 - resolution: "@swc/core-linux-arm64-gnu@npm:1.7.28" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@swc/core-linux-arm64-musl@npm:1.7.28": - version: 1.7.28 - resolution: "@swc/core-linux-arm64-musl@npm:1.7.28" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@swc/core-linux-x64-gnu@npm:1.7.28": - version: 1.7.28 - resolution: "@swc/core-linux-x64-gnu@npm:1.7.28" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@swc/core-linux-x64-musl@npm:1.7.28": - version: 1.7.28 - resolution: "@swc/core-linux-x64-musl@npm:1.7.28" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@swc/core-win32-arm64-msvc@npm:1.7.28": - version: 1.7.28 - resolution: "@swc/core-win32-arm64-msvc@npm:1.7.28" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@swc/core-win32-ia32-msvc@npm:1.7.28": - version: 1.7.28 - resolution: "@swc/core-win32-ia32-msvc@npm:1.7.28" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@swc/core-win32-x64-msvc@npm:1.7.28": - version: 1.7.28 - resolution: "@swc/core-win32-x64-msvc@npm:1.7.28" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@swc/core@npm:1.7.28": - version: 1.7.28 - resolution: "@swc/core@npm:1.7.28" - dependencies: - "@swc/core-darwin-arm64": "npm:1.7.28" - "@swc/core-darwin-x64": "npm:1.7.28" - "@swc/core-linux-arm-gnueabihf": "npm:1.7.28" - "@swc/core-linux-arm64-gnu": "npm:1.7.28" - "@swc/core-linux-arm64-musl": "npm:1.7.28" - "@swc/core-linux-x64-gnu": "npm:1.7.28" - "@swc/core-linux-x64-musl": "npm:1.7.28" - "@swc/core-win32-arm64-msvc": "npm:1.7.28" - "@swc/core-win32-ia32-msvc": "npm:1.7.28" - "@swc/core-win32-x64-msvc": "npm:1.7.28" - "@swc/counter": "npm:^0.1.3" - "@swc/types": "npm:^0.1.12" - peerDependencies: - "@swc/helpers": "*" - dependenciesMeta: - "@swc/core-darwin-arm64": - optional: true - "@swc/core-darwin-x64": - optional: true - "@swc/core-linux-arm-gnueabihf": - optional: true - "@swc/core-linux-arm64-gnu": - optional: true - "@swc/core-linux-arm64-musl": - optional: true - "@swc/core-linux-x64-gnu": - optional: true - "@swc/core-linux-x64-musl": - optional: true - "@swc/core-win32-arm64-msvc": - optional: true - "@swc/core-win32-ia32-msvc": - optional: true - "@swc/core-win32-x64-msvc": - optional: true - peerDependenciesMeta: - "@swc/helpers": - optional: true - checksum: 10/a477e79387ecc8b68c2bdbbdc88cc61f27a02c5d00f0d77134f9e2de166786a4ee9f7388d6ffd44fc01bfef5311a15cc3132052bab72fb43246dc42705fedb60 - languageName: node - linkType: hard - -"@swc/counter@npm:^0.1.3": - version: 0.1.3 - resolution: "@swc/counter@npm:0.1.3" - checksum: 10/df8f9cfba9904d3d60f511664c70d23bb323b3a0803ec9890f60133954173047ba9bdeabce28cd70ba89ccd3fd6c71c7b0bd58be85f611e1ffbe5d5c18616598 - languageName: node - linkType: hard - -"@swc/jest@npm:0.2.36": - version: 0.2.36 - resolution: "@swc/jest@npm:0.2.36" - dependencies: - "@jest/create-cache-key-function": "npm:^29.7.0" - "@swc/counter": "npm:^0.1.3" - jsonc-parser: "npm:^3.2.0" - peerDependencies: - "@swc/core": "*" - checksum: 10/39c5699646f0e90400af106156e5604069e8a7d8216f2421e171837b086839176c16f69925ce6a5c4c48182005eed649bdf9664023708e169aa48814feecc0d8 - languageName: node - linkType: hard - -"@swc/types@npm:^0.1.12": - version: 0.1.12 - resolution: "@swc/types@npm:0.1.12" - dependencies: - "@swc/counter": "npm:^0.1.3" - checksum: 10/92dbbc70cd068ea30fb6fbdc1ae8599d6c058a5d09b2923d6e4e24fab5ad7c86a19dd01f349a8e03e300a9321e06911a24df18303b40e307fbd4109372cef2ef - languageName: node - linkType: hard - "@tanstack/query-core@npm:5.56.2": version: 5.56.2 resolution: "@tanstack/query-core@npm:5.56.2" @@ -6522,13 +5090,6 @@ __metadata: languageName: node linkType: hard -"@types/argparse@npm:1.0.38": - version: 1.0.38 - resolution: "@types/argparse@npm:1.0.38" - checksum: 10/26ed7e3f1e3595efdb883a852f5205f971b798e4c28b7e30a32c5298eee596e8b45834ce831f014d250b9730819ab05acff5b31229666d3af4ba465b4697d0eb - languageName: node - linkType: hard - "@types/aria-query@npm:^5.0.1": version: 5.0.1 resolution: "@types/aria-query@npm:5.0.1" @@ -7398,6 +5959,25 @@ __metadata: languageName: node linkType: hard +"@vitejs/plugin-legacy@npm:5.4.2": + version: 5.4.2 + resolution: "@vitejs/plugin-legacy@npm:5.4.2" + dependencies: + "@babel/core": "npm:^7.25.2" + "@babel/preset-env": "npm:^7.25.3" + browserslist: "npm:^4.23.3" + browserslist-to-esbuild: "npm:^2.1.1" + core-js: "npm:^3.38.0" + magic-string: "npm:^0.30.11" + regenerator-runtime: "npm:^0.14.1" + systemjs: "npm:^6.15.1" + peerDependencies: + terser: ^5.4.0 + vite: ^5.0.0 + checksum: 10/9ef30cee7204df35d44536d79aa0a324e58248cc7407db9c395e830eb59dee18ac1b7764cbdacd85660ecf641e3d8b1a97bdd87410241bc092313f0f4e4c80fa + languageName: node + linkType: hard + "@vitejs/plugin-react@npm:4.3.2": version: 4.3.2 resolution: "@vitejs/plugin-react@npm:4.3.2" @@ -7413,94 +5993,6 @@ __metadata: languageName: node linkType: hard -"@volar/language-core@npm:2.4.5, @volar/language-core@npm:~2.4.1": - version: 2.4.5 - resolution: "@volar/language-core@npm:2.4.5" - dependencies: - "@volar/source-map": "npm:2.4.5" - checksum: 10/066f23ddc816dc6efe669a05ea4fe020d874ae10acf81d5445b921cadb8ab8c64379820e5daa804352e60f5044d8c8c41ddce006fae4311219c5a625ca042c4c - languageName: node - linkType: hard - -"@volar/source-map@npm:2.4.5": - version: 2.4.5 - resolution: "@volar/source-map@npm:2.4.5" - checksum: 10/babe7079216d20f1a00b81a6ba1ec93d0b8cad125483ef50d7607b5d778cc1b8475db760c50c15e7b0053adec951d712e7e6f81cfb701d8119fa62bb0c0036ba - languageName: node - linkType: hard - -"@volar/typescript@npm:^2.4.4": - version: 2.4.5 - resolution: "@volar/typescript@npm:2.4.5" - dependencies: - "@volar/language-core": "npm:2.4.5" - path-browserify: "npm:^1.0.1" - vscode-uri: "npm:^3.0.8" - checksum: 10/dbea9780967c24fe91550bc95d9b5fcaacd256973e273fb9ca9cd37e9edcc4805a7a18f91a6edba95e9858acb16d08e895a0a4b7dccc138c37341c49cb302936 - languageName: node - linkType: hard - -"@vue/compiler-core@npm:3.5.10": - version: 3.5.10 - resolution: "@vue/compiler-core@npm:3.5.10" - dependencies: - "@babel/parser": "npm:^7.25.3" - "@vue/shared": "npm:3.5.10" - entities: "npm:^4.5.0" - estree-walker: "npm:^2.0.2" - source-map-js: "npm:^1.2.0" - checksum: 10/3207883dd018305d3a014c80e17057d1223ae5093c77300b9ad703f8282abf863a2264d8b366cb9fc64a9319e213bf59d8d3419d80f07e2d70a424c0ad1e386b - languageName: node - linkType: hard - -"@vue/compiler-dom@npm:^3.4.0": - version: 3.5.10 - resolution: "@vue/compiler-dom@npm:3.5.10" - dependencies: - "@vue/compiler-core": "npm:3.5.10" - "@vue/shared": "npm:3.5.10" - checksum: 10/36f0eb99428bff3d42b490015d9172db0f3ed03f5ad9e6e8fb76b9b7fdb1306bf25002959442c8771a77755ead8aeabc7c6fd8918eb7d34e2c8cf125bd50bcad - languageName: node - linkType: hard - -"@vue/compiler-vue2@npm:^2.7.16": - version: 2.7.16 - resolution: "@vue/compiler-vue2@npm:2.7.16" - dependencies: - de-indent: "npm:^1.0.2" - he: "npm:^1.2.0" - checksum: 10/739ad06be19206b2715707c226a070509bcf28c31b539a6fc932d220eb7b0c09109d71fded573ed0c4073429793a3513ca4a4e69ad4f7afc0c5bc3c28639e871 - languageName: node - linkType: hard - -"@vue/language-core@npm:2.1.6": - version: 2.1.6 - resolution: "@vue/language-core@npm:2.1.6" - dependencies: - "@volar/language-core": "npm:~2.4.1" - "@vue/compiler-dom": "npm:^3.4.0" - "@vue/compiler-vue2": "npm:^2.7.16" - "@vue/shared": "npm:^3.4.0" - computeds: "npm:^0.0.1" - minimatch: "npm:^9.0.3" - muggle-string: "npm:^0.4.1" - path-browserify: "npm:^1.0.1" - peerDependencies: - typescript: "*" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/640d4af0031975620cd3a8050bb4b0f4ed333f241ded195e3bf8c4e571c720b4e3bec3947caf2b10e4e2de19deb7621982d15439de3732d510cd43e325c74a50 - languageName: node - linkType: hard - -"@vue/shared@npm:3.5.10, @vue/shared@npm:^3.4.0": - version: 3.5.10 - resolution: "@vue/shared@npm:3.5.10" - checksum: 10/1f8534a58ed5320c7c5a137ed18fcb21addd3ef1cb155f926d9c815ef90198d9492d3f2aa3ffd3e1d6d7bbfdebde9a9aa5a847a3ff98b442d15eb194afb46ec8 - languageName: node - linkType: hard - "SonarQube@workspace:.": version: 0.0.0-use.local resolution: "SonarQube@workspace:." @@ -7518,8 +6010,6 @@ __metadata: "@react-spring/rafz": "npm:9.7.4" "@react-spring/web": "npm:9.7.4" "@sonarsource/echoes-react": "npm:0.9.0" - "@swc/core": "npm:1.7.28" - "@swc/jest": "npm:0.2.36" "@tanstack/react-query": "npm:5.56.2" "@testing-library/dom": "npm:10.4.0" "@testing-library/jest-dom": "npm:6.5.0" @@ -7532,6 +6022,7 @@ __metadata: "@types/d3-scale": "npm:4.0.8" "@types/d3-selection": "npm:3.0.10" "@types/d3-shape": "npm:3.1.6" + "@types/d3-zoom": "npm:3.0.8" "@types/diff": "npm:5.2.2" "@types/dompurify": "npm:3.0.5" "@types/jest": "npm:29.5.13" @@ -7549,9 +6040,13 @@ __metadata: "@typescript-eslint/eslint-plugin": "npm:7.18.0" "@typescript-eslint/parser": "npm:7.18.0" "@typescript-eslint/rule-tester": "npm:7.18.0" + "@vitejs/plugin-legacy": "npm:5.4.2" + "@vitejs/plugin-react": "npm:4.3.2" autoprefixer: "npm:10.4.20" axios: "npm:1.7.7" - browserslist-to-esbuild: "npm:2.1.1" + babel-jest: "npm:29.7.0" + babel-plugin-twin: "npm:1.1.0" + browserslist: "npm:4.24.0" chalk: "npm:4.1.2" chokidar: "npm:3.6.0" classnames: "npm:2.5.1" @@ -7565,7 +6060,6 @@ __metadata: d3-zoom: "npm:3.0.0" date-fns: "npm:4.1.0" dd-trace: "npm:5.23.0" - design-system: "npm:1.0.0" diff: "npm:7.0.0" dompurify: "npm:3.1.7" eslint: "npm:8.57.1" @@ -7583,6 +6077,11 @@ __metadata: eslint-plugin-typescript-sort-keys: "npm:3.2.0" formik: "npm:2.4.6" fs-extra: "npm:11.2.0" + highlight.js: "npm:11.10.0" + highlightjs-apex: "npm:1.4.0" + highlightjs-cobol: "npm:0.3.3" + highlightjs-sap-abap: "npm:0.3.0" + history: "npm:5.3.0" http-proxy: "npm:1.18.1" jest: "npm:29.7.0" jest-axe: "npm:9.0.0" @@ -7590,7 +6089,6 @@ __metadata: jest-fail-on-console: "npm:3.3.1" jest-junit: "npm:16.0.0" jest-slow-test-reporter: "npm:1.0.0" - jsdom: "npm:25.0.1" lodash: "npm:4.17.21" lunr: "npm:2.3.9" openapi-types: "npm:12.1.3" @@ -7611,13 +6109,15 @@ __metadata: react-modal: "npm:3.16.1" react-router-dom: "npm:6.26.2" react-select: "npm:5.7.7" + react-toastify: "npm:10.0.5" react-virtualized: "npm:9.22.5" regenerator-runtime: "npm:0.14.1" rollup-plugin-license: "npm:3.5.3" rollup-plugin-visualizer: "npm:5.12.0" shared-store-hook: "npm:0.0.4" tailwindcss: "npm:3.4.13" - turbo: "npm:2.1.3" + terser: "npm:5.36.0" + twin.macro: "npm:3.4.1" typescript: "npm:5.6.2" valid-url: "npm:1.0.9" validator: "npm:13.12.0" @@ -7686,15 +6186,6 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.11.3": - version: 8.12.1 - resolution: "acorn@npm:8.12.1" - bin: - acorn: bin/acorn - checksum: 10/d08c2d122bba32d0861e0aa840b2ee25946c286d5dc5990abca991baf8cdbfbe199b05aacb221b979411a2fea36f83e26b5ac4f6b4e0ce49038c62316c1848f0 - languageName: node - linkType: hard - "acorn@npm:^8.8.2": version: 8.11.3 resolution: "acorn@npm:8.11.3" @@ -7722,15 +6213,6 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": - version: 7.1.0 - resolution: "agent-base@npm:7.1.0" - dependencies: - debug: "npm:^4.3.4" - checksum: 10/f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f - languageName: node - linkType: hard - "agentkeepalive@npm:^4.1.3": version: 4.1.4 resolution: "agentkeepalive@npm:4.1.4" @@ -7752,32 +6234,6 @@ __metadata: languageName: node linkType: hard -"ajv-draft-04@npm:~1.0.0": - version: 1.0.0 - resolution: "ajv-draft-04@npm:1.0.0" - peerDependencies: - ajv: ^8.5.0 - peerDependenciesMeta: - ajv: - optional: true - checksum: 10/3f11fa0e7f7359bef6608657f02ab78e9cc62b1fb7bdd860db0d00351b3863a1189c1a23b72466d2d82726cab4eb20725c76f5e7c134a89865e2bfd0e6828137 - languageName: node - linkType: hard - -"ajv-formats@npm:~3.0.1": - version: 3.0.1 - resolution: "ajv-formats@npm:3.0.1" - dependencies: - ajv: "npm:^8.0.0" - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true - checksum: 10/5679b9f9ced9d0213a202a37f3aa91efcffe59a6de1a6e3da5c873344d3c161820a1f11cc29899661fee36271fd2895dd3851b6461c902a752ad661d1c1e8722 - languageName: node - linkType: hard - "ajv@npm:^6.12.4, ajv@npm:^6.12.6": version: 6.12.6 resolution: "ajv@npm:6.12.6" @@ -7790,42 +6246,6 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^8.0.0": - version: 8.17.1 - resolution: "ajv@npm:8.17.1" - dependencies: - fast-deep-equal: "npm:^3.1.3" - fast-uri: "npm:^3.0.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - checksum: 10/ee3c62162c953e91986c838f004132b6a253d700f1e51253b99791e2dbfdb39161bc950ebdc2f156f8568035bb5ed8be7bd78289cd9ecbf3381fe8f5b82e3f33 - languageName: node - linkType: hard - -"ajv@npm:~8.12.0": - version: 8.12.0 - resolution: "ajv@npm:8.12.0" - dependencies: - fast-deep-equal: "npm:^3.1.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - uri-js: "npm:^4.2.2" - checksum: 10/b406f3b79b5756ac53bfe2c20852471b08e122bc1ee4cde08ae4d6a800574d9cd78d60c81c69c63ff81e4da7cd0b638fafbb2303ae580d49cf1600b9059efb85 - languageName: node - linkType: hard - -"ajv@npm:~8.13.0": - version: 8.13.0 - resolution: "ajv@npm:8.13.0" - dependencies: - fast-deep-equal: "npm:^3.1.3" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - uri-js: "npm:^4.4.1" - checksum: 10/4ada268c9a6e44be87fd295df0f0a91267a7bae8dbc8a67a2d5799c3cb459232839c99d18b035597bb6e3ffe88af6979f7daece854f590a81ebbbc2dfa80002c - languageName: node - linkType: hard - "ansi-escapes@npm:^4.2.1": version: 4.3.1 resolution: "ansi-escapes@npm:4.3.1" @@ -7940,7 +6360,7 @@ __metadata: languageName: node linkType: hard -"argparse@npm:^1.0.7, argparse@npm:~1.0.9": +"argparse@npm:^1.0.7": version: 1.0.10 resolution: "argparse@npm:1.0.10" dependencies: @@ -8253,7 +6673,7 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^29.7.0": +"babel-jest@npm:29.7.0, babel-jest@npm:^29.7.0": version: 29.7.0 resolution: "babel-jest@npm:29.7.0" dependencies: @@ -8342,6 +6762,15 @@ __metadata: languageName: node linkType: hard +"babel-plugin-twin@npm:1.1.0": + version: 1.1.0 + resolution: "babel-plugin-twin@npm:1.1.0" + dependencies: + "@babel/template": "npm:^7.12.13" + checksum: 10/1e4544ebb1b7d8d4a4154be5b48db4b08186c93010a38dc38827265d68907768d9f0e17dd1ad0a2a8cfac5b27572d0e88e107d75180f63bd2cc697cd299c7398 + languageName: node + linkType: hard + "babel-preset-current-node-syntax@npm:^1.0.0": version: 1.0.1 resolution: "babel-preset-current-node-syntax@npm:1.0.1" @@ -8425,7 +6854,7 @@ __metadata: languageName: node linkType: hard -"browserslist-to-esbuild@npm:2.1.1": +"browserslist-to-esbuild@npm:^2.1.1": version: 2.1.1 resolution: "browserslist-to-esbuild@npm:2.1.1" dependencies: @@ -8438,6 +6867,20 @@ __metadata: languageName: node linkType: hard +"browserslist@npm:4.24.0, browserslist@npm:^4.24.0": + version: 4.24.0 + resolution: "browserslist@npm:4.24.0" + dependencies: + caniuse-lite: "npm:^1.0.30001663" + electron-to-chromium: "npm:^1.5.28" + node-releases: "npm:^2.0.18" + update-browserslist-db: "npm:^1.1.0" + bin: + browserslist: cli.js + checksum: 10/26c1b8ba257a0b51b102080ba9d42945af2abaa8c4cf6da21cd47b3f123fc1e81640203b293214356c2c17d9d265bb3a5ed428b6d302f383576dd6ce8fd5036c + languageName: node + linkType: hard + "browserslist@npm:^4.17.5": version: 4.19.1 resolution: "browserslist@npm:4.19.1" @@ -8481,20 +6924,6 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.22.2": - version: 4.22.3 - resolution: "browserslist@npm:4.22.3" - dependencies: - caniuse-lite: "npm:^1.0.30001580" - electron-to-chromium: "npm:^1.4.648" - node-releases: "npm:^2.0.14" - update-browserslist-db: "npm:^1.0.13" - bin: - browserslist: cli.js - checksum: 10/d46a906c79dfe95d9702c020afbe5b7b4dbe2019b85432e7a020326adff27e63e3c0a52dc8d4e73247060bbe2c13f000714741903cf96a16baae9c216dc74c75 - languageName: node - linkType: hard - "browserslist@npm:^4.23.1, browserslist@npm:^4.23.3": version: 4.23.3 resolution: "browserslist@npm:4.23.3" @@ -8509,20 +6938,6 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.24.0": - version: 4.24.0 - resolution: "browserslist@npm:4.24.0" - dependencies: - caniuse-lite: "npm:^1.0.30001663" - electron-to-chromium: "npm:^1.5.28" - node-releases: "npm:^2.0.18" - update-browserslist-db: "npm:^1.1.0" - bin: - browserslist: cli.js - checksum: 10/26c1b8ba257a0b51b102080ba9d42945af2abaa8c4cf6da21cd47b3f123fc1e81640203b293214356c2c17d9d265bb3a5ed428b6d302f383576dd6ce8fd5036c - languageName: node - linkType: hard - "bser@npm:^2.0.0": version: 2.1.0 resolution: "bser@npm:2.1.0" @@ -8649,13 +7064,6 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001580": - version: 1.0.30001584 - resolution: "caniuse-lite@npm:1.0.30001584" - checksum: 10/908e4fcafa1e8d52d6c5d79e8c614c4d0cf62af544935f7a78fb5a434157505571ce4c2eacfb549e5d4a6e6e38525350c7a9bf696068ad86eb74e890df1d688f - languageName: node - linkType: hard - "caniuse-lite@npm:^1.0.30001646": version: 1.0.30001658 resolution: "caniuse-lite@npm:1.0.30001658" @@ -8952,6 +7360,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^2.20.0": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: 10/90c5b6898610cd075984c58c4f88418a4fb44af08c1b1415e9854c03171bec31b336b7f3e4cefe33de994b3f12b03c5e2d638da4316df83593b9e82554e7e95b + languageName: node + linkType: hard + "commander@npm:^4.0.0": version: 4.1.1 resolution: "commander@npm:4.1.1" @@ -8966,20 +7381,6 @@ __metadata: languageName: node linkType: hard -"compare-versions@npm:^6.1.1": - version: 6.1.1 - resolution: "compare-versions@npm:6.1.1" - checksum: 10/9325c0fadfba81afa0ec17e6fc2ef823ba785c693089698b8d9374e5460509f1916a88591644d4cb4045c9a58e47fafbcc0724fe8bf446d2a875a3d6eeddf165 - languageName: node - linkType: hard - -"computeds@npm:^0.0.1": - version: 0.0.1 - resolution: "computeds@npm:0.0.1" - checksum: 10/738625ccec6e483124d0ac79ec5474ab5c9df103ea05afc1fd840eed7d9004e3d6009b7bc806df564d66ad915c1ee1fb017bd91b2b32606a252ea9870b6a4026 - languageName: node - linkType: hard - "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -8987,13 +7388,6 @@ __metadata: languageName: node linkType: hard -"confbox@npm:^0.1.7": - version: 0.1.7 - resolution: "confbox@npm:0.1.7" - checksum: 10/3086687b9a2a70d44d4b40a2d376536fe7e1baec4a2a34261b21b8a836026b419cbf89ded6054216631823e7d63c415dad4b4d53591d6edbb202bb9820dfa6fa - languageName: node - linkType: hard - "console-control-strings@npm:^1.0.0, console-control-strings@npm:~1.1.0": version: 1.1.0 resolution: "console-control-strings@npm:1.1.0" @@ -9026,7 +7420,7 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.37.1, core-js-compat@npm:^3.38.0, core-js-compat@npm:^3.38.1": +"core-js-compat@npm:^3.38.0, core-js-compat@npm:^3.38.1": version: 3.38.1 resolution: "core-js-compat@npm:3.38.1" dependencies: @@ -9035,7 +7429,7 @@ __metadata: languageName: node linkType: hard -"core-js@npm:3.38.1": +"core-js@npm:3.38.1, core-js@npm:^3.38.0": version: 3.38.1 resolution: "core-js@npm:3.38.1" checksum: 10/3c25fdf0b2595ed37ceb305213a61e2cf26185f628455e99d1c736dda5f69e2de4de7126e6a1da136f54260c4fcc982c4215e37b5a618790a597930f854c0a37 @@ -9136,15 +7530,6 @@ __metadata: languageName: node linkType: hard -"cssstyle@npm:^4.1.0": - version: 4.1.0 - resolution: "cssstyle@npm:4.1.0" - dependencies: - rrweb-cssom: "npm:^0.7.1" - checksum: 10/8ca9e2d1f1b24f93bb5f3f20a7a1e271e58060957880e985ee55614e196a798ffab309ec6bac105af8a439a6764546761813835ebb7f929d60823637ee838a8f - languageName: node - linkType: hard - "csstype@npm:^3.0.2": version: 3.0.10 resolution: "csstype@npm:3.0.10" @@ -9331,16 +7716,6 @@ __metadata: languageName: node linkType: hard -"data-urls@npm:^5.0.0": - version: 5.0.0 - resolution: "data-urls@npm:5.0.0" - dependencies: - whatwg-mimetype: "npm:^4.0.0" - whatwg-url: "npm:^14.0.0" - checksum: 10/5c40568c31b02641a70204ff233bc4e42d33717485d074244a98661e5f2a1e80e38fe05a5755dfaf2ee549f2ab509d6a3af2a85f4b2ad2c984e5d176695eaf46 - languageName: node - linkType: hard - "data-view-buffer@npm:^1.0.1": version: 1.0.1 resolution: "data-view-buffer@npm:1.0.1" @@ -9427,13 +7802,6 @@ __metadata: languageName: node linkType: hard -"de-indent@npm:^1.0.2": - version: 1.0.2 - resolution: "de-indent@npm:1.0.2" - checksum: 10/30bf43744dca005f9252dbb34ed95dcb3c30dfe52bfed84973b89c29eccff04e27769f222a34c61a93354acf47457785e9032e6184be390ed1d324fb9ab3f427 - languageName: node - linkType: hard - "debug@npm:4": version: 4.3.2 resolution: "debug@npm:4.3.2" @@ -9509,19 +7877,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^4.3.6": - version: 4.3.7 - resolution: "debug@npm:4.3.7" - dependencies: - ms: "npm:^2.1.3" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10/71168908b9a78227ab29d5d25fe03c5867750e31ce24bf2c44a86efc5af041758bb56569b0a3d48a9b5344c00a24a777e6f4100ed6dfd9534a42c1dde285125a - languageName: node - linkType: hard - -"decimal.js@npm:^10.4.2, decimal.js@npm:^10.4.3": +"decimal.js@npm:^10.4.2": version: 10.4.3 resolution: "decimal.js@npm:10.4.3" checksum: 10/de663a7bc4d368e3877db95fcd5c87b965569b58d16cdc4258c063d231ca7118748738df17cd638f7e9dd0be8e34cec08d7234b20f1f2a756a52fc5a38b188d0 @@ -9721,86 +8077,6 @@ __metadata: languageName: node linkType: hard -"design-system@npm:1.0.0, design-system@workspace:design-system": - version: 0.0.0-use.local - resolution: "design-system@workspace:design-system" - dependencies: - "@babel/core": "npm:7.25.2" - "@babel/plugin-transform-react-jsx": "npm:7.25.2" - "@babel/preset-env": "npm:7.25.4" - "@babel/preset-typescript": "npm:7.24.7" - "@emotion/babel-plugin": "npm:11.12.0" - "@emotion/babel-plugin-jsx-pragmatic": "npm:0.3.0" - "@sonarsource/echoes-react": "npm:0.9.0" - "@testing-library/dom": "npm:10.4.0" - "@testing-library/jest-dom": "npm:6.5.0" - "@testing-library/react": "npm:16.0.1" - "@testing-library/user-event": "npm:14.5.2" - "@types/d3-array": "npm:3.2.1" - "@types/d3-hierarchy": "npm:3.1.7" - "@types/d3-shape": "npm:3.1.6" - "@types/d3-zoom": "npm:3.0.8" - "@types/lodash": "npm:4.17.9" - "@types/react": "npm:18.3.11" - "@types/react-highlight-words": "npm:0.20.0" - "@types/react-modal": "npm:3.16.3" - "@types/react-virtualized": "npm:9.21.30" - "@typescript-eslint/parser": "npm:7.18.0" - "@vitejs/plugin-react": "npm:4.3.2" - autoprefixer: "npm:10.4.20" - dd-trace: "npm:5.23.0" - eslint: "npm:8.57.1" - eslint-plugin-header: "npm:3.1.1" - eslint-plugin-import: "npm:2.30.0" - eslint-plugin-local-rules: "npm:3.0.2" - eslint-plugin-typescript-sort-keys: "npm:3.2.0" - highlight.js: "npm:11.10.0" - highlightjs-apex: "npm:1.4.0" - highlightjs-cobol: "npm:0.3.3" - highlightjs-sap-abap: "npm:0.3.0" - history: "npm:5.3.0" - jest: "npm:29.7.0" - postcss: "npm:8.4.47" - postcss-calc: "npm:10.0.2" - prettier: "npm:3.3.3" - prettier-plugin-organize-imports: "npm:4.1.0" - react-toastify: "npm:10.0.5" - twin.macro: "npm:3.4.1" - typescript: "npm:5.6.2" - vite: "npm:5.4.8" - vite-plugin-dts: "npm:4.2.3" - whatwg-fetch: "npm:3.6.20" - peerDependencies: - "@emotion/react": 11.11.4 - "@emotion/styled": 11.13.0 - "@primer/octicons-react": 19.11.0 - "@types/dompurify": 3.0.5 - classnames: 2.5.1 - clipboard: 2.0.11 - d3-array: 3.2.4 - d3-hierarchy: 3.1.2 - d3-scale: 4.0.2 - d3-selection: 3.0.0 - d3-shape: 3.2.0 - d3-zoom: 3.0.0 - date-fns: 4.1.0 - dompurify: 3.1.7 - lodash: 4.17.21 - react: 18.3.1 - react-day-picker: 8.10.0 - react-dom: 18.3.1 - react-helmet-async: 2.0.4 - react-highlight-words: 0.20.0 - react-intl: 6.6.8 - react-joyride: 2.8.2 - react-modal: 3.16.1 - react-router-dom: 6.26.1 - react-select: 5.7.7 - react-virtualized: 9.22.5 - tailwindcss: 3.4.10 - languageName: unknown - linkType: soft - "detect-newline@npm:^3.0.0": version: 3.1.0 resolution: "detect-newline@npm:3.1.0" @@ -9961,13 +8237,6 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.648": - version: 1.4.656 - resolution: "electron-to-chromium@npm:1.4.656" - checksum: 10/7e7dc661fb7b7d367e302df93900bba270f72f4c8a5ee683e3739a7e29bed5e63d3e1a5eeb21ce13c2baece6e2ee37d8d34e25d5b5967859c334031bf1c347a5 - languageName: node - linkType: hard - "electron-to-chromium@npm:^1.5.28": version: 1.5.36 resolution: "electron-to-chromium@npm:1.5.36" @@ -10019,13 +8288,6 @@ __metadata: languageName: node linkType: hard -"entities@npm:^4.5.0": - version: 4.5.0 - resolution: "entities@npm:4.5.0" - checksum: 10/ede2a35c9bce1aeccd055a1b445d41c75a14a2bb1cd22e242f20cf04d236cdcd7f9c859eb83f76885327bfae0c25bf03303665ee1ce3d47c5927b98b0e3e3d48 - languageName: node - linkType: hard - "env-paths@npm:^2.2.0": version: 2.2.1 resolution: "env-paths@npm:2.2.1" @@ -10919,13 +9181,6 @@ __metadata: languageName: node linkType: hard -"estree-walker@npm:^2.0.2": - version: 2.0.2 - resolution: "estree-walker@npm:2.0.2" - checksum: 10/b02109c5d46bc2ed47de4990eef770f7457b1159a229f0999a09224d2b85ffeed2d7679cffcff90aeb4448e94b0168feb5265b209cdec29aad50a3d6e93d21e2 - languageName: node - linkType: hard - "esutils@npm:^2.0.2": version: 2.0.2 resolution: "esutils@npm:2.0.2" @@ -11072,13 +9327,6 @@ __metadata: languageName: node linkType: hard -"fast-uri@npm:^3.0.1": - version: 3.0.2 - resolution: "fast-uri@npm:3.0.2" - checksum: 10/99224f0198e24a4072b9a8a25fc5fa553aa0153e00d29d41272096a6d97be417c9faa5978682868cbba46b09066dc9348563c7244057f3818067e7737db153b2 - languageName: node - linkType: hard - "fastq@npm:^1.6.0": version: 1.10.0 resolution: "fastq@npm:1.10.0" @@ -11246,17 +9494,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:~7.0.1": - version: 7.0.1 - resolution: "fs-extra@npm:7.0.1" - dependencies: - graceful-fs: "npm:^4.1.2" - jsonfile: "npm:^4.0.0" - universalify: "npm:^0.1.0" - checksum: 10/3fc6e56ba2f07c00d452163f27f21a7076b72ef7da8a50fef004336d59ef4c34deda11d10ecd73fd8fbcf20e4f575f52857293090b3c9f8741d4e0598be30fea - languageName: node - linkType: hard - "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -11589,13 +9826,6 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.2": - version: 4.2.10 - resolution: "graceful-fs@npm:4.2.10" - checksum: 10/0c83c52b62c68a944dcfb9d66b0f9f10f7d6e3d081e8067b9bfdc9e5f3a8896584d576036f82915773189eec1eba599397fc620e75c03c0610fb3d67c6713c1a - languageName: node - linkType: hard - "graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.6": version: 4.2.8 resolution: "graceful-fs@npm:4.2.8" @@ -11798,15 +10028,6 @@ __metadata: languageName: node linkType: hard -"he@npm:^1.2.0": - version: 1.2.0 - resolution: "he@npm:1.2.0" - bin: - he: bin/he - checksum: 10/d09b2243da4e23f53336e8de3093e5c43d2c39f8d0d18817abfa32ce3e9355391b2edb4bb5edc376aea5d4b0b59d6a0482aab4c52bc02ef95751e4b818e847f1 - languageName: node - linkType: hard - "highlight-words-core@npm:^1.2.0": version: 1.2.2 resolution: "highlight-words-core@npm:1.2.2" @@ -11874,15 +10095,6 @@ __metadata: languageName: node linkType: hard -"html-encoding-sniffer@npm:^4.0.0": - version: 4.0.0 - resolution: "html-encoding-sniffer@npm:4.0.0" - dependencies: - whatwg-encoding: "npm:^3.1.1" - checksum: 10/e86efd493293a5671b8239bd099d42128433bb3c7b0fdc7819282ef8e118a21f5dead0ad6f358e024a4e5c84f17ebb7a9b36075220fac0a6222b207248bede6f - languageName: node - linkType: hard - "html-escaper@npm:^2.0.0": version: 2.0.0 resolution: "html-escaper@npm:2.0.0" @@ -11926,16 +10138,6 @@ __metadata: languageName: node linkType: hard -"http-proxy-agent@npm:^7.0.2": - version: 7.0.2 - resolution: "http-proxy-agent@npm:7.0.2" - dependencies: - agent-base: "npm:^7.1.0" - debug: "npm:^4.3.4" - checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 - languageName: node - linkType: hard - "http-proxy@npm:1.18.1": version: 1.18.1 resolution: "http-proxy@npm:1.18.1" @@ -11967,16 +10169,6 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^7.0.5": - version: 7.0.5 - resolution: "https-proxy-agent@npm:7.0.5" - dependencies: - agent-base: "npm:^7.0.2" - debug: "npm:4" - checksum: 10/6679d46159ab3f9a5509ee80c3a3fc83fba3a920a5e18d32176c3327852c3c00ad640c0c4210a8fd70ea3c4a6d3a1b375bf01942516e7df80e2646bdc77658ab - languageName: node - linkType: hard - "human-signals@npm:^2.1.0": version: 2.1.0 resolution: "human-signals@npm:2.1.0" @@ -12052,13 +10244,6 @@ __metadata: languageName: node linkType: hard -"import-lazy@npm:~4.0.0": - version: 4.0.0 - resolution: "import-lazy@npm:4.0.0" - checksum: 10/943309cc8eb01ada12700448c288b0384f77a1bc33c7e00fa4cb223c665f467a13ce9aaceb8d2e4cf586b07c1d2828040263dcc069873ce63cfc2ac6fd087971 - languageName: node - linkType: hard - "import-local@npm:^3.0.2": version: 3.0.2 resolution: "import-local@npm:3.0.2" @@ -13466,13 +11651,6 @@ __metadata: languageName: node linkType: hard -"jju@npm:~1.4.0": - version: 1.4.0 - resolution: "jju@npm:1.4.0" - checksum: 10/1067ff8ce02221faac5a842116ed0ec79a53312a111d0bf8342a80bd02c0a3fdf0b8449694a65947db0a3e8420e8b326dffb489c7dd5866efc380c0d1708a707 - languageName: node - linkType: hard - "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -13503,40 +11681,6 @@ __metadata: languageName: node linkType: hard -"jsdom@npm:25.0.1": - version: 25.0.1 - resolution: "jsdom@npm:25.0.1" - dependencies: - cssstyle: "npm:^4.1.0" - data-urls: "npm:^5.0.0" - decimal.js: "npm:^10.4.3" - form-data: "npm:^4.0.0" - html-encoding-sniffer: "npm:^4.0.0" - http-proxy-agent: "npm:^7.0.2" - https-proxy-agent: "npm:^7.0.5" - is-potential-custom-element-name: "npm:^1.0.1" - nwsapi: "npm:^2.2.12" - parse5: "npm:^7.1.2" - rrweb-cssom: "npm:^0.7.1" - saxes: "npm:^6.0.0" - symbol-tree: "npm:^3.2.4" - tough-cookie: "npm:^5.0.0" - w3c-xmlserializer: "npm:^5.0.0" - webidl-conversions: "npm:^7.0.0" - whatwg-encoding: "npm:^3.1.1" - whatwg-mimetype: "npm:^4.0.0" - whatwg-url: "npm:^14.0.0" - ws: "npm:^8.18.0" - xml-name-validator: "npm:^5.0.0" - peerDependencies: - canvas: ^2.11.2 - peerDependenciesMeta: - canvas: - optional: true - checksum: 10/e6bf7250ddd2fbcf68da0ea041a0dc63545dc4bf77fa3ff40a46ae45b1dac1ca55b87574ab904d1f8baeeb547c52cec493a22f545d7d413b320011f41150ec49 - languageName: node - linkType: hard - "jsdom@npm:^20.0.0": version: 20.0.3 resolution: "jsdom@npm:20.0.3" @@ -13624,13 +11768,6 @@ __metadata: languageName: node linkType: hard -"json-schema-traverse@npm:^1.0.0": - version: 1.0.0 - resolution: "json-schema-traverse@npm:1.0.0" - checksum: 10/02f2f466cdb0362558b2f1fd5e15cce82ef55d60cd7f8fa828cf35ba74330f8d767fcae5c5c2adb7851fa811766c694b9405810879bc4e1ddd78a7c0e03658ad - languageName: node - linkType: hard - "json-schema@npm:^0.4.0": version: 0.4.0 resolution: "json-schema@npm:0.4.0" @@ -13685,25 +11822,6 @@ __metadata: languageName: node linkType: hard -"jsonc-parser@npm:^3.2.0": - version: 3.2.0 - resolution: "jsonc-parser@npm:3.2.0" - checksum: 10/bd68b902e5f9394f01da97921f49c5084b2dc03a0c5b4fdb2a429f8d6f292686c1bf87badaeb0a8148d024192a88f5ad2e57b2918ba43fe25cf15f3371db64d4 - languageName: node - linkType: hard - -"jsonfile@npm:^4.0.0": - version: 4.0.0 - resolution: "jsonfile@npm:4.0.0" - dependencies: - graceful-fs: "npm:^4.1.6" - dependenciesMeta: - graceful-fs: - optional: true - checksum: 10/17796f0ab1be8479827d3683433f97ebe0a1c6932c3360fa40348eac36904d69269aab26f8b16da311882d94b42e9208e8b28e490bf926364f3ac9bff134c226 - languageName: node - linkType: hard - "jsonfile@npm:^6.0.1": version: 6.1.0 resolution: "jsonfile@npm:6.1.0" @@ -13767,13 +11885,6 @@ __metadata: languageName: node linkType: hard -"kolorist@npm:^1.8.0": - version: 1.8.0 - resolution: "kolorist@npm:1.8.0" - checksum: 10/71d5d122951cc65f2f14c3e1d7f8fd91694b374647d4f6deec3816d018cd04a44edd9578d93e00c82c2053b925e5d30a0565746c4171f4ca9fce1a13bd5f3315 - languageName: node - linkType: hard - "language-subtag-registry@npm:^0.3.20": version: 0.3.22 resolution: "language-subtag-registry@npm:0.3.22" @@ -13845,16 +11956,6 @@ __metadata: languageName: node linkType: hard -"local-pkg@npm:^0.5.0": - version: 0.5.0 - resolution: "local-pkg@npm:0.5.0" - dependencies: - mlly: "npm:^1.4.2" - pkg-types: "npm:^1.0.3" - checksum: 10/20f4caba50dc6fb00ffcc1a78bc94b5acb33995e0aadf4d4edcdeab257e891aa08f50afddf02f3240b2c3d02432bc2078f2a916a280ed716b64753a3d250db70 - languageName: node - linkType: hard - "locate-path@npm:^5.0.0": version: 5.0.0 resolution: "locate-path@npm:5.0.0" @@ -13908,7 +12009,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4.17.21, lodash@npm:^4.17.11, lodash@npm:^4.17.13, lodash@npm:^4.17.21, lodash@npm:~4.17.15, lodash@npm:~4.17.21": +"lodash@npm:4.17.21, lodash@npm:^4.17.11, lodash@npm:^4.17.13, lodash@npm:^4.17.21, lodash@npm:~4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 10/c08619c038846ea6ac754abd6dd29d2568aa705feb69339e836dfa8d8b09abbb2f859371e86863eda41848221f9af43714491467b5b0299122431e202bb0c532 @@ -14500,15 +12601,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.3": - version: 9.0.3 - resolution: "minimatch@npm:9.0.3" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10/c81b47d28153e77521877649f4bab48348d10938df9e8147a58111fe00ef89559a2938de9f6632910c4f7bf7bb5cd81191a546167e58d357f0cfb1e18cecc1c5 - languageName: node - linkType: hard - "minimatch@npm:^9.0.4": version: 9.0.5 resolution: "minimatch@npm:9.0.5" @@ -14518,15 +12610,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:~3.0.3": - version: 3.0.8 - resolution: "minimatch@npm:3.0.8" - dependencies: - brace-expansion: "npm:^1.1.7" - checksum: 10/6df5373cb1ea79020beb6887ff5576c58cfabcfd32c5a65c2cf58f326e4ee8eae84f129e5fa50b8a4347fa1d1e583f931285c9fb3040d984bdfb5109ef6607ec - languageName: node - linkType: hard - "minimist@npm:>=1.2.6": version: 1.2.8 resolution: "minimist@npm:1.2.8" @@ -14627,18 +12710,6 @@ __metadata: languageName: node linkType: hard -"mlly@npm:^1.4.2, mlly@npm:^1.7.1": - version: 1.7.1 - resolution: "mlly@npm:1.7.1" - dependencies: - acorn: "npm:^8.11.3" - pathe: "npm:^1.1.2" - pkg-types: "npm:^1.1.1" - ufo: "npm:^1.5.3" - checksum: 10/c1ef3989e95fb6c6c27a238330897b01f46507020501f45a681f2cae453f982e38dcb0e45aa65f672ea7280945d4a729d266f17a8acb187956f312b0cafddf61 - languageName: node - linkType: hard - "module-details-from-path@npm:^1.0.3": version: 1.0.3 resolution: "module-details-from-path@npm:1.0.3" @@ -14660,7 +12731,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:^2.0.0, ms@npm:^2.1.3": +"ms@npm:^2.0.0": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d @@ -14681,13 +12752,6 @@ __metadata: languageName: node linkType: hard -"muggle-string@npm:^0.4.1": - version: 0.4.1 - resolution: "muggle-string@npm:0.4.1" - checksum: 10/8fa2ea08f497c04069718bd3fd1909b382114dacbad832d10967ca72690de43f5f8492d8ccfbf827d6be63868ed5fc10395e7b7c082aa95997eea498586c6620 - languageName: node - linkType: hard - "mz@npm:^2.7.0": version: 2.7.0 resolution: "mz@npm:2.7.0" @@ -14803,13 +12867,6 @@ __metadata: languageName: node linkType: hard -"node-releases@npm:^2.0.14": - version: 2.0.14 - resolution: "node-releases@npm:2.0.14" - checksum: 10/0f7607ec7db5ef1dc616899a5f24ae90c869b6a54c2d4f36ff6d84a282ab9343c7ff3ca3670fe4669171bb1e8a9b3e286e1ef1c131f09a83d70554f855d54f24 - languageName: node - linkType: hard - "node-releases@npm:^2.0.18": version: 2.0.18 resolution: "node-releases@npm:2.0.18" @@ -14877,13 +12934,6 @@ __metadata: languageName: node linkType: hard -"nwsapi@npm:^2.2.12": - version: 2.2.13 - resolution: "nwsapi@npm:2.2.13" - checksum: 10/f7f30a236f2ee513ea8042f1a987481dc2b900167c47f7163882f0fcfe7ccb57b5c8daaf2c91008dc20a204fcd79e050aee25001433ad99990bbed5a8c74121c - languageName: node - linkType: hard - "nwsapi@npm:^2.2.2": version: 2.2.2 resolution: "nwsapi@npm:2.2.2" @@ -15216,7 +13266,7 @@ __metadata: languageName: node linkType: hard -"parse5@npm:^7.0.0, parse5@npm:^7.1.1, parse5@npm:^7.1.2": +"parse5@npm:^7.0.0, parse5@npm:^7.1.1": version: 7.1.2 resolution: "parse5@npm:7.1.2" dependencies: @@ -15225,7 +13275,7 @@ __metadata: languageName: node linkType: hard -"path-browserify@npm:1.0.1, path-browserify@npm:^1.0.1": +"path-browserify@npm:1.0.1": version: 1.0.1 resolution: "path-browserify@npm:1.0.1" checksum: 10/7e7368a5207e7c6b9051ef045711d0dc3c2b6203e96057e408e6e74d09f383061010d2be95cb8593fe6258a767c3e9fc6b2bfc7ce8d48ae8c3d9f6994cca9ad8 @@ -15274,13 +13324,6 @@ __metadata: languageName: node linkType: hard -"pathe@npm:^1.1.2": - version: 1.1.2 - resolution: "pathe@npm:1.1.2" - checksum: 10/f201d796351bf7433d147b92c20eb154a4e0ea83512017bf4ec4e492a5d6e738fb45798be4259a61aa81270179fce11026f6ff0d3fa04173041de044defe9d80 - languageName: node - linkType: hard - "picocolors@npm:^1.0.0": version: 1.0.0 resolution: "picocolors@npm:1.0.0" @@ -15346,17 +13389,6 @@ __metadata: languageName: node linkType: hard -"pkg-types@npm:^1.0.3, pkg-types@npm:^1.1.1": - version: 1.2.0 - resolution: "pkg-types@npm:1.2.0" - dependencies: - confbox: "npm:^0.1.7" - mlly: "npm:^1.7.1" - pathe: "npm:^1.1.2" - checksum: 10/ed732842b86260395b82e31afc0dd8316e74642a78754ad148a5500ca5537565c6dfbd6c80c2dc92077afc1beb471b05a85a9572089cc8a1bba82248c331bf45 - languageName: node - linkType: hard - "popper.js@npm:^1.16.0": version: 1.16.1 resolution: "popper.js@npm:1.16.1" @@ -15709,13 +13741,6 @@ __metadata: languageName: node linkType: hard -"punycode@npm:^2.3.1": - version: 2.3.1 - resolution: "punycode@npm:2.3.1" - checksum: 10/febdc4362bead22f9e2608ff0171713230b57aff9dddc1c273aa2a651fbd366f94b7d6a71d78342a7c0819906750351ca7f2edd26ea41b626d87d6a13d1bd059 - languageName: node - linkType: hard - "pure-rand@npm:^6.0.0": version: 6.0.1 resolution: "pure-rand@npm:6.0.1" @@ -16229,7 +14254,7 @@ __metadata: languageName: node linkType: hard -"regenerator-runtime@npm:0.14.1, regenerator-runtime@npm:^0.14.0": +"regenerator-runtime@npm:0.14.1, regenerator-runtime@npm:^0.14.0, regenerator-runtime@npm:^0.14.1": version: 0.14.1 resolution: "regenerator-runtime@npm:0.14.1" checksum: 10/5db3161abb311eef8c45bcf6565f4f378f785900ed3945acf740a9888c792f75b98ecb77f0775f3bf95502ff423529d23e94f41d80c8256e8fa05ed4b07cf471 @@ -16379,13 +14404,6 @@ __metadata: languageName: node linkType: hard -"require-from-string@npm:^2.0.2": - version: 2.0.2 - resolution: "require-from-string@npm:2.0.2" - checksum: 10/839a3a890102a658f4cb3e7b2aa13a1f80a3a976b512020c3d1efc418491c48a886b6e481ea56afc6c4cb5eef678f23b2a4e70575e7534eccadf5e30ed2e56eb - languageName: node - linkType: hard - "requireindex@npm:^1.2.0": version: 1.2.0 resolution: "requireindex@npm:1.2.0" @@ -16430,7 +14448,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.7, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:~1.22.1": +"resolve@npm:^1.1.7, resolve@npm:^1.14.2, resolve@npm:^1.19.0": version: 1.22.1 resolution: "resolve@npm:1.22.1" dependencies: @@ -16469,7 +14487,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.22.4, resolve@npm:~1.22.2": +"resolve@npm:^1.22.4": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -16495,7 +14513,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.7#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A~1.22.1#optional!builtin<compat/resolve>": +"resolve@patch:resolve@npm%3A^1.1.7#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin<compat/resolve>": version: 1.22.1 resolution: "resolve@patch:resolve@npm%3A1.22.1#optional!builtin<compat/resolve>::version=1.22.1&hash=c3c19d" dependencies: @@ -16534,7 +14552,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.22.4#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A~1.22.2#optional!builtin<compat/resolve>": +"resolve@patch:resolve@npm%3A^1.22.4#optional!builtin<compat/resolve>": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin<compat/resolve>::version=1.22.8&hash=c3c19d" dependencies: @@ -16699,13 +14717,6 @@ __metadata: languageName: node linkType: hard -"rrweb-cssom@npm:^0.7.1": - version: 0.7.1 - resolution: "rrweb-cssom@npm:0.7.1" - checksum: 10/e80cf25c223a823921d7ab57c0ce78f5b7ebceab857b400cce99dd4913420ce679834bc5707e8ada47d062e21ad368108a9534c314dc8d72c20aa4a4fa0ed16a - languageName: node - linkType: hard - "run-parallel@npm:^1.1.9": version: 1.1.10 resolution: "run-parallel@npm:1.1.10" @@ -16873,7 +14884,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:~7.5.4": +"semver@npm:^7.5.3, semver@npm:^7.5.4": version: 7.5.4 resolution: "semver@npm:7.5.4" dependencies: @@ -17100,6 +15111,16 @@ __metadata: languageName: node linkType: hard +"source-map-support@npm:~0.5.20": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/8317e12d84019b31e34b86d483dd41d6f832f389f7417faf8fc5c75a66a12d9686e47f589a0554a868b8482f037e23df9d040d29387eb16fa14cb85f091ba207 + languageName: node + linkType: hard + "source-map@npm:^0.5.0, source-map@npm:^0.5.7": version: 0.5.7 resolution: "source-map@npm:0.5.7" @@ -17240,13 +15261,6 @@ __metadata: languageName: node linkType: hard -"string-argv@npm:~0.3.1": - version: 0.3.1 - resolution: "string-argv@npm:0.3.1" - checksum: 10/47c637e3f47b3f5a6430036315e65564483fcf7745341d474943f0c2046f188681275fc1f2948db75c7a7e68134b1446e0dcceda60a7be1ee0c3fb026c0d90c4 - languageName: node - linkType: hard - "string-length@npm:^4.0.1": version: 4.0.2 resolution: "string-length@npm:4.0.2" @@ -17565,7 +15579,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": +"strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 @@ -17638,7 +15652,7 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^8.0.0, supports-color@npm:~8.1.1": +"supports-color@npm:^8.0.0": version: 8.1.1 resolution: "supports-color@npm:8.1.1" dependencies: @@ -17661,6 +15675,13 @@ __metadata: languageName: node linkType: hard +"systemjs@npm:^6.15.1": + version: 6.15.1 + resolution: "systemjs@npm:6.15.1" + checksum: 10/9454c32515cdf7b033cac547233b161d6154abc020a1a97afc8654a01d63cf2bc51101869807aa7f8529aae98475a2cb4522c1e31da6d33832c8e12f00ee4e18 + languageName: node + linkType: hard + "tabbable@npm:^6.0.0": version: 6.2.0 resolution: "tabbable@npm:6.2.0" @@ -17715,6 +15736,20 @@ __metadata: languageName: node linkType: hard +"terser@npm:5.36.0": + version: 5.36.0 + resolution: "terser@npm:5.36.0" + dependencies: + "@jridgewell/source-map": "npm:^0.3.3" + acorn: "npm:^8.8.2" + commander: "npm:^2.20.0" + source-map-support: "npm:~0.5.20" + bin: + terser: bin/terser + checksum: 10/52e641419f79d7ccdecd136b9a8e0b03f93cfe3b53cce556253aaabc347d3f2af1745419b9e622abc95d592084dc76e57774b8f9e68d29d543f4dd11c044daf4 + languageName: node + linkType: hard + "test-exclude@npm:^6.0.0": version: 6.0.0 resolution: "test-exclude@npm:6.0.0" @@ -17765,24 +15800,6 @@ __metadata: languageName: node linkType: hard -"tldts-core@npm:^6.1.48": - version: 6.1.48 - resolution: "tldts-core@npm:6.1.48" - checksum: 10/981a431a65e9514f2cf25513743b19b799502f2e2b074ce3294a247f9c5eef784c3025d2fdc47d727e7badf885d96fc85fe604e70300670265f94f4760039641 - languageName: node - linkType: hard - -"tldts@npm:^6.1.32": - version: 6.1.48 - resolution: "tldts@npm:6.1.48" - dependencies: - tldts-core: "npm:^6.1.48" - bin: - tldts: bin/cli.js - checksum: 10/0b29a7a5190c7b96c29e7cd2fadfe528b593871c0cf4601f3f2ac13cd218de7b66d972d53101769b167fa023950498f7e3df092f167d30e03bea0f0eb7fbf720 - languageName: node - linkType: hard - "tlhunter-sorted-set@npm:^0.1.0": version: 0.1.0 resolution: "tlhunter-sorted-set@npm:0.1.0" @@ -17825,15 +15842,6 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:^5.0.0": - version: 5.0.0 - resolution: "tough-cookie@npm:5.0.0" - dependencies: - tldts: "npm:^6.1.32" - checksum: 10/a98d3846ed386e399e8b470c1eb08a6a296944246eabc55c9fe79d629bd2cdaa62f5a6572f271fe0060987906bd20468d72a219a3b4cbe51086bea48d2d677b6 - languageName: node - linkType: hard - "tr46@npm:^3.0.0": version: 3.0.0 resolution: "tr46@npm:3.0.0" @@ -17843,15 +15851,6 @@ __metadata: languageName: node linkType: hard -"tr46@npm:^5.0.0": - version: 5.0.0 - resolution: "tr46@npm:5.0.0" - dependencies: - punycode: "npm:^2.3.1" - checksum: 10/29155adb167d048d3c95d181f7cb5ac71948b4e8f3070ec455986e1f34634acae50ae02a3c8d448121c3afe35b76951cd46ed4c128fd80264280ca9502237a3e - languageName: node - linkType: hard - "tree-changes@npm:^0.11.2": version: 0.11.2 resolution: "tree-changes@npm:0.11.2" @@ -17953,77 +15952,6 @@ __metadata: languageName: node linkType: hard -"turbo-darwin-64@npm:2.1.3": - version: 2.1.3 - resolution: "turbo-darwin-64@npm:2.1.3" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"turbo-darwin-arm64@npm:2.1.3": - version: 2.1.3 - resolution: "turbo-darwin-arm64@npm:2.1.3" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"turbo-linux-64@npm:2.1.3": - version: 2.1.3 - resolution: "turbo-linux-64@npm:2.1.3" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"turbo-linux-arm64@npm:2.1.3": - version: 2.1.3 - resolution: "turbo-linux-arm64@npm:2.1.3" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"turbo-windows-64@npm:2.1.3": - version: 2.1.3 - resolution: "turbo-windows-64@npm:2.1.3" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"turbo-windows-arm64@npm:2.1.3": - version: 2.1.3 - resolution: "turbo-windows-arm64@npm:2.1.3" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"turbo@npm:2.1.3": - version: 2.1.3 - resolution: "turbo@npm:2.1.3" - dependencies: - turbo-darwin-64: "npm:2.1.3" - turbo-darwin-arm64: "npm:2.1.3" - turbo-linux-64: "npm:2.1.3" - turbo-linux-arm64: "npm:2.1.3" - turbo-windows-64: "npm:2.1.3" - turbo-windows-arm64: "npm:2.1.3" - dependenciesMeta: - turbo-darwin-64: - optional: true - turbo-darwin-arm64: - optional: true - turbo-linux-64: - optional: true - turbo-linux-arm64: - optional: true - turbo-windows-64: - optional: true - turbo-windows-arm64: - optional: true - bin: - turbo: bin/turbo - checksum: 10/b8e90a38f47dc5c07e5f1c0bd708f9dc6b00b744847a45c06e5de5a5379a32bb155e8ad994eb03e60f697afc87f0815dd02fc680e22c0fad83d65c0a1fb6fc96 - languageName: node - linkType: hard - "twin.macro@npm:3.4.1": version: 3.4.1 resolution: "twin.macro@npm:3.4.1" @@ -18192,16 +16120,6 @@ __metadata: languageName: node linkType: hard -"typescript@npm:5.4.2": - version: 5.4.2 - resolution: "typescript@npm:5.4.2" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/f8cfdc630ab1672f004e9561eb2916935b2d267792d07ce93e97fc601c7a65191af32033d5e9c0169b7dc37da7db9bf320f7432bc84527cb7697effaa4e4559d - languageName: node - linkType: hard - "typescript@npm:5.6.2": version: 5.6.2 resolution: "typescript@npm:5.6.2" @@ -18212,16 +16130,6 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.4.2#optional!builtin<compat/typescript>": - version: 5.4.2 - resolution: "typescript@patch:typescript@npm%3A5.4.2#optional!builtin<compat/typescript>::version=5.4.2&hash=5adc0c" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/f5f9a4133c2670761f0166eae5b3bafbc4a3fc24f0f42a93c9c893d9e9d6e66ea066969c5e7483fa66b4ae0e99125592553f3b92fd3599484de8be13b0615176 - languageName: node - linkType: hard - "typescript@patch:typescript@npm%3A5.6.2#optional!builtin<compat/typescript>": version: 5.6.2 resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin<compat/typescript>::version=5.6.2&hash=b45daf" @@ -18232,13 +16140,6 @@ __metadata: languageName: node linkType: hard -"ufo@npm:^1.5.3": - version: 1.5.4 - resolution: "ufo@npm:1.5.4" - checksum: 10/a885ed421e656aea6ca64e9727b8118a9488715460b6f1a0f0427118adfe2f2830fe7c1d5bd9c5c754a332e6807516551cd663ea67ce9ed6a4e3edc739916335 - languageName: node - linkType: hard - "unbox-primitive@npm:^1.0.1": version: 1.0.1 resolution: "unbox-primitive@npm:1.0.1" @@ -18399,13 +16300,6 @@ __metadata: languageName: node linkType: hard -"universalify@npm:^0.1.0": - version: 0.1.2 - resolution: "universalify@npm:0.1.2" - checksum: 10/40cdc60f6e61070fe658ca36016a8f4ec216b29bf04a55dce14e3710cc84c7448538ef4dad3728d0bfe29975ccd7bfb5f414c45e7b78883567fb31b246f02dff - languageName: node - linkType: hard - "universalify@npm:^0.2.0": version: 0.2.0 resolution: "universalify@npm:0.2.0" @@ -18434,20 +16328,6 @@ __metadata: languageName: node linkType: hard -"update-browserslist-db@npm:^1.0.13": - version: 1.0.13 - resolution: "update-browserslist-db@npm:1.0.13" - dependencies: - escalade: "npm:^3.1.1" - picocolors: "npm:^1.0.0" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - update-browserslist-db: cli.js - checksum: 10/9074b4ef34d2ed931f27d390aafdd391ee7c45ad83c508e8fed6aaae1eb68f81999a768ed8525c6f88d4001a4fbf1b8c0268f099d0e8e72088ec5945ac796acf - languageName: node - linkType: hard - "update-browserslist-db@npm:^1.0.9": version: 1.0.10 resolution: "update-browserslist-db@npm:1.0.10" @@ -18485,15 +16365,6 @@ __metadata: languageName: node linkType: hard -"uri-js@npm:^4.4.1": - version: 4.4.1 - resolution: "uri-js@npm:4.4.1" - dependencies: - punycode: "npm:^2.1.0" - checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb - languageName: node - linkType: hard - "url-parse@npm:^1.5.3": version: 1.5.10 resolution: "url-parse@npm:1.5.10" @@ -18647,29 +16518,6 @@ __metadata: languageName: node linkType: hard -"vite-plugin-dts@npm:4.2.3": - version: 4.2.3 - resolution: "vite-plugin-dts@npm:4.2.3" - dependencies: - "@microsoft/api-extractor": "npm:7.47.7" - "@rollup/pluginutils": "npm:^5.1.0" - "@volar/typescript": "npm:^2.4.4" - "@vue/language-core": "npm:2.1.6" - compare-versions: "npm:^6.1.1" - debug: "npm:^4.3.6" - kolorist: "npm:^1.8.0" - local-pkg: "npm:^0.5.0" - magic-string: "npm:^0.30.11" - peerDependencies: - typescript: "*" - vite: "*" - peerDependenciesMeta: - vite: - optional: true - checksum: 10/7031d3d2dff9aeb5f9378ec22b9deade7ea95608eb551a028c0232bac66ecfc079f94e9dff46cab5d60a41cbc1913b729f161c666ab305d011e326194514e76c - languageName: node - linkType: hard - "vite-plugin-require-transform@npm:1.0.21": version: 1.0.21 resolution: "vite-plugin-require-transform@npm:1.0.21" @@ -18725,13 +16573,6 @@ __metadata: languageName: node linkType: hard -"vscode-uri@npm:^3.0.8": - version: 3.0.8 - resolution: "vscode-uri@npm:3.0.8" - checksum: 10/e882d6b679e0d053cbc042893c0951a135d899a192b62cd07f0a8924f11ae722067a8d6b1b5b147034becf57faf9fff9fb543b17b749fd0f17db1f54f783f07c - languageName: node - linkType: hard - "w3c-xmlserializer@npm:^4.0.0": version: 4.0.0 resolution: "w3c-xmlserializer@npm:4.0.0" @@ -18741,15 +16582,6 @@ __metadata: languageName: node linkType: hard -"w3c-xmlserializer@npm:^5.0.0": - version: 5.0.0 - resolution: "w3c-xmlserializer@npm:5.0.0" - dependencies: - xml-name-validator: "npm:^5.0.0" - checksum: 10/d78f59e6b4f924aa53b6dfc56949959229cae7fe05ea9374eb38d11edcec01398b7f5d7a12576bd5acc57ff446abb5c9115cd83b9d882555015437cf858d42f0 - languageName: node - linkType: hard - "walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -18784,15 +16616,6 @@ __metadata: languageName: node linkType: hard -"whatwg-encoding@npm:^3.1.1": - version: 3.1.1 - resolution: "whatwg-encoding@npm:3.1.1" - dependencies: - iconv-lite: "npm:0.6.3" - checksum: 10/bbef815eb67f91487c7f2ef96329743f5fd8357d7d62b1119237d25d41c7e452dff8197235b2d3c031365a17f61d3bb73ca49d0ed1582475aa4a670815e79534 - languageName: node - linkType: hard - "whatwg-fetch@npm:3.6.20": version: 3.6.20 resolution: "whatwg-fetch@npm:3.6.20" @@ -18807,13 +16630,6 @@ __metadata: languageName: node linkType: hard -"whatwg-mimetype@npm:^4.0.0": - version: 4.0.0 - resolution: "whatwg-mimetype@npm:4.0.0" - checksum: 10/894a618e2d90bf444b6f309f3ceb6e58cf21b2beaa00c8b333696958c4076f0c7b30b9d33413c9ffff7c5832a0a0c8569e5bb347ef44beded72aeefd0acd62e8 - languageName: node - linkType: hard - "whatwg-url@npm:^11.0.0": version: 11.0.0 resolution: "whatwg-url@npm:11.0.0" @@ -18824,16 +16640,6 @@ __metadata: languageName: node linkType: hard -"whatwg-url@npm:^14.0.0": - version: 14.0.0 - resolution: "whatwg-url@npm:14.0.0" - dependencies: - tr46: "npm:^5.0.0" - webidl-conversions: "npm:^7.0.0" - checksum: 10/67ea7a359a90663b28c816d76379b4be62d13446e9a4c0ae0b5ae0294b1c22577750fcdceb40827bb35a61777b7093056953c856604a28b37d6a209ba59ad062 - languageName: node - linkType: hard - "which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" @@ -19002,21 +16808,6 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.18.0": - version: 8.18.0 - resolution: "ws@npm:8.18.0" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10/70dfe53f23ff4368d46e4c0b1d4ca734db2c4149c6f68bc62cb16fc21f753c47b35fcc6e582f3bdfba0eaeb1c488cddab3c2255755a5c3eecb251431e42b3ff6 - languageName: node - linkType: hard - "xml-name-validator@npm:^4.0.0": version: 4.0.0 resolution: "xml-name-validator@npm:4.0.0" @@ -19024,13 +16815,6 @@ __metadata: languageName: node linkType: hard -"xml-name-validator@npm:^5.0.0": - version: 5.0.0 - resolution: "xml-name-validator@npm:5.0.0" - checksum: 10/43f30f3f6786e406dd665acf08cd742d5f8a46486bd72517edb04b27d1bcd1599664c2a4a99fc3f1e56a3194bff588b12f178b7972bc45c8047bdc4c3ac8d4a1 - languageName: node - linkType: hard - "xml@npm:^1.0.1": version: 1.0.1 resolution: "xml@npm:1.0.1" |