diff options
Diffstat (limited to 'server/sonar-web')
1592 files changed, 3702 insertions, 4201 deletions
diff --git a/server/sonar-web/config/jest/SetupTestEnvironment.ts b/server/sonar-web/config/jest/SetupTestEnvironment.ts index cf53e73e95f..9e3b4e53f86 100644 --- a/server/sonar-web/config/jest/SetupTestEnvironment.ts +++ b/server/sonar-web/config/jest/SetupTestEnvironment.ts @@ -18,10 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as theme from '../../src/main/js/app/theme'; -import ThemeContext from '../../src/main/js/sonar-ui-common/components/theme'; -import SonarUiCommonInitializer, { - DEFAULT_LOCALE -} from '../../src/main/js/sonar-ui-common/helpers/init'; +import ThemeContext from '../../src/main/js/components/theme'; +import SonarUiCommonInitializer, { DEFAULT_LOCALE } from '../../src/main/js/helpers/init'; const content = document.createElement('div'); content.id = 'content'; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/config/jest/testTheme.ts b/server/sonar-web/config/jest/testTheme.ts index d1fffad306b..d1fffad306b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/config/jest/testTheme.ts +++ b/server/sonar-web/config/jest/testTheme.ts 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 7af1a28cd5f..d2849f70b8a 100644 --- a/server/sonar-web/src/main/js/api/alm-integrations.ts +++ b/server/sonar-web/src/main/js/api/alm-integrations.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { get, getJSON, parseError, post, postJSON } from '../sonar-ui-common/helpers/request'; +import { get, getJSON, parseError, post, postJSON } from '../helpers/request'; import { AzureProject, AzureRepository, 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 8e1751e5f49..e1ca7062e85 100644 --- a/server/sonar-web/src/main/js/api/alm-settings.ts +++ b/server/sonar-web/src/main/js/api/alm-settings.ts @@ -18,14 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { - get, - getJSON, - HttpStatus, - parseError, - parseJSON, - post -} from '../sonar-ui-common/helpers/request'; +import { get, getJSON, HttpStatus, parseError, parseJSON, post } from '../helpers/request'; import { AlmSettingsBindingDefinitions, AlmSettingsInstance, diff --git a/server/sonar-web/src/main/js/api/application.ts b/server/sonar-web/src/main/js/api/application.ts index 0eeb3a569f1..42518728ba0 100644 --- a/server/sonar-web/src/main/js/api/application.ts +++ b/server/sonar-web/src/main/js/api/application.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, postJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON } from '../helpers/request'; import { Application, ApplicationPeriod, ApplicationProject } from '../types/application'; import { Visibility } from '../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 f012a7bd381..8783eec3c3e 100644 --- a/server/sonar-web/src/main/js/api/auth.ts +++ b/server/sonar-web/src/main/js/api/auth.ts @@ -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 { request } from '../sonar-ui-common/helpers/request'; +import { request } from '../helpers/request'; export function login(login: string, password: string): Promise<Response> { return request('/api/authentication/login') diff --git a/server/sonar-web/src/main/js/api/branches.ts b/server/sonar-web/src/main/js/api/branches.ts index 6068b643b60..119933c0dcc 100644 --- a/server/sonar-web/src/main/js/api/branches.ts +++ b/server/sonar-web/src/main/js/api/branches.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post } from '../sonar-ui-common/helpers/request'; +import { getJSON, post } from '../helpers/request'; import { Branch, PullRequest } from '../types/branch-like'; export function getBranches(project: string): Promise<Branch[]> { diff --git a/server/sonar-web/src/main/js/api/ce.ts b/server/sonar-web/src/main/js/api/ce.ts index d4f3d15774a..7b612e2317f 100644 --- a/server/sonar-web/src/main/js/api/ce.ts +++ b/server/sonar-web/src/main/js/api/ce.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, RequestData } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, RequestData } from '../helpers/request'; import { IndexationStatus } from '../types/indexation'; import { Task, TaskWarning } from '../types/tasks'; 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 1904c834053..1892928e607 100644 --- a/server/sonar-web/src/main/js/api/component-report.ts +++ b/server/sonar-web/src/main/js/api/component-report.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; +import { getJSON, post } from '../helpers/request'; import { getBaseUrl } from '../helpers/system'; -import { getJSON, post } from '../sonar-ui-common/helpers/request'; import { ComponentReportStatus } from '../types/component-report'; export function getReportStatus( diff --git a/server/sonar-web/src/main/js/api/components.ts b/server/sonar-web/src/main/js/api/components.ts index ec2f147b5af..6d719bceaeb 100644 --- a/server/sonar-web/src/main/js/api/components.ts +++ b/server/sonar-web/src/main/js/api/components.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, postJSON, RequestData } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON, RequestData } from '../helpers/request'; import { BranchParameters } from '../types/branch-like'; import { ComponentQualifier, TreeComponent, TreeComponentWithPath } from '../types/component'; diff --git a/server/sonar-web/src/main/js/api/favorites.ts b/server/sonar-web/src/main/js/api/favorites.ts index e26c51f1814..71c2e509107 100644 --- a/server/sonar-web/src/main/js/api/favorites.ts +++ b/server/sonar-web/src/main/js/api/favorites.ts @@ -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 { getJSON, post } from '../sonar-ui-common/helpers/request'; +import { getJSON, post } from '../helpers/request'; export function getFavorites(): Promise<any> { return getJSON('/api/favorites/search'); 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 8795a2b1900..5ea1c882502 100644 --- a/server/sonar-web/src/main/js/api/issue-filters.ts +++ b/server/sonar-web/src/main/js/api/issue-filters.ts @@ -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 { post } from '../sonar-ui-common/helpers/request'; +import { post } from '../helpers/request'; export function toggleIssueFilter(id: string): Promise<void> { return post('/issues/toggle_fav', { id }); diff --git a/server/sonar-web/src/main/js/api/issues.ts b/server/sonar-web/src/main/js/api/issues.ts index 9b6f002166d..b590509351d 100644 --- a/server/sonar-web/src/main/js/api/issues.ts +++ b/server/sonar-web/src/main/js/api/issues.ts @@ -19,7 +19,7 @@ */ import throwGlobalError from '../app/utils/throwGlobalError'; import getCoverageStatus from '../components/SourceViewer/helpers/getCoverageStatus'; -import { getJSON, post, postJSON, RequestData } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON, RequestData } from '../helpers/request'; import { IssueResponse, RawIssuesResponse } from '../types/issues'; type FacetName = diff --git a/server/sonar-web/src/main/js/api/l10n.ts b/server/sonar-web/src/main/js/api/l10n.ts index 579af9e9f82..4440711bd7d 100644 --- a/server/sonar-web/src/main/js/api/l10n.ts +++ b/server/sonar-web/src/main/js/api/l10n.ts @@ -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 { getJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON } from '../helpers/request'; import { L10nBundleRequestParams, L10nBundleRequestResponse } from '../types/l10n'; export function fetchL10nBundle( diff --git a/server/sonar-web/src/main/js/api/languages.ts b/server/sonar-web/src/main/js/api/languages.ts index 595254caee7..603acf899ca 100644 --- a/server/sonar-web/src/main/js/api/languages.ts +++ b/server/sonar-web/src/main/js/api/languages.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON } from '../helpers/request'; export function getLanguages(): Promise<T.Language[]> { return getJSON('/api/languages/list').then(r => r.languages, throwGlobalError); diff --git a/server/sonar-web/src/main/js/api/marketplace.ts b/server/sonar-web/src/main/js/api/marketplace.ts index bbc418631d7..5300259fc5f 100644 --- a/server/sonar-web/src/main/js/api/marketplace.ts +++ b/server/sonar-web/src/main/js/api/marketplace.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON } from '../helpers/request'; export interface License { contactEmail: string; diff --git a/server/sonar-web/src/main/js/api/measures.ts b/server/sonar-web/src/main/js/api/measures.ts index 77f6c9e820d..482af37a61b 100644 --- a/server/sonar-web/src/main/js/api/measures.ts +++ b/server/sonar-web/src/main/js/api/measures.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON } from '../helpers/request'; import { BranchParameters } from '../types/branch-like'; import { MeasuresAndMetaWithMetrics, diff --git a/server/sonar-web/src/main/js/api/metrics.ts b/server/sonar-web/src/main/js/api/metrics.ts index bb59e319c18..b6230b51b7e 100644 --- a/server/sonar-web/src/main/js/api/metrics.ts +++ b/server/sonar-web/src/main/js/api/metrics.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON } from '../helpers/request'; export interface MetricsResponse { metrics: T.Metric[]; diff --git a/server/sonar-web/src/main/js/api/nav.ts b/server/sonar-web/src/main/js/api/nav.ts index b73f58f6ac1..8b89c9f4f89 100644 --- a/server/sonar-web/src/main/js/api/nav.ts +++ b/server/sonar-web/src/main/js/api/nav.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON } from '../helpers/request'; import { BranchParameters } from '../types/branch-like'; type NavComponent = T.Omit<T.Component, 'alm' | 'qualifier' | 'leakPeriodDate' | 'path' | 'tags'>; diff --git a/server/sonar-web/src/main/js/api/newCodePeriod.ts b/server/sonar-web/src/main/js/api/newCodePeriod.ts index 04363c339ee..60048a6fe0b 100644 --- a/server/sonar-web/src/main/js/api/newCodePeriod.ts +++ b/server/sonar-web/src/main/js/api/newCodePeriod.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post } from '../sonar-ui-common/helpers/request'; +import { getJSON, post } from '../helpers/request'; export function getNewCodePeriod(data?: { project?: string; diff --git a/server/sonar-web/src/main/js/api/notifications.ts b/server/sonar-web/src/main/js/api/notifications.ts index 0f314c75250..f6c3111c6a2 100644 --- a/server/sonar-web/src/main/js/api/notifications.ts +++ b/server/sonar-web/src/main/js/api/notifications.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post } from '../sonar-ui-common/helpers/request'; +import { getJSON, post } from '../helpers/request'; export function getNotifications(): Promise<{ channels: string[]; diff --git a/server/sonar-web/src/main/js/api/permissions.ts b/server/sonar-web/src/main/js/api/permissions.ts index a3f1eb716b8..f2a726ee1cc 100644 --- a/server/sonar-web/src/main/js/api/permissions.ts +++ b/server/sonar-web/src/main/js/api/permissions.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, postJSON, RequestData } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON, RequestData } from '../helpers/request'; import { BaseSearchProjectsParameters } from './components'; const PAGE_SIZE = 100; diff --git a/server/sonar-web/src/main/js/api/plugins.ts b/server/sonar-web/src/main/js/api/plugins.ts index 20bf5f1df19..4702a2c03ed 100644 --- a/server/sonar-web/src/main/js/api/plugins.ts +++ b/server/sonar-web/src/main/js/api/plugins.ts @@ -19,8 +19,8 @@ */ import { findLastIndex } from 'lodash'; import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post } from '../sonar-ui-common/helpers/request'; -import { isDefined } from '../sonar-ui-common/helpers/types'; +import { getJSON, post } from '../helpers/request'; +import { isDefined } from '../helpers/types'; import { AvailablePlugin, InstalledPlugin, diff --git a/server/sonar-web/src/main/js/api/projectActivity.ts b/server/sonar-web/src/main/js/api/projectActivity.ts index ae1c60fde51..4d12622b743 100644 --- a/server/sonar-web/src/main/js/api/projectActivity.ts +++ b/server/sonar-web/src/main/js/api/projectActivity.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, postJSON, RequestData } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON, RequestData } from '../helpers/request'; import { BranchParameters } from '../types/branch-like'; export function getProjectActivity( diff --git a/server/sonar-web/src/main/js/api/projectLinks.ts b/server/sonar-web/src/main/js/api/projectLinks.ts index 59db323b7cd..a77b313f144 100644 --- a/server/sonar-web/src/main/js/api/projectLinks.ts +++ b/server/sonar-web/src/main/js/api/projectLinks.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, postJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON } from '../helpers/request'; export function getProjectLinks(projectKey: string): Promise<T.ProjectLink[]> { return getJSON('/api/project_links/search', { projectKey }).then(r => r.links, throwGlobalError); 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 09d54d0d3b1..9c33f6b60e0 100644 --- a/server/sonar-web/src/main/js/api/quality-gates.ts +++ b/server/sonar-web/src/main/js/api/quality-gates.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, postJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON } from '../helpers/request'; import { BranchParameters } from '../types/branch-like'; import { QualityGateApplicationStatus, QualityGateProjectStatus } from '../types/quality-gates'; 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 008aab45ba8..551eb65e5c6 100644 --- a/server/sonar-web/src/main/js/api/quality-profiles.ts +++ b/server/sonar-web/src/main/js/api/quality-profiles.ts @@ -20,8 +20,8 @@ import { map } from 'lodash'; import throwGlobalError from '../app/utils/throwGlobalError'; import { Exporter, ProfileChangelogEvent } from '../apps/quality-profiles/types'; -import { csvEscape } from '../sonar-ui-common/helpers/csv'; -import { getJSON, post, postJSON, RequestData } from '../sonar-ui-common/helpers/request'; +import { csvEscape } from '../helpers/csv'; +import { getJSON, post, postJSON, RequestData } from '../helpers/request'; export interface ProfileActions { associateProjects?: boolean; diff --git a/server/sonar-web/src/main/js/api/rules.ts b/server/sonar-web/src/main/js/api/rules.ts index 4fd9b34b2e1..f5b966fc2eb 100644 --- a/server/sonar-web/src/main/js/api/rules.ts +++ b/server/sonar-web/src/main/js/api/rules.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, postJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON } from '../helpers/request'; import { GetRulesAppResponse, SearchRulesResponse } from '../types/coding-rules'; export function getRulesApp(): Promise<GetRulesAppResponse> { 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 de4135d802f..ed6094e24f0 100644 --- a/server/sonar-web/src/main/js/api/security-hotspots.ts +++ b/server/sonar-web/src/main/js/api/security-hotspots.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post } from '../sonar-ui-common/helpers/request'; +import { getJSON, post } from '../helpers/request'; import { BranchParameters } from '../types/branch-like'; import { Hotspot, diff --git a/server/sonar-web/src/main/js/api/settings.ts b/server/sonar-web/src/main/js/api/settings.ts index a4ca10a5fc7..f4069b816ae 100644 --- a/server/sonar-web/src/main/js/api/settings.ts +++ b/server/sonar-web/src/main/js/api/settings.ts @@ -20,7 +20,7 @@ import { omitBy } from 'lodash'; import throwGlobalError from '../app/utils/throwGlobalError'; import { isCategoryDefinition } from '../apps/settings/utils'; -import { getJSON, post, postJSON, RequestData } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON, RequestData } from '../helpers/request'; import { BranchParameters } from '../types/branch-like'; import { SettingCategoryDefinition, SettingDefinition, SettingValue } from '../types/settings'; diff --git a/server/sonar-web/src/main/js/api/static.ts b/server/sonar-web/src/main/js/api/static.ts index 8377e101d58..26c2b958c37 100644 --- a/server/sonar-web/src/main/js/api/static.ts +++ b/server/sonar-web/src/main/js/api/static.ts @@ -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 { checkStatus, request } from '../sonar-ui-common/helpers/request'; +import { checkStatus, request } from '../helpers/request'; export function getPluginStaticFileContent(pluginKey: string, staticFilePath: string) { return request(`/static/${pluginKey}/${staticFilePath}`) diff --git a/server/sonar-web/src/main/js/api/system.ts b/server/sonar-web/src/main/js/api/system.ts index fad5ff026dd..9adf55ea9dc 100644 --- a/server/sonar-web/src/main/js/api/system.ts +++ b/server/sonar-web/src/main/js/api/system.ts @@ -18,12 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { - getJSON, - post, - postJSON, - requestTryAndRepeatUntil -} from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON, requestTryAndRepeatUntil } from '../helpers/request'; import { SystemUpgrade } from '../types/system'; export function setLogLevel(level: string): Promise<void | Response> { 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 0128a2e7e41..5ea6da6053f 100644 --- a/server/sonar-web/src/main/js/api/time-machine.ts +++ b/server/sonar-web/src/main/js/api/time-machine.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON } from '../helpers/request'; import { BranchParameters } from '../types/branch-like'; interface TimeMachineResponse { 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 76dec9b30c3..da711f55914 100644 --- a/server/sonar-web/src/main/js/api/user-tokens.ts +++ b/server/sonar-web/src/main/js/api/user-tokens.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, postJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON } from '../helpers/request'; /** List tokens for given user login */ export function getTokens(login: string): Promise<T.UserToken[]> { 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 ea9326c6790..bbb8e95a5f8 100644 --- a/server/sonar-web/src/main/js/api/user_groups.ts +++ b/server/sonar-web/src/main/js/api/user_groups.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, postJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON } from '../helpers/request'; export function searchUsersGroups(data: { f?: string; diff --git a/server/sonar-web/src/main/js/api/users.ts b/server/sonar-web/src/main/js/api/users.ts index a405707aaf9..9d8282ba5be 100644 --- a/server/sonar-web/src/main/js/api/users.ts +++ b/server/sonar-web/src/main/js/api/users.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, postJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON } from '../helpers/request'; export function getCurrentUser(): Promise<T.CurrentUser> { return getJSON('/api/users/current'); 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 d55049e0cd4..c5bd4d8a535 100644 --- a/server/sonar-web/src/main/js/api/web-api.ts +++ b/server/sonar-web/src/main/js/api/web-api.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON } from '../helpers/request'; interface RawDomain { actions: T.WebApi.Action[]; diff --git a/server/sonar-web/src/main/js/api/webhooks.ts b/server/sonar-web/src/main/js/api/webhooks.ts index 8b000a8b2a5..0cb8b283a77 100644 --- a/server/sonar-web/src/main/js/api/webhooks.ts +++ b/server/sonar-web/src/main/js/api/webhooks.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import throwGlobalError from '../app/utils/throwGlobalError'; -import { getJSON, post, postJSON } from '../sonar-ui-common/helpers/request'; +import { getJSON, post, postJSON } from '../helpers/request'; export function createWebhook(data: { name: string; 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 4b30e7d04e5..655061e58ec 100644 --- a/server/sonar-web/src/main/js/app/components/AdminContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/AdminContainer.tsx @@ -24,7 +24,7 @@ import { getSettingsNavigation } from '../../api/nav'; import { getPendingPlugins } from '../../api/plugins'; import { getSystemStatus, waitSystemUPStatus } from '../../api/system'; import handleRequiredAuthorization from '../../app/utils/handleRequiredAuthorization'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import { setAdminPages } from '../../store/appState'; import { getAppState, Store } from '../../store/rootReducer'; import { PendingPluginResult } from '../../types/plugins'; 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 72aee72bc8f..adb046e0cc0 100644 --- a/server/sonar-web/src/main/js/app/components/App.tsx +++ b/server/sonar-web/src/main/js/app/components/App.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; import { fetchLanguages } from '../../store/rootActions'; import { getGlobalSettingValue, Store } from '../../store/rootReducer'; import KeyboardShortcutsModal from './KeyboardShortcutsModal'; 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 604223f76f3..8453c7b8a62 100644 --- a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx @@ -33,8 +33,8 @@ import { isMainBranch, isPullRequest } from '../../helpers/branch-like'; +import { HttpStatus } from '../../helpers/request'; import { getPortfolioUrl } from '../../helpers/urls'; -import { HttpStatus } from '../../sonar-ui-common/helpers/request'; import { registerBranchStatus, requireAuthorization } from '../../store/rootActions'; import { ProjectAlmBindingConfigurationErrors, 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 797ba2121f3..0d2382b5034 100644 --- a/server/sonar-web/src/main/js/app/components/ComponentContainerNotFound.tsx +++ b/server/sonar-web/src/main/js/app/components/ComponentContainerNotFound.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { Link } from 'react-router'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; export default function ComponentContainerNotFound() { return ( 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 54fdcb8cadd..12bf494a218 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,9 @@ import * as React from 'react'; import { Link } from 'react-router'; import InstanceMessage from '../../components/common/InstanceMessage'; +import { Alert } from '../../components/ui/Alert'; import { getEdition } from '../../helpers/editions'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../helpers/l10n'; import { EditionKey } from '../../types/editions'; import GlobalFooterBranding from './GlobalFooterBranding'; diff --git a/server/sonar-web/src/main/js/app/components/GlobalMessagesContainer.tsx b/server/sonar-web/src/main/js/app/components/GlobalMessagesContainer.tsx index 151b4bbbb88..37468141bb8 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalMessagesContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalMessagesContainer.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import GlobalMessages from '../../sonar-ui-common/components/controls/GlobalMessages'; +import GlobalMessages from '../../components/controls/GlobalMessages'; import { closeGlobalMessage } from '../../store/globalMessages'; import { getGlobalMessages, Store } from '../../store/rootReducer'; 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 e09d096e57c..fe3025a71cd 100644 --- a/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx +++ b/server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../sonar-ui-common/components/controls/Modal'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../components/controls/buttons'; +import Modal from '../../components/controls/Modal'; +import { translate } from '../../helpers/l10n'; type Shortcuts = Array<{ category: string; 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 12d0de6313b..810ede90f94 100644 --- a/server/sonar-web/src/main/js/app/components/NotFound.tsx +++ b/server/sonar-web/src/main/js/app/components/NotFound.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { Link } from 'react-router'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import SimpleContainer from './SimpleContainer'; interface Props { 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 16ba03f36b4..fa61f086bbe 100644 --- a/server/sonar-web/src/main/js/app/components/PluginRiskConsent.tsx +++ b/server/sonar-web/src/main/js/app/components/PluginRiskConsent.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { setSimpleSettingValue } from '../../api/settings'; +import { Button } from '../../components/controls/buttons'; import { whenLoggedIn } from '../../components/hoc/whenLoggedIn'; import { Router, withRouter } from '../../components/hoc/withRouter'; +import { translate } from '../../helpers/l10n'; import { hasGlobalPermission } from '../../helpers/users'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; import { Permissions } from '../../types/permissions'; import { RiskConsent } from '../../types/plugins'; import { SettingsKey } from '../../types/settings'; 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 57f4b178105..ca2026544bd 100644 --- a/server/sonar-web/src/main/js/app/components/RecentHistory.ts +++ b/server/sonar-web/src/main/js/app/components/RecentHistory.ts @@ -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 { get, remove, save } from '../../sonar-ui-common/helpers/storage'; +import { get, remove, save } from '../../helpers/storage'; const RECENT_HISTORY = 'sonar_recent_history'; const HISTORY_LIMIT = 10; 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 759d8fbc644..2ae0a133426 100644 --- a/server/sonar-web/src/main/js/app/components/ResetPassword.tsx +++ b/server/sonar-web/src/main/js/app/components/ResetPassword.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import ResetPasswordForm from '../../components/common/ResetPasswordForm'; import { whenLoggedIn } from '../../components/hoc/whenLoggedIn'; +import { translate } from '../../helpers/l10n'; import { getBaseUrl } from '../../helpers/system'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; import GlobalMessagesContainer from './GlobalMessagesContainer'; export interface ResetPasswordProps { 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 00fa60d8ce7..9249a6c77ba 100644 --- a/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/SimpleContainer.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import NavBar from '../../sonar-ui-common/components/ui/NavBar'; +import NavBar from '../../components/ui/NavBar'; import { rawSizes } from '../theme'; import GlobalFooterContainer from './GlobalFooterContainer'; 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 87891b13902..ea587d39212 100644 --- a/server/sonar-web/src/main/js/app/components/SimpleSessionsContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/SimpleSessionsContainer.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; import GlobalFooterContainer from './GlobalFooterContainer'; const PageTracker = lazyLoadComponent(() => import('./PageTracker')); 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 4d7355d347d..c11ac083e29 100644 --- a/server/sonar-web/src/main/js/app/components/StartupModal.tsx +++ b/server/sonar-web/src/main/js/app/components/StartupModal.tsx @@ -22,11 +22,11 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { showLicense } from '../../api/marketplace'; import { Location, Router, withRouter } from '../../components/hoc/withRouter'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; +import { parseDate, toShortNotSoISOString } from '../../helpers/dates'; +import { hasMessage } from '../../helpers/l10n'; +import { get, save } from '../../helpers/storage'; import { isLoggedIn } from '../../helpers/users'; -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; -import { parseDate, toShortNotSoISOString } from '../../sonar-ui-common/helpers/dates'; -import { hasMessage } from '../../sonar-ui-common/helpers/l10n'; -import { get, save } from '../../sonar-ui-common/helpers/storage'; import { getAppState, getCurrentUser, Store } from '../../store/rootReducer'; import { EditionKey } from '../../types/editions'; 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 9cb60b143a0..4b94887e4f4 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 @@ -28,7 +28,7 @@ import { mockProjectAlmBindingConfigurationErrors } from '../../../helpers/mocks import { mockBranch, mockMainBranch, mockPullRequest } from '../../../helpers/mocks/branch-like'; import { mockTask } from '../../../helpers/mocks/tasks'; import { mockAppState, mockComponent, mockLocation, mockRouter } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { AlmKeys } from '../../../types/alm-settings'; import { ComponentQualifier } from '../../../types/component'; import { TaskStatuses } from '../../../types/tasks'; 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 13ebabbc7bc..3313ba1c0c4 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 @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import Modal from '../../../components/controls/Modal'; import { mockEvent } from '../../../helpers/testMocks'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; import KeyboardShortcutsModal from '../KeyboardShortcutsModal'; let handle: void | (() => void); 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 2a0ecde261c..03b69bb4578 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 @@ -20,8 +20,8 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { setSimpleSettingValue } from '../../../api/settings'; +import { Button } from '../../../components/controls/buttons'; import { mockLoggedInUser, mockRouter } from '../../../helpers/testMocks'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; import { PluginRiskConsent, PluginRiskConsentProps } from '../PluginRiskConsent'; jest.mock('../../../api/settings', () => ({ 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 636aaccf7a6..cefe2bc1565 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,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 { get, remove, save } from '../../../sonar-ui-common/helpers/storage'; +import { get, remove, save } from '../../../helpers/storage'; import RecentHistory, { History } from '../RecentHistory'; -jest.mock('../../../sonar-ui-common/helpers/storage', () => ({ +jest.mock('../../../helpers/storage', () => ({ get: jest.fn(), remove: jest.fn(), save: jest.fn() 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 54c24c5eddb..e527440c46b 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 @@ -21,10 +21,10 @@ import * as differenceInDays from 'date-fns/difference_in_days'; import { shallow, ShallowWrapper } from 'enzyme'; import * as React from 'react'; import { showLicense } from '../../../api/marketplace'; -import { toShortNotSoISOString } from '../../../sonar-ui-common/helpers/dates'; -import { hasMessage } from '../../../sonar-ui-common/helpers/l10n'; -import { get, save } from '../../../sonar-ui-common/helpers/storage'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { toShortNotSoISOString } from '../../../helpers/dates'; +import { hasMessage } from '../../../helpers/l10n'; +import { get, save } from '../../../helpers/storage'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { EditionKey } from '../../../types/editions'; import { StartupModal } from '../StartupModal'; @@ -32,16 +32,16 @@ jest.mock('../../../api/marketplace', () => ({ showLicense: jest.fn().mockResolvedValue(undefined) })); -jest.mock('../../../sonar-ui-common/helpers/storage', () => ({ +jest.mock('../../../helpers/storage', () => ({ get: jest.fn(), save: jest.fn() })); -jest.mock('../../../sonar-ui-common/helpers/l10n', () => ({ +jest.mock('../../../helpers/l10n', () => ({ hasMessage: jest.fn().mockReturnValue(true) })); -jest.mock('../../../sonar-ui-common/helpers/dates', () => ({ +jest.mock('../../../helpers/dates', () => ({ parseDate: jest.fn().mockReturnValue('parsed-date'), toShortNotSoISOString: jest.fn().mockReturnValue('short-not-iso-date') })); diff --git a/server/sonar-web/src/main/js/app/components/a11y/A11ySkipTarget.tsx b/server/sonar-web/src/main/js/app/components/a11y/A11ySkipTarget.tsx index 7a459d0c863..59775b7e133 100644 --- a/server/sonar-web/src/main/js/app/components/a11y/A11ySkipTarget.tsx +++ b/server/sonar-web/src/main/js/app/components/a11y/A11ySkipTarget.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { A11yContext } from './A11yContext'; interface Props { diff --git a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11yProvider-test.tsx b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11yProvider-test.tsx index c3e3c139ac0..286c744b883 100644 --- a/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11yProvider-test.tsx +++ b/server/sonar-web/src/main/js/app/components/a11y/__tests__/A11yProvider-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { A11yContextShape } from '../A11yContext'; import A11yProvider from '../A11yProvider'; diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx index f653b2eb91d..41d40dac55e 100644 --- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx +++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopup.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { SuggestionsContext } from './SuggestionsContext'; interface Props { diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx index 1b82118c952..b92ca5f00f9 100644 --- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx +++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import HelpIcon from '../../../sonar-ui-common/components/icons/HelpIcon'; -import { lazyLoadComponent } from '../../../sonar-ui-common/components/lazyLoadComponent'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Toggler from '../../../components/controls/Toggler'; +import HelpIcon from '../../../components/icons/HelpIcon'; +import { lazyLoadComponent } from '../../../components/lazyLoadComponent'; +import { translate } from '../../../helpers/l10n'; const EmbedDocsPopup = lazyLoadComponent(() => import('./EmbedDocsPopup')); 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 dd484df68e3..df39090fe02 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 @@ -19,16 +19,13 @@ */ import * as React from 'react'; import { createApplication } from '../../../api/application'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Radio from '../../../components/controls/Radio'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; import { ComponentQualifier, Visibility } from '../../../types/component'; interface Props { 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 259e9b828f9..bf72c7e3e49 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 @@ -23,9 +23,8 @@ import { InjectedIntlProps, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; import { getExtensionStart } from '../../../helpers/extensions'; -import { getCurrentL10nBundle } from '../../../helpers/l10n'; +import { getCurrentL10nBundle, translate } from '../../../helpers/l10n'; import { getBaseUrl } from '../../../helpers/system'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { addGlobalErrorMessage } from '../../../store/globalMessages'; import { getCurrentUser, Store } from '../../../store/rootReducer'; import { ExtensionStartMethod } from '../../../types/extension'; diff --git a/server/sonar-web/src/main/js/app/components/extensions/__tests__/CreateApplicationForm-test.tsx b/server/sonar-web/src/main/js/app/components/extensions/__tests__/CreateApplicationForm-test.tsx index a44b8c61af6..c3710b42081 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/__tests__/CreateApplicationForm-test.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/__tests__/CreateApplicationForm-test.tsx @@ -20,9 +20,9 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { createApplication } from '../../../../api/application'; +import SimpleModal from '../../../../components/controls/SimpleModal'; import { mockEvent } from '../../../../helpers/testMocks'; -import SimpleModal from '../../../../sonar-ui-common/components/controls/SimpleModal'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { ComponentQualifier, Visibility } from '../../../../types/component'; import CreateApplicationForm from '../CreateApplicationForm'; 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 a5d652e4b27..efa1c487d63 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 @@ -21,7 +21,7 @@ import { mount } from 'enzyme'; import * as React from 'react'; import { getExtensionStart } from '../../../../helpers/extensions'; import { mockCurrentUser, mockLocation, mockRouter } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { Extension } from '../Extension'; jest.mock('../../../../helpers/extensions', () => ({ 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 173e0687dc6..cdbf12adf21 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 @@ -19,18 +19,78 @@ */ import { FormattedMessage } from 'react-intl'; import NotFound from '../../../app/components/NotFound'; +import ActionsDropdown, { ActionsDropdownItem } from '../../../components/controls/ActionsDropdown'; +import BoxedTabs from '../../../components/controls/BoxedTabs'; +import { + Button, + EditButton, + ResetButtonLink, + SubmitButton +} from '../../../components/controls/buttons'; +import Checkbox from '../../../components/controls/Checkbox'; +import ConfirmButton from '../../../components/controls/ConfirmButton'; +import Dropdown from '../../../components/controls/Dropdown'; import Favorite from '../../../components/controls/Favorite'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; import HomePageSelect from '../../../components/controls/HomePageSelect'; +import ListFooter from '../../../components/controls/ListFooter'; +import Modal from '../../../components/controls/Modal'; +import Radio from '../../../components/controls/Radio'; +import RadioToggle from '../../../components/controls/RadioToggle'; +import ReloadButton from '../../../components/controls/ReloadButton'; +import SearchBox from '../../../components/controls/SearchBox'; +import SearchSelect from '../../../components/controls/SearchSelect'; +import Select from '../../../components/controls/Select'; +import SelectList, { SelectListFilter } from '../../../components/controls/SelectList'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import Tooltip from '../../../components/controls/Tooltip'; +import AlertErrorIcon from '../../../components/icons/AlertErrorIcon'; +import AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon'; +import AlertWarnIcon from '../../../components/icons/AlertWarnIcon'; +import BranchIcon from '../../../components/icons/BranchIcon'; import BranchLikeIcon from '../../../components/icons/BranchLikeIcon'; +import CheckIcon from '../../../components/icons/CheckIcon'; +import ClearIcon from '../../../components/icons/ClearIcon'; +import DetachIcon from '../../../components/icons/DetachIcon'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; +import HelpIcon from '../../../components/icons/HelpIcon'; +import LockIcon from '../../../components/icons/LockIcon'; +import PlusCircleIcon from '../../../components/icons/PlusCircleIcon'; +import PullRequestIcon from '../../../components/icons/PullRequestIcon'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import SecurityHotspotIcon from '../../../components/icons/SecurityHotspotIcon'; +import VulnerabilityIcon from '../../../components/icons/VulnerabilityIcon'; +import DateFormatter from '../../../components/intl/DateFormatter'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; +import { Alert } from '../../../components/ui/Alert'; import CoverageRating from '../../../components/ui/CoverageRating'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import DuplicationsRating from '../../../components/ui/DuplicationsRating'; +import Level from '../../../components/ui/Level'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import Rating from '../../../components/ui/Rating'; import { getBranchLikeQuery, isBranch, isMainBranch, isPullRequest } from '../../../helpers/branch-like'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import * as measures from '../../../helpers/measures'; import { + get, + getJSON, + getText, + omitNil, + parseError, + post, + postJSON, + postJSONBody, + request +} from '../../../helpers/request'; +import { getStandards, renderCWECategory, renderOwaspTop10Category, @@ -42,71 +102,6 @@ import { getComponentSecurityHotspotsUrl, getRulesUrl } from '../../../helpers/urls'; -import ActionsDropdown, { - ActionsDropdownItem -} from '../../../sonar-ui-common/components/controls/ActionsDropdown'; -import BoxedTabs from '../../../sonar-ui-common/components/controls/BoxedTabs'; -import { - Button, - EditButton, - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Checkbox from '../../../sonar-ui-common/components/controls/Checkbox'; -import ConfirmButton from '../../../sonar-ui-common/components/controls/ConfirmButton'; -import Dropdown from '../../../sonar-ui-common/components/controls/Dropdown'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import RadioToggle from '../../../sonar-ui-common/components/controls/RadioToggle'; -import ReloadButton from '../../../sonar-ui-common/components/controls/ReloadButton'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import SearchSelect from '../../../sonar-ui-common/components/controls/SearchSelect'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import SelectList, { - SelectListFilter -} from '../../../sonar-ui-common/components/controls/SelectList'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import AlertErrorIcon from '../../../sonar-ui-common/components/icons/AlertErrorIcon'; -import AlertSuccessIcon from '../../../sonar-ui-common/components/icons/AlertSuccessIcon'; -import AlertWarnIcon from '../../../sonar-ui-common/components/icons/AlertWarnIcon'; -import BranchIcon from '../../../sonar-ui-common/components/icons/BranchIcon'; -import CheckIcon from '../../../sonar-ui-common/components/icons/CheckIcon'; -import ClearIcon from '../../../sonar-ui-common/components/icons/ClearIcon'; -import DetachIcon from '../../../sonar-ui-common/components/icons/DetachIcon'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import HelpIcon from '../../../sonar-ui-common/components/icons/HelpIcon'; -import LockIcon from '../../../sonar-ui-common/components/icons/LockIcon'; -import PlusCircleIcon from '../../../sonar-ui-common/components/icons/PlusCircleIcon'; -import PullRequestIcon from '../../../sonar-ui-common/components/icons/PullRequestIcon'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import SecurityHotspotIcon from '../../../sonar-ui-common/components/icons/SecurityHotspotIcon'; -import VulnerabilityIcon from '../../../sonar-ui-common/components/icons/VulnerabilityIcon'; -import DateFormatter from '../../../sonar-ui-common/components/intl/DateFormatter'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import DateTimeFormatter from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import DuplicationsRating from '../../../sonar-ui-common/components/ui/DuplicationsRating'; -import Level from '../../../sonar-ui-common/components/ui/Level'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import Rating from '../../../sonar-ui-common/components/ui/Rating'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; -import { - get, - getJSON, - getText, - omitNil, - parseError, - post, - postJSON, - postJSONBody, - request -} from '../../../sonar-ui-common/helpers/request'; import addGlobalSuccessMessage from '../../utils/addGlobalSuccessMessage'; import throwGlobalError from '../../utils/throwGlobalError'; import A11ySkipTarget from '../a11y/A11ySkipTarget'; @@ -162,7 +157,7 @@ const exposeLibraries = () => { get: () => { // eslint-disable-next-line no-console console.warn('SonarMeasures usages are deprecated since SonarQube 8.7'); - return { ...measures, formatMeasure }; + return { ...measures }; } }); 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 0514b7dcdf2..2fad17bcbb7 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { getIndexationStatus } from '../../../api/ce'; -import { get, remove, save } from '../../../sonar-ui-common/helpers/storage'; +import { get, remove, save } from '../../../helpers/storage'; import { IndexationStatus } from '../../../types/indexation'; const POLLING_INTERVAL_MS = 5000; 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 2e6c7ff2abf..e7fd3e3c189 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,8 +20,8 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { Alert, AlertProps } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { Alert, AlertProps } from '../../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { IndexationNotificationType } from '../../../types/indexation'; import { TaskStatuses, TaskTypes } from '../../../types/tasks'; 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 ff868c7972d..5c43f41c660 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 @@ -22,8 +22,8 @@ import { FormattedMessage } from 'react-intl'; import withIndexationContext, { WithIndexationContextProps } from '../../../components/hoc/withIndexationContext'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; interface Props extends WithIndexationContextProps { pageContext?: PageContext; 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 b3170c43fab..82e53f3c821 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { getIndexationStatus } from '../../../../api/ce'; -import { get, remove, save } from '../../../../sonar-ui-common/helpers/storage'; +import { get, remove, save } from '../../../../helpers/storage'; import { IndexationStatus } from '../../../../types/indexation'; import IndexationNotificationHelper from '../IndexationNotificationHelper'; @@ -31,7 +31,7 @@ jest.mock('../../../../api/ce', () => ({ getIndexationStatus: jest.fn() })); -jest.mock('../../../../sonar-ui-common/helpers/storage', () => ({ +jest.mock('../../../../helpers/storage', () => ({ get: jest.fn(), remove: jest.fn(), save: jest.fn() diff --git a/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx b/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx index 1ac43095f55..37a77838362 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx @@ -20,9 +20,9 @@ import { last } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; +import QualifierIcon from '../../../../components/icons/QualifierIcon'; import { isMainBranch } from '../../../../helpers/branch-like'; import { getComponentOverviewUrl } from '../../../../helpers/urls'; -import QualifierIcon from '../../../../sonar-ui-common/components/icons/QualifierIcon'; import { BranchLike } from '../../../../types/branch-like'; interface Props { 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 401c5ade6cf..a17b0b003cd 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 @@ -19,7 +19,7 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import ContextNavBar from '../../../../sonar-ui-common/components/ui/ContextNavBar'; +import ContextNavBar from '../../../../components/ui/ContextNavBar'; import { ProjectAlmBindingConfigurationErrors, ProjectAlmBindingResponse diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx index 78928515063..a802c839259 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx @@ -22,9 +22,9 @@ import { FormattedMessage } from 'react-intl'; import { Link, WithRouterProps } from 'react-router'; import { STATUSES } from '../../../../apps/background-tasks/constants'; import { withRouter } from '../../../../components/hoc/withRouter'; +import { Alert } from '../../../../components/ui/Alert'; +import { hasMessage, translate } from '../../../../helpers/l10n'; import { getComponentBackgroundTaskUrl } from '../../../../helpers/urls'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { hasMessage, translate } from '../../../../sonar-ui-common/helpers/l10n'; import { Task, TaskStatuses } from '../../../../types/tasks'; import ComponentNavLicenseNotif from './ComponentNavLicenseNotif'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx index d2360840b55..28a8a51a725 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx @@ -21,8 +21,8 @@ import * as React from 'react'; import { Link } from 'react-router'; import { isValidLicense } from '../../../../api/marketplace'; import { withAppState } from '../../../../components/hoc/withAppState'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { ComponentQualifier } from '../../../../types/component'; import { Task } from '../../../../types/tasks'; 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 ba27c987edb..5ceeb6675e9 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 @@ -21,9 +21,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { PULL_REQUEST_DECORATION_BINDING_CATEGORY } from '../../../../apps/settings/components/AdditionalCategoryKeys'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate } from '../../../../helpers/l10n'; import { getProjectSettingsUrl } from '../../../../helpers/urls'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; export interface ComponentNavProjectBindingErrorNotifProps { component: T.Component; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx index 1e5929bcad3..f267db006dc 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavWarnings.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { lazyLoadComponent } from '../../../../sonar-ui-common/components/lazyLoadComponent'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { lazyLoadComponent } from '../../../../components/lazyLoadComponent'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate } from '../../../../helpers/l10n'; import { TaskWarning } from '../../../../types/tasks'; const AnalysisWarningsModal = lazyLoadComponent( diff --git a/server/sonar-web/src/main/js/app/components/nav/component/HeaderMeta.tsx b/server/sonar-web/src/main/js/app/components/nav/component/HeaderMeta.tsx index e5e4b138acf..3a7f2a4c454 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/HeaderMeta.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/HeaderMeta.tsx @@ -21,11 +21,11 @@ import * as React from 'react'; import { connect } from 'react-redux'; import BranchStatus from '../../../../components/common/BranchStatus'; import HomePageSelect from '../../../../components/controls/HomePageSelect'; +import DetachIcon from '../../../../components/icons/DetachIcon'; +import DateTimeFormatter from '../../../../components/intl/DateTimeFormatter'; import { isBranch, isPullRequest } from '../../../../helpers/branch-like'; +import { translate } from '../../../../helpers/l10n'; import { isLoggedIn } from '../../../../helpers/users'; -import DetachIcon from '../../../../sonar-ui-common/components/icons/DetachIcon'; -import DateTimeFormatter from '../../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; import { getCurrentUser, Store } from '../../../../store/rootReducer'; import { BranchLike } from '../../../../types/branch-like'; import { ComponentQualifier } from '../../../../types/component'; 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 7df410dd26e..903fc7d885b 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 @@ -20,15 +20,15 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { Link, LinkProps } from 'react-router'; +import Dropdown from '../../../../components/controls/Dropdown'; +import Tooltip from '../../../../components/controls/Tooltip'; import { withAppState } from '../../../../components/hoc/withAppState'; +import BulletListIcon from '../../../../components/icons/BulletListIcon'; +import DropdownIcon from '../../../../components/icons/DropdownIcon'; +import NavBarTabs from '../../../../components/ui/NavBarTabs'; import { getBranchLikeQuery, isPullRequest } from '../../../../helpers/branch-like'; +import { hasMessage, translate } from '../../../../helpers/l10n'; import { getPortfolioUrl, getProjectQueryUrl } from '../../../../helpers/urls'; -import Dropdown from '../../../../sonar-ui-common/components/controls/Dropdown'; -import Tooltip from '../../../../sonar-ui-common/components/controls/Tooltip'; -import BulletListIcon from '../../../../sonar-ui-common/components/icons/BulletListIcon'; -import DropdownIcon from '../../../../sonar-ui-common/components/icons/DropdownIcon'; -import NavBarTabs from '../../../../sonar-ui-common/components/ui/NavBarTabs'; -import { hasMessage, translate } from '../../../../sonar-ui-common/helpers/l10n'; import { BranchLike, BranchParameters } from '../../../../types/branch-like'; import { ComponentQualifier, isPortfolioLike } from '../../../../types/component'; import './Menu.css'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBgTaskNotif-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBgTaskNotif-test.tsx index cd069c5bc32..9c2ffae48bf 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBgTaskNotif-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBgTaskNotif-test.tsx @@ -20,15 +20,15 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Alert } from '../../../../../components/ui/Alert'; +import { hasMessage } from '../../../../../helpers/l10n'; import { mockTask } from '../../../../../helpers/mocks/tasks'; import { mockComponent, mockLocation } from '../../../../../helpers/testMocks'; -import { Alert } from '../../../../../sonar-ui-common/components/ui/Alert'; -import { hasMessage } from '../../../../../sonar-ui-common/helpers/l10n'; import { Task, TaskStatuses, TaskTypes } from '../../../../../types/tasks'; import { ComponentNavBgTaskNotif } from '../ComponentNavBgTaskNotif'; -jest.mock('../../../../../sonar-ui-common/helpers/l10n', () => ({ - ...jest.requireActual('../../../../../sonar-ui-common/helpers/l10n'), +jest.mock('../../../../../helpers/l10n', () => ({ + ...jest.requireActual('../../../../../helpers/l10n'), hasMessage: jest.fn().mockReturnValue(true) })); diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavLicenseNotif-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavLicenseNotif-test.tsx index dc63ca704a4..5a1439a4250 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavLicenseNotif-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavLicenseNotif-test.tsx @@ -21,12 +21,12 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { isValidLicense } from '../../../../../api/marketplace'; import { mockTask } from '../../../../../helpers/mocks/tasks'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import { TaskStatuses } from '../../../../../types/tasks'; import { ComponentNavLicenseNotif } from '../ComponentNavLicenseNotif'; -jest.mock('../../../../../sonar-ui-common/helpers/l10n', () => ({ - ...jest.requireActual('../../../../../sonar-ui-common/helpers/l10n'), +jest.mock('../../../../../helpers/l10n', () => ({ + ...jest.requireActual('../../../../../helpers/l10n'), hasMessage: jest.fn().mockReturnValue(true) })); 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 c05cc8f8524..1f017226c57 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 @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; +import Toggler from '../../../../../components/controls/Toggler'; import { withAppState } from '../../../../../components/hoc/withAppState'; -import Toggler from '../../../../../sonar-ui-common/components/controls/Toggler'; import { ProjectAlmBindingResponse } from '../../../../../types/alm-settings'; import { BranchLike } from '../../../../../types/branch-like'; import './BranchLikeNavigation.css'; 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 8add2010e16..8d8b3b7d837 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 @@ -20,13 +20,13 @@ import * as React from 'react'; import { Link } from 'react-router'; import DocumentationTooltip from '../../../../../components/common/DocumentationTooltip'; +import HelpTooltip from '../../../../../components/controls/HelpTooltip'; import BranchLikeIcon from '../../../../../components/icons/BranchLikeIcon'; +import DropdownIcon from '../../../../../components/icons/DropdownIcon'; +import PlusCircleIcon from '../../../../../components/icons/PlusCircleIcon'; import { getBranchLikeDisplayName } from '../../../../../helpers/branch-like'; +import { translate, translateWithParameters } from '../../../../../helpers/l10n'; import { getApplicationAdminUrl } from '../../../../../helpers/urls'; -import HelpTooltip from '../../../../../sonar-ui-common/components/controls/HelpTooltip'; -import DropdownIcon from '../../../../../sonar-ui-common/components/icons/DropdownIcon'; -import PlusCircleIcon from '../../../../../sonar-ui-common/components/icons/PlusCircleIcon'; -import { translate, translateWithParameters } from '../../../../../sonar-ui-common/helpers/l10n'; import { AlmKeys, ProjectAlmBindingResponse } from '../../../../../types/alm-settings'; import { BranchLike } from '../../../../../types/branch-like'; import { ComponentQualifier } from '../../../../../types/component'; 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 d4d4bbd58f6..96b5420edc0 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 @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { isPullRequest } from '../../../../../helpers/branch-like'; -import { translate } from '../../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../../helpers/l10n'; import { BranchLike } from '../../../../../types/branch-like'; export interface CurrentBranchLikeMergeInformationProps { 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 b659a7d7dd8..eb2e08e8395 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 @@ -19,6 +19,8 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import { DropdownOverlay } from '../../../../../components/controls/Dropdown'; +import SearchBox from '../../../../../components/controls/SearchBox'; import { Router, withRouter } from '../../../../../components/hoc/withRouter'; import { getBrancheLikesAsTree, @@ -26,11 +28,9 @@ import { isPullRequest, isSameBranchLike } from '../../../../../helpers/branch-like'; +import { KeyCodes } from '../../../../../helpers/keycodes'; +import { translate } from '../../../../../helpers/l10n'; import { getBranchLikeUrl } from '../../../../../helpers/urls'; -import { DropdownOverlay } from '../../../../../sonar-ui-common/components/controls/Dropdown'; -import SearchBox from '../../../../../sonar-ui-common/components/controls/SearchBox'; -import { KeyCodes } from '../../../../../sonar-ui-common/helpers/keycodes'; -import { translate } from '../../../../../sonar-ui-common/helpers/l10n'; import { BranchLike, BranchLikeTree } from '../../../../../types/branch-like'; import { ComponentQualifier } from '../../../../../types/component'; import MenuItemList from './MenuItemList'; 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 0081d6e2107..7cc0592d4d5 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 @@ -22,7 +22,7 @@ import * as React from 'react'; import BranchStatus from '../../../../../components/common/BranchStatus'; import BranchLikeIcon from '../../../../../components/icons/BranchLikeIcon'; import { getBranchLikeDisplayName, isMainBranch } from '../../../../../helpers/branch-like'; -import { translate } from '../../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../../helpers/l10n'; import { BranchLike } from '../../../../../types/branch-like'; export interface MenuItemProps { 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 2cfeef45c33..cddc6aba4d8 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 @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import HelpTooltip from '../../../../../components/controls/HelpTooltip'; import { getBranchLikeKey, isSameBranchLike } from '../../../../../helpers/branch-like'; -import HelpTooltip from '../../../../../sonar-ui-common/components/controls/HelpTooltip'; -import { translate } from '../../../../../sonar-ui-common/helpers/l10n'; -import { scrollToElement } from '../../../../../sonar-ui-common/helpers/scrolling'; -import { isDefined } from '../../../../../sonar-ui-common/helpers/types'; +import { translate } from '../../../../../helpers/l10n'; +import { scrollToElement } from '../../../../../helpers/scrolling'; +import { isDefined } from '../../../../../helpers/types'; import { BranchLike, BranchLikeTree } from '../../../../../types/branch-like'; import MenuItem from './MenuItem'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/BranchLikeNavigation-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/BranchLikeNavigation-test.tsx index 0872ef3f49c..7f2f4b407e2 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/BranchLikeNavigation-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/BranchLikeNavigation-test.tsx @@ -19,10 +19,10 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import Toggler from '../../../../../../components/controls/Toggler'; import { mockSetOfBranchAndPullRequest } from '../../../../../../helpers/mocks/branch-like'; import { mockAppState, mockComponent } from '../../../../../../helpers/testMocks'; -import Toggler from '../../../../../../sonar-ui-common/components/controls/Toggler'; -import { click } from '../../../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../../../helpers/testUtils'; import { BranchLikeNavigation, BranchLikeNavigationProps } from '../BranchLikeNavigation'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/Menu-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/Menu-test.tsx index 5415fdfcf7a..a6268c83505 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/Menu-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/Menu-test.tsx @@ -20,14 +20,14 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { Link } from 'react-router'; +import SearchBox from '../../../../../../components/controls/SearchBox'; +import { KeyCodes } from '../../../../../../helpers/keycodes'; import { mockPullRequest, mockSetOfBranchAndPullRequest } from '../../../../../../helpers/mocks/branch-like'; import { mockComponent, mockRouter } from '../../../../../../helpers/testMocks'; -import SearchBox from '../../../../../../sonar-ui-common/components/controls/SearchBox'; -import { KeyCodes } from '../../../../../../sonar-ui-common/helpers/keycodes'; -import { click, mockEvent } from '../../../../../../sonar-ui-common/helpers/testUtils'; +import { click, mockEvent } from '../../../../../../helpers/testUtils'; import { Menu } from '../Menu'; import { MenuItemList } from '../MenuItemList'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/MenuItem-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/MenuItem-test.tsx index 28162225144..fb41672dbed 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/MenuItem-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/MenuItem-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockMainBranch, mockPullRequest } from '../../../../../../helpers/mocks/branch-like'; import { mockComponent } from '../../../../../../helpers/testMocks'; -import { click } from '../../../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../../../helpers/testUtils'; import { MenuItem, MenuItemProps } from '../MenuItem'; it('should render a main branch correctly', () => { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/DrawerLink.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/DrawerLink.tsx index 058c16891a3..8652f40f275 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/DrawerLink.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/DrawerLink.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ChevronRightIcon from '../../../../../sonar-ui-common/components/icons/ChevronRightIcon'; +import ChevronRightIcon from '../../../../../components/icons/ChevronRightIcon'; export interface DrawerLinkProps<P> { label: string; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/InfoDrawer.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/InfoDrawer.tsx index af20df002ea..4369bc93b7b 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/InfoDrawer.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/InfoDrawer.tsx @@ -19,9 +19,9 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { ClearButton } from '../../../../../sonar-ui-common/components/controls/buttons'; -import EscKeydownHandler from '../../../../../sonar-ui-common/components/controls/EscKeydownHandler'; -import OutsideClickHandler from '../../../../../sonar-ui-common/components/controls/OutsideClickHandler'; +import { ClearButton } from '../../../../../components/controls/buttons'; +import EscKeydownHandler from '../../../../../components/controls/EscKeydownHandler'; +import OutsideClickHandler from '../../../../../components/controls/OutsideClickHandler'; import './InfoDrawer.css'; export interface InfoDrawerProps { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/InfoDrawerPage.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/InfoDrawerPage.tsx index 30056b53285..5ecb1970b25 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/InfoDrawerPage.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/InfoDrawerPage.tsx @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import BackIcon from '../../../../../sonar-ui-common/components/icons/BackIcon'; -import { translate } from '../../../../../sonar-ui-common/helpers/l10n'; +import BackIcon from '../../../../../components/icons/BackIcon'; +import { translate } from '../../../../../helpers/l10n'; export interface InfoDrawerPageProps { children: React.ReactNode; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/ProjectInformationRenderer.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/ProjectInformationRenderer.tsx index 106ca606cad..f322b691ee4 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/ProjectInformationRenderer.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/ProjectInformationRenderer.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import PrivacyBadgeContainer from '../../../../../components/common/PrivacyBadgeContainer'; -import { translate } from '../../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../../helpers/l10n'; import { ComponentQualifier } from '../../../../../types/component'; import DrawerLink from './DrawerLink'; import MetaKey from './meta/MetaKey'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/__tests__/ProjectInformation-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/__tests__/ProjectInformation-test.tsx index e9a3a5dc9b3..b6d8ff63be3 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/__tests__/ProjectInformation-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/__tests__/ProjectInformation-test.tsx @@ -25,7 +25,7 @@ import { mockLoggedInUser, mockMetric } from '../../../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../../helpers/testUtils'; import { ProjectInformation } from '../ProjectInformation'; import { ProjectInformationPages } from '../ProjectInformationPages'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/BadgeButton.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/BadgeButton.tsx index 646eaa2d093..9bdf960e4aa 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/BadgeButton.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/BadgeButton.tsx @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { Button } from '../../../../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../../../../components/controls/buttons'; +import { translate } from '../../../../../../helpers/l10n'; import { BadgeType } from './utils'; interface Props { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/BadgeParams.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/BadgeParams.tsx index 59fefdbee99..f6406e91ea3 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/BadgeParams.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/BadgeParams.tsx @@ -20,8 +20,8 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { fetchWebApi } from '../../../../../../api/web-api'; -import Select from '../../../../../../sonar-ui-common/components/controls/Select'; -import { getLocalizedMetricName, translate } from '../../../../../../sonar-ui-common/helpers/l10n'; +import Select from '../../../../../../components/controls/Select'; +import { getLocalizedMetricName, translate } from '../../../../../../helpers/l10n'; import { BadgeColors, BadgeFormats, BadgeOptions, BadgeType } from './utils'; interface Props { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/ProjectBadges.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/ProjectBadges.tsx index 531d52cdfc6..f57119b9512 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/ProjectBadges.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/ProjectBadges.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import CodeSnippet from '../../../../../../components/common/CodeSnippet'; import { getBranchLikeQuery } from '../../../../../../helpers/branch-like'; -import { translate } from '../../../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../../../helpers/l10n'; import { BranchLike } from '../../../../../../types/branch-like'; import { MetricKey } from '../../../../../../types/metrics'; import BadgeButton from './BadgeButton'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/BadgeButton-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/BadgeButton-test.tsx index adf7877a87b..221e8c9dbd2 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/BadgeButton-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/BadgeButton-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../../../../helpers/testUtils'; import BadgeButton from '../BadgeButton'; import { BadgeType } from '../utils'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/ProjectBadges-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/ProjectBadges-test.tsx index fb000f69621..4f1c3680392 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/ProjectBadges-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/ProjectBadges-test.tsx @@ -21,16 +21,13 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockBranch } from '../../../../../../../helpers/mocks/branch-like'; import { mockMetric } from '../../../../../../../helpers/testMocks'; -import { Location } from '../../../../../../../sonar-ui-common/helpers/urls'; +import { Location } from '../../../../../../../helpers/urls'; import { MetricKey } from '../../../../../../../types/metrics'; import ProjectBadges from '../ProjectBadges'; -jest.mock('../../../../../../../sonar-ui-common/helpers/urls', () => ({ - getHostUrl: () => 'host', - getPathUrlAsString: (l: Location) => l.pathname -})); - jest.mock('../../../../../../../helpers/urls', () => ({ + getHostUrl: () => 'host', + getPathUrlAsString: (l: Location) => l.pathname, getProjectUrl: () => ({ pathname: '/dashboard' } as Location) })); diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/utils-test.ts b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/utils-test.ts index 9d6174facb4..263fb541de5 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/__tests__/utils-test.ts @@ -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 { Location } from '../../../../../../../sonar-ui-common/helpers/urls'; +import { Location } from '../../../../../../../helpers/urls'; import { BadgeOptions, BadgeType, getBadgeSnippet, getBadgeUrl } from '../utils'; -jest.mock('../../../../../../../sonar-ui-common/helpers/urls', () => ({ - ...jest.requireActual('../../../../../../../sonar-ui-common/helpers/urls'), +jest.mock('../../../../../../../helpers/urls', () => ({ + ...jest.requireActual('../../../../../../../helpers/urls'), getHostUrl: () => 'host', getPathUrlAsString: (o: Location) => `host${o.pathname}?id=${o.query ? o.query.id : ''}&branch=${o.query ? o.query.branch : ''}` diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/utils.ts b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/utils.ts index 48266ab6df6..cb455dff6f1 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/utils.ts +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/utils.ts @@ -18,10 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { stringify } from 'querystring'; -import { getProjectUrl } from '../../../../../../helpers/urls'; -import { getLocalizedMetricName } from '../../../../../../sonar-ui-common/helpers/l10n'; -import { omitNil } from '../../../../../../sonar-ui-common/helpers/request'; -import { getHostUrl, getPathUrlAsString } from '../../../../../../sonar-ui-common/helpers/urls'; +import { getLocalizedMetricName } from '../../../../../../helpers/l10n'; +import { omitNil } from '../../../../../../helpers/request'; +import { getHostUrl, getPathUrlAsString, getProjectUrl } from '../../../../../../helpers/urls'; export type BadgeColors = 'white' | 'black' | 'orange'; export type BadgeFormats = 'md' | 'url'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx index bfff750221c..32095324b20 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ClipboardButton } from '../../../../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../../../../sonar-ui-common/helpers/l10n'; +import { ClipboardButton } from '../../../../../../components/controls/clipboard'; +import { translate } from '../../../../../../helpers/l10n'; interface Props { componentKey: string; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLink.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLink.tsx index d0b487b56ef..a8856725e8d 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLink.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLink.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { ClearButton } from '../../../../../../components/controls/buttons'; +import ProjectLinkIcon from '../../../../../../components/icons/ProjectLinkIcon'; import { getLinkName } from '../../../../../../helpers/projectLinks'; -import { ClearButton } from '../../../../../../sonar-ui-common/components/controls/buttons'; -import ProjectLinkIcon from '../../../../../../sonar-ui-common/components/icons/ProjectLinkIcon'; import isValidUri from '../../../../../utils/isValidUri'; interface Props { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLinks.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLinks.tsx index c3a2366b538..0c6915d8dc1 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLinks.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLinks.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { getProjectLinks } from '../../../../../../api/projectLinks'; +import { translate } from '../../../../../../helpers/l10n'; import { orderLinks } from '../../../../../../helpers/projectLinks'; -import { translate } from '../../../../../../sonar-ui-common/helpers/l10n'; import MetaLink from './MetaLink'; interface Props { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityGate.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityGate.tsx index 4e4fcba9894..f49859022ea 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityGate.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityGate.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import { translate } from '../../../../../../helpers/l10n'; import { getQualityGateUrl } from '../../../../../../helpers/urls'; -import { translate } from '../../../../../../sonar-ui-common/helpers/l10n'; interface Props { qualityGate: { isDefault?: boolean; key: string; name: string }; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityProfiles.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityProfiles.tsx index 25e44404e5c..fdbcfeb82fd 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityProfiles.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityProfiles.tsx @@ -21,9 +21,9 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import { searchRules } from '../../../../../../api/rules'; +import Tooltip from '../../../../../../components/controls/Tooltip'; +import { translate, translateWithParameters } from '../../../../../../helpers/l10n'; import { getQualityProfileUrl } from '../../../../../../helpers/urls'; -import Tooltip from '../../../../../../sonar-ui-common/components/controls/Tooltip'; -import { translate, translateWithParameters } from '../../../../../../sonar-ui-common/helpers/l10n'; import { getLanguages, Store } from '../../../../../../store/rootReducer'; interface StateProps { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx index 9475410037e..eb48b01b034 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import DrilldownLink from '../../../../../../components/shared/DrilldownLink'; -import SizeRating from '../../../../../../sonar-ui-common/components/ui/SizeRating'; -import { translate } from '../../../../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure, localizeMetric } from '../../../../../../sonar-ui-common/helpers/measures'; +import SizeRating from '../../../../../../components/ui/SizeRating'; +import { translate } from '../../../../../../helpers/l10n'; +import { formatMeasure, localizeMetric } from '../../../../../../helpers/measures'; import { ComponentQualifier } from '../../../../../../types/component'; import { MetricKey } from '../../../../../../types/metrics'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaTags.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaTags.tsx index 436e556e50a..5cd57a46e5b 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaTags.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaTags.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { setApplicationTags, setProjectTags } from '../../../../../../api/components'; +import { ButtonLink } from '../../../../../../components/controls/buttons'; +import Dropdown from '../../../../../../components/controls/Dropdown'; import TagsList from '../../../../../../components/tags/TagsList'; -import { ButtonLink } from '../../../../../../sonar-ui-common/components/controls/buttons'; -import Dropdown from '../../../../../../sonar-ui-common/components/controls/Dropdown'; -import { PopupPlacement } from '../../../../../../sonar-ui-common/components/ui/popups'; -import { translate } from '../../../../../../sonar-ui-common/helpers/l10n'; +import { PopupPlacement } from '../../../../../../components/ui/popups'; +import { translate } from '../../../../../../helpers/l10n'; import { ComponentQualifier } from '../../../../../../types/component'; import MetaTagsSelector from './MetaTagsSelector'; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaLink-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaLink-test.tsx index 40cd393b23c..5b4a2933512 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaLink-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaLink-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { ClearButton } from '../../../../../../../sonar-ui-common/components/controls/buttons'; -import { click } from '../../../../../../../sonar-ui-common/helpers/testUtils'; +import { ClearButton } from '../../../../../../../components/controls/buttons'; +import { click } from '../../../../../../../helpers/testUtils'; import MetaLink from '../MetaLink'; const DANGEROUS_LINK = { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaQualityProfiles-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaQualityProfiles-test.tsx index 6ee4e139a51..79e9aff85da 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaQualityProfiles-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaQualityProfiles-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { searchRules } from '../../../../../../../api/rules'; import { mockLanguage, mockQualityProfile } from '../../../../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../../../helpers/testUtils'; import { MetaQualityProfiles } from '../MetaQualityProfiles'; jest.mock('../../../../../../../api/rules', () => { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/notifications/ProjectNotifications.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/notifications/ProjectNotifications.tsx index d3ac66106ea..835b0bf5255 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/notifications/ProjectNotifications.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/notifications/ProjectNotifications.tsx @@ -23,9 +23,9 @@ import { withNotifications, WithNotificationsProps } from '../../../../../../components/hoc/withNotifications'; -import { Alert } from '../../../../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../../../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../../../../../components/ui/Alert'; +import DeferredSpinner from '../../../../../../components/ui/DeferredSpinner'; +import { translate } from '../../../../../../helpers/l10n'; interface Props { component: T.Component; 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 4d749f8d175..fb04e40f614 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import NavBar from '../../../../sonar-ui-common/components/ui/NavBar'; +import NavBar from '../../../../components/ui/NavBar'; import { getAppState, getCurrentUser, Store } from '../../../../store/rootReducer'; import { rawSizes } from '../../../theme'; import EmbedDocsPopupHelper from '../../embed-docs-modal/EmbedDocsPopupHelper'; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.tsx index f6fc31230ee..1bd360c6a73 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../../sonar-ui-common/helpers/urls'; +import { translate } from '../../../../helpers/l10n'; +import { getBaseUrl } from '../../../../helpers/urls'; import { getGlobalSettingValue, Store } from '../../../../store/rootReducer'; interface StateProps { 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 5c5ba5c5ebc..7ce047bc85a 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 @@ -21,10 +21,10 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { Link } from 'react-router'; import { isMySet } from '../../../../apps/issues/utils'; +import Dropdown from '../../../../components/controls/Dropdown'; +import DropdownIcon from '../../../../components/icons/DropdownIcon'; +import { translate } from '../../../../helpers/l10n'; import { getQualityGatesUrl } from '../../../../helpers/urls'; -import Dropdown from '../../../../sonar-ui-common/components/controls/Dropdown'; -import DropdownIcon from '../../../../sonar-ui-common/components/icons/DropdownIcon'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; import { ComponentQualifier } from '../../../../types/component'; interface Props { 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 9620ba45a55..95a148fb1ee 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 @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import Dropdown from '../../../../components/controls/Dropdown'; import { Router, withRouter } from '../../../../components/hoc/withRouter'; import Avatar from '../../../../components/ui/Avatar'; +import { translate } from '../../../../helpers/l10n'; +import { getBaseUrl } from '../../../../helpers/urls'; import { isLoggedIn } from '../../../../helpers/users'; -import Dropdown from '../../../../sonar-ui-common/components/controls/Dropdown'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../../sonar-ui-common/helpers/urls'; import { rawSizes } from '../../../theme'; interface Props { 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 9804c9db9a7..b12247eeb24 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 @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import { GlobalNav, GlobalNavProps } from '../GlobalNav'; // Solve redux warning issue "No reducer provided for key": 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 80164dce4a3..664f80ee8e1 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 @@ -22,9 +22,9 @@ import { FormattedMessage } from 'react-intl'; import { cancelPendingPlugins } from '../../../../api/plugins'; import InstanceMessage from '../../../../components/common/InstanceMessage'; import RestartButton from '../../../../components/common/RestartButton'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../../components/controls/buttons'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate } from '../../../../helpers/l10n'; import { PendingPluginResult } from '../../../../types/plugins'; interface Props { 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 332a5d90ad2..0712fd67280 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 @@ -20,12 +20,12 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { IndexLink, Link } from 'react-router'; -import Dropdown from '../../../../sonar-ui-common/components/controls/Dropdown'; -import DropdownIcon from '../../../../sonar-ui-common/components/icons/DropdownIcon'; -import ContextNavBar from '../../../../sonar-ui-common/components/ui/ContextNavBar'; -import NavBarTabs from '../../../../sonar-ui-common/components/ui/NavBarTabs'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../../sonar-ui-common/helpers/urls'; +import Dropdown from '../../../../components/controls/Dropdown'; +import DropdownIcon from '../../../../components/icons/DropdownIcon'; +import ContextNavBar from '../../../../components/ui/ContextNavBar'; +import NavBarTabs from '../../../../components/ui/NavBarTabs'; +import { translate } from '../../../../helpers/l10n'; +import { getBaseUrl } from '../../../../helpers/urls'; import { AdminPageExtension } from '../../../../types/extension'; import { PendingPluginResult } from '../../../../types/plugins'; import { rawSizes } from '../../../theme'; 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 00c4c0eb2fc..6a15b1bd9a5 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 @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate } from '../../../../helpers/l10n'; import { getInstance } from '../../../../helpers/system'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; export default function SystemRestartNotif() { return ( diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx index a2067e576e0..13b89b464d0 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../../helpers/testUtils'; import PendingPluginsActionNotif from '../PendingPluginsActionNotif'; jest.mock('../../../../../api/plugins', () => ({ diff --git a/server/sonar-web/src/main/js/app/components/search/Search.tsx b/server/sonar-web/src/main/js/app/components/search/Search.tsx index f4b97fed26b..2804d3b0518 100644 --- a/server/sonar-web/src/main/js/app/components/search/Search.tsx +++ b/server/sonar-web/src/main/js/app/components/search/Search.tsx @@ -23,15 +23,15 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { withRouter, WithRouterProps } from 'react-router'; import { getSuggestions } from '../../../api/components'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import OutsideClickHandler from '../../../components/controls/OutsideClickHandler'; +import SearchBox from '../../../components/controls/SearchBox'; +import ClockIcon from '../../../components/icons/ClockIcon'; +import { lazyLoadComponent } from '../../../components/lazyLoadComponent'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { scrollToElement } from '../../../helpers/scrolling'; import { getComponentOverviewUrl } from '../../../helpers/urls'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import OutsideClickHandler from '../../../sonar-ui-common/components/controls/OutsideClickHandler'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import ClockIcon from '../../../sonar-ui-common/components/icons/ClockIcon'; -import { lazyLoadComponent } from '../../../sonar-ui-common/components/lazyLoadComponent'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; import { ComponentQualifier } from '../../../types/component'; import RecentHistory from '../RecentHistory'; import './Search.css'; diff --git a/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx b/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx index bdec79fe411..373dc60c173 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx +++ b/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx @@ -20,11 +20,11 @@ import * as React from 'react'; import { Link } from 'react-router'; import { ComponentQualifier } from '../../../../js/types/component'; +import Tooltip from '../../../components/controls/Tooltip'; +import ClockIcon from '../../../components/icons/ClockIcon'; +import FavoriteIcon from '../../../components/icons/FavoriteIcon'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; import { getComponentOverviewUrl } from '../../../helpers/urls'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import ClockIcon from '../../../sonar-ui-common/components/icons/ClockIcon'; -import FavoriteIcon from '../../../sonar-ui-common/components/icons/FavoriteIcon'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; import { ComponentResult } from './utils'; interface Props { diff --git a/server/sonar-web/src/main/js/app/components/search/SearchResults.tsx b/server/sonar-web/src/main/js/app/components/search/SearchResults.tsx index 6e5d82118a1..5b4d162e8d6 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchResults.tsx +++ b/server/sonar-web/src/main/js/app/components/search/SearchResults.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import SearchShowMore from './SearchShowMore'; import { ComponentResult, More, Results, sortQualifiers } from './utils'; diff --git a/server/sonar-web/src/main/js/app/components/search/SearchShowMore.tsx b/server/sonar-web/src/main/js/app/components/search/SearchShowMore.tsx index e73846ebeb5..b1840372b12 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchShowMore.tsx +++ b/server/sonar-web/src/main/js/app/components/search/SearchShowMore.tsx @@ -20,8 +20,8 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; interface Props { allowMore: boolean; diff --git a/server/sonar-web/src/main/js/app/components/search/__tests__/Search-test.tsx b/server/sonar-web/src/main/js/app/components/search/__tests__/Search-test.tsx index f786a336c16..d7ab82e39d1 100644 --- a/server/sonar-web/src/main/js/app/components/search/__tests__/Search-test.tsx +++ b/server/sonar-web/src/main/js/app/components/search/__tests__/Search-test.tsx @@ -20,7 +20,7 @@ import { shallow, ShallowWrapper } from 'enzyme'; import * as React from 'react'; import { mockRouter } from '../../../../helpers/testMocks'; -import { elementKeydown } from '../../../../sonar-ui-common/helpers/testUtils'; +import { elementKeydown } from '../../../../helpers/testUtils'; import { ComponentQualifier } from '../../../../types/component'; import { Search } from '../Search'; diff --git a/server/sonar-web/src/main/js/app/components/search/__tests__/SearchShowMore-test.tsx b/server/sonar-web/src/main/js/app/components/search/__tests__/SearchShowMore-test.tsx index db64602bebf..c8551171eb2 100644 --- a/server/sonar-web/src/main/js/app/components/search/__tests__/SearchShowMore-test.tsx +++ b/server/sonar-web/src/main/js/app/components/search/__tests__/SearchShowMore-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import SearchShowMore from '../SearchShowMore'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/app/index.ts b/server/sonar-web/src/main/js/app/index.ts index 7cc56e88bfa..cd7c28a8d01 100644 --- a/server/sonar-web/src/main/js/app/index.ts +++ b/server/sonar-web/src/main/js/app/index.ts @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { installExtensionsHandler, installWebAnalyticsHandler } from '../helpers/extensionsHandler'; +import SonarUiCommonInitializer from '../helpers/init'; import { loadL10nBundle } from '../helpers/l10n'; +import { parseJSON, request } from '../helpers/request'; import { getBaseUrl, getSystemStatus } from '../helpers/system'; -import SonarUiCommonInitializer from '../sonar-ui-common/helpers/init'; -import { parseJSON, request } from '../sonar-ui-common/helpers/request'; import './styles/sonar.css'; SonarUiCommonInitializer.setUrlContext(getBaseUrl()); 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 8f827f27129..612af27086c 100644 --- a/server/sonar-web/src/main/js/app/utils/handleRequiredAuthorization.ts +++ b/server/sonar-web/src/main/js/app/utils/handleRequiredAuthorization.ts @@ -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 getHistory from '../../sonar-ui-common/helpers/getHistory'; +import getHistory from '../../helpers/getHistory'; import { requireAuthorization } from '../../store/appState'; import getStore from './getStore'; 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 7edda98c752..cad20bda7b1 100644 --- a/server/sonar-web/src/main/js/app/utils/startReactApp.tsx +++ b/server/sonar-web/src/main/js/app/utils/startReactApp.tsx @@ -61,9 +61,9 @@ import usersRoutes from '../../apps/users/routes'; import webAPIRoutes from '../../apps/web-api/routes'; import webhooksRoutes from '../../apps/webhooks/routes'; import withIndexationGuard from '../../components/hoc/withIndexationGuard'; -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; -import { ThemeProvider } from '../../sonar-ui-common/components/theme'; -import getHistory from '../../sonar-ui-common/helpers/getHistory'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; +import { ThemeProvider } from '../../components/theme'; +import getHistory from '../../helpers/getHistory'; import App from '../components/App'; import GlobalContainer from '../components/GlobalContainer'; import { PageContext } from '../components/indexation/PageUnavailableDueToIndexation'; diff --git a/server/sonar-web/src/main/js/app/utils/throwGlobalError.ts b/server/sonar-web/src/main/js/app/utils/throwGlobalError.ts index 811062e45a2..e0faf715a79 100644 --- a/server/sonar-web/src/main/js/app/utils/throwGlobalError.ts +++ b/server/sonar-web/src/main/js/app/utils/throwGlobalError.ts @@ -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 { parseError } from '../../sonar-ui-common/helpers/request'; +import { parseError } from '../../helpers/request'; import { addGlobalErrorMessage } from '../../store/globalMessages'; import getStore from './getStore'; diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx index 869aecc4e12..56096b2673d 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx @@ -28,9 +28,9 @@ import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import withIndexationContext, { WithIndexationContextProps } from '../../../components/hoc/withIndexationContext'; +import { translate } from '../../../helpers/l10n'; +import { addWhitePageClass, removeWhitePageClass } from '../../../helpers/pages'; import { sanitizeString } from '../../../helpers/sanitize'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { addWhitePageClass, removeWhitePageClass } from '../../../sonar-ui-common/helpers/pages'; import { getAppState, getCurrentUser, diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.tsx index ab8ece04b32..06c3895fda8 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import ReadMore from './ReadMore'; const link = '/documentation/user-guide/issues/'; diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.tsx index 7ae2dd95bc8..dec68ff5227 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; const languages = [ { name: 'Java', url: 'https://redirect.sonarsource.com/plugins/java.html' }, diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.tsx index 3a3ec8f27e0..5866a83a6db 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import ReadMore from './ReadMore'; const link = '/documentation/user-guide/clean-as-you-code/'; diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutProjects.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutProjects.tsx index d071cfe88fc..c9d745e20f1 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutProjects.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutProjects.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; interface Props { count: number; diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.tsx index a491da67517..f97c42ab4b0 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import ReadMore from './ReadMore'; const link = '/documentation/user-guide/quality-gates/'; diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.tsx index f80bf8ee117..d2a97c43087 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import BugIcon from '../../../sonar-ui-common/components/icons/BugIcon'; -import CodeSmellIcon from '../../../sonar-ui-common/components/icons/CodeSmellIcon'; -import SecurityHotspotIcon from '../../../sonar-ui-common/components/icons/SecurityHotspotIcon'; -import VulnerabilityIcon from '../../../sonar-ui-common/components/icons/VulnerabilityIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import BugIcon from '../../../components/icons/BugIcon'; +import CodeSmellIcon from '../../../components/icons/CodeSmellIcon'; +import SecurityHotspotIcon from '../../../components/icons/SecurityHotspotIcon'; +import VulnerabilityIcon from '../../../components/icons/VulnerabilityIcon'; +import { translate } from '../../../helpers/l10n'; export default function AboutQualityModel() { return ( diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutScanners.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutScanners.tsx index a9db3de495e..bcbd9f92f57 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutScanners.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutScanners.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; const scanners = [ { diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutStandards.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutStandards.tsx index b39e7230cf8..b756bdbf0d4 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutStandards.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutStandards.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import TagsIcon from '../../../components/icons/TagsIcon'; +import { translate } from '../../../helpers/l10n'; import { getRulesUrl } from '../../../helpers/urls'; -import TagsIcon from '../../../sonar-ui-common/components/icons/TagsIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import ReadMore from './ReadMore'; const link = '/documentation/user-guide/rules/'; diff --git a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx index a7db1eb714d..7f3e3f06d03 100644 --- a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.tsx @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import BugIcon from '../../../components/icons/BugIcon'; +import CodeSmellIcon from '../../../components/icons/CodeSmellIcon'; +import VulnerabilityIcon from '../../../components/icons/VulnerabilityIcon'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { getIssuesUrl } from '../../../helpers/urls'; -import BugIcon from '../../../sonar-ui-common/components/icons/BugIcon'; -import CodeSmellIcon from '../../../sonar-ui-common/components/icons/CodeSmellIcon'; -import VulnerabilityIcon from '../../../sonar-ui-common/components/icons/VulnerabilityIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; export interface EntryIssueTypesProps { bugs?: number; diff --git a/server/sonar-web/src/main/js/apps/about/components/ReadMore.tsx b/server/sonar-web/src/main/js/apps/about/components/ReadMore.tsx index e5cc42affa0..9cd05e74d7c 100644 --- a/server/sonar-web/src/main/js/apps/about/components/ReadMore.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/ReadMore.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { link: string; diff --git a/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx b/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx index d9949372460..56da775ca17 100644 --- a/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/__tests__/AboutApp-test.tsx @@ -21,13 +21,13 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { searchProjects } from '../../../../api/components'; import { getFacet } from '../../../../api/issues'; +import { addWhitePageClass, removeWhitePageClass } from '../../../../helpers/pages'; import { mockCurrentUser, mockLocation } from '../../../../helpers/testMocks'; -import { addWhitePageClass, removeWhitePageClass } from '../../../../sonar-ui-common/helpers/pages'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { AboutApp } from '../AboutApp'; import EntryIssueTypes from '../EntryIssueTypes'; -jest.mock('../../../../sonar-ui-common/helpers/pages', () => ({ +jest.mock('../../../../helpers/pages', () => ({ addWhitePageClass: jest.fn(), removeWhitePageClass: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/about/routes.ts b/server/sonar-web/src/main/js/apps/about/routes.ts index 1efdc06f832..78799c787b0 100644 --- a/server/sonar-web/src/main/js/apps/about/routes.ts +++ b/server/sonar-web/src/main/js/apps/about/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { indexRoute: { component: lazyLoadComponent(() => import('./components/AboutApp')) } } diff --git a/server/sonar-web/src/main/js/apps/account/components/Account.tsx b/server/sonar-web/src/main/js/apps/account/components/Account.tsx index e4022fa52ba..2a8bd25fc0a 100644 --- a/server/sonar-web/src/main/js/apps/account/components/Account.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/Account.tsx @@ -22,8 +22,8 @@ import { Helmet } from 'react-helmet-async'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; -import handleRequiredAuthentication from '../../../sonar-ui-common/helpers/handleRequiredAuthentication'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication'; +import { translate } from '../../../helpers/l10n'; import '../account.css'; import Nav from './Nav'; import UserCard from './UserCard'; 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 001cf6f025b..4ff6be433b1 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { IndexLink, Link } from 'react-router'; -import NavBarTabs from '../../../sonar-ui-common/components/ui/NavBarTabs'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import NavBarTabs from '../../../components/ui/NavBarTabs'; +import { translate } from '../../../helpers/l10n'; export default function Nav() { return ( diff --git a/server/sonar-web/src/main/js/apps/account/components/Security.tsx b/server/sonar-web/src/main/js/apps/account/components/Security.tsx index 8f06d4150f5..18a387913d0 100644 --- a/server/sonar-web/src/main/js/apps/account/components/Security.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/Security.tsx @@ -21,7 +21,7 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { connect } from 'react-redux'; import ResetPasswordForm from '../../../components/common/ResetPasswordForm'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { getCurrentUser, Store } from '../../../store/rootReducer'; import Tokens from './Tokens'; diff --git a/server/sonar-web/src/main/js/apps/account/components/Tokens.tsx b/server/sonar-web/src/main/js/apps/account/components/Tokens.tsx index 24132821d10..d195ce5e735 100644 --- a/server/sonar-web/src/main/js/apps/account/components/Tokens.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/Tokens.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import InstanceMessage from '../../../components/common/InstanceMessage'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import TokensForm from '../../users/components/TokensForm'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/account/components/__tests__/Account-test.tsx b/server/sonar-web/src/main/js/apps/account/components/__tests__/Account-test.tsx index 600e95053fa..fc0a840742a 100644 --- a/server/sonar-web/src/main/js/apps/account/components/__tests__/Account-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/__tests__/Account-test.tsx @@ -19,11 +19,11 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import handleRequiredAuthentication from '../../../../helpers/handleRequiredAuthentication'; import { mockCurrentUser } from '../../../../helpers/testMocks'; -import handleRequiredAuthentication from '../../../../sonar-ui-common/helpers/handleRequiredAuthentication'; import { Account } from '../Account'; -jest.mock('../../../../sonar-ui-common/helpers/handleRequiredAuthentication', () => ({ +jest.mock('../../../../helpers/handleRequiredAuthentication', () => ({ default: jest.fn() })); 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 6f1dec2f624..22258c60a21 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { translate } from '../../../helpers/l10n'; import { isSonarCloud } from '../../../helpers/system'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import NotificationsList from './NotificationsList'; import SonarCloudNotifications from './SonarCloudNotifications'; 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 88983c7c261..1e689e48a75 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 @@ -24,9 +24,9 @@ import { withNotifications, WithNotificationsProps } from '../../../components/hoc/withNotifications'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import GlobalNotifications from './GlobalNotifications'; import Projects from './Projects'; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.tsx b/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.tsx index cd91caeb8aa..1dce17fd8b7 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Checkbox from '../../../sonar-ui-common/components/controls/Checkbox'; -import { hasMessage, translate } from '../../../sonar-ui-common/helpers/l10n'; +import Checkbox from '../../../components/controls/Checkbox'; +import { hasMessage, translate } from '../../../helpers/l10n'; interface Props { onAdd: (n: T.Notification) => void; 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 f917be101ea..e8d335fc3f9 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 @@ -21,14 +21,11 @@ import * as classNames from 'classnames'; import { debounce } from 'lodash'; import * as React from 'react'; import { getSuggestions } from '../../../api/components'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import SearchBox from '../../../components/controls/SearchBox'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import { translate } from '../../../helpers/l10n'; interface Props { addedProjects: T.NotificationProject[]; 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 688a6555f5b..3e749bda992 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import BoxedGroupAccordion from '../../../sonar-ui-common/components/controls/BoxedGroupAccordion'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion'; +import { translate } from '../../../helpers/l10n'; import NotificationsList from './NotificationsList'; interface Props { 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 91317b068e9..cd3e69acd19 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 { groupBy, sortBy, uniqBy } from 'lodash'; import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import SearchBox from '../../../components/controls/SearchBox'; +import { translate } from '../../../helpers/l10n'; import ProjectModal from './ProjectModal'; import ProjectNotifications from './ProjectNotifications'; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/SonarCloudNotifications.tsx b/server/sonar-web/src/main/js/apps/account/notifications/SonarCloudNotifications.tsx index bf1b4f084b5..d74356148e9 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/SonarCloudNotifications.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/SonarCloudNotifications.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import Checkbox from '../../../sonar-ui-common/components/controls/Checkbox'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Checkbox from '../../../components/controls/Checkbox'; +import { translate } from '../../../helpers/l10n'; import { getCurrentUserSetting, Store } from '../../../store/rootReducer'; import { setCurrentUserSetting } from '../../../store/users'; diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.tsx b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.tsx index 96487394db7..aec6528793e 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.tsx @@ -19,12 +19,12 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import Checkbox from '../../../../sonar-ui-common/components/controls/Checkbox'; -import { hasMessage } from '../../../../sonar-ui-common/helpers/l10n'; +import Checkbox from '../../../../components/controls/Checkbox'; +import { hasMessage } from '../../../../helpers/l10n'; import NotificationsList from '../NotificationsList'; -jest.mock('../../../../sonar-ui-common/helpers/l10n', () => ({ - ...jest.requireActual('../../../../sonar-ui-common/helpers/l10n'), +jest.mock('../../../../helpers/l10n', () => ({ + ...jest.requireActual('../../../../helpers/l10n'), hasMessage: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectModal-test.tsx b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectModal-test.tsx index b67434ebe87..e8707186222 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectModal-test.tsx @@ -20,12 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getSuggestions } from '../../../../api/components'; -import { - change, - elementKeydown, - submit, - waitAndUpdate -} from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, elementKeydown, submit, waitAndUpdate } from '../../../../helpers/testUtils'; import ProjectModal from '../ProjectModal'; jest.mock('../../../../api/components', () => ({ diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-test.tsx b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-test.tsx index 03f125ca9b1..3ca37e8ac0b 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import Projects from '../Projects'; jest.mock('../../../../api/components', () => ({ 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 36427183199..7eaa6093c49 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import UserExternalIdentity from './UserExternalIdentity'; export interface ProfileProps { 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 516b2b8c04a..822785ab572 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 @@ -20,8 +20,8 @@ import * as React from 'react'; import { getIdentityProviders } from '../../../api/users'; import { colors } from '../../../app/theme'; -import { getTextColor } from '../../../sonar-ui-common/helpers/colors'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { getTextColor } from '../../../helpers/colors'; +import { getBaseUrl } from '../../../helpers/urls'; export interface UserExternalIdentityProps { user: T.LoggedInUser; diff --git a/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserExternalIdentity-test.tsx b/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserExternalIdentity-test.tsx index 92656791ea0..c854df2b9df 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserExternalIdentity-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/profile/__tests__/UserExternalIdentity-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockLoggedInUser } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import UserExternalIdentity, { UserExternalIdentityProps } from '../UserExternalIdentity'; jest.mock('../../../../api/users', () => ({ 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 2fda699e227..36bc2a46a6e 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 @@ -20,12 +20,12 @@ import * as React from 'react'; import { Link } from 'react-router'; import MetaLink from '../../../app/components/nav/component/projectInformation/meta/MetaLink'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import Level from '../../../components/ui/Level'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { orderLinks } from '../../../helpers/projectLinks'; import { getProjectUrl } from '../../../helpers/urls'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import Level from '../../../sonar-ui-common/components/ui/Level'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; interface Props { project: T.MyProject; 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 e60e529188c..8ec4500ade3 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import ListFooter from '../../../components/controls/ListFooter'; +import { translate } from '../../../helpers/l10n'; import ProjectCard from './ProjectCard'; interface Props { 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 dd3e5d4d270..3c737a10da0 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 @@ -20,7 +20,7 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { getMyProjects } from '../../../api/components'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import Projects from './Projects'; interface State { diff --git a/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-test.tsx b/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-test.tsx index 246673515dc..5adabac5bc0 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-test.tsx +++ b/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import ListFooter from '../../../../sonar-ui-common/components/controls/ListFooter'; +import ListFooter from '../../../../components/controls/ListFooter'; import ProjectCard from '../ProjectCard'; import Projects from '../Projects'; diff --git a/server/sonar-web/src/main/js/apps/account/routes.ts b/server/sonar-web/src/main/js/apps/account/routes.ts index 6c850464b22..99771d947e8 100644 --- a/server/sonar-web/src/main/js/apps/account/routes.ts +++ b/server/sonar-web/src/main/js/apps/account/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { diff --git a/server/sonar-web/src/main/js/apps/application-console/ApplicationBranches.tsx b/server/sonar-web/src/main/js/apps/application-console/ApplicationBranches.tsx index f447f649b1e..47b1b8c572e 100644 --- a/server/sonar-web/src/main/js/apps/application-console/ApplicationBranches.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/ApplicationBranches.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../components/controls/buttons'; +import { translate } from '../../helpers/l10n'; import { Application } from '../../types/application'; import ApplicationProjectBranch from './ApplicationProjectBranch'; import CreateBranchForm from './CreateBranchForm'; diff --git a/server/sonar-web/src/main/js/apps/application-console/ApplicationConsoleApp.tsx b/server/sonar-web/src/main/js/apps/application-console/ApplicationConsoleApp.tsx index dc908a24db6..e35bbd4b2a6 100644 --- a/server/sonar-web/src/main/js/apps/application-console/ApplicationConsoleApp.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/ApplicationConsoleApp.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { InjectedRouter } from 'react-router'; import { editApplication, getApplicationDetails, refreshApplication } from '../../api/application'; import addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import { Application, ApplicationProject } from '../../types/application'; import ApplicationConsoleAppRenderer from './ApplicationConsoleAppRenderer'; import { ApplicationBranch } from './utils'; diff --git a/server/sonar-web/src/main/js/apps/application-console/ApplicationConsoleAppRenderer.tsx b/server/sonar-web/src/main/js/apps/application-console/ApplicationConsoleAppRenderer.tsx index 4b3319244d8..b12ee45bd08 100644 --- a/server/sonar-web/src/main/js/apps/application-console/ApplicationConsoleAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/ApplicationConsoleAppRenderer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../components/controls/buttons'; +import { translate } from '../../helpers/l10n'; import { Application, ApplicationProject } from '../../types/application'; import { Branch } from '../../types/branch-like'; import ApplicationBranches from './ApplicationBranches'; diff --git a/server/sonar-web/src/main/js/apps/application-console/ApplicationProjectBranch.tsx b/server/sonar-web/src/main/js/apps/application-console/ApplicationProjectBranch.tsx index bfc6edb8c39..dc96ed3aedd 100644 --- a/server/sonar-web/src/main/js/apps/application-console/ApplicationProjectBranch.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/ApplicationProjectBranch.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import BranchIcon from '../../sonar-ui-common/components/icons/BranchIcon'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import BranchIcon from '../../components/icons/BranchIcon'; +import { translate } from '../../helpers/l10n'; import { Application } from '../../types/application'; import BranchRowActions from './BranchRowActions'; import { ApplicationBranch } from './utils'; diff --git a/server/sonar-web/src/main/js/apps/application-console/ApplicationProjects.tsx b/server/sonar-web/src/main/js/apps/application-console/ApplicationProjects.tsx index ed48c688cea..d1cf0d1a682 100644 --- a/server/sonar-web/src/main/js/apps/application-console/ApplicationProjects.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/ApplicationProjects.tsx @@ -27,8 +27,8 @@ import { import SelectList, { SelectListFilter, SelectListSearchParams -} from '../../sonar-ui-common/components/controls/SelectList'; -import QualifierIcon from '../../sonar-ui-common/components/icons/QualifierIcon'; +} from '../../components/controls/SelectList'; +import QualifierIcon from '../../components/icons/QualifierIcon'; import { Application, ApplicationProject } from '../../types/application'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/application-console/BranchRowActions.tsx b/server/sonar-web/src/main/js/apps/application-console/BranchRowActions.tsx index 884c8010db5..c62245f90e2 100644 --- a/server/sonar-web/src/main/js/apps/application-console/BranchRowActions.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/BranchRowActions.tsx @@ -20,11 +20,9 @@ import { without } from 'lodash'; import * as React from 'react'; import { deleteApplicationBranch } from '../../api/application'; -import ActionsDropdown, { - ActionsDropdownItem -} from '../../sonar-ui-common/components/controls/ActionsDropdown'; -import ConfirmButton from '../../sonar-ui-common/components/controls/ConfirmButton'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import ActionsDropdown, { ActionsDropdownItem } from '../../components/controls/ActionsDropdown'; +import ConfirmButton from '../../components/controls/ConfirmButton'; +import { translate, translateWithParameters } from '../../helpers/l10n'; import { Application } from '../../types/application'; import CreateBranchForm from './CreateBranchForm'; import { ApplicationBranch } from './utils'; diff --git a/server/sonar-web/src/main/js/apps/application-console/BranchSelectItem.tsx b/server/sonar-web/src/main/js/apps/application-console/BranchSelectItem.tsx index 0f133fe0d91..439bc4d742c 100644 --- a/server/sonar-web/src/main/js/apps/application-console/BranchSelectItem.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/BranchSelectItem.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; -import BranchIcon from '../../sonar-ui-common/components/icons/BranchIcon'; +import Tooltip from '../../components/controls/Tooltip'; +import BranchIcon from '../../components/icons/BranchIcon'; export interface Option { label: string; diff --git a/server/sonar-web/src/main/js/apps/application-console/CreateBranchForm.tsx b/server/sonar-web/src/main/js/apps/application-console/CreateBranchForm.tsx index 17ccbc37106..8b25d018c77 100644 --- a/server/sonar-web/src/main/js/apps/application-console/CreateBranchForm.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/CreateBranchForm.tsx @@ -24,12 +24,12 @@ import { getApplicationDetails, updateApplicationBranch } from '../../api/application'; -import { ResetButtonLink, SubmitButton } from '../../sonar-ui-common/components/controls/buttons'; -import SimpleModal from '../../sonar-ui-common/components/controls/SimpleModal'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import MandatoryFieldMarker from '../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../components/controls/buttons'; +import SimpleModal from '../../components/controls/SimpleModal'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; +import MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../helpers/l10n'; import { Application, ApplicationProject } from '../../types/application'; import ProjectBranchRow from './ProjectBranchRow'; import { ApplicationBranch, SelectBranchOption } from './utils'; diff --git a/server/sonar-web/src/main/js/apps/application-console/EditForm.tsx b/server/sonar-web/src/main/js/apps/application-console/EditForm.tsx index 6634ed80a3a..6e1cd3f2033 100644 --- a/server/sonar-web/src/main/js/apps/application-console/EditForm.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/EditForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ResetButtonLink, SubmitButton } from '../../sonar-ui-common/components/controls/buttons'; -import SimpleModal from '../../sonar-ui-common/components/controls/SimpleModal'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../components/controls/buttons'; +import SimpleModal from '../../components/controls/SimpleModal'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; +import { translate } from '../../helpers/l10n'; import { Application } from '../../types/application'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/application-console/ProjectBranchRow.tsx b/server/sonar-web/src/main/js/apps/application-console/ProjectBranchRow.tsx index 9ac6938b6f9..746b1fb7609 100644 --- a/server/sonar-web/src/main/js/apps/application-console/ProjectBranchRow.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/ProjectBranchRow.tsx @@ -20,11 +20,11 @@ import { orderBy } from 'lodash'; import * as React from 'react'; import { getBranches } from '../../api/branches'; -import Checkbox from '../../sonar-ui-common/components/controls/Checkbox'; -import Select from '../../sonar-ui-common/components/controls/Select'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; -import QualifierIcon from '../../sonar-ui-common/components/icons/QualifierIcon'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; +import Checkbox from '../../components/controls/Checkbox'; +import Select from '../../components/controls/Select'; +import Tooltip from '../../components/controls/Tooltip'; +import QualifierIcon from '../../components/icons/QualifierIcon'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; import { ApplicationProject } from '../../types/application'; import BranchSelectItem from './BranchSelectItem'; import { ApplicationBranch, SelectBranchOption } from './utils'; diff --git a/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationConsoleApp-test.tsx b/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationConsoleApp-test.tsx index 67ad87d2417..f0e2a1c9bfa 100644 --- a/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationConsoleApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationConsoleApp-test.tsx @@ -27,7 +27,7 @@ import { import addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage'; import { mockApplication, mockApplicationProject } from '../../../helpers/mocks/application'; import { mockLocation, mockRouter } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { Application } from '../../../types/application'; import ApplicationConsoleApp from '../ApplicationConsoleApp'; diff --git a/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationConsoleRender-test.tsx b/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationConsoleRender-test.tsx index 1e0fa1c2290..da5952a1965 100644 --- a/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationConsoleRender-test.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationConsoleRender-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockApplication } from '../../../helpers/mocks/application'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import ApplicationConsoleAppRenderer, { ApplicationConsoleAppRendererProps } from '../ApplicationConsoleAppRenderer'; diff --git a/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationProjects-test.tsx b/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationProjects-test.tsx index 5832ae841a5..ded53e11350 100644 --- a/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationProjects-test.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/__tests__/ApplicationProjects-test.tsx @@ -24,11 +24,9 @@ import { getApplicationProjects, removeProjectFromApplication } from '../../../api/application'; +import SelectList, { SelectListFilter } from '../../../components/controls/SelectList'; import { mockApplication } from '../../../helpers/mocks/application'; -import SelectList, { - SelectListFilter -} from '../../../sonar-ui-common/components/controls/SelectList'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import ApplicationProjects from '../ApplicationProjects'; jest.mock('../../../api/application', () => ({ diff --git a/server/sonar-web/src/main/js/apps/application-console/__tests__/CreateBranchForm-test.tsx b/server/sonar-web/src/main/js/apps/application-console/__tests__/CreateBranchForm-test.tsx index a2ca0af6200..383dfc1cbba 100644 --- a/server/sonar-web/src/main/js/apps/application-console/__tests__/CreateBranchForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/__tests__/CreateBranchForm-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getApplicationDetails } from '../../../api/application'; import { mockApplication, mockApplicationProject } from '../../../helpers/mocks/application'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { Application } from '../../../types/application'; import CreateBranchForm from '../CreateBranchForm'; diff --git a/server/sonar-web/src/main/js/apps/application-console/__tests__/EditForm-test.tsx b/server/sonar-web/src/main/js/apps/application-console/__tests__/EditForm-test.tsx index bcf6128fd31..d2b66b36351 100644 --- a/server/sonar-web/src/main/js/apps/application-console/__tests__/EditForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/application-console/__tests__/EditForm-test.tsx @@ -20,9 +20,9 @@ import { shallow } from 'enzyme'; import * as React from 'react'; +import SimpleModal from '../../../components/controls/SimpleModal'; import { mockApplication } from '../../../helpers/mocks/application'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import { change, waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { change, waitAndUpdate } from '../../../helpers/testUtils'; import EditForm from '../EditForm'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/application-console/routes.ts b/server/sonar-web/src/main/js/apps/application-console/routes.ts index 7b34efc7ca0..47601e1a1d3 100644 --- a/server/sonar-web/src/main/js/apps/application-console/routes.ts +++ b/server/sonar-web/src/main/js/apps/application-console/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { diff --git a/server/sonar-web/src/main/js/apps/application-settings/ApplicationSettingsApp.tsx b/server/sonar-web/src/main/js/apps/application-settings/ApplicationSettingsApp.tsx index dffd53076ed..a6c6617d2da 100644 --- a/server/sonar-web/src/main/js/apps/application-settings/ApplicationSettingsApp.tsx +++ b/server/sonar-web/src/main/js/apps/application-settings/ApplicationSettingsApp.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { getDefinitions, getValues, setSimpleSettingValue } from '../../api/settings'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; +import { translate } from '../../helpers/l10n'; import { SettingCategoryDefinition, SettingsKey } from '../../types/settings'; import ReportFrequencyForm from './ReportFrequencyForm'; diff --git a/server/sonar-web/src/main/js/apps/application-settings/ReportFrequencyForm.tsx b/server/sonar-web/src/main/js/apps/application-settings/ReportFrequencyForm.tsx index 953875aee35..b2384ab7908 100644 --- a/server/sonar-web/src/main/js/apps/application-settings/ReportFrequencyForm.tsx +++ b/server/sonar-web/src/main/js/apps/application-settings/ReportFrequencyForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Button, ResetButtonLink } from '../../components/controls/buttons'; +import Select from '../../components/controls/Select'; +import { translate } from '../../helpers/l10n'; import { sanitizeStringRestricted } from '../../helpers/sanitize'; -import { Button, ResetButtonLink } from '../../sonar-ui-common/components/controls/buttons'; -import Select from '../../sonar-ui-common/components/controls/Select'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; import { SettingCategoryDefinition } from '../../types/settings'; export interface ReportFrequencyFormProps { diff --git a/server/sonar-web/src/main/js/apps/application-settings/__tests__/ApplicationSettingsApp-test.tsx b/server/sonar-web/src/main/js/apps/application-settings/__tests__/ApplicationSettingsApp-test.tsx index 8e1bee7ec4a..08a39bee4cc 100644 --- a/server/sonar-web/src/main/js/apps/application-settings/__tests__/ApplicationSettingsApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/application-settings/__tests__/ApplicationSettingsApp-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { setSimpleSettingValue } from '../../../api/settings'; import { mockComponent } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { SettingsKey } from '../../../types/settings'; import ApplicationSettingsApp from '../ApplicationSettingsApp'; diff --git a/server/sonar-web/src/main/js/apps/application-settings/__tests__/ReportFrequencyForm-test.tsx b/server/sonar-web/src/main/js/apps/application-settings/__tests__/ReportFrequencyForm-test.tsx index ed43a300e8c..7d91a1bf6ec 100644 --- a/server/sonar-web/src/main/js/apps/application-settings/__tests__/ReportFrequencyForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/application-settings/__tests__/ReportFrequencyForm-test.tsx @@ -19,9 +19,9 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { Button, ResetButtonLink } from '../../../components/controls/buttons'; +import Select from '../../../components/controls/Select'; import { mockDefinition } from '../../../helpers/mocks/settings'; -import { Button, ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Select from '../../../sonar-ui-common/components/controls/Select'; import ReportFrequencyForm, { ReportFrequencyFormProps } from '../ReportFrequencyForm'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/application-settings/routes.ts b/server/sonar-web/src/main/js/apps/application-settings/routes.ts index 59093a32169..e1f12d9d8ad 100644 --- a/server/sonar-web/src/main/js/apps/application-settings/routes.ts +++ b/server/sonar-web/src/main/js/apps/application-settings/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 a3afed7887d..07acfb5ce0d 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 @@ -24,8 +24,8 @@ import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import DateRangeInput from '../../../components/controls/DateRangeInput'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Radio from '../../../components/controls/Radio'; +import { translate } from '../../../helpers/l10n'; import '../style.css'; import { HousekeepingPolicy, now, RangeOption } from '../utils'; import DownloadButton from './DownloadButton'; 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 1e53ba65439..2b9c748d033 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 @@ -20,8 +20,8 @@ import * as classNames from 'classnames'; import { endOfDay, startOfDay, subDays } from 'date-fns'; import * as React from 'react'; +import { translate } from '../../../helpers/l10n'; import { getBaseUrl } from '../../../helpers/system'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import '../style.css'; import { now, RangeOption } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/AuditApp-test.tsx b/server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/AuditApp-test.tsx index ab66c6aba24..9e5278afb70 100644 --- a/server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/AuditApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/AuditApp-test.tsx @@ -20,7 +20,7 @@ import { subDays } from 'date-fns'; import { shallow } from 'enzyme'; import * as React from 'react'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { HousekeepingPolicy, RangeOption } from '../../utils'; import { AuditApp } from '../AuditApp'; import AuditAppRenderer from '../AuditAppRenderer'; diff --git a/server/sonar-web/src/main/js/apps/audit-logs/routes.ts b/server/sonar-web/src/main/js/apps/audit-logs/routes.ts index 31b4218a283..dfcad720660 100644 --- a/server/sonar-web/src/main/js/apps/audit-logs/routes.ts +++ b/server/sonar-web/src/main/js/apps/audit-logs/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-test.tsx index 3761e939f64..5ff2b86955b 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import Search from '../components/Search'; import { DEFAULT_FILTERS } from '../constants'; import { formatDuration } from '../utils'; 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 62e893f2e71..3c77ed5c9d0 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 @@ -29,9 +29,9 @@ import { } from '../../../api/ce'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import { Location, Router } from '../../../components/hoc/withRouter'; -import { toShortNotSoISOString } from '../../../sonar-ui-common/helpers/dates'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { parseAsDate } from '../../../sonar-ui-common/helpers/query'; +import { toShortNotSoISOString } from '../../../helpers/dates'; +import { translate } from '../../../helpers/l10n'; +import { parseAsDate } from '../../../helpers/query'; import { Task, TaskStatuses } from '../../../types/tasks'; import '../background-tasks.css'; import { CURRENTS, DEBOUNCE_DELAY, DEFAULT_FILTERS } from '../constants'; 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 84ff9609ce3..1b69dff9494 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Checkbox from '../../../sonar-ui-common/components/controls/Checkbox'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Checkbox from '../../../components/controls/Checkbox'; +import { translate } from '../../../helpers/l10n'; import { CURRENTS } from '../constants'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Footer.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Footer.tsx index bbda3058eae..b26cf54a9e5 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Footer.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Footer.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translateWithParameters } from '../../../helpers/l10n'; import { Task } from '../../../types/tasks'; const LIMIT = 1000; 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 ae270f0866a..d41473530dc 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import Workers from './Workers'; interface Props { 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 70232ce3c6e..f80bedde87e 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export default function NoWorkersSupportPopup() { return ( 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 b814c439548..3464678d9e0 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,8 +19,8 @@ */ import * as React from 'react'; import { getTask } from '../../../api/ce'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Modal from '../../../components/controls/Modal'; +import { translate } from '../../../helpers/l10n'; import { Task } from '../../../types/tasks'; interface Props { 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 11e49e5296e..6650004bbb1 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import SearchBox from '../../../components/controls/SearchBox'; +import { translate } from '../../../helpers/l10n'; import { DEFAULT_FILTERS } from '../constants'; import { Query } from '../utils'; import CurrentsFilter from './CurrentsFilter'; 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 7e5cbec6300..353aa69fbf3 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { getTask } from '../../../api/ce'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Modal from '../../../components/controls/Modal'; +import { translate } from '../../../helpers/l10n'; import { Task } from '../../../types/tasks'; interface Props { 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 fd9c216871c..5b167426352 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 @@ -20,10 +20,10 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { colors } from '../../../app/theme'; -import { ClearButton } from '../../../sonar-ui-common/components/controls/buttons'; -import ConfirmButton from '../../../sonar-ui-common/components/controls/ConfirmButton'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ClearButton } from '../../../components/controls/buttons'; +import ConfirmButton from '../../../components/controls/ConfirmButton'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate } from '../../../helpers/l10n'; import { getAppState, Store } from '../../../store/rootReducer'; export interface Props { 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 61022dbc0f2..23d0b3b3294 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; // Do not display the pending time for values smaller than this threshold (in ms) const MIN_PENDING_TIME_THRESHOLD = 1000; 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 d4c6d436345..462a7df6879 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { translate } from '../../../helpers/l10n'; export interface Props { className?: string; 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 6d66537cbe2..3559243ffab 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Select from '../../../components/controls/Select'; +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/TaskActions.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskActions.tsx index 4e243a1ef63..68f020ae66f 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 @@ -18,12 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ActionsDropdown, { - ActionsDropdownItem -} from '../../../sonar-ui-common/components/controls/ActionsDropdown'; -import ConfirmModal from '../../../sonar-ui-common/components/controls/ConfirmModal'; -import { lazyLoadComponent } from '../../../sonar-ui-common/components/lazyLoadComponent'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import ActionsDropdown, { ActionsDropdownItem } from '../../../components/controls/ActionsDropdown'; +import ConfirmModal from '../../../components/controls/ConfirmModal'; +import { lazyLoadComponent } from '../../../components/lazyLoadComponent'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Task, TaskStatuses } from '../../../types/tasks'; import ScannerContext from './ScannerContext'; import Stacktrace from './Stacktrace'; 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 d61a048b5c3..c5400768707 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 @@ -19,15 +19,15 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import BranchIcon from '../../../components/icons/BranchIcon'; +import PullRequestIcon from '../../../components/icons/PullRequestIcon'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; import { getBranchUrl, getPortfolioUrl, getProjectUrl, getPullRequestUrl } from '../../../helpers/urls'; -import BranchIcon from '../../../sonar-ui-common/components/icons/BranchIcon'; -import PullRequestIcon from '../../../sonar-ui-common/components/icons/PullRequestIcon'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; import { isPortfolioLike } from '../../../types/component'; import { Task } from '../../../types/tasks'; import TaskType from './TaskType'; 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 e717e76ddd3..146f2bbc3ed 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 @@ -19,8 +19,8 @@ */ import * as differenceInDays from 'date-fns/difference_in_days'; import * as React from 'react'; -import TimeFormatter from '../../../sonar-ui-common/components/intl/TimeFormatter'; -import { isValidDate, parseDate } from '../../../sonar-ui-common/helpers/dates'; +import TimeFormatter from '../../../components/intl/TimeFormatter'; +import { isValidDate, parseDate } from '../../../helpers/dates'; interface Props { date?: string; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.tsx index ce2573709e0..805c7e108be 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.tsx @@ -19,8 +19,8 @@ */ import * as isSameDay from 'date-fns/is_same_day'; import * as React from 'react'; -import DateFormatter from '../../../sonar-ui-common/components/intl/DateFormatter'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import DateFormatter from '../../../components/intl/DateFormatter'; +import { parseDate } from '../../../helpers/dates'; interface Props { submittedAt: 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 bcf1a205df1..362bba11185 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import PendingIcon from '../../../sonar-ui-common/components/icons/PendingIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import PendingIcon from '../../../components/icons/PendingIcon'; +import { translate } from '../../../helpers/l10n'; import { TaskStatuses } from '../../../types/tasks'; interface Props { 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 e0037630169..07703f34966 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { submitter?: string; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskType.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskType.tsx index 2c0cc058a04..2d0e2a759c9 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskType.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskType.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { type: string; 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 19a08461d49..bc9d0898b4a 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 @@ -19,7 +19,7 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Task as ITask } from '../../../types/tasks'; import Task from './Task'; 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 e810c07b6f2..26f83abbfbf 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Select from '../../../components/controls/Select'; +import { translate } from '../../../helpers/l10n'; import { ALL_TYPES } from '../constants'; interface Props { 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 030bf9de172..a9c5029025c 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 @@ -20,12 +20,12 @@ import * as React from 'react'; import { getWorkers } from '../../../api/ce'; import { colors } from '../../../app/theme'; -import { EditButton } from '../../../sonar-ui-common/components/controls/buttons'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import AlertWarnIcon from '../../../sonar-ui-common/components/icons/AlertWarnIcon'; -import PlusCircleIcon from '../../../sonar-ui-common/components/icons/PlusCircleIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { EditButton } from '../../../components/controls/buttons'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import Tooltip from '../../../components/controls/Tooltip'; +import AlertWarnIcon from '../../../components/icons/AlertWarnIcon'; +import PlusCircleIcon from '../../../components/icons/PlusCircleIcon'; +import { translate } from '../../../helpers/l10n'; import NoWorkersSupportPopup from './NoWorkersSupportPopup'; import WorkersForm from './WorkersForm'; 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 4a59103ab7a..0264513dd33 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 @@ -19,14 +19,11 @@ */ import * as React from 'react'; import { setWorkerCount } from '../../../api/ce'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import Select from '../../../components/controls/Select'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; const MAX_WORKERS = 10; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/BackgroundTasksApp-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/BackgroundTasksApp-test.tsx index 658fdb34c7f..0b62bedded7 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/BackgroundTasksApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/BackgroundTasksApp-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import BackgroundTasksApp from '../BackgroundTasksApp'; jest.mock('../../../../api/ce', () => ({ diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx index f2bffffd391..7c9a3d4871a 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/ScannerContext-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockTask } from '../../../../helpers/mocks/tasks'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import { TaskTypes } from '../../../../types/tasks'; import ScannerContext from '../ScannerContext'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx index 89dc9bbe300..2d1246c57bb 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Stacktrace-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockTask } from '../../../../helpers/mocks/tasks'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import { TaskTypes } from '../../../../types/tasks'; import Stacktrace from '../Stacktrace'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatStillFailing-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatStillFailing-test.tsx index 5cb8a6c9325..a99de8ef5ef 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatStillFailing-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/StatStillFailing-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import StatStillFailing, { Props } from '../StatStillFailing'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskActions-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskActions-test.tsx index d2293f322fd..d49849cc957 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/TaskActions-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockTask } from '../../../../helpers/mocks/tasks'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import { Task, TaskStatuses } from '../../../../types/tasks'; import TaskActions from '../TaskActions'; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Workers-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Workers-test.tsx index c65e2ab12f5..cb12bf9107b 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Workers-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/Workers-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import Workers from '../Workers'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/WorkersForm-test.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/WorkersForm-test.tsx index fe7c50e9840..3e6d8f3737b 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/WorkersForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/WorkersForm-test.tsx @@ -24,7 +24,7 @@ jest.mock('../../../../api/ce', () => ({ import { shallow } from 'enzyme'; import * as React from 'react'; -import { submit } from '../../../../sonar-ui-common/helpers/testUtils'; +import { submit } from '../../../../helpers/testUtils'; import WorkersForm from '../WorkersForm'; it('changes select', () => { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/routes.ts b/server/sonar-web/src/main/js/apps/background-tasks/routes.ts index 9a9a94bf5b8..e8c7c4595b8 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/routes.ts +++ b/server/sonar-web/src/main/js/apps/background-tasks/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 28a8cad3b12..f248c5eb0a8 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,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 { toShortNotSoISOString } from '../../sonar-ui-common/helpers/dates'; +import { toShortNotSoISOString } from '../../helpers/dates'; import { Task, TaskStatuses } from '../../types/tasks'; import { ALL_TYPES, CURRENTS, STATUSES } from './constants'; 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 ec231e77c85..d59c0b9ee04 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 @@ -19,13 +19,13 @@ */ import * as React from 'react'; import GlobalMessagesContainer from '../../app/components/GlobalMessagesContainer'; +import { SubmitButton } from '../../components/controls/buttons'; import { Location } from '../../components/hoc/withRouter'; -import { SubmitButton } from '../../sonar-ui-common/components/controls/buttons'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import MandatoryFieldMarker from '../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { getReturnUrl } from '../../sonar-ui-common/helpers/urls'; +import { Alert } from '../../components/ui/Alert'; +import MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../helpers/l10n'; +import { getReturnUrl } from '../../helpers/urls'; import Unauthorized from '../sessions/components/Unauthorized'; import { DEFAULT_ADMIN_PASSWORD } from './constants'; diff --git a/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordApp-test.tsx b/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordApp-test.tsx index ea55b97f72a..1cd88813e6c 100644 --- a/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordApp-test.tsx @@ -22,7 +22,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { changePassword } from '../../../api/users'; import { mockLocation } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { getAppState, Store } from '../../../store/rootReducer'; import { ChangeAdminPasswordApp, mapStateToProps } from '../ChangeAdminPasswordApp'; import { DEFAULT_ADMIN_LOGIN, DEFAULT_ADMIN_PASSWORD } from '../constants'; diff --git a/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordAppRenderer-test.tsx b/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordAppRenderer-test.tsx index 399161ae2f4..49f89c9b4cf 100644 --- a/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordAppRenderer-test.tsx +++ b/server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordAppRenderer-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockLocation } from '../../../helpers/testMocks'; -import { change, submit } from '../../../sonar-ui-common/helpers/testUtils'; +import { change, submit } from '../../../helpers/testUtils'; import ChangeAdminPasswordAppRenderer, { ChangeAdminPasswordAppRendererProps } from '../ChangeAdminPasswordAppRenderer'; diff --git a/server/sonar-web/src/main/js/apps/code/components/AppCode.tsx b/server/sonar-web/src/main/js/apps/code/components/AppCode.tsx index 36819b2f463..cd2924e5c31 100644 --- a/server/sonar-web/src/main/js/apps/code/components/AppCode.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/AppCode.tsx @@ -26,10 +26,10 @@ import { connect } from 'react-redux'; import { InjectedRouter } from 'react-router'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import ListFooter from '../../../components/controls/ListFooter'; import { isPullRequest, isSameBranchLike } from '../../../helpers/branch-like'; +import { translate } from '../../../helpers/l10n'; import { getCodeUrl, getProjectUrl } from '../../../helpers/urls'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { fetchBranchStatus, fetchMetrics } from '../../../store/rootActions'; import { getMetrics } from '../../../store/rootReducer'; import { BranchLike } from '../../../types/branch-like'; 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 3502c001f21..495009f47c0 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 @@ -20,11 +20,11 @@ import * as React from 'react'; import { Link } from 'react-router'; import { colors } from '../../../app/theme'; +import BranchIcon from '../../../components/icons/BranchIcon'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; +import { translate } from '../../../helpers/l10n'; import { getProjectUrl } from '../../../helpers/urls'; -import BranchIcon from '../../../sonar-ui-common/components/icons/BranchIcon'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; export function getTooltip(component: T.ComponentMeasure) { 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 12cce663d48..34ac5a6e654 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import PinIcon from '../../../components/icons/PinIcon'; import { WorkspaceContextShape } from '../../../components/workspace/context'; -import PinIcon from '../../../sonar-ui-common/components/icons/PinIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; interface Props { 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 d6350db5d3e..cda7ee84c2a 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { canBePinned?: boolean; 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 5811d4f9dce..41830122e94 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 @@ -19,7 +19,7 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { baseComponent?: T.ComponentMeasure; 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 c2c0ae74b4b..00b51655ab1 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 @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { getTree } from '../../../api/components'; +import SearchBox from '../../../components/controls/SearchBox'; import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; interface Props { 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 159e3ae851b..874c5b3379f 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 @@ -21,7 +21,7 @@ import { Location } from 'history'; import * as React from 'react'; import withKeyboardNavigation from '../../../components/hoc/withKeyboardNavigation'; import SourceViewer from '../../../components/SourceViewer/SourceViewer'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; +import { scrollToElement } from '../../../helpers/scrolling'; import { BranchLike } from '../../../types/branch-like'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/code/components/__tests__/AppCode-test.tsx b/server/sonar-web/src/main/js/apps/code/components/__tests__/AppCode-test.tsx index 25000ff7955..beef71fc318 100644 --- a/server/sonar-web/src/main/js/apps/code/components/__tests__/AppCode-test.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/__tests__/AppCode-test.tsx @@ -26,7 +26,7 @@ import { mockIssue, mockRouter } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { ComponentQualifier } from '../../../../types/component'; import { loadMoreChildren, retrieveComponent } from '../../utils'; import { AppCode } from '../AppCode'; diff --git a/server/sonar-web/src/main/js/apps/code/routes.ts b/server/sonar-web/src/main/js/apps/code/routes.ts index 22ec4facb3d..f35e7d14861 100644 --- a/server/sonar-web/src/main/js/apps/code/routes.ts +++ b/server/sonar-web/src/main/js/apps/code/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 9bb7c49c2cd..0d2b133c77c 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { Profile as BaseProfile } from '../../../api/quality-profiles'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; +import { Button } from '../../../components/controls/buttons'; import ActivationFormModal from './ActivationFormModal'; interface Props { 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 8c4abdf8c2b..e2611f72bb6 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 @@ -20,17 +20,14 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { activateRule, Profile } from '../../../api/quality-profiles'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import Select from '../../../components/controls/Select'; import SeverityHelper from '../../../components/shared/SeverityHelper'; +import { Alert } from '../../../components/ui/Alert'; import { SEVERITIES } from '../../../helpers/constants'; +import { translate } from '../../../helpers/l10n'; import { sanitizeString } from '../../../helpers/sanitize'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { sortProfiles } from '../../quality-profiles/utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx index e231f359e66..7091bbadcc1 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import SeverityHelper from '../../../components/shared/SeverityHelper'; import { SEVERITIES } from '../../../helpers/constants'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import Facet, { BasicProps } from './Facet'; interface Props extends BasicProps { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx index 1093ec1076a..db8c6cbb9e5 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx @@ -29,19 +29,19 @@ import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import FiltersHeader from '../../../components/common/FiltersHeader'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; +import ListFooter from '../../../components/controls/ListFooter'; +import SearchBox from '../../../components/controls/SearchBox'; +import BackIcon from '../../../components/icons/BackIcon'; import '../../../components/search-navigator.css'; -import { isLoggedIn } from '../../../helpers/users'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import BackIcon from '../../../sonar-ui-common/components/icons/BackIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { addSideBarClass, addWhitePageClass, removeSideBarClass, removeWhitePageClass -} from '../../../sonar-ui-common/helpers/pages'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; +} from '../../../helpers/pages'; +import { scrollToElement } from '../../../helpers/scrolling'; +import { isLoggedIn } from '../../../helpers/users'; import { getCurrentUser, getLanguages, Store } from '../../../store/rootReducer'; import { SecurityStandard } from '../../../types/security'; import { 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 9849df84334..e52c20e49ff 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 @@ -22,8 +22,8 @@ import { InjectedIntlProps, injectIntl } from 'react-intl'; import DateInput from '../../../components/controls/DateInput'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; -import { longFormatterOption } from '../../../sonar-ui-common/components/intl/DateFormatter'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { longFormatterOption } from '../../../components/intl/DateFormatter'; +import { translate } from '../../../helpers/l10n'; import { Query } from '../query'; interface Props { 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 2b928e063e7..c1fa64a8758 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 @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { Profile } from '../../../api/quality-profiles'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import Dropdown from '../../../sonar-ui-common/components/controls/Dropdown'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import Dropdown from '../../../components/controls/Dropdown'; +import Tooltip from '../../../components/controls/Tooltip'; +import { PopupPlacement } from '../../../components/ui/popups'; +import { translate } from '../../../helpers/l10n'; import { Query } from '../query'; import BulkChangeModal from './BulkChangeModal'; 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 27a657d2910..b1c8f2e422e 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 @@ -19,15 +19,12 @@ */ import * as React from 'react'; import { bulkActivateRules, bulkDeactivateRules, Profile } from '../../../api/quality-profiles'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import Select from '../../../components/controls/Select'; +import { Alert } from '../../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { Query, serializeQuery } from '../query'; interface Props { 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 d525c9540bc..68b675fb99d 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 @@ -20,22 +20,19 @@ import * as React from 'react'; import { createRule, updateRule } from '../../../api/rules'; import FormattingTips from '../../../components/common/FormattingTips'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import Select from '../../../components/controls/Select'; import SeverityHelper from '../../../components/shared/SeverityHelper'; import TypeHelper from '../../../components/shared/TypeHelper'; +import { Alert } from '../../../components/ui/Alert'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; import { RULE_STATUSES, RULE_TYPES, SEVERITIES } from '../../../helpers/constants'; +import { csvEscape } from '../../../helpers/csv'; +import { translate } from '../../../helpers/l10n'; import { sanitizeString } from '../../../helpers/sanitize'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { csvEscape } from '../../../sonar-ui-common/helpers/csv'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { latinize } from '../../../sonar-ui-common/helpers/strings'; +import { latinize } from '../../../helpers/strings'; interface Props { customRule?: T.RuleDetails; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx index 1b42a4965c8..276ef589db5 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import SeverityHelper from '../../../components/shared/SeverityHelper'; import { SEVERITIES } from '../../../helpers/constants'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import Facet, { BasicProps } from './Facet'; export default class DefaultSeverityFacet extends React.PureComponent<BasicProps> { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx index 373d2340bb7..c7bcd333d74 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx @@ -20,13 +20,13 @@ import * as classNames from 'classnames'; import { orderBy, sortBy, without } from 'lodash'; import * as React from 'react'; +import Tooltip from '../../../components/controls/Tooltip'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { FacetKey } from '../query'; export interface BasicProps { 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 658e5d848a0..73c9b85d5cb 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import Facet, { BasicProps } from './Facet'; interface Props extends T.Omit<BasicProps, 'values'> { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/LanguageFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/LanguageFacet.tsx index c70d39ea969..b005291109c 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/LanguageFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/LanguageFacet.tsx @@ -21,8 +21,8 @@ import { uniqBy } from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { highlightTerm } from '../../../sonar-ui-common/helpers/search'; +import { translate } from '../../../helpers/l10n'; +import { highlightTerm } from '../../../helpers/search'; import { getLanguages, Store } from '../../../store/rootReducer'; import { BasicProps } from './Facet'; 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 2f5cc731770..29a76efda9c 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 @@ -19,10 +19,10 @@ */ import * as React from 'react'; import PageCounter from '../../../components/common/PageCounter'; +import ReloadButton from '../../../components/controls/ReloadButton'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import PageShortcutsTooltip from '../../../components/ui/PageShortcutsTooltip'; -import ReloadButton from '../../../sonar-ui-common/components/controls/ReloadButton'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export interface PageActionsProps { loading: boolean; 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 8892cd80498..b518f365076 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 @@ -26,7 +26,7 @@ import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { FacetKey, Query } from '../query'; interface Props { 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 7781deeea9c..92192e335c8 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 @@ -18,12 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import { translate } from '../../../helpers/l10n'; interface Props { onCancel: () => void; 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 2e73236dd8e..09198ba7b40 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 @@ -20,11 +20,11 @@ import * as React from 'react'; import { Profile } from '../../../api/quality-profiles'; import { deleteRule, getRuleDetails, updateRule } from '../../../api/rules'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ConfirmButton from '../../../sonar-ui-common/components/controls/ConfirmButton'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import ConfirmButton from '../../../components/controls/ConfirmButton'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Activation, Query } from '../query'; import CustomRuleButton from './CustomRuleButton'; import RuleDetailsCustomRules from './RuleDetailsCustomRules'; 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 353d58206b7..7acce41dcb1 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 @@ -21,12 +21,12 @@ import { sortBy } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; import { deleteRule, searchRules } from '../../../api/rules'; +import { Button } from '../../../components/controls/buttons'; +import ConfirmButton from '../../../components/controls/ConfirmButton'; import SeverityHelper from '../../../components/shared/SeverityHelper'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getRuleUrl } from '../../../helpers/urls'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ConfirmButton from '../../../sonar-ui-common/components/controls/ConfirmButton'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import CustomRuleButton from './CustomRuleButton'; interface Props { 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 30b6259edd8..79eb7b4007a 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 @@ -20,9 +20,9 @@ import * as React from 'react'; import { updateRule } from '../../../api/rules'; import FormattingTips from '../../../components/common/FormattingTips'; +import { Button, ResetButtonLink } from '../../../components/controls/buttons'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { sanitizeString } from '../../../helpers/sanitize'; -import { Button, ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import RemoveExtendedDescriptionModal from './RemoveExtendedDescriptionModal'; interface Props { 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 391a5f98ebb..af2f02e39ab 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 @@ -20,12 +20,12 @@ import * as React from 'react'; import { Link } from 'react-router'; import { getFacet } from '../../../api/issues'; +import Tooltip from '../../../components/controls/Tooltip'; import { withAppState } from '../../../components/hoc/withAppState'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { getIssuesUrl } from '../../../helpers/urls'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; interface Props { appState: Pick<T.AppState, 'branchesEnabled'>; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx index 15a278f7d77..aa1a09e4e84 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx @@ -19,18 +19,18 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Dropdown from '../../../components/controls/Dropdown'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import Tooltip from '../../../components/controls/Tooltip'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; +import LinkIcon from '../../../components/icons/LinkIcon'; +import DateFormatter from '../../../components/intl/DateFormatter'; import SeverityHelper from '../../../components/shared/SeverityHelper'; import TagsList from '../../../components/tags/TagsList'; +import { PopupPlacement } from '../../../components/ui/popups'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getRuleUrl } from '../../../helpers/urls'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Dropdown from '../../../sonar-ui-common/components/controls/Dropdown'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import LinkIcon from '../../../sonar-ui-common/components/icons/LinkIcon'; -import DateFormatter from '../../../sonar-ui-common/components/intl/DateFormatter'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import { Query } from '../query'; import RuleDetailsTagsPopup from './RuleDetailsTagsPopup'; import SimilarRulesFilter from './SimilarRulesFilter'; 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 92550c4fe7f..58ff41b223a 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { translate } from '../../../helpers/l10n'; import { sanitizeString } from '../../../helpers/sanitize'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; interface Props { params: T.RuleParameter[]; 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 efc76ea8022..5155a3d0dbf 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 @@ -22,12 +22,12 @@ import * as React from 'react'; import { Link } from 'react-router'; import { activateRule, deactivateRule, Profile } from '../../../api/quality-profiles'; import InstanceMessage from '../../../components/common/InstanceMessage'; +import { Button } from '../../../components/controls/buttons'; +import ConfirmButton from '../../../components/controls/ConfirmButton'; +import Tooltip from '../../../components/controls/Tooltip'; import SeverityHelper from '../../../components/shared/SeverityHelper'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getQualityProfileUrl } from '../../../helpers/urls'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ConfirmButton from '../../../sonar-ui-common/components/controls/ConfirmButton'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import BuiltInQualityProfileBadge from '../../quality-profiles/components/BuiltInQualityProfileBadge'; import ActivationButton from './ActivationButton'; import RuleInheritanceIcon from './RuleInheritanceIcon'; 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 84eb004c731..bc86033feed 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 @@ -21,14 +21,14 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { Link } from 'react-router'; import { deactivateRule, Profile } from '../../../api/quality-profiles'; +import { Button } from '../../../components/controls/buttons'; +import ConfirmButton from '../../../components/controls/ConfirmButton'; +import Tooltip from '../../../components/controls/Tooltip'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; +import SeverityIcon from '../../../components/icons/SeverityIcon'; import TagsList from '../../../components/tags/TagsList'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getRuleUrl } from '../../../helpers/urls'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ConfirmButton from '../../../sonar-ui-common/components/controls/ConfirmButton'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import SeverityIcon from '../../../sonar-ui-common/components/icons/SeverityIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import { Activation, Query } from '../query'; import ActivationButton from './ActivationButton'; import RuleInheritanceIcon from './RuleInheritanceIcon'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx index 7ea00019d85..c859875597c 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/SimilarRulesFilter.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import Dropdown from '../../../components/controls/Dropdown'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; +import FilterIcon from '../../../components/icons/FilterIcon'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; +import TagsIcon from '../../../components/icons/TagsIcon'; import SeverityHelper from '../../../components/shared/SeverityHelper'; -import Dropdown from '../../../sonar-ui-common/components/controls/Dropdown'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import FilterIcon from '../../../sonar-ui-common/components/icons/FilterIcon'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import TagsIcon from '../../../sonar-ui-common/components/icons/TagsIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Query } from '../query'; interface Props { 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 925b1388ada..6c2af134a4d 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { RULE_STATUSES } from '../../../helpers/constants'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import Facet, { BasicProps } from './Facet'; export default class StatusFacet extends React.PureComponent<BasicProps> { 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 4bcf519f029..5e0a9607f97 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 @@ -22,9 +22,9 @@ import * as React from 'react'; import { getRuleTags } from '../../../api/rules'; import { colors } from '../../../app/theme'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; -import TagsIcon from '../../../sonar-ui-common/components/icons/TagsIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { highlightTerm } from '../../../sonar-ui-common/helpers/search'; +import TagsIcon from '../../../components/icons/TagsIcon'; +import { translate } from '../../../helpers/l10n'; +import { highlightTerm } from '../../../helpers/search'; import { BasicProps } from './Facet'; export default class TagFacet extends React.PureComponent<BasicProps> { 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 49921d9d0cb..7cd1a8bcc19 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { translate } from '../../../helpers/l10n'; import Facet, { BasicProps } from './Facet'; interface Props extends T.Omit<BasicProps, 'onChange' | 'values'> { 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 e273e25e4c5..c4e0a93895d 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; +import { translate } from '../../../helpers/l10n'; import Facet, { BasicProps } from './Facet'; export default class TypeFacet extends React.PureComponent<BasicProps> { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/App-test.tsx index b39bc080690..cd2df7079ef 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/App-test.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { getRulesApp } from '../../../../api/rules'; import ScreenPositionHelper from '../../../../components/common/ScreenPositionHelper'; import { mockCurrentUser, mockLocation, mockRouter, mockRule } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { App } from '../App'; jest.mock('../../../../components/common/ScreenPositionHelper'); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChangeModal-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChangeModal-test.tsx index 4e3c064db71..7acce61a5a3 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChangeModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/BulkChangeModal-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { bulkActivateRules, bulkDeactivateRules } from '../../../../api/quality-profiles'; import { mockLanguage, mockQualityProfile } from '../../../../helpers/testMocks'; -import { submit, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { submit, waitAndUpdate } from '../../../../helpers/testUtils'; import { Query } from '../../query'; import BulkChangeModal from '../BulkChangeModal'; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/CustomRuleFormModal-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/CustomRuleFormModal-test.tsx index bb28f3434df..4f076b7bdb4 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/CustomRuleFormModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/CustomRuleFormModal-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { createRule } from '../../../../api/rules'; import { mockRule, mockRuleDetailsParameter } from '../../../../helpers/testMocks'; -import { submit, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { submit, waitAndUpdate } from '../../../../helpers/testUtils'; import CustomRuleFormModal from '../CustomRuleFormModal'; jest.mock('../../../../api/rules', () => ({ createRule: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetails-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetails-test.tsx index fb2bd90d25c..2bda64184fe 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetails-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetails-test.tsx @@ -22,7 +22,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { deleteRule, getRuleDetails, updateRule } from '../../../../api/rules'; import { mockQualityProfile } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import RuleDetails from '../RuleDetails'; jest.mock('../../../../api/rules', () => { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsDescription-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsDescription-test.tsx index ce3a71620b7..783583d9f57 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsDescription-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsDescription-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { change, click, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, click, waitAndUpdate } from '../../../../helpers/testUtils'; import RuleDetailsDescription from '../RuleDetailsDescription'; jest.mock('../../../../api/rules', () => ({ diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsIssues-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsIssues-test.tsx index 4f190d2b1e8..9449ed474b2 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsIssues-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsIssues-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getFacet } from '../../../../api/issues'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { RuleDetailsIssues } from '../RuleDetailsIssues'; jest.mock('../../../../api/issues', () => ({ diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleListItem-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleListItem-test.tsx index e797688f02c..93e3f7644b0 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleListItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleListItem-test.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { Link } from 'react-router'; import { deactivateRule } from '../../../../api/quality-profiles'; import { mockEvent, mockQualityProfile, mockRule } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import RuleListItem from '../RuleListItem'; jest.mock('../../../../api/quality-profiles', () => ({ diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/SimilarRulesFilter-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/SimilarRulesFilter-test.tsx index 6a8a72b21e1..0faa5974d59 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/SimilarRulesFilter-test.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/SimilarRulesFilter-test.tsx @@ -20,7 +20,7 @@ import { mount, shallow } from 'enzyme'; import * as React from 'react'; import { mockRule } from '../../../../helpers/testMocks'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import SimilarRulesFilter from '../SimilarRulesFilter'; it('should render correctly', () => { 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 7901b506d51..b851a8a2369 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 @@ -29,7 +29,7 @@ import { serializeOptionalBoolean, serializeString, serializeStringArray -} from '../../sonar-ui-common/helpers/query'; +} from '../../helpers/query'; export interface Query { activation: boolean | undefined; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/routes.ts b/server/sonar-web/src/main/js/apps/coding-rules/routes.ts index 6f05b29713c..8049584924b 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/routes.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/routes.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { RedirectFunction, RouterState } from 'react-router'; -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; import { parseQuery, serializeQuery } from './query'; function parseHash(hash: string): T.RawQuery { diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx index 3a863ca651c..bed13ccc0d4 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx @@ -34,13 +34,13 @@ import { getLocalizedMetricDomain, translate, translateWithParameters -} from '../../../sonar-ui-common/helpers/l10n'; +} from '../../../helpers/l10n'; import { addSideBarClass, addWhitePageClass, removeSideBarClass, removeWhitePageClass -} from '../../../sonar-ui-common/helpers/pages'; +} from '../../../helpers/pages'; import { fetchBranchStatus } from '../../../store/rootActions'; import { BranchLike } from '../../../types/branch-like'; import { ComponentQualifier } from '../../../types/component'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumb.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumb.tsx index db4329c32ec..21e4aa10259 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumb.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/Breadcrumb.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { collapsePath, limitComponentName } from '../../../sonar-ui-common/helpers/path'; +import Tooltip from '../../../components/controls/Tooltip'; +import { collapsePath, limitComponentName } from '../../../helpers/path'; interface Props { canBrowse: boolean; 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 aac8157b802..b221e826bed 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 @@ -21,16 +21,12 @@ import * as classNames from 'classnames'; import * as differenceInDays from 'date-fns/difference_in_days'; import * as React from 'react'; import { InjectedIntlProps, injectIntl } from 'react-intl'; +import Tooltip from '../../../components/controls/Tooltip'; +import DateFormatter, { longFormatterOption } from '../../../components/intl/DateFormatter'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import DateTimeFormatter, { formatterOption } from '../../../components/intl/DateTimeFormatter'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getPeriodDate, getPeriodLabel } from '../../../helpers/periods'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import DateFormatter, { - longFormatterOption -} from '../../../sonar-ui-common/components/intl/DateFormatter'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import DateTimeFormatter, { - formatterOption -} from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; interface Props { className?: string; 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 610d6ada0a2..cbae3063422 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 @@ -23,13 +23,13 @@ import { getComponentTree } from '../../../api/components'; import { getMeasures } from '../../../api/measures'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import SourceViewer from '../../../components/SourceViewer/SourceViewer'; +import PageActions from '../../../components/ui/PageActions'; import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branch-like'; +import { translate } from '../../../helpers/l10n'; import { isDiffMetric } from '../../../helpers/measures'; +import { RequestData } from '../../../helpers/request'; +import { scrollToElement } from '../../../helpers/scrolling'; import { getProjectUrl } from '../../../helpers/urls'; -import PageActions from '../../../sonar-ui-common/components/ui/PageActions'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { RequestData } from '../../../sonar-ui-common/helpers/request'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; import { BranchLike } from '../../../types/branch-like'; import { MetricKey } from '../../../types/metrics'; import { complementary } from '../config/complementary'; 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 2f36734282a..ba7fe34c55f 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 @@ -20,13 +20,13 @@ import * as React from 'react'; import { Link } from 'react-router'; import LanguageDistributionContainer from '../../../components/charts/LanguageDistributionContainer'; +import Tooltip from '../../../components/controls/Tooltip'; +import HistoryIcon from '../../../components/icons/HistoryIcon'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; import Measure from '../../../components/measure/Measure'; +import { getLocalizedMetricName, translate } from '../../../helpers/l10n'; import { isDiffMetric } from '../../../helpers/measures'; import { getMeasureHistoryUrl } from '../../../helpers/urls'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import HistoryIcon from '../../../sonar-ui-common/components/icons/HistoryIcon'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import { getLocalizedMetricName, translate } from '../../../sonar-ui-common/helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import { hasFullMeasures } from '../utils'; import LeakPeriodLegend from './LeakPeriodLegend'; 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 a2a31fc87ff..177ab2f06a1 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 @@ -21,9 +21,9 @@ import * as React from 'react'; import { getComponentLeaves } from '../../../api/components'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import SourceViewer from '../../../components/SourceViewer/SourceViewer'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import PageActions from '../../../components/ui/PageActions'; import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branch-like'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import PageActions from '../../../sonar-ui-common/components/ui/PageActions'; import { BranchLike } from '../../../types/branch-like'; import BubbleChart from '../drilldown/BubbleChart'; import { enhanceComponent, getBubbleMetrics, hasFullMeasures, isFileType } from '../utils'; 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 e82e820f1ed..c6860eb3066 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 @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import ListIcon from '../../../sonar-ui-common/components/icons/ListIcon'; -import TreeIcon from '../../../sonar-ui-common/components/icons/TreeIcon'; -import TreemapIcon from '../../../sonar-ui-common/components/icons/TreemapIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Select from '../../../components/controls/Select'; +import ListIcon from '../../../components/icons/ListIcon'; +import TreeIcon from '../../../components/icons/TreeIcon'; +import TreemapIcon from '../../../components/icons/TreemapIcon'; +import { translate } from '../../../helpers/l10n'; import { hasList, hasTree, hasTreemap, View } from '../utils'; interface Props { 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 3751c12cfa9..aac47222423 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export default function MeasuresEmpty() { return ( diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx index 04aa3fef23c..9c9ae1d407e 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/App-test.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { getMeasuresWithPeriod } from '../../../../api/measures'; import { mockMainBranch, mockPullRequest } from '../../../../helpers/mocks/branch-like'; import { mockComponent, mockIssue, mockLocation, mockRouter } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { App } from '../App'; jest.mock('../../../../api/metrics', () => ({ diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumbs-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumbs-test.tsx index 6619b9780ce..a33f26ff8a4 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumbs-test.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/Breadcrumbs-test.tsx @@ -20,7 +20,7 @@ import { mount } from 'enzyme'; import * as React from 'react'; import { getBreadcrumbs } from '../../../../api/components'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import Breadcrumbs from '../Breadcrumbs'; jest.mock('../../../../api/components', () => ({ diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureContent-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureContent-test.tsx index 7929da4d7ab..d89eb1f0c04 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureContent-test.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/MeasureContent-test.tsx @@ -20,12 +20,12 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getComponentTree } from '../../../../api/components'; +import { scrollToElement } from '../../../../helpers/scrolling'; import { mockComponentMeasure, mockRouter } from '../../../../helpers/testMocks'; -import { scrollToElement } from '../../../../sonar-ui-common/helpers/scrolling'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import MeasureContent from '../MeasureContent'; -jest.mock('../../../../sonar-ui-common/helpers/scrolling', () => ({ +jest.mock('../../../../helpers/scrolling', () => ({ scrollToElement: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChart.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChart.tsx index 23c066ca5a6..14997bd80e2 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChart.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChart.tsx @@ -18,19 +18,18 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import OriginalBubbleChart from '../../../components/charts/BubbleChart'; import ColorRatingsLegend from '../../../components/charts/ColorRatingsLegend'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; import { RATING_COLORS } from '../../../helpers/constants'; -import { isDiffMetric } from '../../../helpers/measures'; -import OriginalBubbleChart from '../../../sonar-ui-common/components/charts/BubbleChart'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; import { getLocalizedMetricDomain, getLocalizedMetricName, translate, translateWithParameters -} from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; -import { isDefined } from '../../../sonar-ui-common/helpers/types'; +} from '../../../helpers/l10n'; +import { formatMeasure, isDiffMetric } from '../../../helpers/measures'; +import { isDefined } from '../../../helpers/types'; import { getBubbleMetrics, getBubbleYDomain, isProjectOverview } from '../utils'; import EmptyResult from './EmptyResult'; 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 f410a120ae1..7a5e0cf70d5 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 @@ -19,18 +19,18 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import BranchIcon from '../../../components/icons/BranchIcon'; +import LinkIcon from '../../../components/icons/LinkIcon'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import { translate } from '../../../helpers/l10n'; +import { isDiffMetric } from '../../../helpers/measures'; +import { splitPath } from '../../../helpers/path'; import { getBranchLikeUrl, getComponentDrilldownUrlWithSelection, getComponentSecurityHotspotsUrl, getProjectUrl } from '../../../helpers/urls'; -import BranchIcon from '../../../sonar-ui-common/components/icons/BranchIcon'; -import LinkIcon from '../../../sonar-ui-common/components/icons/LinkIcon'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { isDiffMetric } from '../../../sonar-ui-common/helpers/measures'; -import { splitPath } from '../../../sonar-ui-common/helpers/path'; import { BranchLike } from '../../../types/branch-like'; import { isFileType, isSecurityReviewMetric, View } from '../utils'; 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 b4d57ed0f38..1bd16bccfbe 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { getLocalizedMetricName } from '../../../sonar-ui-common/helpers/l10n'; +import { getLocalizedMetricName } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import { complementary } from '../config/complementary'; import { View } from '../utils'; 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 3b090019e4b..2b20d03f5ad 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export default function EmptyResult() { return <div className="note">{translate('no_results')}</div>; 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 89a81414891..828bad17a29 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 @@ -20,13 +20,12 @@ import * as key from 'keymaster'; import { throttle } from 'lodash'; import * as React from 'react'; -import { isDiffMetric, isPeriodBestValue } from '../../../helpers/measures'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; +import { Button } from '../../../components/controls/buttons'; +import ListFooter from '../../../components/controls/ListFooter'; +import { Alert } from '../../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure, isDiffMetric, isPeriodBestValue } from '../../../helpers/measures'; +import { scrollToElement } from '../../../helpers/scrolling'; import { BranchLike } from '../../../types/branch-like'; import { View } from '../utils'; import ComponentsList from './ComponentsList'; 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 82da04be4cf..13a4b4b30f5 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 @@ -22,17 +22,12 @@ import * as React from 'react'; import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; import { colors } from '../../../app/theme'; import ColorBoxLegend from '../../../components/charts/ColorBoxLegend'; -import { isDiffMetric } from '../../../helpers/measures'; -import ColorGradientLegend from '../../../sonar-ui-common/components/charts/ColorGradientLegend'; -import TreeMap, { TreeMapItem } from '../../../sonar-ui-common/components/charts/TreeMap'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { - getLocalizedMetricName, - translate, - translateWithParameters -} from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; -import { isDefined } from '../../../sonar-ui-common/helpers/types'; +import ColorGradientLegend from '../../../components/charts/ColorGradientLegend'; +import TreeMap, { TreeMapItem } from '../../../components/charts/TreeMap'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import { getLocalizedMetricName, translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure, isDiffMetric } from '../../../helpers/measures'; +import { isDefined } from '../../../helpers/types'; import { BranchLike } from '../../../types/branch-like'; import { MetricKey } from '../../../types/metrics'; import EmptyResult from './EmptyResult'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/BubbleChart-test.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/BubbleChart-test.tsx index c8865973cf7..7c1eca4cf52 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/BubbleChart-test.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/BubbleChart-test.tsx @@ -20,8 +20,8 @@ import { shallow } from 'enzyme'; import { keyBy } from 'lodash'; import * as React from 'react'; +import OriginalBubbleChart from '../../../../components/charts/BubbleChart'; import { mockComponentMeasure, mockMeasure, mockMetric } from '../../../../helpers/testMocks'; -import OriginalBubbleChart from '../../../../sonar-ui-common/components/charts/BubbleChart'; import { MetricKey } from '../../../../types/metrics'; import { enhanceComponent } from '../../utils'; import BubbleChart from '../BubbleChart'; diff --git a/server/sonar-web/src/main/js/apps/component-measures/routes.ts b/server/sonar-web/src/main/js/apps/component-measures/routes.ts index c48f0b4124a..f2ab6f28106 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/routes.ts +++ b/server/sonar-web/src/main/js/apps/component-measures/routes.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { RedirectFunction, RouterState } from 'react-router'; -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainFacet.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainFacet.tsx index 9062d191a44..ea1fdfb9823 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainFacet.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainFacet.tsx @@ -22,14 +22,14 @@ import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; -import BubblesIcon from '../../../sonar-ui-common/components/icons/BubblesIcon'; +import BubblesIcon from '../../../components/icons/BubblesIcon'; import { getLocalizedCategoryMetricName, getLocalizedMetricDomain, getLocalizedMetricName, hasMessage, translate -} from '../../../sonar-ui-common/helpers/l10n'; +} from '../../../helpers/l10n'; import { addMeasureCategories, filterMeasures, diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/ProjectOverviewFacet.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/ProjectOverviewFacet.tsx index 36370960da3..850474afb20 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/ProjectOverviewFacet.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/ProjectOverviewFacet.tsx @@ -21,7 +21,7 @@ import * as React from 'react'; import FacetBox from '../../../components/facet/FacetBox'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { onChange: (metric: string) => void; 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 00fe2d3c82b..f2e9f491c1e 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { groupByDomains, KNOWN_DOMAINS, PROJECT_OVERVEW, Query } from '../utils'; import DomainFacet from './DomainFacet'; import ProjectOverviewFacet from './ProjectOverviewFacet'; 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 d3c38415b3b..d2e7763e86b 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 @@ -20,9 +20,9 @@ import { groupBy, memoize, sortBy, toPairs } from 'lodash'; import { enhanceMeasure } from '../../components/measure/utils'; import { isBranch, isPullRequest } from '../../helpers/branch-like'; +import { getLocalizedMetricName } from '../../helpers/l10n'; import { getDisplayMetrics, isDiffMetric } from '../../helpers/measures'; -import { getLocalizedMetricName } from '../../sonar-ui-common/helpers/l10n'; -import { cleanQuery, parseAsString, serializeString } from '../../sonar-ui-common/helpers/query'; +import { cleanQuery, parseAsString, serializeString } from '../../helpers/query'; import { BranchLike } from '../../types/branch-like'; import { ComponentQualifier } from '../../types/component'; import { MetricKey } from '../../types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/create/project/AzurePersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/AzurePersonalAccessTokenForm.tsx index bb0c910676d..0c9e026776f 100644 --- a/server/sonar-web/src/main/js/apps/create/project/AzurePersonalAccessTokenForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/AzurePersonalAccessTokenForm.tsx @@ -20,11 +20,11 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { SubmitButton } from '../../../sonar-ui-common/components/controls/buttons'; -import ValidationInput from '../../../sonar-ui-common/components/controls/ValidationInput'; -import DetachIcon from '../../../sonar-ui-common/components/icons/DetachIcon'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { SubmitButton } from '../../../components/controls/buttons'; +import ValidationInput from '../../../components/controls/ValidationInput'; +import DetachIcon from '../../../components/icons/DetachIcon'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import { AlmSettingsInstance } from '../../../types/alm-settings'; export interface AzurePersonalAccessTokenFormProps { diff --git a/server/sonar-web/src/main/js/apps/create/project/AzureProjectAccordion.tsx b/server/sonar-web/src/main/js/apps/create/project/AzureProjectAccordion.tsx index 26deef49616..27fc44d2a5d 100644 --- a/server/sonar-web/src/main/js/apps/create/project/AzureProjectAccordion.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/AzureProjectAccordion.tsx @@ -22,14 +22,14 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { colors } from '../../../app/theme'; +import BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion'; +import ListFooter from '../../../components/controls/ListFooter'; +import Radio from '../../../components/controls/Radio'; +import CheckIcon from '../../../components/icons/CheckIcon'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import { getProjectUrl } from '../../../helpers/urls'; -import BoxedGroupAccordion from '../../../sonar-ui-common/components/controls/BoxedGroupAccordion'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import CheckIcon from '../../../sonar-ui-common/components/icons/CheckIcon'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { AzureProject, AzureRepository } from '../../../types/alm-integration'; import { CreateProjectModes } from './types'; diff --git a/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreateRenderer.tsx index 200a39df833..b68f7eadd96 100644 --- a/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/AzureProjectCreateRenderer.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { Button } from '../../../components/controls/buttons'; +import SearchBox from '../../../components/controls/SearchBox'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { AzureProject, AzureRepository } from '../../../types/alm-integration'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; import AzurePersonalAccessTokenForm from './AzurePersonalAccessTokenForm'; diff --git a/server/sonar-web/src/main/js/apps/create/project/AzureProjectsList.tsx b/server/sonar-web/src/main/js/apps/create/project/AzureProjectsList.tsx index 9cc222d1636..ffe2f5f01b3 100644 --- a/server/sonar-web/src/main/js/apps/create/project/AzureProjectsList.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/AzureProjectsList.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import ListFooter from '../../../components/controls/ListFooter'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; import { AzureProject, AzureRepository } from '../../../types/alm-integration'; import AzureProjectAccordion from './AzureProjectAccordion'; import { CreateProjectModes } from './types'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudProjectCreateRender.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudProjectCreateRender.tsx index 41c342bdcf0..33de2a91863 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudProjectCreateRender.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudProjectCreateRender.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { BitbucketCloudRepository } from '../../../types/alm-integration'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; import BitbucketCloudSearchForm from './BitbucketCloudSearchForm'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudSearchForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudSearchForm.tsx index 18239e73af1..5e2c6e82c97 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudSearchForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloudSearchForm.tsx @@ -20,17 +20,17 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Button } from '../../../components/controls/buttons'; +import SearchBox from '../../../components/controls/SearchBox'; +import Tooltip from '../../../components/controls/Tooltip'; +import CheckIcon from '../../../components/icons/CheckIcon'; +import DetachIcon from '../../../components/icons/DetachIcon'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { getProjectUrl } from '../../../helpers/urls'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import CheckIcon from '../../../sonar-ui-common/components/icons/CheckIcon'; -import DetachIcon from '../../../sonar-ui-common/components/icons/DetachIcon'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; import { BitbucketCloudRepository } from '../../../types/alm-integration'; import { ComponentQualifier } from '../../../types/component'; import { CreateProjectModes } from './types'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketImportRepositoryForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketImportRepositoryForm.tsx index 2f1c1d22bf3..a2cf267b2a1 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketImportRepositoryForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketImportRepositoryForm.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import SearchBox from '../../../components/controls/SearchBox'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; import { BitbucketProject, BitbucketProjectRepositories, diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectAccordion.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectAccordion.tsx index dcc00be8cff..0d3f65ecdd9 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectAccordion.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectAccordion.tsx @@ -22,12 +22,12 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { colors } from '../../../app/theme'; +import BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion'; +import Radio from '../../../components/controls/Radio'; +import CheckIcon from '../../../components/icons/CheckIcon'; +import { Alert } from '../../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getProjectUrl } from '../../../helpers/urls'; -import BoxedGroupAccordion from '../../../sonar-ui-common/components/controls/BoxedGroupAccordion'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import CheckIcon from '../../../sonar-ui-common/components/icons/CheckIcon'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import { BitbucketProject, BitbucketRepository } from '../../../types/alm-integration'; import { CreateProjectModes } from './types'; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectCreateRenderer.tsx index 83554586735..118753f0ad2 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketProjectCreateRenderer.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { Button } from '../../../components/controls/buttons'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { BitbucketProject, BitbucketProjectRepositories, diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketRepositories.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketRepositories.tsx index de3c1324d18..00b023c59a3 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketRepositories.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketRepositories.tsx @@ -19,8 +19,8 @@ */ import { uniq, without } from 'lodash'; import * as React from 'react'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import { translate } from '../../../helpers/l10n'; import { BitbucketProject, BitbucketProjectRepositories, diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketSearchResults.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketSearchResults.tsx index bf441e280ec..523e42d6bf1 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketSearchResults.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketSearchResults.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +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/CreateProjectModeSelection.tsx b/server/sonar-web/src/main/js/apps/create/project/CreateProjectModeSelection.tsx index 9f89d514d6c..f3193c44ce8 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 @@ -20,10 +20,10 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { withAppState } from '../../../components/hoc/withAppState'; -import ChevronsIcon from '../../../sonar-ui-common/components/icons/ChevronsIcon'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import ChevronsIcon from '../../../components/icons/ChevronsIcon'; +import { Alert } from '../../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { AlmKeys } from '../../../types/alm-settings'; import { CreateProjectModes } from './types'; 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 f91c074812a..de750967d72 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 @@ -24,8 +24,8 @@ import { getAlmSettings } from '../../../api/alm-settings'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import { whenLoggedIn } from '../../../components/hoc/whenLoggedIn'; import { withAppState } from '../../../components/hoc/withAppState'; +import { translate } from '../../../helpers/l10n'; import { getProjectUrl } from '../../../helpers/urls'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; import AlmBindingDefinitionForm from '../../settings/components/almIntegration/AlmBindingDefinitionForm'; import AzureProjectCreate from './AzureProjectCreate'; diff --git a/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreate.tsx index 7a404c935e9..f49167e7ecc 100644 --- a/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreate.tsx @@ -26,7 +26,7 @@ import { getGithubRepositories, importGithubRepository } from '../../../api/alm-integrations'; -import { getHostUrl } from '../../../sonar-ui-common/helpers/urls'; +import { getHostUrl } from '../../../helpers/urls'; import { GithubOrganization, GithubRepository } from '../../../types/alm-integration'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; import GitHubProjectCreateRenderer from './GitHubProjectCreateRenderer'; diff --git a/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreateRenderer.tsx index 2a6bf0edcbb..70113cbccbb 100644 --- a/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreateRenderer.tsx @@ -21,18 +21,18 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { colors } from '../../../app/theme'; +import { Button } from '../../../components/controls/buttons'; +import ListFooter from '../../../components/controls/ListFooter'; +import Radio from '../../../components/controls/Radio'; +import SearchBox from '../../../components/controls/SearchBox'; +import SearchSelect from '../../../components/controls/SearchSelect'; +import CheckIcon from '../../../components/icons/CheckIcon'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import { getBaseUrl } from '../../../helpers/system'; import { getProjectUrl } from '../../../helpers/urls'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import SearchSelect from '../../../sonar-ui-common/components/controls/SearchSelect'; -import CheckIcon from '../../../sonar-ui-common/components/icons/CheckIcon'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { GithubOrganization, GithubRepository } from '../../../types/alm-integration'; import { ComponentQualifier } from '../../../types/component'; import CreateProjectPageHeader from './CreateProjectPageHeader'; diff --git a/server/sonar-web/src/main/js/apps/create/project/GitlabProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/GitlabProjectCreateRenderer.tsx index 26025cc6e76..cc63fc2a66a 100644 --- a/server/sonar-web/src/main/js/apps/create/project/GitlabProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/GitlabProjectCreateRenderer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { GitlabProject } from '../../../types/alm-integration'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; import CreateProjectPageHeader from './CreateProjectPageHeader'; diff --git a/server/sonar-web/src/main/js/apps/create/project/GitlabProjectSelectionForm.tsx b/server/sonar-web/src/main/js/apps/create/project/GitlabProjectSelectionForm.tsx index fb9a6b5a045..017dc9cb6a3 100644 --- a/server/sonar-web/src/main/js/apps/create/project/GitlabProjectSelectionForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/GitlabProjectSelectionForm.tsx @@ -20,17 +20,17 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Button } from '../../../components/controls/buttons'; +import ListFooter from '../../../components/controls/ListFooter'; +import SearchBox from '../../../components/controls/SearchBox'; +import Tooltip from '../../../components/controls/Tooltip'; +import CheckIcon from '../../../components/icons/CheckIcon'; +import DetachIcon from '../../../components/icons/DetachIcon'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import { getProjectUrl } from '../../../helpers/urls'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import CheckIcon from '../../../sonar-ui-common/components/icons/CheckIcon'; -import DetachIcon from '../../../sonar-ui-common/components/icons/DetachIcon'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { GitlabProject } from '../../../types/alm-integration'; import { ComponentQualifier } from '../../../types/component'; import { CreateProjectModes } from './types'; diff --git a/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx index 5150e25d1f9..78197388ac8 100644 --- a/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/ManualProjectCreate.tsx @@ -22,13 +22,13 @@ import { debounce } from 'lodash'; import * as React from 'react'; import { createProject, doesComponentExists } from '../../../api/components'; import ProjectKeyInput from '../../../components/common/ProjectKeyInput'; +import { SubmitButton } from '../../../components/controls/buttons'; +import ValidationInput from '../../../components/controls/ValidationInput'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; import { PROJECT_KEY_INVALID_CHARACTERS, validateProjectKey } from '../../../helpers/projects'; -import { SubmitButton } from '../../../sonar-ui-common/components/controls/buttons'; -import ValidationInput from '../../../sonar-ui-common/components/controls/ValidationInput'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { ProjectKeyValidationResult } from '../../../types/component'; import { PROJECT_NAME_MAX_LEN } from './constants'; import CreateProjectPageHeader from './CreateProjectPageHeader'; diff --git a/server/sonar-web/src/main/js/apps/create/project/PersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/PersonalAccessTokenForm.tsx index 6f82c135653..b452c0f096e 100644 --- a/server/sonar-web/src/main/js/apps/create/project/PersonalAccessTokenForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/PersonalAccessTokenForm.tsx @@ -24,12 +24,12 @@ import { checkPersonalAccessTokenIsValid, setAlmPersonalAccessToken } from '../../../api/alm-integrations'; -import { SubmitButton } from '../../../sonar-ui-common/components/controls/buttons'; -import ValidationInput from '../../../sonar-ui-common/components/controls/ValidationInput'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { SubmitButton } from '../../../components/controls/buttons'; +import ValidationInput from '../../../components/controls/ValidationInput'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/create/project/WrongBindingCountAlert.tsx b/server/sonar-web/src/main/js/apps/create/project/WrongBindingCountAlert.tsx index d60551a35f4..6b90db1870c 100644 --- a/server/sonar-web/src/main/js/apps/create/project/WrongBindingCountAlert.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/WrongBindingCountAlert.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; import { getGlobalSettingsUrl } from '../../../helpers/urls'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { AlmKeys } from '../../../types/alm-settings'; import { ALM_INTEGRATION } from '../../settings/components/AdditionalCategoryKeys'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/AzurePersonalAccessTokenForm-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/AzurePersonalAccessTokenForm-test.tsx index 51740e63712..430ce61f194 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/AzurePersonalAccessTokenForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/AzurePersonalAccessTokenForm-test.tsx @@ -19,9 +19,9 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { SubmitButton } from '../../../../components/controls/buttons'; import { mockAlmSettingsInstance } from '../../../../helpers/mocks/alm-settings'; -import { SubmitButton } from '../../../../sonar-ui-common/components/controls/buttons'; -import { change, submit } from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, submit } from '../../../../helpers/testUtils'; import { AlmKeys } from '../../../../types/alm-settings'; import AzurePersonalAccessTokenForm, { AzurePersonalAccessTokenFormProps diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectAccordion-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectAccordion-test.tsx index d75707cb429..b8bb15db7ca 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectAccordion-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectAccordion-test.tsx @@ -19,10 +19,10 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import BoxedGroupAccordion from '../../../../components/controls/BoxedGroupAccordion'; +import Radio from '../../../../components/controls/Radio'; import { mockAzureProject, mockAzureRepository } from '../../../../helpers/mocks/alm-integrations'; import { mockEvent } from '../../../../helpers/testMocks'; -import BoxedGroupAccordion from '../../../../sonar-ui-common/components/controls/BoxedGroupAccordion'; -import Radio from '../../../../sonar-ui-common/components/controls/Radio'; import AzureProjectAccordion, { AzureProjectAccordionProps } from '../AzureProjectAccordion'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectCreate-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectCreate-test.tsx index bac8a0b607c..0eb6e607900 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectCreate-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectCreate-test.tsx @@ -31,7 +31,7 @@ import { import { mockAzureProject, mockAzureRepository } from '../../../../helpers/mocks/alm-integrations'; import { mockAlmSettingsInstance } from '../../../../helpers/mocks/alm-settings'; import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { AlmKeys } from '../../../../types/alm-settings'; import AzureProjectCreate from '../AzureProjectCreate'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectsList-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectsList-test.tsx index 45871211fb2..88d9c64f297 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectsList-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/AzureProjectsList-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import ListFooter from '../../../../components/controls/ListFooter'; import { mockAzureProject, mockAzureRepository } from '../../../../helpers/mocks/alm-integrations'; -import ListFooter from '../../../../sonar-ui-common/components/controls/ListFooter'; import AzureProjectAccordion from '../AzureProjectAccordion'; import AzureProjectsList, { AzureProjectsListProps } from '../AzureProjectsList'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketCloudProjectCreate-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketCloudProjectCreate-test.tsx index c06c5a9c675..e7c3392d8c3 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketCloudProjectCreate-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketCloudProjectCreate-test.tsx @@ -26,7 +26,7 @@ import { import { mockBitbucketCloudRepository } from '../../../../helpers/mocks/alm-integrations'; import { mockBitbucketCloudAlmSettingsInstance } from '../../../../helpers/mocks/alm-settings'; import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import BitbucketCloudProjectCreate, { BITBUCKET_CLOUD_PROJECTS_PAGESIZE } from '../BitbucketCloudProjectCreate'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketImportRepositoryForm-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketImportRepositoryForm-test.tsx index 9fd4b31172e..78eb0991520 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketImportRepositoryForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketImportRepositoryForm-test.tsx @@ -20,12 +20,12 @@ import { shallow } from 'enzyme'; import * as React from 'react'; +import SearchBox from '../../../../components/controls/SearchBox'; import { mockBitbucketProject, mockBitbucketRepository } from '../../../../helpers/mocks/alm-integrations'; -import SearchBox from '../../../../sonar-ui-common/components/controls/SearchBox'; -import { change } from '../../../../sonar-ui-common/helpers/testUtils'; +import { change } from '../../../../helpers/testUtils'; import BitbucketImportRepositoryForm, { BitbucketImportRepositoryFormProps } from '../BitbucketImportRepositoryForm'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketProjectAccordion-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketProjectAccordion-test.tsx index 8d1f7062a79..a07d8e41e2e 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketProjectAccordion-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketProjectAccordion-test.tsx @@ -20,11 +20,11 @@ import { shallow } from 'enzyme'; import * as React from 'react'; +import Radio from '../../../../components/controls/Radio'; import { mockBitbucketProject, mockBitbucketRepository } from '../../../../helpers/mocks/alm-integrations'; -import Radio from '../../../../sonar-ui-common/components/controls/Radio'; import BitbucketProjectAccordion, { BitbucketProjectAccordionProps } from '../BitbucketProjectAccordion'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketProjectCreate-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketProjectCreate-test.tsx index bd13b29af8f..9f2a741277b 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketProjectCreate-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketProjectCreate-test.tsx @@ -31,7 +31,7 @@ import { } from '../../../../helpers/mocks/alm-integrations'; import { mockAlmSettingsInstance } from '../../../../helpers/mocks/alm-settings'; import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { AlmKeys } from '../../../../types/alm-settings'; import BitbucketProjectCreate from '../BitbucketProjectCreate'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketRepositories-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketRepositories-test.tsx index 49a5236e56c..bd3a568d303 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketRepositories-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketRepositories-test.tsx @@ -24,7 +24,7 @@ import { mockBitbucketProject, mockBitbucketRepository } from '../../../../helpers/mocks/alm-integrations'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import BitbucketProjectAccordion from '../BitbucketProjectAccordion'; import BitbucketRepositories, { BitbucketRepositoriesProps } from '../BitbucketRepositories'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectModeSelection-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectModeSelection-test.tsx index 7dc3b94019d..c8aa9932ad1 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectModeSelection-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectModeSelection-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import { AlmKeys } from '../../../../types/alm-settings'; import { CreateProjectModeSelection, diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx index ca4d3f3337f..62f74b97143 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getAlmSettings } from '../../../../api/alm-settings'; import { mockLocation, mockLoggedInUser, mockRouter } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { AlmKeys } from '../../../../types/alm-settings'; import AlmBindingDefinitionForm from '../../../settings/components/almIntegration/AlmBindingDefinitionForm'; import CreateProjectModeSelection from '../CreateProjectModeSelection'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHubProjectCreate-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHubProjectCreate-test.tsx index a8647296957..108ef10c24d 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHubProjectCreate-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHubProjectCreate-test.tsx @@ -28,7 +28,7 @@ import { import { mockGitHubRepository } from '../../../../helpers/mocks/alm-integrations'; import { mockAlmSettingsInstance } from '../../../../helpers/mocks/alm-settings'; import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import GitHubProjectCreate from '../GitHubProjectCreate'; jest.mock('../../../../api/alm-integrations', () => ({ diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHubProjectCreateRenderer-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHubProjectCreateRenderer-test.tsx index 997c309ee5e..093dd35b56d 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHubProjectCreateRenderer-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitHubProjectCreateRenderer-test.tsx @@ -19,10 +19,10 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import Radio from '../../../../components/controls/Radio'; +import SearchBox from '../../../../components/controls/SearchBox'; +import SearchSelect from '../../../../components/controls/SearchSelect'; import { mockGitHubRepository } from '../../../../helpers/mocks/alm-integrations'; -import Radio from '../../../../sonar-ui-common/components/controls/Radio'; -import SearchBox from '../../../../sonar-ui-common/components/controls/SearchBox'; -import SearchSelect from '../../../../sonar-ui-common/components/controls/SearchSelect'; import { GithubOrganization } from '../../../../types/alm-integration'; import GitHubProjectCreateRenderer, { GitHubProjectCreateRendererProps diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitlabProjectCreate-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitlabProjectCreate-test.tsx index 56bfc8ef52f..33ae0d2925b 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitlabProjectCreate-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitlabProjectCreate-test.tsx @@ -23,7 +23,7 @@ import { getGitlabProjects, importGitlabProject } from '../../../../api/alm-inte import { mockGitlabProject } from '../../../../helpers/mocks/alm-integrations'; import { mockAlmSettingsInstance } from '../../../../helpers/mocks/alm-settings'; import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { AlmKeys } from '../../../../types/alm-settings'; import GitlabProjectCreate from '../GitlabProjectCreate'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitlabProjectSelectionForm-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitlabProjectSelectionForm-test.tsx index 446508109ef..7298101bcc2 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitlabProjectSelectionForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitlabProjectSelectionForm-test.tsx @@ -19,10 +19,10 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { Button } from '../../../../components/controls/buttons'; +import ListFooter from '../../../../components/controls/ListFooter'; +import SearchBox from '../../../../components/controls/SearchBox'; import { mockGitlabProject } from '../../../../helpers/mocks/alm-integrations'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; -import ListFooter from '../../../../sonar-ui-common/components/controls/ListFooter'; -import SearchBox from '../../../../sonar-ui-common/components/controls/SearchBox'; import GitlabProjectSelectionForm, { GitlabProjectSelectionFormProps } from '../GitlabProjectSelectionForm'; 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 42417a3c2dc..c3b8464f870 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 @@ -22,11 +22,11 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { createProject, doesComponentExists } from '../../../../api/components'; import ProjectKeyInput from '../../../../components/common/ProjectKeyInput'; +import { SubmitButton } from '../../../../components/controls/buttons'; +import ValidationInput from '../../../../components/controls/ValidationInput'; import { validateProjectKey } from '../../../../helpers/projects'; import { mockEvent } from '../../../../helpers/testMocks'; -import { SubmitButton } from '../../../../sonar-ui-common/components/controls/buttons'; -import ValidationInput from '../../../../sonar-ui-common/components/controls/ValidationInput'; -import { change, submit, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, submit, waitAndUpdate } from '../../../../helpers/testUtils'; import { ProjectKeyValidationResult } from '../../../../types/component'; import { PROJECT_NAME_MAX_LEN } from '../constants'; import ManualProjectCreate from '../ManualProjectCreate'; diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/PersonalAccessTokenForm-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/PersonalAccessTokenForm-test.tsx index 082039b0a93..4f273e2dfd1 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/PersonalAccessTokenForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/PersonalAccessTokenForm-test.tsx @@ -23,12 +23,12 @@ import { checkPersonalAccessTokenIsValid, setAlmPersonalAccessToken } from '../../../../api/alm-integrations'; +import { SubmitButton } from '../../../../components/controls/buttons'; import { mockAlmSettingsInstance, mockBitbucketCloudAlmSettingsInstance } from '../../../../helpers/mocks/alm-settings'; -import { SubmitButton } from '../../../../sonar-ui-common/components/controls/buttons'; -import { change, submit, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, submit, waitAndUpdate } from '../../../../helpers/testUtils'; import { AlmKeys } from '../../../../types/alm-settings'; import PersonalAccessTokenForm from '../PersonalAccessTokenForm'; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/App.tsx b/server/sonar-web/src/main/js/apps/documentation/components/App.tsx index a8d8423fb78..c7847f7656c 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/App.tsx @@ -28,11 +28,11 @@ import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import NotFound from '../../../app/components/NotFound'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; import DocMarkdownBlock from '../../../components/docs/DocMarkdownBlock'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import { ParsedContent, separateFrontMatter } from '../../../helpers/markdown'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { addSideBarClass, removeSideBarClass } from '../../../sonar-ui-common/helpers/pages'; -import { isDefined } from '../../../sonar-ui-common/helpers/types'; +import { addSideBarClass, removeSideBarClass } from '../../../helpers/pages'; +import { isDefined } from '../../../helpers/types'; import { InstalledPlugin, PluginType } from '../../../types/plugins'; import { getUrlsList } from '../navTreeUtils'; import getPages from '../pages'; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/MenuBlock.tsx b/server/sonar-web/src/main/js/apps/documentation/components/MenuBlock.tsx index 2ad79cbcf6c..fb51d62654e 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/MenuBlock.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/MenuBlock.tsx @@ -20,8 +20,8 @@ import * as classNames from 'classnames'; import { DocNavigationItem, DocsNavigationBlock } from 'Docs/@types/types'; import * as React from 'react'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import OpenCloseIcon from '../../../sonar-ui-common/components/icons/OpenCloseIcon'; +import { ButtonLink } from '../../../components/controls/buttons'; +import OpenCloseIcon from '../../../components/icons/OpenCloseIcon'; import { isDocsNavigationBlock } from '../navTreeUtils'; import { DocumentationEntry, getNodeFromUrl } from '../utils'; import { MenuItem } from './MenuItem'; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/MenuExternalLink.tsx b/server/sonar-web/src/main/js/apps/documentation/components/MenuExternalLink.tsx index cc92fa60f99..5eb1d5de655 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/MenuExternalLink.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/MenuExternalLink.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import DetachIcon from '../../../sonar-ui-common/components/icons/DetachIcon'; +import DetachIcon from '../../../components/icons/DetachIcon'; interface Props { title: string; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/SearchResults.tsx b/server/sonar-web/src/main/js/apps/documentation/components/SearchResults.tsx index 23b19e45a08..4ec73f848d3 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/SearchResults.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/SearchResults.tsx @@ -21,7 +21,7 @@ import { DocNavigationItem } from 'Docs/@types/types'; import { sortBy } from 'lodash'; import lunr, { LunrBuilder, LunrIndex, LunrToken } from 'lunr'; import * as React from 'react'; -import { isDefined } from '../../../sonar-ui-common/helpers/types'; +import { isDefined } from '../../../helpers/types'; import { getUrlsList } from '../navTreeUtils'; import { DocumentationEntry } from '../utils'; import SearchResultEntry from './SearchResultEntry'; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/Sidebar.tsx b/server/sonar-web/src/main/js/apps/documentation/components/Sidebar.tsx index 869f0b7f22c..69cae6bc2f8 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/Sidebar.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/Sidebar.tsx @@ -19,7 +19,7 @@ */ import { DocNavigationItem } from 'Docs/@types/types'; import * as React from 'react'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; +import SearchBox from '../../../components/controls/SearchBox'; import { DocumentationEntry } from '../utils'; import Menu from './Menu'; import SearchResults from './SearchResults'; diff --git a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/App-test.tsx index f48ac2be598..1c18bcb3437 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/App-test.tsx @@ -19,9 +19,9 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { addSideBarClass, removeSideBarClass } from '../../../../sonar-ui-common/helpers/pages'; -import { request } from '../../../../sonar-ui-common/helpers/request'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { addSideBarClass, removeSideBarClass } from '../../../../helpers/pages'; +import { request } from '../../../../helpers/request'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { InstalledPlugin } from '../../../../types/plugins'; import getPages from '../../pages'; import App from '../App'; @@ -51,12 +51,12 @@ jest.mock('Docs/../static/SonarQubeNavigationTree.json', () => ({ ] })); -jest.mock('../../../../sonar-ui-common/helpers/pages', () => ({ +jest.mock('../../../../helpers/pages', () => ({ addSideBarClass: jest.fn(), removeSideBarClass: jest.fn() })); -jest.mock('../../../../sonar-ui-common/helpers/request', () => { +jest.mock('../../../../helpers/request', () => { const { mockDocumentationMarkdown } = jest.requireActual('../../../../helpers/testMocks'); return { request: jest.fn(() => ({ diff --git a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuBlock-test.tsx b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuBlock-test.tsx index a2b0ed72248..22e19b5b9a5 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuBlock-test.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/MenuBlock-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import MenuBlock from '../MenuBlock'; it('should render a closed menu block', () => { diff --git a/server/sonar-web/src/main/js/apps/documentation/routes.ts b/server/sonar-web/src/main/js/apps/documentation/routes.ts index 76cfc03421d..7b420fd6754 100644 --- a/server/sonar-web/src/main/js/apps/documentation/routes.ts +++ b/server/sonar-web/src/main/js/apps/documentation/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const App = lazyLoadComponent(() => import(/* webpackChunkName: "docs" */ './components/App')); diff --git a/server/sonar-web/src/main/js/apps/groups/components/App.tsx b/server/sonar-web/src/main/js/apps/groups/components/App.tsx index 01eb3dada9f..efa8eeb4429 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/App.tsx @@ -21,10 +21,10 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { createGroup, deleteGroup, searchUsersGroups, updateGroup } from '../../../api/user_groups'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { omitNil } from '../../../sonar-ui-common/helpers/request'; +import ListFooter from '../../../components/controls/ListFooter'; +import SearchBox from '../../../components/controls/SearchBox'; +import { translate } from '../../../helpers/l10n'; +import { omitNil } from '../../../helpers/request'; import DeleteForm from './DeleteForm'; import Form from './Form'; import Header from './Header'; diff --git a/server/sonar-web/src/main/js/apps/groups/components/DeleteForm.tsx b/server/sonar-web/src/main/js/apps/groups/components/DeleteForm.tsx index 4ba75a1e023..bae62700da5 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/DeleteForm.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/DeleteForm.tsx @@ -18,13 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; interface Props { group: T.Group; diff --git a/server/sonar-web/src/main/js/apps/groups/components/EditMembers.tsx b/server/sonar-web/src/main/js/apps/groups/components/EditMembers.tsx index dd8dc1cd57d..59f29c29d74 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/EditMembers.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/EditMembers.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonIcon } from '../../../sonar-ui-common/components/controls/buttons'; -import BulletListIcon from '../../../sonar-ui-common/components/icons/BulletListIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonIcon } from '../../../components/controls/buttons'; +import BulletListIcon from '../../../components/icons/BulletListIcon'; +import { translate } from '../../../helpers/l10n'; import EditMembersModal from './EditMembersModal'; interface Props { 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 462aac441ab..619ffe94e34 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 @@ -20,13 +20,13 @@ import { find, without } from 'lodash'; import * as React from 'react'; import { addUserToGroup, getUsersInGroup, removeUserFromGroup } from '../../../api/user_groups'; -import { ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; +import { ResetButtonLink } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; import SelectList, { SelectListFilter, SelectListSearchParams -} from '../../../sonar-ui-common/components/controls/SelectList'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +} from '../../../components/controls/SelectList'; +import { translate } from '../../../helpers/l10n'; interface Props { group: T.Group; diff --git a/server/sonar-web/src/main/js/apps/groups/components/Form.tsx b/server/sonar-web/src/main/js/apps/groups/components/Form.tsx index 2796e308e59..2efab620f3e 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/Form.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/Form.tsx @@ -18,15 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; interface Props { confirmButtonText: string; 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 6aba69becfb..6a9a1f5e742 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { translate } from '../../../helpers/l10n'; import Form from './Form'; interface Props { 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 7ad06d1d1ee..789811564c1 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 @@ -19,7 +19,7 @@ */ import { sortBy } from 'lodash'; import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import ListItem from './ListItem'; interface Props { 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 59ceb8493b4..4e90fd62a63 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 @@ -21,8 +21,8 @@ import * as React from 'react'; import ActionsDropdown, { ActionsDropdownDivider, ActionsDropdownItem -} from '../../../sonar-ui-common/components/controls/ActionsDropdown'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +} from '../../../components/controls/ActionsDropdown'; +import { translate } from '../../../helpers/l10n'; import EditMembers from './EditMembers'; export interface ListItemProps { diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/App-test.tsx index efeed575ab9..b0d1846560f 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/App-test.tsx @@ -26,7 +26,7 @@ import { updateGroup } from '../../../../api/user_groups'; import { mockGroup } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import App from '../App'; jest.mock('../../../../api/user_groups', () => ({ diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx index f27db315de8..7258b78ab27 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembers-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import EditMembers from '../EditMembers'; it('should edit members', () => { diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembersModal-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembersModal-test.tsx index d6e7096c8a6..86c8408460e 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembersModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/EditMembersModal-test.tsx @@ -20,10 +20,8 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { addUserToGroup, getUsersInGroup, removeUserFromGroup } from '../../../../api/user_groups'; -import SelectList, { - SelectListFilter -} from '../../../../sonar-ui-common/components/controls/SelectList'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import SelectList, { SelectListFilter } from '../../../../components/controls/SelectList'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import EditMembersModal from '../EditMembersModal'; const group = { id: 1, name: 'foo', membersCount: 1 }; diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/Form-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/Form-test.tsx index 65c62164219..367f2d7d897 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/Form-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/Form-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { change, click, submit } from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, click, submit } from '../../../../helpers/testUtils'; import Form from '../Form'; it('should render form', async () => { diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/groups/components/__tests__/Header-test.tsx index e22d914d748..ef620eece6d 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/Header-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import Header from '../Header'; it('should create new group', () => { diff --git a/server/sonar-web/src/main/js/apps/groups/routes.ts b/server/sonar-web/src/main/js/apps/groups/routes.ts index f57b5528d59..3056655f8ba 100644 --- a/server/sonar-web/src/main/js/apps/groups/routes.ts +++ b/server/sonar-web/src/main/js/apps/groups/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 6f69f84b739..50109797506 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,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 { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; +import { scrollToElement } from '../../../helpers/scrolling'; import { SecurityStandard } from '../../../types/security'; import { scrollToIssue, @@ -26,7 +26,7 @@ import { shouldOpenStandardsFacet } from '../utils'; -jest.mock('../../../sonar-ui-common/helpers/scrolling', () => ({ +jest.mock('../../../helpers/scrolling', () => ({ scrollToElement: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.tsx b/server/sonar-web/src/main/js/apps/issues/components/App.tsx index afb752b00c2..a3d1cae7da1 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/App.tsx @@ -27,29 +27,29 @@ import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import EmptySearch from '../../../components/common/EmptySearch'; import FiltersHeader from '../../../components/common/FiltersHeader'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; +import { Button } from '../../../components/controls/buttons'; +import Checkbox from '../../../components/controls/Checkbox'; +import ListFooter from '../../../components/controls/ListFooter'; import { Location, Router } from '../../../components/hoc/withRouter'; import '../../../components/search-navigator.css'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { fillBranchLike, getBranchLikeQuery, isPullRequest, isSameBranchLike } from '../../../helpers/branch-like'; -import { isSonarCloud } from '../../../helpers/system'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import Checkbox from '../../../sonar-ui-common/components/controls/Checkbox'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import handleRequiredAuthentication from '../../../sonar-ui-common/helpers/handleRequiredAuthentication'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { addSideBarClass, addWhitePageClass, removeSideBarClass, removeWhitePageClass -} from '../../../sonar-ui-common/helpers/pages'; -import { serializeDate } from '../../../sonar-ui-common/helpers/query'; +} from '../../../helpers/pages'; +import { serializeDate } from '../../../helpers/query'; +import { isSonarCloud } from '../../../helpers/system'; import { BranchLike } from '../../../types/branch-like'; import { Facet, diff --git a/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx b/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx index 551b7ebcd42..b6762016283 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx @@ -20,8 +20,8 @@ import { connect } from 'react-redux'; import { searchIssues } from '../../../api/issues'; import { withRouter } from '../../../components/hoc/withRouter'; +import { lazyLoadComponent } from '../../../components/lazyLoadComponent'; import { parseIssueFromResponse } from '../../../helpers/issues'; -import { lazyLoadComponent } from '../../../sonar-ui-common/components/lazyLoadComponent'; import { fetchBranchStatus } from '../../../store/rootActions'; import { getCurrentUser, Store } from '../../../store/rootReducer'; import { FetchIssuesPromise } from '../../../types/issues'; 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 70c3ceaae8a..0445c130997 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 @@ -23,23 +23,20 @@ import { FormattedMessage } from 'react-intl'; import { bulkChangeIssues, searchIssueTags } from '../../../api/issues'; import throwGlobalError from '../../../app/utils/throwGlobalError'; import FormattingTips from '../../../components/common/FormattingTips'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Checkbox from '../../../components/controls/Checkbox'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import Modal from '../../../components/controls/Modal'; +import Radio from '../../../components/controls/Radio'; +import SearchSelect from '../../../components/controls/SearchSelect'; +import Select from '../../../components/controls/Select'; +import Tooltip from '../../../components/controls/Tooltip'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; import SeverityHelper from '../../../components/shared/SeverityHelper'; +import { Alert } from '../../../components/ui/Alert'; import Avatar from '../../../components/ui/Avatar'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { isLoggedIn, isUserActive } from '../../../helpers/users'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Checkbox from '../../../sonar-ui-common/components/controls/Checkbox'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import SearchSelect from '../../../sonar-ui-common/components/controls/SearchSelect'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import { searchAssignees } from '../utils'; interface AssigneeOption { 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 af8072af9b9..8328b94727d 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { collapsePath, limitComponentName } from '../../../sonar-ui-common/helpers/path'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import { translateWithParameters } from '../../../helpers/l10n'; +import { collapsePath, limitComponentName } from '../../../helpers/path'; import { getSelectedLocation } from '../utils'; interface Props { 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 b01cb385fae..f66ec913dee 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import PageCounter from '../../../components/common/PageCounter'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { current: number | undefined; 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 6209307c532..f09aea4e498 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import SourceViewer from '../../../components/SourceViewer/SourceViewer'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; +import { scrollToElement } from '../../../helpers/scrolling'; import { BranchLike } from '../../../types/branch-like'; import CrossComponentSourceViewer from '../crossComponentSourceViewer/CrossComponentSourceViewer'; import { getLocations, getSelectedLocation } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/MyIssuesFilter.tsx b/server/sonar-web/src/main/js/apps/issues/components/MyIssuesFilter.tsx index c20291bf6ef..e008f7d901e 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/MyIssuesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/MyIssuesFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { translate } from '../../../helpers/l10n'; interface Props { myIssues: boolean; 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 79f3a88cc80..88b98c6cea9 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import '../../../components/common/EmptySearch.css'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export default function NoIssues() { return ( 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 3d1e351fb65..8045effe49c 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import '../../../components/common/EmptySearch.css'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export default function NoMyIssues() { return ( 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 0c9f4c35adc..9437e70468b 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 @@ -20,8 +20,8 @@ import * as React from 'react'; import HomePageSelect from '../../../components/controls/HomePageSelect'; import PageShortcutsTooltip from '../../../components/ui/PageShortcutsTooltip'; +import { translate } from '../../../helpers/l10n'; import { isSonarCloud } from '../../../helpers/system'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import IssuesCounter from './IssuesCounter'; import TotalEffort from './TotalEffort'; 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 c03300e4a7a..18f5dc98f8e 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; export default function TotalEffort({ effort }: { effort: number }) { return ( diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/App-test.tsx index bd629cc8ff2..96dfacafa71 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/App-test.tsx @@ -20,8 +20,16 @@ import { shallow } from 'enzyme'; import * as key from 'keymaster'; import * as React from 'react'; +import handleRequiredAuthentication from '../../../../helpers/handleRequiredAuthentication'; +import { KeyCodes } from '../../../../helpers/keycodes'; import { mockPullRequest } from '../../../../helpers/mocks/branch-like'; import { + addSideBarClass, + addWhitePageClass, + removeSideBarClass, + removeWhitePageClass +} from '../../../../helpers/pages'; +import { mockComponent, mockCurrentUser, mockEvent, @@ -30,15 +38,7 @@ import { mockLoggedInUser, mockRouter } from '../../../../helpers/testMocks'; -import handleRequiredAuthentication from '../../../../sonar-ui-common/helpers/handleRequiredAuthentication'; -import { KeyCodes } from '../../../../sonar-ui-common/helpers/keycodes'; -import { - addSideBarClass, - addWhitePageClass, - removeSideBarClass, - removeWhitePageClass -} from '../../../../sonar-ui-common/helpers/pages'; -import { KEYCODE_MAP, keydown, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { KEYCODE_MAP, keydown, waitAndUpdate } from '../../../../helpers/testUtils'; import { disableLocationsNavigator, enableLocationsNavigator, @@ -50,14 +50,14 @@ import { import App from '../App'; import BulkChangeModal from '../BulkChangeModal'; -jest.mock('../../../../sonar-ui-common/helpers/pages', () => ({ +jest.mock('../../../../helpers/pages', () => ({ addSideBarClass: jest.fn(), addWhitePageClass: jest.fn(), removeSideBarClass: jest.fn(), removeWhitePageClass: jest.fn() })); -jest.mock('../../../../sonar-ui-common/helpers/handleRequiredAuthentication', () => ({ +jest.mock('../../../../helpers/handleRequiredAuthentication', () => ({ default: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-test.tsx index 11bd8a3e0b8..e24612c56e0 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-test.tsx @@ -20,10 +20,10 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { searchIssueTags } from '../../../../api/issues'; +import { SubmitButton } from '../../../../components/controls/buttons'; +import Select from '../../../../components/controls/Select'; import { mockIssue } from '../../../../helpers/testMocks'; -import { SubmitButton } from '../../../../sonar-ui-common/components/controls/buttons'; -import Select from '../../../../sonar-ui-common/components/controls/Select'; -import { change, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, waitAndUpdate } from '../../../../helpers/testUtils'; import BulkChangeModal, { MAX_PAGE_SIZE } from '../BulkChangeModal'; jest.mock('../../../../api/issues', () => ({ diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesList-test.tsx b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesList-test.tsx index 5695ad06edf..dfbc6b4aaa2 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesList-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/IssuesList-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockIssue } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import IssuesList from '../IssuesList'; it('should render correctly', async () => { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.tsx index b158295fa0c..c7303a7b17c 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import LocationIndex from '../../../components/common/LocationIndex'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; interface Props { count: number; diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocations.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocations.tsx index 37f17877ccc..fe1b4cfad28 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocations.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocations.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; +import { Button } from '../../../components/controls/buttons'; import ConciseIssueLocationBadge from './ConciseIssueLocationBadge'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesList.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesList.tsx index 7f9449008ce..77058d1e9b4 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesList.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesList.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; +import { scrollToElement } from '../../../helpers/scrolling'; import ConciseIssue from './ConciseIssue'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesListHeader.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesListHeader.tsx index 305dc312cc8..5366fb57553 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesListHeader.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesListHeader.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import BackButton from '../../../components/controls/BackButton'; import PageShortcutsTooltip from '../../../components/ui/PageShortcutsTooltip'; -import BackButton from '../../../sonar-ui-common/components/controls/BackButton'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export interface ConciseIssuesListHeaderProps { displayBackButton: boolean; diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/CrossFileLocationsNavigator.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/CrossFileLocationsNavigator.tsx index 1131f60d157..09d1a4db6d7 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/CrossFileLocationsNavigator.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/CrossFileLocationsNavigator.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { collapsePath } from '../../../sonar-ui-common/helpers/path'; +import { translateWithParameters } from '../../../helpers/l10n'; +import { collapsePath } from '../../../helpers/path'; import ConciseIssueLocationsNavigatorLocation from './ConciseIssueLocationsNavigatorLocation'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueBox-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueBox-test.tsx index 785a0fc8232..a4d34126b6e 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueBox-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/ConciseIssueBox-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockIssue } from '../../../../helpers/testMocks'; -import { click, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../../helpers/testUtils'; import ConciseIssueBox from '../ConciseIssueBox'; it('should render correctly', async () => { diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/CrossFileLocationsNavigator-test.tsx b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/CrossFileLocationsNavigator-test.tsx index 355e480b2ed..dd7a5f92199 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/CrossFileLocationsNavigator-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/CrossFileLocationsNavigator-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockFlowLocation } from '../../../../helpers/testMocks'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import CrossFileLocationsNavigator from '../CrossFileLocationsNavigator'; const location1: T.FlowLocation = { 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 827372f88ad..a08ec46fa94 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 @@ -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 { lazyLoadComponent } from '../../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../../components/lazyLoadComponent'; const CrossComponentSourceViewer = lazyLoadComponent( () => import(/* webpackPrefetch: true */ './CrossComponentSourceViewerWrapper'), diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewerWrapper.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewerWrapper.tsx index 8159080a98a..4b23e381d76 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewerWrapper.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewerWrapper.tsx @@ -33,11 +33,11 @@ import { issuesByComponentAndLine } from '../../../components/SourceViewer/helpers/indexing'; import { SourceViewerContext } from '../../../components/SourceViewer/SourceViewerContext'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { WorkspaceContext } from '../../../components/workspace/context'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import ComponentSourceSnippetGroupViewer from './ComponentSourceSnippetGroupViewer'; import { groupLocationsByComponent } from './utils'; 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 b43ae9943ac..2d14573f536 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 @@ -19,6 +19,7 @@ */ import classNames from 'classnames'; import * as React from 'react'; +import ExpandSnippetIcon from '../../../components/icons/ExpandSnippetIcon'; import Line from '../../../components/SourceViewer/components/Line'; import { symbolsByLine } from '../../../components/SourceViewer/helpers/indexing'; import { getSecondaryIssueLocationsForLine } from '../../../components/SourceViewer/helpers/issueLocations'; @@ -27,9 +28,8 @@ import { optimizeLocationMessage, optimizeSelectedIssue } from '../../../components/SourceViewer/helpers/lines'; -import ExpandSnippetIcon from '../../../sonar-ui-common/components/icons/ExpandSnippetIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { scrollHorizontally } from '../../../sonar-ui-common/helpers/scrolling'; +import { translate } from '../../../helpers/l10n'; +import { scrollHorizontally } from '../../../helpers/scrolling'; import { BranchLike } from '../../../types/branch-like'; import './SnippetViewer.css'; import { inSnippet, LINES_BELOW_ISSUE } from './utils'; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/ComponentSourceSnippetGroupViewer-test.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/ComponentSourceSnippetGroupViewer-test.tsx index b70c1779de4..899005fdf8d 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/ComponentSourceSnippetGroupViewer-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/ComponentSourceSnippetGroupViewer-test.tsx @@ -30,7 +30,7 @@ import { mockSourceLine, mockSourceViewerFile } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import ComponentSourceSnippetGroupViewer from '../ComponentSourceSnippetGroupViewer'; import SnippetViewer from '../SnippetViewer'; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/CrossComponentSourceViewerWrapper-test.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/CrossComponentSourceViewerWrapper-test.tsx index e1385d49a63..89888878eb8 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/CrossComponentSourceViewerWrapper-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/CrossComponentSourceViewerWrapper-test.tsx @@ -28,7 +28,7 @@ import { mockSourceLine, mockSourceViewerFile } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import CrossComponentSourceViewerWrapper from '../CrossComponentSourceViewerWrapper'; jest.mock('../../../../api/issues', () => { 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 1bc3d76f177..3dce088da85 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 @@ -21,11 +21,11 @@ import { mount, shallow } from 'enzyme'; import { range } from 'lodash'; import * as React from 'react'; import { mockMainBranch } from '../../../../helpers/mocks/branch-like'; +import { scrollHorizontally } from '../../../../helpers/scrolling'; import { mockIssue, mockSourceLine, mockSourceViewerFile } from '../../../../helpers/testMocks'; -import { scrollHorizontally } from '../../../../sonar-ui-common/helpers/scrolling'; import SnippetViewer from '../SnippetViewer'; -jest.mock('../../../../sonar-ui-common/helpers/scrolling', () => ({ +jest.mock('../../../../helpers/scrolling', () => ({ scrollHorizontally: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/issues/redirects.ts b/server/sonar-web/src/main/js/apps/issues/redirects.ts index 83671dcf33b..35cc0eebc6b 100644 --- a/server/sonar-web/src/main/js/apps/issues/redirects.ts +++ b/server/sonar-web/src/main/js/apps/issues/redirects.ts @@ -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 { Location } from '../../sonar-ui-common/helpers/urls'; +import { Location } from '../../helpers/urls'; import { areMyIssuesSelected, parseQuery, serializeQuery } from './utils'; function parseHash(hash: string) { 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 3904b0a5cfe..20154382029 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 @@ -21,9 +21,9 @@ import { omit, sortBy, without } from 'lodash'; import * as React from 'react'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; import Avatar from '../../../components/ui/Avatar'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { highlightTerm } from '../../../helpers/search'; import { isUserActive } from '../../../helpers/users'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { highlightTerm } from '../../../sonar-ui-common/helpers/search'; import { Facet } from '../../../types/issues'; import { Query, searchAssignees } from '../utils'; 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 bcedd8f2eb3..465395d1b79 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 @@ -21,8 +21,8 @@ import { omit } from 'lodash'; import * as React from 'react'; import { searchIssueAuthors } from '../../../api/issues'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { highlightTerm } from '../../../sonar-ui-common/helpers/search'; +import { translate } from '../../../helpers/l10n'; +import { highlightTerm } from '../../../helpers/search'; import { Facet } from '../../../types/issues'; import { Query } from '../utils'; 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 db082f4d93e..a39c65adc52 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 @@ -21,19 +21,19 @@ import * as isSameDay from 'date-fns/is_same_day'; import { max } from 'lodash'; import * as React from 'react'; import { InjectedIntlProps, injectIntl } from 'react-intl'; +import BarChart from '../../../components/charts/BarChart'; import DateRangeInput from '../../../components/controls/DateRangeInput'; import FacetBox from '../../../components/facet/FacetBox'; import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; -import BarChart from '../../../sonar-ui-common/components/charts/BarChart'; -import { longFormatterOption } from '../../../sonar-ui-common/components/intl/DateFormatter'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; +import { longFormatterOption } from '../../../components/intl/DateFormatter'; +import DateFromNow from '../../../components/intl/DateFromNow'; import DateTimeFormatter, { formatterOption as dateTimeFormatterOption -} from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +} from '../../../components/intl/DateTimeFormatter'; +import { parseDate } from '../../../helpers/dates'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { isPortfolioLike } from '../../../types/component'; import { Query } from '../utils'; 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 cca8822e56f..650557aafa9 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 @@ -21,11 +21,11 @@ import { omit } from 'lodash'; import * as React from 'react'; import { getDirectories } from '../../../api/components'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { collapsePath } from '../../../sonar-ui-common/helpers/path'; -import { highlightTerm } from '../../../sonar-ui-common/helpers/search'; +import { translate } from '../../../helpers/l10n'; +import { collapsePath } from '../../../helpers/path'; +import { highlightTerm } from '../../../helpers/search'; import { BranchLike } from '../../../types/branch-like'; import { TreeComponentWithPath } from '../../../types/component'; import { Facet } from '../../../types/issues'; 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 b2c6a8d5d3e..b390d5c4d36 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 @@ -21,12 +21,12 @@ import { omit } from 'lodash'; import * as React from 'react'; import { getFiles } from '../../../api/components'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { collapsePath, splitPath } from '../../../sonar-ui-common/helpers/path'; -import { highlightTerm } from '../../../sonar-ui-common/helpers/search'; -import { isDefined } from '../../../sonar-ui-common/helpers/types'; +import { translate } from '../../../helpers/l10n'; +import { collapsePath, splitPath } from '../../../helpers/path'; +import { highlightTerm } from '../../../helpers/search'; +import { isDefined } from '../../../helpers/types'; import { BranchLike } from '../../../types/branch-like'; import { TreeComponentWithPath } from '../../../types/component'; import { Facet } 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 1109b5dbcaf..a898a622af5 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 @@ -21,8 +21,8 @@ import { omit, uniqBy } from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { highlightTerm } from '../../../sonar-ui-common/helpers/search'; +import { translate } from '../../../helpers/l10n'; +import { highlightTerm } from '../../../helpers/search'; import { getLanguages, Store } from '../../../store/rootReducer'; import { Facet, ReferencedLanguage } from '../../../types/issues'; import { Query } from '../utils'; 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 31442815910..4738c61842d 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 @@ -21,9 +21,9 @@ import { omit } from 'lodash'; import * as React from 'react'; import { getTree, searchProjects } from '../../../api/components'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { highlightTerm } from '../../../sonar-ui-common/helpers/search'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import { translate } from '../../../helpers/l10n'; +import { highlightTerm } from '../../../helpers/search'; import { ComponentQualifier } from '../../../types/component'; import { Facet, ReferencedComponent } from '../../../types/issues'; import { Query } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ResolutionFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/ResolutionFacet.tsx index 157a604fa3b..3d471491686 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ResolutionFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ResolutionFacet.tsx @@ -24,7 +24,7 @@ import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; import MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { formatFacetStat, Query } from '../utils'; interface Props { 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 b962c161c69..61d48932cfa 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 @@ -21,7 +21,7 @@ import { omit } from 'lodash'; import * as React from 'react'; import { searchRules } from '../../../api/rules'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Facet, ReferencedRule } from '../../../types/issues'; import { Query } from '../utils'; 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 a7c58981a29..44d3e34dc85 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 @@ -24,9 +24,9 @@ import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; import MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; import { SOURCE_SCOPES } from '../../../helpers/constants'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { formatFacetStat, Query } from '../utils'; export interface ScopeFacetProps { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/SeverityFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/SeverityFacet.tsx index 3a9ccae6834..e607e0bf9b9 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/SeverityFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/SeverityFacet.tsx @@ -25,7 +25,7 @@ import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; import MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint'; import SeverityHelper from '../../../components/shared/SeverityHelper'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { formatFacetStat, Query } from '../utils'; interface Props { 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 c779e26ed28..ae087df51be 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 @@ -25,6 +25,8 @@ import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; import MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint'; +import { translate } from '../../../helpers/l10n'; +import { highlightTerm } from '../../../helpers/search'; import { getStandards, renderCWECategory, @@ -32,8 +34,6 @@ import { renderSansTop25Category, renderSonarSourceSecurityCategory } from '../../../helpers/security-standard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { highlightTerm } from '../../../sonar-ui-common/helpers/search'; import { Facet } from '../../../types/issues'; import { SecurityStandard, Standards, StandardType } from '../../../types/security'; import { formatFacetStat, Query, STANDARDS } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx index 80bac60b2c7..ebf1fa97c75 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx @@ -25,7 +25,7 @@ import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; import MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint'; import StatusHelper from '../../../components/shared/StatusHelper'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { formatFacetStat, Query } from '../utils'; interface Props { 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 1894d6400ca..dd3cb484862 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 @@ -22,9 +22,9 @@ import * as React from 'react'; import { searchIssueTags } from '../../../api/issues'; import { colors } from '../../../app/theme'; import ListStyleFacet from '../../../components/facet/ListStyleFacet'; -import TagsIcon from '../../../sonar-ui-common/components/icons/TagsIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { highlightTerm } from '../../../sonar-ui-common/helpers/search'; +import TagsIcon from '../../../components/icons/TagsIcon'; +import { translate } from '../../../helpers/l10n'; +import { highlightTerm } from '../../../helpers/search'; import { Facet } from '../../../types/issues'; import { Query } from '../utils'; 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 41e620607c8..057d954e2de 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 @@ -24,9 +24,9 @@ import FacetHeader from '../../../components/facet/FacetHeader'; import FacetItem from '../../../components/facet/FacetItem'; import FacetItemsList from '../../../components/facet/FacetItemsList'; import MultipleSelectionHint from '../../../components/facet/MultipleSelectionHint'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; import { ISSUE_TYPES } from '../../../helpers/constants'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { formatFacetStat, Query } from '../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StandardFacet-test.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StandardFacet-test.tsx index 132f351a353..a3307f02033 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StandardFacet-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StandardFacet-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getStandards } from '../../../../helpers/security-standard'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import { Query } from '../../utils'; import StandardFacet from '../StandardFacet'; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-test.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-test.tsx index e048b364172..8672da77b5b 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/StatusFacet-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import StatusFacet from '../StatusFacet'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/TypeFacet-test.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/TypeFacet-test.tsx index 75b67261e59..c391a46a3c5 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/TypeFacet-test.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/TypeFacet-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import TypeFacet from '../TypeFacet'; it('should render open by default', () => { 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 0ebb14e37bf..68097880f43 100644 --- a/server/sonar-web/src/main/js/apps/issues/utils.ts +++ b/server/sonar-web/src/main/js/apps/issues/utils.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { searchUsers } from '../../api/users'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; +import { formatMeasure } from '../../helpers/measures'; import { cleanQuery, parseAsArray, @@ -29,9 +29,9 @@ import { serializeDateShort, serializeString, serializeStringArray -} from '../../sonar-ui-common/helpers/query'; -import { scrollToElement } from '../../sonar-ui-common/helpers/scrolling'; -import { get, save } from '../../sonar-ui-common/helpers/storage'; +} from '../../helpers/query'; +import { scrollToElement } from '../../helpers/scrolling'; +import { get, save } from '../../helpers/storage'; import { Facet, RawFacet } from '../../types/issues'; import { SecurityStandard, StandardType } from '../../types/security'; 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 465ab30cf86..82b66453860 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 @@ -23,12 +23,12 @@ import { Helmet } from 'react-helmet-async'; import { FormattedMessage } from 'react-intl'; import { getMigrationStatus, getSystemStatus, migrateDatabase } from '../../../api/system'; import InstanceMessage from '../../../components/common/InstanceMessage'; +import { Button } from '../../../components/controls/buttons'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import TimeFormatter from '../../../components/intl/TimeFormatter'; +import { translate } from '../../../helpers/l10n'; import { isSonarCloud } from '../../../helpers/system'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import TimeFormatter from '../../../sonar-ui-common/components/intl/TimeFormatter'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl, getReturnUrl } from '../../../sonar-ui-common/helpers/urls'; +import { getBaseUrl, getReturnUrl } from '../../../helpers/urls'; import '../styles.css'; interface Props { 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 f51b1d9c632..1d70f408329 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 @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../../helpers/testUtils'; import App from '../App'; jest.mock('../../../../api/system', () => ({ 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 80881819f79..4e784ecc664 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/routes.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/routes.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { IndexRoute } from 'react-router'; -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; export const maintenanceRoutes = ( <IndexRoute component={lazyLoadComponent(() => import('./components/MaintenanceAppContainer'))} /> 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 24e4a7595d5..9178dac6fcb 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/App.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/App.tsx @@ -31,9 +31,9 @@ import { import { getValues, setSimpleSettingValue } from '../../api/settings'; import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; import { Location, Router, withRouter } from '../../components/hoc/withRouter'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../components/ui/Alert'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; +import { translate } from '../../helpers/l10n'; import { EditionKey } from '../../types/editions'; import { PendingPluginResult, Plugin, RiskConsent } from '../../types/plugins'; import { SettingsKey } from '../../types/settings'; diff --git a/server/sonar-web/src/main/js/apps/marketplace/Footer.tsx b/server/sonar-web/src/main/js/apps/marketplace/Footer.tsx index bec229d6cdd..de51e9f7b76 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/Footer.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/Footer.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import { translateWithParameters } from '../../helpers/l10n'; interface Props { total: number; 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 262f5a9ade2..75fe2b42d75 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/Header.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/Header.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import { EditionKey } from '../../types/editions'; interface Props { 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 71e2adf9eef..91ceb0421d3 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/Search.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/Search.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import RadioToggle from '../../sonar-ui-common/components/controls/RadioToggle'; -import SearchBox from '../../sonar-ui-common/components/controls/SearchBox'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import RadioToggle from '../../components/controls/RadioToggle'; +import SearchBox from '../../components/controls/SearchBox'; +import { translate } from '../../helpers/l10n'; import { Query } from './utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/marketplace/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/marketplace/__tests__/App-test.tsx index b54164224d2..655e003aca6 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/__tests__/App-test.tsx @@ -27,7 +27,7 @@ import { } from '../../../api/plugins'; import { getValues, setSimpleSettingValue } from '../../../api/settings'; import { mockLocation, mockRouter } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { EditionKey } from '../../../types/editions'; import { RiskConsent } from '../../../types/plugins'; import { SettingsKey } from '../../../types/settings'; 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 f811f261c2b..b55fdc6dd51 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 @@ -21,9 +21,9 @@ import tooltipDCE from 'Docs/tooltips/editions/datacenter.md'; import tooltipDE from 'Docs/tooltips/editions/developer.md'; import tooltipEE from 'Docs/tooltips/editions/enterprise.md'; import * as React from 'react'; +import { lazyLoadComponent } from '../../../components/lazyLoadComponent'; import { getEditionUrl } from '../../../helpers/editions'; -import { lazyLoadComponent } from '../../../sonar-ui-common/components/lazyLoadComponent'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Edition, EditionKey } from '../../../types/editions'; const DocMarkdownBlock = lazyLoadComponent( diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/LicensePromptModal.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/LicensePromptModal.tsx index 6fd515a3471..d1148c40f10 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/LicensePromptModal.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/LicensePromptModal.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import { translate } from '../../../helpers/l10n'; interface Props { onClose: () => void; 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 a705f43ff03..ce3c9f87ad5 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 @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { installPlugin, uninstallPlugin, updatePlugin } from '../../../api/plugins'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import Checkbox from '../../../sonar-ui-common/components/controls/Checkbox'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import CheckIcon from '../../../sonar-ui-common/components/icons/CheckIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import Checkbox from '../../../components/controls/Checkbox'; +import Tooltip from '../../../components/controls/Tooltip'; +import CheckIcon from '../../../components/icons/CheckIcon'; +import { translate } from '../../../helpers/l10n'; import { isAvailablePlugin, isInstalledPlugin, Plugin } from '../../../types/plugins'; import PluginUpdateButton from './PluginUpdateButton'; 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 318ce5c98e4..5730cbb875d 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translateWithParameters } from '../../../helpers/l10n'; import { AvailablePlugin, InstalledPlugin } from '../../../types/plugins'; import PluginChangeLogButton from './PluginChangeLogButton'; import PluginDescription from './PluginDescription'; 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 f3d14fa3a1f..879cb0021dd 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 @@ -19,7 +19,7 @@ */ import { sortBy } from 'lodash'; import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +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 a2952406bb0..5b06bd8c3bd 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Dropdown from '../../../sonar-ui-common/components/controls/Dropdown'; -import EllipsisIcon from '../../../sonar-ui-common/components/icons/EllipsisIcon'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Dropdown from '../../../components/controls/Dropdown'; +import EllipsisIcon from '../../../components/icons/EllipsisIcon'; 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 25f904fe26d..bd1d195243e 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import DateFormatter from '../../../sonar-ui-common/components/intl/DateFormatter'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../../components/controls/Tooltip'; +import DateFormatter from '../../../components/intl/DateFormatter'; +import { translate } from '../../../helpers/l10n'; import { Release, Update } 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 11bb65ad80c..67f8ce8a96a 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { InstalledPlugin } from '../../../types/plugins'; import PluginDescription from './PluginDescription'; import PluginLicense from './PluginLicense'; 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 0aa2329b7eb..40fb77988e5 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate } from '../../../helpers/l10n'; interface Props { license?: string; 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 5bcceb6fe14..6c5e333f365 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; 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 be572709c35..a470a3e5be0 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +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 0ec951648f9..37edbfe9621 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +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 9925ab9f114..ad4af39d0a2 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Update } from '../../../types/plugins'; interface Props { 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 9af6f0f22b7..51a828be59b 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate } from '../../../helpers/l10n'; import { Release, Update } from '../../../types/plugins'; import PluginChangeLogButton from './PluginChangeLogButton'; 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 25a431ebea7..9c9184239c4 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +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 ad17d28ed8c..3fcf13c7c64 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Plugin } from '../../../types/plugins'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/marketplace/routes.ts b/server/sonar-web/src/main/js/apps/marketplace/routes.ts index 2d6991b424c..1e23fd6a9ce 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/routes.ts +++ b/server/sonar-web/src/main/js/apps/marketplace/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 a6e139d6fe6..d6a75278316 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/utils.ts +++ b/server/sonar-web/src/main/js/apps/marketplace/utils.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { memoize } from 'lodash'; -import { cleanQuery, parseAsString, serializeString } from '../../sonar-ui-common/helpers/query'; +import { cleanQuery, parseAsString, serializeString } from '../../helpers/query'; import { Plugin } from '../../types/plugins'; export interface Query { 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 f8baa938ff9..163d39c564e 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 @@ -27,9 +27,9 @@ import { splitSeriesInGraphs } from '../../../components/activity-graph/utils'; import ActivityLink from '../../../components/common/ActivityLink'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { parseDate } from '../../../helpers/dates'; +import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import { GraphType, MeasureHistory } from '../../../types/project-activity'; import Analysis from './Analysis'; 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 a263f8ff8be..80a7a6274b7 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 @@ -19,8 +19,8 @@ */ import { sortBy } from 'lodash'; import * as React from 'react'; -import DateTimeFormatter from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; +import { translate } from '../../../helpers/l10n'; import { ComponentQualifier } from '../../../types/component'; import Event from './Event'; 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 7639d46ed66..9ff6b737c46 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import { translateWithParameters } from '../../../helpers/l10n'; import { ApplicationPeriod } from '../../../types/application'; export interface ApplicationLeakPeriodInfoProps { 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 7ab24817f18..9ab00c04736 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 @@ -35,13 +35,13 @@ import { isMainBranch, isSameBranchLike } from '../../../helpers/branch-like'; +import { parseDate, toNotSoISOString } from '../../../helpers/dates'; import { enhanceConditionWithMeasure, enhanceMeasuresWithMetrics } from '../../../helpers/measures'; import { extractStatusConditionsFromApplicationStatusChildProject, extractStatusConditionsFromProjectStatus } from '../../../helpers/qualityGates'; -import { parseDate, toNotSoISOString } from '../../../sonar-ui-common/helpers/dates'; -import { isDefined } from '../../../sonar-ui-common/helpers/types'; +import { isDefined } from '../../../helpers/types'; import { ProjectAlmBindingResponse } from '../../../types/alm-settings'; import { ApplicationPeriod } from '../../../types/application'; import { Branch, BranchLike } from '../../../types/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 558e456b6da..d537f7d5d7a 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../helpers/dates'; import { ProjectAlmBindingResponse } from '../../../types/alm-settings'; import { ApplicationPeriod } from '../../../types/application'; import { Branch } from '../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/DebtValue.tsx b/server/sonar-web/src/main/js/apps/overview/branches/DebtValue.tsx index 49c2783c4a4..abf286bd08f 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/DebtValue.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/DebtValue.tsx @@ -20,9 +20,8 @@ import * as React from 'react'; import { getLeakValue } from '../../../components/measure/utils'; import DrilldownLink from '../../../components/shared/DrilldownLink'; -import { findMeasure, localizeMetric } from '../../../helpers/measures'; -import { getLocalizedMetricName, translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { getLocalizedMetricName, translate } from '../../../helpers/l10n'; +import { findMeasure, formatMeasure, localizeMetric } from '../../../helpers/measures'; import { BranchLike } from '../../../types/branch-like'; import { MetricKey } from '../../../types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/DrilldownMeasureValue.tsx b/server/sonar-web/src/main/js/apps/overview/branches/DrilldownMeasureValue.tsx index f0fd35e6f18..c30a0ca7f04 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/DrilldownMeasureValue.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/DrilldownMeasureValue.tsx @@ -19,9 +19,8 @@ */ import * as React from 'react'; import DrilldownLink from '../../../components/shared/DrilldownLink'; -import { findMeasure } from '../../../helpers/measures'; -import { getLocalizedMetricName } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { getLocalizedMetricName } from '../../../helpers/l10n'; +import { findMeasure, formatMeasure } from '../../../helpers/measures'; import { BranchLike } from '../../../types/branch-like'; import { MetricKey } from '../../../types/metrics'; 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 18db26b01e8..ce8440b6d3e 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import Level from '../../../sonar-ui-common/components/ui/Level'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Level from '../../../components/ui/Level'; +import { translate } from '../../../helpers/l10n'; import { isDefinitionChangeEvent } from '../../projectActivity/components/DefinitionChangeEventInner'; import { isRichQualityGateEvent } from '../../projectActivity/components/RichQualityGateEventInner'; 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 eec07932cf1..704d09759bb 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 @@ -22,8 +22,8 @@ import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; import DismissableAlert from '../../../components/ui/DismissableAlert'; +import { translate } from '../../../helpers/l10n'; import { isLoggedIn } from '../../../helpers/users'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { ProjectAlmBindingResponse } from '../../../types/alm-settings'; import { ComponentQualifier } from '../../../types/component'; import { PULL_REQUEST_DECORATION_BINDING_CATEGORY } from '../../settings/components/AdditionalCategoryKeys'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanel.tsx index 651c9cb83a9..4edc3cba36b 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanel.tsx @@ -19,12 +19,11 @@ */ import * as React from 'react'; import { rawSizes } from '../../../app/theme'; +import BoxedTabs from '../../../components/controls/BoxedTabs'; import ComponentReportActions from '../../../components/controls/ComponentReportActions'; -import { findMeasure } from '../../../helpers/measures'; -import BoxedTabs from '../../../sonar-ui-common/components/controls/BoxedTabs'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { isDiffMetric } from '../../../sonar-ui-common/helpers/measures'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; +import { findMeasure, isDiffMetric } from '../../../helpers/measures'; import { ApplicationPeriod } from '../../../types/application'; import { Branch } from '../../../types/branch-like'; import { ComponentQualifier } from '../../../types/component'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelIssueMeasureRow.tsx b/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelIssueMeasureRow.tsx index 5bf789f78d2..a4abcbd51a2 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelIssueMeasureRow.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelIssueMeasureRow.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import { ComponentQualifier } from '../../../types/component'; import { IssueType } from '../../../types/issues'; 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 83a822f2463..e02240a9760 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 @@ -21,8 +21,8 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { Branch } from '../../../types/branch-like'; import { ComponentQualifier } from '../../../types/component'; 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 2a330b66f61..3c03e6fe6c5 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Alert } from '../../../components/ui/Alert'; import { getBranchLikeDisplayName, isMainBranch } from '../../../helpers/branch-like'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import { ComponentQualifier } from '../../../types/component'; import { MetricKey } from '../../../types/metrics'; 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 136f545b5cd..8c47ec3485d 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 @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { InjectedIntl, injectIntl } from 'react-intl'; +import { longFormatterOption } from '../../../components/intl/DateFormatter'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import { formatterOption } from '../../../components/intl/DateTimeFormatter'; +import { translateWithParameters } from '../../../helpers/l10n'; import { getPeriodDate, getPeriodLabel } from '../../../helpers/periods'; -import { longFormatterOption } from '../../../sonar-ui-common/components/intl/DateFormatter'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import { formatterOption } from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; export interface ProjectLeakPeriodInfoProps { intl: Pick<InjectedIntl, 'formatDate' | 'formatTime'>; 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 e63a9f7a16a..9ca24fceeab 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 @@ -19,10 +19,10 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { QualityGateStatus } from '../../../types/quality-gates'; import QualityGatePanelSection from './QualityGatePanelSection'; 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 b763442d58b..5a557597687 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { translate } from '../../../helpers/l10n'; import { isDiffMetric } from '../../../helpers/measures'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import { ComponentQualifier } from '../../../types/component'; import { QualityGateStatus } from '../../../types/quality-gates'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/SecurityHotspotsReviewed.tsx b/server/sonar-web/src/main/js/apps/overview/branches/SecurityHotspotsReviewed.tsx index ea833f31b44..01840022a22 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/SecurityHotspotsReviewed.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/SecurityHotspotsReviewed.tsx @@ -20,9 +20,8 @@ import * as React from 'react'; import { getLeakValue } from '../../../components/measure/utils'; import CoverageRating from '../../../components/ui/CoverageRating'; -import { findMeasure } from '../../../helpers/measures'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { translate } from '../../../helpers/l10n'; +import { findMeasure, formatMeasure } from '../../../helpers/measures'; import { MetricKey } from '../../../types/metrics'; export interface SecurityHotspotsReviewedProps { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ActivityPanel-test.tsx b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ActivityPanel-test.tsx index 8e8b5bee578..a3c48202045 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ActivityPanel-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ActivityPanel-test.tsx @@ -20,6 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import GraphsHistory from '../../../../components/activity-graph/GraphsHistory'; +import { parseDate } from '../../../../helpers/dates'; import { mockMainBranch } from '../../../../helpers/mocks/branch-like'; import { mockAnalysis, @@ -28,7 +29,6 @@ import { mockMeasure, mockMetric } from '../../../../helpers/testMocks'; -import { parseDate } from '../../../../sonar-ui-common/helpers/dates'; import { GraphType } from '../../../../types/project-activity'; import { ActivityPanel, ActivityPanelProps } from '../ActivityPanel'; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ApplicationLeakPeriodInfo-test.tsx b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ApplicationLeakPeriodInfo-test.tsx index 6a6df76ed46..375247c368d 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ApplicationLeakPeriodInfo-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/ApplicationLeakPeriodInfo-test.tsx @@ -25,7 +25,7 @@ import { ApplicationLeakPeriodInfoProps } from '../ApplicationLeakPeriodInfo'; -jest.mock('../../../../sonar-ui-common/components/intl/DateFromNow'); +jest.mock('../../../../components/intl/DateFromNow'); it('renders correctly', () => { const wrapper = shallowRender(); diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-test.tsx b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-test.tsx index e046e01e7cf..aa390cbc15f 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-test.tsx @@ -29,17 +29,17 @@ import { } from '../../../../api/quality-gates'; import { getAllTimeMachineData } from '../../../../api/time-machine'; import { getActivityGraph, saveActivityGraph } from '../../../../components/activity-graph/utils'; +import { isDiffMetric } from '../../../../helpers/measures'; import { mockBranch, mockMainBranch } from '../../../../helpers/mocks/branch-like'; import { mockAnalysis, mockComponent } from '../../../../helpers/testMocks'; -import { isDiffMetric } from '../../../../sonar-ui-common/helpers/measures'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { ComponentQualifier } from '../../../../types/component'; import { MetricKey } from '../../../../types/metrics'; import { GraphType } from '../../../../types/project-activity'; import BranchOverview, { BRANCH_OVERVIEW_ACTIVITY_GRAPH, NO_CI_DETECTED } from '../BranchOverview'; import BranchOverviewRenderer from '../BranchOverviewRenderer'; -jest.mock('../../../../sonar-ui-common/helpers/dates', () => ({ +jest.mock('../../../../helpers/dates', () => ({ parseDate: jest.fn(date => `PARSED:${date}`), toNotSoISOString: jest.fn(date => date) })); diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/MeasuresPanel-test.tsx b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/MeasuresPanel-test.tsx index 2fb9aaaaa3a..de04ea274c8 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/MeasuresPanel-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/MeasuresPanel-test.tsx @@ -19,6 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import BoxedTabs from '../../../../components/controls/BoxedTabs'; import { mockBranch, mockMainBranch } from '../../../../helpers/mocks/branch-like'; import { mockComponent, @@ -26,7 +27,6 @@ import { mockMetric, mockPeriod } from '../../../../helpers/testMocks'; -import BoxedTabs from '../../../../sonar-ui-common/components/controls/BoxedTabs'; import { ComponentQualifier } from '../../../../types/component'; import { MetricKey } from '../../../../types/metrics'; import { MeasuresPanel, MeasuresPanelProps, MeasuresPanelTabs } from '../MeasuresPanel'; 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 093d5412636..e16b7599eb3 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 @@ -21,8 +21,8 @@ import * as React from 'react'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import { withAppState } from '../../../components/hoc/withAppState'; import { Router, withRouter } from '../../../components/hoc/withRouter'; +import { lazyLoadComponent } from '../../../components/lazyLoadComponent'; import { isPullRequest } from '../../../helpers/branch-like'; -import { lazyLoadComponent } from '../../../sonar-ui-common/components/lazyLoadComponent'; import { ProjectAlmBindingResponse } from '../../../types/alm-settings'; import { BranchLike } from '../../../types/branch-like'; import { isPortfolioLike } from '../../../types/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 083ee35ccef..0008d78886f 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 @@ -21,10 +21,10 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import TutorialSelection from '../../../components/tutorials/TutorialSelection'; +import { Alert } from '../../../components/ui/Alert'; import { getBranchLikeDisplayName, isBranch, isMainBranch } from '../../../helpers/branch-like'; +import { translate } from '../../../helpers/l10n'; import { isLoggedIn } from '../../../helpers/users'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { getCurrentUser, Store } from '../../../store/rootReducer'; import { ProjectAlmBindingResponse } from '../../../types/alm-settings'; import { BranchLike } from '../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/IssueLabel.tsx b/server/sonar-web/src/main/js/apps/overview/components/IssueLabel.tsx index 425bad16d02..8a9db10118b 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/IssueLabel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/IssueLabel.tsx @@ -19,13 +19,12 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; import { getLeakValue } from '../../../components/measure/utils'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; -import { findMeasure } from '../../../helpers/measures'; +import { translate } from '../../../helpers/l10n'; +import { findMeasure, formatMeasure, localizeMetric } from '../../../helpers/measures'; import { getComponentIssuesUrl, getComponentSecurityHotspotsUrl } from '../../../helpers/urls'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure, localizeMetric } from '../../../sonar-ui-common/helpers/measures'; import { BranchLike } from '../../../types/branch-like'; import { IssueType } from '../../../types/issues'; import { getIssueIconClass, getIssueMetricKey } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/IssueRating.tsx b/server/sonar-web/src/main/js/apps/overview/components/IssueRating.tsx index 3ded99b2125..ec85ad822ee 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/IssueRating.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/IssueRating.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import Tooltip from '../../../components/controls/Tooltip'; import { getLeakValue, getRatingTooltip } from '../../../components/measure/utils'; import DrilldownLink from '../../../components/shared/DrilldownLink'; +import Rating from '../../../components/ui/Rating'; import { findMeasure } from '../../../helpers/measures'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import Rating from '../../../sonar-ui-common/components/ui/Rating'; import { BranchLike } from '../../../types/branch-like'; import { IssueType } from '../../../types/issues'; import { getIssueRatingMetricKey, getIssueRatingName } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.tsx b/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.tsx index 58b4a91df86..25cb9953f1e 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.tsx @@ -20,16 +20,12 @@ import * as differenceInDays from 'date-fns/difference_in_days'; import * as React from 'react'; import { InjectedIntlProps, injectIntl } from 'react-intl'; +import Tooltip from '../../../components/controls/Tooltip'; +import DateFormatter, { longFormatterOption } from '../../../components/intl/DateFormatter'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import DateTimeFormatter, { formatterOption } from '../../../components/intl/DateTimeFormatter'; +import { translateWithParameters } from '../../../helpers/l10n'; import { getPeriodDate, getPeriodLabel } from '../../../helpers/periods'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import DateFormatter, { - longFormatterOption -} from '../../../sonar-ui-common/components/intl/DateFormatter'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import DateTimeFormatter, { - formatterOption -} from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; interface Props { period: T.Period; diff --git a/server/sonar-web/src/main/js/apps/overview/components/MeasurementLabel.tsx b/server/sonar-web/src/main/js/apps/overview/components/MeasurementLabel.tsx index 2b1152839b8..5e968b8b893 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/MeasurementLabel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/MeasurementLabel.tsx @@ -21,9 +21,8 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { getLeakValue } from '../../../components/measure/utils'; import DrilldownLink from '../../../components/shared/DrilldownLink'; -import { findMeasure } from '../../../helpers/measures'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { translate } from '../../../helpers/l10n'; +import { findMeasure, formatMeasure } from '../../../helpers/measures'; import { BranchLike } from '../../../types/branch-like'; import { getMeasurementIconClass, diff --git a/server/sonar-web/src/main/js/apps/overview/components/QualityGateCondition.tsx b/server/sonar-web/src/main/js/apps/overview/components/QualityGateCondition.tsx index e172060331d..ee795179407 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/QualityGateCondition.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/QualityGateCondition.tsx @@ -20,15 +20,17 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { Link } from 'react-router'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; import Measure from '../../../components/measure/Measure'; import DrilldownLink from '../../../components/shared/DrilldownLink'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; -import { isDiffMetric } from '../../../helpers/measures'; -import { getComponentIssuesUrl, getComponentSecurityHotspotsUrl } from '../../../helpers/urls'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; -import { Location } from '../../../sonar-ui-common/helpers/urls'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure, isDiffMetric } from '../../../helpers/measures'; +import { + getComponentIssuesUrl, + getComponentSecurityHotspotsUrl, + Location +} from '../../../helpers/urls'; import { BranchLike } from '../../../types/branch-like'; import { IssueType } from '../../../types/issues'; import { MetricKey } from '../../../types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/QualityGateConditions.tsx b/server/sonar-web/src/main/js/apps/overview/components/QualityGateConditions.tsx index 8ad441eb601..77e6323bb87 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/QualityGateConditions.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/QualityGateConditions.tsx @@ -19,9 +19,9 @@ */ import { sortBy } from 'lodash'; import * as React from 'react'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import ChevronDownIcon from '../../../sonar-ui-common/components/icons/ChevronDownIcon'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import ChevronDownIcon from '../../../components/icons/ChevronDownIcon'; +import { translateWithParameters } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates'; import QualityGateCondition from './QualityGateCondition'; diff --git a/server/sonar-web/src/main/js/apps/overview/components/__tests__/QualityGateConditions-test.tsx b/server/sonar-web/src/main/js/apps/overview/components/__tests__/QualityGateConditions-test.tsx index 1e94ca8bc7a..085fd38ac87 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/__tests__/QualityGateConditions-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/__tests__/QualityGateConditions-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockQualityGateStatusConditionEnhanced } from '../../../../helpers/mocks/quality-gates'; import { mockComponent } from '../../../../helpers/testMocks'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import { QualityGateStatusConditionEnhanced } from '../../../../types/quality-gates'; import { QualityGateConditions, QualityGateConditionsProps } from '../QualityGateConditions'; diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/AfterMergeEstimate.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/AfterMergeEstimate.tsx index a3cafb9f453..b8700b07878 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/AfterMergeEstimate.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/AfterMergeEstimate.tsx @@ -19,9 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { findMeasure } from '../../../helpers/measures'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { translate } from '../../../helpers/l10n'; +import { findMeasure, formatMeasure } from '../../../helpers/measures'; import { getMeasurementAfterMergeMetricKey, MeasurementType } from '../utils'; export interface AfterMergeEstimateProps { diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/LargeQualityGateBadge.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/LargeQualityGateBadge.tsx index 9374b9efd2b..83296254c49 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/LargeQualityGateBadge.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/LargeQualityGateBadge.tsx @@ -22,10 +22,10 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { colors } from '../../../app/theme'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import HelpIcon from '../../../components/icons/HelpIcon'; +import { translate } from '../../../helpers/l10n'; import { getQualityGatesUrl, getQualityGateUrl } from '../../../helpers/urls'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import HelpIcon from '../../../sonar-ui-common/components/icons/HelpIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; interface Props { component: T.Component; 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 64597fa2e88..b009e4eb519 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 @@ -22,12 +22,12 @@ import { differenceBy, uniq } from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; import { getMeasuresWithMetrics } from '../../../api/measures'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { Alert } from '../../../components/ui/Alert'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; +import { translate } from '../../../helpers/l10n'; import { enhanceConditionWithMeasure, enhanceMeasuresWithMetrics } from '../../../helpers/measures'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { isDefined } from '../../../sonar-ui-common/helpers/types'; +import { isDefined } from '../../../helpers/types'; import { fetchBranchStatus } from '../../../store/rootActions'; import { getBranchStatusByBranchLike, Store } from '../../../store/rootReducer'; import { BranchLike, PullRequest } from '../../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/PullRequestOverview-test.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/PullRequestOverview-test.tsx index 75036f41570..24983be18c3 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/PullRequestOverview-test.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/PullRequestOverview-test.tsx @@ -23,7 +23,7 @@ import { getMeasuresWithMetrics } from '../../../../api/measures'; import { mockPullRequest } from '../../../../helpers/mocks/branch-like'; import { mockQualityGateStatusCondition } from '../../../../helpers/mocks/quality-gates'; import { mockComponent } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { PR_METRICS } from '../../utils'; import { PullRequestOverview } from '../PullRequestOverview'; diff --git a/server/sonar-web/src/main/js/apps/overview/routes.ts b/server/sonar-web/src/main/js/apps/overview/routes.ts index f57b5528d59..3056655f8ba 100644 --- a/server/sonar-web/src/main/js/apps/overview/routes.ts +++ b/server/sonar-web/src/main/js/apps/overview/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { diff --git a/server/sonar-web/src/main/js/apps/overview/utils.ts b/server/sonar-web/src/main/js/apps/overview/utils.ts index 3a90a2c5433..9951b2d807a 100644 --- a/server/sonar-web/src/main/js/apps/overview/utils.ts +++ b/server/sonar-web/src/main/js/apps/overview/utils.ts @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import CoverageRating from '../../components/ui/CoverageRating'; +import DuplicationsRating from '../../components/ui/DuplicationsRating'; import { ISSUETYPE_METRIC_KEYS_MAP } from '../../helpers/issues'; -import DuplicationsRating from '../../sonar-ui-common/components/ui/DuplicationsRating'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import { IssueType } from '../../types/issues'; import { MetricKey } from '../../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 b98ab8e2ad0..4a2c0629eb5 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 @@ -24,12 +24,10 @@ import { setDefaultPermissionTemplate, updatePermissionTemplate } from '../../../api/permissions'; +import ActionsDropdown, { ActionsDropdownItem } from '../../../components/controls/ActionsDropdown'; import { Router, withRouter } from '../../../components/hoc/withRouter'; -import ActionsDropdown, { - ActionsDropdownItem -} from '../../../sonar-ui-common/components/controls/ActionsDropdown'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import { translate } from '../../../helpers/l10n'; import { PERMISSION_TEMPLATES_PATH } from '../utils'; import DeleteForm from './DeleteForm'; import Form from './Form'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/App.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/App.tsx index d3d41a26ac8..1502c621064 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/App.tsx @@ -23,7 +23,7 @@ import { Helmet } from 'react-helmet-async'; import { connect } from 'react-redux'; import { getPermissionTemplates } from '../../../api/permissions'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { getAppState, Store } from '../../../store/rootReducer'; import '../../permissions/styles.css'; import { mergeDefaultsToTemplates, mergePermissionsToTemplates, sortPermissions } from '../utils'; 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 862c5e7f212..6989f2ac20d 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 @@ -19,7 +19,7 @@ */ import { sortBy } from 'lodash'; import * as React from 'react'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; interface Props { template: T.PermissionTemplate; 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 3897b635b6d..e7ccb518868 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 @@ -18,13 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; interface Props { onClose: () => void; 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 aa8595b7e59..448f2fb0e9c 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 @@ -18,15 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; interface Props { confirmButtonText: string; 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 ec53e638978..0aa8f5f599a 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { createPermissionTemplate } from '../../../api/permissions'; +import { Button } from '../../../components/controls/buttons'; import { Router, withRouter } from '../../../components/hoc/withRouter'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { PERMISSION_TEMPLATES_PATH } from '../utils'; import Form from './Form'; 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 4bd8c9de9fb..398a06773bb 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import Header from './Header'; import List from './List'; 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 4962e65d652..3ce076cdb3e 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import InstanceMessage from '../../../components/common/InstanceMessage'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; interface Props { permissions: T.Permission[]; 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 b7989446ecc..da8c2dfcbe6 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { translate } from '../../../helpers/l10n'; import { isSonarCloud } from '../../../helpers/system'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; interface Props { permission: { 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 ffc9ea631d9..a865e508377 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 @@ -20,7 +20,7 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import * as api from '../../../api/permissions'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import HoldersList from '../../permissions/shared/components/HoldersList'; import SearchForm from '../../permissions/shared/components/SearchForm'; import { 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 cf1a984d98b..c0cb3b92d3d 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { PERMISSION_TEMPLATES_PATH } from '../utils'; import ActionsCell from './ActionsCell'; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/App-test.tsx index c9d7874a0c6..1acd6aa4b45 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/App-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockLocation } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { App } from '../App'; jest.mock('../../../../api/permissions', () => ({ diff --git a/server/sonar-web/src/main/js/apps/permission-templates/routes.ts b/server/sonar-web/src/main/js/apps/permission-templates/routes.ts index f57b5528d59..3056655f8ba 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/routes.ts +++ b/server/sonar-web/src/main/js/apps/permission-templates/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { diff --git a/server/sonar-web/src/main/js/apps/permissions/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/permissions/__tests__/utils-test.ts index 4e4e8e14aaf..5c6a1f128a9 100644 --- a/server/sonar-web/src/main/js/apps/permissions/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/permissions/__tests__/utils-test.ts @@ -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 SonarUiCommonInitializer from '../../../helpers/init'; import { isSonarCloud } from '../../../helpers/system'; -import SonarUiCommonInitializer from '../../../sonar-ui-common/helpers/init'; import { convertToPermissionDefinitions } from '../utils'; jest.mock('../../../helpers/system', () => ({ isSonarCloud: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.tsx index d0fb680c306..fa35299f732 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import ListFooter from '../../../../sonar-ui-common/components/controls/ListFooter'; +import ListFooter from '../../../../components/controls/ListFooter'; import { getAppState, Store } from '../../../../store/rootReducer'; import { ComponentQualifier } from '../../../../types/component'; import HoldersList from '../../shared/components/HoldersList'; diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx index 76e179beddc..d500c870b98 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import * as api from '../../../../api/permissions'; import Suggestions from '../../../../app/components/embed-docs-modal/Suggestions'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import '../../styles.css'; import AllHoldersList from './AllHoldersList'; import PageHeader from './PageHeader'; 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 7070b894147..880fea2f6f3 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; interface Props { loading?: boolean; diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/App-test.tsx index f0ae1af06b5..cf4c3c4a62a 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/App-test.tsx @@ -25,7 +25,7 @@ import { revokePermissionFromGroup, revokePermissionFromUser } from '../../../../../api/permissions'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import App from '../App'; jest.mock('../../../../../api/permissions', () => ({ diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.tsx index 9b0dfbd031e..f082f4702be 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.tsx @@ -19,7 +19,7 @@ */ import { without } from 'lodash'; import * as React from 'react'; -import ListFooter from '../../../../sonar-ui-common/components/controls/ListFooter'; +import ListFooter from '../../../../components/controls/ListFooter'; import HoldersList from '../../shared/components/HoldersList'; import SearchForm from '../../shared/components/SearchForm'; import { convertToPermissionDefinitions, PERMISSIONS_ORDER_BY_QUALIFIER } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx index 8705a95c47f..9b3fa2b5df4 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import * as api from '../../../../api/permissions'; import VisibilitySelector from '../../../../components/common/VisibilitySelector'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import '../../styles.css'; import AllHoldersList from './AllHoldersList'; import PageHeader from './PageHeader'; 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 8aa7313009f..39870d6a2a0 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 @@ -19,17 +19,14 @@ */ import * as React from 'react'; import { applyTemplateToProject, getPermissionTemplates } from '../../../../api/permissions'; -import { - ResetButtonLink, - SubmitButton -} from '../../../../sonar-ui-common/components/controls/buttons'; -import Select from '../../../../sonar-ui-common/components/controls/Select'; -import SimpleModal from '../../../../sonar-ui-common/components/controls/SimpleModal'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../../sonar-ui-common/components/ui/DeferredSpinner'; -import MandatoryFieldMarker from '../../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../../components/controls/buttons'; +import Select from '../../../../components/controls/Select'; +import SimpleModal from '../../../../components/controls/SimpleModal'; +import { Alert } from '../../../../components/ui/Alert'; +import DeferredSpinner from '../../../../components/ui/DeferredSpinner'; +import MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../../components/ui/MandatoryFieldsExplanation'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; interface Props { onApply?: () => void; 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 34163a4a2f3..242eebafe26 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../../components/controls/buttons'; +import { translate } from '../../../../helpers/l10n'; import { isApplication, isPortfolioLike } from '../../../../types/component'; import ApplyTemplate from './ApplyTemplate'; 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 fe2ea04d20b..69511f549c5 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,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ConfirmModal from '../../../../sonar-ui-common/components/controls/ConfirmModal'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; +import ConfirmModal from '../../../../components/controls/ConfirmModal'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; interface Props { component: { diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/App-test.tsx index a3e6666f277..bdb76b8563b 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/App-test.tsx @@ -26,7 +26,7 @@ import { revokePermissionFromUser } from '../../../../../api/permissions'; import { mockComponent } from '../../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import App from '../App'; jest.mock('../../../../../api/permissions', () => ({ diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/ApplyTemplate-test.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/ApplyTemplate-test.tsx index a156c334d54..9d10298af54 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/ApplyTemplate-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/ApplyTemplate-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import ApplyTemplate from '../ApplyTemplate'; jest.mock('../../../../../api/permissions', () => ({ diff --git a/server/sonar-web/src/main/js/apps/permissions/routes.ts b/server/sonar-web/src/main/js/apps/permissions/routes.ts index 2120a3ff088..3b5d67fd0cb 100644 --- a/server/sonar-web/src/main/js/apps/permissions/routes.ts +++ b/server/sonar-web/src/main/js/apps/permissions/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; export const globalPermissionsRoutes = [ { diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.tsx index fc3705a020f..98c52700247 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.tsx @@ -19,7 +19,7 @@ */ import { without } from 'lodash'; import * as React from 'react'; -import GroupIcon from '../../../../sonar-ui-common/components/icons/GroupIcon'; +import GroupIcon from '../../../../components/icons/GroupIcon'; import { isPermissionDefinitionGroup } from '../../utils'; import PermissionCell from './PermissionCell'; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.tsx index 4bc8839db4c..bcce4e0b0b7 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.tsx @@ -19,7 +19,7 @@ */ import { partition, sortBy } from 'lodash'; import * as React from 'react'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { isPermissionDefinitionGroup } from '../../utils'; import GroupHolder from './GroupHolder'; import PermissionHeader from './PermissionHeader'; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionCell.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionCell.tsx index 67d1959b0b8..bd685933967 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionCell.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionCell.tsx @@ -19,7 +19,7 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import Checkbox from '../../../../sonar-ui-common/components/controls/Checkbox'; +import Checkbox from '../../../../components/controls/Checkbox'; import { isPermissionDefinitionGroup } from '../../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionHeader.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionHeader.tsx index ae4c61116fa..4e749d59660 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionHeader.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/PermissionHeader.tsx @@ -20,10 +20,10 @@ import * as classNames from 'classnames'; import * as React from 'react'; import InstanceMessage from '../../../../components/common/InstanceMessage'; -import HelpTooltip from '../../../../sonar-ui-common/components/controls/HelpTooltip'; -import Tooltip from '../../../../sonar-ui-common/components/controls/Tooltip'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; +import HelpTooltip from '../../../../components/controls/HelpTooltip'; +import Tooltip from '../../../../components/controls/Tooltip'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { isPermissionDefinitionGroup } from '../../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.tsx index 71d4fcae909..11ff4b763e5 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import RadioToggle from '../../../../sonar-ui-common/components/controls/RadioToggle'; -import SearchBox from '../../../../sonar-ui-common/components/controls/SearchBox'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import RadioToggle from '../../../../components/controls/RadioToggle'; +import SearchBox from '../../../../components/controls/SearchBox'; +import { translate } from '../../../../helpers/l10n'; interface Props { filter: string; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.tsx index 5359fec5ef1..8f767da002f 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/UserHolder.tsx @@ -20,7 +20,7 @@ import { without } from 'lodash'; import * as React from 'react'; import Avatar from '../../../../components/ui/Avatar'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { isPermissionDefinitionGroup } from '../../utils'; import PermissionCell from './PermissionCell'; diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/GroupHolder-test.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/GroupHolder-test.tsx index 945e6f71b44..733fd0bc0bd 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/GroupHolder-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/GroupHolder-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockPermissionGroup } from '../../../../../helpers/mocks/permissions'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import GroupHolder from '../GroupHolder'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/UserHolder-test.tsx b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/UserHolder-test.tsx index 29bb671ec58..a816a48ac99 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/UserHolder-test.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/__tests__/UserHolder-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockPermissionUser } from '../../../../../helpers/mocks/permissions'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import UserHolder from '../UserHolder'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/permissions/utils.ts b/server/sonar-web/src/main/js/apps/permissions/utils.ts index 242d3691adb..1fd5ab17dd4 100644 --- a/server/sonar-web/src/main/js/apps/permissions/utils.ts +++ b/server/sonar-web/src/main/js/apps/permissions/utils.ts @@ -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 { hasMessage, translate } from '../../helpers/l10n'; import { isSonarCloud } from '../../helpers/system'; -import { hasMessage, translate } from '../../sonar-ui-common/helpers/l10n'; export const PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE = [ 'user', diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx index 633a0b5c971..3490ddbd5fa 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx @@ -27,9 +27,9 @@ import MeasuresLink from '../../../components/common/MeasuresLink'; import ComponentReportActions from '../../../components/controls/ComponentReportActions'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; import Measure from '../../../components/measure/Measure'; +import handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication'; +import { translate } from '../../../helpers/l10n'; import { isLoggedIn } from '../../../helpers/users'; -import handleRequiredAuthentication from '../../../sonar-ui-common/helpers/handleRequiredAuthentication'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { fetchMetrics } from '../../../store/rootActions'; import { getMetrics, Store } from '../../../store/rootReducer'; import '../styles.css'; diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx index fae774e31ef..7a9097aac29 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx @@ -21,9 +21,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import Measure from '../../../components/measure/Measure'; +import Rating from '../../../components/ui/Rating'; +import { translate } from '../../../helpers/l10n'; import { getComponentDrilldownUrl } from '../../../helpers/urls'; -import Rating from '../../../sonar-ui-common/components/ui/Rating'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; interface Props { component: string; diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/MainRating.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/MainRating.tsx index 256a965ccca..e691dc822ac 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/MainRating.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/MainRating.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import Rating from '../../../components/ui/Rating'; import { getMeasureTreemapUrl } from '../../../helpers/urls'; -import Rating from '../../../sonar-ui-common/components/ui/Rating'; interface Props { component: string; diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/MetricBox.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/MetricBox.tsx index 9266e9a28e2..e8942f336a9 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/MetricBox.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/MetricBox.tsx @@ -21,11 +21,11 @@ import * as React from 'react'; import { Link } from 'react-router'; import ActivityLink from '../../../components/common/ActivityLink'; import MeasuresLink from '../../../components/common/MeasuresLink'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; import Measure from '../../../components/measure/Measure'; +import Level from '../../../components/ui/Level'; +import { translate } from '../../../helpers/l10n'; import { getComponentDrilldownUrl } from '../../../helpers/urls'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import Level from '../../../sonar-ui-common/components/ui/Level'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { GraphType } from '../../../types/project-activity'; import { METRICS_PER_TYPE } from '../utils'; import Effort from './Effort'; diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/RatingFreshness.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/RatingFreshness.tsx index c6fd9b6cf65..e5944766e09 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/RatingFreshness.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/RatingFreshness.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import Rating from '../../../sonar-ui-common/components/ui/Rating'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import Rating from '../../../components/ui/Rating'; +import { translate } from '../../../helpers/l10n'; interface Props { lastChange?: string; diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/UnsubscribeEmailModal.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/UnsubscribeEmailModal.tsx index df51e53bc91..49a0c8849a9 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/UnsubscribeEmailModal.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/UnsubscribeEmailModal.tsx @@ -19,15 +19,11 @@ */ import * as React from 'react'; import { unsubscribeFromEmailReport } from '../../../api/component-report'; -import { - Button, - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button, ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; interface Props { component: T.Component; diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx index 061abcba40a..ebadc03e3cc 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/WorstProjects.tsx @@ -21,11 +21,11 @@ import { max } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; import { colors } from '../../../app/theme'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; import Measure from '../../../components/measure/Measure'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { getComponentOverviewUrl } from '../../../helpers/urls'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; import { ComponentQualifier } from '../../../types/component'; import { SubComponent } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/App-test.tsx index a859c82944e..3ff3dbc56cc 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/App-test.tsx @@ -21,6 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getChildren } from '../../../../api/components'; import { getMeasures } from '../../../../api/measures'; +import handleRequiredAuthentication from '../../../../helpers/handleRequiredAuthentication'; import { mockComponent, mockCurrentUser, @@ -28,13 +29,12 @@ import { mockLoggedInUser, mockRouter } from '../../../../helpers/testMocks'; -import handleRequiredAuthentication from '../../../../sonar-ui-common/helpers/handleRequiredAuthentication'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { ComponentQualifier } from '../../../../types/component'; import { App } from '../App'; import UnsubscribeEmailModal from '../UnsubscribeEmailModal'; -jest.mock('../../../../sonar-ui-common/helpers/handleRequiredAuthentication', () => ({ +jest.mock('../../../../helpers/handleRequiredAuthentication', () => ({ default: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/UnsubscribeEmailModal-test.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/UnsubscribeEmailModal-test.tsx index 4c829c3cd3a..42c4323cb34 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/UnsubscribeEmailModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/__tests__/UnsubscribeEmailModal-test.tsx @@ -21,9 +21,9 @@ import { shallow, ShallowWrapper } from 'enzyme'; import * as React from 'react'; import { unsubscribeFromEmailReport } from '../../../../api/component-report'; +import SimpleModal from '../../../../components/controls/SimpleModal'; import { mockComponent } from '../../../../helpers/testMocks'; -import SimpleModal from '../../../../sonar-ui-common/components/controls/SimpleModal'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { ComponentQualifier } from '../../../../types/component'; import UnsubscribeEmailModal from '../UnsubscribeEmailModal'; diff --git a/server/sonar-web/src/main/js/apps/portfolio/routes.ts b/server/sonar-web/src/main/js/apps/portfolio/routes.ts index f57b5528d59..3056655f8ba 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/routes.ts +++ b/server/sonar-web/src/main/js/apps/portfolio/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/__tests__/actions-test.ts b/server/sonar-web/src/main/js/apps/projectActivity/__tests__/actions-test.ts index b48e012e808..f5510d00dd3 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/__tests__/actions-test.ts +++ b/server/sonar-web/src/main/js/apps/projectActivity/__tests__/actions-test.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { DEFAULT_GRAPH } from '../../../components/activity-graph/utils'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../helpers/dates'; import * as actions from '../actions'; const ANALYSES = [ 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 1c5547da888..0b2cd01534d 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { DEFAULT_GRAPH } from '../../../components/activity-graph/utils'; -import * as dates from '../../../sonar-ui-common/helpers/dates'; +import * as dates from '../../../helpers/dates'; import { GraphType } from '../../../types/project-activity'; import * as utils from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx index 5eec7466ff2..32b6759c9cb 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx @@ -20,13 +20,13 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { ButtonLink } from '../../../components/controls/buttons'; +import BranchIcon from '../../../components/icons/BranchIcon'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; import { isMainBranch } from '../../../helpers/branch-like'; +import { translate } from '../../../helpers/l10n'; +import { limitComponentName } from '../../../helpers/path'; import { getProjectUrl } from '../../../helpers/urls'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import BranchIcon from '../../../sonar-ui-common/components/icons/BranchIcon'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { limitComponentName } from '../../../sonar-ui-common/helpers/path'; import { BranchLike } from '../../../types/branch-like'; export type DefinitionChangeEvent = T.AnalysisEvent & 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 f41fbdc028a..a90c8bd379c 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { DeleteButton, EditButton } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { DeleteButton, EditButton } from '../../../components/controls/buttons'; +import { translate } from '../../../helpers/l10n'; import EventInner from './EventInner'; import ChangeEventForm from './forms/ChangeEventForm'; import RemoveEventForm from './forms/RemoveEventForm'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/EventInner.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/EventInner.tsx index 2050f7d5634..1180aa9d6c3 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/EventInner.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/EventInner.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { ComponentContext } from '../../../app/components/ComponentContext'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate } from '../../../helpers/l10n'; import { DefinitionChangeEventInner, isDefinitionChangeEvent } from './DefinitionChangeEventInner'; import { isRichQualityGateEvent, RichQualityGateEventInner } from './RichQualityGateEventInner'; 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 00a46b93d1a..1fbbb071979 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 @@ -21,10 +21,10 @@ import * as classNames from 'classnames'; import { isEqual } from 'date-fns'; import { throttle } from 'lodash'; import * as React from 'react'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import DateFormatter from '../../../sonar-ui-common/components/intl/DateFormatter'; -import { toShortNotSoISOString } from '../../../sonar-ui-common/helpers/dates'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../../components/controls/Tooltip'; +import DateFormatter from '../../../components/intl/DateFormatter'; +import { toShortNotSoISOString } from '../../../helpers/dates'; +import { translate } from '../../../helpers/l10n'; import { ComponentQualifier } from '../../../types/component'; import { activityQueryChanged, getAnalysesByVersionByDay, Query } from '../utils'; import ProjectActivityAnalysis from './ProjectActivityAnalysis'; 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 1ad4d7a82c8..f6711f19bb0 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 @@ -22,14 +22,14 @@ import * as React from 'react'; import ActionsDropdown, { ActionsDropdownDivider, ActionsDropdownItem -} from '../../../sonar-ui-common/components/controls/ActionsDropdown'; -import ClickEventBoundary from '../../../sonar-ui-common/components/controls/ClickEventBoundary'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import TimeFormatter from '../../../sonar-ui-common/components/intl/TimeFormatter'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; +} from '../../../components/controls/ActionsDropdown'; +import ClickEventBoundary from '../../../components/controls/ClickEventBoundary'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import TimeFormatter from '../../../components/intl/TimeFormatter'; +import { PopupPlacement } from '../../../components/ui/popups'; +import { parseDate } from '../../../helpers/dates'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { scrollToElement } from '../../../helpers/scrolling'; import Events from './Events'; import AddEventForm from './forms/AddEventForm'; import RemoveAnalysisForm from './forms/RemoveAnalysisForm'; 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 105dfe9296f..b119bcbd6c6 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 @@ -21,8 +21,8 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { parseDate } from '../../../helpers/dates'; +import { translate } from '../../../helpers/l10n'; import { MeasureHistory } from '../../../types/project-activity'; import { Query } from '../utils'; import './projectActivity.css'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.tsx index 1a0ddaf497a..ce321125b04 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.tsx @@ -30,7 +30,7 @@ import { isCustomGraph } from '../../../components/activity-graph/utils'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../helpers/dates'; import { BranchLike } from '../../../types/branch-like'; import { MetricKey } from '../../../types/metrics'; import { GraphType, MeasureHistory } from '../../../types/project-activity'; 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 6b711cf5e2f..568a27c22a8 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Button } from '../../../components/controls/buttons'; import DateRangeInput from '../../../components/controls/DateRangeInput'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Query } from '../utils'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageFooter.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageFooter.tsx index 6bcaf4e561c..0bccf88b719 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageFooter.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageFooter.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; +import ListFooter from '../../../components/controls/ListFooter'; interface Props { analyses: unknown[]; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageHeader.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageHeader.tsx index 4f57d232d25..149d4a4f174 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageHeader.tsx @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Select from '../../../components/controls/Select'; +import { translate } from '../../../helpers/l10n'; import { APPLICATION_EVENT_TYPES, EVENT_TYPES, Query } from '../utils'; import ProjectActivityDateInput from './ProjectActivityDateInput'; import ProjectActivityEventSelectOption from './ProjectActivityEventSelectOption'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/RichQualityGateEventInner.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/RichQualityGateEventInner.tsx index daf5c273e96..253dfc700f1 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/RichQualityGateEventInner.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/RichQualityGateEventInner.tsx @@ -20,11 +20,11 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { ResetButtonLink } from '../../../components/controls/buttons'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; +import Level from '../../../components/ui/Level'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getProjectUrl } from '../../../helpers/urls'; -import { ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import Level from '../../../sonar-ui-common/components/ui/Level'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; export type RichQualityGateEvent = T.AnalysisEvent & Required<Pick<T.AnalysisEvent, 'qualityGate'>>; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/DefinitionChangeEventInner-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/DefinitionChangeEventInner-test.tsx index 81c74f4c6bf..859c72cf3d6 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/DefinitionChangeEventInner-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/DefinitionChangeEventInner-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockBranch } from '../../../../helpers/mocks/branch-like'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import { DefinitionChangeEvent, DefinitionChangeEventInner } from '../DefinitionChangeEventInner'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/Event-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/Event-test.tsx index 63874c580ae..8f39bbe505d 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/Event-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/Event-test.tsx @@ -19,9 +19,9 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { DeleteButton, EditButton } from '../../../../components/controls/buttons'; import { mockAnalysisEvent } from '../../../../helpers/testMocks'; -import { DeleteButton, EditButton } from '../../../../sonar-ui-common/components/controls/buttons'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import { Event, EventProps } from '../Event'; import ChangeEventForm from '../forms/ChangeEventForm'; import RemoveEventForm from '../forms/RemoveEventForm'; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-test.tsx index 0153190aae9..097909c9223 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-test.tsx @@ -20,8 +20,8 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { DEFAULT_GRAPH } from '../../../../components/activity-graph/utils'; +import { parseDate } from '../../../../helpers/dates'; import { mockParsedAnalysis } from '../../../../helpers/testMocks'; -import { parseDate } from '../../../../sonar-ui-common/helpers/dates'; import { ComponentQualifier } from '../../../../types/component'; import ProjectActivityAnalysesList from '../ProjectActivityAnalysesList'; @@ -31,8 +31,8 @@ jest.mock('date-fns/start_of_day', () => (date: Date) => { return startDay; }); -jest.mock('../../../../sonar-ui-common/helpers/dates', () => { - const actual = jest.requireActual('../../../../sonar-ui-common/helpers/dates'); +jest.mock('../../../../helpers/dates', () => { + const actual = jest.requireActual('../../../../helpers/dates'); return { ...actual, toShortNotSoISOString: (date: string) => 'ISO.' + date }; }); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysis-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysis-test.tsx index cce2034ddfb..7ff059886ff 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysis-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysis-test.tsx @@ -21,22 +21,22 @@ import { mount, shallow } from 'enzyme'; import * as React from 'react'; import { IntlProvider } from 'react-intl'; +import TimeFormatter from '../../../../components/intl/TimeFormatter'; +import { scrollToElement } from '../../../../helpers/scrolling'; import { mockAnalysisEvent, mockParsedAnalysis } from '../../../../helpers/testMocks'; -import TimeFormatter from '../../../../sonar-ui-common/components/intl/TimeFormatter'; -import { scrollToElement } from '../../../../sonar-ui-common/helpers/scrolling'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import AddEventForm from '../forms/AddEventForm'; import RemoveAnalysisForm from '../forms/RemoveAnalysisForm'; import { ProjectActivityAnalysis, ProjectActivityAnalysisProps } from '../ProjectActivityAnalysis'; -jest.mock('../../../../sonar-ui-common/helpers/dates', () => ({ +jest.mock('../../../../helpers/dates', () => ({ parseDate: () => ({ valueOf: () => 1546333200000, toISOString: () => '2019-01-01T09:00:00.000Z' }) })); -jest.mock('../../../../sonar-ui-common/helpers/scrolling', () => ({ +jest.mock('../../../../helpers/scrolling', () => ({ scrollToElement: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-test.tsx index 459c868e341..538f1fc687c 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { DEFAULT_GRAPH } from '../../../../components/activity-graph/utils'; -import { parseDate } from '../../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../../helpers/dates'; import ProjectActivityApp from '../ProjectActivityApp'; const ANALYSES = [ diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityDateInput-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityDateInput-test.tsx index 57533ad372a..1996fd11937 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityDateInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityDateInput-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../../helpers/dates'; import ProjectActivityDateInput from '../ProjectActivityDateInput'; it('should render correctly the date inputs', () => { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-test.tsx index f061b28fcbb..3406ffb0f1a 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { DEFAULT_GRAPH } from '../../../../components/activity-graph/utils'; -import { parseDate } from '../../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../../helpers/dates'; import ProjectActivityGraphs from '../ProjectActivityGraphs'; const ANALYSES = [ diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityPageHeader-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityPageHeader-test.tsx index 228cc9b3449..fec1d672c04 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityPageHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityPageHeader-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../../helpers/dates'; import ProjectActivityPageHeader from '../ProjectActivityPageHeader'; it('should render correctly the list of series', () => { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/RichQualityGateEventInner-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/RichQualityGateEventInner-test.tsx index 9fead0cdb74..3f24e1cf49e 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/RichQualityGateEventInner-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/RichQualityGateEventInner-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import { RichQualityGateEvent, RichQualityGateEventInner } from '../RichQualityGateEventInner'; const event: RichQualityGateEvent = { 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 dd5cd7a52cc..715b9c53e48 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ConfirmModal from '../../../../sonar-ui-common/components/controls/ConfirmModal'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import ConfirmModal from '../../../../components/controls/ConfirmModal'; +import { translate } from '../../../../helpers/l10n'; interface Props { addEvent: (analysis: string, name: string, category?: string) => Promise<void>; 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 5825d1b9133..e21cb74372d 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ConfirmModal from '../../../../sonar-ui-common/components/controls/ConfirmModal'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import ConfirmModal from '../../../../components/controls/ConfirmModal'; +import { translate } from '../../../../helpers/l10n'; interface Props { changeEvent: (event: string, name: string) => Promise<void>; 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 c923b2f5903..ddb2a25ba8b 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ConfirmModal from '../../../../sonar-ui-common/components/controls/ConfirmModal'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import ConfirmModal from '../../../../components/controls/ConfirmModal'; +import { translate } from '../../../../helpers/l10n'; interface Props { analysis: T.ParsedAnalysis; 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 9f1d83fd887..3934f697e27 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ConfirmModal from '../../../../sonar-ui-common/components/controls/ConfirmModal'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import ConfirmModal from '../../../../components/controls/ConfirmModal'; +import { translate } from '../../../../helpers/l10n'; export interface RemoveEventFormProps { analysisKey: string; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/RemoveEventForm-test.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/RemoveEventForm-test.tsx index bc4c89918cd..8fe812288d4 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/RemoveEventForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/__tests__/RemoveEventForm-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import ConfirmModal from '../../../../../components/controls/ConfirmModal'; import { mockAnalysisEvent } from '../../../../../helpers/testMocks'; -import ConfirmModal from '../../../../../sonar-ui-common/components/controls/ConfirmModal'; import RemoveEventForm, { RemoveEventFormProps } from '../RemoveEventForm'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/routes.ts b/server/sonar-web/src/main/js/apps/projectActivity/routes.ts index a2945a661f6..fc201e1f620 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/routes.ts +++ b/server/sonar-web/src/main/js/apps/projectActivity/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 7757447ff32..d642d7484b6 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/utils.ts +++ b/server/sonar-web/src/main/js/apps/projectActivity/utils.ts @@ -20,7 +20,7 @@ import * as startOfDay from 'date-fns/start_of_day'; import { isEqual } from 'lodash'; import { DEFAULT_GRAPH } from '../../components/activity-graph/utils'; -import { parseDate } from '../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../helpers/dates'; import { cleanQuery, parseAsArray, @@ -29,7 +29,7 @@ import { serializeDate, serializeString, serializeStringArray -} from '../../sonar-ui-common/helpers/query'; +} from '../../helpers/query'; import { GraphType } from '../../types/project-activity'; export interface Query { diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/App.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/App.tsx index 6c11045130e..a840de4a57e 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/App.tsx @@ -22,10 +22,10 @@ import { debounce } from 'lodash'; import * as React from 'react'; import { getNewCodePeriod, resetNewCodePeriod, setNewCodePeriod } from '../../../api/newCodePeriod'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; +import AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { isBranch, sortBranches } from '../../../helpers/branch-like'; -import AlertSuccessIcon from '../../../sonar-ui-common/components/icons/AlertSuccessIcon'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Branch, BranchLike } from '../../../types/branch-like'; import '../styles.css'; import { getSettingValue } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/AppHeader.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/AppHeader.tsx index 64fcec257b5..1327a8f3402 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/AppHeader.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/AppHeader.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export interface AppHeaderProps { canAdmin: boolean; diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingAnalysis.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingAnalysis.tsx index dacca51fe9e..0dd4a639f45 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingAnalysis.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingAnalysis.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import RadioCard from '../../../sonar-ui-common/components/controls/RadioCard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import RadioCard from '../../../components/controls/RadioCard'; +import { translate } from '../../../helpers/l10n'; export interface Props { disabled?: boolean; diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingDays.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingDays.tsx index 38de4bead2e..a0f88c0fc16 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingDays.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingDays.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import RadioCard from '../../../sonar-ui-common/components/controls/RadioCard'; -import ValidationInput from '../../../sonar-ui-common/components/controls/ValidationInput'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import RadioCard from '../../../components/controls/RadioCard'; +import ValidationInput from '../../../components/controls/ValidationInput'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; export interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingPreviousVersion.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingPreviousVersion.tsx index 7848ab80e2e..9a24385d5ee 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingPreviousVersion.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingPreviousVersion.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import RadioCard from '../../../sonar-ui-common/components/controls/RadioCard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import RadioCard from '../../../components/controls/RadioCard'; +import { translate } from '../../../helpers/l10n'; export interface Props { disabled?: boolean; diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingReferenceBranch.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingReferenceBranch.tsx index abc8d6a50a4..9e932cd4996 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingReferenceBranch.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/BaselineSettingReferenceBranch.tsx @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import RadioCard from '../../../sonar-ui-common/components/controls/RadioCard'; -import SearchSelect from '../../../sonar-ui-common/components/controls/SearchSelect'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import AlertErrorIcon from '../../../sonar-ui-common/components/icons/AlertErrorIcon'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import RadioCard from '../../../components/controls/RadioCard'; +import SearchSelect from '../../../components/controls/SearchSelect'; +import Tooltip from '../../../components/controls/Tooltip'; +import AlertErrorIcon from '../../../components/icons/AlertErrorIcon'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; export interface BaselineSettingReferenceBranchProps { branchList: BranchOption[]; diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchAnalysisList.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchAnalysisList.tsx index ba9eb88eebb..dcf12cd846b 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchAnalysisList.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchAnalysisList.tsx @@ -21,8 +21,8 @@ import { subDays } from 'date-fns'; import { throttle } from 'lodash'; import * as React from 'react'; import { getProjectActivity } from '../../../api/projectActivity'; -import { parseDate, toShortNotSoISOString } from '../../../sonar-ui-common/helpers/dates'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; +import { parseDate, toShortNotSoISOString } from '../../../helpers/dates'; +import { scrollToElement } from '../../../helpers/scrolling'; import BranchAnalysisListRenderer from './BranchAnalysisListRenderer'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchAnalysisListRenderer.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchAnalysisListRenderer.tsx index d2262269977..c22fa3fa8ed 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchAnalysisListRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchAnalysisListRenderer.tsx @@ -19,14 +19,14 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import DateFormatter from '../../../sonar-ui-common/components/intl/DateFormatter'; -import TimeFormatter from '../../../sonar-ui-common/components/intl/TimeFormatter'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { parseDate, toShortNotSoISOString } from '../../../sonar-ui-common/helpers/dates'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Radio from '../../../components/controls/Radio'; +import Select from '../../../components/controls/Select'; +import Tooltip from '../../../components/controls/Tooltip'; +import DateFormatter from '../../../components/intl/DateFormatter'; +import TimeFormatter from '../../../components/intl/TimeFormatter'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { parseDate, toShortNotSoISOString } from '../../../helpers/dates'; +import { translate } from '../../../helpers/l10n'; import Events from '../../projectActivity/components/Events'; import { getAnalysesByVersionByDay } from '../../projectActivity/utils'; diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchBaselineSettingModal.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchBaselineSettingModal.tsx index 5e4f4d08dad..2fb28321fe1 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchBaselineSettingModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchBaselineSettingModal.tsx @@ -19,14 +19,11 @@ */ import * as React from 'react'; import { setNewCodePeriod } from '../../../api/newCodePeriod'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { toNotSoISOString } from '../../../sonar-ui-common/helpers/dates'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { toNotSoISOString } from '../../../helpers/dates'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Branch, BranchWithNewCodePeriod } from '../../../types/branch-like'; import { getSettingValue, validateSetting } from '../utils'; import BaselineSettingAnalysis from './BaselineSettingAnalysis'; diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx index 613134ec5c0..f91052b6517 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { listBranchesNewCodePeriod, resetNewCodePeriod } from '../../../api/newCodePeriod'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { isBranch, sortBranches } from '../../../helpers/branch-like'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Branch, BranchLike, BranchWithNewCodePeriod } from '../../../types/branch-like'; import BranchBaselineSettingModal from './BranchBaselineSettingModal'; import BranchListRow from './BranchListRow'; diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchListRow.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchListRow.tsx index 22ce6e8b579..0b45d2f1c48 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchListRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchListRow.tsx @@ -18,14 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import ActionsDropdown, { ActionsDropdownItem } from '../../../components/controls/ActionsDropdown'; +import Tooltip from '../../../components/controls/Tooltip'; import BranchLikeIcon from '../../../components/icons/BranchLikeIcon'; -import ActionsDropdown, { - ActionsDropdownItem -} from '../../../sonar-ui-common/components/controls/ActionsDropdown'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import WarningIcon from '../../../sonar-ui-common/components/icons/WarningIcon'; -import DateTimeFormatter from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import WarningIcon from '../../../components/icons/WarningIcon'; +import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { BranchWithNewCodePeriod } from '../../../types/branch-like'; export interface BranchListRowProps { diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/ProjectBaselineSelector.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/ProjectBaselineSelector.tsx index a9ab6045382..6d9e74d3a6f 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/ProjectBaselineSelector.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/ProjectBaselineSelector.tsx @@ -19,14 +19,11 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Radio from '../../../components/controls/Radio'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Branch } from '../../../types/branch-like'; import { validateSetting } from '../utils'; import BaselineSettingAnalysis from './BaselineSettingAnalysis'; diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/App-test.tsx index 710fa4222bc..ec099bba891 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/App-test.tsx @@ -26,7 +26,7 @@ import { } from '../../../../api/newCodePeriod'; import { mockBranch, mockMainBranch, mockPullRequest } from '../../../../helpers/mocks/branch-like'; import { mockComponent, mockEvent } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import App from '../App'; jest.mock('../../../../api/newCodePeriod', () => ({ diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BaselineSettingReferenceBranch-test.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BaselineSettingReferenceBranch-test.tsx index b6708b46522..8b917458dbe 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BaselineSettingReferenceBranch-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BaselineSettingReferenceBranch-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import RadioCard from '../../../../sonar-ui-common/components/controls/RadioCard'; -import SearchSelect from '../../../../sonar-ui-common/components/controls/SearchSelect'; +import RadioCard from '../../../../components/controls/RadioCard'; +import SearchSelect from '../../../../components/controls/SearchSelect'; import BaselineSettingReferenceBranch, { BaselineSettingReferenceBranchProps, BranchOption diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchAnalysisList-test.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchAnalysisList-test.tsx index b20677d9d3b..3b9941a5ca4 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchAnalysisList-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchAnalysisList-test.tsx @@ -21,9 +21,9 @@ import { subDays } from 'date-fns'; import { shallow } from 'enzyme'; import * as React from 'react'; import { getProjectActivity } from '../../../../api/projectActivity'; +import { toShortNotSoISOString } from '../../../../helpers/dates'; import { mockAnalysis, mockAnalysisEvent } from '../../../../helpers/testMocks'; -import { toShortNotSoISOString } from '../../../../sonar-ui-common/helpers/dates'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import BranchAnalysisList from '../BranchAnalysisList'; jest.mock('date-fns/start_of_day', () => @@ -32,7 +32,7 @@ jest.mock('date-fns/start_of_day', () => })) ); -jest.mock('../../../../sonar-ui-common/helpers/dates', () => ({ +jest.mock('../../../../helpers/dates', () => ({ parseDate: jest.fn().mockReturnValue('2017-03-02'), toShortNotSoISOString: jest.fn().mockReturnValue('2017-03-02') })); diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchAnalysisListRenderer-test.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchAnalysisListRenderer-test.tsx index defba93f077..9250748d74a 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchAnalysisListRenderer-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchAnalysisListRenderer-test.tsx @@ -30,8 +30,8 @@ jest.mock('date-fns/start_of_day', () => (date: Date) => { return startDay; }); -jest.mock('../../../../sonar-ui-common/helpers/dates', () => { - const actual = jest.requireActual('../../../../sonar-ui-common/helpers/dates'); +jest.mock('../../../../helpers/dates', () => { + const actual = jest.requireActual('../../../../helpers/dates'); return { ...actual, toShortNotSoISOString: (date: string) => `ISO.${date}` }; }); diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchBaselineSettingModal-test.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchBaselineSettingModal-test.tsx index 4a6c8e9b4cb..ed73ae3f3d0 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchBaselineSettingModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchBaselineSettingModal-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { setNewCodePeriod } from '../../../../api/newCodePeriod'; import { mockBranch, mockMainBranch } from '../../../../helpers/mocks/branch-like'; -import { mockEvent, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { mockEvent, waitAndUpdate } from '../../../../helpers/testUtils'; import BranchBaselineSettingModal from '../BranchBaselineSettingModal'; jest.mock('../../../../api/newCodePeriod', () => ({ diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchList-test.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchList-test.tsx index b4b26018353..5895a95cfc5 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchList-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchList-test.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { listBranchesNewCodePeriod, resetNewCodePeriod } from '../../../../api/newCodePeriod'; import { mockBranch, mockMainBranch } from '../../../../helpers/mocks/branch-like'; import { mockComponent } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import BranchBaselineSettingModal from '../BranchBaselineSettingModal'; import BranchList from '../BranchList'; diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchListRow-test.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchListRow-test.tsx index 266860211b9..bb90b57e3eb 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchListRow-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/BranchListRow-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { ActionsDropdownItem } from '../../../../components/controls/ActionsDropdown'; import { mockBranch, mockMainBranch } from '../../../../helpers/mocks/branch-like'; -import { ActionsDropdownItem } from '../../../../sonar-ui-common/components/controls/ActionsDropdown'; import BranchListRow, { BranchListRowProps } from '../BranchListRow'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/routes.ts b/server/sonar-web/src/main/js/apps/projectBaseline/routes.ts index d9f2449a14f..028c08f3c05 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/routes.ts +++ b/server/sonar-web/src/main/js/apps/projectBaseline/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx index 4ae3217093f..072a6c557ee 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import BranchLikeTabs from './BranchLikeTabs'; import LifetimeInformation from './LifetimeInformation'; 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 6c0a4061d7c..ba2402fc380 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 @@ -19,18 +19,16 @@ */ import * as React from 'react'; import BranchStatus from '../../../components/common/BranchStatus'; +import ActionsDropdown, { ActionsDropdownItem } from '../../../components/controls/ActionsDropdown'; import BranchLikeIcon from '../../../components/icons/BranchLikeIcon'; +import DateFromNow from '../../../components/intl/DateFromNow'; import { getBranchLikeDisplayName, isBranch, isMainBranch, isPullRequest } from '../../../helpers/branch-like'; -import ActionsDropdown, { - ActionsDropdownItem -} from '../../../sonar-ui-common/components/controls/ActionsDropdown'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import BranchPurgeSetting from './BranchPurgeSetting'; 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 b8e12914ab4..746a7edec53 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; import { getBranchLikeKey } from '../../../helpers/branch-like'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import BranchLikeRow from './BranchLikeRow'; 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 ef7b87e756f..d4707949acb 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 @@ -18,6 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import BoxedTabs from '../../../components/controls/BoxedTabs'; +import BranchIcon from '../../../components/icons/BranchIcon'; +import PullRequestIcon from '../../../components/icons/PullRequestIcon'; import { isBranch, isMainBranch, @@ -25,10 +28,7 @@ import { sortBranches, sortPullRequests } from '../../../helpers/branch-like'; -import BoxedTabs from '../../../sonar-ui-common/components/controls/BoxedTabs'; -import BranchIcon from '../../../sonar-ui-common/components/icons/BranchIcon'; -import PullRequestIcon from '../../../sonar-ui-common/components/icons/PullRequestIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import BranchLikeTable from './BranchLikeTable'; import DeleteBranchModal from './DeleteBranchModal'; 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 a08f4595aec..ea204c09cd5 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 @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { excludeBranchFromPurge } from '../../../api/branches'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import Toggle from '../../../components/controls/Toggle'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { isMainBranch } from '../../../helpers/branch-like'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import Toggle from '../../../sonar-ui-common/components/controls/Toggle'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Branch } from '../../../types/branch-like'; interface Props { 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 a04783cfa96..79180d0edce 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 @@ -19,13 +19,10 @@ */ import * as React from 'react'; import { deleteBranch, deletePullRequest } from '../../../api/branches'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; import { getBranchLikeDisplayName, isPullRequest } from '../../../helpers/branch-like'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; interface Props { 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 01b353f870b..012417bcc50 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 @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; export interface LifetimeInformationRendererProps { branchAndPullRequestLifeTimeInDays?: string; 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 b25f1ac0b86..5b0403f627f 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 @@ -19,14 +19,11 @@ */ import * as React from 'react'; import { renameBranch } from '../../../api/branches'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; import { MainBranch } from '../../../types/branch-like'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchLikeTabs-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchLikeTabs-test.tsx index a46a7b75579..f74dbaf81dd 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchLikeTabs-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchLikeTabs-test.tsx @@ -19,13 +19,13 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import BoxedTabs from '../../../../components/controls/BoxedTabs'; import { mockMainBranch, mockPullRequest, mockSetOfBranchAndPullRequest } from '../../../../helpers/mocks/branch-like'; import { mockComponent } from '../../../../helpers/testMocks'; -import BoxedTabs from '../../../../sonar-ui-common/components/controls/BoxedTabs'; import { BranchLikeTable } from '../BranchLikeTable'; import BranchLikeTabs, { Tabs } from '../BranchLikeTabs'; import DeleteBranchModal from '../DeleteBranchModal'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchPurgeSetting-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchPurgeSetting-test.tsx index 1f6f8c473ac..19ff713f9eb 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchPurgeSetting-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/BranchPurgeSetting-test.tsx @@ -20,9 +20,9 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { excludeBranchFromPurge } from '../../../../api/branches'; +import Toggle from '../../../../components/controls/Toggle'; import { mockBranch, mockMainBranch } from '../../../../helpers/mocks/branch-like'; import { mockComponent } from '../../../../helpers/testMocks'; -import Toggle from '../../../../sonar-ui-common/components/controls/Toggle'; import BranchPurgeSetting from '../BranchPurgeSetting'; jest.mock('../../../../api/branches', () => ({ diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/DeleteBranchModal-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/DeleteBranchModal-test.tsx index bda6fcc725a..18845abf99a 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/DeleteBranchModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/DeleteBranchModal-test.tsx @@ -22,12 +22,7 @@ import * as React from 'react'; import { deleteBranch, deletePullRequest } from '../../../../api/branches'; import { mockBranch, mockPullRequest } from '../../../../helpers/mocks/branch-like'; import { mockComponent } from '../../../../helpers/testMocks'; -import { - click, - doAsync, - submit, - waitAndUpdate -} from '../../../../sonar-ui-common/helpers/testUtils'; +import { click, doAsync, submit, waitAndUpdate } from '../../../../helpers/testUtils'; import { BranchLike } from '../../../../types/branch-like'; import DeleteBranchModal from '../DeleteBranchModal'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LifetimeInformation-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LifetimeInformation-test.tsx index 59be149f47b..0f8cfbbd2c6 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LifetimeInformation-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/LifetimeInformation-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getValues } from '../../../../api/settings'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { SettingsKey } from '../../../../types/settings'; import { LifetimeInformation } from '../LifetimeInformation'; diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/RenameBranchModal-test.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/RenameBranchModal-test.tsx index cca1eee7530..ef7ff7fc0fe 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/RenameBranchModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/RenameBranchModal-test.tsx @@ -22,13 +22,7 @@ import * as React from 'react'; import { renameBranch } from '../../../../api/branches'; import { mockMainBranch } from '../../../../helpers/mocks/branch-like'; import { mockComponent } from '../../../../helpers/testMocks'; -import { - change, - click, - doAsync, - submit, - waitAndUpdate -} from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, click, doAsync, submit, waitAndUpdate } from '../../../../helpers/testUtils'; import RenameBranchModal from '../RenameBranchModal'; jest.mock('../../../../api/branches', () => ({ renameBranch: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/projectBranches/routes.ts b/server/sonar-web/src/main/js/apps/projectBranches/routes.ts index f57b5528d59..3056655f8ba 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/routes.ts +++ b/server/sonar-web/src/main/js/apps/projectBranches/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 dd4c6a02932..9fd50d11b03 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import Form from './Form'; import Header from './Header'; 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 1ae2bb00a8c..8c97d9d87e3 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/Form.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/Form.tsx @@ -21,10 +21,10 @@ import * as React from 'react'; import { deleteApplication } from '../../api/application'; import { deletePortfolio, deleteProject } from '../../api/components'; import addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage'; +import { Button } from '../../components/controls/buttons'; +import ConfirmButton from '../../components/controls/ConfirmButton'; import { Router, withRouter } from '../../components/hoc/withRouter'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import ConfirmButton from '../../sonar-ui-common/components/controls/ConfirmButton'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../helpers/l10n'; import { isApplication, isPortfolioLike } from '../../types/component'; interface Props { 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 7fdfb20cabe..a20e57b22ff 100644 --- a/server/sonar-web/src/main/js/apps/projectDeletion/Header.tsx +++ b/server/sonar-web/src/main/js/apps/projectDeletion/Header.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; interface Props { component: Pick<T.Component, 'qualifier'>; diff --git a/server/sonar-web/src/main/js/apps/projectKey/Key.tsx b/server/sonar-web/src/main/js/apps/projectKey/Key.tsx index 6458a99d296..df70da33abb 100644 --- a/server/sonar-web/src/main/js/apps/projectKey/Key.tsx +++ b/server/sonar-web/src/main/js/apps/projectKey/Key.tsx @@ -22,7 +22,7 @@ import { Helmet } from 'react-helmet-async'; import { withRouter, WithRouterProps } from 'react-router'; import { changeKey } from '../../api/components'; import RecentHistory from '../../app/components/RecentHistory'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import UpdateForm from './UpdateForm'; interface Props { 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 63eaf48076f..1cb39eb737b 100644 --- a/server/sonar-web/src/main/js/apps/projectKey/UpdateForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectKey/UpdateForm.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import ProjectKeyInput from '../../components/common/ProjectKeyInput'; +import { Button, SubmitButton } from '../../components/controls/buttons'; +import ConfirmButton from '../../components/controls/ConfirmButton'; +import MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation'; +import { translate, translateWithParameters } from '../../helpers/l10n'; import { validateProjectKey } from '../../helpers/projects'; -import { Button, SubmitButton } from '../../sonar-ui-common/components/controls/buttons'; -import ConfirmButton from '../../sonar-ui-common/components/controls/ConfirmButton'; -import MandatoryFieldsExplanation from '../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; import { ProjectKeyValidationResult } from '../../types/component'; export interface UpdateFormProps { diff --git a/server/sonar-web/src/main/js/apps/projectKey/__tests__/UpdateForm-test.tsx b/server/sonar-web/src/main/js/apps/projectKey/__tests__/UpdateForm-test.tsx index fce8a5e10e6..1f441e68139 100644 --- a/server/sonar-web/src/main/js/apps/projectKey/__tests__/UpdateForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectKey/__tests__/UpdateForm-test.tsx @@ -20,9 +20,9 @@ import { shallow, ShallowWrapper } from 'enzyme'; import * as React from 'react'; import ProjectKeyInput from '../../../components/common/ProjectKeyInput'; +import { Button, SubmitButton } from '../../../components/controls/buttons'; import { mockComponent, mockEvent } from '../../../helpers/testMocks'; -import { Button, SubmitButton } from '../../../sonar-ui-common/components/controls/buttons'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import UpdateForm, { UpdateFormProps } from '../UpdateForm'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/projectLinks/App.tsx b/server/sonar-web/src/main/js/apps/projectLinks/App.tsx index 0548f6e082b..82cc8f6c8a1 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/App.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { createLink, deleteLink, getProjectLinks } from '../../api/projectLinks'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; +import { translate } from '../../helpers/l10n'; import Header from './Header'; import Table from './Table'; 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 1d6cd1b81ac..968fe784411 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/CreationModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/CreationModal.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ResetButtonLink, SubmitButton } from '../../sonar-ui-common/components/controls/buttons'; -import SimpleModal from '../../sonar-ui-common/components/controls/SimpleModal'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import MandatoryFieldMarker from '../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../components/controls/buttons'; +import SimpleModal from '../../components/controls/SimpleModal'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; +import MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../helpers/l10n'; interface Props { onClose: () => void; 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 d91ff946350..f9d691c6147 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/Header.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/Header.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../components/controls/buttons'; +import { translate } from '../../helpers/l10n'; import CreationModal from './CreationModal'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx b/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx index 32d57ddc6c0..955a2dffd26 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import isValidUri from '../../app/utils/isValidUri'; +import { Button } from '../../components/controls/buttons'; +import ConfirmButton from '../../components/controls/ConfirmButton'; +import ProjectLinkIcon from '../../components/icons/ProjectLinkIcon'; +import { translate, translateWithParameters } from '../../helpers/l10n'; import { getLinkName, isProvided } from '../../helpers/projectLinks'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import ConfirmButton from '../../sonar-ui-common/components/controls/ConfirmButton'; -import ProjectLinkIcon from '../../sonar-ui-common/components/icons/ProjectLinkIcon'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; interface Props { link: T.ProjectLink; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/Table.tsx b/server/sonar-web/src/main/js/apps/projectLinks/Table.tsx index 4f8bccf0dbc..7d33bb5997c 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/Table.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/Table.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { translate } from '../../helpers/l10n'; import { orderLinks } from '../../helpers/projectLinks'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; import LinkRow from './LinkRow'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/App-test.tsx index 1224f82d98e..f84fd1ce5be 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/App-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { createLink, deleteLink, getProjectLinks } from '../../../api/projectLinks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import App from '../App'; // import { getProjectLinks, createLink, deleteLink } from '../../api/projectLinks'; diff --git a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/CreationModal-test.tsx b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/CreationModal-test.tsx index 8b2e2f7b837..4f85862c2df 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/CreationModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/CreationModal-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { change, submit } from '../../../sonar-ui-common/helpers/testUtils'; +import { change, submit } from '../../../helpers/testUtils'; import CreationModal from '../CreationModal'; it('should create link', () => { diff --git a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Header-test.tsx index 4ff3a8785c3..bdeb6e0b1a8 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/Header-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import Header from '../Header'; it('should render', () => { 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 51e52ab61b8..08468d1fb8e 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateApp.tsx @@ -28,7 +28,7 @@ import { } from '../../api/quality-gates'; import addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage'; import handleRequiredAuthorization from '../../app/utils/handleRequiredAuthorization'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import { USE_SYSTEM_DEFAULT } from './constants'; import ProjectQualityGateAppRenderer from './ProjectQualityGateAppRenderer'; 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 88325f4dbb8..044d4423e80 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx @@ -24,13 +24,13 @@ import { Link } from 'react-router'; import A11ySkipTarget from '../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; import DisableableSelectOption from '../../components/common/DisableableSelectOption'; -import { SubmitButton } from '../../sonar-ui-common/components/controls/buttons'; -import HelpTooltip from '../../sonar-ui-common/components/controls/HelpTooltip'; -import Radio from '../../sonar-ui-common/components/controls/Radio'; -import Select from '../../sonar-ui-common/components/controls/Select'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { isDiffMetric } from '../../sonar-ui-common/helpers/measures'; +import { SubmitButton } from '../../components/controls/buttons'; +import HelpTooltip from '../../components/controls/HelpTooltip'; +import Radio from '../../components/controls/Radio'; +import Select from '../../components/controls/Select'; +import { Alert } from '../../components/ui/Alert'; +import { translate } from '../../helpers/l10n'; +import { isDiffMetric } from '../../helpers/measures'; import BuiltInQualityGateBadge from '../quality-gates/components/BuiltInQualityGateBadge'; import { USE_SYSTEM_DEFAULT } from './constants'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateApp-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateApp-test.tsx index cf1b581b214..184545784f7 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateApp-test.tsx @@ -29,7 +29,7 @@ import { import handleRequiredAuthorization from '../../../app/utils/handleRequiredAuthorization'; import { mockQualityGate } from '../../../helpers/mocks/quality-gates'; import { mockComponent } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { USE_SYSTEM_DEFAULT } from '../constants'; import ProjectQualityGateApp from '../ProjectQualityGateApp'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateAppRenderer-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateAppRenderer-test.tsx index e2c2938f294..61e9dd74f1d 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateAppRenderer-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateAppRenderer-test.tsx @@ -19,11 +19,11 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import Radio from '../../../components/controls/Radio'; +import Select from '../../../components/controls/Select'; import { mockQualityGate } from '../../../helpers/mocks/quality-gates'; import { mockCondition } from '../../../helpers/testMocks'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { submit } from '../../../sonar-ui-common/helpers/testUtils'; +import { submit } from '../../../helpers/testUtils'; import { MetricKey } from '../../../types/metrics'; import { USE_SYSTEM_DEFAULT } from '../constants'; import ProjectQualityGateAppRenderer, { diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/routes.ts b/server/sonar-web/src/main/js/apps/projectQualityGate/routes.ts index 395a4f4dd01..01fb88c5b50 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/routes.ts +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 c8158903dcb..81b7af22f5d 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesApp.tsx @@ -28,8 +28,8 @@ import { } from '../../api/quality-profiles'; import addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage'; import handleRequiredAuthorization from '../../app/utils/handleRequiredAuthorization'; -import { translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; -import { isDefined } from '../../sonar-ui-common/helpers/types'; +import { translateWithParameters } from '../../helpers/l10n'; +import { isDefined } from '../../helpers/types'; import ProjectQualityProfilesAppRenderer from './ProjectQualityProfilesAppRenderer'; import { ProjectProfile } from './types'; 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 8a7635275fe..024ca06fab3 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx @@ -24,12 +24,12 @@ import { Link } from 'react-router'; import { Profile } from '../../api/quality-profiles'; import A11ySkipTarget from '../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; +import { Button } from '../../components/controls/buttons'; +import HelpTooltip from '../../components/controls/HelpTooltip'; +import EditIcon from '../../components/icons/EditIcon'; +import PlusCircleIcon from '../../components/icons/PlusCircleIcon'; +import { translate } from '../../helpers/l10n'; import { getRulesUrl } from '../../helpers/urls'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import HelpTooltip from '../../sonar-ui-common/components/controls/HelpTooltip'; -import EditIcon from '../../sonar-ui-common/components/icons/EditIcon'; -import PlusCircleIcon from '../../sonar-ui-common/components/icons/PlusCircleIcon'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; import BuiltInQualityProfileBadge from '../quality-profiles/components/BuiltInQualityProfileBadge'; import AddLanguageModal from './components/AddLanguageModal'; import SetQualityProfileModal from './components/SetQualityProfileModal'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/ProjectQualityProfilesApp-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/ProjectQualityProfilesApp-test.tsx index 547bead93eb..f61d1cb964d 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/ProjectQualityProfilesApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/ProjectQualityProfilesApp-test.tsx @@ -28,7 +28,7 @@ import { } from '../../../api/quality-profiles'; import handleRequiredAuthorization from '../../../app/utils/handleRequiredAuthorization'; import { mockComponent } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import ProjectQualityProfilesApp from '../ProjectQualityProfilesApp'; jest.mock('../../../api/quality-profiles', () => { 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 82a90de0c71..1630c4de320 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 @@ -23,11 +23,11 @@ import { connect } from 'react-redux'; import { Link } from 'react-router'; import { Profile } from '../../../api/quality-profiles'; import DisableableSelectOption from '../../../components/common/DisableableSelectOption'; +import { ButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Select from '../../../components/controls/Select'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import { translate } from '../../../helpers/l10n'; import { getQualityProfileUrl } from '../../../helpers/urls'; -import { ButtonLink, SubmitButton } from '../../../sonar-ui-common/components/controls/buttons'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { Store } from '../../../store/rootReducer'; export interface AddLanguageModalProps { 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 cb9be26ae92..063502c7278 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 @@ -21,13 +21,13 @@ import * as React from 'react'; import { Link } from 'react-router'; import { Profile } from '../../../api/quality-profiles'; import DisableableSelectOption from '../../../components/common/DisableableSelectOption'; +import { ButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Radio from '../../../components/controls/Radio'; +import Select from '../../../components/controls/Select'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import { Alert } from '../../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getQualityProfileUrl } from '../../../helpers/urls'; -import { ButtonLink, SubmitButton } from '../../../sonar-ui-common/components/controls/buttons'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import BuiltInQualityProfileBadge from '../../quality-profiles/components/BuiltInQualityProfileBadge'; import { USE_SYSTEM_DEFAULT } from '../constants'; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/__tests__/AddLanguageModal-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/__tests__/AddLanguageModal-test.tsx index d97beb3023c..4c091a9aeea 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/__tests__/AddLanguageModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/__tests__/AddLanguageModal-test.tsx @@ -19,9 +19,9 @@ */ import { shallow, ShallowWrapper } from 'enzyme'; import * as React from 'react'; +import Select from '../../../../components/controls/Select'; +import SimpleModal from '../../../../components/controls/SimpleModal'; import { mockQualityProfile } from '../../../../helpers/testMocks'; -import Select from '../../../../sonar-ui-common/components/controls/Select'; -import SimpleModal from '../../../../sonar-ui-common/components/controls/SimpleModal'; import { AddLanguageModal, AddLanguageModalProps } from '../AddLanguageModal'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/__tests__/SetQualityProfileModal-test.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/__tests__/SetQualityProfileModal-test.tsx index 2c9ad1797cb..309426a0391 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/__tests__/SetQualityProfileModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/__tests__/SetQualityProfileModal-test.tsx @@ -19,10 +19,10 @@ */ import { shallow, ShallowWrapper } from 'enzyme'; import * as React from 'react'; +import Radio from '../../../../components/controls/Radio'; +import Select from '../../../../components/controls/Select'; +import SimpleModal from '../../../../components/controls/SimpleModal'; import { mockComponent, mockQualityProfile } from '../../../../helpers/testMocks'; -import Radio from '../../../../sonar-ui-common/components/controls/Radio'; -import Select from '../../../../sonar-ui-common/components/controls/Select'; -import SimpleModal from '../../../../sonar-ui-common/components/controls/SimpleModal'; import SetQualityProfileModal, { SetQualityProfileModalProps } from '../SetQualityProfileModal'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/routes.ts b/server/sonar-web/src/main/js/apps/projectQualityProfiles/routes.ts index b04a9d34320..7ef64209da5 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/routes.ts +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 f520c820609..4034a6fd592 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 @@ -23,15 +23,15 @@ import { Helmet } from 'react-helmet-async'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; +import ListFooter from '../../../components/controls/ListFooter'; import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; import '../../../components/search-navigator.css'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication'; +import { translate } from '../../../helpers/l10n'; +import { addSideBarClass, removeSideBarClass } from '../../../helpers/pages'; +import { get, save } from '../../../helpers/storage'; import { isLoggedIn } from '../../../helpers/users'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import handleRequiredAuthentication from '../../../sonar-ui-common/helpers/handleRequiredAuthentication'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { addSideBarClass, removeSideBarClass } from '../../../sonar-ui-common/helpers/pages'; -import { get, save } from '../../../sonar-ui-common/helpers/storage'; import { ComponentQualifier } from '../../../types/component'; import { hasFilterParams, hasVisualizationParams, parseUrlQuery, Query } from '../query'; import '../styles.css'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx b/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx index 016fcb5f7b5..5fe4dd2d0a9 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { connect } from 'react-redux'; -import { lazyLoadComponent } from '../../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../../components/lazyLoadComponent'; import { getAppState, getCurrentUser, Store } from '../../../store/rootReducer'; import { ComponentQualifier } from '../../../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 6370abe992c..b652a99505b 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 @@ -20,13 +20,13 @@ import * as React from 'react'; import { getComponentNavigation } from '../../../api/nav'; import CreateApplicationForm from '../../../app/components/extensions/CreateApplicationForm'; +import { Button } from '../../../components/controls/buttons'; import { withAppState } from '../../../components/hoc/withAppState'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; import { Router, withRouter } from '../../../components/hoc/withRouter'; +import { translate } from '../../../helpers/l10n'; import { getComponentAdminUrl, getComponentOverviewUrl } from '../../../helpers/urls'; import { hasGlobalPermission } from '../../../helpers/users'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { ComponentQualifier } from '../../../types/component'; import { Permissions } from '../../../types/permissions'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ClearAll.tsx b/server/sonar-web/src/main/js/apps/projects/components/ClearAll.tsx index 3ab932bb29a..ec08ad69245 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ClearAll.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ClearAll.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { translate } from '../../../helpers/l10n'; interface Props { onClearAll: () => void; 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 f511a91a6c8..68329e25c0a 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 @@ -21,8 +21,8 @@ import * as React from 'react'; import { searchProjects } from '../../../api/components'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; +import { get } from '../../../helpers/storage'; import { hasGlobalPermission, isLoggedIn } from '../../../helpers/users'; -import { get } from '../../../sonar-ui-common/helpers/storage'; import { PROJECTS_ALL, PROJECTS_DEFAULT_FILTER, PROJECTS_FAVORITE } from '../utils'; import AllProjectsContainer from './AllProjectsContainer'; 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 c86b03c66a2..4ff272ce959 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 @@ -21,7 +21,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import '../../../components/common/EmptySearch.css'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Query } from '../query'; export default function EmptyFavoriteSearch({ query }: { query: Query }) { 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 3397720a780..c1fc2b8209e 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 @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { WithRouterProps } from 'react-router'; +import { Button } from '../../../components/controls/buttons'; import { withRouter } from '../../../components/hoc/withRouter'; +import { translate } from '../../../helpers/l10n'; import { hasGlobalPermission, isLoggedIn } from '../../../helpers/users'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { Permissions } from '../../../types/permissions'; export interface EmptyInstanceProps { 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 3e3c57bc6d4..7a017538197 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { IndexLink, Link } from 'react-router'; +import { translate } from '../../../helpers/l10n'; +import { save } from '../../../helpers/storage'; import { isLoggedIn } from '../../../helpers/users'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { save } from '../../../sonar-ui-common/helpers/storage'; import { PROJECTS_ALL, PROJECTS_DEFAULT_FILTER, PROJECTS_FAVORITE } from '../utils'; interface Props { 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 3daaee1d38c..6f44acbdbc2 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export default function NoFavoriteProjects() { return ( 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 0809336d957..b2980207975 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 @@ -20,9 +20,9 @@ import * as classNames from 'classnames'; import * as React from 'react'; import HomePageSelect from '../../../components/controls/HomePageSelect'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate } from '../../../helpers/l10n'; import { isLoggedIn } from '../../../helpers/users'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import SearchFilterContainer from '../filters/SearchFilterContainer'; import { Project } from '../types'; import ApplicationCreation from './ApplicationCreation'; 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 9bdb1e57928..13872969632 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 @@ -19,7 +19,7 @@ */ import { flatMap } from 'lodash'; import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import CoverageFilter from '../filters/CoverageFilter'; import DuplicationsFilter from '../filters/DuplicationsFilter'; import LanguagesFilterContainer from '../filters/LanguagesFilterContainer'; 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 441efc3962d..c7168badf4a 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Select from '../../../components/controls/Select'; +import { translate } from '../../../helpers/l10n'; import { VIEWS, VISUALIZATIONS } from '../utils'; import PerspectiveSelectOption, { Option } from './PerspectiveSelectOption'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelectOption.tsx b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelectOption.tsx index 5cf080bbdff..a9115bc1d14 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelectOption.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelectOption.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import BubblesIcon from '../../../sonar-ui-common/components/icons/BubblesIcon'; -import ListIcon from '../../../sonar-ui-common/components/icons/ListIcon'; +import BubblesIcon from '../../../components/icons/BubblesIcon'; +import ListIcon from '../../../components/icons/ListIcon'; export interface Option { label: string; 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 264167ce4f1..d43ce028420 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 @@ -20,14 +20,14 @@ import * as React from 'react'; import { Link } from 'react-router'; import { getAlmSettings } from '../../../api/alm-settings'; +import { Button } from '../../../components/controls/buttons'; +import Dropdown from '../../../components/controls/Dropdown'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; +import EllipsisIcon from '../../../components/icons/EllipsisIcon'; import { IMPORT_COMPATIBLE_ALMS, IMPORT_COMPATIBLE_ALM_COUNT } from '../../../helpers/constants'; +import { translate } from '../../../helpers/l10n'; import { hasGlobalPermission } from '../../../helpers/users'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import Dropdown from '../../../sonar-ui-common/components/controls/Dropdown'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import EllipsisIcon from '../../../sonar-ui-common/components/icons/EllipsisIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; import { Permissions } from '../../../types/permissions'; import ProjectCreationMenuItem from './ProjectCreationMenuItem'; 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 5decdbb78b5..c34b94152d2 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import ChevronsIcon from '../../../sonar-ui-common/components/icons/ChevronsIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import ChevronsIcon from '../../../components/icons/ChevronsIcon'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { AlmKeys } from '../../../types/alm-settings'; export interface ProjectCreationMenuItemProps { 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 2f26cf63cf7..8e265138f43 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 @@ -22,7 +22,7 @@ import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; import { List, ListRowProps } from 'react-virtualized/dist/commonjs/List'; import { WindowScroller } from 'react-virtualized/dist/commonjs/WindowScroller'; import EmptySearch from '../../../components/common/EmptySearch'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Query } from '../query'; import { Project } from '../types'; import EmptyFavoriteSearch from './EmptyFavoriteSearch'; 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 59f1a6a0712..cdf13fbbfac 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,12 +20,12 @@ import { sortBy } from 'lodash'; import * as React from 'react'; import { colors } from '../../../app/theme'; -import { ButtonIcon } from '../../../sonar-ui-common/components/controls/buttons'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import SortAscIcon from '../../../sonar-ui-common/components/icons/SortAscIcon'; -import SortDescIcon from '../../../sonar-ui-common/components/icons/SortDescIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonIcon } from '../../../components/controls/buttons'; +import Select from '../../../components/controls/Select'; +import Tooltip from '../../../components/controls/Tooltip'; +import SortAscIcon from '../../../components/icons/SortAscIcon'; +import SortDescIcon from '../../../components/icons/SortDescIcon'; +import { translate } from '../../../helpers/l10n'; import { parseSorting, SORTING_LEAK_METRICS, SORTING_METRICS } from '../utils'; import ProjectsSortingSelectOption, { Option } from './ProjectsSortingSelectOption'; 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 81bef7f6a77..e149a05897a 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 @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { get, save } from '../../../../sonar-ui-common/helpers/storage'; +import { get, save } from '../../../../helpers/storage'; import { ComponentQualifier } from '../../../../types/component'; import { AllProjects, @@ -55,7 +55,7 @@ jest.mock('../../utils', () => { return utils; }); -jest.mock('../../../../sonar-ui-common/helpers/storage', () => ({ +jest.mock('../../../../helpers/storage', () => ({ get: jest.fn(() => null), save: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ApplicationCreation-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ApplicationCreation-test.tsx index 127b03b12d8..5e33911867b 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ApplicationCreation-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ApplicationCreation-test.tsx @@ -21,8 +21,8 @@ import { shallow, ShallowWrapper } from 'enzyme'; import * as React from 'react'; import { getComponentNavigation } from '../../../../api/nav'; import CreateApplicationForm from '../../../../app/components/extensions/CreateApplicationForm'; +import { Button } from '../../../../components/controls/buttons'; import { mockAppState, mockLoggedInUser, mockRouter } from '../../../../helpers/testMocks'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; import { ComponentQualifier } from '../../../../types/component'; import { ApplicationCreation, ApplicationCreationProps } from '../ApplicationCreation'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ClearAll-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ClearAll-test.tsx index 5fbf88db635..6d5fe5170b6 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ClearAll-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ClearAll-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import ClearAll from '../ClearAll'; it('renders', () => { 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 9ac62fb5336..e0ac85e5c84 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 @@ -20,15 +20,15 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { searchProjects } from '../../../../api/components'; +import { get } from '../../../../helpers/storage'; import { mockCurrentUser, mockLocation, mockLoggedInUser, mockRouter } from '../../../../helpers/testMocks'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { hasGlobalPermission } from '../../../../helpers/users'; -import { get } from '../../../../sonar-ui-common/helpers/storage'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; import { DefaultPageSelector } from '../DefaultPageSelector'; jest.mock('../AllProjectsContainer', () => ({ @@ -38,7 +38,7 @@ jest.mock('../AllProjectsContainer', () => ({ } })); -jest.mock('../../../../sonar-ui-common/helpers/storage', () => ({ +jest.mock('../../../../helpers/storage', () => ({ get: jest.fn().mockReturnValue(undefined) })); 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 61be1c433b5..2e4a2b0aabe 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 @@ -19,11 +19,11 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { save } from '../../../../sonar-ui-common/helpers/storage'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { save } from '../../../../helpers/storage'; +import { click } from '../../../../helpers/testUtils'; import FavoriteFilter from '../FavoriteFilter'; -jest.mock('../../../../sonar-ui-common/helpers/storage', () => ({ +jest.mock('../../../../helpers/storage', () => ({ save: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCreationMenu-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCreationMenu-test.tsx index d53dee50767..5571a631e55 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCreationMenu-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCreationMenu-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getAlmSettings } from '../../../../api/alm-settings'; import { mockLoggedInUser } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { AlmKeys } from '../../../../types/alm-settings'; import { ProjectCreationMenu } from '../ProjectCreationMenu'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelect-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelect-test.tsx index 4253c43401b..5ec93155c70 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelect-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectsSortingSelect-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import ProjectsSortingSelect from '../ProjectsSortingSelect'; it('should render correctly for overall view', () => { 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 7ab96073b33..7cde29df645 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 @@ -23,16 +23,16 @@ import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import PrivacyBadgeContainer from '../../../../components/common/PrivacyBadgeContainer'; import Favorite from '../../../../components/controls/Favorite'; +import Tooltip from '../../../../components/controls/Tooltip'; +import QualifierIcon from '../../../../components/icons/QualifierIcon'; +import DateFromNow from '../../../../components/intl/DateFromNow'; +import DateTimeFormatter from '../../../../components/intl/DateTimeFormatter'; import Measure from '../../../../components/measure/Measure'; import TagsList from '../../../../components/tags/TagsList'; +import SizeRating from '../../../../components/ui/SizeRating'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { getProjectUrl } from '../../../../helpers/urls'; import { isLoggedIn } from '../../../../helpers/users'; -import Tooltip from '../../../../sonar-ui-common/components/controls/Tooltip'; -import QualifierIcon from '../../../../sonar-ui-common/components/icons/QualifierIcon'; -import DateFromNow from '../../../../sonar-ui-common/components/intl/DateFromNow'; -import DateTimeFormatter from '../../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import SizeRating from '../../../../sonar-ui-common/components/ui/SizeRating'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; import { ComponentQualifier } from '../../../../types/component'; import { MetricKey } from '../../../../types/metrics'; import { Project } from '../../types'; 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 23316b03e90..567ca229559 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 @@ -19,7 +19,7 @@ */ import { sortBy } from 'lodash'; import * as React from 'react'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; interface Props { className?: string; 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 bd1d1f42a4f..d103da690ac 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 @@ -19,7 +19,7 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import IssueTypeIcon from '../../../../sonar-ui-common/components/icons/IssueTypeIcon'; +import IssueTypeIcon from '../../../../components/icons/IssueTypeIcon'; export interface ProjectCardMeasureProps { iconKey?: string; 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 57347d495a9..b9d1c682865 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 @@ -20,13 +20,13 @@ import * as classNames from 'classnames'; import * as difference from 'date-fns/difference_in_milliseconds'; import * as React from 'react'; +import DateTimeFormatter from '../../../../components/intl/DateTimeFormatter'; import Measure from '../../../../components/measure/Measure'; import CoverageRating from '../../../../components/ui/CoverageRating'; -import DateTimeFormatter from '../../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import DuplicationsRating from '../../../../sonar-ui-common/components/ui/DuplicationsRating'; -import Rating from '../../../../sonar-ui-common/components/ui/Rating'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; -import { isDefined } from '../../../../sonar-ui-common/helpers/types'; +import DuplicationsRating from '../../../../components/ui/DuplicationsRating'; +import Rating from '../../../../components/ui/Rating'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; +import { isDefined } from '../../../../helpers/types'; import { ComponentQualifier } from '../../../../types/component'; import { MetricKey } from '../../../../types/metrics'; import { formatDuration } from '../../utils'; diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardQualityGate.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardQualityGate.tsx index e0c16d01a6a..3a0b96b6fd8 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardQualityGate.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardQualityGate.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import HelpTooltip from '../../../../sonar-ui-common/components/controls/HelpTooltip'; -import Level from '../../../../sonar-ui-common/components/ui/Level'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../../sonar-ui-common/helpers/measures'; +import HelpTooltip from '../../../../components/controls/HelpTooltip'; +import Level from '../../../../components/ui/Level'; +import { translate } from '../../../../helpers/l10n'; +import { formatMeasure } from '../../../../helpers/measures'; interface Props { status?: string; 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 b656d3716f2..4e1463002db 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 @@ -19,11 +19,8 @@ */ import * as React from 'react'; import CoverageRating from '../../../components/ui/CoverageRating'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { - getCoverageRatingAverageValue, - getCoverageRatingLabel -} from '../../../sonar-ui-common/helpers/ratings'; +import { translate } from '../../../helpers/l10n'; +import { getCoverageRatingAverageValue, getCoverageRatingLabel } from '../../../helpers/ratings'; import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; 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 a06946a3c98..8ad097a9826 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 @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import DuplicationsRating from '../../../sonar-ui-common/components/ui/DuplicationsRating'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import DuplicationsRating from '../../../components/ui/DuplicationsRating'; +import { translate } from '../../../helpers/l10n'; import { getDuplicationsRatingAverageValue, getDuplicationsRatingLabel -} from '../../../sonar-ui-common/helpers/ratings'; +} from '../../../helpers/ratings'; import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx index 6c8f79e38a1..150a78d6cb8 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { Facet } from '../types'; export type Option = string | number; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.tsx index b437b47f244..ade2ba79d85 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Rating from '../../../sonar-ui-common/components/ui/Rating'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Rating from '../../../components/ui/Rating'; +import { translate } from '../../../helpers/l10n'; import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; 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 6e3c8a53469..e3786e0f5b1 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 @@ -19,7 +19,7 @@ */ import { difference, sortBy } from 'lodash'; import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { getLanguageByKey } from '../../../store/languages'; import { Facet } from '../types'; import Filter from './Filter'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/MaintainabilityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/MaintainabilityFilter.tsx index a6bb27b3042..73a3c437eca 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/MaintainabilityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/MaintainabilityFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import CodeSmellIcon from '../../../sonar-ui-common/components/icons/CodeSmellIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import CodeSmellIcon from '../../../components/icons/CodeSmellIcon'; +import { translate } from '../../../helpers/l10n'; import { Facet } from '../types'; import IssuesFilter from './IssuesFilter'; 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 86e5b4f1f81..73b9dceb8dc 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getSizeRatingLabel } from '../../../sonar-ui-common/helpers/ratings'; +import { translate } from '../../../helpers/l10n'; +import { getSizeRatingLabel } from '../../../helpers/ratings'; import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewMaintainabilityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewMaintainabilityFilter.tsx index 66325a135b7..c151cb3c6fc 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewMaintainabilityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewMaintainabilityFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import CodeSmellIcon from '../../../sonar-ui-common/components/icons/CodeSmellIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import CodeSmellIcon from '../../../components/icons/CodeSmellIcon'; +import { translate } from '../../../helpers/l10n'; import { Facet } from '../types'; import IssuesFilter from './IssuesFilter'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.tsx index 3bf152eeae5..423e5fd205b 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import BugIcon from '../../../sonar-ui-common/components/icons/BugIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import BugIcon from '../../../components/icons/BugIcon'; +import { translate } from '../../../helpers/l10n'; import { Facet } from '../types'; import IssuesFilter from './IssuesFilter'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewSecurityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewSecurityFilter.tsx index 092d0a4a54a..64614768687 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewSecurityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewSecurityFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import VulnerabilityIcon from '../../../sonar-ui-common/components/icons/VulnerabilityIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import VulnerabilityIcon from '../../../components/icons/VulnerabilityIcon'; +import { translate } from '../../../helpers/l10n'; import { Facet } from '../types'; import IssuesFilter from './IssuesFilter'; 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 a59fde35725..84812b36415 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import { translate } from '../../../helpers/l10n'; import { ComponentQualifier } from '../../../types/component'; import { Facet } from '../types'; import Filter from './Filter'; 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 347c88539a9..fd857bf2f80 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import Level from '../../../sonar-ui-common/components/ui/Level'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import Level from '../../../components/ui/Level'; +import { translate } from '../../../helpers/l10n'; import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/ReliabilityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/ReliabilityFilter.tsx index 952a6ef84d5..2f4f683241e 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/ReliabilityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/ReliabilityFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import BugIcon from '../../../sonar-ui-common/components/icons/BugIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import BugIcon from '../../../components/icons/BugIcon'; +import { translate } from '../../../helpers/l10n'; import { Facet } from '../types'; import IssuesFilter from './IssuesFilter'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SearchFilterContainer.tsx b/server/sonar-web/src/main/js/apps/projects/filters/SearchFilterContainer.tsx index b4f2563967f..36bdaab7f53 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SearchFilterContainer.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/SearchFilterContainer.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import SearchBox from '../../../components/controls/SearchBox'; +import { translate } from '../../../helpers/l10n'; interface Props { query: { search?: string }; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterFooter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterFooter.tsx index 5e184e6a4f4..ee10558c61d 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterFooter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterFooter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Select from '../../../components/controls/Select'; +import { translate } from '../../../helpers/l10n'; interface Props { isFavorite?: boolean; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.tsx b/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.tsx index e787a18af65..77bed6716a7 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { option?: { name: string }; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SecurityFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/SecurityFilter.tsx index be34bbbf52c..a553d205870 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SecurityFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/SecurityFilter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import VulnerabilityIcon from '../../../sonar-ui-common/components/icons/VulnerabilityIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import VulnerabilityIcon from '../../../components/icons/VulnerabilityIcon'; +import { translate } from '../../../helpers/l10n'; import { Facet } from '../types'; import IssuesFilter from './IssuesFilter'; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SecurityReviewFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/SecurityReviewFilter.tsx index ec8ea03df5e..816b7428e33 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SecurityReviewFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/SecurityReviewFilter.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import SecurityHotspotIcon from '../../../sonar-ui-common/components/icons/SecurityHotspotIcon'; -import Rating from '../../../sonar-ui-common/components/ui/Rating'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import SecurityHotspotIcon from '../../../components/icons/SecurityHotspotIcon'; +import Rating from '../../../components/ui/Rating'; +import { translate } from '../../../helpers/l10n'; import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; 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 8265900fa18..9df9a168890 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 @@ -18,12 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import SizeRating from '../../../sonar-ui-common/components/ui/SizeRating'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { - getSizeRatingAverageValue, - getSizeRatingLabel -} from '../../../sonar-ui-common/helpers/ratings'; +import SizeRating from '../../../components/ui/SizeRating'; +import { translate } from '../../../helpers/l10n'; +import { getSizeRatingAverageValue, getSizeRatingLabel } from '../../../helpers/ratings'; import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; 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 3e78ddcd323..c7175a3cc3b 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 @@ -20,7 +20,7 @@ import { debounce, difference, size, sortBy } from 'lodash'; import * as React from 'react'; import { searchProjectTags } from '../../../api/components'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Facet } from '../types'; import Filter from './Filter'; import FilterHeader from './FilterHeader'; diff --git a/server/sonar-web/src/main/js/apps/projects/routes.ts b/server/sonar-web/src/main/js/apps/projects/routes.ts index cc026f8dd9b..c398749aed4 100644 --- a/server/sonar-web/src/main/js/apps/projects/routes.ts +++ b/server/sonar-web/src/main/js/apps/projects/routes.ts @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { RedirectFunction, RouterState } from 'react-router'; -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; -import { save } from '../../sonar-ui-common/helpers/storage'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; +import { save } from '../../helpers/storage'; import { PROJECTS_ALL, PROJECTS_DEFAULT_FILTER } from './utils'; const routes = [ 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 f729cf3a72e..d9c0446d643 100644 --- a/server/sonar-web/src/main/js/apps/projects/utils.ts +++ b/server/sonar-web/src/main/js/apps/projects/utils.ts @@ -20,9 +20,9 @@ import { invert } from 'lodash'; import { Facet, searchProjects } from '../../api/components'; import { getMeasuresForProjects } from '../../api/measures'; +import { translate, translateWithParameters } from '../../helpers/l10n'; import { isDiffMetric } from '../../helpers/measures'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; -import { RequestData } from '../../sonar-ui-common/helpers/request'; +import { RequestData } from '../../helpers/request'; import { MetricKey } from '../../types/metrics'; import { convertToFilter, Query } from './query'; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Coverage.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Coverage.tsx index ee807a7ffcd..3223754c5f9 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Coverage.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Coverage.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Project } from '../types'; import SimpleBubbleChart from './SimpleBubbleChart'; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx index a353b4810c4..523b6293267 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Duplications.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Project } from '../types'; import SimpleBubbleChart from './SimpleBubbleChart'; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Maintainability.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Maintainability.tsx index d963b5359ba..1bd88d95b0a 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Maintainability.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Maintainability.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Project } from '../types'; import SimpleBubbleChart from './SimpleBubbleChart'; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Reliability.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Reliability.tsx index e62c648276a..61a8a070537 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Reliability.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Reliability.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Project } from '../types'; import SimpleBubbleChart from './SimpleBubbleChart'; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.tsx index 013026433b3..bd671ce8718 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.tsx @@ -18,15 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import BubbleChart from '../../../components/charts/BubbleChart'; import ColorRatingsLegend from '../../../components/charts/ColorRatingsLegend'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; import { RATING_COLORS } from '../../../helpers/constants'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; +import { isDefined } from '../../../helpers/types'; import { getProjectUrl } from '../../../helpers/urls'; -import BubbleChart from '../../../sonar-ui-common/components/charts/BubbleChart'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; -import { isDefined } from '../../../sonar-ui-common/helpers/types'; import { ComponentQualifier } from '../../../types/component'; import { Project } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Security.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Security.tsx index d2df2ff39b9..4298e5e1c6a 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Security.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Security.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { Project } from '../types'; import SimpleBubbleChart from './SimpleBubbleChart'; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.tsx index 9d387853d9c..5a0a94ee888 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.tsx @@ -18,15 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import BubbleChart from '../../../components/charts/BubbleChart'; import ColorRatingsLegend from '../../../components/charts/ColorRatingsLegend'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; import { RATING_COLORS } from '../../../helpers/constants'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; +import { isDefined } from '../../../helpers/types'; import { getProjectUrl } from '../../../helpers/urls'; -import BubbleChart from '../../../sonar-ui-common/components/charts/BubbleChart'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; -import { isDefined } from '../../../sonar-ui-common/helpers/types'; import { ComponentQualifier } from '../../../types/component'; import { Project } from '../types'; diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.tsx b/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.tsx index 3dc25731990..db77fa42331 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.tsx +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Project } from '../types'; import { localizeSorting } from '../utils'; import Coverage from './Coverage'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx index c624bd1db93..c3c7d9ce91f 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx @@ -25,10 +25,10 @@ import { getComponents, Project } from '../../api/components'; import { changeProjectDefaultVisibility } from '../../api/permissions'; import { getValues } from '../../api/settings'; import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; +import ListFooter from '../../components/controls/ListFooter'; +import { toShortNotSoISOString } from '../../helpers/dates'; +import { translate } from '../../helpers/l10n'; import { hasGlobalPermission } from '../../helpers/users'; -import ListFooter from '../../sonar-ui-common/components/controls/ListFooter'; -import { toShortNotSoISOString } from '../../sonar-ui-common/helpers/dates'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; import { getAppState, getCurrentUser, Store } from '../../store/rootReducer'; import { Permissions } from '../../types/permissions'; import { SettingsKey } from '../../types/settings'; 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 027ee59e33a..d6d90784353 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx @@ -19,14 +19,14 @@ */ import * as React from 'react'; import { bulkApplyTemplate, getPermissionTemplates } from '../../api/permissions'; -import { ResetButtonLink, SubmitButton } from '../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../sonar-ui-common/components/controls/Modal'; -import Select from '../../sonar-ui-common/components/controls/Select'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import MandatoryFieldMarker from '../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { toNotSoISOString } from '../../sonar-ui-common/helpers/dates'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../components/controls/buttons'; +import Modal from '../../components/controls/Modal'; +import Select from '../../components/controls/Select'; +import { Alert } from '../../components/ui/Alert'; +import MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation'; +import { toNotSoISOString } from '../../helpers/dates'; +import { translate, translateWithParameters } from '../../helpers/l10n'; export interface Props { analyzedBefore: Date | undefined; 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 4c38ce4f1d0..06fe0785b93 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button, ResetButtonLink } from '../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../sonar-ui-common/components/controls/Modal'; -import Radio from '../../sonar-ui-common/components/controls/Radio'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { Button, ResetButtonLink } from '../../components/controls/buttons'; +import Modal from '../../components/controls/Modal'; +import Radio from '../../components/controls/Radio'; +import { Alert } from '../../components/ui/Alert'; +import { translate } from '../../helpers/l10n'; export interface Props { defaultVisibility: T.Visibility; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx index 15c93000141..eeb7e424efe 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx @@ -22,13 +22,13 @@ import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { createProject } from '../../api/components'; import VisibilitySelector from '../../components/common/VisibilitySelector'; +import { ResetButtonLink, SubmitButton } from '../../components/controls/buttons'; +import Modal from '../../components/controls/Modal'; +import { Alert } from '../../components/ui/Alert'; +import MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../helpers/l10n'; import { getProjectUrl } from '../../helpers/urls'; -import { ResetButtonLink, SubmitButton } from '../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../sonar-ui-common/components/controls/Modal'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import MandatoryFieldMarker from '../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; interface Props { defaultProjectVisibility?: T.Visibility; 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 66e3d015a7d..9fa913a0c47 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/DeleteModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/DeleteModal.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { bulkDeleteProjects } from '../../api/components'; -import { ResetButtonLink, SubmitButton } from '../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../sonar-ui-common/components/controls/Modal'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import { toNotSoISOString } from '../../sonar-ui-common/helpers/dates'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../components/controls/buttons'; +import Modal from '../../components/controls/Modal'; +import { Alert } from '../../components/ui/Alert'; +import { toNotSoISOString } from '../../helpers/dates'; +import { translate, translateWithParameters } from '../../helpers/l10n'; export interface Props { analyzedBefore: Date | undefined; 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 ba9e78aee19..186366ffc0f 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button, EditButton } from '../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { Button, EditButton } from '../../components/controls/buttons'; +import { translate } from '../../helpers/l10n'; import ChangeDefaultVisibilityForm from './ChangeDefaultVisibilityForm'; export interface Props { 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 767495017dc..6bcb30683f8 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx @@ -21,11 +21,11 @@ import * as React from 'react'; import { Link } from 'react-router'; import { Project } from '../../api/components'; import PrivacyBadgeContainer from '../../components/common/PrivacyBadgeContainer'; +import Checkbox from '../../components/controls/Checkbox'; +import Tooltip from '../../components/controls/Tooltip'; +import QualifierIcon from '../../components/icons/QualifierIcon'; +import DateFormatter from '../../components/intl/DateFormatter'; import { getComponentOverviewUrl } from '../../helpers/urls'; -import Checkbox from '../../sonar-ui-common/components/controls/Checkbox'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; -import QualifierIcon from '../../sonar-ui-common/components/icons/QualifierIcon'; -import DateFormatter from '../../sonar-ui-common/components/intl/DateFormatter'; import './ProjectRow.css'; import ProjectRowActions from './ProjectRowActions'; 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 69f808ff22e..8110759fa59 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx @@ -20,12 +20,10 @@ import * as React from 'react'; import { Project } from '../../api/components'; import { getComponentNavigation } from '../../api/nav'; +import ActionsDropdown, { ActionsDropdownItem } from '../../components/controls/ActionsDropdown'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; +import { translate } from '../../helpers/l10n'; import { getComponentPermissionsUrl } from '../../helpers/urls'; -import ActionsDropdown, { - ActionsDropdownItem -} from '../../sonar-ui-common/components/controls/ActionsDropdown'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; import ApplyTemplate from '../permissions/project/components/ApplyTemplate'; import RestoreAccessModal from './RestoreAccessModal'; 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 3a40b6806b4..60a2ed2f579 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Projects.tsx @@ -20,7 +20,7 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { Project } from '../../api/components'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import ProjectRow from './ProjectRow'; interface Props { 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 562a38942ad..c651f31e4c5 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/RestoreAccessModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/RestoreAccessModal.tsx @@ -21,9 +21,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Project } from '../../api/components'; import { grantPermissionToUser } from '../../api/permissions'; -import { ResetButtonLink, SubmitButton } from '../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../sonar-ui-common/components/controls/Modal'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../components/controls/buttons'; +import Modal from '../../components/controls/Modal'; +import { translate } from '../../helpers/l10n'; interface Props { currentUser: Pick<T.LoggedInUser, 'login'>; 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 b0625038a14..fbf0c4558f2 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx @@ -20,14 +20,14 @@ import { sortBy } from 'lodash'; import * as React from 'react'; import { Project } from '../../api/components'; +import { Button } from '../../components/controls/buttons'; +import Checkbox from '../../components/controls/Checkbox'; import DateInput from '../../components/controls/DateInput'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import Checkbox from '../../sonar-ui-common/components/controls/Checkbox'; -import HelpTooltip from '../../sonar-ui-common/components/controls/HelpTooltip'; -import SearchBox from '../../sonar-ui-common/components/controls/SearchBox'; -import Select from '../../sonar-ui-common/components/controls/Select'; -import QualifierIcon from '../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import HelpTooltip from '../../components/controls/HelpTooltip'; +import SearchBox from '../../components/controls/SearchBox'; +import Select from '../../components/controls/Select'; +import QualifierIcon from '../../components/icons/QualifierIcon'; +import { translate } from '../../helpers/l10n'; import BulkApplyTemplateModal from './BulkApplyTemplateModal'; import DeleteModal from './DeleteModal'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx index 5d66104f58c..be92a02befa 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/App-test.tsx @@ -23,7 +23,7 @@ import { getComponents } from '../../../api/components'; import { changeProjectDefaultVisibility } from '../../../api/permissions'; import { getValues } from '../../../api/settings'; import { mockAppState, mockLoggedInUser } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { App, Props } from '../App'; import Search from '../Search'; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx index 647aab9334c..81f90d0c9bd 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/BulkApplyTemplateModal-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; -import { click, waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { parseDate } from '../../../helpers/dates'; +import { click, waitAndUpdate } from '../../../helpers/testUtils'; import BulkApplyTemplateModal, { Props } from '../BulkApplyTemplateModal'; jest.mock('../../../api/permissions', () => ({ diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ChangeDefaultVisibilityForm-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ChangeDefaultVisibilityForm-test.tsx index 0b9a405c4ce..b8d381ebb39 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ChangeDefaultVisibilityForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ChangeDefaultVisibilityForm-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import Radio from '../../../components/controls/Radio'; +import { click } from '../../../helpers/testUtils'; import ChangeDefaultVisibilityForm from '../ChangeDefaultVisibilityForm'; it('closes', () => { diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx index ab62bb13fb4..4e3c40dee58 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/CreateProjectForm-test.tsx @@ -26,7 +26,7 @@ jest.mock('../../../api/components', () => ({ import { shallow } from 'enzyme'; import * as React from 'react'; -import { change, submit, waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { change, submit, waitAndUpdate } from '../../../helpers/testUtils'; import CreateProjectForm from '../CreateProjectForm'; const createProject = require('../../../api/components').createProject as jest.Mock<any>; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx index 0f7d0062043..46b525fbb05 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/DeleteModal-test.tsx @@ -24,8 +24,8 @@ jest.mock('../../../api/components', () => ({ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { parseDate } from '../../../helpers/dates'; +import { click } from '../../../helpers/testUtils'; import DeleteModal, { Props } from '../DeleteModal'; const bulkDeleteProjects = require('../../../api/components').bulkDeleteProjects as jest.Mock<any>; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Header-test.tsx index e50560a61cf..c67e81e0cf6 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Header-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import Header, { Props } from '../Header'; jest.mock('../../../helpers/system', () => ({ isSonarCloud: jest.fn().mockReturnValue(false) })); diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRowActions-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRowActions-test.tsx index 09163cf0930..3356b769755 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRowActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectRowActions-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getComponentNavigation } from '../../../api/nav'; import { mockLoggedInUser } from '../../../helpers/testMocks'; -import { click, waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../helpers/testUtils'; import ProjectRowActions, { Props } from '../ProjectRowActions'; jest.mock('../../../api/nav', () => ({ diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Search-test.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Search-test.tsx index c215f55bb1c..a2e3ce57d66 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Search-test.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/__tests__/Search-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import Search, { Props } from '../Search'; it('renders', () => { diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/routes.ts b/server/sonar-web/src/main/js/apps/projectsManagement/routes.ts index a823184781c..3af374600fb 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/routes.ts +++ b/server/sonar-web/src/main/js/apps/projectsManagement/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 0e36cbc3817..e2bd83f3f84 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 @@ -24,15 +24,15 @@ import { fetchQualityGates } from '../../../api/quality-gates'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; import '../../../components/search-navigator.css'; -import { getQualityGateUrl } from '../../../helpers/urls'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import { addSideBarClass, addWhitePageClass, removeSideBarClass, removeWhitePageClass -} from '../../../sonar-ui-common/helpers/pages'; +} from '../../../helpers/pages'; +import { getQualityGateUrl } from '../../../helpers/urls'; import '../styles.css'; import Details from './Details'; import List from './List'; 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 9e444f895e7..948c81a73f6 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 @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate } from '../../../helpers/l10n'; interface Props { className?: string; 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 f4f4ccb2bdd..313ff3af985 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 @@ -20,14 +20,10 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { deleteCondition } from '../../../api/quality-gates'; -import { DeleteButton, EditButton } from '../../../sonar-ui-common/components/controls/buttons'; -import ConfirmModal from '../../../sonar-ui-common/components/controls/ConfirmModal'; -import { - getLocalizedMetricName, - translate, - translateWithParameters -} from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { DeleteButton, EditButton } from '../../../components/controls/buttons'; +import ConfirmModal from '../../../components/controls/ConfirmModal'; +import { getLocalizedMetricName, translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { getLocalizedMetricNameNoDiffMetric } from '../utils'; import ConditionModal from './ConditionModal'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx index 394c1361d33..c28d5966448 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { createCondition, updateCondition } from '../../../api/quality-gates'; -import ConfirmModal from '../../../sonar-ui-common/components/controls/ConfirmModal'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { getLocalizedMetricName, translate } from '../../../sonar-ui-common/helpers/l10n'; -import { isDiffMetric } from '../../../sonar-ui-common/helpers/measures'; +import ConfirmModal from '../../../components/controls/ConfirmModal'; +import Radio from '../../../components/controls/Radio'; +import { Alert } from '../../../components/ui/Alert'; +import { getLocalizedMetricName, translate } from '../../../helpers/l10n'; +import { isDiffMetric } from '../../../helpers/measures'; import { getPossibleOperators } from '../utils'; import ConditionOperator from './ConditionOperator'; import MetricSelect from './MetricSelect'; 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 a0738cb978f..b1c2b68ae39 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Select from '../../../components/controls/Select'; +import { translate } from '../../../helpers/l10n'; import { getPossibleOperators } from '../utils'; interface Props { 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 b57955f08a3..6d5d1fd5fd9 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 @@ -20,12 +20,12 @@ import { differenceWith, map, sortBy, uniqBy } from 'lodash'; import * as React from 'react'; import DocumentationTooltip from '../../../components/common/DocumentationTooltip'; +import { Button } from '../../../components/controls/buttons'; +import ModalButton from '../../../components/controls/ModalButton'; import { withAppState } from '../../../components/hoc/withAppState'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ModalButton from '../../../sonar-ui-common/components/controls/ModalButton'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { getLocalizedMetricName, translate } from '../../../sonar-ui-common/helpers/l10n'; -import { isDiffMetric } from '../../../sonar-ui-common/helpers/measures'; +import { Alert } from '../../../components/ui/Alert'; +import { getLocalizedMetricName, translate } from '../../../helpers/l10n'; +import { isDiffMetric } from '../../../helpers/measures'; import { MetricKey } from '../../../types/metrics'; import Condition from './Condition'; import ConditionModal from './ConditionModal'; 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 428d744ebe8..fbace702f0e 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 @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { copyQualityGate } from '../../../api/quality-gates'; +import ConfirmModal from '../../../components/controls/ConfirmModal'; import { Router, withRouter } from '../../../components/hoc/withRouter'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; import { getQualityGateUrl } from '../../../helpers/urls'; -import ConfirmModal from '../../../sonar-ui-common/components/controls/ConfirmModal'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; interface Props { onClose: () => void; 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 7895710de5f..0a2588245bf 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 @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { createQualityGate } from '../../../api/quality-gates'; +import ConfirmModal from '../../../components/controls/ConfirmModal'; import { Router, withRouter } from '../../../components/hoc/withRouter'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; import { getQualityGateUrl } from '../../../helpers/urls'; -import ConfirmModal from '../../../sonar-ui-common/components/controls/ConfirmModal'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; interface Props { onClose: () => void; 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 42aaa9a917a..db52e78926a 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 @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { deleteQualityGate } from '../../../api/quality-gates'; +import { Button } from '../../../components/controls/buttons'; +import ConfirmButton from '../../../components/controls/ConfirmButton'; import { Router, withRouter } from '../../../components/hoc/withRouter'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getQualityGatesUrl } from '../../../helpers/urls'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ConfirmButton from '../../../sonar-ui-common/components/controls/ConfirmButton'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; interface Props { onDelete: () => Promise<void>; 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 7c2a628693c..9b7f5c7cd33 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 @@ -22,8 +22,8 @@ import { Helmet } from 'react-helmet-async'; import { connect } from 'react-redux'; import { fetchQualityGate } from '../../../api/quality-gates'; import addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import { fetchMetrics } from '../../../store/rootActions'; import { getMetrics, Store } from '../../../store/rootReducer'; import { addCondition, checkIfDefault, deleteCondition, replaceCondition } from '../utils'; 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 4c92f487df6..c37b90a2ff0 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; import Conditions from './Conditions'; import Projects from './Projects'; 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 5a73c571973..5bd11877f2a 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 @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { setQualityGateAsDefault } from '../../../api/quality-gates'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ModalButton from '../../../sonar-ui-common/components/controls/ModalButton'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import ModalButton from '../../../components/controls/ModalButton'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate } from '../../../helpers/l10n'; import BuiltInQualityGateBadge from './BuiltInQualityGateBadge'; import CopyQualityGateForm from './CopyQualityGateForm'; import DeleteQualityGateForm from './DeleteQualityGateForm'; 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 f3352364859..873cb4e4870 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import { translate } from '../../../helpers/l10n'; import { getQualityGateUrl } from '../../../helpers/urls'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import BuiltInQualityGateBadge from './BuiltInQualityGateBadge'; interface Props { 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 d8ab82b47a5..f430ae44008 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,9 +19,9 @@ */ import * as React from 'react'; import DocumentationTooltip from '../../../components/common/DocumentationTooltip'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ModalButton from '../../../sonar-ui-common/components/controls/ModalButton'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import ModalButton from '../../../components/controls/ModalButton'; +import { translate } from '../../../helpers/l10n'; import CreateQualityGateForm from './CreateQualityGateForm'; interface Props { 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 eaedaf45569..8875ebe4261 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 @@ -19,8 +19,8 @@ */ import { sortBy } from 'lodash'; import * as React from 'react'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { getLocalizedMetricDomain, translate } from '../../../sonar-ui-common/helpers/l10n'; +import Select from '../../../components/controls/Select'; +import { getLocalizedMetricDomain, translate } from '../../../helpers/l10n'; import { getLocalizedMetricNameNoDiffMetric } from '../utils'; interface Props { 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 0d99068bd47..ef0b28780ac 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 @@ -27,8 +27,8 @@ import { import SelectList, { SelectListFilter, SelectListSearchParams -} from '../../../sonar-ui-common/components/controls/SelectList'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +} from '../../../components/controls/SelectList'; +import { translate } from '../../../helpers/l10n'; interface Props { canEdit?: boolean; 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 23f830ac0a7..8113666ba3e 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,10 +19,10 @@ */ import * as React from 'react'; import { renameQualityGate } from '../../../api/quality-gates'; -import ConfirmModal from '../../../sonar-ui-common/components/controls/ConfirmModal'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import ConfirmModal from '../../../components/controls/ConfirmModal'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; interface Props { onClose: () => void; 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 9061af66f26..4de825249d7 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Select from '../../../sonar-ui-common/components/controls/Select'; +import Select from '../../../components/controls/Select'; interface Props { name: string; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/App.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/App.tsx index fe81f19f993..1fe843ea541 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/App.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/App.tsx @@ -22,17 +22,17 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import ScreenPositionHelper from '../../../../components/common/ScreenPositionHelper'; import { mockQualityGate } from '../../../../helpers/mocks/quality-gates'; -import { mockRouter } from '../../../../helpers/testMocks'; import { addSideBarClass, addWhitePageClass, removeSideBarClass, removeWhitePageClass -} from '../../../../sonar-ui-common/helpers/pages'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +} from '../../../../helpers/pages'; +import { mockRouter } from '../../../../helpers/testMocks'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import App from '../App'; -jest.mock('../../../../sonar-ui-common/helpers/pages', () => ({ +jest.mock('../../../../helpers/pages', () => ({ addSideBarClass: jest.fn(), addWhitePageClass: jest.fn(), removeSideBarClass: jest.fn(), diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CreateQualityGateForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CreateQualityGateForm-test.tsx index 8f60de3a03b..24ada5f49e5 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CreateQualityGateForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/CreateQualityGateForm-test.tsx @@ -21,10 +21,10 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { createQualityGate } from '../../../../api/quality-gates'; +import ConfirmModal from '../../../../components/controls/ConfirmModal'; import { mockRouter } from '../../../../helpers/testMocks'; +import { change, waitAndUpdate } from '../../../../helpers/testUtils'; import { getQualityGateUrl } from '../../../../helpers/urls'; -import ConfirmModal from '../../../../sonar-ui-common/components/controls/ConfirmModal'; -import { change, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; import { CreateQualityGateForm } from '../CreateQualityGateForm'; jest.mock('../../../../api/quality-gates', () => ({ diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Details-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Details-test.tsx index ed7be58bbb5..15b0284972f 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Details-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Details-test.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { fetchQualityGate } from '../../../../api/quality-gates'; import { mockQualityGate } from '../../../../helpers/mocks/quality-gates'; import { mockCondition } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { addCondition, deleteCondition, replaceCondition } from '../../utils'; import { Details } from '../Details'; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/DetailsHeader-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/DetailsHeader-test.tsx index 7612885c892..401c4bbdc0c 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/DetailsHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/DetailsHeader-test.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { setQualityGateAsDefault } from '../../../../api/quality-gates'; import { mockQualityGate } from '../../../../helpers/mocks/quality-gates'; import { mockCondition } from '../../../../helpers/testMocks'; -import { click, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../../helpers/testUtils'; import DetailsHeader from '../DetailsHeader'; jest.mock('../../../../api/quality-gates', () => ({ diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx index bbe7406cc8d..bbee13ab20c 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/Projects-test.tsx @@ -24,12 +24,10 @@ import { dissociateGateWithProject, searchProjects } from '../../../../api/quality-gates'; +import SelectList, { SelectListFilter } from '../../../../components/controls/SelectList'; import { mockQualityGate } from '../../../../helpers/mocks/quality-gates'; import { mockCondition } from '../../../../helpers/testMocks'; -import SelectList, { - SelectListFilter -} from '../../../../sonar-ui-common/components/controls/SelectList'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import Projects from '../Projects'; jest.mock('../../../../api/quality-gates', () => ({ diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-test.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-test.tsx index a02d0cf5135..ade8d250f5e 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { change } from '../../../../sonar-ui-common/helpers/testUtils'; +import { change } from '../../../../helpers/testUtils'; import ThresholdInput from '../ThresholdInput'; describe('on strings', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/routes.ts b/server/sonar-web/src/main/js/apps/quality-gates/routes.ts index 352daf06175..56e5aae7fa5 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/routes.ts +++ b/server/sonar-web/src/main/js/apps/quality-gates/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const App = lazyLoadComponent(() => import('./components/App')); 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 813e1382b91..146f820c9d3 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import getStore from '../../app/utils/getStore'; +import { getLocalizedMetricName } from '../../helpers/l10n'; import { isDiffMetric } from '../../helpers/measures'; -import { getLocalizedMetricName } from '../../sonar-ui-common/helpers/l10n'; import { getMetricByKey } from '../../store/rootReducer'; export function checkIfDefault(qualityGate: T.QualityGate, list: T.QualityGate[]): boolean { 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 113a61d92b0..4805da105c8 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 @@ -21,10 +21,10 @@ import * as isSameMinute from 'date-fns/is_same_minute'; import { sortBy } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; +import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; +import { parseDate } from '../../../helpers/dates'; +import { translate } from '../../../helpers/l10n'; import { getRulesUrl } from '../../../helpers/urls'; -import DateTimeFormatter from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { ProfileChangelogEvent } from '../types'; import ChangesList from './ChangesList'; 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 588014b1900..8960d47eba3 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 @@ -21,8 +21,8 @@ import * as React from 'react'; import { WithRouterProps } from 'react-router'; import { getProfileChangelog } from '../../../api/quality-profiles'; import { withRouter } from '../../../components/hoc/withRouter'; -import { parseDate, toShortNotSoISOString } from '../../../sonar-ui-common/helpers/dates'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { parseDate, toShortNotSoISOString } from '../../../helpers/dates'; +import { translate } from '../../../helpers/l10n'; import { Profile, ProfileChangelogEvent } from '../types'; import { getProfileChangelogPath } from '../utils'; import Changelog from './Changelog'; 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 4fe78fa6197..d76129405b5 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export default function ChangelogEmpty() { return <div className="big-spacer-top">{translate('no_results')}</div>; 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 c478fbf2949..1d1ccddb75d 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Button } from '../../../components/controls/buttons'; import DateRangeInput from '../../../components/controls/DateRangeInput'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { dateRange: { from?: Date; to?: Date } | undefined; 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 3b66dcbb47d..3f0aa4ab901 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translateWithParameters } from '../../../helpers/l10n'; interface Props { name: string; 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 2587989d965..af605f8a20d 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import SeverityHelper from '../../../components/shared/SeverityHelper'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { severity: string; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-test.tsx index 76b7a1f8b11..e6809256872 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getProfileChangelog } from '../../../../api/quality-profiles'; import { mockLocation, mockQualityProfile, mockRouter } from '../../../../helpers/testMocks'; -import { mockEvent, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { mockEvent, waitAndUpdate } from '../../../../helpers/testUtils'; import { ChangelogContainer } from '../ChangelogContainer'; beforeEach(() => jest.clearAllMocks()); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogSearch-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogSearch-test.tsx index 5a935c82d3b..bcde91892ec 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogSearch-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogSearch-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../../sonar-ui-common/helpers/dates'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { parseDate } from '../../../../helpers/dates'; +import { click } from '../../../../helpers/testUtils'; import ChangelogSearch from '../ChangelogSearch'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonEmpty.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonEmpty.tsx index 76dc039719d..eb19ec4eaf3 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonEmpty.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonEmpty.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export default function ComparisonEmpty() { return <div className="big-spacer-top">{translate('quality_profile.empty_comparison')}</div>; 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 143be6943ea..3d3c3ca64cf 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Select from '../../../components/controls/Select'; +import { translate } from '../../../helpers/l10n'; import { Profile } from '../types'; interface Props { 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 643e3cc4ac7..c74b3c05461 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 @@ -20,10 +20,10 @@ import * as React from 'react'; import { Profile } from '../../../api/quality-profiles'; import { getRuleDetails } from '../../../api/rules'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { lazyLoadComponent } from '../../../sonar-ui-common/components/lazyLoadComponent'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { lazyLoadComponent } from '../../../components/lazyLoadComponent'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; const ActivationFormModal = lazyLoadComponent( () => import('../../coding-rules/components/ActivationFormModal'), 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 606d04efc69..1b30f681105 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 @@ -20,11 +20,11 @@ import * as React from 'react'; import { Link } from 'react-router'; import { CompareResponse, Profile } from '../../../api/quality-profiles'; +import ChevronLeftIcon from '../../../components/icons/ChevronLeftIcon'; +import ChevronRightIcon from '../../../components/icons/ChevronRightIcon'; +import SeverityIcon from '../../../components/icons/SeverityIcon'; +import { translateWithParameters } from '../../../helpers/l10n'; import { getRulesUrl } from '../../../helpers/urls'; -import ChevronLeftIcon from '../../../sonar-ui-common/components/icons/ChevronLeftIcon'; -import ChevronRightIcon from '../../../sonar-ui-common/components/icons/ChevronRightIcon'; -import SeverityIcon from '../../../sonar-ui-common/components/icons/SeverityIcon'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import ComparisonEmpty from './ComparisonEmpty'; import ComparisonResultActivation from './ComparisonResultActivation'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResultActivation-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResultActivation-test.tsx index ef092ef8ab7..d31a5785429 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResultActivation-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResultActivation-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { Profile } from '../../../../api/quality-profiles'; -import { click, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../../helpers/testUtils'; import ComparisonResultActivation from '../ComparisonResultActivation'; jest.mock('../../../../api/rules', () => ({ diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx index 857f2f6be72..883481de687 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx @@ -21,7 +21,7 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { Actions, getExporters, searchQualityProfiles } from '../../../api/quality-profiles'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import '../styles.css'; import { Exporter, Profile } from '../types'; import { sortProfiles } from '../utils'; 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 01d15945b28..0654a37825a 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 @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate } from '../../../helpers/l10n'; interface Props { className?: string; 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 d8b699e8f60..aa5a1f29aa3 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 @@ -18,13 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import { Alert } from '../../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Profile } from '../types'; export interface DeleteProfileFormProps { 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 055b2f7d123..852fc5e1f9d 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 @@ -27,15 +27,15 @@ import { renameProfile, setDefaultProfile } from '../../../api/quality-profiles'; -import { Router, withRouter } from '../../../components/hoc/withRouter'; -import { getBaseUrl } from '../../../helpers/system'; -import { getRulesUrl } from '../../../helpers/urls'; import ActionsDropdown, { ActionsDropdownDivider, ActionsDropdownItem -} from '../../../sonar-ui-common/components/controls/ActionsDropdown'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +} from '../../../components/controls/ActionsDropdown'; +import Tooltip from '../../../components/controls/Tooltip'; +import { Router, withRouter } from '../../../components/hoc/withRouter'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/system'; +import { getRulesUrl } from '../../../helpers/urls'; import { Profile, ProfileActionModals } from '../types'; import { getProfileComparePath, getProfilePath, PROFILE_PATH } from '../utils'; import DeleteProfileForm from './DeleteProfileForm'; 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 6929c5a590f..ca4293b817a 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 @@ -18,14 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Profile } from '../types'; export interface ProfileModalFormProps { 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 524d8a99b30..4e1806e9ade 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { IndexLink } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { PROFILE_PATH } from '../utils'; export default function ProfileNotFound() { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileActions-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileActions-test.tsx index 67414faf3b1..f2bd85f6a2c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileActions-test.tsx @@ -28,7 +28,7 @@ import { setDefaultProfile } from '../../../../api/quality-profiles'; import { mockQualityProfile, mockRouter } from '../../../../helpers/testMocks'; -import { click, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../../helpers/testUtils'; import { ProfileActionModals } from '../../types'; import { PROFILE_PATH } from '../../utils'; import DeleteProfileForm from '../DeleteProfileForm'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileModalForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileModalForm-test.tsx index b2bf600e13c..23b668820f4 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileModalForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileModalForm-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockEvent, mockQualityProfile } from '../../../../helpers/testMocks'; -import { change } from '../../../../sonar-ui-common/helpers/testUtils'; +import { change } from '../../../../helpers/testUtils'; import ProfileModalForm, { ProfileModalFormProps } from '../ProfileModalForm'; it('should render correctly', () => { 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 e7567b1cab9..60ce4e975e7 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 @@ -20,15 +20,12 @@ import { sortBy } from 'lodash'; import * as React from 'react'; import { changeProfileParent } from '../../../api/quality-profiles'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import Select from '../../../components/controls/Select'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; import { Profile } from '../types'; interface Props { 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 23c048c91e8..f7bca990903 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 @@ -25,12 +25,12 @@ import { getProfileProjects, ProfileProject } from '../../../api/quality-profiles'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; +import Modal from '../../../components/controls/Modal'; import SelectList, { SelectListFilter, SelectListSearchParams -} from '../../../sonar-ui-common/components/controls/SelectList'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +} from '../../../components/controls/SelectList'; +import { translate } from '../../../helpers/l10n'; import { Profile } from '../types'; interface Props { 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 5634d4cd0d7..bf62758153f 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; import { Exporter, Profile } from '../types'; import ProfileExporters from './ProfileExporters'; import ProfileInheritance from './ProfileInheritance'; 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 64ad085420a..f1f1836eb69 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,8 @@ */ import * as React from 'react'; import { getQualityProfileExporterUrl } from '../../../api/quality-profiles'; +import { translate } from '../../../helpers/l10n'; import { getBaseUrl } from '../../../helpers/system'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { Exporter, Profile } from '../types'; interface Props { 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 1c040ae76d4..74f6deba021 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { IndexLink, Link } from 'react-router'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import { translate } from '../../../helpers/l10n'; import BuiltInQualityProfileBadge from '../components/BuiltInQualityProfileBadge'; import ProfileActions from '../components/ProfileActions'; import ProfileLink from '../components/ProfileLink'; 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 f8300362c6e..ad15bdf407e 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 @@ -20,8 +20,8 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { getProfileInheritance } from '../../../api/quality-profiles'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { translate } from '../../../helpers/l10n'; import { Profile } from '../types'; import ChangeParentForm from './ChangeParentForm'; import ProfileInheritanceBox from './ProfileInheritanceBox'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.tsx index db2a854428b..341904871ae 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.tsx @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import BuiltInQualityProfileBadge from '../components/BuiltInQualityProfileBadge'; import ProfileLink from '../components/ProfileLink'; 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 2b4fc8fdb27..b3f42f3adfc 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 @@ -24,8 +24,8 @@ import { searchUsers, SearchUsersGroupsParameters } from '../../../api/quality-profiles'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { translate } from '../../../helpers/l10n'; import { Profile } from '../types'; import ProfilePermissionsForm from './ProfilePermissionsForm'; import ProfilePermissionsGroup from './ProfilePermissionsGroup'; 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 8e027b9d42a..216aadd8f06 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 @@ -25,12 +25,9 @@ import { searchUsers, SearchUsersGroupsParameters } from '../../../api/quality-profiles'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import { translate } from '../../../helpers/l10n'; import { Group } from './ProfilePermissions'; import ProfilePermissionsFormSelect from './ProfilePermissionsFormSelect'; 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 ae90e02f2c1..cdacf1c9431 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 @@ -19,10 +19,10 @@ */ import { debounce, identity } from 'lodash'; import * as React from 'react'; +import Select from '../../../components/controls/Select'; +import GroupIcon from '../../../components/icons/GroupIcon'; import Avatar from '../../../components/ui/Avatar'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import GroupIcon from '../../../sonar-ui-common/components/icons/GroupIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Group } from './ProfilePermissions'; type Option = T.UserSelected | Group; 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 4d767a4f78c..f4757e3e533 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 @@ -20,16 +20,10 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { removeGroup } from '../../../api/quality-profiles'; -import { - Button, - DeleteButton, - ResetButtonLink -} from '../../../sonar-ui-common/components/controls/buttons'; -import SimpleModal, { - ChildrenProps -} from '../../../sonar-ui-common/components/controls/SimpleModal'; -import GroupIcon from '../../../sonar-ui-common/components/icons/GroupIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button, DeleteButton, ResetButtonLink } from '../../../components/controls/buttons'; +import SimpleModal, { ChildrenProps } from '../../../components/controls/SimpleModal'; +import GroupIcon from '../../../components/icons/GroupIcon'; +import { translate } from '../../../helpers/l10n'; import { Group } from './ProfilePermissions'; interface Props { 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 7df85415ab7..2021ced88dd 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 @@ -20,16 +20,10 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { removeUser } from '../../../api/quality-profiles'; +import { DeleteButton, ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import SimpleModal, { ChildrenProps } from '../../../components/controls/SimpleModal'; import Avatar from '../../../components/ui/Avatar'; -import { - DeleteButton, - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import SimpleModal, { - ChildrenProps -} from '../../../sonar-ui-common/components/controls/SimpleModal'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { onDelete: (user: T.UserSelected) => void; 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 da2f88e1bf5..00994dcf255 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 @@ -20,12 +20,12 @@ import * as React from 'react'; import { Link } from 'react-router'; import { getProfileProjects } from '../../../api/quality-profiles'; +import { Button } from '../../../components/controls/buttons'; +import ListFooter from '../../../components/controls/ListFooter'; +import Tooltip from '../../../components/controls/Tooltip'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import { translate } from '../../../helpers/l10n'; import { getProjectUrl } from '../../../helpers/urls'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { Profile } from '../types'; import ChangeProjectsForm from './ChangeProjectsForm'; 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 4c34a906c39..c1be69c17e7 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 @@ -22,10 +22,10 @@ import * as React from 'react'; import { Link } from 'react-router'; import { getQualityProfile } from '../../../api/quality-profiles'; import { searchRules, takeFacet } from '../../../api/rules'; +import { Button } from '../../../components/controls/buttons'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate } from '../../../helpers/l10n'; import { getRulesUrl } from '../../../helpers/urls'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { Profile } from '../types'; import ProfileRulesDeprecatedWarning from './ProfileRulesDeprecatedWarning'; import ProfileRulesRowOfType from './ProfileRulesRowOfType'; 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 ca7d7c2d674..8c43c6175fb 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { translate } from '../../../helpers/l10n'; import { getDeprecatedActiveRulesUrl } from '../../../helpers/urls'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; interface Props { activeDeprecatedRules: number; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowOfType.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowOfType.tsx index 6f4647eccf8..293b9bcecad 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowOfType.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowOfType.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { getRulesUrl } from '../../../helpers/urls'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; interface Props { count: number | null; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowTotal.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowTotal.tsx index 058342fb563..df2b2f7fb4b 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowTotal.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowTotal.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import { translate } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { getRulesUrl } from '../../../helpers/urls'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; interface Props { count: number | null; 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 f64f265ec1b..b3447638e15 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { translate } from '../../../helpers/l10n'; import { getRulesUrl } from '../../../helpers/urls'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; interface Props { language: string; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeParentForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeParentForm-test.tsx index 5f082599f45..ec344372f43 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeParentForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeParentForm-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockQualityProfile } from '../../../../helpers/testMocks'; -import { mockEvent, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { mockEvent, waitAndUpdate } from '../../../../helpers/testUtils'; import ChangeParentForm from '../ChangeParentForm'; beforeEach(() => jest.clearAllMocks()); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeProjectsForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeProjectsForm-test.tsx index 479ef91f3c7..b8fb0a70084 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeProjectsForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ChangeProjectsForm-test.tsx @@ -24,10 +24,8 @@ import { dissociateProject, getProfileProjects } from '../../../../api/quality-profiles'; -import SelectList, { - SelectListFilter -} from '../../../../sonar-ui-common/components/controls/SelectList'; -import { click, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import SelectList, { SelectListFilter } from '../../../../components/controls/SelectList'; +import { click, waitAndUpdate } from '../../../../helpers/testUtils'; import ChangeProjectsForm from '../ChangeProjectsForm'; const profile: any = { key: 'profFile_key' }; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileInheritance-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileInheritance-test.tsx index 003bd0a94cd..f3857c86603 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileInheritance-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileInheritance-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockQualityProfile, mockQualityProfileInheritance } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import ProfileInheritance from '../ProfileInheritance'; beforeEach(() => jest.clearAllMocks()); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissions-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissions-test.tsx index 9ca5c5169a7..09062304cfb 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissions-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissions-test.tsx @@ -20,7 +20,7 @@ import { mount, shallow } from 'enzyme'; import * as React from 'react'; import { searchGroups, searchUsers } from '../../../../api/quality-profiles'; -import { click, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../../helpers/testUtils'; import ProfilePermissions from '../ProfilePermissions'; jest.mock('../../../../api/quality-profiles', () => ({ diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsForm-test.tsx index e92e57f36b5..42d21ab29a2 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsForm-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { addGroup, addUser, searchGroups, searchUsers } from '../../../../api/quality-profiles'; import { mockGroup, mockUser } from '../../../../helpers/testMocks'; -import { submit, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { submit, waitAndUpdate } from '../../../../helpers/testUtils'; import ProfilePermissionsForm from '../ProfilePermissionsForm'; import ProfilePermissionsFormSelect from '../ProfilePermissionsFormSelect'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsGroup-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsGroup-test.tsx index 7e04f85cff9..afa65a31bb1 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsGroup-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsGroup-test.tsx @@ -24,7 +24,7 @@ jest.mock('../../../../api/quality-profiles', () => ({ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import ProfilePermissionsGroup from '../ProfilePermissionsGroup'; const removeGroup = require('../../../../api/quality-profiles').removeGroup as jest.Mock<any>; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsUser-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsUser-test.tsx index 60356c89550..7ba649fe3c3 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsUser-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfilePermissionsUser-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { removeUser } from '../../../../api/quality-profiles'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import ProfilePermissionsUser from '../ProfilePermissionsUser'; jest.mock('../../../../api/quality-profiles', () => ({ diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileProjects-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileProjects-test.tsx index 774f7137a84..689a9d82c06 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileProjects-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileProjects-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockQualityProfile } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import ChangeProjectsForm from '../ChangeProjectsForm'; import ProfileProjects from '../ProfileProjects'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRules-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRules-test.tsx index 6893b3e2934..8357260a882 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRules-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/ProfileRules-test.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import * as apiQP from '../../../../api/quality-profiles'; import * as apiRules from '../../../../api/rules'; import { mockQualityProfile } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import ProfileRules from '../ProfileRules'; const PROFILE = mockQualityProfile({ 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 f14dedc7194..4119a215923 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 @@ -24,17 +24,14 @@ import { createQualityProfile, getImporters } from '../../../api/quality-profiles'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import Select from '../../../components/controls/Select'; import { Location } from '../../../components/hoc/withRouter'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { parseAsOptionalString } from '../../../sonar-ui-common/helpers/query'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; +import { parseAsOptionalString } from '../../../helpers/query'; import { Profile } from '../types'; interface Props { 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 6e1aaed6a78..82379493c02 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 @@ -20,8 +20,8 @@ import { sortBy } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getDeprecatedActiveRulesUrl } from '../../../helpers/urls'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import ProfileLink from '../components/ProfileLink'; 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 acc5a25353e..e22e81e2460 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 @@ -21,10 +21,10 @@ import { sortBy } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; import { searchRules } from '../../../api/rules'; +import { toShortNotSoISOString } from '../../../helpers/dates'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { getRulesUrl } from '../../../helpers/urls'; -import { toShortNotSoISOString } from '../../../sonar-ui-common/helpers/dates'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; const RULES_LIMIT = 10; 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 c0134055e85..205e024441d 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import DateFormatter from '../../../sonar-ui-common/components/intl/DateFormatter'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import DateFormatter from '../../../components/intl/DateFormatter'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import ProfileLink from '../components/ProfileLink'; import { Profile } from '../types'; import { isStagnant } 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 7cc7c92c70b..618fa3b9f54 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 @@ -20,10 +20,10 @@ import * as React from 'react'; import { Link } from 'react-router'; import { Actions } from '../../../api/quality-profiles'; +import { Button } from '../../../components/controls/buttons'; import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; import { Profile } from '../types'; import { getProfilePath } from '../utils'; import CreateProfileForm from './CreateProfileForm'; 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 f97318cd496..c1256df0850 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 @@ -20,9 +20,9 @@ import { Location } from 'history'; import { groupBy, pick, sortBy } from 'lodash'; import * as React from 'react'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import { Alert } from '../../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Profile } from '../types'; import ProfilesListHeader from './ProfilesListHeader'; import ProfilesListRow from './ProfilesListRow'; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.tsx index 121985ee261..148113653aa 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import Select from '../../../components/controls/Select'; import { Router, withRouter } from '../../../components/hoc/withRouter'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { getProfilesForLanguagePath, PROFILE_PATH } from '../utils'; interface Props { 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 33540dc7155..467d4a324ea 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 @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import Tooltip from '../../../components/controls/Tooltip'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import { translate } from '../../../helpers/l10n'; import { getRulesUrl } from '../../../helpers/urls'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import BuiltInQualityProfileBadge from '../components/BuiltInQualityProfileBadge'; import ProfileActions from '../components/ProfileActions'; import ProfileLink from '../components/ProfileLink'; 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 aa7bbdf254e..ac0991da915 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 @@ -19,15 +19,12 @@ */ import * as React from 'react'; import { restoreQualityProfile } from '../../../api/quality-profiles'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import { Alert } from '../../../components/ui/Alert'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; interface Props { onClose: () => void; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/CreateProfileForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/CreateProfileForm-test.tsx index f6019e79a32..1c5253c724f 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/CreateProfileForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/CreateProfileForm-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { changeProfileParent, createQualityProfile } from '../../../../api/quality-profiles'; import { mockLocation, mockQualityProfile } from '../../../../helpers/testMocks'; -import { mockEvent, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { mockEvent, waitAndUpdate } from '../../../../helpers/testUtils'; import CreateProfileForm from '../CreateProfileForm'; beforeEach(() => jest.clearAllMocks()); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/PageHeader-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/PageHeader-test.tsx index 38f058bb4dd..de6cac215f0 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/PageHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/PageHeader-test.tsx @@ -25,7 +25,7 @@ import { mockQualityProfile, mockRouter } from '../../../../helpers/testMocks'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import { PageHeader } from '../PageHeader'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/routes.ts b/server/sonar-web/src/main/js/apps/quality-profiles/routes.ts index 4e4a92076ba..6d6690c3fe4 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/routes.ts +++ b/server/sonar-web/src/main/js/apps/quality-profiles/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 febe5f6fcc9..cc8ddea8634 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 @@ -20,7 +20,7 @@ import * as differenceInYears from 'date-fns/difference_in_years'; import { sortBy } from 'lodash'; import { Profile as BaseProfile } from '../../api/quality-profiles'; -import { isValidDate, parseDate } from '../../sonar-ui-common/helpers/dates'; +import { isValidDate, parseDate } from '../../helpers/dates'; import { Profile } from './types'; export function sortProfiles(profiles: BaseProfile[]): Profile[] { 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 7306e8ed2ed..178e7d6fd79 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 @@ -22,10 +22,10 @@ import { Helmet } from 'react-helmet-async'; import A11ySkipTarget from '../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; import ScreenPositionHelper from '../../components/common/ScreenPositionHelper'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; import { isBranch } from '../../helpers/branch-like'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { scrollToElement } from '../../sonar-ui-common/helpers/scrolling'; +import { translate } from '../../helpers/l10n'; +import { scrollToElement } from '../../helpers/scrolling'; import { BranchLike } from '../../types/branch-like'; import { SecurityStandard, Standards } from '../../types/security'; import { HotspotFilters, HotspotStatusFilter, RawHotspot } from '../../types/security-hotspots'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsApp-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsApp-test.tsx index fa5c0781c05..c712a77dac2 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsApp-test.tsx @@ -31,7 +31,7 @@ import { mockLoggedInUser, mockRouter } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { SecurityStandard } from '../../../types/security'; import { HotspotResolution, diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsAppRenderer-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsAppRenderer-test.tsx index 1816ab12c25..a716fc2a28f 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsAppRenderer-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsAppRenderer-test.tsx @@ -21,8 +21,8 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; import { mockRawHotspot, mockStandards } from '../../../helpers/mocks/security-hotspots'; +import { scrollToElement } from '../../../helpers/scrolling'; import { mockComponent } from '../../../helpers/testMocks'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; import { SecurityStandard } from '../../../types/security'; import { HotspotStatusFilter } from '../../../types/security-hotspots'; import FilterBar from '../components/FilterBar'; @@ -30,7 +30,7 @@ import SecurityHotspotsAppRenderer, { SecurityHotspotsAppRendererProps } from '../SecurityHotspotsAppRenderer'; -jest.mock('../../../sonar-ui-common/helpers/scrolling', () => ({ +jest.mock('../../../helpers/scrolling', () => ({ scrollToElement: jest.fn() })); 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 d4bcab1274c..ab115bb0128 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; export interface EmptyHotspotsPageProps { filtered: boolean; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx index 8410c6c3b0b..30efa3ebf28 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/FilterBar.tsx @@ -18,15 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import RadioToggle from '../../../components/controls/RadioToggle'; +import Select from '../../../components/controls/Select'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; import Measure from '../../../components/measure/Measure'; import CoverageRating from '../../../components/ui/CoverageRating'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import { isLoggedIn } from '../../../helpers/users'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import RadioToggle from '../../../sonar-ui-common/components/controls/RadioToggle'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { ComponentQualifier } from '../../../types/component'; import { HotspotFilters, HotspotStatusFilter } from '../../../types/security-hotspots'; 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 60f808c0eea..2d08d7d9a04 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 @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import ChevronDownIcon from '../../../sonar-ui-common/components/icons/ChevronDownIcon'; -import ChevronUpIcon from '../../../sonar-ui-common/components/icons/ChevronUpIcon'; +import ChevronDownIcon from '../../../components/icons/ChevronDownIcon'; +import ChevronUpIcon from '../../../components/icons/ChevronUpIcon'; import { RawHotspot } from '../../../types/security-hotspots'; import HotspotListItem from './HotspotListItem'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentPopup.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentPopup.tsx index fabe06e89b7..f4d9090dce9 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentPopup.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentPopup.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import FormattingTips from '../../../components/common/FormattingTips'; -import { Button, ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button, ResetButtonLink } from '../../../components/controls/buttons'; +import { translate } from '../../../helpers/l10n'; export interface HotspotCommentPopupProps { markdownComment: string; 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 506c8ca5169..f4631ea1018 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 @@ -20,10 +20,10 @@ import * as classNames from 'classnames'; import { groupBy } from 'lodash'; import * as React from 'react'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import SecurityHotspotIcon from '../../../sonar-ui-common/components/icons/SecurityHotspotIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { addSideBarClass, removeSideBarClass } from '../../../sonar-ui-common/helpers/pages'; +import ListFooter from '../../../components/controls/ListFooter'; +import SecurityHotspotIcon from '../../../components/icons/SecurityHotspotIcon'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { addSideBarClass, removeSideBarClass } from '../../../helpers/pages'; import { HotspotStatusFilter, RawHotspot, RiskExposure } from '../../../types/security-hotspots'; import { groupByCategory, RISK_EXPOSURE_LEVELS } from '../utils'; import HotspotCategory from './HotspotCategory'; 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 26ecd5738a2..1ca23f4a7f2 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 @@ -19,7 +19,7 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { RawHotspot } from '../../../types/security-hotspots'; import { getStatusOptionFromStatusAndResolution } from '../utils'; 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 782640cd6a3..75d0fdd8e79 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 @@ -20,12 +20,12 @@ import * as React from 'react'; import addGlobalErrorMessage from '../../../app/utils/addGlobalErrorMessage'; import addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage'; +import { Button } from '../../../components/controls/buttons'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import Toggler from '../../../components/controls/Toggler'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import { openHotspot, probeSonarLintServers } from '../../../helpers/sonarlint'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { Ide } from '../../../types/sonarlint'; import { HotspotOpenInIdeOverlay } from './HotspotOpenInIdeOverlay'; 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 0490f09f3ec..fd320921e0f 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,19 +19,15 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; +import { Button, DeleteButton, EditButton } from '../../../components/controls/buttons'; +import Dropdown, { DropdownOverlay } from '../../../components/controls/Dropdown'; +import Toggler from '../../../components/controls/Toggler'; +import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import IssueChangelogDiff from '../../../components/issue/components/IssueChangelogDiff'; import Avatar from '../../../components/ui/Avatar'; +import { PopupPlacement } from '../../../components/ui/popups'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { sanitizeString } from '../../../helpers/sanitize'; -import { - Button, - DeleteButton, - EditButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Dropdown, { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import DateTimeFormatter from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import { Hotspot, ReviewHistoryType } from '../../../types/security-hotspots'; import { getHotspotReviewHistory } from '../utils'; import HotspotCommentPopup from './HotspotCommentPopup'; 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 baadf35f33b..42d9a2fbc92 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 @@ -25,9 +25,9 @@ import { editSecurityHotspotComment } from '../../../api/security-hotspots'; import FormattingTips from '../../../components/common/FormattingTips'; +import { Button, ResetButtonLink } from '../../../components/controls/buttons'; +import { translate } from '../../../helpers/l10n'; import { isLoggedIn } from '../../../helpers/users'; -import { Button, ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { Hotspot } from '../../../types/security-hotspots'; import HotspotReviewHistory from './HotspotReviewHistory'; 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 3722efddca1..67398f7d7d4 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 @@ -18,13 +18,13 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import SecurityHotspotIcon from '../../../sonar-ui-common/components/icons/SecurityHotspotIcon'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { addSideBarClass, removeSideBarClass } from '../../../sonar-ui-common/helpers/pages'; -import { fileFromPath } from '../../../sonar-ui-common/helpers/path'; +import ListFooter from '../../../components/controls/ListFooter'; +import Tooltip from '../../../components/controls/Tooltip'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import SecurityHotspotIcon from '../../../components/icons/SecurityHotspotIcon'; +import { translateWithParameters } from '../../../helpers/l10n'; +import { addSideBarClass, removeSideBarClass } from '../../../helpers/pages'; +import { fileFromPath } from '../../../helpers/path'; import { ComponentQualifier } from '../../../types/component'; import { SecurityStandard, Standards } from '../../../types/security'; import { RawHotspot } from '../../../types/security-hotspots'; 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 775d850f2b9..975abfb7dbf 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 @@ -20,8 +20,8 @@ import * as React from 'react'; import { SourceViewerContext } from '../../../components/SourceViewer/SourceViewerContext'; import SourceViewerHeaderSlim from '../../../components/SourceViewer/SourceViewerHeaderSlim'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; import { Hotspot } from '../../../types/security-hotspots'; import SnippetViewer from '../../issues/crossComponentSourceViewer/SnippetViewer'; 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 5073832a407..a5063559257 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { getSecurityHotspotDetails } from '../../../api/security-hotspots'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; +import { scrollToElement } from '../../../helpers/scrolling'; import { BranchLike } from '../../../types/branch-like'; import { Hotspot } from '../../../types/security-hotspots'; import HotspotViewerRenderer from './HotspotViewerRenderer'; 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 646a5d214c4..3f9f57d225d 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 @@ -20,16 +20,19 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { Link } from 'react-router'; +import { Button } from '../../../components/controls/buttons'; +import { ClipboardButton } from '../../../components/controls/clipboard'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; +import LinkIcon from '../../../components/icons/LinkIcon'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { fillBranchLike, getBranchLikeQuery } from '../../../helpers/branch-like'; -import { getComponentSecurityHotspotsUrl, getRuleUrl } from '../../../helpers/urls'; +import { translate } from '../../../helpers/l10n'; +import { + getComponentSecurityHotspotsUrl, + getPathUrlAsString, + getRuleUrl +} from '../../../helpers/urls'; import { isLoggedIn } from '../../../helpers/users'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { ClipboardButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import LinkIcon from '../../../sonar-ui-common/components/icons/LinkIcon'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getPathUrlAsString } from '../../../sonar-ui-common/helpers/urls'; import { BranchLike } from '../../../types/branch-like'; import { Hotspot } from '../../../types/security-hotspots'; import Assignee from './assignee/Assignee'; 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 e7dae95f184..bddd55b52a2 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 @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import BoxedTabs from '../../../components/controls/BoxedTabs'; +import Tab from '../../../components/controls/Tabs'; +import { translate } from '../../../helpers/l10n'; import { sanitizeString } from '../../../helpers/sanitize'; -import BoxedTabs from '../../../sonar-ui-common/components/controls/BoxedTabs'; -import Tab from '../../../sonar-ui-common/components/controls/Tabs'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { Hotspot } from '../../../types/security-hotspots'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/FilterBar-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/FilterBar-test.tsx index 56cd321cde9..875dacc04ba 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/FilterBar-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/FilterBar-test.tsx @@ -19,9 +19,9 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import RadioToggle from '../../../../components/controls/RadioToggle'; +import Select from '../../../../components/controls/Select'; import { mockComponent, mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks'; -import RadioToggle from '../../../../sonar-ui-common/components/controls/RadioToggle'; -import Select from '../../../../sonar-ui-common/components/controls/Select'; import { ComponentQualifier } from '../../../../types/component'; import { HotspotStatusFilter } from '../../../../types/security-hotspots'; import { AssigneeFilterOption, FilterBar, FilterBarProps } from '../FilterBar'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotCommentPopup-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotCommentPopup-test.tsx index 2efb0d0c276..dc211741686 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotCommentPopup-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotCommentPopup-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { Button, ResetButtonLink } from '../../../../sonar-ui-common/components/controls/buttons'; +import { Button, ResetButtonLink } from '../../../../components/controls/buttons'; import HotspotCommentPopup, { HotspotCommentPopupProps } from '../HotspotCommentPopup'; it('should render correclty', () => { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotList-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotList-test.tsx index 476c2378b6a..474452648c8 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotList-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotList-test.tsx @@ -20,12 +20,12 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockRawHotspot } from '../../../../helpers/mocks/security-hotspots'; -import { addSideBarClass, removeSideBarClass } from '../../../../sonar-ui-common/helpers/pages'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { addSideBarClass, removeSideBarClass } from '../../../../helpers/pages'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { HotspotStatusFilter, RiskExposure } from '../../../../types/security-hotspots'; import HotspotList from '../HotspotList'; -jest.mock('../../../../sonar-ui-common/helpers/pages', () => ({ +jest.mock('../../../../helpers/pages', () => ({ addSideBarClass: jest.fn(), removeSideBarClass: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotOpenInIdeButton-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotOpenInIdeButton-test.tsx index ae15ee009a4..6fcc9f3d0bd 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotOpenInIdeButton-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotOpenInIdeButton-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { Button } from '../../../../components/controls/buttons'; import * as sonarlint from '../../../../helpers/sonarlint'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; import HotspotOpenInIdeButton from '../HotspotOpenInIdeButton'; jest.mock('../../../../helpers/sonarlint'); diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotReviewHistoryAndComments-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotReviewHistoryAndComments-test.tsx index 5bc5a600124..27f02fac853 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotReviewHistoryAndComments-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotReviewHistoryAndComments-test.tsx @@ -26,8 +26,8 @@ import { } from '../../../../api/security-hotspots'; import { mockHotspot } from '../../../../helpers/mocks/security-hotspots'; import { mockCurrentUser } from '../../../../helpers/testMocks'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { isLoggedIn } from '../../../../helpers/users'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; import HotspotReviewHistory from '../HotspotReviewHistory'; import HotspotReviewHistoryAndComments from '../HotspotReviewHistoryAndComments'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotSimpleList-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotSimpleList-test.tsx index 4244bdf9442..a980b47346a 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotSimpleList-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotSimpleList-test.tsx @@ -20,12 +20,12 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockRawHotspot } from '../../../../helpers/mocks/security-hotspots'; -import { addSideBarClass, removeSideBarClass } from '../../../../sonar-ui-common/helpers/pages'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { addSideBarClass, removeSideBarClass } from '../../../../helpers/pages'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { SecurityStandard } from '../../../../types/security'; import HotspotSimpleList, { HotspotSimpleListProps } from '../HotspotSimpleList'; -jest.mock('../../../../sonar-ui-common/helpers/pages', () => ({ +jest.mock('../../../../helpers/pages', () => ({ addSideBarClass: jest.fn(), removeSideBarClass: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotSnippetContainer-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotSnippetContainer-test.tsx index 645436ef0f2..b2eb7cae32b 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotSnippetContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotSnippetContainer-test.tsx @@ -24,7 +24,7 @@ import { getSources } from '../../../../api/components'; import { mockBranch } from '../../../../helpers/mocks/branch-like'; import { mockHotspot, mockHotspotComponent } from '../../../../helpers/mocks/security-hotspots'; import { mockComponent, mockSourceLine } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { ComponentQualifier } from '../../../../types/component'; import HotspotSnippetContainer from '../HotspotSnippetContainer'; import HotspotSnippetContainerRenderer from '../HotspotSnippetContainerRenderer'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotViewer-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotViewer-test.tsx index a7289309a07..f129626f4ee 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotViewer-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotViewer-test.tsx @@ -21,9 +21,9 @@ import { shallow } from 'enzyme'; import { clone } from 'lodash'; import * as React from 'react'; import { getSecurityHotspotDetails } from '../../../../api/security-hotspots'; +import { scrollToElement } from '../../../../helpers/scrolling'; import { mockComponent } from '../../../../helpers/testMocks'; -import { scrollToElement } from '../../../../sonar-ui-common/helpers/scrolling'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import HotspotViewer from '../HotspotViewer'; import HotspotViewerRenderer from '../HotspotViewerRenderer'; @@ -33,7 +33,7 @@ jest.mock('../../../../api/security-hotspots', () => ({ getSecurityHotspotDetails: jest.fn().mockResolvedValue({ id: `I am a detailled hotspot` }) })); -jest.mock('../../../../sonar-ui-common/helpers/scrolling', () => ({ +jest.mock('../../../../helpers/scrolling', () => ({ scrollToElement: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotViewerTabs-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotViewerTabs-test.tsx index 1fc6854b804..e12d0f2741c 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotViewerTabs-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/HotspotViewerTabs-test.tsx @@ -19,9 +19,9 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import BoxedTabs from '../../../../components/controls/BoxedTabs'; import { mockHotspot, mockHotspotRule } from '../../../../helpers/mocks/security-hotspots'; import { mockUser } from '../../../../helpers/testMocks'; -import BoxedTabs from '../../../../sonar-ui-common/components/controls/BoxedTabs'; import HotspotViewerTabs, { TabKeys } from '../HotspotViewerTabs'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/Assignee.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/Assignee.tsx index ba12ef0c8e2..dbc6c822822 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/Assignee.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/Assignee.tsx @@ -21,8 +21,8 @@ import * as React from 'react'; import { assignSecurityHotspot } from '../../../../api/security-hotspots'; import addGlobalSuccessMessage from '../../../../app/utils/addGlobalSuccessMessage'; import { withCurrentUser } from '../../../../components/hoc/withCurrentUser'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { isLoggedIn } from '../../../../helpers/users'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; import { Hotspot, HotspotStatus } from '../../../../types/security-hotspots'; import AssigneeRenderer from './AssigneeRenderer'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeRenderer.tsx index 33c0ac53018..78235489ac5 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeRenderer.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { EditButton } from '../../../../sonar-ui-common/components/controls/buttons'; -import EscKeydownHandler from '../../../../sonar-ui-common/components/controls/EscKeydownHandler'; -import OutsideClickHandler from '../../../../sonar-ui-common/components/controls/OutsideClickHandler'; -import DeferredSpinner from '../../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; +import { EditButton } from '../../../../components/controls/buttons'; +import EscKeydownHandler from '../../../../components/controls/EscKeydownHandler'; +import OutsideClickHandler from '../../../../components/controls/OutsideClickHandler'; +import DeferredSpinner from '../../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; import AssigneeSelection from './AssigneeSelection'; export interface AssigneeRendererProps { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeSelection.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeSelection.tsx index a4c7a4cb0c3..5a2d364fcb6 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeSelection.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeSelection.tsx @@ -20,9 +20,9 @@ import { debounce } from 'lodash'; import * as React from 'react'; import { searchUsers } from '../../../../api/users'; +import { KeyCodes } from '../../../../helpers/keycodes'; +import { translate } from '../../../../helpers/l10n'; import { isUserActive } from '../../../../helpers/users'; -import { KeyCodes } from '../../../../sonar-ui-common/helpers/keycodes'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; import AssigneeSelectionRenderer from './AssigneeSelectionRenderer'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeSelectionRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeSelectionRenderer.tsx index afe33d95a99..51f06bf170a 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeSelectionRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeSelectionRenderer.tsx @@ -19,12 +19,12 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; +import { DropdownOverlay } from '../../../../components/controls/Dropdown'; +import SearchBox from '../../../../components/controls/SearchBox'; import Avatar from '../../../../components/ui/Avatar'; -import { DropdownOverlay } from '../../../../sonar-ui-common/components/controls/Dropdown'; -import SearchBox from '../../../../sonar-ui-common/components/controls/SearchBox'; -import DeferredSpinner from '../../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { PopupPlacement } from '../../../../sonar-ui-common/components/ui/popups'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import DeferredSpinner from '../../../../components/ui/DeferredSpinner'; +import { PopupPlacement } from '../../../../components/ui/popups'; +import { translate } from '../../../../helpers/l10n'; import './AssigneeSelection.css'; export interface HotspotAssigneeSelectRendererProps { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/Assignee-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/Assignee-test.tsx index 94be36bda05..1228c2457c3 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/Assignee-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/Assignee-test.tsx @@ -23,7 +23,7 @@ import { assignSecurityHotspot } from '../../../../../api/security-hotspots'; import addGlobalSuccessMessage from '../../../../../app/utils/addGlobalSuccessMessage'; import { mockHotspot } from '../../../../../helpers/mocks/security-hotspots'; import { mockCurrentUser, mockUser } from '../../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import { HotspotStatus } from '../../../../../types/security-hotspots'; import { Assignee } from '../Assignee'; import AssigneeRenderer from '../AssigneeRenderer'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/AssigneeRenderer-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/AssigneeRenderer-test.tsx index 41cb5036403..7d5e5140cc6 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/AssigneeRenderer-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/AssigneeRenderer-test.tsx @@ -19,10 +19,10 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { EditButton } from '../../../../../components/controls/buttons'; +import OutsideClickHandler from '../../../../../components/controls/OutsideClickHandler'; import { mockLoggedInUser, mockUser } from '../../../../../helpers/testMocks'; -import { EditButton } from '../../../../../sonar-ui-common/components/controls/buttons'; -import OutsideClickHandler from '../../../../../sonar-ui-common/components/controls/OutsideClickHandler'; -import { click } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../../helpers/testUtils'; import AssigneeRenderer, { AssigneeRendererProps } from '../AssigneeRenderer'; import AssigneeSelection from '../AssigneeSelection'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/AssigneeSelection-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/AssigneeSelection-test.tsx index 69e882dc30a..7820149048a 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/AssigneeSelection-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/AssigneeSelection-test.tsx @@ -20,9 +20,9 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { searchUsers } from '../../../../../api/users'; +import { KeyCodes } from '../../../../../helpers/keycodes'; import { mockLoggedInUser, mockUser } from '../../../../../helpers/testMocks'; -import { KeyCodes } from '../../../../../sonar-ui-common/helpers/keycodes'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import AssigneeSelection from '../AssigneeSelection'; jest.mock('../../../../../api/users', () => ({ 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 e8e75a5b63e..b8538b9743b 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 @@ -19,15 +19,15 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; +import { Button } from '../../../../components/controls/buttons'; +import { DropdownOverlay } from '../../../../components/controls/Dropdown'; +import Toggler from '../../../../components/controls/Toggler'; +import Tooltip from '../../../../components/controls/Tooltip'; import { withCurrentUser } from '../../../../components/hoc/withCurrentUser'; +import DropdownIcon from '../../../../components/icons/DropdownIcon'; +import { PopupPlacement } from '../../../../components/ui/popups'; +import { translate } from '../../../../helpers/l10n'; import { isLoggedIn } from '../../../../helpers/users'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; -import { DropdownOverlay } from '../../../../sonar-ui-common/components/controls/Dropdown'; -import Toggler from '../../../../sonar-ui-common/components/controls/Toggler'; -import Tooltip from '../../../../sonar-ui-common/components/controls/Tooltip'; -import DropdownIcon from '../../../../sonar-ui-common/components/icons/DropdownIcon'; -import { PopupPlacement } from '../../../../sonar-ui-common/components/ui/popups'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; import { Hotspot } 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 cb2b3853689..41efb24b023 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { HotspotStatusOption } from '../../../../types/security-hotspots'; export interface StatusDescriptionProps { 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 c09078c2644..8cc96c275ec 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 @@ -20,7 +20,7 @@ import * as React from 'react'; import { setSecurityHotspotStatus } from '../../../../api/security-hotspots'; import addGlobalSuccessMessage from '../../../../app/utils/addGlobalSuccessMessage'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { Hotspot, HotspotStatusOption } from '../../../../types/security-hotspots'; import { getStatusAndResolutionFromStatusOption, 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 42a1254a477..343b03fed0a 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import FormattingTips from '../../../../components/common/FormattingTips'; -import { SubmitButton } from '../../../../sonar-ui-common/components/controls/buttons'; -import Radio from '../../../../sonar-ui-common/components/controls/Radio'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { SubmitButton } from '../../../../components/controls/buttons'; +import Radio from '../../../../components/controls/Radio'; +import { translate } from '../../../../helpers/l10n'; import { HotspotStatusOption } from '../../../../types/security-hotspots'; import StatusDescription from './StatusDescription'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/Status-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/Status-test.tsx index fe8d5d1577d..ca9c3730456 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/Status-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/Status-test.tsx @@ -19,11 +19,11 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { DropdownOverlay } from '../../../../../components/controls/Dropdown'; +import Toggler from '../../../../../components/controls/Toggler'; import { mockHotspot } from '../../../../../helpers/mocks/security-hotspots'; import { mockCurrentUser } from '../../../../../helpers/testMocks'; -import { DropdownOverlay } from '../../../../../sonar-ui-common/components/controls/Dropdown'; -import Toggler from '../../../../../sonar-ui-common/components/controls/Toggler'; -import { click } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../../helpers/testUtils'; import { HotspotStatusOption } from '../../../../../types/security-hotspots'; import { Status, StatusProps } from '../Status'; import StatusSelection from '../StatusSelection'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/StatusSelection-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/StatusSelection-test.tsx index 42563dd9e2a..7d45379108a 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/StatusSelection-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/StatusSelection-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { setSecurityHotspotStatus } from '../../../../../api/security-hotspots'; import { mockHotspot } from '../../../../../helpers/mocks/security-hotspots'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import { HotspotStatus, HotspotStatusOption } from '../../../../../types/security-hotspots'; import StatusSelection from '../StatusSelection'; import StatusSelectionRenderer from '../StatusSelectionRenderer'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/StatusSelectionRenderer-test.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/StatusSelectionRenderer-test.tsx index 872c45c041b..0a24e00016f 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/StatusSelectionRenderer-test.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/StatusSelectionRenderer-test.tsx @@ -19,9 +19,9 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { SubmitButton } from '../../../../../sonar-ui-common/components/controls/buttons'; -import Radio from '../../../../../sonar-ui-common/components/controls/Radio'; -import { change, click } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { SubmitButton } from '../../../../../components/controls/buttons'; +import Radio from '../../../../../components/controls/Radio'; +import { change, click } from '../../../../../helpers/testUtils'; import { HotspotStatusOption } from '../../../../../types/security-hotspots'; import StatusSelectionRenderer, { StatusSelectionRendererProps } from '../StatusSelectionRenderer'; 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 6dba8f5395b..2658732ff13 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,8 +20,8 @@ import * as React from 'react'; import { connect } from 'react-redux'; import GlobalMessagesContainer from '../../../app/components/GlobalMessagesContainer'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; import { Store } from '../../../store/rootReducer'; import './Login.css'; import LoginForm from './LoginForm'; 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 f4d2928692b..f30ee82f972 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 @@ -21,7 +21,7 @@ import { Location } from 'history'; import * as React from 'react'; import { connect } from 'react-redux'; import { getIdentityProviders } from '../../../api/users'; -import { getReturnUrl } from '../../../sonar-ui-common/helpers/urls'; +import { getReturnUrl } from '../../../helpers/urls'; import { doLogin } from '../../../store/rootActions'; import Login from './Login'; 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 2e46f9a411b..4268892d492 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 @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { SubmitButton } from '../../../sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { SubmitButton } from '../../../components/controls/buttons'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import './LoginForm.css'; 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 c05e0fd400a..8b240308f7e 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 @@ -21,8 +21,8 @@ import * as React from 'react'; import { connect } from 'react-redux'; import GlobalMessagesContainer from '../../../app/components/GlobalMessagesContainer'; import RecentHistory from '../../../app/components/RecentHistory'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { doLogout } from '../../../store/rootActions'; interface Props { 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 0a2924d15e0..85d3ce9cf53 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 @@ -19,10 +19,10 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import IdentityProviderLink from '../../../sonar-ui-common/components/controls/IdentityProviderLink'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import IdentityProviderLink from '../../../components/controls/IdentityProviderLink'; +import { translateWithParameters } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import './OAuthProviders.css'; interface Props { 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 dcd1abbc14e..c6c7b573e87 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { getCookie } from '../../../sonar-ui-common/helpers/cookies'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { getCookie } from '../../../helpers/cookies'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; export default function Unauthorized() { const message = decodeURIComponent(getCookie('AUTHENTICATION-ERROR') || ''); diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginContainer-test.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginContainer-test.tsx index 7e6d57e388a..cb177cbca9f 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginContainer-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getIdentityProviders } from '../../../../api/users'; import { mockLocation } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { LoginContainer } from '../LoginContainer'; jest.mock('../../../../api/users', () => { diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginForm-test.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginForm-test.tsx index 4e4612b2fbe..e38ae55e8ca 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/LoginForm-test.tsx @@ -19,12 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { - change, - click, - submit, - waitAndUpdate -} from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, click, submit, waitAndUpdate } from '../../../../helpers/testUtils'; import LoginForm from '../LoginForm'; it('logs in with simple credentials', () => { diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-test.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-test.tsx index 55f8d3461a1..8b5afc8d2c5 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-test.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { Logout } from '../Logout'; const originalLocation = window.location; diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-test.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-test.tsx index 51b9a810610..dda00d2ff57 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-test.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import Unauthorized from '../Unauthorized'; -jest.mock('../../../../sonar-ui-common/helpers/cookies', () => ({ +jest.mock('../../../../helpers/cookies', () => ({ getCookie: jest.fn().mockReturnValue('Foo') })); diff --git a/server/sonar-web/src/main/js/apps/sessions/routes.ts b/server/sonar-web/src/main/js/apps/sessions/routes.ts index 87793f47aff..3c490c803c3 100644 --- a/server/sonar-web/src/main/js/apps/sessions/routes.ts +++ b/server/sonar-web/src/main/js/apps/sessions/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 651362b551d..aa946fabeae 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { ALM_INTEGRATION, ANALYSIS_SCOPE_CATEGORY, 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 ebf60c38e3d..5dda7658457 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,7 +19,7 @@ */ import * as React from 'react'; import { Link } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { AdditionalCategoryComponentProps } from './AdditionalCategories'; import CategoryDefinitionsList from './CategoryDefinitionsList'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx b/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx index 087e10a3ea8..685699d15a6 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx @@ -24,13 +24,13 @@ import { connect } from 'react-redux'; import { WithRouterProps } from 'react-router'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { addSideBarClass, addWhitePageClass, removeSideBarClass, removeWhitePageClass -} from '../../../sonar-ui-common/helpers/pages'; +} from '../../../helpers/pages'; import { getSettingsAppDefaultCategory, Store } from '../../../store/rootReducer'; import { fetchSettings } from '../store/actions'; import '../styles.css'; 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 1d28db83706..7f9994de439 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 @@ -20,10 +20,10 @@ import classNames from 'classnames'; import * as React from 'react'; import { connect } from 'react-redux'; +import AlertErrorIcon from '../../../components/icons/AlertErrorIcon'; +import AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { sanitizeStringRestricted } from '../../../helpers/sanitize'; -import AlertErrorIcon from '../../../sonar-ui-common/components/icons/AlertErrorIcon'; -import AlertSuccessIcon from '../../../sonar-ui-common/components/icons/AlertSuccessIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; import { getSettingsAppChangedValue, getSettingsAppValidationMessage, 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 ce1f79d27e3..6ccf74d70a2 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 @@ -18,13 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { - Button, - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button, ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import { translate } from '../../../helpers/l10n'; import { Setting } from '../../../types/settings'; import { getDefaultValue, getSettingValue, isEmptyValue } from '../utils'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx index d3a51ee9f38..544a42df889 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx @@ -19,14 +19,14 @@ */ import * as React from 'react'; import { sendTestEmail } from '../../../api/settings'; +import { SubmitButton } from '../../../components/controls/buttons'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; -import { SubmitButton } from '../../../sonar-ui-common/components/controls/buttons'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { parseError } from '../../../sonar-ui-common/helpers/request'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { parseError } from '../../../helpers/request'; interface Props { currentUser: T.LoggedInUser; 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 432461ca743..7a27154b398 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; +import Select from '../../../components/controls/Select'; import { Location, Router, withRouter } from '../../../components/hoc/withRouter'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { getSettingsAppAllCategories, Store } from '../../../store/rootReducer'; import { getCategoryName } from '../utils'; import { AdditionalCategoryComponentProps } from './AdditionalCategories'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/NewCodePeriod.tsx b/server/sonar-web/src/main/js/apps/settings/components/NewCodePeriod.tsx index be4033936b5..ac5b327ae95 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/NewCodePeriod.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/NewCodePeriod.tsx @@ -21,13 +21,10 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { getNewCodePeriod, setNewCodePeriod } from '../../../api/newCodePeriod'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import AlertSuccessIcon from '../../../sonar-ui-common/components/icons/AlertSuccessIcon'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import BaselineSettingDays from '../../projectBaseline/components/BaselineSettingDays'; import BaselineSettingPreviousVersion from '../../projectBaseline/components/BaselineSettingPreviousVersion'; import { validateDays } from '../../projectBaseline/utils'; 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 e0d9061df4f..bca4bc82355 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import InstanceMessage from '../../../components/common/InstanceMessage'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export interface PageHeaderProps { component?: T.Component; 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 df2e2eba045..272c0e1d75e 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 @@ -21,7 +21,7 @@ import { groupBy, isEqual, sortBy } from 'lodash'; import * as React from 'react'; import { Location, withRouter } from '../../../components/hoc/withRouter'; import { sanitizeStringRestricted } from '../../../helpers/sanitize'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; +import { scrollToElement } from '../../../helpers/scrolling'; import { SettingWithCategory } from '../../../types/settings'; import { getSubCategoryDescription, getSubCategoryName } from '../utils'; import DefinitionsList from './DefinitionsList'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/AppContainer-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/AppContainer-test.tsx index dcb1ab3ca39..03a755a6277 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/AppContainer-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/AppContainer-test.tsx @@ -20,14 +20,14 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import ScreenPositionHelper from '../../../../components/common/ScreenPositionHelper'; -import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; import { addSideBarClass, addWhitePageClass, removeSideBarClass, removeWhitePageClass -} from '../../../../sonar-ui-common/helpers/pages'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +} from '../../../../helpers/pages'; +import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { ALM_INTEGRATION, ANALYSIS_SCOPE_CATEGORY, @@ -37,7 +37,7 @@ import { } from '../AdditionalCategoryKeys'; import { App } from '../AppContainer'; -jest.mock('../../../../sonar-ui-common/helpers/pages', () => ({ +jest.mock('../../../../helpers/pages', () => ({ addSideBarClass: jest.fn(), addWhitePageClass: jest.fn(), removeSideBarClass: jest.fn(), diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-test.tsx index eaee4ef5677..56841809b8b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockSetting } from '../../../../helpers/mocks/settings'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { Definition } from '../Definition'; const setting = mockSetting(); diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/EmailForm-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/EmailForm-test.tsx index c67ab25a908..e5887c1fb83 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/EmailForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/EmailForm-test.tsx @@ -22,10 +22,10 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { sendTestEmail } from '../../../../api/settings'; import { mockLoggedInUser } from '../../../../helpers/testMocks'; -import { change, submit, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, submit, waitAndUpdate } from '../../../../helpers/testUtils'; import { EmailForm } from '../EmailForm'; -jest.mock('../../../../sonar-ui-common/helpers/request', () => ({ +jest.mock('../../../../helpers/request', () => ({ parseError: jest.fn().mockResolvedValue('Error message') })); diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Languages-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Languages-test.tsx index f50ef2ce95f..10da93d2941 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/Languages-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/Languages-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import Select from '../../../../components/controls/Select'; import { mockComponent, mockLocation, mockRouter } from '../../../../helpers/testMocks'; -import Select from '../../../../sonar-ui-common/components/controls/Select'; import CategoryDefinitionsList from '../CategoryDefinitionsList'; import { Languages, LanguagesProps } from '../Languages'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/NewCodePeriod-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/NewCodePeriod-test.tsx index 35a12846b8a..8db20195146 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/NewCodePeriod-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/NewCodePeriod-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getNewCodePeriod, setNewCodePeriod } from '../../../../api/newCodePeriod'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import NewCodePeriod from '../NewCodePeriod'; jest.mock('../../../../api/newCodePeriod', () => ({ diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/SubCategoryDefinitionsList-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/__tests__/SubCategoryDefinitionsList-test.tsx index 4185f5fedd4..9fa3fdaa3f4 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/SubCategoryDefinitionsList-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/SubCategoryDefinitionsList-test.tsx @@ -20,15 +20,15 @@ import { mount, shallow } from 'enzyme'; import * as React from 'react'; import { mockSettingWithCategory } from '../../../../helpers/mocks/settings'; +import { scrollToElement } from '../../../../helpers/scrolling'; import { mockLocation } from '../../../../helpers/testMocks'; -import { scrollToElement } from '../../../../sonar-ui-common/helpers/scrolling'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { SubCategoryDefinitionsList, SubCategoryDefinitionsListProps } from '../SubCategoryDefinitionsList'; -jest.mock('../../../../sonar-ui-common/helpers/scrolling', () => ({ +jest.mock('../../../../helpers/scrolling', () => ({ scrollToElement: jest.fn() })); 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 74e2282f121..1c56446acfe 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 @@ -20,17 +20,17 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Button } from '../../../../components/controls/buttons'; +import HelpTooltip from '../../../../components/controls/HelpTooltip'; +import Tooltip from '../../../../components/controls/Tooltip'; +import AlertErrorIcon from '../../../../components/icons/AlertErrorIcon'; +import AlertSuccessIcon from '../../../../components/icons/AlertSuccessIcon'; +import DeleteIcon from '../../../../components/icons/DeleteIcon'; +import EditIcon from '../../../../components/icons/EditIcon'; +import { Alert } from '../../../../components/ui/Alert'; import { ALM_DOCUMENTATION_PATHS, IMPORT_COMPATIBLE_ALMS } from '../../../../helpers/constants'; import { getEdition, getEditionUrl } from '../../../../helpers/editions'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; -import HelpTooltip from '../../../../sonar-ui-common/components/controls/HelpTooltip'; -import Tooltip from '../../../../sonar-ui-common/components/controls/Tooltip'; -import AlertErrorIcon from '../../../../sonar-ui-common/components/icons/AlertErrorIcon'; -import AlertSuccessIcon from '../../../../sonar-ui-common/components/icons/AlertSuccessIcon'; -import DeleteIcon from '../../../../sonar-ui-common/components/icons/DeleteIcon'; -import EditIcon from '../../../../sonar-ui-common/components/icons/EditIcon'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { AlmBindingDefinitionBase, AlmKeys, 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 0edf9c46bac..edee930408a 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,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonLink } from '../../../../sonar-ui-common/components/controls/buttons'; -import HelpTooltip from '../../../../sonar-ui-common/components/controls/HelpTooltip'; -import MandatoryFieldMarker from '../../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../../components/controls/buttons'; +import HelpTooltip from '../../../../components/controls/HelpTooltip'; +import MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker'; +import { translate } from '../../../../helpers/l10n'; import { AlmBindingDefinitionBase } from '../../../../types/alm-settings'; export interface AlmBindingDefinitionFormFieldProps<B extends AlmBindingDefinitionBase> { 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 f8664a28637..005c426940a 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 @@ -18,14 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { - ResetButtonLink, - SubmitButton -} from '../../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../../sonar-ui-common/components/controls/Modal'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../../components/controls/buttons'; +import Modal from '../../../../components/controls/Modal'; +import { Alert } from '../../../../components/ui/Alert'; +import DeferredSpinner from '../../../../components/ui/DeferredSpinner'; +import { translate } from '../../../../helpers/l10n'; import { AlmBindingDefinition, AlmKeys, 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 3444cb9fd83..094c1214e8b 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import BoxedTabs from '../../../../sonar-ui-common/components/controls/BoxedTabs'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../../sonar-ui-common/helpers/urls'; +import BoxedTabs from '../../../../components/controls/BoxedTabs'; +import { translate } from '../../../../helpers/l10n'; +import { getBaseUrl } from '../../../../helpers/urls'; import { AlmKeys, AlmSettingsBindingDefinitions, 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 1661200ae7a..8712e292617 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from '../../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../../components/controls/buttons'; +import DeferredSpinner from '../../../../components/ui/DeferredSpinner'; +import { translate } from '../../../../helpers/l10n'; import { AlmBindingDefinition, AlmBindingDefinitionBase, 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 fdb38dfcd39..0b14dbda1e5 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 @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Alert } from '../../../../components/ui/Alert'; import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { AlmKeys, AzureBindingDefinition } from '../../../../types/alm-settings'; import { AlmBindingDefinitionFormField } from './AlmBindingDefinitionFormField'; 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 5d766957f36..168d5111543 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 @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { BitbucketCloudBindingDefinition } from '../../../../types/alm-settings'; import { AlmBindingDefinitionFormField } from './AlmBindingDefinitionFormField'; 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 749ce2e1081..a8d489a1e3d 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 @@ -20,10 +20,10 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import RadioToggle from '../../../../components/controls/RadioToggle'; +import { Alert } from '../../../../components/ui/Alert'; import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants'; -import RadioToggle from '../../../../sonar-ui-common/components/controls/RadioToggle'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { AlmKeys, BitbucketCloudBindingDefinition, 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 67f7fa430f3..5823139f42c 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 @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { BitbucketServerBindingDefinition } from '../../../../types/alm-settings'; import { AlmBindingDefinitionFormField } from './AlmBindingDefinitionFormField'; 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 936f2efbcc8..fc23742666c 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 @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import Tooltip from '../../../../components/controls/Tooltip'; import { withAppState } from '../../../../components/hoc/withAppState'; import { getEdition, getEditionUrl } from '../../../../helpers/editions'; -import Tooltip from '../../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { AlmKeys } from '../../../../types/alm-settings'; import { EditionKey } from '../../../../types/editions'; 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 05c3cb63f38..6926da558b4 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import ConfirmModal from '../../../../sonar-ui-common/components/controls/ConfirmModal'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; +import ConfirmModal from '../../../../components/controls/ConfirmModal'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; export interface DeleteModalProps { id: string; 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 b00cb30273b..37e7b2a01cb 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 @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Alert } from '../../../../components/ui/Alert'; import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { AlmKeys, GithubBindingDefinition } from '../../../../types/alm-settings'; import { AlmBindingDefinitionFormField } from './AlmBindingDefinitionFormField'; 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 ec89c8b8752..67d6ba83ea5 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 @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Alert } from '../../../../components/ui/Alert'; import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { AlmKeys, GitlabBindingDefinition } from '../../../../types/alm-settings'; import { AlmBindingDefinitionFormField } from './AlmBindingDefinitionFormField'; 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 c78b1d3cfe9..4ad2a7bd49b 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 @@ -40,7 +40,7 @@ import { mockGithubBindingDefinition, mockGitlabBindingDefinition } from '../../../../../helpers/mocks/alm-settings'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import { AlmBindingDefinition, AlmKeys } from '../../../../../types/alm-settings'; import AlmBindingDefinitionForm from '../AlmBindingDefinitionForm'; import AlmBindingDefinitionFormRenderer from '../AlmBindingDefinitionFormRenderer'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionFormField-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionFormField-test.tsx index 4261bd1dffd..180abec4816 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionFormField-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionFormField-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { ButtonLink } from '../../../../../sonar-ui-common/components/controls/buttons'; -import { click } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { ButtonLink } from '../../../../../components/controls/buttons'; +import { click } from '../../../../../helpers/testUtils'; import { AlmBindingDefinitionBase } from '../../../../../types/alm-settings'; import { AlmBindingDefinitionFormField, diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionFormRenderer-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionFormRenderer-test.tsx index 02643d899fd..32fa8e265f0 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionFormRenderer-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionFormRenderer-test.tsx @@ -19,10 +19,10 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { ResetButtonLink } from '../../../../../components/controls/buttons'; import { mockGithubBindingDefinition } from '../../../../../helpers/mocks/alm-settings'; import { mockEvent } from '../../../../../helpers/testMocks'; -import { ResetButtonLink } from '../../../../../sonar-ui-common/components/controls/buttons'; -import { click } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../../helpers/testUtils'; import { AlmKeys } from '../../../../../types/alm-settings'; import AlmBindingDefinitionFormRenderer, { AlmBindingDefinitionFormProps diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx index b9f4b241050..9f34b761623 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx @@ -26,7 +26,7 @@ import { validateAlmSettings } from '../../../../../api/alm-settings'; import { mockLocation } from '../../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import { AlmKeys, AlmSettingsBindingStatusType } from '../../../../../types/alm-settings'; import { AlmIntegration } from '../AlmIntegration'; import AlmIntegrationRenderer from '../AlmIntegrationRenderer'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTab-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTab-test.tsx index a7af4d5ca22..abe098a1d02 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTab-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTab-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockAzureBindingDefinition } from '../../../../../helpers/mocks/alm-settings'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import { AlmKeys } from '../../../../../types/alm-settings'; import AlmTab from '../AlmTab'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/BitbucketForm-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/BitbucketForm-test.tsx index 88a12490b64..c6fd445ddce 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/BitbucketForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/BitbucketForm-test.tsx @@ -19,11 +19,11 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import RadioToggle from '../../../../../components/controls/RadioToggle'; import { mockBitbucketCloudBindingDefinition, mockBitbucketServerBindingDefinition } from '../../../../../helpers/mocks/alm-settings'; -import RadioToggle from '../../../../../sonar-ui-common/components/controls/RadioToggle'; import { AlmKeys } from '../../../../../types/alm-settings'; import BitbucketForm, { BitbucketFormProps } from '../BitbucketForm'; 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 74921a67aba..4af9cd65018 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Toggle from '../../../../sonar-ui-common/components/controls/Toggle'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import Toggle from '../../../../components/controls/Toggle'; +import { translate } from '../../../../helpers/l10n'; import { DefaultSpecializedInputProps } from '../../utils'; interface Props extends DefaultSpecializedInputProps { 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 0edf6bb3ab1..626afaef73e 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../../components/controls/buttons'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate } from '../../../../helpers/l10n'; import { DefaultSpecializedInputProps } from '../../utils'; const JSON_SPACE_SIZE = 4; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.tsx index aae8152eb8b..c63b3106ea4 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { colors } from '../../../../app/theme'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; -import LockIcon from '../../../../sonar-ui-common/components/icons/LockIcon'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../../components/controls/buttons'; +import LockIcon from '../../../../components/icons/LockIcon'; +import { translate } from '../../../../helpers/l10n'; import { DefaultSpecializedInputProps } from '../../utils'; interface State { 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 12421ba9618..f994fb8011a 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Select from '../../../../sonar-ui-common/components/controls/Select'; +import Select from '../../../../components/controls/Select'; import { SettingCategoryDefinition } from '../../../../types/settings'; import { DefaultSpecializedInputProps } from '../../utils'; 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 8dfa106672d..e6bb87e44ae 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { DeleteButton } from '../../../../sonar-ui-common/components/controls/buttons'; +import { DeleteButton } from '../../../../components/controls/buttons'; import { DefaultInputProps, getEmptyValue } from '../../utils'; import PrimitiveInput from './PrimitiveInput'; 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 c85f583f4fd..7db52e8b289 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { DeleteButton } from '../../../../sonar-ui-common/components/controls/buttons'; +import { DeleteButton } from '../../../../components/controls/buttons'; import { DefaultInputProps, getEmptyValue, getUniqueName, isCategoryDefinition } from '../../utils'; import PrimitiveInput from './PrimitiveInput'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForJSON-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForJSON-test.tsx index 42090287fe1..2884097b537 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForJSON-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForJSON-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { change } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { change } from '../../../../../helpers/testUtils'; import { DefaultSpecializedInputProps } from '../../../utils'; import InputForJSON from '../InputForJSON'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.tsx index e8ddd53ecd2..bb1716d9879 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { change, click, submit } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { change, click, submit } from '../../../../../helpers/testUtils'; import { DefaultSpecializedInputProps } from '../../../utils'; import InputForPassword from '../InputForPassword'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-test.tsx index aa8e6e094d0..4b9a42653fb 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { change } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { change } from '../../../../../helpers/testUtils'; import { DefaultSpecializedInputProps } from '../../../utils'; import InputForText from '../InputForText'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-test.tsx index 5fc3cc4c1ef..7f5dd70dc64 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-test.tsx @@ -19,7 +19,7 @@ */ import { shallow, ShallowWrapper } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../../helpers/testUtils'; import { SettingCategoryDefinition } from '../../../../../types/settings'; import { DefaultInputProps } from '../../../utils'; import MultiValueInput from '../MultiValueInput'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-test.tsx index 7f55d57aa47..2f6125c6732 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { change } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { change } from '../../../../../helpers/testUtils'; import SimpleInput from '../SimpleInput'; it('should render input', () => { 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 b17b0555153..db66a5ebe05 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 @@ -20,11 +20,11 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Alert } from '../../../../components/ui/Alert'; +import MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker'; import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants'; +import { translate } from '../../../../helpers/l10n'; import { convertGithubApiUrlToLink, stripTrailingSlash } from '../../../../helpers/urls'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import MandatoryFieldMarker from '../../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; import { AlmKeys, AlmSettingsInstance, 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 65ccfa6d87d..6a3271221c1 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 @@ -32,8 +32,8 @@ import { } from '../../../../api/alm-settings'; import throwGlobalError from '../../../../app/utils/throwGlobalError'; import { withCurrentUser } from '../../../../components/hoc/withCurrentUser'; +import { HttpStatus } from '../../../../helpers/request'; import { hasGlobalPermission } from '../../../../helpers/users'; -import { HttpStatus } from '../../../../sonar-ui-common/helpers/request'; import { getAppState, Store } from '../../../../store/rootReducer'; import { AlmKeys, 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 95444b37b7d..7f1b0058160 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 @@ -20,15 +20,15 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Button, SubmitButton } from '../../../../components/controls/buttons'; +import Select from '../../../../components/controls/Select'; +import AlertSuccessIcon from '../../../../components/icons/AlertSuccessIcon'; +import { Alert } from '../../../../components/ui/Alert'; +import DeferredSpinner from '../../../../components/ui/DeferredSpinner'; +import MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../../helpers/l10n'; import { getGlobalSettingsUrl } from '../../../../helpers/urls'; -import { Button, SubmitButton } from '../../../../sonar-ui-common/components/controls/buttons'; -import Select from '../../../../sonar-ui-common/components/controls/Select'; -import AlertSuccessIcon from '../../../../sonar-ui-common/components/icons/AlertSuccessIcon'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../../sonar-ui-common/components/ui/DeferredSpinner'; -import MandatoryFieldMarker from '../../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; import { AlmSettingsInstance, ProjectAlmBindingConfigurationErrors, diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-test.tsx index a262274f7e3..db848429969 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-test.tsx @@ -36,7 +36,7 @@ import { mockProjectAlmBindingResponse } from '../../../../../helpers/mocks/alm-settings'; import { mockComponent, mockCurrentUser } from '../../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import { AlmKeys, AlmSettingsInstance } from '../../../../../types/alm-settings'; import { PRDecorationBinding } from '../PRDecorationBinding'; import PRDecorationBindingRenderer from '../PRDecorationBindingRenderer'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBindingRenderer-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBindingRenderer-test.tsx index c8cb2ca7d4c..adbe0156488 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBindingRenderer-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBindingRenderer-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import Select from '../../../../../sonar-ui-common/components/controls/Select'; -import { waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import Select from '../../../../../components/controls/Select'; +import { waitAndUpdate } from '../../../../../helpers/testUtils'; import { AlmKeys, AlmSettingsInstance, 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 247cb3f1ac3..6ea37067ce7 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 @@ -20,8 +20,8 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { checkSecretKey, generateSecretKey } from '../../../api/settings'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import EncryptionForm from './EncryptionForm'; import GenerateSecretKeyForm from './GenerateSecretKeyForm'; 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 014152a685a..655b3bc2390 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 @@ -21,10 +21,10 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { encryptValue } from '../../../api/settings'; -import { SubmitButton } from '../../../sonar-ui-common/components/controls/buttons'; -import { ClipboardButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { SubmitButton } from '../../../components/controls/buttons'; +import { ClipboardButton } from '../../../components/controls/clipboard'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; interface Props { generateSecretKey: () => Promise<void>; 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 1bf80f49722..e024d187aa2 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 @@ -20,10 +20,10 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { SubmitButton } from '../../../sonar-ui-common/components/controls/buttons'; -import { ClipboardButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { SubmitButton } from '../../../components/controls/buttons'; +import { ClipboardButton } from '../../../components/controls/clipboard'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; interface Props { generateSecretKey: () => Promise<void>; diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/__tests__/EncryptionApp-test.tsx b/server/sonar-web/src/main/js/apps/settings/encryption/__tests__/EncryptionApp-test.tsx index 7ba6081f616..242b304e84c 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/__tests__/EncryptionApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/encryption/__tests__/EncryptionApp-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { checkSecretKey, generateSecretKey } from '../../../../api/settings'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import EncryptionApp from '../EncryptionApp'; jest.mock('../../../../api/settings', () => ({ diff --git a/server/sonar-web/src/main/js/apps/settings/routes.ts b/server/sonar-web/src/main/js/apps/settings/routes.ts index ad62cde0340..53d18a0ed1a 100644 --- a/server/sonar-web/src/main/js/apps/settings/routes.ts +++ b/server/sonar-web/src/main/js/apps/settings/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { diff --git a/server/sonar-web/src/main/js/apps/settings/store/actions.ts b/server/sonar-web/src/main/js/apps/settings/store/actions.ts index 87f45788979..6bc80bb37e6 100644 --- a/server/sonar-web/src/main/js/apps/settings/store/actions.ts +++ b/server/sonar-web/src/main/js/apps/settings/store/actions.ts @@ -24,8 +24,8 @@ import { resetSettingValue, setSettingValue } from '../../../api/settings'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { parseError } from '../../../sonar-ui-common/helpers/request'; +import { translate } from '../../../helpers/l10n'; +import { parseError } from '../../../helpers/request'; import { closeAllGlobalMessages } from '../../../store/globalMessages'; import { getSettingsAppChangedValue, 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 ab37d79e892..fe956af3e50 100644 --- a/server/sonar-web/src/main/js/apps/settings/utils.ts +++ b/server/sonar-web/src/main/js/apps/settings/utils.ts @@ -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 { hasMessage, translate } from '../../sonar-ui-common/helpers/l10n'; +import { hasMessage, translate } from '../../helpers/l10n'; import { Setting, SettingCategoryDefinition, SettingDefinition } from '../../types/settings'; export const DEFAULT_CATEGORY = 'general'; diff --git a/server/sonar-web/src/main/js/apps/system/components/App.tsx b/server/sonar-web/src/main/js/apps/system/components/App.tsx index 7de833ce33d..6df2047788c 100644 --- a/server/sonar-web/src/main/js/apps/system/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/App.tsx @@ -22,7 +22,7 @@ import { Helmet } from 'react-helmet-async'; import { withRouter, WithRouterProps } from 'react-router'; import { getSystemInfo } from '../../../api/system'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import '../styles.css'; import { getClusterVersion, 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 ef5d423ffd8..a79936d6b3d 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 @@ -19,13 +19,10 @@ */ import * as React from 'react'; import { setLogLevel } from '../../../api/system'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; import { LOGS_LEVELS } from '../utils'; interface Props { 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 858d434b304..28b52667d18 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 @@ -19,7 +19,7 @@ */ import { sortBy } from 'lodash'; import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { getAppNodes, getClusterMainCardSection, 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 72ca8e89938..5f3e0887fe9 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 @@ -20,11 +20,11 @@ import * as React from 'react'; import AdminContext from '../../../app/components/AdminContext'; import RestartButton from '../../../components/common/RestartButton'; -import { Button, EditButton } from '../../../sonar-ui-common/components/controls/buttons'; -import Dropdown from '../../../sonar-ui-common/components/controls/Dropdown'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { Button, EditButton } from '../../../components/controls/buttons'; +import Dropdown from '../../../components/controls/Dropdown'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { getFileNameSuffix } from '../utils'; import ChangeLogLevelForm from './ChangeLogLevelForm'; 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 61a883e6491..0aab72a96ad 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ClipboardButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import { toShortNotSoISOString } from '../../../sonar-ui-common/helpers/dates'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ClipboardButton } from '../../../components/controls/clipboard'; +import { toShortNotSoISOString } from '../../../helpers/dates'; +import { translate } from '../../../helpers/l10n'; import PageActions from './PageActions'; export interface Props { diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/system/components/__tests__/App-test.tsx index 57f68f7204a..dbeec9dabbd 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/App-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/App-test.tsx @@ -26,7 +26,7 @@ import { mockRouter, mockStandaloneSysInfo } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { App } from '../App'; jest.mock('../../../../api/system', () => ({ diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx b/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx index 35d745f404c..02aacf5d4ba 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/PageActions-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import PageActions from '../PageActions'; jest.mock('../../utils', () => ({ diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/PageHeader-test.tsx b/server/sonar-web/src/main/js/apps/system/components/__tests__/PageHeader-test.tsx index 7d143597513..32c07327d72 100644 --- a/server/sonar-web/src/main/js/apps/system/components/__tests__/PageHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/PageHeader-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import PageHeader, { Props } from '../PageHeader'; -jest.mock('../../../../sonar-ui-common/helpers/dates', () => ({ +jest.mock('../../../../helpers/dates', () => ({ toShortNotSoISOString: () => '2019-01-01' })); 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 c03ad6e1270..5c403aadf4f 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 @@ -19,9 +19,9 @@ */ import { map } from 'lodash'; import * as React from 'react'; -import BoxedGroupAccordion from '../../../../sonar-ui-common/components/controls/BoxedGroupAccordion'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import BoxedGroupAccordion from '../../../../components/controls/BoxedGroupAccordion'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate } from '../../../../helpers/l10n'; import { getLogsLevel, groupSections, LOGS_LEVELS } from '../../utils'; import HealthItem from './HealthItem'; import Section from './Section'; 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 f764c9fc0c8..49cd480e91d 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 @@ -19,7 +19,7 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; +import { Alert } from '../../../../components/ui/Alert'; interface Props { className?: string; 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 4571978f6e4..f445caf6d0a 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 @@ -20,8 +20,8 @@ import * as classNames from 'classnames'; import * as React from 'react'; import StatusIndicator from '../../../../components/common/StatusIndicator'; -import Tooltip from '../../../../sonar-ui-common/components/controls/Tooltip'; -import { translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../../../components/controls/Tooltip'; +import { translateWithParameters } from '../../../../helpers/l10n'; import HealthCauseItem from './HealthCauseItem'; interface Props { 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 8a6ab950f38..4cd91ec7c53 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 @@ -19,7 +19,7 @@ */ import { map } from 'lodash'; import * as React from 'react'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { HEALTH_FIELD, STATE_FIELD } from '../../utils'; import HealthItem from './HealthItem'; diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeForm.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeForm.tsx index e32b51f73d2..b4a25a71963 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeForm.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeForm.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { ResetButtonLink } from '../../../../components/controls/buttons'; +import Modal from '../../../../components/controls/Modal'; import { withAppState } from '../../../../components/hoc/withAppState'; -import { ResetButtonLink } from '../../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../../sonar-ui-common/components/controls/Modal'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { EditionKey } from '../../../../types/editions'; import { SystemUpgrade } from '../../../../types/system'; import SystemUpgradeItem from './SystemUpgradeItem'; diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx index 4442791ab58..b059fe41805 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeIntermediate.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonLink } from '../../../../sonar-ui-common/components/controls/buttons'; -import DropdownIcon from '../../../../sonar-ui-common/components/icons/DropdownIcon'; -import DateFormatter from '../../../../sonar-ui-common/components/intl/DateFormatter'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../../components/controls/buttons'; +import DropdownIcon from '../../../../components/icons/DropdownIcon'; +import DateFormatter from '../../../../components/intl/DateFormatter'; +import { translate } from '../../../../helpers/l10n'; import { SystemUpgrade } from '../../../../types/system'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeItem.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeItem.tsx index 06487ebb3fd..d5c605cbc4b 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeItem.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeItem.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import DateFormatter from '../../../../components/intl/DateFormatter'; import { getEdition, getEditionDownloadFilename, getEditionDownloadUrl } from '../../../../helpers/editions'; -import DateFormatter from '../../../../sonar-ui-common/components/intl/DateFormatter'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { EditionKey } from '../../../../types/editions'; import { SystemUpgrade } from '../../../../types/system'; import SystemUpgradeIntermediate from './SystemUpgradeIntermediate'; diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeNotif.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeNotif.tsx index f332bc0a98f..5655488d6d8 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeNotif.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/SystemUpgradeNotif.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { getSystemUpgrades } from '../../../../api/system'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../../components/controls/buttons'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate } from '../../../../helpers/l10n'; import { SystemUpgrade } from '../../../../types/system'; import { groupUpgrades, sortUpgrades } from '../../utils'; import SystemUpgradeForm from './SystemUpgradeForm'; diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeIntermediate-test.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeIntermediate-test.tsx index 1d16b436a19..c2d05b1853f 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeIntermediate-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeIntermediate-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../../helpers/testUtils'; import SystemUpgradeIntermediate from '../SystemUpgradeIntermediate'; const UPGRADES = [ diff --git a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeNotif-test.tsx b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeNotif-test.tsx index 181e892cbca..7ad1e031157 100644 --- a/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeNotif-test.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/system-upgrade/__tests__/SystemUpgradeNotif-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getSystemUpgrades } from '../../../../../api/system'; -import { click, waitAndUpdate } from '../../../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../../../helpers/testUtils'; import SystemUpgradeNotif from '../SystemUpgradeNotif'; jest.mock('../../../../../api/system', () => ({ diff --git a/server/sonar-web/src/main/js/apps/system/routes.ts b/server/sonar-web/src/main/js/apps/system/routes.ts index f57b5528d59..3056655f8ba 100644 --- a/server/sonar-web/src/main/js/apps/system/routes.ts +++ b/server/sonar-web/src/main/js/apps/system/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 7727bfeb690..4a4c7f28242 100644 --- a/server/sonar-web/src/main/js/apps/system/utils.ts +++ b/server/sonar-web/src/main/js/apps/system/utils.ts @@ -18,13 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { each, groupBy, memoize, omit, omitBy, pickBy, sortBy } from 'lodash'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; -import { - cleanQuery, - parseAsArray, - parseAsString, - serializeStringArray -} from '../../sonar-ui-common/helpers/query'; +import { formatMeasure } from '../../helpers/measures'; +import { cleanQuery, parseAsArray, parseAsString, serializeStringArray } from '../../helpers/query'; import { SystemUpgrade } from '../../types/system'; export interface Query { 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 91793919adb..15e0ed88dae 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 @@ -20,8 +20,8 @@ import * as React from 'react'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; import TutorialSelection from '../../../components/tutorials/TutorialSelection'; +import handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication'; import { isLoggedIn } from '../../../helpers/users'; -import handleRequiredAuthentication from '../../../sonar-ui-common/helpers/handleRequiredAuthentication'; import { ProjectAlmBindingResponse } from '../../../types/alm-settings'; export interface TutorialsAppProps { 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 1cb372e0c1c..db9050fde0f 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 @@ -19,12 +19,12 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import handleRequiredAuthentication from '../../../../helpers/handleRequiredAuthentication'; import { mockProjectAzureBindingResponse } from '../../../../helpers/mocks/alm-settings'; import { mockComponent, mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks'; -import handleRequiredAuthentication from '../../../../sonar-ui-common/helpers/handleRequiredAuthentication'; import { TutorialsApp, TutorialsAppProps } from '../TutorialsApp'; -jest.mock('../../../../sonar-ui-common/helpers/handleRequiredAuthentication', () => ({ +jest.mock('../../../../helpers/handleRequiredAuthentication', () => ({ default: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/tutorials/routes.ts b/server/sonar-web/src/main/js/apps/tutorials/routes.ts index 4cb72f2c83d..98f75c84934 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/routes.ts +++ b/server/sonar-web/src/main/js/apps/tutorials/routes.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 e6ffc857c95..b7baff64b0b 100644 --- a/server/sonar-web/src/main/js/apps/users/Header.tsx +++ b/server/sonar-web/src/main/js/apps/users/Header.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../components/controls/buttons'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; +import { translate } from '../../helpers/l10n'; import UserForm from './components/UserForm'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/users/Search.tsx b/server/sonar-web/src/main/js/apps/users/Search.tsx index b374db588b7..64416e7eee5 100644 --- a/server/sonar-web/src/main/js/apps/users/Search.tsx +++ b/server/sonar-web/src/main/js/apps/users/Search.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import SearchBox from '../../sonar-ui-common/components/controls/SearchBox'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import SearchBox from '../../components/controls/SearchBox'; +import { translate } from '../../helpers/l10n'; import { Query } from './utils'; interface Props { 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 e65a54b2026..83b6c6d1f31 100644 --- a/server/sonar-web/src/main/js/apps/users/UsersApp.tsx +++ b/server/sonar-web/src/main/js/apps/users/UsersApp.tsx @@ -21,10 +21,10 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { getIdentityProviders, searchUsers } from '../../api/users'; import Suggestions from '../../app/components/embed-docs-modal/Suggestions'; +import ListFooter from '../../components/controls/ListFooter'; import { withCurrentUser } from '../../components/hoc/withCurrentUser'; import { Location, Router, withRouter } from '../../components/hoc/withRouter'; -import ListFooter from '../../sonar-ui-common/components/controls/ListFooter'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import Header from './Header'; import Search from './Search'; import UsersList from './UsersList'; 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 ff8667fb031..a12eb00d3ea 100644 --- a/server/sonar-web/src/main/js/apps/users/UsersList.tsx +++ b/server/sonar-web/src/main/js/apps/users/UsersList.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import UserListItem from './components/UserListItem'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/users/__tests__/Header-test.tsx b/server/sonar-web/src/main/js/apps/users/__tests__/Header-test.tsx index 3e974b597a3..7d37ecf370a 100644 --- a/server/sonar-web/src/main/js/apps/users/__tests__/Header-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/__tests__/Header-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import Header from '../Header'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-test.tsx b/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-test.tsx index 995f39a29bd..66bbca41153 100644 --- a/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { Location } from '../../../components/hoc/withRouter'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { UsersApp } from '../UsersApp'; jest.mock('../../../api/users', () => ({ 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 db786c14565..ff9cac6acd6 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 @@ -19,12 +19,9 @@ */ import * as React from 'react'; import { deactivateUser } from '../../../api/users'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; export interface Props { onClose: () => void; 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 b08e6e2f428..a61d96e1ae0 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 @@ -21,12 +21,12 @@ import { find, without } from 'lodash'; import * as React from 'react'; import { getUserGroups, UserGroup } from '../../../api/users'; import { addUserToGroup, removeUserFromGroup } from '../../../api/user_groups'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; +import Modal from '../../../components/controls/Modal'; import SelectList, { SelectListFilter, SelectListSearchParams -} from '../../../sonar-ui-common/components/controls/SelectList'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +} from '../../../components/controls/SelectList'; +import { translate } from '../../../helpers/l10n'; interface Props { onClose: () => void; 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 5dc1e6baf93..6dd4d5adbcd 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 @@ -21,16 +21,13 @@ import * as React from 'react'; import { changePassword } from '../../../api/users'; import addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage'; import throwGlobalError from '../../../app/utils/throwGlobalError'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { parseError } from '../../../sonar-ui-common/helpers/request'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import { Alert } from '../../../components/ui/Alert'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; +import { parseError } from '../../../helpers/request'; interface Props { isCurrentUser: boolean; 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 a1e31da9165..4f4ce1b6dfb 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,9 +19,9 @@ */ import * as React from 'react'; import { generateToken, getTokens } from '../../../api/user-tokens'; -import { SubmitButton } from '../../../sonar-ui-common/components/controls/buttons'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { SubmitButton } from '../../../components/controls/buttons'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; import TokensFormItem, { TokenDeleteConfirmation } from './TokensFormItem'; import TokensFormNewToken from './TokensFormNewToken'; 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 075aa88ffee..4c8fc26c29f 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 @@ -20,14 +20,14 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { revokeToken } from '../../../api/user-tokens'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ConfirmButton from '../../../sonar-ui-common/components/controls/ConfirmButton'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import DateFormatter from '../../../sonar-ui-common/components/intl/DateFormatter'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { limitComponentName } from '../../../sonar-ui-common/helpers/path'; +import { Button } from '../../../components/controls/buttons'; +import ConfirmButton from '../../../components/controls/ConfirmButton'; +import Tooltip from '../../../components/controls/Tooltip'; +import DateFormatter from '../../../components/intl/DateFormatter'; +import DateFromNow from '../../../components/intl/DateFromNow'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate } from '../../../helpers/l10n'; +import { limitComponentName } from '../../../helpers/path'; export type TokenDeleteConfirmation = 'inline' | 'modal'; 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 cde0666a09d..bb9e48a4feb 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import { translate } from '../../../helpers/l10n'; import TokensForm from './TokensForm'; interface Props { 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 09d8ce01824..78f8dc276c5 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,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ClipboardButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ClipboardButton } from '../../../components/controls/clipboard'; +import { Alert } from '../../../components/ui/Alert'; +import { translateWithParameters } from '../../../helpers/l10n'; interface Props { token: { name: string; token: string }; diff --git a/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx b/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx index 1a196e3a561..e58df4f9e09 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { isUserActive } from '../../../helpers/users'; import ActionsDropdown, { ActionsDropdownDivider, ActionsDropdownItem -} from '../../../sonar-ui-common/components/controls/ActionsDropdown'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +} from '../../../components/controls/ActionsDropdown'; +import { translate } from '../../../helpers/l10n'; +import { isUserActive } from '../../../helpers/users'; import DeactivateForm from './DeactivateForm'; import PasswordForm from './PasswordForm'; import UserForm from './UserForm'; 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 a3a1e7a36f3..55193531878 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 @@ -21,17 +21,13 @@ import { uniq } from 'lodash'; import * as React from 'react'; import { createUser, updateUser } from '../../../api/users'; import throwGlobalError from '../../../app/utils/throwGlobalError'; -import { - Button, - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { parseError } from '../../../sonar-ui-common/helpers/request'; +import { Button, ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import { Alert } from '../../../components/ui/Alert'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { parseError } from '../../../helpers/request'; import UserScmAccountInput from './UserScmAccountInput'; export interface Props { diff --git a/server/sonar-web/src/main/js/apps/users/components/UserGroups.tsx b/server/sonar-web/src/main/js/apps/users/components/UserGroups.tsx index 8aab5c250f5..e525bdeb7fa 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserGroups.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserGroups.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonIcon } from '../../../sonar-ui-common/components/controls/buttons'; -import BulletListIcon from '../../../sonar-ui-common/components/icons/BulletListIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonIcon } from '../../../components/controls/buttons'; +import BulletListIcon from '../../../components/icons/BulletListIcon'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import GroupsForm from './GroupsForm'; interface Props { 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 0d32ce150fd..dd728bf3f9c 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 @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { ButtonIcon } from '../../../components/controls/buttons'; +import BulletListIcon from '../../../components/icons/BulletListIcon'; +import DateFromNow from '../../../components/intl/DateFromNow'; import Avatar from '../../../components/ui/Avatar'; -import { ButtonIcon } from '../../../sonar-ui-common/components/controls/buttons'; -import BulletListIcon from '../../../sonar-ui-common/components/icons/BulletListIcon'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import TokensFormModal from './TokensFormModal'; import UserActions from './UserActions'; import UserGroups from './UserGroups'; 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 e34a18f37e5..14ba55b04b2 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { colors } from '../../../app/theme'; -import { getTextColor } from '../../../sonar-ui-common/helpers/colors'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { getTextColor } from '../../../helpers/colors'; +import { getBaseUrl } from '../../../helpers/urls'; export interface Props { identityProvider?: T.IdentityProvider; 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 7d4dff74860..eda700ca8e1 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { DeleteButton } from '../../../sonar-ui-common/components/controls/buttons'; +import { DeleteButton } from '../../../components/controls/buttons'; export interface Props { idx: number; 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 16a5a956a47..c68d0234c00 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translateWithParameters } from '../../../helpers/l10n'; interface Props { scmAccounts: string[]; diff --git a/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx b/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx index 6a1abba5d25..9676bf12248 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UsersSelectSearch.tsx @@ -19,9 +19,9 @@ */ import { debounce } from 'lodash'; import * as React from 'react'; +import Select from '../../../components/controls/Select'; import Avatar from '../../../components/ui/Avatar'; -import Select from '../../../sonar-ui-common/components/controls/Select'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; interface Option { login: string; diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/GroupsForm-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/GroupsForm-test.tsx index c145a9d395d..ad6baaf8636 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/GroupsForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/GroupsForm-test.tsx @@ -21,11 +21,9 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getUserGroups } from '../../../../api/users'; import { addUserToGroup, removeUserFromGroup } from '../../../../api/user_groups'; +import SelectList, { SelectListFilter } from '../../../../components/controls/SelectList'; import { mockUser } from '../../../../helpers/testMocks'; -import SelectList, { - SelectListFilter -} from '../../../../sonar-ui-common/components/controls/SelectList'; -import { click, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../../helpers/testUtils'; import GroupsForm from '../GroupsForm'; const user = mockUser(); diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensForm-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensForm-test.tsx index d31169e00dc..f611f9b4706 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensForm-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { generateToken, getTokens } from '../../../../api/user-tokens'; -import { change, submit, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, submit, waitAndUpdate } from '../../../../helpers/testUtils'; import TokensForm from '../TokensForm'; jest.mock('../../../../api/user-tokens', () => ({ diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormItem-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormItem-test.tsx index 8a28525f059..310642b9948 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/TokensFormItem-test.tsx @@ -20,12 +20,12 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { revokeToken } from '../../../../api/user-tokens'; -import { click, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../../helpers/testUtils'; import TokensFormItem from '../TokensFormItem'; -jest.mock('../../../../sonar-ui-common/components/intl/DateFormatter'); -jest.mock('../../../../sonar-ui-common/components/intl/DateFromNow'); -jest.mock('../../../../sonar-ui-common/components/intl/DateTimeFormatter'); +jest.mock('../../../../components/intl/DateFormatter'); +jest.mock('../../../../components/intl/DateFromNow'); +jest.mock('../../../../components/intl/DateTimeFormatter'); jest.mock('../../../../api/user-tokens', () => ({ revokeToken: jest.fn().mockResolvedValue(undefined) diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserActions-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserActions-test.tsx index cf86b50d6d8..500e7f8d7c4 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserActions-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import UserActions from '../UserActions'; const user = { diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx index 99b0d2b5e5a..8a2b99f6558 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx @@ -20,9 +20,9 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { createUser, updateUser } from '../../../../api/users'; +import { Alert } from '../../../../components/ui/Alert'; import { mockUser } from '../../../../helpers/testMocks'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { submit, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { submit, waitAndUpdate } from '../../../../helpers/testUtils'; import UserForm from '../UserForm'; jest.mock('../../../../api/users', () => ({ diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserGroups-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserGroups-test.tsx index c5f995d4555..7cacc03b285 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserGroups-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserGroups-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import UserGroups from '../UserGroups'; const user = { diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItem-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItem-test.tsx index c5f5af71c78..742b4ff7a01 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItem-test.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserListItem-test.tsx @@ -19,11 +19,11 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import UserListItem from '../UserListItem'; -jest.mock('../../../../sonar-ui-common/components/intl/DateFromNow'); -jest.mock('../../../../sonar-ui-common/components/intl/DateTimeFormatter'); +jest.mock('../../../../components/intl/DateFromNow'); +jest.mock('../../../../components/intl/DateTimeFormatter'); const user: T.User = { active: true, diff --git a/server/sonar-web/src/main/js/apps/users/routes.ts b/server/sonar-web/src/main/js/apps/users/routes.ts index 71f305b65fb..03bc4ef51ea 100644 --- a/server/sonar-web/src/main/js/apps/users/routes.ts +++ b/server/sonar-web/src/main/js/apps/users/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 870809f002b..e5b1d89655b 100644 --- a/server/sonar-web/src/main/js/apps/users/utils.ts +++ b/server/sonar-web/src/main/js/apps/users/utils.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { memoize } from 'lodash'; -import { cleanQuery, parseAsString, serializeString } from '../../sonar-ui-common/helpers/query'; +import { cleanQuery, parseAsString, serializeString } from '../../helpers/query'; export interface Query { search: string; 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 96565880849..5bcc98ade25 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 @@ -20,8 +20,8 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { Link } from 'react-router'; -import LinkIcon from '../../../sonar-ui-common/components/icons/LinkIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import LinkIcon from '../../../components/icons/LinkIcon'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getActionKey, serializeQuery } from '../utils'; import ActionChangelog from './ActionChangelog'; import DeprecatedBadge from './DeprecatedBadge'; 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 cfe9f1d302a..4c59dec8ad8 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { parseVersion } from '../utils'; export default function DeprecatedBadge({ since }: { since?: string }) { 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 87a62da168a..6bd861e0df4 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate } from '../../../helpers/l10n'; export default function InternalBadge() { return ( 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 a71d897572c..41746a001d7 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,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import DeprecatedBadge from './DeprecatedBadge'; import InternalBadge from './InternalBadge'; 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 730b178656b..b57ff2ca194 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 @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Checkbox from '../../../sonar-ui-common/components/controls/Checkbox'; -import HelpTooltip from '../../../sonar-ui-common/components/controls/HelpTooltip'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import Checkbox from '../../../components/controls/Checkbox'; +import HelpTooltip from '../../../components/controls/HelpTooltip'; +import SearchBox from '../../../components/controls/SearchBox'; +import { translate } from '../../../helpers/l10n'; import { Query } from '../utils'; interface Props { 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 3d1fb81400c..fda24c8f547 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 @@ -25,9 +25,9 @@ import { fetchWebApi } from '../../../api/web-api'; import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { addSideBarClass, removeSideBarClass } from '../../../sonar-ui-common/helpers/pages'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; +import { translate } from '../../../helpers/l10n'; +import { addSideBarClass, removeSideBarClass } from '../../../helpers/pages'; +import { scrollToElement } from '../../../helpers/scrolling'; import '../styles/web-api.css'; import { getActionKey, diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx index 92cd3153b23..02c22c885a1 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/WebApiApp-test.tsx @@ -20,9 +20,9 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { fetchWebApi } from '../../../../api/web-api'; +import { addSideBarClass, removeSideBarClass } from '../../../../helpers/pages'; import { mockLocation, mockRouter } from '../../../../helpers/testMocks'; -import { addSideBarClass, removeSideBarClass } from '../../../../sonar-ui-common/helpers/pages'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { WebApiApp } from '../WebApiApp'; jest.mock('../../../../components/common/ScreenPositionHelper'); @@ -39,7 +39,7 @@ jest.mock('../../../../api/web-api', () => ({ ]) })); -jest.mock('../../../../sonar-ui-common/helpers/pages', () => ({ +jest.mock('../../../../helpers/pages', () => ({ addSideBarClass: jest.fn(), removeSideBarClass: jest.fn() })); diff --git a/server/sonar-web/src/main/js/apps/web-api/routes.ts b/server/sonar-web/src/main/js/apps/web-api/routes.ts index de4eedbd65a..64101820c36 100644 --- a/server/sonar-web/src/main/js/apps/web-api/routes.ts +++ b/server/sonar-web/src/main/js/apps/web-api/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 cbd54a2a37c..86329e02465 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 @@ -23,7 +23,7 @@ import { parseAsOptionalBoolean, parseAsString, serializeString -} from '../../sonar-ui-common/helpers/query'; +} from '../../helpers/query'; export interface Query { search: string; 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 164e6afb170..4ba44aab5d4 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 @@ -21,7 +21,7 @@ import * as React from 'react'; import { Helmet } from 'react-helmet-async'; import { createWebhook, deleteWebhook, searchWebhooks, updateWebhook } from '../../../api/webhooks'; import Suggestions from '../../../app/components/embed-docs-modal/Suggestions'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import PageActions from './PageActions'; import PageHeader from './PageHeader'; import WebhooksList from './WebhooksList'; 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 89679a7515d..cfeb285deed 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 @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { isWebUri } from 'valid-url'; -import InputValidationField from '../../../sonar-ui-common/components/controls/InputValidationField'; -import ValidationModal from '../../../sonar-ui-common/components/controls/ValidationModal'; -import MandatoryFieldMarker from '../../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import InputValidationField from '../../../components/controls/InputValidationField'; +import ValidationModal from '../../../components/controls/ValidationModal'; +import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../../helpers/l10n'; interface Props { onClose: () => void; 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 10f6d69985e..b543fbc1242 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 @@ -18,13 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { - ResetButtonLink, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; interface Props { onClose: () => void; 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 fb5ac01d617..ffd7c4d39d6 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 @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { searchDeliveries } from '../../../api/webhooks'; -import { ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import ListFooter from '../../../sonar-ui-common/components/controls/ListFooter'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink } from '../../../components/controls/buttons'; +import ListFooter from '../../../components/controls/ListFooter'; +import Modal from '../../../components/controls/Modal'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import DeliveryAccordion from './DeliveryAccordion'; interface Props { 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 b4fab1f2dda..42c74882ba9 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 @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { getDelivery } from '../../../api/webhooks'; -import BoxedGroupAccordion from '../../../sonar-ui-common/components/controls/BoxedGroupAccordion'; -import AlertErrorIcon from '../../../sonar-ui-common/components/icons/AlertErrorIcon'; -import AlertSuccessIcon from '../../../sonar-ui-common/components/icons/AlertSuccessIcon'; -import DateTimeFormatter from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; +import BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion'; +import AlertErrorIcon from '../../../components/icons/AlertErrorIcon'; +import AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon'; +import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; import DeliveryItem from './DeliveryItem'; interface Props { 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 5dd449cc09e..bfa6d026a17 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import CodeSnippet from '../../../components/common/CodeSnippet'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; interface Props { className?: string; 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 b12491e5675..012b9466a50 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { getDelivery } from '../../../api/webhooks'; -import { ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ResetButtonLink } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import DeliveryItem from './DeliveryItem'; interface Props { 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 dfe3683c5c7..45fabd72b1c 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import CreateWebhookForm from './CreateWebhookForm'; interface Props { 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 206bba574b8..34f593d8573 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 @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { children?: React.ReactNode; 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 78a4c71408a..5b09c83230e 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 @@ -21,8 +21,8 @@ import * as React from 'react'; import ActionsDropdown, { ActionsDropdownDivider, ActionsDropdownItem -} from '../../../sonar-ui-common/components/controls/ActionsDropdown'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +} from '../../../components/controls/ActionsDropdown'; +import { translate } from '../../../helpers/l10n'; import CreateWebhookForm from './CreateWebhookForm'; import DeleteWebhookForm from './DeleteWebhookForm'; import DeliveriesForm from './DeliveriesForm'; 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 20012c7ab37..22f864d2809 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import WebhookActions from './WebhookActions'; import WebhookItemLatestDelivery from './WebhookItemLatestDelivery'; 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 21c70df97ab..e8e671c10e3 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 @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonIcon } from '../../../sonar-ui-common/components/controls/buttons'; -import AlertErrorIcon from '../../../sonar-ui-common/components/icons/AlertErrorIcon'; -import AlertSuccessIcon from '../../../sonar-ui-common/components/icons/AlertSuccessIcon'; -import BulletListIcon from '../../../sonar-ui-common/components/icons/BulletListIcon'; -import DateTimeFormatter from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonIcon } from '../../../components/controls/buttons'; +import AlertErrorIcon from '../../../components/icons/AlertErrorIcon'; +import AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon'; +import BulletListIcon from '../../../components/icons/BulletListIcon'; +import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; +import { translate } from '../../../helpers/l10n'; import LatestDeliveryForm from './LatestDeliveryForm'; interface Props { 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 9c22e4d4d8a..40f8815a9a9 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 @@ -19,7 +19,7 @@ */ import { sortBy } from 'lodash'; import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import WebhookItem from './WebhookItem'; interface Props { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageActions-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageActions-test.tsx index 152768c5682..f1d41fc6640 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/PageActions-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import PageActions from '../PageActions'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookActions-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookActions-test.tsx index ed0f960e078..db11414cb13 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookActions-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookActions-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import WebhookActions from '../WebhookActions'; const webhook = { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItemLatestDelivery-test.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItemLatestDelivery-test.tsx index 6684c49377e..f7f5b2639b2 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItemLatestDelivery-test.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/WebhookItemLatestDelivery-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import WebhookItemLatestDelivery from '../WebhookItemLatestDelivery'; const latestDelivery = { diff --git a/server/sonar-web/src/main/js/apps/webhooks/routes.ts b/server/sonar-web/src/main/js/apps/webhooks/routes.ts index f57b5528d59..3056655f8ba 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/routes.ts +++ b/server/sonar-web/src/main/js/apps/webhooks/routes.ts @@ -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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../../components/lazyLoadComponent'; const routes = [ { 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 f08f456c69d..fc7368f0708 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.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 { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../lazyLoadComponent'; const SourceViewer = lazyLoadComponent( () => import(/* webpackPrefetch: true */ './SourceViewerBase'), diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx index 51a2089cfa0..949673bb7b1 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx @@ -25,9 +25,9 @@ import { getDuplications, getSources } from '../../api/components'; +import { Alert } from '../../components/ui/Alert'; import { getBranchLikeQuery, isSameBranchLike } from '../../helpers/branch-like'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import { BranchLike } from '../../types/branch-like'; import { WorkspaceContext } from '../workspace/context'; import DuplicationPopup from './components/DuplicationPopup'; 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 c95af38d52e..d108b1442f9 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../components/controls/buttons'; +import { translate } from '../../helpers/l10n'; import { BranchLike } from '../../types/branch-like'; import { MetricKey } from '../../types/metrics'; import Line from './components/Line'; 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 089f44cf40c..cbe62d3d085 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx @@ -20,21 +20,26 @@ import { stringify } from 'querystring'; import * as React from 'react'; import { Link } from 'react-router'; +import { ButtonIcon } from '../../components/controls/buttons'; +import { ClipboardIconButton } from '../../components/controls/clipboard'; +import Dropdown from '../../components/controls/Dropdown'; +import ListIcon from '../../components/icons/ListIcon'; +import QualifierIcon from '../../components/icons/QualifierIcon'; +import { PopupPlacement } from '../../components/ui/popups'; import { getBranchLikeQuery } from '../../helpers/branch-like'; import { ISSUE_TYPES } from '../../helpers/constants'; import { ISSUETYPE_METRIC_KEYS_MAP } from '../../helpers/issues'; -import { getBranchLikeUrl, getCodeUrl, getComponentIssuesUrl } from '../../helpers/urls'; -import { ButtonIcon } from '../../sonar-ui-common/components/controls/buttons'; -import { ClipboardIconButton } from '../../sonar-ui-common/components/controls/clipboard'; -import Dropdown from '../../sonar-ui-common/components/controls/Dropdown'; -import ListIcon from '../../sonar-ui-common/components/icons/ListIcon'; -import QualifierIcon from '../../sonar-ui-common/components/icons/QualifierIcon'; -import { PopupPlacement } from '../../sonar-ui-common/components/ui/popups'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; -import { collapsedDirFromPath, fileFromPath } from '../../sonar-ui-common/helpers/path'; -import { omitNil } from '../../sonar-ui-common/helpers/request'; -import { getBaseUrl, getPathUrlAsString } from '../../sonar-ui-common/helpers/urls'; +import { translate } from '../../helpers/l10n'; +import { formatMeasure } from '../../helpers/measures'; +import { collapsedDirFromPath, fileFromPath } from '../../helpers/path'; +import { omitNil } from '../../helpers/request'; +import { + getBaseUrl, + getBranchLikeUrl, + getCodeUrl, + getComponentIssuesUrl, + getPathUrlAsString +} from '../../helpers/urls'; import { BranchLike } from '../../types/branch-like'; import { ComponentQualifier } from '../../types/component'; import { WorkspaceContextShape } from '../workspace/context'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeaderSlim.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeaderSlim.tsx index 6a160338172..917cc49f1a7 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeaderSlim.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeaderSlim.tsx @@ -20,16 +20,15 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { Link } from 'react-router'; +import { ButtonIcon } from '../../components/controls/buttons'; +import { ClipboardIconButton } from '../../components/controls/clipboard'; +import ExpandSnippetIcon from '../../components/icons/ExpandSnippetIcon'; +import QualifierIcon from '../../components/icons/QualifierIcon'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; import { getBranchLikeQuery } from '../../helpers/branch-like'; -import { getBranchLikeUrl, getComponentIssuesUrl } from '../../helpers/urls'; -import { ButtonIcon } from '../../sonar-ui-common/components/controls/buttons'; -import { ClipboardIconButton } from '../../sonar-ui-common/components/controls/clipboard'; -import ExpandSnippetIcon from '../../sonar-ui-common/components/icons/ExpandSnippetIcon'; -import QualifierIcon from '../../sonar-ui-common/components/icons/QualifierIcon'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { collapsedDirFromPath, fileFromPath } from '../../sonar-ui-common/helpers/path'; -import { getPathUrlAsString } from '../../sonar-ui-common/helpers/urls'; +import { translate } from '../../helpers/l10n'; +import { collapsedDirFromPath, fileFromPath } from '../../helpers/path'; +import { getBranchLikeUrl, getComponentIssuesUrl, getPathUrlAsString } from '../../helpers/urls'; import { BranchLike } from '../../types/branch-like'; import { ComponentQualifier } from '../../types/component'; import './SourceViewerHeaderSlim.css'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerBase-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerBase-test.tsx index 7f9ac1d28a1..3fd9556de43 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerBase-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerBase-test.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { getComponentData, getComponentForSourceViewer, getSources } from '../../../api/components'; import { mockMainBranch } from '../../../helpers/mocks/branch-like'; import { mockIssue, mockSourceLine, mockSourceViewerFile } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import defaultLoadIssues from '../helpers/loadIssues'; import SourceViewerBase from '../SourceViewerBase'; 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 5f64b732f39..3071fbe2ed6 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 @@ -20,12 +20,12 @@ import { groupBy, sortBy } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import { Alert } from '../../../components/ui/Alert'; import { isPullRequest } from '../../../helpers/branch-like'; +import { translate } from '../../../helpers/l10n'; +import { collapsedDirFromPath, fileFromPath } from '../../../helpers/path'; import { getProjectUrl } from '../../../helpers/urls'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { collapsedDirFromPath, fileFromPath } from '../../../sonar-ui-common/helpers/path'; import { BranchLike } from '../../../types/branch-like'; import { WorkspaceContextShape } from '../../workspace/context'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.tsx index 5ca08ba5d0a..0d36d7830ff 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; export interface LineCoverageProps { line: T.SourceLine; 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 74d9e33f258..abaeff59dc9 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 @@ -19,11 +19,11 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import Toggler from '../../../components/controls/Toggler'; +import Tooltip from '../../../components/controls/Tooltip'; +import { PopupPlacement } from '../../../components/ui/popups'; +import { translate } from '../../../helpers/l10n'; export interface LineDuplicationBlockProps { blocksLoaded: boolean; 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 2397856404c..63424aa667b 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 @@ -20,10 +20,10 @@ import * as classNames from 'classnames'; import { uniq } from 'lodash'; import * as React from 'react'; +import Tooltip from '../../../components/controls/Tooltip'; +import IssueIcon from '../../../components/icons/IssueIcon'; import { sortByType } from '../../../helpers/issues'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import IssueIcon from '../../../sonar-ui-common/components/icons/IssueIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; export interface LineIssuesIndicatorProps { issues: T.Issue[]; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineNumber.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineNumber.tsx index 8015ab5d8cc..31be34e3965 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineNumber.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineNumber.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import { translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import Toggler from '../../../components/controls/Toggler'; +import { translateWithParameters } from '../../../helpers/l10n'; import LineOptionsPopup from './LineOptionsPopup'; export interface LineNumberProps { 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 57a43002b9c..7bd16b97b50 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 @@ -18,12 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { getCodeUrl } from '../../../helpers/urls'; -import { ActionsDropdownItem } from '../../../sonar-ui-common/components/controls/ActionsDropdown'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getPathUrlAsString } from '../../../sonar-ui-common/helpers/urls'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import { PopupPlacement } from '../../../components/ui/popups'; +import { translate } from '../../../helpers/l10n'; +import { getCodeUrl, getPathUrlAsString } from '../../../helpers/urls'; +import { ActionsDropdownItem } from '../../controls/ActionsDropdown'; import { SourceViewerContext } from '../SourceViewerContext'; export interface LineOptionsPopupProps { 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 e50618cad7f..f4b892213a1 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,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Dropdown from '../../../sonar-ui-common/components/controls/Dropdown'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import Dropdown from '../../../components/controls/Dropdown'; +import { PopupPlacement } from '../../../components/ui/popups'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import SCMPopup from './SCMPopup'; export interface LineSCMProps { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlay.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlay.tsx index f403e9ab6d6..dbcce374910 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlay.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlay.tsx @@ -23,18 +23,21 @@ import { Link } from 'react-router'; import { getFacets } from '../../../api/issues'; import { getMeasures } from '../../../api/measures'; import { getAllMetrics } from '../../../api/metrics'; +import { ResetButtonLink } from '../../../components/controls/buttons'; +import Modal from '../../../components/controls/Modal'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import TagsIcon from '../../../components/icons/TagsIcon'; +import DuplicationsRating from '../../../components/ui/DuplicationsRating'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; import { ISSUE_TYPES, SEVERITIES } from '../../../helpers/constants'; -import { enhanceMeasuresWithMetrics, getDisplayMetrics } from '../../../helpers/measures'; +import { getLocalizedMetricName, translate } from '../../../helpers/l10n'; +import { + enhanceMeasuresWithMetrics, + formatMeasure, + getDisplayMetrics +} from '../../../helpers/measures'; import { getBranchLikeUrl } from '../../../helpers/urls'; -import { ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../../sonar-ui-common/components/controls/Modal'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import TagsIcon from '../../../sonar-ui-common/components/icons/TagsIcon'; -import DuplicationsRating from '../../../sonar-ui-common/components/ui/DuplicationsRating'; -import { getLocalizedMetricName, translate } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; import { BranchLike } from '../../../types/branch-like'; import Measure from '../../measure/Measure'; import SeverityHelper from '../../shared/SeverityHelper'; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlayMeasure.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlayMeasure.tsx index 394b748d5e8..5931b6e9ccf 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlayMeasure.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlayMeasure.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import { getLocalizedMetricName } from '../../../sonar-ui-common/helpers/l10n'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; +import { getLocalizedMetricName } from '../../../helpers/l10n'; import { isMetricKey, MetricKey } from '../../../types/metrics'; import Measure from '../../measure/Measure'; 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 cd324ab1263..08b523df621 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 @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import DateFormatter from '../../../sonar-ui-common/components/intl/DateFormatter'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; +import DateFormatter from '../../intl/DateFormatter'; export interface SCMPopupProps { line: T.SourceLine; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplicationBlock-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplicationBlock-test.tsx index a0d47ae847e..ce05bd64754 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplicationBlock-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineDuplicationBlock-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import Toggler from '../../../../sonar-ui-common/components/controls/Toggler'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import Toggler from '../../../../components/controls/Toggler'; +import { click } from '../../../../helpers/testUtils'; import { LineDuplicationBlock, LineDuplicationBlockProps } from '../LineDuplicationBlock'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesIndicator-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesIndicator-test.tsx index abba13b5906..66fad92f8fe 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesIndicator-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssuesIndicator-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockIssue } from '../../../../helpers/testMocks'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import { LineIssuesIndicator, LineIssuesIndicatorProps } from '../LineIssuesIndicator'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlay-test.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlay-test.tsx index 1af17b98b44..e000aea59e2 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlay-test.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlay-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockBranch } from '../../../../helpers/mocks/branch-like'; -import { click, waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../../helpers/testUtils'; import { MetricKey } from '../../../../types/metrics'; import MeasuresOverlay from '../MeasuresOverlay'; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/__tests__/__snapshots__/lazyLoadComponent-test.tsx.snap b/server/sonar-web/src/main/js/components/__tests__/__snapshots__/lazyLoadComponent-test.tsx.snap index 9edbac96c7c..9edbac96c7c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/__tests__/__snapshots__/lazyLoadComponent-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/__tests__/__snapshots__/lazyLoadComponent-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/__tests__/lazyLoadComponent-test.tsx b/server/sonar-web/src/main/js/components/__tests__/lazyLoadComponent-test.tsx index 1d481fbfd62..788482d1e90 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/__tests__/lazyLoadComponent-test.tsx +++ b/server/sonar-web/src/main/js/components/__tests__/lazyLoadComponent-test.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { waitAndUpdate } from '../../helpers/testUtils'; import { lazyLoadComponent } from '../lazyLoadComponent'; -const factory = jest.fn().mockImplementation(() => import('../controls/Checkbox')); +const factory = jest.fn().mockImplementation(() => import('../../components/controls/Checkbox')); beforeEach(() => { factory.mockClear(); 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 a0295be6d31..6f50f63de03 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,11 +19,11 @@ */ import { find, sortBy } from 'lodash'; import * as React from 'react'; +import { Button } from '../../components/controls/buttons'; +import Dropdown from '../../components/controls/Dropdown'; +import DropdownIcon from '../../components/icons/DropdownIcon'; +import { getLocalizedMetricName, translate } from '../../helpers/l10n'; import { isDiffMetric } from '../../helpers/measures'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import Dropdown from '../../sonar-ui-common/components/controls/Dropdown'; -import DropdownIcon from '../../sonar-ui-common/components/icons/DropdownIcon'; -import { getLocalizedMetricName, translate } from '../../sonar-ui-common/helpers/l10n'; import AddGraphMetricPopup from './AddGraphMetricPopup'; interface Props { 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 45098fa56a9..c39f8e40803 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,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../components/ui/Alert'; +import { translate, translateWithParameters } from '../../helpers/l10n'; import MultiSelect from '../common/MultiSelect'; export interface AddGraphMetricPopupProps { 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 8e872d882ae..af55a9814a6 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 @@ -19,9 +19,8 @@ */ import * as React from 'react'; import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; -import { getShortType } from '../../helpers/measures'; -import AdvancedTimeline from '../../sonar-ui-common/components/charts/AdvancedTimeline'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; +import AdvancedTimeline from '../../components/charts/AdvancedTimeline'; +import { formatMeasure, getShortType } from '../../helpers/measures'; import { MeasureHistory, Serie } from '../../types/project-activity'; import GraphsLegendCustom from './GraphsLegendCustom'; import GraphsLegendStatic from './GraphsLegendStatic'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx index 74879dc3999..fdc9cf287bf 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx @@ -19,8 +19,8 @@ */ import classNames from 'classnames'; import * as React from 'react'; -import Select from '../../sonar-ui-common/components/controls/Select'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import Select from '../../components/controls/Select'; +import { translate } from '../../helpers/l10n'; import { GraphType } from '../../types/project-activity'; import AddGraphMetric from './AddGraphMetric'; import './styles.css'; 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 b82f6f2406b..8da9f418f94 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 @@ -19,9 +19,9 @@ */ import { isEqual } from 'lodash'; import * as React from 'react'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../sonar-ui-common/helpers/urls'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; +import { translate } from '../../helpers/l10n'; +import { getBaseUrl } from '../../helpers/urls'; import { GraphType, MeasureHistory, Serie } from '../../types/project-activity'; import GraphHistory from './GraphHistory'; import './styles.css'; 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 78cbb66d597..d4019a5c4d5 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../components/controls/Tooltip'; +import { translate } from '../../helpers/l10n'; import { Serie } from '../../types/project-activity'; import GraphsLegendItem from './GraphsLegendItem'; import { hasDataValues } from './utils'; 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 3303a22455f..90a3c46c77f 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 @@ -19,9 +19,9 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { ClearButton } from '../../sonar-ui-common/components/controls/buttons'; -import AlertWarnIcon from '../../sonar-ui-common/components/icons/AlertWarnIcon'; -import ChartLegendIcon from '../../sonar-ui-common/components/icons/ChartLegendIcon'; +import { ClearButton } from '../../components/controls/buttons'; +import AlertWarnIcon from '../../components/icons/AlertWarnIcon'; +import ChartLegendIcon from '../../components/icons/ChartLegendIcon'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendNewCode.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendNewCode.tsx index 65bda38c508..63d82afa4b5 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendNewCode.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendNewCode.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../components/controls/Tooltip'; +import { translate } from '../../helpers/l10n'; export default function GraphsLegendNewCode() { return ( 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 6f0f22c36cf..5fefe862278 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 @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import DateTimeFormatter from '../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { Popup, PopupPlacement } from '../../sonar-ui-common/components/ui/popups'; -import { isDefined } from '../../sonar-ui-common/helpers/types'; +import { Popup, PopupPlacement } from '../../components/ui/popups'; +import { isDefined } from '../../helpers/types'; import { MeasureHistory, Serie } from '../../types/project-activity'; +import DateTimeFormatter from '../intl/DateTimeFormatter'; import GraphsTooltipsContent from './GraphsTooltipsContent'; import GraphsTooltipsContentCoverage from './GraphsTooltipsContentCoverage'; import GraphsTooltipsContentDuplication from './GraphsTooltipsContentDuplication'; 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 3c30e28cf87..ae980d762b7 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ChartLegendIcon from '../../sonar-ui-common/components/icons/ChartLegendIcon'; +import ChartLegendIcon from '../../components/icons/ChartLegendIcon'; interface Props { name: string; 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 482a4503dd8..0af91c5ae7c 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; +import { translate } from '../../helpers/l10n'; +import { formatMeasure } from '../../helpers/measures'; import { MeasureHistory } from '../../types/project-activity'; export interface GraphsTooltipsContentCoverageProps { 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 95839b501d7..afc5f21773a 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; +import { translate } from '../../helpers/l10n'; +import { formatMeasure } from '../../helpers/measures'; import { MeasureHistory } from '../../types/project-activity'; export interface GraphsTooltipsContentDuplicationProps { diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentIssues.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentIssues.tsx index 5346165eea9..14bb68e56b9 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentIssues.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentIssues.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import ChartLegendIcon from '../../sonar-ui-common/components/icons/ChartLegendIcon'; -import Rating from '../../sonar-ui-common/components/ui/Rating'; +import ChartLegendIcon from '../../components/icons/ChartLegendIcon'; +import Rating from '../../components/ui/Rating'; import { MeasureHistory } from '../../types/project-activity'; export interface GraphsTooltipsContentIssuesProps { 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 b2aee06f7fd..8f171dabacf 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer'; -import ZoomTimeLine from '../../sonar-ui-common/components/charts/ZoomTimeLine'; +import ZoomTimeLine from '../../components/charts/ZoomTimeLine'; import { Serie } from '../../types/project-activity'; import { hasHistoryData } from './utils'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphHistory-test.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphHistory-test.tsx index aa6fcc54dd8..a693605fe7b 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphHistory-test.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphHistory-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../helpers/dates'; import GraphHistory from '../GraphHistory'; import { DEFAULT_GRAPH } from '../utils'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsHistory-test.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsHistory-test.tsx index b18469949a3..1f84b51d6f3 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsHistory-test.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsHistory-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../helpers/dates'; import GraphsHistory from '../GraphsHistory'; import { DEFAULT_GRAPH } from '../utils'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsLegendCustom-test.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsLegendCustom-test.tsx index 5829be3deac..1e6e70dd096 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsLegendCustom-test.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsLegendCustom-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../helpers/dates'; import GraphsLegendCustom, { GraphsLegendCustomProps } from '../GraphsLegendCustom'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsLegendItem-test.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsLegendItem-test.tsx index dcac4a82363..fe2425d5e6a 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsLegendItem-test.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsLegendItem-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { ClearButton } from '../../../sonar-ui-common/components/controls/buttons'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { ClearButton } from '../../../components/controls/buttons'; +import { click } from '../../../helpers/testUtils'; import GraphsLegendItem from '../GraphsLegendItem'; it('should render correctly a legend', () => { diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltips-test.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltips-test.tsx index 6bb92900cf5..1358dd2e40f 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltips-test.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltips-test.tsx @@ -20,8 +20,8 @@ import { shallow } from 'enzyme'; import * as React from 'react'; +import { parseDate } from '../../../helpers/dates'; import { mockEvent } from '../../../helpers/testMocks'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; import GraphsTooltips from '../GraphsTooltips'; import { DEFAULT_GRAPH } from '../utils'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentCoverage-test.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentCoverage-test.tsx index 9f89feeeddd..03bd44c725d 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentCoverage-test.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentCoverage-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../helpers/dates'; import GraphsTooltipsContentCoverage, { GraphsTooltipsContentCoverageProps } from '../GraphsTooltipsContentCoverage'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentDuplication-test.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentDuplication-test.tsx index cf994c06583..d8109f78c61 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentDuplication-test.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentDuplication-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../helpers/dates'; import GraphsTooltipsContentDuplication, { GraphsTooltipsContentDuplicationProps } from '../GraphsTooltipsContentDuplication'; diff --git a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentIssues-test.tsx b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentIssues-test.tsx index 635e8fee88a..84c2d59d38c 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentIssues-test.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltipsContentIssues-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../helpers/dates'; import GraphsTooltipsContentIssues, { GraphsTooltipsContentIssuesProps } from '../GraphsTooltipsContentIssues'; 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 6e26f2f9e5e..2b1eeca21b6 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as dates from '../../../sonar-ui-common/helpers/dates'; +import * as dates from '../../../helpers/dates'; import { MetricKey } from '../../../types/metrics'; import { GraphType, Serie } from '../../../types/project-activity'; import * as utils from '../utils'; 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 c4b13e1887c..c0d44ce9c41 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { chunk, flatMap, groupBy, sortBy } from 'lodash'; +import { getLocalizedMetricName, translate } from '../../helpers/l10n'; import { localizeMetric } from '../../helpers/measures'; -import { getLocalizedMetricName, translate } from '../../sonar-ui-common/helpers/l10n'; -import { get, save } from '../../sonar-ui-common/helpers/storage'; +import { get, save } from '../../helpers/storage'; import { MetricKey } from '../../types/metrics'; import { GraphType, MeasureHistory, Serie } from '../../types/project-activity'; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/AdvancedTimeline.css b/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.css index d71ef2dee96..d71ef2dee96 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/AdvancedTimeline.css +++ b/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/AdvancedTimeline.tsx b/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.tsx index 6263de1a6a6..6263de1a6a6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/AdvancedTimeline.tsx +++ b/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/BarChart.css b/server/sonar-web/src/main/js/components/charts/BarChart.css index 849885a4cda..849885a4cda 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/BarChart.css +++ b/server/sonar-web/src/main/js/components/charts/BarChart.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/BarChart.tsx b/server/sonar-web/src/main/js/components/charts/BarChart.tsx index 210dc3acf0a..210dc3acf0a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/BarChart.tsx +++ b/server/sonar-web/src/main/js/components/charts/BarChart.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/BubbleChart.css b/server/sonar-web/src/main/js/components/charts/BubbleChart.css index c5faa9af5a1..c5faa9af5a1 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/BubbleChart.css +++ b/server/sonar-web/src/main/js/components/charts/BubbleChart.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/BubbleChart.tsx b/server/sonar-web/src/main/js/components/charts/BubbleChart.tsx index 75d3172ea80..75d3172ea80 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/BubbleChart.tsx +++ b/server/sonar-web/src/main/js/components/charts/BubbleChart.tsx 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 67605e1db0e..8dc53e8e0dd 100644 --- a/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.tsx +++ b/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.tsx @@ -20,7 +20,7 @@ import * as classNames from 'classnames'; import { ScaleLinear, ScaleOrdinal } from 'd3-scale'; import * as React from 'react'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; +import { formatMeasure } from '../../helpers/measures'; import './ColorBoxLegend.css'; interface Props { diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/ColorGradientLegend.css b/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.css index a6c96275921..a6c96275921 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/ColorGradientLegend.css +++ b/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/ColorGradientLegend.tsx b/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.tsx index 9cfc0f92203..9cfc0f92203 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/ColorGradientLegend.tsx +++ b/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.tsx diff --git a/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.tsx b/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.tsx index cce95472cc0..b51b8b3e9b0 100644 --- a/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.tsx +++ b/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.tsx @@ -19,11 +19,11 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; +import { ButtonLink } from '../../components/controls/buttons'; +import Tooltip from '../../components/controls/Tooltip'; import { RATING_COLORS } from '../../helpers/constants'; -import { ButtonLink } from '../../sonar-ui-common/components/controls/buttons'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; +import { translate } from '../../helpers/l10n'; +import { formatMeasure } from '../../helpers/measures'; import './ColorBoxLegend.css'; export interface ColorRatingsLegendProps { diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/DonutChart.tsx b/server/sonar-web/src/main/js/components/charts/DonutChart.tsx index 223e0c26cf8..223e0c26cf8 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/DonutChart.tsx +++ b/server/sonar-web/src/main/js/components/charts/DonutChart.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/Histogram.css b/server/sonar-web/src/main/js/components/charts/Histogram.css index 8ca78c53e4b..8ca78c53e4b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/Histogram.css +++ b/server/sonar-web/src/main/js/components/charts/Histogram.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/Histogram.tsx b/server/sonar-web/src/main/js/components/charts/Histogram.tsx index a4ae509a2ef..a4ae509a2ef 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/Histogram.tsx +++ b/server/sonar-web/src/main/js/components/charts/Histogram.tsx 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 f603b34a89e..c8dba29b8be 100644 --- a/server/sonar-web/src/main/js/components/charts/LanguageDistribution.tsx +++ b/server/sonar-web/src/main/js/components/charts/LanguageDistribution.tsx @@ -19,9 +19,9 @@ */ import { sortBy } from 'lodash'; import * as React from 'react'; -import Histogram from '../../sonar-ui-common/components/charts/Histogram'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; +import Histogram from '../../components/charts/Histogram'; +import { translate } from '../../helpers/l10n'; +import { formatMeasure } from '../../helpers/measures'; interface Props { alignTicks?: boolean; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/LineChart.css b/server/sonar-web/src/main/js/components/charts/LineChart.css index 37d7f95698c..37d7f95698c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/LineChart.css +++ b/server/sonar-web/src/main/js/components/charts/LineChart.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/LineChart.tsx b/server/sonar-web/src/main/js/components/charts/LineChart.tsx index 9cf7f76623b..9cf7f76623b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/LineChart.tsx +++ b/server/sonar-web/src/main/js/components/charts/LineChart.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/TreeMap.css b/server/sonar-web/src/main/js/components/charts/TreeMap.css index fe9e1d24b18..fe9e1d24b18 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/TreeMap.css +++ b/server/sonar-web/src/main/js/components/charts/TreeMap.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/TreeMap.tsx b/server/sonar-web/src/main/js/components/charts/TreeMap.tsx index 3a6e25112a7..3a6e25112a7 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/TreeMap.tsx +++ b/server/sonar-web/src/main/js/components/charts/TreeMap.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/TreeMapRect.tsx b/server/sonar-web/src/main/js/components/charts/TreeMapRect.tsx index 9a2f86e7af9..9a2f86e7af9 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/TreeMapRect.tsx +++ b/server/sonar-web/src/main/js/components/charts/TreeMapRect.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/ZoomTimeLine.css b/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.css index 21997431077..21997431077 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/ZoomTimeLine.css +++ b/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/ZoomTimeLine.tsx b/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.tsx index 8b37a6a2587..8b37a6a2587 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/ZoomTimeLine.tsx +++ b/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/AdvancedTimeline-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/AdvancedTimeline-test.tsx index 77f2aafcceb..77f2aafcceb 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/AdvancedTimeline-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/AdvancedTimeline-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/BarChart-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/BarChart-test.tsx index 794bb3ace38..794bb3ace38 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/BarChart-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/BarChart-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/BubbleChart-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/BubbleChart-test.tsx index 3be36c3677d..3be36c3677d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/BubbleChart-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/BubbleChart-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/ColorGradientLegend-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/ColorGradientLegend-test.tsx index 636a0d9c50f..b9d0bb216a0 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/ColorGradientLegend-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/ColorGradientLegend-test.tsx @@ -20,7 +20,7 @@ import { scaleLinear } from 'd3-scale'; import { shallow } from 'enzyme'; import * as React from 'react'; -import testTheme from '../../../config/jest/testTheme'; +import testTheme from '../../../../../../config/jest/testTheme'; import ColorGradientLegend from '../ColorGradientLegend'; const { colors } = testTheme; diff --git a/server/sonar-web/src/main/js/components/charts/__tests__/ColorRatingsLegend-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/ColorRatingsLegend-test.tsx index 7638e1288e8..3775b169fa8 100644 --- a/server/sonar-web/src/main/js/components/charts/__tests__/ColorRatingsLegend-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/ColorRatingsLegend-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; +import { ButtonLink } from '../../../components/controls/buttons'; import ColorRatingsLegend, { ColorRatingsLegendProps } from '../ColorRatingsLegend'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/DonutChart-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/DonutChart-test.tsx index 5a21985e96f..5a21985e96f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/DonutChart-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/DonutChart-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/Histogram-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/Histogram-test.tsx index 15f4754aae0..15f4754aae0 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/Histogram-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/Histogram-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/LineChart-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/LineChart-test.tsx index 9e42fe3395b..9e42fe3395b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/LineChart-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/LineChart-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/TreeMap-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/TreeMap-test.tsx index d4879956f2b..d4879956f2b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/TreeMap-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/TreeMap-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/ZoomTimeLine-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/ZoomTimeLine-test.tsx index cd354a45b20..415accfd48d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/ZoomTimeLine-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/ZoomTimeLine-test.tsx @@ -20,7 +20,7 @@ import { scaleTime } from 'd3-scale'; import { shallow } from 'enzyme'; import * as React from 'react'; -import testTheme from '../../../config/jest/testTheme'; +import testTheme from '../../../../../../config/jest/testTheme'; import ZoomTimeLine from '../ZoomTimeLine'; const series = [ diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/AdvancedTimeline-test.tsx.snap b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/AdvancedTimeline-test.tsx.snap index f4569f0f9fa..f4569f0f9fa 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/AdvancedTimeline-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/AdvancedTimeline-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/BubbleChart-test.tsx.snap b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/BubbleChart-test.tsx.snap index b0f69f95417..b0f69f95417 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/BubbleChart-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/BubbleChart-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/ColorGradientLegend-test.tsx.snap b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/ColorGradientLegend-test.tsx.snap index 0bbe8ee462d..0bbe8ee462d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/ColorGradientLegend-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/ColorGradientLegend-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/DonutChart-test.tsx.snap b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/DonutChart-test.tsx.snap index f4da702a0d2..f4da702a0d2 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/DonutChart-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/DonutChart-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/Histogram-test.tsx.snap b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/Histogram-test.tsx.snap index f52a4ea6cf3..f52a4ea6cf3 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/Histogram-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/Histogram-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/ZoomTimeLine-test.tsx.snap b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/ZoomTimeLine-test.tsx.snap index adb3c28e914..adb3c28e914 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/charts/__tests__/__snapshots__/ZoomTimeLine-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/charts/__tests__/__snapshots__/ZoomTimeLine-test.tsx.snap 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 4d6afcb46ab..7ef4f0c9948 100644 --- a/server/sonar-web/src/main/js/components/common/ActivityLink.tsx +++ b/server/sonar-web/src/main/js/components/common/ActivityLink.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import HistoryIcon from '../../components/icons/HistoryIcon'; +import { translate } from '../../helpers/l10n'; import { getActivityUrl, getMeasureHistoryUrl } from '../../helpers/urls'; -import HistoryIcon from '../../sonar-ui-common/components/icons/HistoryIcon'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; import { BranchLike } from '../../types/branch-like'; import { GraphType } from '../../types/project-activity'; import { isCustomGraph } from '../activity-graph/utils'; diff --git a/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx b/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx index f107a35e31a..a426bcc7bf6 100644 --- a/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx +++ b/server/sonar-web/src/main/js/components/common/AnalysisWarningsModal.tsx @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { dismissAnalysisWarning, getTask } from '../../api/ce'; +import { ButtonLink } from '../../components/controls/buttons'; +import Modal from '../../components/controls/Modal'; +import WarningIcon from '../../components/icons/WarningIcon'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; +import { translate } from '../../helpers/l10n'; import { sanitizeStringRestricted } from '../../helpers/sanitize'; -import { ButtonLink } from '../../sonar-ui-common/components/controls/buttons'; -import Modal from '../../sonar-ui-common/components/controls/Modal'; -import WarningIcon from '../../sonar-ui-common/components/icons/WarningIcon'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; import { TaskWarning } from '../../types/tasks'; import { withCurrentUser } from '../hoc/withCurrentUser'; diff --git a/server/sonar-web/src/main/js/components/common/BranchStatus.tsx b/server/sonar-web/src/main/js/components/common/BranchStatus.tsx index 98bdd0eef0f..74249e8fd72 100644 --- a/server/sonar-web/src/main/js/components/common/BranchStatus.tsx +++ b/server/sonar-web/src/main/js/components/common/BranchStatus.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import Level from '../../sonar-ui-common/components/ui/Level'; +import Level from '../../components/ui/Level'; import { getBranchStatusByBranchLike, Store } from '../../store/rootReducer'; import { BranchLike } from '../../types/branch-like'; diff --git a/server/sonar-web/src/main/js/components/common/CodeSnippet.tsx b/server/sonar-web/src/main/js/components/common/CodeSnippet.tsx index e6d26f826b5..7a48b5929c2 100644 --- a/server/sonar-web/src/main/js/components/common/CodeSnippet.tsx +++ b/server/sonar-web/src/main/js/components/common/CodeSnippet.tsx @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { ClipboardButton } from '../../sonar-ui-common/components/controls/clipboard'; -import { isDefined } from '../../sonar-ui-common/helpers/types'; +import { ClipboardButton } from '../../components/controls/clipboard'; +import { isDefined } from '../../helpers/types'; import './CodeSnippet.css'; export interface CodeSnippetProps { 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 ba057c4cc21..b3b82e9fd31 100644 --- a/server/sonar-web/src/main/js/components/common/DisableableSelectOption.tsx +++ b/server/sonar-web/src/main/js/components/common/DisableableSelectOption.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; +import Tooltip from '../../components/controls/Tooltip'; export interface DisableableSelectOptionProps { className?: string; diff --git a/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx b/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx index f241884c67c..62de7cb0281 100644 --- a/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx +++ b/server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; import { Link } from 'react-router'; import { isWebUri } from 'valid-url'; -import HelpTooltip from '../../sonar-ui-common/components/controls/HelpTooltip'; -import DetachIcon from '../../sonar-ui-common/components/icons/DetachIcon'; +import HelpTooltip from '../../components/controls/HelpTooltip'; +import DetachIcon from '../../components/icons/DetachIcon'; export interface DocumentationTooltipProps { children?: React.ReactNode; 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 3091ad24715..45b359a0084 100644 --- a/server/sonar-web/src/main/js/components/common/EmptySearch.tsx +++ b/server/sonar-web/src/main/js/components/common/EmptySearch.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import './EmptySearch.css'; export default function EmptySearch() { diff --git a/server/sonar-web/src/main/js/components/common/FiltersHeader.tsx b/server/sonar-web/src/main/js/components/common/FiltersHeader.tsx index 216366e6e59..5d62cfb1bc4 100644 --- a/server/sonar-web/src/main/js/components/common/FiltersHeader.tsx +++ b/server/sonar-web/src/main/js/components/common/FiltersHeader.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../components/controls/buttons'; +import { translate } from '../../helpers/l10n'; interface Props { displayReset: boolean; 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 6e12fd4521f..6753e640435 100644 --- a/server/sonar-web/src/main/js/components/common/FormattingTips.tsx +++ b/server/sonar-web/src/main/js/components/common/FormattingTips.tsx @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; +import { translate } from '../../helpers/l10n'; import { getFormattingHelpUrl } from '../../helpers/urls'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/components/common/MeasuresLink.tsx b/server/sonar-web/src/main/js/components/common/MeasuresLink.tsx index 106b193920a..6b5cba0ba25 100644 --- a/server/sonar-web/src/main/js/components/common/MeasuresLink.tsx +++ b/server/sonar-web/src/main/js/components/common/MeasuresLink.tsx @@ -20,9 +20,9 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { Link } from 'react-router'; +import MeasuresIcon from '../../components/icons/MeasuresIcon'; +import { translate } from '../../helpers/l10n'; import { getComponentDrilldownUrl } from '../../helpers/urls'; -import MeasuresIcon from '../../sonar-ui-common/components/icons/MeasuresIcon'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; import { BranchLike } from '../../types/branch-like'; import './MeasuresLink.css'; diff --git a/server/sonar-web/src/main/js/components/common/MultiSelect.tsx b/server/sonar-web/src/main/js/components/common/MultiSelect.tsx index 430aa020c64..b5f7e396bab 100644 --- a/server/sonar-web/src/main/js/components/common/MultiSelect.tsx +++ b/server/sonar-web/src/main/js/components/common/MultiSelect.tsx @@ -20,8 +20,8 @@ import * as classNames from 'classnames'; import { difference } from 'lodash'; import * as React from 'react'; -import SearchBox from '../../sonar-ui-common/components/controls/SearchBox'; -import { translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import SearchBox from '../../components/controls/SearchBox'; +import { translateWithParameters } from '../../helpers/l10n'; import MultiSelectOption from './MultiSelectOption'; interface Props { diff --git a/server/sonar-web/src/main/js/components/common/MultiSelectOption.tsx b/server/sonar-web/src/main/js/components/common/MultiSelectOption.tsx index 244c85cb2a9..03b55c64491 100644 --- a/server/sonar-web/src/main/js/components/common/MultiSelectOption.tsx +++ b/server/sonar-web/src/main/js/components/common/MultiSelectOption.tsx @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import Checkbox from '../../sonar-ui-common/components/controls/Checkbox'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import Checkbox from '../../components/controls/Checkbox'; +import { translate } from '../../helpers/l10n'; export interface MultiSelectOptionProps { active?: boolean; 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 40bc2808ddc..9eef4e4c03e 100644 --- a/server/sonar-web/src/main/js/components/common/PageCounter.tsx +++ b/server/sonar-web/src/main/js/components/common/PageCounter.tsx @@ -19,7 +19,7 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; +import { formatMeasure } from '../../helpers/measures'; export interface PageCounterProps { className?: string; 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 c8f4200691e..1b8d1113d09 100644 --- a/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx +++ b/server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../components/controls/Tooltip'; +import { translate } from '../../helpers/l10n'; interface PrivacyBadgeContainerProps { className?: string; diff --git a/server/sonar-web/src/main/js/components/common/ProjectKeyInput.tsx b/server/sonar-web/src/main/js/components/common/ProjectKeyInput.tsx index 5a8ae7c92cf..0218d9d1086 100644 --- a/server/sonar-web/src/main/js/components/common/ProjectKeyInput.tsx +++ b/server/sonar-web/src/main/js/components/common/ProjectKeyInput.tsx @@ -19,9 +19,9 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; +import ValidationInput from '../../components/controls/ValidationInput'; import { PROJECT_KEY_MAX_LEN } from '../../helpers/constants'; -import ValidationInput from '../../sonar-ui-common/components/controls/ValidationInput'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; export interface ProjectKeyInputProps { error?: string; 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 d0de4ad77e9..d25834908cd 100644 --- a/server/sonar-web/src/main/js/components/common/ResetPasswordForm.tsx +++ b/server/sonar-web/src/main/js/components/common/ResetPasswordForm.tsx @@ -19,11 +19,11 @@ */ import * as React from 'react'; import { changePassword } from '../../api/users'; -import { SubmitButton } from '../../sonar-ui-common/components/controls/buttons'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import MandatoryFieldMarker from '../../sonar-ui-common/components/ui/MandatoryFieldMarker'; -import MandatoryFieldsExplanation from '../../sonar-ui-common/components/ui/MandatoryFieldsExplanation'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { SubmitButton } from '../../components/controls/buttons'; +import { Alert } from '../../components/ui/Alert'; +import MandatoryFieldMarker from '../../components/ui/MandatoryFieldMarker'; +import MandatoryFieldsExplanation from '../../components/ui/MandatoryFieldsExplanation'; +import { translate } from '../../helpers/l10n'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/components/common/RestartButton.tsx b/server/sonar-web/src/main/js/components/common/RestartButton.tsx index 22215f367e3..74256cb6acf 100644 --- a/server/sonar-web/src/main/js/components/common/RestartButton.tsx +++ b/server/sonar-web/src/main/js/components/common/RestartButton.tsx @@ -20,9 +20,9 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { restart } from '../../api/system'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import ConfirmButton from '../../sonar-ui-common/components/controls/ConfirmButton'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../components/controls/buttons'; +import ConfirmButton from '../../components/controls/ConfirmButton'; +import { translate } from '../../helpers/l10n'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/components/common/SelectListItem.tsx b/server/sonar-web/src/main/js/components/common/SelectListItem.tsx index d3f52082451..31abb2c3b2d 100644 --- a/server/sonar-web/src/main/js/components/common/SelectListItem.tsx +++ b/server/sonar-web/src/main/js/components/common/SelectListItem.tsx @@ -19,7 +19,7 @@ */ import classNames from 'classnames'; import * as React from 'react'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; +import Tooltip from '../../components/controls/Tooltip'; interface Props { active?: string; 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 f158f69abcd..34d90f14fc2 100644 --- a/server/sonar-web/src/main/js/components/common/StatusIndicator.tsx +++ b/server/sonar-web/src/main/js/components/common/StatusIndicator.tsx @@ -19,7 +19,7 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import './StatusIndicator.css'; export interface StatusIndicatorProps { 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 663a3a5bf3b..2597eff618b 100644 --- a/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx +++ b/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import Radio from '../../sonar-ui-common/components/controls/Radio'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import Radio from '../../components/controls/Radio'; +import { translate } from '../../helpers/l10n'; interface Props { canTurnToPrivate?: boolean; diff --git a/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx index a4289821d20..cddd9a1b274 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { dismissAnalysisWarning, getTask } from '../../../api/ce'; import { mockTaskWarning } from '../../../helpers/mocks/tasks'; import { mockCurrentUser, mockEvent } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { AnalysisWarningsModal } from '../AnalysisWarningsModal'; jest.mock('../../../api/ce', () => ({ 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 19a384037b0..5df48de49d5 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 @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import FormattingTips from '../FormattingTips'; const originalOpen = window.open; diff --git a/server/sonar-web/src/main/js/components/common/__tests__/ProjectKeyInput-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/ProjectKeyInput-test.tsx index 3a4a6aaf997..6b0449cd9af 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/ProjectKeyInput-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/ProjectKeyInput-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import ValidationInput from '../../../sonar-ui-common/components/controls/ValidationInput'; +import ValidationInput from '../../../components/controls/ValidationInput'; import ProjectKeyInput, { ProjectKeyInputProps } from '../ProjectKeyInput'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/components/common/__tests__/ResetPasswordForm-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/ResetPasswordForm-test.tsx index 2650c54e9c3..5e83ae6ccc1 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/ResetPasswordForm-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/ResetPasswordForm-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { changePassword } from '../../../api/users'; import { mockEvent, mockLoggedInUser } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import ResetPasswordForm from '../ResetPasswordForm'; jest.mock('../../../api/users', () => ({ diff --git a/server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.tsx index ce778d7f3fe..8c4449fcf9b 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.tsx @@ -19,7 +19,7 @@ */ import { mount, shallow } from 'enzyme'; import * as React from 'react'; -import { click, keydown } from '../../../sonar-ui-common/helpers/testUtils'; +import { click, keydown } from '../../../helpers/testUtils'; import SelectList from '../SelectList'; import SelectListItem from '../SelectListItem'; diff --git a/server/sonar-web/src/main/js/components/common/__tests__/VisibilitySelector-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/VisibilitySelector-test.tsx index 5dce0b915af..edf7e3cce4a 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/VisibilitySelector-test.tsx +++ b/server/sonar-web/src/main/js/components/common/__tests__/VisibilitySelector-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; +import Radio from '../../../components/controls/Radio'; import VisibilitySelector from '../VisibilitySelector'; it('changes visibility', () => { diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ActionsDropdown.tsx b/server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx index 0f161597a07..0f161597a07 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ActionsDropdown.tsx +++ b/server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/BackButton.tsx b/server/sonar-web/src/main/js/components/controls/BackButton.tsx index 3a4010a7a86..3a4010a7a86 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/BackButton.tsx +++ b/server/sonar-web/src/main/js/components/controls/BackButton.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/BoxedGroupAccordion.tsx b/server/sonar-web/src/main/js/components/controls/BoxedGroupAccordion.tsx index 619b59ca330..619b59ca330 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/BoxedGroupAccordion.tsx +++ b/server/sonar-web/src/main/js/components/controls/BoxedGroupAccordion.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/BoxedTabs.tsx b/server/sonar-web/src/main/js/components/controls/BoxedTabs.tsx index 4429741e96b..4429741e96b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/BoxedTabs.tsx +++ b/server/sonar-web/src/main/js/components/controls/BoxedTabs.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Checkbox.css b/server/sonar-web/src/main/js/components/controls/Checkbox.css index 6306f855eb6..6306f855eb6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Checkbox.css +++ b/server/sonar-web/src/main/js/components/controls/Checkbox.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Checkbox.tsx b/server/sonar-web/src/main/js/components/controls/Checkbox.tsx index 5fb87ddbf03..5fb87ddbf03 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Checkbox.tsx +++ b/server/sonar-web/src/main/js/components/controls/Checkbox.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ClickEventBoundary.tsx b/server/sonar-web/src/main/js/components/controls/ClickEventBoundary.tsx index db7d0dc1c93..db7d0dc1c93 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ClickEventBoundary.tsx +++ b/server/sonar-web/src/main/js/components/controls/ClickEventBoundary.tsx 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 e0c4b00f660..cda9d227437 100644 --- a/server/sonar-web/src/main/js/components/controls/ComponentReportActions.tsx +++ b/server/sonar-web/src/main/js/components/controls/ComponentReportActions.tsx @@ -25,8 +25,8 @@ import { unsubscribeFromEmailReport } from '../../api/component-report'; import addGlobalSuccessMessage from '../../app/utils/addGlobalSuccessMessage'; +import { translate, translateWithParameters } from '../../helpers/l10n'; import { isLoggedIn } from '../../helpers/users'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; import { Store } from '../../store/rootReducer'; import { Branch } from '../../types/branch-like'; import { ComponentQualifier } from '../../types/component'; 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 581ec4da87e..ed1d82e8df9 100644 --- a/server/sonar-web/src/main/js/components/controls/ComponentReportActionsRenderer.tsx +++ b/server/sonar-web/src/main/js/components/controls/ComponentReportActionsRenderer.tsx @@ -20,10 +20,10 @@ import * as React from 'react'; import { getReportUrl } from '../../api/component-report'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import Dropdown from '../../sonar-ui-common/components/controls/Dropdown'; -import DropdownIcon from '../../sonar-ui-common/components/icons/DropdownIcon'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../components/controls/buttons'; +import Dropdown from '../../components/controls/Dropdown'; +import DropdownIcon from '../../components/icons/DropdownIcon'; +import { translate, translateWithParameters } from '../../helpers/l10n'; import { Branch } from '../../types/branch-like'; export interface ComponentReportActionsRendererProps { diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ConfirmButton.tsx b/server/sonar-web/src/main/js/components/controls/ConfirmButton.tsx index 9ab6717f2b7..9ab6717f2b7 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ConfirmButton.tsx +++ b/server/sonar-web/src/main/js/components/controls/ConfirmButton.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ConfirmModal.tsx b/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx index 61bf510c57d..61bf510c57d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ConfirmModal.tsx +++ b/server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx diff --git a/server/sonar-web/src/main/js/components/controls/DateInput.tsx b/server/sonar-web/src/main/js/components/controls/DateInput.tsx index eb1d5422093..0c5dc5421f4 100644 --- a/server/sonar-web/src/main/js/components/controls/DateInput.tsx +++ b/server/sonar-web/src/main/js/components/controls/DateInput.tsx @@ -26,18 +26,14 @@ import { range } from 'lodash'; import * as React from 'react'; import { DayModifiers, Modifier, Modifiers } from 'react-day-picker'; import { InjectedIntlProps, injectIntl } from 'react-intl'; -import { ButtonIcon, ClearButton } from '../../sonar-ui-common/components/controls/buttons'; -import OutsideClickHandler from '../../sonar-ui-common/components/controls/OutsideClickHandler'; -import Select from '../../sonar-ui-common/components/controls/Select'; -import CalendarIcon from '../../sonar-ui-common/components/icons/CalendarIcon'; -import ChevronLeftIcon from '../../sonar-ui-common/components/icons/ChevronLeftIcon'; -import ChevronRightIcon from '../../sonar-ui-common/components/icons/ChevronRightIcon'; -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; -import { - getShortMonthName, - getShortWeekDayName, - getWeekDayName -} from '../../sonar-ui-common/helpers/l10n'; +import { ButtonIcon, ClearButton } from '../../components/controls/buttons'; +import OutsideClickHandler from '../../components/controls/OutsideClickHandler'; +import Select from '../../components/controls/Select'; +import CalendarIcon from '../../components/icons/CalendarIcon'; +import ChevronLeftIcon from '../../components/icons/ChevronLeftIcon'; +import ChevronRightIcon from '../../components/icons/ChevronRightIcon'; +import { getShortMonthName, getShortWeekDayName, getWeekDayName } from '../../helpers/l10n'; +import { lazyLoadComponent } from '../lazyLoadComponent'; import './DayPicker.css'; import './styles.css'; diff --git a/server/sonar-web/src/main/js/components/controls/DateRangeInput.tsx b/server/sonar-web/src/main/js/components/controls/DateRangeInput.tsx index 371ad27425a..fae75f672ce 100644 --- a/server/sonar-web/src/main/js/components/controls/DateRangeInput.tsx +++ b/server/sonar-web/src/main/js/components/controls/DateRangeInput.tsx @@ -20,7 +20,7 @@ import * as classNames from 'classnames'; import { max, min } from 'date-fns'; import * as React from 'react'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import DateInput from './DateInput'; type DateRange = { from?: Date; to?: Date }; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/DocumentClickHandler.tsx b/server/sonar-web/src/main/js/components/controls/DocumentClickHandler.tsx index 45765c95874..45765c95874 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/DocumentClickHandler.tsx +++ b/server/sonar-web/src/main/js/components/controls/DocumentClickHandler.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Dropdown.css b/server/sonar-web/src/main/js/components/controls/Dropdown.css index 41b7bd79b15..41b7bd79b15 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Dropdown.css +++ b/server/sonar-web/src/main/js/components/controls/Dropdown.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Dropdown.tsx b/server/sonar-web/src/main/js/components/controls/Dropdown.tsx index 92b1444aeb7..92b1444aeb7 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Dropdown.tsx +++ b/server/sonar-web/src/main/js/components/controls/Dropdown.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/EscKeydownHandler.tsx b/server/sonar-web/src/main/js/components/controls/EscKeydownHandler.tsx index 487bf13a6af..487bf13a6af 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/EscKeydownHandler.tsx +++ b/server/sonar-web/src/main/js/components/controls/EscKeydownHandler.tsx 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 3c0ba619fc3..4e4ac79dff9 100644 --- a/server/sonar-web/src/main/js/components/controls/Favorite.tsx +++ b/server/sonar-web/src/main/js/components/controls/Favorite.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { addFavorite, removeFavorite } from '../../api/favorites'; -import FavoriteButton from '../../sonar-ui-common/components/controls/FavoriteButton'; +import FavoriteButton from '../../components/controls/FavoriteButton'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/FavoriteButton.tsx b/server/sonar-web/src/main/js/components/controls/FavoriteButton.tsx index e3727dd338a..e3727dd338a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/FavoriteButton.tsx +++ b/server/sonar-web/src/main/js/components/controls/FavoriteButton.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/GlobalMessages.tsx b/server/sonar-web/src/main/js/components/controls/GlobalMessages.tsx index 8a68c914bda..8a68c914bda 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/GlobalMessages.tsx +++ b/server/sonar-web/src/main/js/components/controls/GlobalMessages.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/HelpTooltip.css b/server/sonar-web/src/main/js/components/controls/HelpTooltip.css index 11376bc7c33..11376bc7c33 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/HelpTooltip.css +++ b/server/sonar-web/src/main/js/components/controls/HelpTooltip.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/HelpTooltip.tsx b/server/sonar-web/src/main/js/components/controls/HelpTooltip.tsx index a046f726147..a046f726147 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/HelpTooltip.tsx +++ b/server/sonar-web/src/main/js/components/controls/HelpTooltip.tsx 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 64c804bd697..a0aa83571d2 100644 --- a/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx +++ b/server/sonar-web/src/main/js/components/controls/HomePageSelect.tsx @@ -20,11 +20,11 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { connect } from 'react-redux'; +import { ButtonLink } from '../../components/controls/buttons'; +import Tooltip from '../../components/controls/Tooltip'; +import HomeIcon from '../../components/icons/HomeIcon'; +import { translate } from '../../helpers/l10n'; import { isLoggedIn } from '../../helpers/users'; -import { ButtonLink } from '../../sonar-ui-common/components/controls/buttons'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; -import HomeIcon from '../../sonar-ui-common/components/icons/HomeIcon'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; import { getCurrentUser, Store } from '../../store/rootReducer'; import { setHomePage } from '../../store/users'; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/IdentityProviderLink.css b/server/sonar-web/src/main/js/components/controls/IdentityProviderLink.css index 889f14acf90..889f14acf90 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/IdentityProviderLink.css +++ b/server/sonar-web/src/main/js/components/controls/IdentityProviderLink.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/IdentityProviderLink.tsx b/server/sonar-web/src/main/js/components/controls/IdentityProviderLink.tsx index 31dd2da7e00..31dd2da7e00 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/IdentityProviderLink.tsx +++ b/server/sonar-web/src/main/js/components/controls/IdentityProviderLink.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/InputValidationField.tsx b/server/sonar-web/src/main/js/components/controls/InputValidationField.tsx index bb9cfcab90f..bb9cfcab90f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/InputValidationField.tsx +++ b/server/sonar-web/src/main/js/components/controls/InputValidationField.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ListFooter.tsx b/server/sonar-web/src/main/js/components/controls/ListFooter.tsx index 8617c126d65..8617c126d65 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ListFooter.tsx +++ b/server/sonar-web/src/main/js/components/controls/ListFooter.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Modal.css b/server/sonar-web/src/main/js/components/controls/Modal.css index 04e3de15a21..04e3de15a21 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Modal.css +++ b/server/sonar-web/src/main/js/components/controls/Modal.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Modal.tsx b/server/sonar-web/src/main/js/components/controls/Modal.tsx index d97d9e1522b..d97d9e1522b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Modal.tsx +++ b/server/sonar-web/src/main/js/components/controls/Modal.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ModalButton.tsx b/server/sonar-web/src/main/js/components/controls/ModalButton.tsx index 7008f3e3979..7008f3e3979 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ModalButton.tsx +++ b/server/sonar-web/src/main/js/components/controls/ModalButton.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ModalValidationField.tsx b/server/sonar-web/src/main/js/components/controls/ModalValidationField.tsx index 2aa649de238..2aa649de238 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ModalValidationField.tsx +++ b/server/sonar-web/src/main/js/components/controls/ModalValidationField.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/OutsideClickHandler.tsx b/server/sonar-web/src/main/js/components/controls/OutsideClickHandler.tsx index eaea43f89ba..eaea43f89ba 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/OutsideClickHandler.tsx +++ b/server/sonar-web/src/main/js/components/controls/OutsideClickHandler.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Radio.css b/server/sonar-web/src/main/js/components/controls/Radio.css index 6d53c4b383b..6d53c4b383b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Radio.css +++ b/server/sonar-web/src/main/js/components/controls/Radio.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Radio.tsx b/server/sonar-web/src/main/js/components/controls/Radio.tsx index c664c6f2499..c664c6f2499 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Radio.tsx +++ b/server/sonar-web/src/main/js/components/controls/Radio.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/RadioCard.css b/server/sonar-web/src/main/js/components/controls/RadioCard.css index f51fe41c930..f51fe41c930 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/RadioCard.css +++ b/server/sonar-web/src/main/js/components/controls/RadioCard.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/RadioCard.tsx b/server/sonar-web/src/main/js/components/controls/RadioCard.tsx index 223e597e6d9..223e597e6d9 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/RadioCard.tsx +++ b/server/sonar-web/src/main/js/components/controls/RadioCard.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/RadioToggle.css b/server/sonar-web/src/main/js/components/controls/RadioToggle.css index 4ca9c28df7c..4ca9c28df7c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/RadioToggle.css +++ b/server/sonar-web/src/main/js/components/controls/RadioToggle.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/RadioToggle.tsx b/server/sonar-web/src/main/js/components/controls/RadioToggle.tsx index 2ccf856ce30..2ccf856ce30 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/RadioToggle.tsx +++ b/server/sonar-web/src/main/js/components/controls/RadioToggle.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ReloadButton.tsx b/server/sonar-web/src/main/js/components/controls/ReloadButton.tsx index 1ab7a529fd5..1ab7a529fd5 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ReloadButton.tsx +++ b/server/sonar-web/src/main/js/components/controls/ReloadButton.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ScreenPositionFixer.tsx b/server/sonar-web/src/main/js/components/controls/ScreenPositionFixer.tsx index 0065201d22e..0065201d22e 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ScreenPositionFixer.tsx +++ b/server/sonar-web/src/main/js/components/controls/ScreenPositionFixer.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SearchBox.css b/server/sonar-web/src/main/js/components/controls/SearchBox.css index 3e91462ef5c..3e91462ef5c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SearchBox.css +++ b/server/sonar-web/src/main/js/components/controls/SearchBox.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SearchBox.tsx b/server/sonar-web/src/main/js/components/controls/SearchBox.tsx index d03081e26bc..d03081e26bc 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SearchBox.tsx +++ b/server/sonar-web/src/main/js/components/controls/SearchBox.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SearchSelect.tsx b/server/sonar-web/src/main/js/components/controls/SearchSelect.tsx index cf18ce100f2..cf18ce100f2 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SearchSelect.tsx +++ b/server/sonar-web/src/main/js/components/controls/SearchSelect.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Select.css b/server/sonar-web/src/main/js/components/controls/Select.css index 8f89447cc47..8f89447cc47 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Select.css +++ b/server/sonar-web/src/main/js/components/controls/Select.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Select.tsx b/server/sonar-web/src/main/js/components/controls/Select.tsx index 44657a87991..44657a87991 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Select.tsx +++ b/server/sonar-web/src/main/js/components/controls/Select.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SelectList.css b/server/sonar-web/src/main/js/components/controls/SelectList.css index 30b95c80033..30b95c80033 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SelectList.css +++ b/server/sonar-web/src/main/js/components/controls/SelectList.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SelectList.tsx b/server/sonar-web/src/main/js/components/controls/SelectList.tsx index 600dcefa22d..600dcefa22d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SelectList.tsx +++ b/server/sonar-web/src/main/js/components/controls/SelectList.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SelectListListContainer.tsx b/server/sonar-web/src/main/js/components/controls/SelectListListContainer.tsx index 160317b1951..160317b1951 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SelectListListContainer.tsx +++ b/server/sonar-web/src/main/js/components/controls/SelectListListContainer.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SelectListListElement.tsx b/server/sonar-web/src/main/js/components/controls/SelectListListElement.tsx index defd493f344..defd493f344 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SelectListListElement.tsx +++ b/server/sonar-web/src/main/js/components/controls/SelectListListElement.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SimpleModal.tsx b/server/sonar-web/src/main/js/components/controls/SimpleModal.tsx index 4f95af38211..4f95af38211 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/SimpleModal.tsx +++ b/server/sonar-web/src/main/js/components/controls/SimpleModal.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Tabs.css b/server/sonar-web/src/main/js/components/controls/Tabs.css index 334fe14f255..334fe14f255 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Tabs.css +++ b/server/sonar-web/src/main/js/components/controls/Tabs.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Tabs.tsx b/server/sonar-web/src/main/js/components/controls/Tabs.tsx index 6c25ae0c21f..6c25ae0c21f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Tabs.tsx +++ b/server/sonar-web/src/main/js/components/controls/Tabs.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Toggle.css b/server/sonar-web/src/main/js/components/controls/Toggle.css index f9b0cfeb75b..f9b0cfeb75b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Toggle.css +++ b/server/sonar-web/src/main/js/components/controls/Toggle.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Toggle.tsx b/server/sonar-web/src/main/js/components/controls/Toggle.tsx index 52448e8b074..52448e8b074 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Toggle.tsx +++ b/server/sonar-web/src/main/js/components/controls/Toggle.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Toggler.tsx b/server/sonar-web/src/main/js/components/controls/Toggler.tsx index fe76b7a1a41..fe76b7a1a41 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Toggler.tsx +++ b/server/sonar-web/src/main/js/components/controls/Toggler.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Tooltip.css b/server/sonar-web/src/main/js/components/controls/Tooltip.css index d49494f1f77..d49494f1f77 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Tooltip.css +++ b/server/sonar-web/src/main/js/components/controls/Tooltip.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Tooltip.tsx b/server/sonar-web/src/main/js/components/controls/Tooltip.tsx index 7f21fcf7c49..7f21fcf7c49 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/Tooltip.tsx +++ b/server/sonar-web/src/main/js/components/controls/Tooltip.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ValidationForm.tsx b/server/sonar-web/src/main/js/components/controls/ValidationForm.tsx index 37e7127014a..37e7127014a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ValidationForm.tsx +++ b/server/sonar-web/src/main/js/components/controls/ValidationForm.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ValidationInput.tsx b/server/sonar-web/src/main/js/components/controls/ValidationInput.tsx index 1f966232028..1f966232028 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ValidationInput.tsx +++ b/server/sonar-web/src/main/js/components/controls/ValidationInput.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ValidationModal.tsx b/server/sonar-web/src/main/js/components/controls/ValidationModal.tsx index e3df97e8591..e3df97e8591 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/ValidationModal.tsx +++ b/server/sonar-web/src/main/js/components/controls/ValidationModal.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ActionsDropdown-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ActionsDropdown-test.tsx index 8646ec806c0..8646ec806c0 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ActionsDropdown-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ActionsDropdown-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/BackButton-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/BackButton-test.tsx index 34770ec005b..ba9cff070af 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/BackButton-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/BackButton-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import testTheme from '../../../config/jest/testTheme'; +import testTheme from '../../../../../../config/jest/testTheme'; import { click } from '../../../helpers/testUtils'; import { ThemeProvider } from '../../theme'; import BackButton from '../BackButton'; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/BoxedGroupAccordion-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/BoxedGroupAccordion-test.tsx index 970a3546c3a..970a3546c3a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/BoxedGroupAccordion-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/BoxedGroupAccordion-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/BoxedTabs-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/BoxedTabs-test.tsx index 12a58f34fe5..12a58f34fe5 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/BoxedTabs-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/BoxedTabs-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Checkbox-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/Checkbox-test.tsx index b56cce6c559..b56cce6c559 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Checkbox-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/Checkbox-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ClickEventBoundary-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ClickEventBoundary-test.tsx index c2f6d701a76..c2f6d701a76 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ClickEventBoundary-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ClickEventBoundary-test.tsx 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 c32443d6d23..d686202ef12 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 @@ -29,7 +29,7 @@ import addGlobalSuccessMessage from '../../../app/utils/addGlobalSuccessMessage' import { mockBranch } from '../../../helpers/mocks/branch-like'; import { mockComponentReportStatus } from '../../../helpers/mocks/component-report'; import { mockComponent, mockCurrentUser } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { ComponentQualifier } from '../../../types/component'; import { ComponentReportActions } from '../ComponentReportActions'; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ConfirmButton-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ConfirmButton-test.tsx index 39e315f1254..39e315f1254 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ConfirmButton-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ConfirmButton-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ConfirmModal-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ConfirmModal-test.tsx index cfefbac465a..cfefbac465a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ConfirmModal-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ConfirmModal-test.tsx diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx index 64bbec9b825..6cab7176e1c 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx @@ -24,7 +24,7 @@ import * as subDays from 'date-fns/sub_days'; import * as subMonths from 'date-fns/sub_months'; import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../helpers/dates'; import DateInput from '../DateInput'; beforeAll(() => { diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/DateRangeInput-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/DateRangeInput-test.tsx index 0d023f19e01..802bb054e22 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/DateRangeInput-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/DateRangeInput-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { parseDate } from '../../../sonar-ui-common/helpers/dates'; +import { parseDate } from '../../../helpers/dates'; import DateRangeInput from '../DateRangeInput'; const dateA = parseDate('2018-01-17T00:00:00.000Z'); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Dropdown-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/Dropdown-test.tsx index e08d8293fba..e08d8293fba 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Dropdown-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/Dropdown-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/EscKeydownHandler-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/EscKeydownHandler-test.tsx index 6c852477b81..6c852477b81 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/EscKeydownHandler-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/EscKeydownHandler-test.tsx 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 dcfd8e3f1af..1f693999628 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 @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import FavoriteButton from '../../../sonar-ui-common/components/controls/FavoriteButton'; +import FavoriteButton from '../../../components/controls/FavoriteButton'; import Favorite from '../Favorite'; jest.mock('../../../api/favorites', () => ({ diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/FavoriteButton-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/FavoriteButton-test.tsx index d0978f050d4..d0978f050d4 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/FavoriteButton-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/FavoriteButton-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/GlobalMessages-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/GlobalMessages-test.tsx index 61bf771401a..84560d0ee49 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/GlobalMessages-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/GlobalMessages-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import { matchers } from 'jest-emotion'; import * as React from 'react'; -import testTheme from '../../../config/jest/testTheme'; +import testTheme from '../../../../../../config/jest/testTheme'; import GlobalMessages, { GlobalMessagesProps } from '../GlobalMessages'; expect.extend(matchers); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/HelpTooltip-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/HelpTooltip-test.tsx index 0df9d3af2a4..b5d8e534566 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/HelpTooltip-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/HelpTooltip-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import testTheme from '../../../config/jest/testTheme'; +import testTheme from '../../../../../../config/jest/testTheme'; import { ThemeProvider } from '../../theme'; import HelpTooltip, { DarkHelpTooltip } from '../HelpTooltip'; 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 7c05867ab27..360f3f1ad5e 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 @@ -19,9 +19,9 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { ButtonLink } from '../../../components/controls/buttons'; import { mockCurrentUser, mockLoggedInUser } from '../../../helpers/testMocks'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import { click, waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from '../../../helpers/testUtils'; import { DEFAULT_HOMEPAGE, HomePageSelect } from '../HomePageSelect'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/IdentityProviderLink-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/IdentityProviderLink-test.tsx index 14f346879ad..14f346879ad 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/IdentityProviderLink-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/IdentityProviderLink-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/InputValidationField-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/InputValidationField-test.tsx index 6c7c421452c..6c7c421452c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/InputValidationField-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/InputValidationField-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ListFooter-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ListFooter-test.tsx index 8970e984359..8970e984359 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ListFooter-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ListFooter-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ModalButton-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ModalButton-test.tsx index 3d7062aa3c9..3d7062aa3c9 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ModalButton-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ModalButton-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ModalValidationField-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ModalValidationField-test.tsx index 34a074f8267..34a074f8267 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ModalValidationField-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ModalValidationField-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/OutsideClickHandler-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/OutsideClickHandler-test.tsx index 4f540f59fec..4f540f59fec 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/OutsideClickHandler-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/OutsideClickHandler-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Radio-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/Radio-test.tsx index 60d2050a45d..60d2050a45d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Radio-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/Radio-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/RadioCard-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/RadioCard-test.tsx index 2232f38b252..2232f38b252 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/RadioCard-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/RadioCard-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/RadioToggle-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/RadioToggle-test.tsx index d5bd7362015..d5bd7362015 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/RadioToggle-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/RadioToggle-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ReloadButton-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ReloadButton-test.tsx index a6d1ea88ad0..46ff72d8432 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ReloadButton-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ReloadButton-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import testTheme from '../../../config/jest/testTheme'; +import testTheme from '../../../../../../config/jest/testTheme'; import { click } from '../../../helpers/testUtils'; import { ThemeProvider } from '../../theme'; import ReloadButton from '../ReloadButton'; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ScreenPositionFixer-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ScreenPositionFixer-test.tsx index cb109c941a4..94aaf9a840d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ScreenPositionFixer-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ScreenPositionFixer-test.tsx @@ -19,7 +19,7 @@ */ import { mount } from 'enzyme'; import * as React from 'react'; -import testTheme from '../../../config/jest/testTheme'; +import testTheme from '../../../../../../config/jest/testTheme'; import { resizeWindowTo, setNodeRect } from '../../../helpers/testUtils'; import { ScreenPositionFixer } from '../ScreenPositionFixer'; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SearchBox-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/SearchBox-test.tsx index 7afa1839c5f..7afa1839c5f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SearchBox-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/SearchBox-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SearchSelect-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/SearchSelect-test.tsx index bf647766f37..bf647766f37 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SearchSelect-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/SearchSelect-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SelectList-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/SelectList-test.tsx index aa71805cd65..aa71805cd65 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SelectList-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/SelectList-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SelectListListContainer-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/SelectListListContainer-test.tsx index 1b24bc866c1..1b24bc866c1 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SelectListListContainer-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/SelectListListContainer-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SelectListListElement-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/SelectListListElement-test.tsx index ca127222e04..ca127222e04 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SelectListListElement-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/SelectListListElement-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SimpleModal-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/SimpleModal-test.tsx index 5a8e6bb0cd7..5a8e6bb0cd7 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/SimpleModal-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/SimpleModal-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Tabs-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/Tabs-test.tsx index 60982c290e4..60982c290e4 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Tabs-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/Tabs-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Toggle-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/Toggle-test.tsx index f3e39aca5df..f3e39aca5df 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Toggle-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/Toggle-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Toggler-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/Toggler-test.tsx index 679177cfda3..679177cfda3 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Toggler-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/Toggler-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Tooltip-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/Tooltip-test.tsx index ae4b58e7b35..ae4b58e7b35 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/Tooltip-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/Tooltip-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ValidationForm-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ValidationForm-test.tsx index 64827f932ed..64827f932ed 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ValidationForm-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ValidationForm-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ValidationInput-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ValidationInput-test.tsx index 97d4a2a5937..97d4a2a5937 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ValidationInput-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ValidationInput-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ValidationModal-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/ValidationModal-test.tsx index 3bbb8e5dc4d..3bbb8e5dc4d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/ValidationModal-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/ValidationModal-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ActionsDropdown-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ActionsDropdown-test.tsx.snap index 4bd6a2ea46d..4bd6a2ea46d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ActionsDropdown-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ActionsDropdown-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/BackButton-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BackButton-test.tsx.snap index 57a5f2c6135..57a5f2c6135 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/BackButton-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BackButton-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/BoxedGroupAccordion-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedGroupAccordion-test.tsx.snap index 0c7b74b79d9..0c7b74b79d9 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/BoxedGroupAccordion-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedGroupAccordion-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap index 22d8f761533..22d8f761533 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Checkbox-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Checkbox-test.tsx.snap index 69c0c60af8c..69c0c60af8c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Checkbox-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Checkbox-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ClickEventBoundary-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ClickEventBoundary-test.tsx.snap index 62eac278e7f..62eac278e7f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ClickEventBoundary-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ClickEventBoundary-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ConfirmButton-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ConfirmButton-test.tsx.snap index f94c3829503..f94c3829503 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ConfirmButton-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ConfirmButton-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ConfirmModal-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ConfirmModal-test.tsx.snap index f1367ae048a..f1367ae048a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ConfirmModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ConfirmModal-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/EscKeydownHandler-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/EscKeydownHandler-test.tsx.snap index 239d6bfe358..239d6bfe358 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/EscKeydownHandler-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/EscKeydownHandler-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/FavoriteButton-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/FavoriteButton-test.tsx.snap index f66e2ddd464..f66e2ddd464 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/FavoriteButton-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/FavoriteButton-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/GlobalMessages-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/GlobalMessages-test.tsx.snap index fdeaf6c28e4..fdeaf6c28e4 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/GlobalMessages-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/GlobalMessages-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/HelpTooltip-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/HelpTooltip-test.tsx.snap index abf28dfdd32..abf28dfdd32 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/HelpTooltip-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/HelpTooltip-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/IdentityProviderLink-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/IdentityProviderLink-test.tsx.snap index d3a38a52376..d3a38a52376 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/IdentityProviderLink-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/IdentityProviderLink-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/InputValidationField-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/InputValidationField-test.tsx.snap index 16f3e1c2dfa..16f3e1c2dfa 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/InputValidationField-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/InputValidationField-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ListFooter-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ListFooter-test.tsx.snap index 2d55aa0d03b..2d55aa0d03b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ListFooter-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ListFooter-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ModalValidationField-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ModalValidationField-test.tsx.snap index 4b4e605c0ad..4b4e605c0ad 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ModalValidationField-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ModalValidationField-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/OutsideClickHandler-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/OutsideClickHandler-test.tsx.snap index a4f533d8e3a..a4f533d8e3a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/OutsideClickHandler-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/OutsideClickHandler-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Radio-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Radio-test.tsx.snap index 8649fba79b8..8649fba79b8 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Radio-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Radio-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap index e58f9d73597..e58f9d73597 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioCard-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/RadioToggle-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioToggle-test.tsx.snap index 791d312e720..791d312e720 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/RadioToggle-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/RadioToggle-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ReloadButton-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ReloadButton-test.tsx.snap index 9510ca69cca..9510ca69cca 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ReloadButton-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ReloadButton-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SearchBox-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchBox-test.tsx.snap index 4ed69eb6a29..4ed69eb6a29 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SearchBox-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchBox-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SearchSelect-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchSelect-test.tsx.snap index 792343f1a73..792343f1a73 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SearchSelect-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchSelect-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SelectList-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SelectList-test.tsx.snap index 14d46bbffc3..14d46bbffc3 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SelectList-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SelectList-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SelectListListContainer-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SelectListListContainer-test.tsx.snap index bf96116e95a..bf96116e95a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SelectListListContainer-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SelectListListContainer-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SelectListListElement-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SelectListListElement-test.tsx.snap index e5d4ba3601f..e5d4ba3601f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SelectListListElement-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SelectListListElement-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SimpleModal-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SimpleModal-test.tsx.snap index 49b14a9e20f..49b14a9e20f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/SimpleModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SimpleModal-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Tabs-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Tabs-test.tsx.snap index 2db4cec05a8..2db4cec05a8 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Tabs-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Tabs-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Toggle-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Toggle-test.tsx.snap index 8862993eb41..8862993eb41 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Toggle-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Toggle-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Toggler-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Toggler-test.tsx.snap index dfe5d96a394..dfe5d96a394 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Toggler-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Toggler-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Tooltip-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Tooltip-test.tsx.snap index 786b1bfe0ad..786b1bfe0ad 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/Tooltip-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Tooltip-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ValidationForm-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ValidationForm-test.tsx.snap index e00f009ef2f..e00f009ef2f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ValidationForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ValidationForm-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ValidationInput-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ValidationInput-test.tsx.snap index c2d68a1d2bf..c2d68a1d2bf 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ValidationInput-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ValidationInput-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ValidationModal-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ValidationModal-test.tsx.snap index 67db9979a9e..67db9979a9e 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/ValidationModal-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ValidationModal-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/buttons-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/buttons-test.tsx.snap index 8d915b89387..8d915b89387 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/buttons-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/buttons-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/clipboard-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/clipboard-test.tsx.snap index de2081cb464..de2081cb464 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/__snapshots__/clipboard-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/clipboard-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/buttons-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/buttons-test.tsx index c199c5778cc..c199c5778cc 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/buttons-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/buttons-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/clipboard-test.tsx b/server/sonar-web/src/main/js/components/controls/__tests__/clipboard-test.tsx index 891f667e98b..891f667e98b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/__tests__/clipboard-test.tsx +++ b/server/sonar-web/src/main/js/components/controls/__tests__/clipboard-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/buttons.css b/server/sonar-web/src/main/js/components/controls/buttons.css index 8a8f9447cb3..8a8f9447cb3 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/buttons.css +++ b/server/sonar-web/src/main/js/components/controls/buttons.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/buttons.tsx b/server/sonar-web/src/main/js/components/controls/buttons.tsx index 742b50f1191..742b50f1191 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/buttons.tsx +++ b/server/sonar-web/src/main/js/components/controls/buttons.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/clipboard.tsx b/server/sonar-web/src/main/js/components/controls/clipboard.tsx index 6d91192275c..6d91192275c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/controls/clipboard.tsx +++ b/server/sonar-web/src/main/js/components/controls/clipboard.tsx diff --git a/server/sonar-web/src/main/js/components/docs/DocCollapsibleBlock.tsx b/server/sonar-web/src/main/js/components/docs/DocCollapsibleBlock.tsx index e335ee3eb8c..c235eea28db 100644 --- a/server/sonar-web/src/main/js/components/docs/DocCollapsibleBlock.tsx +++ b/server/sonar-web/src/main/js/components/docs/DocCollapsibleBlock.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import OpenCloseIcon from '../../sonar-ui-common/components/icons/OpenCloseIcon'; +import OpenCloseIcon from '../../components/icons/OpenCloseIcon'; interface State { open: boolean; diff --git a/server/sonar-web/src/main/js/components/docs/DocImg.tsx b/server/sonar-web/src/main/js/components/docs/DocImg.tsx index f2836e9a18f..d8baf103eab 100644 --- a/server/sonar-web/src/main/js/components/docs/DocImg.tsx +++ b/server/sonar-web/src/main/js/components/docs/DocImg.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { getBaseUrl } from '../../sonar-ui-common/helpers/urls'; +import { getBaseUrl } from '../../helpers/urls'; export default function DocImg(props: React.ImgHTMLAttributes<HTMLImageElement>) { const { alt, src, ...other } = props; diff --git a/server/sonar-web/src/main/js/components/docs/DocLink.tsx b/server/sonar-web/src/main/js/components/docs/DocLink.tsx index 3cb93cf5812..ff51324b907 100644 --- a/server/sonar-web/src/main/js/components/docs/DocLink.tsx +++ b/server/sonar-web/src/main/js/components/docs/DocLink.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import DetachIcon from '../../components/icons/DetachIcon'; import { isSonarCloud } from '../../helpers/system'; -import DetachIcon from '../../sonar-ui-common/components/icons/DetachIcon'; import { withAppState } from '../hoc/withAppState'; interface OwnProps { diff --git a/server/sonar-web/src/main/js/components/docs/DocMarkdownBlock.tsx b/server/sonar-web/src/main/js/components/docs/DocMarkdownBlock.tsx index b183a8ad4f5..1fe7220a0e8 100644 --- a/server/sonar-web/src/main/js/components/docs/DocMarkdownBlock.tsx +++ b/server/sonar-web/src/main/js/components/docs/DocMarkdownBlock.tsx @@ -25,7 +25,7 @@ import rehypeSlug from 'rehype-slug'; import remark from 'remark'; import remarkCustomBlocks from 'remark-custom-blocks'; import remarkRehype from 'remark-rehype'; -import { scrollToElement } from '../../sonar-ui-common/helpers/scrolling'; +import { scrollToElement } from '../../helpers/scrolling'; import DocCollapsibleBlock from './DocCollapsibleBlock'; import DocImg from './DocImg'; import DocLink from './DocLink'; diff --git a/server/sonar-web/src/main/js/components/docs/DocToc.tsx b/server/sonar-web/src/main/js/components/docs/DocToc.tsx index 18a455c0192..edcc71da2ef 100644 --- a/server/sonar-web/src/main/js/components/docs/DocToc.tsx +++ b/server/sonar-web/src/main/js/components/docs/DocToc.tsx @@ -23,7 +23,7 @@ import * as React from 'react'; import { findDOMNode } from 'react-dom'; import remark from 'remark'; import reactRenderer from 'remark-react'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import onlyToc from './plugins/remark-only-toc'; interface Props { diff --git a/server/sonar-web/src/main/js/components/docs/DocTooltipLink.tsx b/server/sonar-web/src/main/js/components/docs/DocTooltipLink.tsx index f1624dcc954..b2d853e180f 100644 --- a/server/sonar-web/src/main/js/components/docs/DocTooltipLink.tsx +++ b/server/sonar-web/src/main/js/components/docs/DocTooltipLink.tsx @@ -20,7 +20,7 @@ import { forEach } from 'lodash'; import * as React from 'react'; import { Link } from 'react-router'; -import DetachIcon from '../../sonar-ui-common/components/icons/DetachIcon'; +import DetachIcon from '../../components/icons/DetachIcon'; interface OwnProps { customProps?: T.Dict<string>; diff --git a/server/sonar-web/src/main/js/components/docs/__tests__/DocCollapsibleBlock-test.tsx b/server/sonar-web/src/main/js/components/docs/__tests__/DocCollapsibleBlock-test.tsx index 8e8827d5d61..e06f5ee7d60 100644 --- a/server/sonar-web/src/main/js/components/docs/__tests__/DocCollapsibleBlock-test.tsx +++ b/server/sonar-web/src/main/js/components/docs/__tests__/DocCollapsibleBlock-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import DocCollapsibleBlock from '../DocCollapsibleBlock'; const children = ( diff --git a/server/sonar-web/src/main/js/components/docs/__tests__/DocMarkdownBlock-test.tsx b/server/sonar-web/src/main/js/components/docs/__tests__/DocMarkdownBlock-test.tsx index 47cccf1ef0c..eb1c3e0208a 100644 --- a/server/sonar-web/src/main/js/components/docs/__tests__/DocMarkdownBlock-test.tsx +++ b/server/sonar-web/src/main/js/components/docs/__tests__/DocMarkdownBlock-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { scrollToElement } from '../../../helpers/scrolling'; import { mockEvent } from '../../../helpers/testMocks'; -import { scrollToElement } from '../../../sonar-ui-common/helpers/scrolling'; import DocMarkdownBlock from '../DocMarkdownBlock'; const CONTENT = ` @@ -50,7 +50,7 @@ jest.mock('rehype-raw', () => ({ default: jest.requireActual('rehype-raw') })); jest.mock('rehype-react', () => ({ default: jest.requireActual('rehype-react') })); jest.mock('rehype-slug', () => ({ default: jest.requireActual('rehype-slug') })); -jest.mock('../../../sonar-ui-common/helpers/scrolling', () => ({ +jest.mock('../../../helpers/scrolling', () => ({ scrollToElement: jest.fn() })); diff --git a/server/sonar-web/src/main/js/components/docs/__tests__/DocToc-test.tsx b/server/sonar-web/src/main/js/components/docs/__tests__/DocToc-test.tsx index 3113d2972ae..78838e2d971 100644 --- a/server/sonar-web/src/main/js/components/docs/__tests__/DocToc-test.tsx +++ b/server/sonar-web/src/main/js/components/docs/__tests__/DocToc-test.tsx @@ -19,7 +19,7 @@ */ import { mount } from 'enzyme'; import * as React from 'react'; -import { click, scrollTo } from '../../../sonar-ui-common/helpers/testUtils'; +import { click, scrollTo } from '../../../helpers/testUtils'; import DocToc from '../DocToc'; const OFFSET = 300; diff --git a/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx b/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx index cb7a7de515d..090fbf5005c 100644 --- a/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx +++ b/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../sonar-ui-common/components/controls/buttons'; -import HelpTooltip from '../../sonar-ui-common/components/controls/HelpTooltip'; -import OpenCloseIcon from '../../sonar-ui-common/components/icons/OpenCloseIcon'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../components/controls/buttons'; +import HelpTooltip from '../../components/controls/HelpTooltip'; +import OpenCloseIcon from '../../components/icons/OpenCloseIcon'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../helpers/l10n'; interface Props { children?: React.ReactNode; diff --git a/server/sonar-web/src/main/js/components/facet/ListStyleFacet.tsx b/server/sonar-web/src/main/js/components/facet/ListStyleFacet.tsx index dacee4ebd96..822e5964faa 100644 --- a/server/sonar-web/src/main/js/components/facet/ListStyleFacet.tsx +++ b/server/sonar-web/src/main/js/components/facet/ListStyleFacet.tsx @@ -20,13 +20,13 @@ import * as classNames from 'classnames'; import { sortBy, without } from 'lodash'; import * as React from 'react'; -import ListFooter from '../../sonar-ui-common/components/controls/ListFooter'; -import SearchBox from '../../sonar-ui-common/components/controls/SearchBox'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; -import { Alert } from '../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; -import { queriesEqual } from '../../sonar-ui-common/helpers/query'; +import ListFooter from '../../components/controls/ListFooter'; +import SearchBox from '../../components/controls/SearchBox'; +import Tooltip from '../../components/controls/Tooltip'; +import { Alert } from '../../components/ui/Alert'; +import { translate } from '../../helpers/l10n'; +import { formatMeasure } from '../../helpers/measures'; +import { queriesEqual } from '../../helpers/query'; import FacetBox from './FacetBox'; import FacetHeader from './FacetHeader'; import FacetItem from './FacetItem'; diff --git a/server/sonar-web/src/main/js/components/facet/ListStyleFacetFooter.tsx b/server/sonar-web/src/main/js/components/facet/ListStyleFacetFooter.tsx index 1afa9718fa0..7d1091502ba 100644 --- a/server/sonar-web/src/main/js/components/facet/ListStyleFacetFooter.tsx +++ b/server/sonar-web/src/main/js/components/facet/ListStyleFacetFooter.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; +import { translate, translateWithParameters } from '../../helpers/l10n'; +import { formatMeasure } from '../../helpers/measures'; interface Props { className?: string; diff --git a/server/sonar-web/src/main/js/components/facet/MultipleSelectionHint.tsx b/server/sonar-web/src/main/js/components/facet/MultipleSelectionHint.tsx index 913644ad6aa..ab922570fb5 100644 --- a/server/sonar-web/src/main/js/components/facet/MultipleSelectionHint.tsx +++ b/server/sonar-web/src/main/js/components/facet/MultipleSelectionHint.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import './MultipleSelectionHint.css'; interface Props { diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/FacetHeader-test.tsx b/server/sonar-web/src/main/js/components/facet/__tests__/FacetHeader-test.tsx index c135b73d803..c8e1a03fbb1 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/FacetHeader-test.tsx +++ b/server/sonar-web/src/main/js/components/facet/__tests__/FacetHeader-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import FacetHeader from '../FacetHeader'; it('should render open facet with value', () => { diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/FacetItem-test.tsx b/server/sonar-web/src/main/js/components/facet/__tests__/FacetItem-test.tsx index 54f0cba0272..1629e9bbea2 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/FacetItem-test.tsx +++ b/server/sonar-web/src/main/js/components/facet/__tests__/FacetItem-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import FacetItem, { Props } from '../FacetItem'; it('should render active', () => { diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacet-test.tsx b/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacet-test.tsx index 72e4ff445e4..ac2a06ad937 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacet-test.tsx +++ b/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacet-test.tsx @@ -19,7 +19,7 @@ */ import { shallow, ShallowWrapper } from 'enzyme'; import * as React from 'react'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import ListStyleFacet, { Props } from '../ListStyleFacet'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacetFooter-test.tsx b/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacetFooter-test.tsx index cf4edc30d25..a1e58c3bcd7 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacetFooter-test.tsx +++ b/server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacetFooter-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import ListStyleFacetFooter from '../ListStyleFacetFooter'; it('should not render "show more"', () => { diff --git a/server/sonar-web/src/main/js/components/hoc/__tests__/whenLoggedIn-test.tsx b/server/sonar-web/src/main/js/components/hoc/__tests__/whenLoggedIn-test.tsx index 18de0d584b1..cdf4910523f 100644 --- a/server/sonar-web/src/main/js/components/hoc/__tests__/whenLoggedIn-test.tsx +++ b/server/sonar-web/src/main/js/components/hoc/__tests__/whenLoggedIn-test.tsx @@ -19,11 +19,11 @@ */ import { shallow, ShallowWrapper } from 'enzyme'; import * as React from 'react'; +import handleRequiredAuthentication from '../../../helpers/handleRequiredAuthentication'; import { mockStore } from '../../../helpers/testMocks'; -import handleRequiredAuthentication from '../../../sonar-ui-common/helpers/handleRequiredAuthentication'; import { whenLoggedIn } from '../whenLoggedIn'; -jest.mock('../../../sonar-ui-common/helpers/handleRequiredAuthentication', () => ({ +jest.mock('../../../helpers/handleRequiredAuthentication', () => ({ default: jest.fn() })); diff --git a/server/sonar-web/src/main/js/components/hoc/__tests__/withKeyboardNavigation-test.tsx b/server/sonar-web/src/main/js/components/hoc/__tests__/withKeyboardNavigation-test.tsx index 60a8ba13cca..db142bb8684 100644 --- a/server/sonar-web/src/main/js/components/hoc/__tests__/withKeyboardNavigation-test.tsx +++ b/server/sonar-web/src/main/js/components/hoc/__tests__/withKeyboardNavigation-test.tsx @@ -20,7 +20,7 @@ import { mount, shallow } from 'enzyme'; import * as React from 'react'; import { mockComponent } from '../../../helpers/testMocks'; -import { KEYCODE_MAP, keydown } from '../../../sonar-ui-common/helpers/testUtils'; +import { KEYCODE_MAP, keydown } from '../../../helpers/testUtils'; import withKeyboardNavigation, { WithKeyboardNavigationProps } from '../withKeyboardNavigation'; class X extends React.Component<{ diff --git a/server/sonar-web/src/main/js/components/hoc/__tests__/withNotifications-test.tsx b/server/sonar-web/src/main/js/components/hoc/__tests__/withNotifications-test.tsx index babc0bf1e25..187ed2bd022 100644 --- a/server/sonar-web/src/main/js/components/hoc/__tests__/withNotifications-test.tsx +++ b/server/sonar-web/src/main/js/components/hoc/__tests__/withNotifications-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { addNotification, getNotifications, removeNotification } from '../../../api/notifications'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { withNotifications, WithNotificationsProps } from '../withNotifications'; jest.mock('../../../api/notifications', () => ({ 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 250ecb9e3d7..d258303c773 100644 --- a/server/sonar-web/src/main/js/components/hoc/whenLoggedIn.tsx +++ b/server/sonar-web/src/main/js/components/hoc/whenLoggedIn.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import handleRequiredAuthentication from '../../helpers/handleRequiredAuthentication'; import { isLoggedIn } from '../../helpers/users'; -import handleRequiredAuthentication from '../../sonar-ui-common/helpers/handleRequiredAuthentication'; import { getWrappedDisplayName } from './utils'; import { withCurrentUser } from './withCurrentUser'; 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 4db6963967b..531ea3a5962 100644 --- a/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx +++ b/server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx @@ -19,7 +19,7 @@ */ import * as key from 'keymaster'; import * as React from 'react'; -import PageActions from '../../sonar-ui-common/components/ui/PageActions'; +import PageActions from '../../components/ui/PageActions'; import { getWrappedDisplayName } from './utils'; export interface WithKeyboardNavigationProps { diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/AlertErrorIcon.tsx b/server/sonar-web/src/main/js/components/icons/AlertErrorIcon.tsx index c6c71782d7a..c6c71782d7a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/AlertErrorIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/AlertErrorIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/AlertSuccessIcon.tsx b/server/sonar-web/src/main/js/components/icons/AlertSuccessIcon.tsx index 707d0f9e9f6..707d0f9e9f6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/AlertSuccessIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/AlertSuccessIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/AlertWarnIcon.tsx b/server/sonar-web/src/main/js/components/icons/AlertWarnIcon.tsx index 7dc322657d2..7dc322657d2 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/AlertWarnIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/AlertWarnIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ArrowIcon.tsx b/server/sonar-web/src/main/js/components/icons/ArrowIcon.tsx index c27e7307897..c27e7307897 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ArrowIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ArrowIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BackIcon.tsx b/server/sonar-web/src/main/js/components/icons/BackIcon.tsx index 34974ee8374..34974ee8374 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BackIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/BackIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BranchIcon.tsx b/server/sonar-web/src/main/js/components/icons/BranchIcon.tsx index b6e9207cc58..b6e9207cc58 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BranchIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/BranchIcon.tsx diff --git a/server/sonar-web/src/main/js/components/icons/BranchLikeIcon.tsx b/server/sonar-web/src/main/js/components/icons/BranchLikeIcon.tsx index 8b301c9aed0..af23676da6a 100644 --- a/server/sonar-web/src/main/js/components/icons/BranchLikeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/BranchLikeIcon.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import BranchIcon from '../../components/icons/BranchIcon'; +import { IconProps } from '../../components/icons/Icon'; +import PullRequestIcon from '../../components/icons/PullRequestIcon'; import { isPullRequest } from '../../helpers/branch-like'; -import BranchIcon from '../../sonar-ui-common/components/icons/BranchIcon'; -import { IconProps } from '../../sonar-ui-common/components/icons/Icon'; -import PullRequestIcon from '../../sonar-ui-common/components/icons/PullRequestIcon'; import { BranchLike } from '../../types/branch-like'; export interface BranchLikeIconProps extends IconProps { diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BubblesIcon.tsx b/server/sonar-web/src/main/js/components/icons/BubblesIcon.tsx index 50a40c5c2f5..50a40c5c2f5 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BubblesIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/BubblesIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BugIcon.tsx b/server/sonar-web/src/main/js/components/icons/BugIcon.tsx index 77f19836614..77f19836614 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BugIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/BugIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BugTrackerIcon.tsx b/server/sonar-web/src/main/js/components/icons/BugTrackerIcon.tsx index db03eee3115..db03eee3115 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BugTrackerIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/BugTrackerIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BulletListIcon.tsx b/server/sonar-web/src/main/js/components/icons/BulletListIcon.tsx index bceb30427a4..bceb30427a4 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/BulletListIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/BulletListIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CalendarIcon.tsx b/server/sonar-web/src/main/js/components/icons/CalendarIcon.tsx index bb70dfd4d6e..bb70dfd4d6e 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CalendarIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/CalendarIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChartLegendIcon.tsx b/server/sonar-web/src/main/js/components/icons/ChartLegendIcon.tsx index 4d4d305190a..4d4d305190a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChartLegendIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ChartLegendIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CheckIcon.tsx b/server/sonar-web/src/main/js/components/icons/CheckIcon.tsx index 9248e6178e8..9248e6178e8 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CheckIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/CheckIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChevronDownIcon.tsx b/server/sonar-web/src/main/js/components/icons/ChevronDownIcon.tsx index 0931930ee5c..0931930ee5c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChevronDownIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ChevronDownIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChevronLeftIcon.tsx b/server/sonar-web/src/main/js/components/icons/ChevronLeftIcon.tsx index 8f4824699ab..8f4824699ab 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChevronLeftIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ChevronLeftIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChevronRightIcon.tsx b/server/sonar-web/src/main/js/components/icons/ChevronRightIcon.tsx index 21d6049ed6f..21d6049ed6f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChevronRightIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ChevronRightIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChevronUpIcon.tsx b/server/sonar-web/src/main/js/components/icons/ChevronUpIcon.tsx index 842fc9f69a8..842fc9f69a8 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChevronUpIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ChevronUpIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChevronsIcon.tsx b/server/sonar-web/src/main/js/components/icons/ChevronsIcon.tsx index 2ad6f90ed97..2ad6f90ed97 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ChevronsIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ChevronsIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ClearIcon.tsx b/server/sonar-web/src/main/js/components/icons/ClearIcon.tsx index 91eb6f706d6..91eb6f706d6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ClearIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ClearIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ClockIcon.tsx b/server/sonar-web/src/main/js/components/icons/ClockIcon.tsx index c777a4a8e60..c777a4a8e60 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ClockIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ClockIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CodeSmellIcon.tsx b/server/sonar-web/src/main/js/components/icons/CodeSmellIcon.tsx index d705bcd0ec7..d705bcd0ec7 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CodeSmellIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/CodeSmellIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CogIcon.tsx b/server/sonar-web/src/main/js/components/icons/CogIcon.tsx index 4d7da4238f6..4d7da4238f6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CogIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/CogIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CollapseIcon.tsx b/server/sonar-web/src/main/js/components/icons/CollapseIcon.tsx index 688f7e1a54f..688f7e1a54f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CollapseIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/CollapseIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ContinuousIntegrationIcon.tsx b/server/sonar-web/src/main/js/components/icons/ContinuousIntegrationIcon.tsx index 62ab2447fd1..62ab2447fd1 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ContinuousIntegrationIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ContinuousIntegrationIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CopyIcon.tsx b/server/sonar-web/src/main/js/components/icons/CopyIcon.tsx index 2787990b1f3..2787990b1f3 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/CopyIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/CopyIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/DeleteIcon.tsx b/server/sonar-web/src/main/js/components/icons/DeleteIcon.tsx index 1fb013182da..1fb013182da 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/DeleteIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/DeleteIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/DetachIcon.tsx b/server/sonar-web/src/main/js/components/icons/DetachIcon.tsx index 4066ddf3327..4066ddf3327 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/DetachIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/DetachIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/DropdownIcon.tsx b/server/sonar-web/src/main/js/components/icons/DropdownIcon.tsx index 7abed26df45..7abed26df45 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/DropdownIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/DropdownIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/EditIcon.tsx b/server/sonar-web/src/main/js/components/icons/EditIcon.tsx index 45bf6814d46..45bf6814d46 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/EditIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/EditIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/EllipsisIcon.tsx b/server/sonar-web/src/main/js/components/icons/EllipsisIcon.tsx index c584514131a..c584514131a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/EllipsisIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/EllipsisIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ExpandIcon.tsx b/server/sonar-web/src/main/js/components/icons/ExpandIcon.tsx index 2de2405df9a..2de2405df9a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ExpandIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ExpandIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ExpandSnippetIcon.tsx b/server/sonar-web/src/main/js/components/icons/ExpandSnippetIcon.tsx index 1b6a2ce7f52..1b6a2ce7f52 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ExpandSnippetIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ExpandSnippetIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/FavoriteIcon.tsx b/server/sonar-web/src/main/js/components/icons/FavoriteIcon.tsx index 76af77cd4cc..76af77cd4cc 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/FavoriteIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/FavoriteIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/FilterIcon.tsx b/server/sonar-web/src/main/js/components/icons/FilterIcon.tsx index 8d5851eb570..8d5851eb570 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/FilterIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/FilterIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/GroupIcon.tsx b/server/sonar-web/src/main/js/components/icons/GroupIcon.tsx index 9efe35a17ab..9efe35a17ab 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/GroupIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/GroupIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/HelpIcon.tsx b/server/sonar-web/src/main/js/components/icons/HelpIcon.tsx index 641e76849d2..641e76849d2 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/HelpIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/HelpIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/HistoryIcon.tsx b/server/sonar-web/src/main/js/components/icons/HistoryIcon.tsx index 55d61aff599..55d61aff599 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/HistoryIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/HistoryIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/HomeIcon.tsx b/server/sonar-web/src/main/js/components/icons/HomeIcon.tsx index c7814d90ed7..c7814d90ed7 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/HomeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/HomeIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/HouseIcon.tsx b/server/sonar-web/src/main/js/components/icons/HouseIcon.tsx index c4ff402ebb1..c4ff402ebb1 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/HouseIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/HouseIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/Icon.tsx b/server/sonar-web/src/main/js/components/icons/Icon.tsx index c47b1bd5391..c47b1bd5391 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/Icon.tsx +++ b/server/sonar-web/src/main/js/components/icons/Icon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/InfoIcon.tsx b/server/sonar-web/src/main/js/components/icons/InfoIcon.tsx index 80029d0e93b..80029d0e93b 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/InfoIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/InfoIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/IssueIcon.tsx b/server/sonar-web/src/main/js/components/icons/IssueIcon.tsx index e78a91bbc44..e78a91bbc44 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/IssueIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/IssueIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/IssueTypeIcon.tsx b/server/sonar-web/src/main/js/components/icons/IssueTypeIcon.tsx index 9815ce40a84..9815ce40a84 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/IssueTypeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/IssueTypeIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/LightBulbIcon.tsx b/server/sonar-web/src/main/js/components/icons/LightBulbIcon.tsx index 1ebcef9ed4e..1ebcef9ed4e 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/LightBulbIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/LightBulbIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/LinkIcon.tsx b/server/sonar-web/src/main/js/components/icons/LinkIcon.tsx index 04288a05331..04288a05331 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/LinkIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/LinkIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ListIcon.tsx b/server/sonar-web/src/main/js/components/icons/ListIcon.tsx index fdc9e5c840d..fdc9e5c840d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ListIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ListIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/LockIcon.tsx b/server/sonar-web/src/main/js/components/icons/LockIcon.tsx index f9cd73e4981..f9cd73e4981 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/LockIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/LockIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/LongLivingBranchIcon.tsx b/server/sonar-web/src/main/js/components/icons/LongLivingBranchIcon.tsx index 893c07178e4..893c07178e4 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/LongLivingBranchIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/LongLivingBranchIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/MeasuresIcon.tsx b/server/sonar-web/src/main/js/components/icons/MeasuresIcon.tsx index 07ad0c47ecd..07ad0c47ecd 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/MeasuresIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/MeasuresIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/MinimizeIcon.tsx b/server/sonar-web/src/main/js/components/icons/MinimizeIcon.tsx index 66f64ed6157..66f64ed6157 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/MinimizeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/MinimizeIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/NotificationIcon.tsx b/server/sonar-web/src/main/js/components/icons/NotificationIcon.tsx index 10bf7da86d9..10bf7da86d9 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/NotificationIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/NotificationIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/OnboardingAddMembersIcon.tsx b/server/sonar-web/src/main/js/components/icons/OnboardingAddMembersIcon.tsx index 255c2d8f391..255c2d8f391 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/OnboardingAddMembersIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/OnboardingAddMembersIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/OnboardingProjectIcon.tsx b/server/sonar-web/src/main/js/components/icons/OnboardingProjectIcon.tsx index 79fedae1598..79fedae1598 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/OnboardingProjectIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/OnboardingProjectIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/OnboardingTeamIcon.tsx b/server/sonar-web/src/main/js/components/icons/OnboardingTeamIcon.tsx index be4ab97b640..be4ab97b640 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/OnboardingTeamIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/OnboardingTeamIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/OpenCloseIcon.tsx b/server/sonar-web/src/main/js/components/icons/OpenCloseIcon.tsx index 8b50014773d..8b50014773d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/OpenCloseIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/OpenCloseIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/PendingIcon.tsx b/server/sonar-web/src/main/js/components/icons/PendingIcon.tsx index 437abb33a70..437abb33a70 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/PendingIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/PendingIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/PinIcon.tsx b/server/sonar-web/src/main/js/components/icons/PinIcon.tsx index 4521f86a5e8..4521f86a5e8 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/PinIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/PinIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/PlusCircleIcon.tsx b/server/sonar-web/src/main/js/components/icons/PlusCircleIcon.tsx index 2591a7737db..2591a7737db 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/PlusCircleIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/PlusCircleIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/PlusIcon.tsx b/server/sonar-web/src/main/js/components/icons/PlusIcon.tsx index 39df3134c6f..39df3134c6f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/PlusIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/PlusIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ProjectLinkIcon.tsx b/server/sonar-web/src/main/js/components/icons/ProjectLinkIcon.tsx index b158f9839b2..b158f9839b2 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ProjectLinkIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ProjectLinkIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/PullRequestIcon.tsx b/server/sonar-web/src/main/js/components/icons/PullRequestIcon.tsx index dc249a94b71..dc249a94b71 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/PullRequestIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/PullRequestIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/QualifierIcon.tsx b/server/sonar-web/src/main/js/components/icons/QualifierIcon.tsx index c95948b878c..c95948b878c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/QualifierIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/QualifierIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/RecommendedIcon.tsx b/server/sonar-web/src/main/js/components/icons/RecommendedIcon.tsx index 06b7abb5483..06b7abb5483 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/RecommendedIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/RecommendedIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/RocketIcon.tsx b/server/sonar-web/src/main/js/components/icons/RocketIcon.tsx index ad24c87365f..ad24c87365f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/RocketIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/RocketIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/RuleScopeIcon.tsx b/server/sonar-web/src/main/js/components/icons/RuleScopeIcon.tsx index 115da520908..115da520908 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/RuleScopeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/RuleScopeIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SCMIcon.tsx b/server/sonar-web/src/main/js/components/icons/SCMIcon.tsx index fdbd75fab76..fdbd75fab76 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SCMIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/SCMIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SearchIcon.tsx b/server/sonar-web/src/main/js/components/icons/SearchIcon.tsx index 0da433a21e2..0da433a21e2 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SearchIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/SearchIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SecurityHotspotIcon.tsx b/server/sonar-web/src/main/js/components/icons/SecurityHotspotIcon.tsx index 6ac2e9297ae..6ac2e9297ae 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SecurityHotspotIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/SecurityHotspotIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SettingsIcon.tsx b/server/sonar-web/src/main/js/components/icons/SettingsIcon.tsx index 9156f96aa28..9156f96aa28 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SettingsIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/SettingsIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SeverityIcon.tsx b/server/sonar-web/src/main/js/components/icons/SeverityIcon.tsx index dbf482baa8d..dbf482baa8d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SeverityIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/SeverityIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ShortLivingBranchIcon.tsx b/server/sonar-web/src/main/js/components/icons/ShortLivingBranchIcon.tsx index 388bc50a262..388bc50a262 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/ShortLivingBranchIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/ShortLivingBranchIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SortAscIcon.tsx b/server/sonar-web/src/main/js/components/icons/SortAscIcon.tsx index 34dc1ca3002..34dc1ca3002 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SortAscIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/SortAscIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SortDescIcon.tsx b/server/sonar-web/src/main/js/components/icons/SortDescIcon.tsx index 9a4cba2e914..9a4cba2e914 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/SortDescIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/SortDescIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/StatusIcon.tsx b/server/sonar-web/src/main/js/components/icons/StatusIcon.tsx index 70f2219c2b8..70f2219c2b8 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/StatusIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/StatusIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/TagsIcon.tsx b/server/sonar-web/src/main/js/components/icons/TagsIcon.tsx index 649256cf8fa..649256cf8fa 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/TagsIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/TagsIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/TestStatusIcon.tsx b/server/sonar-web/src/main/js/components/icons/TestStatusIcon.tsx index f555a85cffc..f555a85cffc 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/TestStatusIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/TestStatusIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/TreeIcon.tsx b/server/sonar-web/src/main/js/components/icons/TreeIcon.tsx index 5b9992352e3..5b9992352e3 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/TreeIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/TreeIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/TreemapIcon.tsx b/server/sonar-web/src/main/js/components/icons/TreemapIcon.tsx index 66d14f39793..66d14f39793 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/TreemapIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/TreemapIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/VisibleIcon.tsx b/server/sonar-web/src/main/js/components/icons/VisibleIcon.tsx index d50d4d873d3..d50d4d873d3 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/VisibleIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/VisibleIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/VulnerabilityIcon.tsx b/server/sonar-web/src/main/js/components/icons/VulnerabilityIcon.tsx index 34da45580b4..34da45580b4 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/VulnerabilityIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/VulnerabilityIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/WarningIcon.tsx b/server/sonar-web/src/main/js/components/icons/WarningIcon.tsx index ceda2ea90ae..ceda2ea90ae 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/WarningIcon.tsx +++ b/server/sonar-web/src/main/js/components/icons/WarningIcon.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/Icon-test.tsx b/server/sonar-web/src/main/js/components/icons/__tests__/Icon-test.tsx index 341eb88a17e..341eb88a17e 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/Icon-test.tsx +++ b/server/sonar-web/src/main/js/components/icons/__tests__/Icon-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/IssueIcon-test.tsx b/server/sonar-web/src/main/js/components/icons/__tests__/IssueIcon-test.tsx index 852beec5385..852beec5385 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/IssueIcon-test.tsx +++ b/server/sonar-web/src/main/js/components/icons/__tests__/IssueIcon-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/IssueTypeIcon-test.tsx b/server/sonar-web/src/main/js/components/icons/__tests__/IssueTypeIcon-test.tsx index dbd892fdb52..dbd892fdb52 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/IssueTypeIcon-test.tsx +++ b/server/sonar-web/src/main/js/components/icons/__tests__/IssueTypeIcon-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/TestStatusIcon-test.tsx b/server/sonar-web/src/main/js/components/icons/__tests__/TestStatusIcon-test.tsx index c683e6cd02f..c683e6cd02f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/TestStatusIcon-test.tsx +++ b/server/sonar-web/src/main/js/components/icons/__tests__/TestStatusIcon-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/__snapshots__/Icon-test.tsx.snap b/server/sonar-web/src/main/js/components/icons/__tests__/__snapshots__/Icon-test.tsx.snap index a61c0314f87..a61c0314f87 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/__snapshots__/Icon-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/icons/__tests__/__snapshots__/Icon-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/__snapshots__/IssueIcon-test.tsx.snap b/server/sonar-web/src/main/js/components/icons/__tests__/__snapshots__/IssueIcon-test.tsx.snap index f3f5fcf1a7a..f3f5fcf1a7a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/__snapshots__/IssueIcon-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/icons/__tests__/__snapshots__/IssueIcon-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/__snapshots__/IssueTypeIcon-test.tsx.snap b/server/sonar-web/src/main/js/components/icons/__tests__/__snapshots__/IssueTypeIcon-test.tsx.snap index 4373bb03f4c..4373bb03f4c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/__snapshots__/IssueTypeIcon-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/icons/__tests__/__snapshots__/IssueTypeIcon-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/__snapshots__/TestStatusIcon-test.tsx.snap b/server/sonar-web/src/main/js/components/icons/__tests__/__snapshots__/TestStatusIcon-test.tsx.snap index 12b493c10ed..12b493c10ed 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/icons/__tests__/__snapshots__/TestStatusIcon-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/icons/__tests__/__snapshots__/TestStatusIcon-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/DateFormatter.tsx b/server/sonar-web/src/main/js/components/intl/DateFormatter.tsx index c33b8a78ff5..c33b8a78ff5 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/DateFormatter.tsx +++ b/server/sonar-web/src/main/js/components/intl/DateFormatter.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/DateFromNow.tsx b/server/sonar-web/src/main/js/components/intl/DateFromNow.tsx index 713b31fdf8d..713b31fdf8d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/DateFromNow.tsx +++ b/server/sonar-web/src/main/js/components/intl/DateFromNow.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/DateTimeFormatter.tsx b/server/sonar-web/src/main/js/components/intl/DateTimeFormatter.tsx index 64394b80c58..64394b80c58 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/DateTimeFormatter.tsx +++ b/server/sonar-web/src/main/js/components/intl/DateTimeFormatter.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/TimeFormatter.tsx b/server/sonar-web/src/main/js/components/intl/TimeFormatter.tsx index 8fb5af05440..8fb5af05440 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/TimeFormatter.tsx +++ b/server/sonar-web/src/main/js/components/intl/TimeFormatter.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__mocks__/DateFromNow.tsx b/server/sonar-web/src/main/js/components/intl/__mocks__/DateFromNow.tsx index 76a585b4045..76a585b4045 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__mocks__/DateFromNow.tsx +++ b/server/sonar-web/src/main/js/components/intl/__mocks__/DateFromNow.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/DateFormatter-test.tsx b/server/sonar-web/src/main/js/components/intl/__tests__/DateFormatter-test.tsx index d978428ced6..d978428ced6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/DateFormatter-test.tsx +++ b/server/sonar-web/src/main/js/components/intl/__tests__/DateFormatter-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/DateFromNow-test.tsx b/server/sonar-web/src/main/js/components/intl/__tests__/DateFromNow-test.tsx index 901b5cbba0c..901b5cbba0c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/DateFromNow-test.tsx +++ b/server/sonar-web/src/main/js/components/intl/__tests__/DateFromNow-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/DateTimeFormatter-test.tsx b/server/sonar-web/src/main/js/components/intl/__tests__/DateTimeFormatter-test.tsx index 5fd7e0c0987..5fd7e0c0987 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/DateTimeFormatter-test.tsx +++ b/server/sonar-web/src/main/js/components/intl/__tests__/DateTimeFormatter-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/TimeFormatter-test.tsx b/server/sonar-web/src/main/js/components/intl/__tests__/TimeFormatter-test.tsx index ac73332ca38..ac73332ca38 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/TimeFormatter-test.tsx +++ b/server/sonar-web/src/main/js/components/intl/__tests__/TimeFormatter-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/__snapshots__/DateFormatter-test.tsx.snap b/server/sonar-web/src/main/js/components/intl/__tests__/__snapshots__/DateFormatter-test.tsx.snap index 2f603c6c1bd..2f603c6c1bd 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/__snapshots__/DateFormatter-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/intl/__tests__/__snapshots__/DateFormatter-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/__snapshots__/DateFromNow-test.tsx.snap b/server/sonar-web/src/main/js/components/intl/__tests__/__snapshots__/DateFromNow-test.tsx.snap index 19ee5460047..19ee5460047 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/__snapshots__/DateFromNow-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/intl/__tests__/__snapshots__/DateFromNow-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/__snapshots__/DateTimeFormatter-test.tsx.snap b/server/sonar-web/src/main/js/components/intl/__tests__/__snapshots__/DateTimeFormatter-test.tsx.snap index c991112f771..c991112f771 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/__snapshots__/DateTimeFormatter-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/intl/__tests__/__snapshots__/DateTimeFormatter-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/__snapshots__/TimeFormatter-test.tsx.snap b/server/sonar-web/src/main/js/components/intl/__tests__/__snapshots__/TimeFormatter-test.tsx.snap index 7c19be3a479..7c19be3a479 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/intl/__tests__/__snapshots__/TimeFormatter-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/intl/__tests__/__snapshots__/TimeFormatter-test.tsx.snap diff --git a/server/sonar-web/src/main/js/components/issue/IssueView.tsx b/server/sonar-web/src/main/js/components/issue/IssueView.tsx index dc2d5e9c82c..74975574922 100644 --- a/server/sonar-web/src/main/js/components/issue/IssueView.tsx +++ b/server/sonar-web/src/main/js/components/issue/IssueView.tsx @@ -20,7 +20,7 @@ import classNames from 'classnames'; import * as React from 'react'; import { deleteIssueComment, editIssueComment } from '../../api/issues'; -import Checkbox from '../../sonar-ui-common/components/controls/Checkbox'; +import Checkbox from '../../components/controls/Checkbox'; import { BranchLike } from '../../types/branch-like'; import { updateIssue } from './actions'; import IssueActionsBar from './components/IssueActionsBar'; 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 5389b6c2ded..33558cf7f7d 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { IssueResponse } from '../../../types/issues'; import { updateIssue } from '../actions'; 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 11c7af41e71..6d91784ffa9 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 @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Toggler from '../../../components/controls/Toggler'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import Avatar from '../../ui/Avatar'; import SetAssigneePopup from '../popups/SetAssigneePopup'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueChangelog.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueChangelog.tsx index 10d6cbdae9d..a7b11c014e8 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueChangelog.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueChangelog.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Toggler from '../../../components/controls/Toggler'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; +import DateFromNow from '../../intl/DateFromNow'; import ChangelogPopup from '../popups/ChangelogPopup'; interface Props { 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 119f7799a59..16fb333578a 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; interface Props { diff: T.IssueChangelogDiff; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.tsx index 8373f5faeca..00f4f1e213c 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { addIssueComment } from '../../../api/issues'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Toggler from '../../../components/controls/Toggler'; +import { translate } from '../../../helpers/l10n'; import { updateIssue } from '../actions'; import CommentPopup from '../popups/CommentPopup'; diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.tsx index 0e598e235c5..301a32889b4 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { DeleteButton, EditButton } from '../../../components/controls/buttons'; +import Toggler from '../../../components/controls/Toggler'; +import { PopupPlacement } from '../../../components/ui/popups'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { sanitizeString } from '../../../helpers/sanitize'; -import { DeleteButton, EditButton } from '../../../sonar-ui-common/components/controls/buttons'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import DateFromNow from '../../../sonar-ui-common/components/intl/DateFromNow'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import DateFromNow from '../../intl/DateFromNow'; import Avatar from '../../ui/Avatar'; import CommentDeletePopup from '../popups/CommentDeletePopup'; import CommentPopup from '../popups/CommentPopup'; 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 5c83e6f7a2b..3662530064e 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Tooltip from '../../../components/controls/Tooltip'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { RuleStatus } from '../../../types/rules'; import DocumentationTooltip from '../../common/DocumentationTooltip'; import { WorkspaceContextShape } from '../../workspace/context'; 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 9a3d77151db..c5f001d36e4 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 @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { setIssueSeverity } from '../../../api/issues'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Toggler from '../../../components/controls/Toggler'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { IssueResponse } from '../../../types/issues'; import SeverityHelper from '../../shared/SeverityHelper'; import SetSeverityPopup from '../popups/SetSeverityPopup'; 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 e1621611761..f5d4ee9fdeb 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { setIssueTags } from '../../../api/issues'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Toggler from '../../../components/controls/Toggler'; +import { translate } from '../../../helpers/l10n'; import TagsList from '../../tags/TagsList'; import { updateIssue } from '../actions'; import SetIssueTagsPopup from '../popups/SetIssueTagsPopup'; 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 581ab6fcbd9..e4af5329dee 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 @@ -19,12 +19,12 @@ */ import * as React from 'react'; import { Link } from 'react-router'; +import Tooltip from '../../../components/controls/Tooltip'; +import LinkIcon from '../../../components/icons/LinkIcon'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { formatMeasure } from '../../../helpers/measures'; import { getComponentIssuesUrl } from '../../../helpers/urls'; -import Tooltip from '../../../sonar-ui-common/components/controls/Tooltip'; -import LinkIcon from '../../../sonar-ui-common/components/icons/LinkIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../../../sonar-ui-common/helpers/measures'; import { BranchLike } from '../../../types/branch-like'; import { RuleStatus } from '../../../types/rules'; import LocationIndex from '../../common/LocationIndex'; 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 151b16b4c60..0371babb273 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 @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { setIssueTransition } from '../../../api/issues'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Toggler from '../../../components/controls/Toggler'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import StatusHelper from '../../shared/StatusHelper'; import { updateIssue } from '../actions'; import SetTransitionPopup from '../popups/SetTransitionPopup'; 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 dfb5884e687..8dc32e2ce15 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 @@ -20,11 +20,11 @@ import * as React from 'react'; import { setIssueType } from '../../../api/issues'; import { colors } from '../../../app/theme'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Toggler from '../../../components/controls/Toggler'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { IssueResponse } from '../../../types/issues'; import SetTypePopup from '../popups/SetTypePopup'; diff --git a/server/sonar-web/src/main/js/components/issue/components/SimilarIssuesFilter.tsx b/server/sonar-web/src/main/js/components/issue/components/SimilarIssuesFilter.tsx index 9719b16e892..097e398b946 100644 --- a/server/sonar-web/src/main/js/components/issue/components/SimilarIssuesFilter.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/SimilarIssuesFilter.tsx @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import Toggler from '../../../sonar-ui-common/components/controls/Toggler'; -import DropdownIcon from '../../../sonar-ui-common/components/icons/DropdownIcon'; -import FilterIcon from '../../../sonar-ui-common/components/icons/FilterIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ButtonLink } from '../../../components/controls/buttons'; +import Toggler from '../../../components/controls/Toggler'; +import DropdownIcon from '../../../components/icons/DropdownIcon'; +import FilterIcon from '../../../components/icons/FilterIcon'; +import { translate } from '../../../helpers/l10n'; import SimilarIssuesPopup from '../popups/SimilarIssuesPopup'; interface Props { diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueAssign-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueAssign-test.tsx index b7a57ad8f6f..7ba490f0141 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueAssign-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueAssign-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockIssue } from '../../../../helpers/testMocks'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import IssueAssign from '../IssueAssign'; const issue = mockIssue(false, { diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelog-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelog-test.tsx index 79c9f420d31..ef6f5e3ae6b 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelog-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelog-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import IssueChangelog from '../IssueChangelog'; const issue = { diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentAction-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentAction-test.tsx index ea85db6caf3..066a36d8442 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentAction-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentAction-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import IssueCommentAction from '../IssueCommentAction'; it('should render correctly', () => { diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentLine-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentLine-test.tsx index 1bc3834007c..5888cba29dc 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentLine-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueCommentLine-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import IssueCommentLine from '../IssueCommentLine'; const comment: T.IssueComment = { diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx index 76434929cdf..3e1d43c3c7e 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueMessage-test.tsx @@ -19,8 +19,8 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { ButtonLink } from '../../../../sonar-ui-common/components/controls/buttons'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { ButtonLink } from '../../../../components/controls/buttons'; +import { click } from '../../../../helpers/testUtils'; import { RuleStatus } from '../../../../types/rules'; import IssueMessage, { IssueMessageProps } from '../IssueMessage'; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueSeverity-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueSeverity-test.tsx index 0ab46df88ff..cf1eeb35049 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueSeverity-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueSeverity-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import IssueSeverity from '../IssueSeverity'; const issue = { severity: 'BLOCKER' }; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTags-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTags-test.tsx index bb66a22454d..9a8dd872cf4 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTags-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTags-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import IssueTags from '../IssueTags'; const issue = { key: 'issuekey', tags: ['mytag', 'test'] }; diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx index a781f587839..82aaf066958 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTransition-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import IssueTransition from '../IssueTransition'; const issue: IssueTransition['props']['issue'] = { diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueType-test.tsx b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueType-test.tsx index 82c0709b272..0e555b9d9d6 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueType-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueType-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import IssueType from '../IssueType'; const issue: Pick<T.Issue, 'type'> = { type: 'BUG' }; diff --git a/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.tsx index f34b57ee112..eb240165cee 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { getIssueChangelog } from '../../../api/issues'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import DateTimeFormatter from '../../../sonar-ui-common/components/intl/DateTimeFormatter'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import { PopupPlacement } from '../../../components/ui/popups'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import DateTimeFormatter from '../../intl/DateTimeFormatter'; import Avatar from '../../ui/Avatar'; import IssueChangelogDiff from '../components/IssueChangelogDiff'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.tsx index 6228c4531e2..0dbb1794809 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import { PopupPlacement } from '../../../components/ui/popups'; +import { translate } from '../../../helpers/l10n'; interface Props { onDelete: () => void; diff --git a/server/sonar-web/src/main/js/components/issue/popups/CommentPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/CommentPopup.tsx index 2698e111960..e03c28cb175 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/CommentPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/CommentPopup.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button, ResetButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button, ResetButtonLink } from '../../../components/controls/buttons'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import { PopupPlacement } from '../../../components/ui/popups'; +import { translate } from '../../../helpers/l10n'; import FormattingTips from '../../common/FormattingTips'; interface Props { diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.tsx index 2ca2cdd3cf8..725fa526e5f 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.tsx @@ -20,10 +20,10 @@ import { map } from 'lodash'; import * as React from 'react'; import { searchUsers } from '../../../api/users'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import SearchBox from '../../../components/controls/SearchBox'; +import { translate } from '../../../helpers/l10n'; import { isLoggedIn, isUserActive } from '../../../helpers/users'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import SearchBox from '../../../sonar-ui-common/components/controls/SearchBox'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import SelectList from '../../common/SelectList'; import SelectListItem from '../../common/SelectListItem'; import { withCurrentUser } from '../../hoc/withCurrentUser'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetIssueTagsPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SetIssueTagsPopup.tsx index 6a67ab9522f..b163ab90472 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SetIssueTagsPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SetIssueTagsPopup.tsx @@ -20,8 +20,8 @@ import { difference, without } from 'lodash'; import * as React from 'react'; import { searchIssueTags } from '../../../api/issues'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import { PopupPlacement } from '../../../sonar-ui-common/components/ui/popups'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import { PopupPlacement } from '../../../components/ui/popups'; import TagsSelector from '../../tags/TagsSelector'; interface Props { diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.tsx index 9758367c83d..28e153b03f8 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import SeverityIcon from '../../../sonar-ui-common/components/icons/SeverityIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import SeverityIcon from '../../../components/icons/SeverityIcon'; +import { translate } from '../../../helpers/l10n'; import SelectList from '../../common/SelectList'; import SelectListItem from '../../common/SelectListItem'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx index 1c5ccb83a53..4fa4cf0fc52 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import { hasMessage, translate } from '../../../sonar-ui-common/helpers/l10n'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import { hasMessage, translate } from '../../../helpers/l10n'; import SelectList from '../../common/SelectList'; import SelectListItem from '../../common/SelectListItem'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.tsx index 39807141097..7cb044ffe98 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; +import { translate } from '../../../helpers/l10n'; import SelectList from '../../common/SelectList'; import SelectListItem from '../../common/SelectListItem'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.tsx index 32d6136db31..ea5636b26d8 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.tsx @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { DropdownOverlay } from '../../../sonar-ui-common/components/controls/Dropdown'; -import IssueTypeIcon from '../../../sonar-ui-common/components/icons/IssueTypeIcon'; -import QualifierIcon from '../../../sonar-ui-common/components/icons/QualifierIcon'; -import TagsIcon from '../../../sonar-ui-common/components/icons/TagsIcon'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; -import { fileFromPath, limitComponentName } from '../../../sonar-ui-common/helpers/path'; +import { DropdownOverlay } from '../../../components/controls/Dropdown'; +import IssueTypeIcon from '../../../components/icons/IssueTypeIcon'; +import QualifierIcon from '../../../components/icons/QualifierIcon'; +import TagsIcon from '../../../components/icons/TagsIcon'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { fileFromPath, limitComponentName } from '../../../helpers/path'; import SelectList from '../../common/SelectList'; import SelectListItem from '../../common/SelectListItem'; import SeverityHelper from '../../shared/SeverityHelper'; diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/ChangelogPopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/ChangelogPopup-test.tsx index a2c1c2eb712..188040143b4 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/ChangelogPopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/ChangelogPopup-test.tsx @@ -20,7 +20,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { getIssueChangelog } from '../../../../api/issues'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import ChangelogPopup from '../ChangelogPopup'; jest.mock('../../../../api/issues', () => ({ diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentDeletePopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentDeletePopup-test.tsx index dc620384173..4824447420d 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentDeletePopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentDeletePopup-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import CommentDeletePopup from '../CommentDeletePopup'; it('should render the comment delete popup correctly', () => { diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentPopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentPopup-test.tsx index 28364fe0a3f..3893fee0716 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentPopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/CommentPopup-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import CommentPopup from '../CommentPopup'; it('should render the comment popup correctly without existing comment', () => { diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetAssigneePopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetAssigneePopup-test.tsx index 71861beb06b..a18dedc5feb 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetAssigneePopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetAssigneePopup-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { searchUsers } from '../../../../api/users'; import { mockLoggedInUser, mockUser } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { SetAssigneePopup } from '../SetAssigneePopup'; jest.mock('../../../../api/users', () => { diff --git a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTransitionPopup-test.tsx b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTransitionPopup-test.tsx index bcd199f2a18..517e398c1bc 100644 --- a/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTransitionPopup-test.tsx +++ b/server/sonar-web/src/main/js/components/issue/popups/__tests__/SetTransitionPopup-test.tsx @@ -19,11 +19,11 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { hasMessage } from '../../../../sonar-ui-common/helpers/l10n'; +import { hasMessage } from '../../../../helpers/l10n'; import SetTransitionPopup, { Props } from '../SetTransitionPopup'; -jest.mock('../../../../sonar-ui-common/helpers/l10n', () => ({ - ...jest.requireActual('../../../../sonar-ui-common/helpers/l10n'), +jest.mock('../../../../helpers/l10n', () => ({ + ...jest.requireActual('../../../../helpers/l10n'), hasMessage: jest.fn().mockReturnValue(false) })); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/lazyLoadComponent.tsx b/server/sonar-web/src/main/js/components/lazyLoadComponent.tsx index 25b96db6c36..d45577895dc 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/lazyLoadComponent.tsx +++ b/server/sonar-web/src/main/js/components/lazyLoadComponent.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Alert } from '../components/ui/Alert'; import { IS_SSR } from '../helpers/init'; import { translate } from '../helpers/l10n'; import { requestTryAndRepeatUntil } from '../helpers/request'; -import { Alert } from './ui/Alert'; export function lazyLoadComponent<T extends React.ComponentType<any>>( factory: () => Promise<{ default: T }>, diff --git a/server/sonar-web/src/main/js/components/measure/Measure.tsx b/server/sonar-web/src/main/js/components/measure/Measure.tsx index f1d0d8469e0..85afa5e6d7e 100644 --- a/server/sonar-web/src/main/js/components/measure/Measure.tsx +++ b/server/sonar-web/src/main/js/components/measure/Measure.tsx @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; -import Level from '../../sonar-ui-common/components/ui/Level'; -import Rating from '../../sonar-ui-common/components/ui/Rating'; -import { formatMeasure } from '../../sonar-ui-common/helpers/measures'; +import Tooltip from '../../components/controls/Tooltip'; +import Level from '../../components/ui/Level'; +import Rating from '../../components/ui/Rating'; +import { formatMeasure } from '../../helpers/measures'; import { getRatingTooltip } from './utils'; interface Props { 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 222222308c2..8ffb1046c3e 100644 --- a/server/sonar-web/src/main/js/components/shared/SeverityHelper.tsx +++ b/server/sonar-web/src/main/js/components/shared/SeverityHelper.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import SeverityIcon from '../../sonar-ui-common/components/icons/SeverityIcon'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import SeverityIcon from '../../components/icons/SeverityIcon'; +import { translate } from '../../helpers/l10n'; interface Props { className?: string; 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 bc9de1dd8a0..368ef64250e 100644 --- a/server/sonar-web/src/main/js/components/shared/StatusHelper.tsx +++ b/server/sonar-web/src/main/js/components/shared/StatusHelper.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import StatusIcon from '../../sonar-ui-common/components/icons/StatusIcon'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import StatusIcon from '../../components/icons/StatusIcon'; +import { translate } from '../../helpers/l10n'; interface Props { className?: string; 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 18ac7cc516f..d3502aac741 100644 --- a/server/sonar-web/src/main/js/components/shared/TypeHelper.tsx +++ b/server/sonar-web/src/main/js/components/shared/TypeHelper.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import IssueTypeIcon from '../../sonar-ui-common/components/icons/IssueTypeIcon'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import IssueTypeIcon from '../../components/icons/IssueTypeIcon'; +import { translate } from '../../helpers/l10n'; interface Props { className?: string; 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 00853bc998b..e6d80810f39 100644 --- a/server/sonar-web/src/main/js/components/tags/TagsList.tsx +++ b/server/sonar-web/src/main/js/components/tags/TagsList.tsx @@ -19,9 +19,9 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import DropdownIcon from '../../sonar-ui-common/components/icons/DropdownIcon'; -import TagsIcon from '../../sonar-ui-common/components/icons/TagsIcon'; -import { translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import DropdownIcon from '../../components/icons/DropdownIcon'; +import TagsIcon from '../../components/icons/TagsIcon'; +import { translateWithParameters } from '../../helpers/l10n'; import './TagsList.css'; interface Props { diff --git a/server/sonar-web/src/main/js/components/tags/TagsSelector.tsx b/server/sonar-web/src/main/js/components/tags/TagsSelector.tsx index ae83cabad8c..4834983abc2 100644 --- a/server/sonar-web/src/main/js/components/tags/TagsSelector.tsx +++ b/server/sonar-web/src/main/js/components/tags/TagsSelector.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../helpers/l10n'; import MultiSelect from '../common/MultiSelect'; import './TagsList.css'; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/theme.ts b/server/sonar-web/src/main/js/components/theme.ts index 1dabe475f62..1dabe475f62 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/theme.ts +++ b/server/sonar-web/src/main/js/components/theme.ts 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 43588b85c38..2379c9f0e15 100644 --- a/server/sonar-web/src/main/js/components/tutorials/TutorialSelection.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/TutorialSelection.tsx @@ -21,7 +21,7 @@ import * as React from 'react'; import { WithRouterProps } from 'react-router'; import { getAlmSettingsNoCatch } from '../../api/alm-settings'; import { getValues } from '../../api/settings'; -import { getHostUrl } from '../../sonar-ui-common/helpers/urls'; +import { getHostUrl } from '../../helpers/urls'; import { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../types/alm-settings'; import { SettingsKey } from '../../types/settings'; import { withRouter } from '../hoc/withRouter'; 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 af7d93ee15d..39b7a6449ed 100644 --- a/server/sonar-web/src/main/js/components/tutorials/TutorialSelectionRenderer.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/TutorialSelectionRenderer.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import EllipsisIcon from '../../sonar-ui-common/components/icons/EllipsisIcon'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../sonar-ui-common/helpers/urls'; +import EllipsisIcon from '../../components/icons/EllipsisIcon'; +import { translate } from '../../helpers/l10n'; +import { getBaseUrl } from '../../helpers/urls'; import { AlmKeys, AlmSettingsInstance, ProjectAlmBindingResponse } from '../../types/alm-settings'; import AzurePipelinesTutorial from './azure-pipelines/AzurePipelinesTutorial'; import BitbucketPipelinesTutorial from './bitbucket-pipelines/BitbucketPipelinesTutorial'; diff --git a/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelection-test.tsx b/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelection-test.tsx index 6eab55cfecf..db0f2d3055e 100644 --- a/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelection-test.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelection-test.tsx @@ -31,13 +31,13 @@ import { mockLoggedInUser, mockRouter } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; -import { getHostUrl } from '../../../sonar-ui-common/helpers/urls'; +import { waitAndUpdate } from '../../../helpers/testUtils'; +import { getHostUrl } from '../../../helpers/urls'; import { SettingsKey } from '../../../types/settings'; import { TutorialSelection } from '../TutorialSelection'; import { TutorialModes } from '../types'; -jest.mock('../../../sonar-ui-common/helpers/urls', () => ({ +jest.mock('../../../helpers/urls', () => ({ getHostUrl: jest.fn().mockReturnValue('http://host.url') })); diff --git a/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelectionRenderer-test.tsx b/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelectionRenderer-test.tsx index a6c45ad79f7..35d284ecb0b 100644 --- a/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelectionRenderer-test.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelectionRenderer-test.tsx @@ -28,7 +28,7 @@ import { mockProjectGitLabBindingResponse } from '../../../helpers/mocks/alm-settings'; import { mockComponent, mockLoggedInUser } from '../../../helpers/testMocks'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import TutorialSelectionRenderer, { TutorialSelectionRendererProps } from '../TutorialSelectionRenderer'; 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 e54a817f490..114bdf13839 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { translate } from '../../../helpers/l10n'; import { AlmKeys } from '../../../types/alm-settings'; import AllSetStep from '../components/AllSetStep'; import FinishButton from '../components/FinishButton'; 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 7bd83625b83..f621a8f2732 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { getLanguages, Store } from '../../../store/rootReducer'; import RenderOptions from '../components/RenderOptions'; import { BuildTools } from '../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 457a3c85238..9a5ecb42dd8 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export default function ExtensionInstallationStepContent() { return ( 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 4f357e41299..5e14ff14c3e 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; function renderSentenceWithFieldAndValue(props: { field: React.ReactNode; 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 330d2175399..18663b7871e 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { ClipboardIconButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { ClipboardIconButton } from '../../../components/controls/clipboard'; +import { translate } from '../../../helpers/l10n'; import EditTokenModal from '../components/EditTokenModal'; import SentenceWithHighlights from '../components/SentenceWithHighlights'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/AzurePipelinesTutorial-test.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/AzurePipelinesTutorial-test.tsx index 245a6279f4c..9109d04627e 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/AzurePipelinesTutorial-test.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/AzurePipelinesTutorial-test.tsx @@ -19,9 +19,9 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { Button } from '../../../../components/controls/buttons'; import { mockComponent, mockLoggedInUser } from '../../../../helpers/testMocks'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import Step from '../../components/Step'; import AzurePipelinesTutorial, { AzurePipelinesTutorialProps } from '../AzurePipelinesTutorial'; diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/ServiceEndpointStepContent-test.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/ServiceEndpointStepContent-test.tsx index 05d0a5e3de6..513b9a5a0af 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/ServiceEndpointStepContent-test.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/ServiceEndpointStepContent-test.tsx @@ -19,9 +19,9 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; +import { Button } from '../../../../components/controls/buttons'; import { mockComponent, mockLoggedInUser } from '../../../../helpers/testMocks'; -import { Button } from '../../../../sonar-ui-common/components/controls/buttons'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import EditTokenModal from '../../components/EditTokenModal'; import ServiceEndpointStepContent from '../ServiceEndpointStepContent'; 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 136242ab73b..f4585e2bd90 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 @@ -21,9 +21,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Alert } from '../../../../components/ui/Alert'; import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { AlmKeys } from '../../../../types/alm-settings'; export default function AlertClassicEditor() { 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 1cdc13e7ed5..3fd4df99852 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; -import { getHostUrl } from '../../../../sonar-ui-common/helpers/urls'; +import { translate } from '../../../../helpers/l10n'; +import { getHostUrl } from '../../../../helpers/urls'; import CodeSnippet from '../../../common/CodeSnippet'; import { CompilationInfo } from '../../components/CompilationInfo'; import RenderOptions from '../../components/RenderOptions'; 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 ac9b306252d..28b921103af 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; import { BuildTools } from '../../types'; import JavaToolInstallation from '../JavaToolInstallation'; 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 50f84fce710..2e866b853cf 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; -import { translate, translateWithParameters } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; import { BuildTools } from '../../types'; import JavaToolInstallation from '../JavaToolInstallation'; 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 b43b6ce906e..a9ba41378e1 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 @@ -20,8 +20,8 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { ClipboardIconButton } from '../../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { ClipboardIconButton } from '../../../../components/controls/clipboard'; +import { translate } from '../../../../helpers/l10n'; import CodeSnippet from '../../../common/CodeSnippet'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; import { BuildTools } from '../../types'; 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 a4b99aaa31b..85a29d9ddd3 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 @@ -21,9 +21,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; +import { Alert } from '../../../../components/ui/Alert'; import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { AlmKeys } from '../../../../types/alm-settings'; import { withAppState } from '../../../hoc/withAppState'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; 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 7366acaa63e..08131943c92 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { AlmKeys, AlmSettingsInstance, 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 bfc5e8499be..bf690adc31f 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { ClipboardIconButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ClipboardIconButton } from '../../../components/controls/clipboard'; +import { translate } from '../../../helpers/l10n'; import CodeSnippet from '../../common/CodeSnippet'; import DefaultProjectKey from '../components/DefaultProjectKey'; import { BuildTools } from '../types'; 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 c3227e8a063..840b3a258ef 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { ClipboardIconButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { ClipboardIconButton } from '../../../components/controls/clipboard'; +import { translate } from '../../../helpers/l10n'; import { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../../types/alm-settings'; import SentenceWithHighlights from '../components/SentenceWithHighlights'; import TokenStepGenerator from '../components/TokenStepGenerator'; 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 5e71426c94d..806d1e4215c 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../sonar-ui-common/helpers/urls'; +import { translate } from '../../../helpers/l10n'; +import { getBaseUrl } from '../../../helpers/urls'; import { AlmKeys } from '../../../types/alm-settings'; import { withAppState } from '../../hoc/withAppState'; import SentenceWithHighlights from './SentenceWithHighlights'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/AllSetStep.tsx b/server/sonar-web/src/main/js/components/tutorials/components/AllSetStep.tsx index 5f823cc2075..75dd5d1c11d 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/AllSetStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/AllSetStep.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { AlmKeys } from '../../../types/alm-settings'; import AllSet from './AllSet'; import Step from './Step'; 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 51cbcf43cbd..336c5013549 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,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; export interface CompilationInfoProps { className?: string; 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 a08f0ab767d..cbd74abdc32 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { ClipboardIconButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ClipboardIconButton } from '../../../components/controls/clipboard'; +import { translate } from '../../../helpers/l10n'; import CodeSnippet from '../../common/CodeSnippet'; export interface CreateYmlFileProps { 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 fff4339ec1b..0812e977c29 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 @@ -21,12 +21,12 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { generateToken, getTokens, revokeToken } from '../../../api/user-tokens'; -import { Button, DeleteButton } from '../../../sonar-ui-common/components/controls/buttons'; -import { ClipboardIconButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import SimpleModal from '../../../sonar-ui-common/components/controls/SimpleModal'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import DeferredSpinner from '../../../sonar-ui-common/components/ui/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../sonar-ui-common/helpers/l10n'; +import { Button, DeleteButton } from '../../../components/controls/buttons'; +import { ClipboardIconButton } from '../../../components/controls/clipboard'; +import SimpleModal from '../../../components/controls/SimpleModal'; +import { Alert } from '../../../components/ui/Alert'; +import DeferredSpinner from '../../../components/ui/DeferredSpinner'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getUniqueTokenName } from '../utils'; interface State { diff --git a/server/sonar-web/src/main/js/components/tutorials/components/FinishButton.tsx b/server/sonar-web/src/main/js/components/tutorials/components/FinishButton.tsx index 317c5b35fc0..21b53377277 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/FinishButton.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/FinishButton.tsx @@ -20,9 +20,9 @@ import * as React from 'react'; import { rawSizes } from '../../../app/theme'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ChevronRightIcon from '../../../sonar-ui-common/components/icons/ChevronRightIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import ChevronRightIcon from '../../../components/icons/ChevronRightIcon'; +import { translate } from '../../../helpers/l10n'; export interface FinishButtonProps { onClick: () => void; 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 962c4ec10e3..b50d3edb962 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export interface LabelActionPairProps { translationKey: string; 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 9ee3babea90..62604c06c00 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ClipboardIconButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ClipboardIconButton } from '../../../components/controls/clipboard'; +import { translate } from '../../../helpers/l10n'; export interface LabelValuePairProps { translationKey: string; 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 ae796aa23ce..8b29e737d4a 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import RadioToggle from '../../../sonar-ui-common/components/controls/RadioToggle'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import RadioToggle from '../../../components/controls/RadioToggle'; +import { translate } from '../../../helpers/l10n'; export interface RenderOptionsProps { checked: string | undefined; 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 d8d392d1a9a..3a59b610e03 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export interface SentenceWithFilenameProps { filename: string; 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 de7b5b23a0f..46281bed618 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export interface SentenceWithHighlightsProps { highlightKeys: string[]; 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 cbafc901032..822850e309e 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { translate } from '../../../helpers/l10n'; import EditTokenModal from './EditTokenModal'; export interface TokenStepGeneratorProps { 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 21d108c479d..e8bbc19a1b5 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { withCLanguageFeature } from '../../hoc/withCLanguageFeature'; import RenderOptions from '../components/RenderOptions'; import { BuildTools } from '../types'; 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 062c1cef18f..685792f114b 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 @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { generateToken, getTokens, revokeToken } from '../../../../api/user-tokens'; import { mockComponent, mockEvent, mockLoggedInUser } from '../../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../../helpers/testUtils'; import { getUniqueTokenName } from '../../utils'; import EditTokenModal from '../EditTokenModal'; diff --git a/server/sonar-web/src/main/js/components/tutorials/components/__tests__/Step-test.tsx b/server/sonar-web/src/main/js/components/tutorials/components/__tests__/Step-test.tsx index 4672e3b653e..2fd72841f4e 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/__tests__/Step-test.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/__tests__/Step-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../../helpers/testUtils'; import Step from '../Step'; it('renders', () => { 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 c990ecce3d3..51a728699dc 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { AlmKeys, AlmSettingsInstance, 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 6253a56bdf6..a3e2c0146ec 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { ClipboardIconButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { ClipboardIconButton } from '../../../components/controls/clipboard'; +import { translate } from '../../../helpers/l10n'; import { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../../types/alm-settings'; import SentenceWithHighlights from '../components/SentenceWithHighlights'; import TokenStepGenerator from '../components/TokenStepGenerator'; 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 0a223beaf08..a75146f9f2b 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { CompilationInfo } from '../../components/CompilationInfo'; import CreateYmlFile from '../../components/CreateYmlFile'; import DefaultProjectKey from '../../components/DefaultProjectKey'; 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 8f7ba36e3ce..a40b93b6156 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { ClipboardIconButton } from '../../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { ClipboardIconButton } from '../../../../components/controls/clipboard'; +import { translate } from '../../../../helpers/l10n'; import CodeSnippet from '../../../common/CodeSnippet'; import CreateYmlFile from '../../components/CreateYmlFile'; import FinishButton from '../../components/FinishButton'; 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 73618bc6b5b..bec436b363f 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { ClipboardIconButton } from '../../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { ClipboardIconButton } from '../../../../components/controls/clipboard'; +import { translate } from '../../../../helpers/l10n'; import CodeSnippet from '../../../common/CodeSnippet'; import CreateYmlFile from '../../components/CreateYmlFile'; import FinishButton from '../../components/FinishButton'; 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 4c770fed88a..a0ccf13f7b1 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { ClipboardIconButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { ClipboardIconButton } from '../../../components/controls/clipboard'; +import { translate } from '../../../helpers/l10n'; import Step from '../components/Step'; import TokenStepGenerator from '../components/TokenStepGenerator'; 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 c302598a3a7..83103e54ada 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 @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { AlmKeys } from '../../../types/alm-settings'; import AllSetStep from '../components/AllSetStep'; import { BuildTools } from '../types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/gitlabci/ProjectKeyStep.tsx b/server/sonar-web/src/main/js/components/tutorials/gitlabci/ProjectKeyStep.tsx index f1f095cc228..1860bac7170 100644 --- a/server/sonar-web/src/main/js/components/tutorials/gitlabci/ProjectKeyStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/gitlabci/ProjectKeyStep.tsx @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import { ClipboardIconButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import { ClipboardIconButton } from '../../../components/controls/clipboard'; +import { translate } from '../../../helpers/l10n'; import CodeSnippet from '../../common/CodeSnippet'; import { withCLanguageFeature } from '../../hoc/withCLanguageFeature'; import RenderOptions from '../components/RenderOptions'; 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 6620ccdaada..0c0e01cc62f 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 @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { ClipboardIconButton } from '../../../sonar-ui-common/components/controls/clipboard'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { ClipboardIconButton } from '../../../components/controls/clipboard'; +import { translate } from '../../../helpers/l10n'; import { withAppState } from '../../hoc/withAppState'; import FinishButton from '../components/FinishButton'; import Step from '../components/Step'; 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 43393164c70..e7e5de36c31 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { connect } from 'react-redux'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { getAppState, getCurrentUserSetting, Store } from '../../../store/rootReducer'; import { setCurrentUserSetting } from '../../../store/users'; import { diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsfileStep.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsfileStep.tsx index 057511e09e5..e47e66b1677 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsfileStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsfileStep.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; import { withCLanguageFeature } from '../../hoc/withCLanguageFeature'; import RenderOptions from '../components/RenderOptions'; import Step from '../components/Step'; 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 475df4e7d67..01c46ed270e 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { rawSizes } from '../../../app/theme'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ChevronRightIcon from '../../../sonar-ui-common/components/icons/ChevronRightIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import ChevronRightIcon from '../../../components/icons/ChevronRightIcon'; +import { translate } from '../../../helpers/l10n'; import { AlmKeys, AlmSettingsInstance, 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 a75017cf628..e12de3fb7ce 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { rawSizes } from '../../../app/theme'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import ChevronRightIcon from '../../../sonar-ui-common/components/icons/ChevronRightIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import ChevronRightIcon from '../../../components/icons/ChevronRightIcon'; +import { translate } from '../../../helpers/l10n'; import { AlmKeys } from '../../../types/alm-settings'; import LabelActionPair from '../components/LabelActionPair'; import SentenceWithHighlights from '../components/SentenceWithHighlights'; 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 ec20d0ddc73..a4be8717597 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 @@ -21,11 +21,11 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { rawSizes } from '../../../app/theme'; -import { Button } from '../../../sonar-ui-common/components/controls/buttons'; -import Checkbox from '../../../sonar-ui-common/components/controls/Checkbox'; -import ChevronRightIcon from '../../../sonar-ui-common/components/icons/ChevronRightIcon'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button } from '../../../components/controls/buttons'; +import Checkbox from '../../../components/controls/Checkbox'; +import ChevronRightIcon from '../../../components/icons/ChevronRightIcon'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; import { AlmKeys } from '../../../types/alm-settings'; import SentenceWithHighlights from '../components/SentenceWithHighlights'; import Step from '../components/Step'; 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 f2bc56e759a..8ff002b05ac 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import RadioToggle from '../../../sonar-ui-common/components/controls/RadioToggle'; -import AlertSuccessIcon from '../../../sonar-ui-common/components/icons/AlertSuccessIcon'; -import { hasMessage, translate } from '../../../sonar-ui-common/helpers/l10n'; +import RadioToggle from '../../../components/controls/RadioToggle'; +import AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon'; +import { hasMessage, translate } from '../../../helpers/l10n'; import { AlmKeys } from '../../../types/alm-settings'; import Step from '../components/Step'; 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 11dbe47aa07..281f72a3b60 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 @@ -20,9 +20,9 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { rawSizes } from '../../../app/theme'; -import { Button, ButtonLink } from '../../../sonar-ui-common/components/controls/buttons'; -import ChevronRightIcon from '../../../sonar-ui-common/components/icons/ChevronRightIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button, ButtonLink } from '../../../components/controls/buttons'; +import ChevronRightIcon from '../../../components/icons/ChevronRightIcon'; +import { translate } from '../../../helpers/l10n'; import { AlmKeys, AlmSettingsInstance, 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 05fd27ef083..93631109f6c 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 @@ -19,9 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Alert } from '../../../components/ui/Alert'; +import { translate } from '../../../helpers/l10n'; import { stripTrailingSlash } from '../../../helpers/urls'; -import { Alert } from '../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; import { AlmKeys, AlmSettingsInstance, 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 c94a66d0288..33a144d712d 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import CodeSnippet from '../../common/CodeSnippet'; 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 9c446ea7185..d1c43de7e31 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 @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../../types/alm-settings'; import CodeSnippet from '../../common/CodeSnippet'; import LabelActionPair from '../components/LabelActionPair'; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/SelectAlmStep-test.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/SelectAlmStep-test.tsx index 4096d4a347a..cc92d883ed4 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/SelectAlmStep-test.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/SelectAlmStep-test.tsx @@ -24,7 +24,7 @@ import { AlmKeys } from '../../../../types/alm-settings'; import Step from '../../components/Step'; import SelectAlmStep, { SelectAlmStepProps } from '../SelectAlmStep'; -jest.mock('../../../../sonar-ui-common/helpers/l10n', () => ({ +jest.mock('../../../../helpers/l10n', () => ({ hasMessage: (_a: string, k: string, _b: string) => k === AlmKeys.BitbucketCloud, translate: (...k: string[]) => k.join('.') })); diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CFamilly.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CFamilly.tsx index 03376585600..ad394741e29 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CFamilly.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/CFamilly.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { CompilationInfo } from '../../components/CompilationInfo'; import DefaultProjectKey from '../../components/DefaultProjectKey'; import FinishButton from '../../components/FinishButton'; 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 3a4beda931e..1a0bdfe0aba 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 @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import HelpTooltip from '../../../../sonar-ui-common/components/controls/HelpTooltip'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; +import HelpTooltip from '../../../../components/controls/HelpTooltip'; +import { Alert } from '../../../../components/ui/Alert'; import CodeSnippet from '../../../common/CodeSnippet'; 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 fe6c15d88cf..de4e4b75140 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,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import FinishButton from '../../components/FinishButton'; import RenderOptions from '../../components/RenderOptions'; import { OSs } from '../../types'; 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 3db98dc4ed2..5c83523c60a 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ClipboardIconButton } from '../../../../sonar-ui-common/components/controls/clipboard'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { ClipboardIconButton } from '../../../../components/controls/clipboard'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate } from '../../../../helpers/l10n'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; export default function DotNetPrereqsMSBuild() { 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 708e4518ddc..8485de77617 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 @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ClipboardIconButton } from '../../../../sonar-ui-common/components/controls/clipboard'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { ClipboardIconButton } from '../../../../components/controls/clipboard'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate } from '../../../../helpers/l10n'; import SentenceWithHighlights from '../../components/SentenceWithHighlights'; export default function DotNetPrereqsScanner() { diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/BuildToolForm.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/BuildToolForm.tsx index aad059d1c9b..296d481d2c2 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/BuildToolForm.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/BuildToolForm.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import RadioToggle from '../../../sonar-ui-common/components/controls/RadioToggle'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import RadioToggle from '../../../components/controls/RadioToggle'; +import { translate } from '../../../helpers/l10n'; import { withCLanguageFeature } from '../../hoc/withCLanguageFeature'; import RenderOptions from '../components/RenderOptions'; import { BuildTools, ManualTutorialConfig, OSs } from '../types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/DoneNextSteps.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/DoneNextSteps.tsx index d7cf0a1ec1b..5043267237f 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/DoneNextSteps.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/DoneNextSteps.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; export interface DoneNextStepsProps { component: T.Component; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/ManualTutorial.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/ManualTutorial.tsx index 4dfcedaef7a..2b262228165 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/ManualTutorial.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/ManualTutorial.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import InstanceMessage from '../../common/InstanceMessage'; import ProjectAnalysisStep from './ProjectAnalysisStep'; import TokenStep from './TokenStep'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/ProjectAnalysisStep.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/ProjectAnalysisStep.tsx index 10d35f2fd04..d5e9334567f 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/ProjectAnalysisStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/ProjectAnalysisStep.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../helpers/l10n'; import Step from '../components/Step'; import { ManualTutorialConfig } from '../types'; import BuildToolForm from './BuildToolForm'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/TokenStep.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/TokenStep.tsx index 02b53819950..0be6726f953 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/TokenStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/TokenStep.tsx @@ -21,15 +21,11 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; import { generateToken, getTokens, revokeToken } from '../../../api/user-tokens'; -import { - Button, - DeleteButton, - SubmitButton -} from '../../../sonar-ui-common/components/controls/buttons'; -import Radio from '../../../sonar-ui-common/components/controls/Radio'; -import AlertErrorIcon from '../../../sonar-ui-common/components/icons/AlertErrorIcon'; -import AlertSuccessIcon from '../../../sonar-ui-common/components/icons/AlertSuccessIcon'; -import { translate } from '../../../sonar-ui-common/helpers/l10n'; +import { Button, DeleteButton, SubmitButton } from '../../../components/controls/buttons'; +import Radio from '../../../components/controls/Radio'; +import AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon'; +import { translate } from '../../../helpers/l10n'; +import AlertErrorIcon from '../../icons/AlertErrorIcon'; import Step from '../components/Step'; import { getUniqueTokenName } from '../utils'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/__tests__/TokenStep-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/__tests__/TokenStep-test.tsx index f12c9486df2..c7106339c46 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/__tests__/TokenStep-test.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/__tests__/TokenStep-test.tsx @@ -19,12 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { - change, - click, - submit, - waitAndUpdate -} from '../../../../sonar-ui-common/helpers/testUtils'; +import { change, click, submit, waitAndUpdate } from '../../../../helpers/testUtils'; import TokenStep from '../TokenStep'; jest.mock('../../../../api/user-tokens', () => ({ diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/AnalysisCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/AnalysisCommand.tsx index 120757ccf6e..5bdbc8dd825 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/AnalysisCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/AnalysisCommand.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { getHostUrl } from '../../../../sonar-ui-common/helpers/urls'; +import { getHostUrl } from '../../../../helpers/urls'; import { BuildTools, ManualTutorialConfig } from '../../types'; import ClangGCCCustom from './ClangGCCCommand'; import DotNet from './DotNet'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx index ba3b40b0650..5db3dbdb4d5 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; -import { Alert } from '../../../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { Alert } from '../../../../components/ui/Alert'; +import { translate } from '../../../../helpers/l10n'; import CodeSnippet from '../../../common/CodeSnippet'; import { DotNetProps } from './DotNet'; import DotNetExecute from './DotNetExecute'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx index 9d3daf27387..5a4bc942d95 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx @@ -21,7 +21,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import CodeSnippet from '../../../common/CodeSnippet'; import InstanceMessage from '../../../common/InstanceMessage'; import DoneNextSteps from '../DoneNextSteps'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx index 2f22d88b1ad..864ad342930 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { DotNetProps } from './DotNet'; import DotNetExecute from './DotNetExecute'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DownloadBuildWrapper.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DownloadBuildWrapper.tsx index d7c90aa69d2..7f53c2048fe 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DownloadBuildWrapper.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DownloadBuildWrapper.tsx @@ -19,8 +19,8 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; -import { getBaseUrl } from '../../../../sonar-ui-common/helpers/urls'; +import { translate } from '../../../../helpers/l10n'; +import { getBaseUrl } from '../../../../helpers/urls'; import { OSs } from '../../types'; export interface DownloadBuildWrapperProps { diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DownloadScanner.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DownloadScanner.tsx index f30d9f50657..b322b9135b4 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DownloadScanner.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DownloadScanner.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import { OSs } from '../../types'; interface Props { diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecBuildWrapper.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecBuildWrapper.tsx index 57b60f8aaa2..49f750eb697 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecBuildWrapper.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecBuildWrapper.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import CodeSnippet from '../../../common/CodeSnippet'; import { OSs } from '../../types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecScanner.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecScanner.tsx index ae71a14ddaa..cd2632eb7a6 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecScanner.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/ExecScanner.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import CodeSnippet from '../../../common/CodeSnippet'; import InstanceMessage from '../../../common/InstanceMessage'; import { OSs } from '../../types'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaGradle.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaGradle.tsx index 2a39fd02072..13572d1258d 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaGradle.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaGradle.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import CodeSnippet from '../../../common/CodeSnippet'; import InstanceMessage from '../../../common/InstanceMessage'; import DoneNextSteps from '../DoneNextSteps'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx index b934fa55c32..cd9e6a5b5c3 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { translate } from '../../../../sonar-ui-common/helpers/l10n'; +import { translate } from '../../../../helpers/l10n'; import CodeSnippet from '../../../common/CodeSnippet'; import InstanceMessage from '../../../common/InstanceMessage'; import DoneNextSteps from '../DoneNextSteps'; diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/AnalysisCommand-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/AnalysisCommand-test.tsx index ccd19e18c92..55b3f92b160 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/AnalysisCommand-test.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/AnalysisCommand-test.tsx @@ -23,7 +23,7 @@ import { mockComponent } from '../../../../../helpers/testMocks'; import { BuildTools, OSs } from '../../../types'; import AnalysisCommand, { AnalysisCommandProps } from '../AnalysisCommand'; -jest.mock('../../../../../sonar-ui-common/helpers/urls', () => ({ +jest.mock('../../../../../helpers/urls', () => ({ getHostUrl: () => 'HOST' })); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/Alert.tsx b/server/sonar-web/src/main/js/components/ui/Alert.tsx index abd339da10d..abd339da10d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/Alert.tsx +++ b/server/sonar-web/src/main/js/components/ui/Alert.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/AutoEllipsis.tsx b/server/sonar-web/src/main/js/components/ui/AutoEllipsis.tsx index f1ceb43ddea..f1ceb43ddea 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/AutoEllipsis.tsx +++ b/server/sonar-web/src/main/js/components/ui/AutoEllipsis.tsx 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 3f7548db439..274b99892c1 100644 --- a/server/sonar-web/src/main/js/components/ui/Avatar.tsx +++ b/server/sonar-web/src/main/js/components/ui/Avatar.tsx @@ -20,7 +20,7 @@ import * as classNames from 'classnames'; import * as React from 'react'; import { connect } from 'react-redux'; -import GenericAvatar from '../../sonar-ui-common/components/ui/GenericAvatar'; +import GenericAvatar from '../../components/ui/GenericAvatar'; import { getGlobalSettingValue, Store } from '../../store/rootReducer'; interface Props { diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/ContextNavBar.css b/server/sonar-web/src/main/js/components/ui/ContextNavBar.css index 2c3865a835d..2c3865a835d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/ContextNavBar.css +++ b/server/sonar-web/src/main/js/components/ui/ContextNavBar.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/ContextNavBar.tsx b/server/sonar-web/src/main/js/components/ui/ContextNavBar.tsx index 07a75d15ae5..07a75d15ae5 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/ContextNavBar.tsx +++ b/server/sonar-web/src/main/js/components/ui/ContextNavBar.tsx diff --git a/server/sonar-web/src/main/js/components/ui/CoverageRating.tsx b/server/sonar-web/src/main/js/components/ui/CoverageRating.tsx index a73ae9b4bd1..7d9c798060e 100644 --- a/server/sonar-web/src/main/js/components/ui/CoverageRating.tsx +++ b/server/sonar-web/src/main/js/components/ui/CoverageRating.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { colors } from '../../app/theme'; -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; +import { lazyLoadComponent } from '../lazyLoadComponent'; const DonutChart = lazyLoadComponent( - () => import('../../sonar-ui-common/components/charts/DonutChart'), + () => import('../../components/charts/DonutChart'), 'DonutChart' ); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/DeferredSpinner.css b/server/sonar-web/src/main/js/components/ui/DeferredSpinner.css index 22569c0c6b6..22569c0c6b6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/DeferredSpinner.css +++ b/server/sonar-web/src/main/js/components/ui/DeferredSpinner.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/DeferredSpinner.tsx b/server/sonar-web/src/main/js/components/ui/DeferredSpinner.tsx index 7021917c0bc..7021917c0bc 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/DeferredSpinner.tsx +++ b/server/sonar-web/src/main/js/components/ui/DeferredSpinner.tsx 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 8e2ac8ca4da..2f99e376f51 100644 --- a/server/sonar-web/src/main/js/components/ui/DismissableAlert.tsx +++ b/server/sonar-web/src/main/js/components/ui/DismissableAlert.tsx @@ -19,11 +19,11 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import { ButtonIcon } from '../../sonar-ui-common/components/controls/buttons'; -import ClearIcon from '../../sonar-ui-common/components/icons/ClearIcon'; -import { Alert, AlertProps } from '../../sonar-ui-common/components/ui/Alert'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; -import { get, save } from '../../sonar-ui-common/helpers/storage'; +import { ButtonIcon } from '../../components/controls/buttons'; +import ClearIcon from '../../components/icons/ClearIcon'; +import { Alert, AlertProps } from '../../components/ui/Alert'; +import { translate } from '../../helpers/l10n'; +import { get, save } from '../../helpers/storage'; import './DismissableAlert.css'; export interface DismissableAlertProps extends AlertProps { diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/DuplicationsRating.css b/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css index 82f4024bca3..82f4024bca3 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/DuplicationsRating.css +++ b/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/DuplicationsRating.tsx b/server/sonar-web/src/main/js/components/ui/DuplicationsRating.tsx index 1c1d2595e32..1c1d2595e32 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/DuplicationsRating.tsx +++ b/server/sonar-web/src/main/js/components/ui/DuplicationsRating.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/FilesCounter.tsx b/server/sonar-web/src/main/js/components/ui/FilesCounter.tsx index 60b96c223fa..60b96c223fa 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/FilesCounter.tsx +++ b/server/sonar-web/src/main/js/components/ui/FilesCounter.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/GenericAvatar.tsx b/server/sonar-web/src/main/js/components/ui/GenericAvatar.tsx index d9c78da675d..d9c78da675d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/GenericAvatar.tsx +++ b/server/sonar-web/src/main/js/components/ui/GenericAvatar.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/Level.css b/server/sonar-web/src/main/js/components/ui/Level.css index a4d722f01ce..a4d722f01ce 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/Level.css +++ b/server/sonar-web/src/main/js/components/ui/Level.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/Level.tsx b/server/sonar-web/src/main/js/components/ui/Level.tsx index 5b5174470cc..5b5174470cc 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/Level.tsx +++ b/server/sonar-web/src/main/js/components/ui/Level.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/MandatoryFieldMarker.tsx b/server/sonar-web/src/main/js/components/ui/MandatoryFieldMarker.tsx index bedf016d2a6..bedf016d2a6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/MandatoryFieldMarker.tsx +++ b/server/sonar-web/src/main/js/components/ui/MandatoryFieldMarker.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/MandatoryFieldsExplanation.tsx b/server/sonar-web/src/main/js/components/ui/MandatoryFieldsExplanation.tsx index 67ef7370bca..67ef7370bca 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/MandatoryFieldsExplanation.tsx +++ b/server/sonar-web/src/main/js/components/ui/MandatoryFieldsExplanation.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NavBar.css b/server/sonar-web/src/main/js/components/ui/NavBar.css index c9e5757121d..c9e5757121d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NavBar.css +++ b/server/sonar-web/src/main/js/components/ui/NavBar.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NavBar.tsx b/server/sonar-web/src/main/js/components/ui/NavBar.tsx index 5f6de14ffaa..5f6de14ffaa 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NavBar.tsx +++ b/server/sonar-web/src/main/js/components/ui/NavBar.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NavBarTabs.css b/server/sonar-web/src/main/js/components/ui/NavBarTabs.css index f43e1389f07..f43e1389f07 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NavBarTabs.css +++ b/server/sonar-web/src/main/js/components/ui/NavBarTabs.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NavBarTabs.tsx b/server/sonar-web/src/main/js/components/ui/NavBarTabs.tsx index 0cc09e5abc6..0cc09e5abc6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NavBarTabs.tsx +++ b/server/sonar-web/src/main/js/components/ui/NavBarTabs.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NewsBox.css b/server/sonar-web/src/main/js/components/ui/NewsBox.css index 1adae9f9102..1adae9f9102 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NewsBox.css +++ b/server/sonar-web/src/main/js/components/ui/NewsBox.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NewsBox.tsx b/server/sonar-web/src/main/js/components/ui/NewsBox.tsx index 27626765848..27626765848 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/NewsBox.tsx +++ b/server/sonar-web/src/main/js/components/ui/NewsBox.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/PageActions.tsx b/server/sonar-web/src/main/js/components/ui/PageActions.tsx index 8c2e4106b16..8c2e4106b16 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/PageActions.tsx +++ b/server/sonar-web/src/main/js/components/ui/PageActions.tsx diff --git a/server/sonar-web/src/main/js/components/ui/PageShortcutsTooltip.tsx b/server/sonar-web/src/main/js/components/ui/PageShortcutsTooltip.tsx index 4f20d315791..00cffc0f4bf 100644 --- a/server/sonar-web/src/main/js/components/ui/PageShortcutsTooltip.tsx +++ b/server/sonar-web/src/main/js/components/ui/PageShortcutsTooltip.tsx @@ -19,8 +19,8 @@ */ import * as classNames from 'classnames'; import * as React from 'react'; -import Tooltip from '../../sonar-ui-common/components/controls/Tooltip'; -import { translate, translateWithParameters } from '../../sonar-ui-common/helpers/l10n'; +import Tooltip from '../../components/controls/Tooltip'; +import { translate, translateWithParameters } from '../../helpers/l10n'; export interface PageShortcutsTooltipProps { className?: string; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/Rating.css b/server/sonar-web/src/main/js/components/ui/Rating.css index 8bd2dda1a3d..8bd2dda1a3d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/Rating.css +++ b/server/sonar-web/src/main/js/components/ui/Rating.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/Rating.tsx b/server/sonar-web/src/main/js/components/ui/Rating.tsx index 91c661ffc97..91c661ffc97 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/Rating.tsx +++ b/server/sonar-web/src/main/js/components/ui/Rating.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/SizeRating.css b/server/sonar-web/src/main/js/components/ui/SizeRating.css index 4403c162271..4403c162271 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/SizeRating.css +++ b/server/sonar-web/src/main/js/components/ui/SizeRating.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/SizeRating.tsx b/server/sonar-web/src/main/js/components/ui/SizeRating.tsx index c6c71072fdb..c6c71072fdb 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/SizeRating.tsx +++ b/server/sonar-web/src/main/js/components/ui/SizeRating.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/Alert-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/Alert-test.tsx index f7df09a4d99..f7df09a4d99 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/Alert-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/Alert-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/AutoEllipsis-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/AutoEllipsis-test.tsx index 5d3411078cf..5d3411078cf 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/AutoEllipsis-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/AutoEllipsis-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/DeferredSpinner-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/DeferredSpinner-test.tsx index 8a7bc268499..8a7bc268499 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/DeferredSpinner-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/DeferredSpinner-test.tsx diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/DismissableAlert-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/DismissableAlert-test.tsx index 2de4b43a827..2dced3bd8b9 100644 --- a/server/sonar-web/src/main/js/components/ui/__tests__/DismissableAlert-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/DismissableAlert-test.tsx @@ -20,15 +20,15 @@ import { shallow } from 'enzyme'; import * as React from 'react'; -import { ButtonIcon } from '../../../sonar-ui-common/components/controls/buttons'; -import { save } from '../../../sonar-ui-common/helpers/storage'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { ButtonIcon } from '../../../components/controls/buttons'; +import { save } from '../../../helpers/storage'; +import { click } from '../../../helpers/testUtils'; import DismissableAlert, { DismissableAlertProps, DISMISSED_ALERT_STORAGE_KEY } from '../DismissableAlert'; -jest.mock('../../../sonar-ui-common/helpers/storage', () => ({ +jest.mock('../../../helpers/storage', () => ({ get: jest.fn((_: string, suffix: string) => (suffix === 'bar' ? 'true' : undefined)), save: jest.fn() })); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/FilesCounter-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/FilesCounter-test.tsx index 2f020368cdb..2f020368cdb 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/FilesCounter-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/FilesCounter-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/GenericAvatar-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/GenericAvatar-test.tsx index d244490dcd9..d244490dcd9 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/GenericAvatar-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/GenericAvatar-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/Level-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/Level-test.tsx index 8f52a420665..8f52a420665 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/Level-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/Level-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/MandatoryFieldMarker-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/MandatoryFieldMarker-test.tsx index 8cd043086c2..8cd043086c2 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/MandatoryFieldMarker-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/MandatoryFieldMarker-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/MandatoryFieldsExplanation-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/MandatoryFieldsExplanation-test.tsx index 8ba8b451e08..8ba8b451e08 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/MandatoryFieldsExplanation-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/MandatoryFieldsExplanation-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/NavBar-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/NavBar-test.tsx index 1db05af50e0..1db05af50e0 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/NavBar-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/NavBar-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/NewsBox-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/NewsBox-test.tsx index 8b46a49efbc..8b46a49efbc 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/NewsBox-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/NewsBox-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/PageActions-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/PageActions-test.tsx index 46594418d3a..46594418d3a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/PageActions-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/PageActions-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/Rating-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/Rating-test.tsx index f8f1540adfc..f8f1540adfc 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/Rating-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/Rating-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/SizeRating-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/SizeRating-test.tsx index 7c3b8e3b005..7c3b8e3b005 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/SizeRating-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/SizeRating-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap index 893212cc564..893212cc564 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/AutoEllipsis-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/AutoEllipsis-test.tsx.snap index 84212d45e27..84212d45e27 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/AutoEllipsis-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/AutoEllipsis-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/DeferredSpinner-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/DeferredSpinner-test.tsx.snap index 6822674e7d2..6822674e7d2 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/DeferredSpinner-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/DeferredSpinner-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/FilesCounter-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/FilesCounter-test.tsx.snap index bb01a6121da..bb01a6121da 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/FilesCounter-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/FilesCounter-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/GenericAvatar-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/GenericAvatar-test.tsx.snap index 9c2bb0fa7fd..9c2bb0fa7fd 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/GenericAvatar-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/GenericAvatar-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/Level-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Level-test.tsx.snap index 089171fcc17..089171fcc17 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/Level-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Level-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/MandatoryFieldMarker-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/MandatoryFieldMarker-test.tsx.snap index 1adb77718dd..1adb77718dd 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/MandatoryFieldMarker-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/MandatoryFieldMarker-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/MandatoryFieldsExplanation-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/MandatoryFieldsExplanation-test.tsx.snap index ca469b7e71c..ca469b7e71c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/MandatoryFieldsExplanation-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/MandatoryFieldsExplanation-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/NavBar-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/NavBar-test.tsx.snap index a039d0ebb24..a039d0ebb24 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/NavBar-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/NavBar-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/NewsBox-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/NewsBox-test.tsx.snap index 91e58894fbf..91e58894fbf 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/NewsBox-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/NewsBox-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/PageActions-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/PageActions-test.tsx.snap index bb220fbacaf..bb220fbacaf 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/PageActions-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/PageActions-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/Rating-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Rating-test.tsx.snap index 9455ce98965..9455ce98965 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/Rating-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Rating-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/SizeRating-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/SizeRating-test.tsx.snap index a35517cc685..a35517cc685 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/SizeRating-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/SizeRating-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/popups-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/popups-test.tsx.snap index 87b7811eb17..87b7811eb17 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/__snapshots__/popups-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/popups-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/popups-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/popups-test.tsx index d790073ba5d..d790073ba5d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/__tests__/popups-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/popups-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/popups.css b/server/sonar-web/src/main/js/components/ui/popups.css index f7bb71b188c..f7bb71b188c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/popups.css +++ b/server/sonar-web/src/main/js/components/ui/popups.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/popups.tsx b/server/sonar-web/src/main/js/components/ui/popups.tsx index 5873d0f658f..5873d0f658f 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/popups.tsx +++ b/server/sonar-web/src/main/js/components/ui/popups.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/MetaData.css b/server/sonar-web/src/main/js/components/ui/update-center/MetaData.css index 6bc5a632fb1..6bc5a632fb1 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/MetaData.css +++ b/server/sonar-web/src/main/js/components/ui/update-center/MetaData.css diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/MetaData.tsx b/server/sonar-web/src/main/js/components/ui/update-center/MetaData.tsx index b6918749d99..b6918749d99 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/MetaData.tsx +++ b/server/sonar-web/src/main/js/components/ui/update-center/MetaData.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/MetaDataVersion.tsx b/server/sonar-web/src/main/js/components/ui/update-center/MetaDataVersion.tsx index b8c3bbe37e6..b8c3bbe37e6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/MetaDataVersion.tsx +++ b/server/sonar-web/src/main/js/components/ui/update-center/MetaDataVersion.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/MetaDataVersions.tsx b/server/sonar-web/src/main/js/components/ui/update-center/MetaDataVersions.tsx index b92f9efac03..b92f9efac03 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/MetaDataVersions.tsx +++ b/server/sonar-web/src/main/js/components/ui/update-center/MetaDataVersions.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/MetaData-test.tsx b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/MetaData-test.tsx index e89307b350a..e89307b350a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/MetaData-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/MetaData-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersion-test.tsx b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/MetaDataVersion-test.tsx index 285a0f8e346..285a0f8e346 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersion-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/MetaDataVersion-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersions-test.tsx b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/MetaDataVersions-test.tsx index 15eb7348b2c..15eb7348b2c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/MetaDataVersions-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/MetaDataVersions-test.tsx diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/__snapshots__/MetaData-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/__snapshots__/MetaData-test.tsx.snap index 89e8d74a6d1..89e8d74a6d1 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/__snapshots__/MetaData-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/__snapshots__/MetaData-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/__snapshots__/MetaDataVersion-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/__snapshots__/MetaDataVersion-test.tsx.snap index 7fd964fe2ab..7fd964fe2ab 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/__snapshots__/MetaDataVersion-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/__snapshots__/MetaDataVersion-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/__snapshots__/MetaDataVersions-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/__snapshots__/MetaDataVersions-test.tsx.snap index 109fe964473..109fe964473 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/__tests__/__snapshots__/MetaDataVersions-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/update-center/__tests__/__snapshots__/MetaDataVersions-test.tsx.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/mocks/update-center-metadata.ts b/server/sonar-web/src/main/js/components/ui/update-center/mocks/update-center-metadata.ts index e4d389546e6..e4d389546e6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/mocks/update-center-metadata.ts +++ b/server/sonar-web/src/main/js/components/ui/update-center/mocks/update-center-metadata.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/update-center-metadata.ts b/server/sonar-web/src/main/js/components/ui/update-center/update-center-metadata.ts index a88b385c3b6..a88b385c3b6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/ui/update-center/update-center-metadata.ts +++ b/server/sonar-web/src/main/js/components/ui/update-center/update-center-metadata.ts 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 80cb63af455..50c6711867b 100644 --- a/server/sonar-web/src/main/js/components/workspace/Workspace.tsx +++ b/server/sonar-web/src/main/js/components/workspace/Workspace.tsx @@ -20,8 +20,8 @@ import { omit, uniqBy } from 'lodash'; import * as React from 'react'; import { getRulesApp } from '../../api/rules'; -import { lazyLoadComponent } from '../../sonar-ui-common/components/lazyLoadComponent'; -import { get, save } from '../../sonar-ui-common/helpers/storage'; +import { get, save } from '../../helpers/storage'; +import { lazyLoadComponent } from '../lazyLoadComponent'; import { ComponentDescriptor, RuleDescriptor, WorkspaceContext } from './context'; import './styles.css'; import WorkspacePortal from './WorkspacePortal'; 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 4e2775c6c93..be7c2bcaf3c 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentTitle.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentTitle.tsx @@ -18,8 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import QualifierIcon from '../../sonar-ui-common/components/icons/QualifierIcon'; -import { collapsePath } from '../../sonar-ui-common/helpers/path'; +import QualifierIcon from '../../components/icons/QualifierIcon'; +import { collapsePath } from '../../helpers/path'; import { ComponentDescriptor } from './context'; interface Props { 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 a4ccc7cf640..e6faee49b8f 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentViewer.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceComponentViewer.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { getParents } from '../../api/components'; import { isPullRequest } from '../../helpers/branch-like'; -import { scrollToElement } from '../../sonar-ui-common/helpers/scrolling'; +import { scrollToElement } from '../../helpers/scrolling'; import { fetchBranchStatus } from '../../store/rootActions'; import { BranchLike } from '../../types/branch-like'; 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 c9c9a3adc9e..28ddf34faf0 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceHeader.tsx @@ -19,13 +19,13 @@ */ import * as React from 'react'; import { DraggableCore, DraggableData } from 'react-draggable'; -import { ButtonIcon } from '../../sonar-ui-common/components/controls/buttons'; -import ClearIcon from '../../sonar-ui-common/components/icons/ClearIcon'; -import CollapseIcon from '../../sonar-ui-common/components/icons/CollapseIcon'; -import ExpandIcon from '../../sonar-ui-common/components/icons/ExpandIcon'; -import { IconProps } from '../../sonar-ui-common/components/icons/Icon'; -import MinimizeIcon from '../../sonar-ui-common/components/icons/MinimizeIcon'; -import { translate } from '../../sonar-ui-common/helpers/l10n'; +import { ButtonIcon } from '../../components/controls/buttons'; +import ClearIcon from '../../components/icons/ClearIcon'; +import CollapseIcon from '../../components/icons/CollapseIcon'; +import ExpandIcon from '../../components/icons/ExpandIcon'; +import { IconProps } from '../../components/icons/Icon'; +import MinimizeIcon from '../../components/icons/MinimizeIcon'; +import { translate } from '../../helpers/l10n'; export interface Props { children: React.ReactNode; 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 2b5c9cc85af..724ebccaa5b 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceNavItem.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceNavItem.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { ClearButton } from '../../sonar-ui-common/components/controls/buttons'; +import { ClearButton } from '../../components/controls/buttons'; export interface Props { children: React.ReactNode; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleDetails.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleDetails.tsx index f3782661cab..c9ba62a3b55 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleDetails.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleDetails.tsx @@ -23,7 +23,7 @@ import { getRuleDetails, getRulesApp } from '../../api/rules'; import RuleDetailsDescription from '../../apps/coding-rules/components/RuleDetailsDescription'; import RuleDetailsMeta from '../../apps/coding-rules/components/RuleDetailsMeta'; import '../../apps/coding-rules/styles.css'; -import DeferredSpinner from '../../sonar-ui-common/components/ui/DeferredSpinner'; +import DeferredSpinner from '../../components/ui/DeferredSpinner'; interface Props { onLoad: (details: { name: string }) => void; diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx index a064ce29c62..8cc42a8d825 100644 --- a/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx +++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceRuleTitle.tsx @@ -19,7 +19,7 @@ */ import * as React from 'react'; import { colors } from '../../app/theme'; -import LightBulbIcon from '../../sonar-ui-common/components/icons/LightBulbIcon'; +import LightBulbIcon from '../../components/icons/LightBulbIcon'; import { RuleDescriptor } from './context'; interface Props { 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 89fce91ea1d..6dc028cb89c 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 @@ -20,8 +20,8 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { mockBranch } from '../../../helpers/mocks/branch-like'; -import { get, save } from '../../../sonar-ui-common/helpers/storage'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { get, save } from '../../../helpers/storage'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { ComponentQualifier } from '../../../types/component'; import Workspace, { INITIAL_HEIGHT, @@ -31,7 +31,7 @@ import Workspace, { WorkspaceTypes } from '../Workspace'; -jest.mock('../../../sonar-ui-common/helpers/storage', () => { +jest.mock('../../../helpers/storage', () => { return { get: jest.fn(), save: jest.fn() diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentViewer-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentViewer-test.tsx index 1f2d8bd4617..733408a707f 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentViewer-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceComponentViewer-test.tsx @@ -22,7 +22,7 @@ import * as React from 'react'; import { getParents } from '../../../api/components'; import { mockPullRequest } from '../../../helpers/mocks/branch-like'; import { mockIssue } from '../../../helpers/testMocks'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import { Props, WorkspaceComponentViewer } from '../WorkspaceComponentViewer'; jest.mock('../../../api/components', () => ({ diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavItem-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavItem-test.tsx index 70d05e9ca22..ce09a89fb84 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavItem-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceNavItem-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from '../../../sonar-ui-common/helpers/testUtils'; +import { click } from '../../../helpers/testUtils'; import WorkspaceNavItem, { Props } from '../WorkspaceNavItem'; it('should render', () => { diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleDetails-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleDetails-test.tsx index 1e0e71078c6..17cbaa46b49 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleDetails-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/WorkspaceRuleDetails-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { waitAndUpdate } from '../../../sonar-ui-common/helpers/testUtils'; +import { waitAndUpdate } from '../../../helpers/testUtils'; import WorkspaceRuleDetails from '../WorkspaceRuleDetails'; jest.mock('../../../api/rules', () => ({ diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/__snapshots__/query-test.ts.snap b/server/sonar-web/src/main/js/helpers/__tests__/__snapshots__/query-test.ts.snap index 4f0b5538ba8..4f0b5538ba8 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/__snapshots__/query-test.ts.snap +++ b/server/sonar-web/src/main/js/helpers/__tests__/__snapshots__/query-test.ts.snap diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/colors-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/colors-test.ts index ae80a29e093..ae80a29e093 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/colors-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/colors-test.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/dates-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/dates-test.ts index 9482f6d6476..9482f6d6476 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/dates-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/dates-test.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/components/__tests__/getHistory-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/getHistory-test.ts index 2df78cdd02e..b5a66227d57 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/components/__tests__/getHistory-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/getHistory-test.ts @@ -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 getHistory from '../../helpers/getHistory'; import * as Router from 'react-router'; +import getHistory from '../getHistory'; it('should get browser history properly', () => { expect(getHistory()).not.toBeUndefined(); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/handleRequiredAuthentication-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/handleRequiredAuthentication-test.ts index dfb377e6a7a..dfb377e6a7a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/handleRequiredAuthentication-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/handleRequiredAuthentication-test.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/init-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/init-test.ts index d1251f06697..d1251f06697 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/init-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/init-test.ts 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 7cc76f01fec..2c4e48221af 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 @@ -19,9 +19,20 @@ */ import * as reactIntl from 'react-intl'; import { fetchL10nBundle } from '../../api/l10n'; -import SonarUiCommonInitializer from '../../sonar-ui-common/helpers/init'; -import { get } from '../../sonar-ui-common/helpers/storage'; -import { loadL10nBundle } from '../l10n'; +import SonarUiCommonInitializer, { getMessages } from '../init'; +import { + getLocalizedCategoryMetricName, + getLocalizedMetricDomain, + getLocalizedMetricName, + getShortMonthName, + getShortWeekDayName, + getWeekDayName, + hasMessage, + loadL10nBundle, + translate, + translateWithParameters +} from '../l10n'; +import { get } from '../storage'; beforeEach(() => { jest.clearAllMocks(); @@ -34,7 +45,7 @@ jest.mock('../../api/l10n', () => ({ .mockResolvedValue({ effectiveLocale: 'de', messages: { test_message: 'test' } }) })); -jest.mock('../../sonar-ui-common/helpers/storage', () => ({ +jest.mock('../../helpers/storage', () => ({ get: jest.fn(), save: jest.fn() })); @@ -88,3 +99,158 @@ describe('#loadL10nBundle', () => { expect(reactIntl.addLocaleData).toHaveBeenCalled(); }); }); + +const originalMessages = getMessages(); +const MSG = 'my_message'; + +afterEach(() => { + SonarUiCommonInitializer.setMessages(originalMessages); +}); + +describe('translate', () => { + it('should translate simple message', () => { + SonarUiCommonInitializer.setMessages({ my_key: MSG }); + expect(translate('my_key')).toBe(MSG); + }); + + it('should translate message with composite key', () => { + SonarUiCommonInitializer.setMessages({ 'my.composite.message': MSG }); + expect(translate('my', 'composite', 'message')).toBe(MSG); + expect(translate('my.composite', 'message')).toBe(MSG); + expect(translate('my', 'composite.message')).toBe(MSG); + expect(translate('my.composite.message')).toBe(MSG); + }); + + it('should not translate message but return its key', () => { + expect(translate('random')).toBe('random'); + expect(translate('random', 'key')).toBe('random.key'); + expect(translate('composite.random', 'key')).toBe('composite.random.key'); + }); +}); + +describe('translateWithParameters', () => { + it('should translate message with one parameter in the beginning', () => { + SonarUiCommonInitializer.setMessages({ x_apples: '{0} apples' }); + expect(translateWithParameters('x_apples', 5)).toBe('5 apples'); + }); + + it('should translate message with one parameter in the middle', () => { + SonarUiCommonInitializer.setMessages({ x_apples: 'I have {0} apples' }); + expect(translateWithParameters('x_apples', 5)).toBe('I have 5 apples'); + }); + + it('should translate message with one parameter in the end', () => { + SonarUiCommonInitializer.setMessages({ x_apples: 'Apples: {0}' }); + expect(translateWithParameters('x_apples', 5)).toBe('Apples: 5'); + }); + + it('should translate message with several parameters', () => { + SonarUiCommonInitializer.setMessages({ + x_apples: '{0}: I have {2} apples in my {1} baskets - {3}' + }); + expect(translateWithParameters('x_apples', 1, 2, 3, 4)).toBe( + '1: I have 3 apples in my 2 baskets - 4' + ); + }); + + it('should not be affected by replacement pattern XSS vulnerability of String.replace', () => { + SonarUiCommonInitializer.setMessages({ x_apples: 'I have {0} apples' }); + expect(translateWithParameters('x_apples', '$`')).toBe('I have $` apples'); + }); + + it('should not translate message but return its key', () => { + expect(translateWithParameters('random', 5)).toBe('random.5'); + expect(translateWithParameters('random', 1, 2, 3)).toBe('random.1.2.3'); + expect(translateWithParameters('composite.random', 1, 2)).toBe('composite.random.1.2'); + }); +}); + +describe('hasMessage', () => { + it('should return that the message exists', () => { + SonarUiCommonInitializer.setMessages({ foo: 'Foo', 'foo.bar': 'Foo Bar' }); + expect(hasMessage('foo')).toBe(true); + expect(hasMessage('foo', 'bar')).toBe(true); + }); + + it('should return that the message is missing', () => { + expect(hasMessage('foo')).toBe(false); + expect(hasMessage('foo', 'bar')).toBe(false); + }); +}); + +describe('getLocalizedMetricName', () => { + const metric = { key: 'new_code', name: 'new_code_metric_name' }; + + it('should return the metric name translation', () => { + SonarUiCommonInitializer.setMessages({ 'metric.new_code.name': 'metric.new_code.name_t' }); + expect(getLocalizedMetricName(metric)).toBe('metric.new_code.name_t'); + }); + + it('should return the metric short name', () => { + SonarUiCommonInitializer.setMessages({ + 'metric.new_code.short_name': 'metric.new_code.short_name_t' + }); + expect(getLocalizedMetricName(metric, true)).toBe('metric.new_code.short_name_t'); + }); + + it('should fallback on name if short name is absent', () => { + SonarUiCommonInitializer.setMessages({ 'metric.new_code.name': 'metric.new_code.name_t' }); + expect(getLocalizedMetricName(metric, true)).toBe('metric.new_code.name_t'); + }); + + it('should fallback on metric name if translation is absent', () => { + expect(getLocalizedMetricName(metric)).toBe('new_code_metric_name'); + }); + + it('should fallback on metric key if nothing else is available', () => { + expect(getLocalizedMetricName({ key: 'new_code' })).toBe('new_code'); + }); +}); + +describe('getLocalizedCategoryMetricName', () => { + it('should return metric category name translation', () => { + SonarUiCommonInitializer.setMessages({ + 'metric.new_code.extra_short_name': 'metric.new_code.extra_short_name_t' + }); + expect(getLocalizedCategoryMetricName({ key: 'new_code' })).toBe( + 'metric.new_code.extra_short_name_t' + ); + }); + + it('should fallback on metric name if extra_short_name is absent', () => { + SonarUiCommonInitializer.setMessages({ 'metric.new_code.name': 'metric.new_code.name_t' }); + expect(getLocalizedCategoryMetricName({ key: 'new_code' })).toBe('metric.new_code.name_t'); + }); +}); + +describe('getLocalizedMetricDomain', () => { + it('should return metric domain name translation', () => { + SonarUiCommonInitializer.setMessages({ 'metric_domain.domain': 'metric_domain.domain_t' }); + expect(getLocalizedMetricDomain('domain')).toBe('metric_domain.domain_t'); + }); + + it('should fallback on metric domain name', () => { + expect(getLocalizedMetricDomain('domain')).toBe('domain'); + }); +}); + +describe('getShortMonthName', () => { + it('should properly translation months', () => { + SonarUiCommonInitializer.setMessages({ Jan: 'Jan_t' }); + expect(getShortMonthName(0)).toBe('Jan_t'); + }); +}); + +describe('getWeekDayName', () => { + it('should properly translation weekday', () => { + SonarUiCommonInitializer.setMessages({ Sunday: 'Sunday_t' }); + expect(getWeekDayName(0)).toBe('Sunday_t'); + }); +}); + +describe('getShortWeekDayName', () => { + it('should properly translation short weekday', () => { + SonarUiCommonInitializer.setMessages({ Sun: 'Sun_t' }); + expect(getShortWeekDayName(0)).toBe('Sun_t'); + }); +}); 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 5d5005d89ad..2bc23d79bec 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,7 +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 { enhanceConditionWithMeasure, isPeriodBestValue } from '../measures'; +import SonarUiCommonInitializer from '../init'; +import { + enhanceConditionWithMeasure, + formatMeasure, + getMinDecimalsCountToBeDistinctFromThreshold, + isPeriodBestValue +} from '../measures'; import { mockQualityGateStatusCondition } from '../mocks/quality-gates'; import { mockMeasureEnhanced, mockMetric } from '../testMocks'; @@ -64,3 +70,207 @@ describe('isPeriodBestValue', () => { ).toBe(true); }); }); + +const HOURS_IN_DAY = 8; +const ONE_MINUTE = 1; +const ONE_HOUR = ONE_MINUTE * 60; +const ONE_DAY = HOURS_IN_DAY * ONE_HOUR; + +beforeAll(() => { + SonarUiCommonInitializer.setMessages({ + 'work_duration.x_days': '{0}d', + 'work_duration.x_hours': '{0}h', + 'work_duration.x_minutes': '{0}min', + 'work_duration.about': '~ {0}', + 'metric.level.ERROR': 'Error', + 'metric.level.WARN': 'Warning', + 'metric.level.OK': 'Ok', + 'short_number_suffix.g': 'G', + 'short_number_suffix.k': 'k', + 'short_number_suffix.m': 'M' + }); +}); + +afterAll(() => { + SonarUiCommonInitializer.setMessages({}); +}); + +describe('#formatMeasure()', () => { + it('should format INT', () => { + expect(formatMeasure(0, 'INT')).toBe('0'); + expect(formatMeasure(1, 'INT')).toBe('1'); + expect(formatMeasure(-5, 'INT')).toBe('-5'); + expect(formatMeasure(999, 'INT')).toBe('999'); + expect(formatMeasure(1000, 'INT')).toBe('1,000'); + expect(formatMeasure(1529, 'INT')).toBe('1,529'); + expect(formatMeasure(10000, 'INT')).toBe('10,000'); + expect(formatMeasure(1234567890, 'INT')).toBe('1,234,567,890'); + }); + + it('should format SHORT_INT', () => { + expect(formatMeasure(0, 'SHORT_INT')).toBe('0'); + expect(formatMeasure(1, 'SHORT_INT')).toBe('1'); + expect(formatMeasure(999, 'SHORT_INT')).toBe('999'); + expect(formatMeasure(1000, 'SHORT_INT')).toBe('1k'); + expect(formatMeasure(1529, 'SHORT_INT')).toBe('1.5k'); + expect(formatMeasure(10000, 'SHORT_INT')).toBe('10k'); + expect(formatMeasure(10678, 'SHORT_INT')).toBe('11k'); + expect(formatMeasure(9467890, 'SHORT_INT')).toBe('9.5M'); + expect(formatMeasure(994567890, 'SHORT_INT')).toBe('995M'); + expect(formatMeasure(999000001, 'SHORT_INT')).toBe('999M'); + expect(formatMeasure(999567890, 'SHORT_INT')).toBe('1G'); + expect(formatMeasure(1234567890, 'SHORT_INT')).toBe('1.2G'); + expect(formatMeasure(11234567890, 'SHORT_INT')).toBe('11G'); + }); + + it('should format FLOAT', () => { + expect(formatMeasure(0.0, 'FLOAT')).toBe('0.0'); + expect(formatMeasure(1.0, 'FLOAT')).toBe('1.0'); + expect(formatMeasure(1.3, 'FLOAT')).toBe('1.3'); + expect(formatMeasure(1.34, 'FLOAT')).toBe('1.34'); + expect(formatMeasure(50.89, 'FLOAT')).toBe('50.89'); + expect(formatMeasure(100.0, 'FLOAT')).toBe('100.0'); + expect(formatMeasure(123.456, 'FLOAT')).toBe('123.456'); + expect(formatMeasure(123456.7, 'FLOAT')).toBe('123,456.7'); + expect(formatMeasure(1234567890.0, 'FLOAT')).toBe('1,234,567,890.0'); + }); + + it('should respect FLOAT precision', () => { + expect(formatMeasure(0.1, 'FLOAT')).toBe('0.1'); + expect(formatMeasure(0.12, 'FLOAT')).toBe('0.12'); + expect(formatMeasure(0.12345, 'FLOAT')).toBe('0.12345'); + expect(formatMeasure(0.123456, 'FLOAT')).toBe('0.12346'); + }); + + it('should format PERCENT', () => { + expect(formatMeasure(0.0, 'PERCENT')).toBe('0.0%'); + expect(formatMeasure(1.0, 'PERCENT')).toBe('1.0%'); + expect(formatMeasure(1.3, 'PERCENT')).toBe('1.3%'); + expect(formatMeasure(1.34, 'PERCENT')).toBe('1.3%'); + expect(formatMeasure(50.89, 'PERCENT')).toBe('50.9%'); + expect(formatMeasure(100.0, 'PERCENT')).toBe('100%'); + expect(formatMeasure(50.89, 'PERCENT', { decimals: 0 })).toBe('50.9%'); + expect(formatMeasure(50.89, 'PERCENT', { decimals: 1 })).toBe('50.9%'); + expect(formatMeasure(50.89, 'PERCENT', { decimals: 2 })).toBe('50.89%'); + expect(formatMeasure(50.89, 'PERCENT', { decimals: 3 })).toBe('50.890%'); + expect(formatMeasure(50, 'PERCENT', { decimals: 0, omitExtraDecimalZeros: true })).toBe( + '50.0%' + ); + expect(formatMeasure(50, 'PERCENT', { decimals: 1, omitExtraDecimalZeros: true })).toBe( + '50.0%' + ); + expect(formatMeasure(50, 'PERCENT', { decimals: 3, omitExtraDecimalZeros: true })).toBe( + '50.0%' + ); + expect(formatMeasure(50.89, 'PERCENT', { decimals: 3, omitExtraDecimalZeros: true })).toBe( + '50.89%' + ); + }); + + it('should format WORK_DUR', () => { + expect(formatMeasure(0, 'WORK_DUR')).toBe('0'); + expect(formatMeasure(5 * ONE_DAY, 'WORK_DUR')).toBe('5d'); + expect(formatMeasure(2 * ONE_HOUR, 'WORK_DUR')).toBe('2h'); + expect(formatMeasure(40 * ONE_MINUTE, 'WORK_DUR')).toBe('40min'); + expect(formatMeasure(ONE_MINUTE, 'WORK_DUR')).toBe('1min'); + expect(formatMeasure(5 * ONE_DAY + 2 * ONE_HOUR, 'WORK_DUR')).toBe('5d 2h'); + expect(formatMeasure(2 * ONE_HOUR + ONE_MINUTE, 'WORK_DUR')).toBe('2h 1min'); + expect(formatMeasure(5 * ONE_DAY + 2 * ONE_HOUR + ONE_MINUTE, 'WORK_DUR')).toBe('5d 2h'); + expect(formatMeasure(15 * ONE_DAY + 2 * ONE_HOUR + ONE_MINUTE, 'WORK_DUR')).toBe('15d'); + expect(formatMeasure(-5 * ONE_DAY, 'WORK_DUR')).toBe('-5d'); + expect(formatMeasure(-2 * ONE_HOUR, 'WORK_DUR')).toBe('-2h'); + expect(formatMeasure(-1 * ONE_MINUTE, 'WORK_DUR')).toBe('-1min'); + }); + + it('should format SHORT_WORK_DUR', () => { + expect(formatMeasure(0, 'SHORT_WORK_DUR')).toBe('0'); + expect(formatMeasure(5 * ONE_DAY, 'SHORT_WORK_DUR')).toBe('5d'); + expect(formatMeasure(2 * ONE_HOUR, 'SHORT_WORK_DUR')).toBe('2h'); + expect(formatMeasure(ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('1min'); + expect(formatMeasure(40 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('40min'); + expect(formatMeasure(58 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('1h'); + expect(formatMeasure(5 * ONE_DAY + 2 * ONE_HOUR, 'SHORT_WORK_DUR')).toBe('5d'); + expect(formatMeasure(2 * ONE_HOUR + ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('2h'); + expect(formatMeasure(ONE_HOUR + 55 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('2h'); + expect(formatMeasure(3 * ONE_DAY + 6 * ONE_HOUR, 'SHORT_WORK_DUR')).toBe('4d'); + expect(formatMeasure(7 * ONE_HOUR + 59 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('1d'); + expect(formatMeasure(5 * ONE_DAY + 2 * ONE_HOUR + ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('5d'); + expect(formatMeasure(15 * ONE_DAY + 2 * ONE_HOUR + ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('15d'); + expect(formatMeasure(7 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('7min'); + expect(formatMeasure(-5 * ONE_DAY, 'SHORT_WORK_DUR')).toBe('-5d'); + expect(formatMeasure(-2 * ONE_HOUR, 'SHORT_WORK_DUR')).toBe('-2h'); + expect(formatMeasure(-1 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('-1min'); + + expect(formatMeasure(1529 * ONE_DAY, 'SHORT_WORK_DUR')).toBe('1.5kd'); + expect(formatMeasure(1234567 * ONE_DAY, 'SHORT_WORK_DUR')).toBe('1.2Md'); + expect(formatMeasure(12345670 * ONE_DAY + 4 * ONE_HOUR, 'SHORT_WORK_DUR')).toBe('12Md'); + }); + + it('should format RATING', () => { + expect(formatMeasure(1, 'RATING')).toBe('A'); + expect(formatMeasure(2, 'RATING')).toBe('B'); + expect(formatMeasure(3, 'RATING')).toBe('C'); + expect(formatMeasure(4, 'RATING')).toBe('D'); + expect(formatMeasure(5, 'RATING')).toBe('E'); + }); + + it('should format LEVEL', () => { + expect(formatMeasure('ERROR', 'LEVEL')).toBe('Error'); + expect(formatMeasure('WARN', 'LEVEL')).toBe('Warning'); + expect(formatMeasure('OK', 'LEVEL')).toBe('Ok'); + expect(formatMeasure('UNKNOWN', 'LEVEL')).toBe('UNKNOWN'); + }); + + it('should format MILLISEC', () => { + expect(formatMeasure(0, 'MILLISEC')).toBe('0ms'); + expect(formatMeasure(1, 'MILLISEC')).toBe('1ms'); + expect(formatMeasure(173, 'MILLISEC')).toBe('173ms'); + expect(formatMeasure(3649, 'MILLISEC')).toBe('4s'); + expect(formatMeasure(893481, 'MILLISEC')).toBe('15min'); + expect(formatMeasure(17862325, 'MILLISEC')).toBe('298min'); + }); + + it('should not format unknown type', () => { + expect(formatMeasure('random value', 'RANDOM_TYPE')).toBe('random value'); + }); + + it('should return null if value is empty string', () => { + expect(formatMeasure('', 'PERCENT')).toBe(''); + }); + + it('should not fail with undefined', () => { + expect(formatMeasure(undefined, 'INT')).toBe(''); + }); +}); + +describe('getMinDecimalsCountToBeDistinctFromThreshold', () => { + it('should return default if no threshold', () => { + expect(getMinDecimalsCountToBeDistinctFromThreshold(2.67, undefined)).toBe(1); + }); + + it('should return 1 if delta is 0', () => { + expect(getMinDecimalsCountToBeDistinctFromThreshold(2.5, 2.5)).toBe(1); + }); + + it('should return 1 if the delta is larger than 0.1', () => { + [0.1, 0.15, 0.2, 0.5, 0.8, 1].forEach(delta => { + expect(getMinDecimalsCountToBeDistinctFromThreshold(2.5 + delta, 2.5)).toBe(1); + expect(getMinDecimalsCountToBeDistinctFromThreshold(2.5 - delta, 2.5)).toBe(1); + }); + }); + + it('should return enough precision to see the delta', () => { + expect(getMinDecimalsCountToBeDistinctFromThreshold(2.55, 2.5)).toBe(2); + expect(getMinDecimalsCountToBeDistinctFromThreshold(2.505, 2.5)).toBe(3); + expect(getMinDecimalsCountToBeDistinctFromThreshold(2.5005, 2.5)).toBe(4); + expect(getMinDecimalsCountToBeDistinctFromThreshold(85.01, 85)).toBe(2); + expect(getMinDecimalsCountToBeDistinctFromThreshold(84.95, 85)).toBe(2); + expect(getMinDecimalsCountToBeDistinctFromThreshold(84.999999999999554, 85)).toBe( + '9999999999995'.length + ); + expect(getMinDecimalsCountToBeDistinctFromThreshold(85.0000000000000954, 85)).toBe( + '00000000000009'.length + ); + expect(getMinDecimalsCountToBeDistinctFromThreshold(85.00000000000000009, 85)).toBe(1); + }); +}); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/pages-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/pages-test.ts index 6f25c33c951..6f25c33c951 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/pages-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/pages-test.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/path-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/path-test.ts index e354e19f7f2..e354e19f7f2 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/path-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/path-test.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/query-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/query-test.ts index 5598fe04d14..5598fe04d14 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/query-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/query-test.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/ratings-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/ratings-test.ts index 46fe5029c96..46fe5029c96 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/ratings-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/ratings-test.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/request-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/request-test.ts index 6cdb0e4b1e0..6cdb0e4b1e0 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/request-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/request-test.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/scrolling-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/scrolling-test.ts index 27b6e356cd1..27b6e356cd1 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/scrolling-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/scrolling-test.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/strings-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/strings-test.ts index 06c7a61c37d..06c7a61c37d 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/strings-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/strings-test.ts 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 de610e43f4e..79e986cb913 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 @@ -20,6 +20,7 @@ import { AlmKeys } from '../../types/alm-settings'; import { ComponentQualifier } from '../../types/component'; import { IssueType } from '../../types/issues'; +import SonarUICommonInitializer from '../init'; import { convertGithubApiUrlToLink, getComponentDrilldownUrl, @@ -28,15 +29,19 @@ import { getComponentSecurityHotspotsUrl, getGlobalSettingsUrl, getIssuesUrl, + getPathUrlAsString, getProjectSettingsUrl, getQualityGatesUrl, getQualityGateUrl, + getReturnUrl, + isRelativeUrl, stripTrailingSlash } from '../urls'; const SIMPLE_COMPONENT_KEY = 'sonarqube'; const COMPLEX_COMPONENT_KEY = 'org.sonarsource.sonarqube:sonarqube'; const METRIC = 'coverage'; +const COMPLEX_COMPONENT_KEY_ENCODED = encodeURIComponent(COMPLEX_COMPONENT_KEY); describe('#convertGithubApiUrlToLink', () => { it('should correctly convert a GitHub API URL to a Web URL', () => { @@ -180,3 +185,70 @@ describe('#getProjectSettingsUrl', () => { }); }); }); + +afterEach(() => { + SonarUICommonInitializer.setUrlContext(''); +}); + +describe('#getPathUrlAsString', () => { + it('should return component url', () => { + expect( + getPathUrlAsString({ pathname: '/dashboard', query: { id: SIMPLE_COMPONENT_KEY } }) + ).toBe('/dashboard?id=' + SIMPLE_COMPONENT_KEY); + }); + + it('should encode component key', () => { + expect( + getPathUrlAsString({ pathname: '/dashboard', query: { id: COMPLEX_COMPONENT_KEY } }) + ).toBe('/dashboard?id=' + COMPLEX_COMPONENT_KEY_ENCODED); + }); + + it('should take baseUrl into account', () => { + SonarUICommonInitializer.setUrlContext('/context'); + expect( + getPathUrlAsString({ pathname: '/dashboard', query: { id: COMPLEX_COMPONENT_KEY } }) + ).toBe('/context/dashboard?id=' + COMPLEX_COMPONENT_KEY_ENCODED); + }); +}); + +describe('#getReturnUrl', () => { + it('should get the return url', () => { + expect(getReturnUrl({ query: { return_to: '/test' } })).toBe('/test'); + expect(getReturnUrl({ query: { return_to: 'http://www.google.com' } })).toBe('/'); + expect(getReturnUrl({})).toBe('/'); + }); +}); + +describe('#isRelativeUrl', () => { + it('should check a relative url', () => { + expect(isRelativeUrl('/test')).toBe(true); + expect(isRelativeUrl('http://www.google.com')).toBe(false); + expect(isRelativeUrl('javascript:alert("test")')).toBe(false); + expect(isRelativeUrl('\\test')).toBe(false); + expect(isRelativeUrl('//test')).toBe(false); + }); +}); + +describe('#getHostUrl', () => { + beforeEach(() => { + jest.resetModules(); + }); + it('should return host url on client side', () => { + jest.mock('../init', () => ({ + getUrlContext: () => '', + IS_SSR: false + })); + const mockedUrls = require('../urls'); + expect(mockedUrls.getHostUrl()).toBe('http://localhost'); + }); + it('should throw on server-side', () => { + jest.mock('../init', () => ({ + getUrlContext: () => '', + IS_SSR: true + })); + const mockedUrls = require('../urls'); + expect(mockedUrls.getHostUrl).toThrowErrorMatchingInlineSnapshot( + `"No host url available on server side."` + ); + }); +}); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/colors.ts b/server/sonar-web/src/main/js/helpers/colors.ts index 839586b4e20..839586b4e20 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/colors.ts +++ b/server/sonar-web/src/main/js/helpers/colors.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/cookies.ts b/server/sonar-web/src/main/js/helpers/cookies.ts index d717044f4b0..d717044f4b0 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/cookies.ts +++ b/server/sonar-web/src/main/js/helpers/cookies.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/csv.ts b/server/sonar-web/src/main/js/helpers/csv.ts index d162d018f3c..d162d018f3c 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/csv.ts +++ b/server/sonar-web/src/main/js/helpers/csv.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/dates.ts b/server/sonar-web/src/main/js/helpers/dates.ts index daa25a7b603..daa25a7b603 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/dates.ts +++ b/server/sonar-web/src/main/js/helpers/dates.ts diff --git a/server/sonar-web/src/main/js/helpers/editions.ts b/server/sonar-web/src/main/js/helpers/editions.ts index 0bbc36a8ad9..f57cfbfd2dc 100644 --- a/server/sonar-web/src/main/js/helpers/editions.ts +++ b/server/sonar-web/src/main/js/helpers/editions.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { stringify } from 'querystring'; -import { omitNil } from '../sonar-ui-common/helpers/request'; +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 c0357b9380b..484a085bc94 100644 --- a/server/sonar-web/src/main/js/helpers/extensions.ts +++ b/server/sonar-web/src/main/js/helpers/extensions.ts @@ -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 { getBaseUrl } from '../sonar-ui-common/helpers/urls'; +import { getBaseUrl } from '../helpers/urls'; import { getExtensionFromCache } from './extensionsHandler'; let librariesExposed = false; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/getHistory.ts b/server/sonar-web/src/main/js/helpers/getHistory.ts index ea76f47a724..ea76f47a724 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/getHistory.ts +++ b/server/sonar-web/src/main/js/helpers/getHistory.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/handleRequiredAuthentication.ts b/server/sonar-web/src/main/js/helpers/handleRequiredAuthentication.ts index 061cde8c09a..061cde8c09a 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/handleRequiredAuthentication.ts +++ b/server/sonar-web/src/main/js/helpers/handleRequiredAuthentication.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/init.ts b/server/sonar-web/src/main/js/helpers/init.ts index fd9ab571dd6..fd9ab571dd6 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/init.ts +++ b/server/sonar-web/src/main/js/helpers/init.ts diff --git a/server/sonar-web/src/main/js/helpers/issues.ts b/server/sonar-web/src/main/js/helpers/issues.ts index 4c2e2f0f484..75d2dfb0c58 100644 --- a/server/sonar-web/src/main/js/helpers/issues.ts +++ b/server/sonar-web/src/main/js/helpers/issues.ts @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { flatten, sortBy } from 'lodash'; -import BugIcon from '../sonar-ui-common/components/icons/BugIcon'; -import CodeSmellIcon from '../sonar-ui-common/components/icons/CodeSmellIcon'; -import SecurityHotspotIcon from '../sonar-ui-common/components/icons/SecurityHotspotIcon'; -import VulnerabilityIcon from '../sonar-ui-common/components/icons/VulnerabilityIcon'; +import BugIcon from '../components/icons/BugIcon'; +import CodeSmellIcon from '../components/icons/CodeSmellIcon'; +import SecurityHotspotIcon from '../components/icons/SecurityHotspotIcon'; +import VulnerabilityIcon from '../components/icons/VulnerabilityIcon'; import { IssueType, RawIssue } from '../types/issues'; import { MetricKey } from '../types/metrics'; import { ISSUE_TYPES } from './constants'; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/keycodes.ts b/server/sonar-web/src/main/js/helpers/keycodes.ts index c57d397ae89..c57d397ae89 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/keycodes.ts +++ b/server/sonar-web/src/main/js/helpers/keycodes.ts diff --git a/server/sonar-web/src/main/js/helpers/l10n.ts b/server/sonar-web/src/main/js/helpers/l10n.ts index ac4026d0d23..01a93305912 100644 --- a/server/sonar-web/src/main/js/helpers/l10n.ts +++ b/server/sonar-web/src/main/js/helpers/l10n.ts @@ -18,13 +18,99 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { fetchL10nBundle } from '../api/l10n'; -import { toNotSoISOString } from '../sonar-ui-common/helpers/dates'; -import SonarUiCommonInitializer, { DEFAULT_LOCALE } from '../sonar-ui-common/helpers/init'; -import { - get as loadFromLocalStorage, - save as saveInLocalStorage -} from '../sonar-ui-common/helpers/storage'; import { L10nBundle, L10nBundleRequestParams } from '../types/l10n'; +import { toNotSoISOString } from './dates'; +import SonarUiCommonInitializer, { DEFAULT_LOCALE, getLocale, getMessages } from './init'; +import { get as loadFromLocalStorage, save as saveInLocalStorage } from './storage'; + +export type Messages = T.Dict<string>; + +export function translate(...keys: string[]): string { + const messageKey = keys.join('.'); + const l10nMessages = getMessages(); + if (process.env.NODE_ENV === 'development' && !l10nMessages[messageKey]) { + // eslint-disable-next-line no-console + console.error(`No message for: ${messageKey}`); + } + return l10nMessages[messageKey] || messageKey; +} + +export function translateWithParameters( + messageKey: string, + ...parameters: Array<string | number> +): string { + const message = getMessages()[messageKey]; + if (message) { + return parameters + .map(parameter => String(parameter)) + .reduce((acc, parameter, index) => acc.replace(`{${index}}`, () => parameter), message); + } + if (process.env.NODE_ENV === 'development') { + // eslint-disable-next-line no-console + console.error(`No message for: ${messageKey}`); + } + return `${messageKey}.${parameters.join('.')}`; +} + +export function hasMessage(...keys: string[]): boolean { + const messageKey = keys.join('.'); + return getMessages()[messageKey] != null; +} + +export function getLocalizedMetricName( + metric: { key: string; name?: string }, + short = false +): string { + const bundleKey = `metric.${metric.key}.${short ? 'short_name' : 'name'}`; + if (hasMessage(bundleKey)) { + return translate(bundleKey); + } else if (short) { + return getLocalizedMetricName(metric); + } + return metric.name || metric.key; +} + +export function getLocalizedCategoryMetricName(metric: { key: string; name?: string }) { + const bundleKey = `metric.${metric.key}.extra_short_name`; + return hasMessage(bundleKey) ? translate(bundleKey) : getLocalizedMetricName(metric, true); +} + +export function getLocalizedMetricDomain(domainName: string) { + const bundleKey = `metric_domain.${domainName}`; + return hasMessage(bundleKey) ? translate(bundleKey) : domainName; +} + +export function getCurrentLocale() { + return getLocale(); +} + +export function getShortMonthName(index: number) { + const months = [ + 'Jan', + 'Feb', + 'Mar', + 'Apr', + 'May', + 'Jun', + 'Jul', + 'Aug', + 'Sep', + 'Oct', + 'Nov', + 'Dec' + ]; + return translate(months[index]); +} + +export function getWeekDayName(index: number) { + const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; + return weekdays[index] ? translate(weekdays[index]) : ''; +} + +export function getShortWeekDayName(index: number) { + const weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + return weekdays[index] ? translate(weekdays[index]) : ''; +} const L10N_BUNDLE_LS_KEY = 'l10n.bundle'; diff --git a/server/sonar-web/src/main/js/helpers/measures.ts b/server/sonar-web/src/main/js/helpers/measures.ts index 51c3047c2c7..86451fc6e0b 100644 --- a/server/sonar-web/src/main/js/helpers/measures.ts +++ b/server/sonar-web/src/main/js/helpers/measures.ts @@ -17,29 +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 { translate, translateWithParameters } from '../sonar-ui-common/helpers/l10n'; -import { formatMeasure } from '../sonar-ui-common/helpers/measures'; -import { isDefined } from '../sonar-ui-common/helpers/types'; import { MetricKey } from '../types/metrics'; import { QualityGateStatusCondition, QualityGateStatusConditionEnhanced } from '../types/quality-gates'; - -/** Return a localized metric name */ -export function localizeMetric(metricKey: MetricKey | string): string { - return translate('metric', metricKey, 'name'); -} - -/** Return corresponding "short" for better display in UI */ -export function getShortType(type: string): string { - if (type === 'INT') { - return 'SHORT_INT'; - } else if (type === 'WORK_DUR') { - return 'SHORT_WORK_DUR'; - } - return type; -} +import { getCurrentLocale, translate, translateWithParameters } from './l10n'; +import { isDefined } from './types'; export function enhanceMeasuresWithMetrics( measures: T.Measure[], @@ -147,3 +131,316 @@ export function getDisplayMetrics(metrics: T.Metric[]) { export function findMeasure(measures: T.MeasureEnhanced[], metric: MetricKey | string) { return measures.find(measure => measure.metric.key === metric); } + +const HOURS_IN_DAY = 8; + +interface Formatter { + (value: string | number, options?: any): string; +} + +/** Format a measure value for a given type */ +export function formatMeasure( + value: string | number | undefined, + type: string, + options?: any +): string { + const formatter = getFormatter(type); + // eslint-disable-next-line react-hooks/rules-of-hooks + return useFormatter(value, formatter, options); +} + +/** Return a localized metric name */ +export function localizeMetric(metricKey: string): string { + return translate('metric', metricKey, 'name'); +} + +/** Return corresponding "short" for better display in UI */ +export function getShortType(type: string): string { + if (type === 'INT') { + return 'SHORT_INT'; + } else if (type === 'WORK_DUR') { + return 'SHORT_WORK_DUR'; + } + return type; +} + +/* + * Conditional decimal count for QualityGate-impacting measures + * (e.g. Coverage %) + * Increase the number of decimals if the value is close to the threshold + * We count the precision (number of 0's, i.e. log10 and round down) needed to show the difference + * E.g. threshold 85, value 84.9993 -> delta = 0.0007, we need 4 decimals to see the difference + * otherwise rounding will make it look like they are equal. + */ +const DEFAULT_DECIMALS = 1; +export function getMinDecimalsCountToBeDistinctFromThreshold( + value: number, + threshold: number | undefined +): number { + if (!threshold) { + return DEFAULT_DECIMALS; + } + const delta = Math.abs(threshold - value); + if (delta < 0.1 && delta > 0) { + return -Math.floor(Math.log10(delta)); + } + return DEFAULT_DECIMALS; +} + +function useFormatter( + value: string | number | undefined, + formatter: Formatter, + options?: any +): string { + return value !== undefined && value !== '' ? formatter(value, options) : ''; +} + +function getFormatter(type: string): Formatter { + const FORMATTERS: T.Dict<Formatter> = { + INT: intFormatter, + SHORT_INT: shortIntFormatter, + FLOAT: floatFormatter, + PERCENT: percentFormatter, + WORK_DUR: durationFormatter, + SHORT_WORK_DUR: shortDurationFormatter, + RATING: ratingFormatter, + LEVEL: levelFormatter, + MILLISEC: millisecondsFormatter + }; + return FORMATTERS[type] || noFormatter; +} + +function numberFormatter( + value: string | number, + minimumFractionDigits = 0, + maximumFractionDigits = minimumFractionDigits +) { + const { format } = new Intl.NumberFormat(getCurrentLocale(), { + minimumFractionDigits, + maximumFractionDigits + }); + if (typeof value === 'string') { + return format(parseFloat(value)); + } + return format(value); +} + +function noFormatter(value: string | number): string | number { + return value; +} + +function intFormatter(value: string | number): string { + return numberFormatter(value); +} + +const shortIntFormats = [ + { unit: 1e10, formatUnit: 1e9, fraction: 0, suffix: 'short_number_suffix.g' }, + { unit: 1e9, formatUnit: 1e9, fraction: 1, suffix: 'short_number_suffix.g' }, + { unit: 1e7, formatUnit: 1e6, fraction: 0, suffix: 'short_number_suffix.m' }, + { unit: 1e6, formatUnit: 1e6, fraction: 1, suffix: 'short_number_suffix.m' }, + { unit: 1e4, formatUnit: 1e3, fraction: 0, suffix: 'short_number_suffix.k' }, + { unit: 1e3, formatUnit: 1e3, fraction: 1, suffix: 'short_number_suffix.k' } +]; + +function shortIntFormatter( + value: string | number, + option?: { roundingFunc?: (x: number) => number } +): string { + const roundingFunc = (option && option.roundingFunc) || undefined; + if (typeof value === 'string') { + value = parseFloat(value); + } + for (let i = 0; i < shortIntFormats.length; i++) { + const { unit, formatUnit, fraction, suffix } = shortIntFormats[i]; + const nextFraction = unit / (shortIntFormats[i + 1] ? shortIntFormats[i + 1].unit / 10 : 1); + const roundedValue = numberRound(value / unit, nextFraction, roundingFunc); + if (roundedValue >= 1) { + return ( + numberFormatter( + numberRound(value / formatUnit, Math.pow(10, fraction), roundingFunc), + 0, + fraction + ) + translate(suffix) + ); + } + } + + return numberFormatter(value); +} + +function numberRound( + value: number, + fraction: number = 1000, + roundingFunc: (x: number) => number = Math.round +) { + return roundingFunc(value * fraction) / fraction; +} + +function floatFormatter(value: string | number): string { + return numberFormatter(value, 1, 5); +} + +function percentFormatter( + value: string | number, + { decimals, omitExtraDecimalZeros }: { decimals?: number; omitExtraDecimalZeros?: boolean } = {} +): string { + if (typeof value === 'string') { + value = parseFloat(value); + } + if (value === 100) { + return '100%'; + } else if (omitExtraDecimalZeros && decimals) { + // If omitExtraDecimalZeros is true, all trailing decimal 0s will be removed, + // except for the first decimal. + // E.g. for decimals=3: + // - omitExtraDecimalZeros: false, value: 45.450 => 45.450 + // - omitExtraDecimalZeros: true, value: 45.450 => 45.45 + // - omitExtraDecimalZeros: false, value: 85 => 85.000 + // - omitExtraDecimalZeros: true, value: 85 => 85.0 + return `${numberFormatter(value, 1, decimals)}%`; + } + return `${numberFormatter(value, decimals || 1)}%`; +} + +function ratingFormatter(value: string | number): string { + if (typeof value === 'string') { + value = parseInt(value, 10); + } + return String.fromCharCode(97 + value - 1).toUpperCase(); +} + +function levelFormatter(value: string | number): string { + if (typeof value === 'number') { + value = value.toString(); + } + const l10nKey = `metric.level.${value}`; + const result = translate(l10nKey); + + // if couldn't translate, return the initial value + return l10nKey !== result ? result : value; +} + +function millisecondsFormatter(value: string | number): string { + if (typeof value === 'string') { + value = parseInt(value, 10); + } + const ONE_SECOND = 1000; + const ONE_MINUTE = 60 * ONE_SECOND; + if (value >= ONE_MINUTE) { + const minutes = Math.round(value / ONE_MINUTE); + return `${minutes}min`; + } else if (value >= ONE_SECOND) { + const seconds = Math.round(value / ONE_SECOND); + return `${seconds}s`; + } + return `${value}ms`; +} + +/* + * Debt Formatters + */ + +function shouldDisplayDays(days: number): boolean { + return days > 0; +} + +function shouldDisplayDaysInShortFormat(days: number): boolean { + return days > 0.9; +} + +function shouldDisplayHours(days: number, hours: number): boolean { + return hours > 0 && days < 10; +} + +function shouldDisplayHoursInShortFormat(hours: number): boolean { + return hours > 0.9; +} + +function shouldDisplayMinutes(days: number, hours: number, minutes: number): boolean { + return minutes > 0 && hours < 10 && days === 0; +} + +function addSpaceIfNeeded(value: string): string { + return value.length > 0 ? `${value} ` : value; +} + +function formatDuration(isNegative: boolean, days: number, hours: number, minutes: number): string { + let formatted = ''; + if (shouldDisplayDays(days)) { + formatted += translateWithParameters('work_duration.x_days', isNegative ? -1 * days : days); + } + if (shouldDisplayHours(days, hours)) { + formatted = addSpaceIfNeeded(formatted); + formatted += translateWithParameters( + 'work_duration.x_hours', + isNegative && formatted.length === 0 ? -1 * hours : hours + ); + } + if (shouldDisplayMinutes(days, hours, minutes)) { + formatted = addSpaceIfNeeded(formatted); + formatted += translateWithParameters( + 'work_duration.x_minutes', + isNegative && formatted.length === 0 ? -1 * minutes : minutes + ); + } + return formatted; +} + +function formatDurationShort( + isNegative: boolean, + days: number, + hours: number, + minutes: number +): string { + if (shouldDisplayDaysInShortFormat(days)) { + const roundedDays = Math.round(days); + const formattedDays = formatMeasure(isNegative ? -1 * roundedDays : roundedDays, 'SHORT_INT'); + return translateWithParameters('work_duration.x_days', formattedDays); + } + + if (shouldDisplayHoursInShortFormat(hours)) { + const roundedHours = Math.round(hours); + const formattedHours = formatMeasure( + isNegative ? -1 * roundedHours : roundedHours, + 'SHORT_INT' + ); + return translateWithParameters('work_duration.x_hours', formattedHours); + } + + const formattedMinutes = formatMeasure(isNegative ? -1 * minutes : minutes, 'SHORT_INT'); + return translateWithParameters('work_duration.x_minutes', formattedMinutes); +} + +function durationFormatter(value: string | number): string { + if (typeof value === 'string') { + value = parseInt(value, 10); + } + if (value === 0) { + return '0'; + } + const hoursInDay = HOURS_IN_DAY; + const isNegative = value < 0; + const absValue = Math.abs(value); + const days = Math.floor(absValue / hoursInDay / 60); + let remainingValue = absValue - days * hoursInDay * 60; + const hours = Math.floor(remainingValue / 60); + remainingValue -= hours * 60; + return formatDuration(isNegative, days, hours, remainingValue); +} + +function shortDurationFormatter(value: string | number): string { + if (typeof value === 'string') { + value = parseInt(value, 10); + } + if (value === 0) { + return '0'; + } + const hoursInDay = HOURS_IN_DAY; + const isNegative = value < 0; + const absValue = Math.abs(value); + const days = absValue / hoursInDay / 60; + let remainingValue = absValue - Math.floor(days) * hoursInDay * 60; + const hours = remainingValue / 60; + remainingValue -= Math.floor(hours) * 60; + return formatDurationShort(isNegative, days, hours, remainingValue); +} diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/pages.ts b/server/sonar-web/src/main/js/helpers/pages.ts index 40c686e43fa..40c686e43fa 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/pages.ts +++ b/server/sonar-web/src/main/js/helpers/pages.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/path.ts b/server/sonar-web/src/main/js/helpers/path.ts index cf42d393aaf..cf42d393aaf 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/path.ts +++ b/server/sonar-web/src/main/js/helpers/path.ts diff --git a/server/sonar-web/src/main/js/helpers/periods.ts b/server/sonar-web/src/main/js/helpers/periods.ts index 8ef8871ae2f..63892450b9c 100644 --- a/server/sonar-web/src/main/js/helpers/periods.ts +++ b/server/sonar-web/src/main/js/helpers/periods.ts @@ -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 { parseDate } from '../sonar-ui-common/helpers/dates'; -import { translate, translateWithParameters } from '../sonar-ui-common/helpers/l10n'; +import { parseDate } from '../helpers/dates'; +import { translate, translateWithParameters } from '../helpers/l10n'; import { ApplicationPeriod } from '../types/application'; export function getPeriodLabel( diff --git a/server/sonar-web/src/main/js/helpers/projectLinks.ts b/server/sonar-web/src/main/js/helpers/projectLinks.ts index 76c44b4e538..cf567cdb4cd 100644 --- a/server/sonar-web/src/main/js/helpers/projectLinks.ts +++ b/server/sonar-web/src/main/js/helpers/projectLinks.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { partition, sortBy } from 'lodash'; -import { translate } from '../sonar-ui-common/helpers/l10n'; +import { translate } from '../helpers/l10n'; const PROVIDED_TYPES = ['homepage', 'ci', 'issue', 'scm', 'scm_dev']; type NameAndType = Pick<T.ProjectLink, 'name' | 'type'>; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/query.ts b/server/sonar-web/src/main/js/helpers/query.ts index bc5fa4dd6d2..bc5fa4dd6d2 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/query.ts +++ b/server/sonar-web/src/main/js/helpers/query.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/ratings.ts b/server/sonar-web/src/main/js/helpers/ratings.ts index 6470ce2c0bf..6470ce2c0bf 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/ratings.ts +++ b/server/sonar-web/src/main/js/helpers/ratings.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/request.ts b/server/sonar-web/src/main/js/helpers/request.ts index e3ede0d9843..e3ede0d9843 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/request.ts +++ b/server/sonar-web/src/main/js/helpers/request.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/scrolling.ts b/server/sonar-web/src/main/js/helpers/scrolling.ts index 9fe5cbe92ae..9fe5cbe92ae 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/scrolling.ts +++ b/server/sonar-web/src/main/js/helpers/scrolling.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/search.tsx b/server/sonar-web/src/main/js/helpers/search.tsx index c12152d33c2..c12152d33c2 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/search.tsx +++ b/server/sonar-web/src/main/js/helpers/search.tsx diff --git a/server/sonar-web/src/main/js/helpers/sonarlint.ts b/server/sonar-web/src/main/js/helpers/sonarlint.ts index dc3c9e73d47..a744cc94650 100644 --- a/server/sonar-web/src/main/js/helpers/sonarlint.ts +++ b/server/sonar-web/src/main/js/helpers/sonarlint.ts @@ -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 { getHostUrl } from '../sonar-ui-common/helpers/urls'; +import { getHostUrl } from '../helpers/urls'; import { Ide } from '../types/sonarlint'; const SONARLINT_PORT_START = 64120; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/storage.ts b/server/sonar-web/src/main/js/helpers/storage.ts index c2a16726b87..c2a16726b87 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/storage.ts +++ b/server/sonar-web/src/main/js/helpers/storage.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/strings.ts b/server/sonar-web/src/main/js/helpers/strings.ts index 7b701a7f7bd..7b701a7f7bd 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/strings.ts +++ b/server/sonar-web/src/main/js/helpers/strings.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/testUtils.ts b/server/sonar-web/src/main/js/helpers/testUtils.ts index 9a7b019eef1..9a7b019eef1 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/testUtils.ts +++ b/server/sonar-web/src/main/js/helpers/testUtils.ts diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/types.ts b/server/sonar-web/src/main/js/helpers/types.ts index 85ca9976b09..85ca9976b09 100644 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/types.ts +++ b/server/sonar-web/src/main/js/helpers/types.ts diff --git a/server/sonar-web/src/main/js/helpers/urls.ts b/server/sonar-web/src/main/js/helpers/urls.ts index b1261e52ad8..118b15f8a70 100644 --- a/server/sonar-web/src/main/js/helpers/urls.ts +++ b/server/sonar-web/src/main/js/helpers/urls.ts @@ -17,14 +17,20 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { pick } from 'lodash'; +import { isNil, omitBy, pick } from 'lodash'; +import { stringify } from 'querystring'; import { getProfilePath } from '../apps/quality-profiles/utils'; -import { getBaseUrl, Location } from '../sonar-ui-common/helpers/urls'; import { BranchLike, BranchParameters } from '../types/branch-like'; import { ComponentQualifier, isApplication, isPortfolioLike } from '../types/component'; import { GraphType } from '../types/project-activity'; import { SecurityStandard } from '../types/security'; import { getBranchLikeQuery, isBranch, isMainBranch, isPullRequest } from './branch-like'; +import { getUrlContext, IS_SSR } from './init'; + +export interface Location { + pathname: string; + query?: T.Dict<string | undefined | number>; +} type Query = Location['query']; @@ -308,3 +314,33 @@ export function convertGithubApiUrlToLink(url: string) { export function stripTrailingSlash(url: string) { return url.replace(/\/$/, ''); } + +export function getBaseUrl(): string { + return getUrlContext(); +} + +export function getHostUrl(): string { + if (IS_SSR) { + throw new Error('No host url available on server side.'); + } + return window.location.origin + getBaseUrl(); +} + +export function getPathUrlAsString(path: Location, internal = true): string { + return `${internal ? getBaseUrl() : getHostUrl()}${path.pathname}?${stringify( + omitBy(path.query, isNil) + )}`; +} + +export function getReturnUrl(location: { hash?: string; query?: { return_to?: string } }) { + const returnTo = location.query && location.query['return_to']; + if (isRelativeUrl(returnTo)) { + return returnTo + (location.hash ? location.hash : ''); + } + return getBaseUrl() + '/'; +} + +export function isRelativeUrl(url?: string): boolean { + const regex = new RegExp(/^\/[^/\\]/); + return Boolean(url && regex.test(url)); +} diff --git a/server/sonar-web/src/main/js/sonar-ui-common/config/jest/CSSStub.js b/server/sonar-web/src/main/js/sonar-ui-common/config/jest/CSSStub.js deleted file mode 100644 index 2a89db848b0..00000000000 --- a/server/sonar-web/src/main/js/sonar-ui-common/config/jest/CSSStub.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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/src/main/js/sonar-ui-common/config/jest/FileStub.js b/server/sonar-web/src/main/js/sonar-ui-common/config/jest/FileStub.js deleted file mode 100644 index 3afbc40ae7c..00000000000 --- a/server/sonar-web/src/main/js/sonar-ui-common/config/jest/FileStub.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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 = 'test-file-stub'; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/config/jest/SetupEnzyme.js b/server/sonar-web/src/main/js/sonar-ui-common/config/jest/SetupEnzyme.js deleted file mode 100644 index 8cb3f810f01..00000000000 --- a/server/sonar-web/src/main/js/sonar-ui-common/config/jest/SetupEnzyme.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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 Enzyme = require('enzyme'); -const Adapter = require('enzyme-adapter-react-16'); - -Enzyme.configure({ adapter: new Adapter() }); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/config/jest/SetupSUC.ts b/server/sonar-web/src/main/js/sonar-ui-common/config/jest/SetupSUC.ts deleted file mode 100644 index 5466f2826d1..00000000000 --- a/server/sonar-web/src/main/js/sonar-ui-common/config/jest/SetupSUC.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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 '../../components/theme'; -import Initializer, { DEFAULT_LOCALE } from '../../helpers/init'; -import testTheme from './testTheme'; - -Initializer.setLocale(DEFAULT_LOCALE) - .setMessages({}) - .setUrlContext(''); - -// 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 as any)['_currentValue'] = testTheme; -(ThemeContext as any)['_currentValue2'] = testTheme; diff --git a/server/sonar-web/src/main/js/sonar-ui-common/config/jest/SetupTestEnvironment.js b/server/sonar-web/src/main/js/sonar-ui-common/config/jest/SetupTestEnvironment.js deleted file mode 100644 index 9e9df7cd5e3..00000000000 --- a/server/sonar-web/src/main/js/sonar-ui-common/config/jest/SetupTestEnvironment.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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. - */ -require('whatwg-fetch'); - -const content = document.createElement('div'); -content.id = 'content'; -document.documentElement.appendChild(content); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/l10n-test.ts b/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/l10n-test.ts deleted file mode 100644 index 0a607a1f911..00000000000 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/l10n-test.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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 camelcase */ -import Initializer, { getMessages } from '../init'; -import { - getLocalizedCategoryMetricName, - getLocalizedMetricDomain, - getLocalizedMetricName, - getShortMonthName, - getShortWeekDayName, - getWeekDayName, - hasMessage, - translate, - translateWithParameters -} from '../l10n'; - -const originalMessages = getMessages(); -const MSG = 'my_message'; - -afterEach(() => { - Initializer.setMessages(originalMessages); -}); - -describe('translate', () => { - it('should translate simple message', () => { - Initializer.setMessages({ my_key: MSG }); - expect(translate('my_key')).toBe(MSG); - }); - - it('should translate message with composite key', () => { - Initializer.setMessages({ 'my.composite.message': MSG }); - expect(translate('my', 'composite', 'message')).toBe(MSG); - expect(translate('my.composite', 'message')).toBe(MSG); - expect(translate('my', 'composite.message')).toBe(MSG); - expect(translate('my.composite.message')).toBe(MSG); - }); - - it('should not translate message but return its key', () => { - expect(translate('random')).toBe('random'); - expect(translate('random', 'key')).toBe('random.key'); - expect(translate('composite.random', 'key')).toBe('composite.random.key'); - }); -}); - -describe('translateWithParameters', () => { - it('should translate message with one parameter in the beginning', () => { - Initializer.setMessages({ x_apples: '{0} apples' }); - expect(translateWithParameters('x_apples', 5)).toBe('5 apples'); - }); - - it('should translate message with one parameter in the middle', () => { - Initializer.setMessages({ x_apples: 'I have {0} apples' }); - expect(translateWithParameters('x_apples', 5)).toBe('I have 5 apples'); - }); - - it('should translate message with one parameter in the end', () => { - Initializer.setMessages({ x_apples: 'Apples: {0}' }); - expect(translateWithParameters('x_apples', 5)).toBe('Apples: 5'); - }); - - it('should translate message with several parameters', () => { - Initializer.setMessages({ x_apples: '{0}: I have {2} apples in my {1} baskets - {3}' }); - expect(translateWithParameters('x_apples', 1, 2, 3, 4)).toBe( - '1: I have 3 apples in my 2 baskets - 4' - ); - }); - - it('should not be affected by replacement pattern XSS vulnerability of String.replace', () => { - Initializer.setMessages({ x_apples: 'I have {0} apples' }); - expect(translateWithParameters('x_apples', '$`')).toBe('I have $` apples'); - }); - - it('should not translate message but return its key', () => { - expect(translateWithParameters('random', 5)).toBe('random.5'); - expect(translateWithParameters('random', 1, 2, 3)).toBe('random.1.2.3'); - expect(translateWithParameters('composite.random', 1, 2)).toBe('composite.random.1.2'); - }); -}); - -describe('hasMessage', () => { - it('should return that the message exists', () => { - Initializer.setMessages({ foo: 'Foo', 'foo.bar': 'Foo Bar' }); - expect(hasMessage('foo')).toBe(true); - expect(hasMessage('foo', 'bar')).toBe(true); - }); - - it('should return that the message is missing', () => { - expect(hasMessage('foo')).toBe(false); - expect(hasMessage('foo', 'bar')).toBe(false); - }); -}); - -describe('getLocalizedMetricName', () => { - const metric = { key: 'new_code', name: 'new_code_metric_name' }; - - it('should return the metric name translation', () => { - Initializer.setMessages({ 'metric.new_code.name': 'metric.new_code.name_t' }); - expect(getLocalizedMetricName(metric)).toBe('metric.new_code.name_t'); - }); - - it('should return the metric short name', () => { - Initializer.setMessages({ 'metric.new_code.short_name': 'metric.new_code.short_name_t' }); - expect(getLocalizedMetricName(metric, true)).toBe('metric.new_code.short_name_t'); - }); - - it('should fallback on name if short name is absent', () => { - Initializer.setMessages({ 'metric.new_code.name': 'metric.new_code.name_t' }); - expect(getLocalizedMetricName(metric, true)).toBe('metric.new_code.name_t'); - }); - - it('should fallback on metric name if translation is absent', () => { - expect(getLocalizedMetricName(metric)).toBe('new_code_metric_name'); - }); - - it('should fallback on metric key if nothing else is available', () => { - expect(getLocalizedMetricName({ key: 'new_code' })).toBe('new_code'); - }); -}); - -describe('getLocalizedCategoryMetricName', () => { - it('should return metric category name translation', () => { - Initializer.setMessages({ - 'metric.new_code.extra_short_name': 'metric.new_code.extra_short_name_t' - }); - expect(getLocalizedCategoryMetricName({ key: 'new_code' })).toBe( - 'metric.new_code.extra_short_name_t' - ); - }); - - it('should fallback on metric name if extra_short_name is absent', () => { - Initializer.setMessages({ 'metric.new_code.name': 'metric.new_code.name_t' }); - expect(getLocalizedCategoryMetricName({ key: 'new_code' })).toBe('metric.new_code.name_t'); - }); -}); - -describe('getLocalizedMetricDomain', () => { - it('should return metric domain name translation', () => { - Initializer.setMessages({ 'metric_domain.domain': 'metric_domain.domain_t' }); - expect(getLocalizedMetricDomain('domain')).toBe('metric_domain.domain_t'); - }); - - it('should fallback on metric domain name', () => { - expect(getLocalizedMetricDomain('domain')).toBe('domain'); - }); -}); - -describe('getShortMonthName', () => { - it('should properly translation months', () => { - Initializer.setMessages({ Jan: 'Jan_t' }); - expect(getShortMonthName(0)).toBe('Jan_t'); - }); -}); - -describe('getWeekDayName', () => { - it('should properly translation weekday', () => { - Initializer.setMessages({ Sunday: 'Sunday_t' }); - expect(getWeekDayName(0)).toBe('Sunday_t'); - }); -}); - -describe('getShortWeekDayName', () => { - it('should properly translation short weekday', () => { - Initializer.setMessages({ Sun: 'Sun_t' }); - expect(getShortWeekDayName(0)).toBe('Sun_t'); - }); -}); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/measures-test.ts b/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/measures-test.ts deleted file mode 100644 index 21b7e35fbe6..00000000000 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/measures-test.ts +++ /dev/null @@ -1,225 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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 Initializer from '../init'; -import { formatMeasure, getMinDecimalsCountToBeDistinctFromThreshold } from '../measures'; - -const HOURS_IN_DAY = 8; -const ONE_MINUTE = 1; -const ONE_HOUR = ONE_MINUTE * 60; -const ONE_DAY = HOURS_IN_DAY * ONE_HOUR; - -beforeAll(() => { - Initializer.setMessages({ - 'work_duration.x_days': '{0}d', - 'work_duration.x_hours': '{0}h', - 'work_duration.x_minutes': '{0}min', - 'work_duration.about': '~ {0}', - 'metric.level.ERROR': 'Error', - 'metric.level.WARN': 'Warning', - 'metric.level.OK': 'Ok', - 'short_number_suffix.g': 'G', - 'short_number_suffix.k': 'k', - 'short_number_suffix.m': 'M' - }); -}); - -afterAll(() => { - Initializer.setMessages({}); -}); - -describe('#formatMeasure()', () => { - it('should format INT', () => { - expect(formatMeasure(0, 'INT')).toBe('0'); - expect(formatMeasure(1, 'INT')).toBe('1'); - expect(formatMeasure(-5, 'INT')).toBe('-5'); - expect(formatMeasure(999, 'INT')).toBe('999'); - expect(formatMeasure(1000, 'INT')).toBe('1,000'); - expect(formatMeasure(1529, 'INT')).toBe('1,529'); - expect(formatMeasure(10000, 'INT')).toBe('10,000'); - expect(formatMeasure(1234567890, 'INT')).toBe('1,234,567,890'); - }); - - it('should format SHORT_INT', () => { - expect(formatMeasure(0, 'SHORT_INT')).toBe('0'); - expect(formatMeasure(1, 'SHORT_INT')).toBe('1'); - expect(formatMeasure(999, 'SHORT_INT')).toBe('999'); - expect(formatMeasure(1000, 'SHORT_INT')).toBe('1k'); - expect(formatMeasure(1529, 'SHORT_INT')).toBe('1.5k'); - expect(formatMeasure(10000, 'SHORT_INT')).toBe('10k'); - expect(formatMeasure(10678, 'SHORT_INT')).toBe('11k'); - expect(formatMeasure(9467890, 'SHORT_INT')).toBe('9.5M'); - expect(formatMeasure(994567890, 'SHORT_INT')).toBe('995M'); - expect(formatMeasure(999000001, 'SHORT_INT')).toBe('999M'); - expect(formatMeasure(999567890, 'SHORT_INT')).toBe('1G'); - expect(formatMeasure(1234567890, 'SHORT_INT')).toBe('1.2G'); - expect(formatMeasure(11234567890, 'SHORT_INT')).toBe('11G'); - }); - - it('should format FLOAT', () => { - expect(formatMeasure(0.0, 'FLOAT')).toBe('0.0'); - expect(formatMeasure(1.0, 'FLOAT')).toBe('1.0'); - expect(formatMeasure(1.3, 'FLOAT')).toBe('1.3'); - expect(formatMeasure(1.34, 'FLOAT')).toBe('1.34'); - expect(formatMeasure(50.89, 'FLOAT')).toBe('50.89'); - expect(formatMeasure(100.0, 'FLOAT')).toBe('100.0'); - expect(formatMeasure(123.456, 'FLOAT')).toBe('123.456'); - expect(formatMeasure(123456.7, 'FLOAT')).toBe('123,456.7'); - expect(formatMeasure(1234567890.0, 'FLOAT')).toBe('1,234,567,890.0'); - }); - - it('should respect FLOAT precision', () => { - expect(formatMeasure(0.1, 'FLOAT')).toBe('0.1'); - expect(formatMeasure(0.12, 'FLOAT')).toBe('0.12'); - expect(formatMeasure(0.12345, 'FLOAT')).toBe('0.12345'); - expect(formatMeasure(0.123456, 'FLOAT')).toBe('0.12346'); - }); - - it('should format PERCENT', () => { - expect(formatMeasure(0.0, 'PERCENT')).toBe('0.0%'); - expect(formatMeasure(1.0, 'PERCENT')).toBe('1.0%'); - expect(formatMeasure(1.3, 'PERCENT')).toBe('1.3%'); - expect(formatMeasure(1.34, 'PERCENT')).toBe('1.3%'); - expect(formatMeasure(50.89, 'PERCENT')).toBe('50.9%'); - expect(formatMeasure(100.0, 'PERCENT')).toBe('100%'); - expect(formatMeasure(50.89, 'PERCENT', { decimals: 0 })).toBe('50.9%'); - expect(formatMeasure(50.89, 'PERCENT', { decimals: 1 })).toBe('50.9%'); - expect(formatMeasure(50.89, 'PERCENT', { decimals: 2 })).toBe('50.89%'); - expect(formatMeasure(50.89, 'PERCENT', { decimals: 3 })).toBe('50.890%'); - expect(formatMeasure(50, 'PERCENT', { decimals: 0, omitExtraDecimalZeros: true })).toBe( - '50.0%' - ); - expect(formatMeasure(50, 'PERCENT', { decimals: 1, omitExtraDecimalZeros: true })).toBe( - '50.0%' - ); - expect(formatMeasure(50, 'PERCENT', { decimals: 3, omitExtraDecimalZeros: true })).toBe( - '50.0%' - ); - expect(formatMeasure(50.89, 'PERCENT', { decimals: 3, omitExtraDecimalZeros: true })).toBe( - '50.89%' - ); - }); - - it('should format WORK_DUR', () => { - expect(formatMeasure(0, 'WORK_DUR')).toBe('0'); - expect(formatMeasure(5 * ONE_DAY, 'WORK_DUR')).toBe('5d'); - expect(formatMeasure(2 * ONE_HOUR, 'WORK_DUR')).toBe('2h'); - expect(formatMeasure(40 * ONE_MINUTE, 'WORK_DUR')).toBe('40min'); - expect(formatMeasure(ONE_MINUTE, 'WORK_DUR')).toBe('1min'); - expect(formatMeasure(5 * ONE_DAY + 2 * ONE_HOUR, 'WORK_DUR')).toBe('5d 2h'); - expect(formatMeasure(2 * ONE_HOUR + ONE_MINUTE, 'WORK_DUR')).toBe('2h 1min'); - expect(formatMeasure(5 * ONE_DAY + 2 * ONE_HOUR + ONE_MINUTE, 'WORK_DUR')).toBe('5d 2h'); - expect(formatMeasure(15 * ONE_DAY + 2 * ONE_HOUR + ONE_MINUTE, 'WORK_DUR')).toBe('15d'); - expect(formatMeasure(-5 * ONE_DAY, 'WORK_DUR')).toBe('-5d'); - expect(formatMeasure(-2 * ONE_HOUR, 'WORK_DUR')).toBe('-2h'); - expect(formatMeasure(-1 * ONE_MINUTE, 'WORK_DUR')).toBe('-1min'); - }); - - it('should format SHORT_WORK_DUR', () => { - expect(formatMeasure(0, 'SHORT_WORK_DUR')).toBe('0'); - expect(formatMeasure(5 * ONE_DAY, 'SHORT_WORK_DUR')).toBe('5d'); - expect(formatMeasure(2 * ONE_HOUR, 'SHORT_WORK_DUR')).toBe('2h'); - expect(formatMeasure(ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('1min'); - expect(formatMeasure(40 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('40min'); - expect(formatMeasure(58 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('1h'); - expect(formatMeasure(5 * ONE_DAY + 2 * ONE_HOUR, 'SHORT_WORK_DUR')).toBe('5d'); - expect(formatMeasure(2 * ONE_HOUR + ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('2h'); - expect(formatMeasure(ONE_HOUR + 55 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('2h'); - expect(formatMeasure(3 * ONE_DAY + 6 * ONE_HOUR, 'SHORT_WORK_DUR')).toBe('4d'); - expect(formatMeasure(7 * ONE_HOUR + 59 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('1d'); - expect(formatMeasure(5 * ONE_DAY + 2 * ONE_HOUR + ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('5d'); - expect(formatMeasure(15 * ONE_DAY + 2 * ONE_HOUR + ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('15d'); - expect(formatMeasure(7 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('7min'); - expect(formatMeasure(-5 * ONE_DAY, 'SHORT_WORK_DUR')).toBe('-5d'); - expect(formatMeasure(-2 * ONE_HOUR, 'SHORT_WORK_DUR')).toBe('-2h'); - expect(formatMeasure(-1 * ONE_MINUTE, 'SHORT_WORK_DUR')).toBe('-1min'); - - expect(formatMeasure(1529 * ONE_DAY, 'SHORT_WORK_DUR')).toBe('1.5kd'); - expect(formatMeasure(1234567 * ONE_DAY, 'SHORT_WORK_DUR')).toBe('1.2Md'); - expect(formatMeasure(12345670 * ONE_DAY + 4 * ONE_HOUR, 'SHORT_WORK_DUR')).toBe('12Md'); - }); - - it('should format RATING', () => { - expect(formatMeasure(1, 'RATING')).toBe('A'); - expect(formatMeasure(2, 'RATING')).toBe('B'); - expect(formatMeasure(3, 'RATING')).toBe('C'); - expect(formatMeasure(4, 'RATING')).toBe('D'); - expect(formatMeasure(5, 'RATING')).toBe('E'); - }); - - it('should format LEVEL', () => { - expect(formatMeasure('ERROR', 'LEVEL')).toBe('Error'); - expect(formatMeasure('WARN', 'LEVEL')).toBe('Warning'); - expect(formatMeasure('OK', 'LEVEL')).toBe('Ok'); - expect(formatMeasure('UNKNOWN', 'LEVEL')).toBe('UNKNOWN'); - }); - - it('should format MILLISEC', () => { - expect(formatMeasure(0, 'MILLISEC')).toBe('0ms'); - expect(formatMeasure(1, 'MILLISEC')).toBe('1ms'); - expect(formatMeasure(173, 'MILLISEC')).toBe('173ms'); - expect(formatMeasure(3649, 'MILLISEC')).toBe('4s'); - expect(formatMeasure(893481, 'MILLISEC')).toBe('15min'); - expect(formatMeasure(17862325, 'MILLISEC')).toBe('298min'); - }); - - it('should not format unknown type', () => { - expect(formatMeasure('random value', 'RANDOM_TYPE')).toBe('random value'); - }); - - it('should return null if value is empty string', () => { - expect(formatMeasure('', 'PERCENT')).toBe(''); - }); - - it('should not fail with undefined', () => { - expect(formatMeasure(undefined, 'INT')).toBe(''); - }); -}); - -describe('getMinDecimalsCountToBeDistinctFromThreshold', () => { - it('should return default if no threshold', () => { - expect(getMinDecimalsCountToBeDistinctFromThreshold(2.67, undefined)).toBe(1); - }); - - it('should return 1 if delta is 0', () => { - expect(getMinDecimalsCountToBeDistinctFromThreshold(2.5, 2.5)).toBe(1); - }); - - it('should return 1 if the delta is larger than 0.1', () => { - [0.1, 0.15, 0.2, 0.5, 0.8, 1].forEach(delta => { - expect(getMinDecimalsCountToBeDistinctFromThreshold(2.5 + delta, 2.5)).toBe(1); - expect(getMinDecimalsCountToBeDistinctFromThreshold(2.5 - delta, 2.5)).toBe(1); - }); - }); - - it('should return enough precision to see the delta', () => { - expect(getMinDecimalsCountToBeDistinctFromThreshold(2.55, 2.5)).toBe(2); - expect(getMinDecimalsCountToBeDistinctFromThreshold(2.505, 2.5)).toBe(3); - expect(getMinDecimalsCountToBeDistinctFromThreshold(2.5005, 2.5)).toBe(4); - expect(getMinDecimalsCountToBeDistinctFromThreshold(85.01, 85)).toBe(2); - expect(getMinDecimalsCountToBeDistinctFromThreshold(84.95, 85)).toBe(2); - expect(getMinDecimalsCountToBeDistinctFromThreshold(84.999999999999554, 85)).toBe( - '9999999999995'.length - ); - expect(getMinDecimalsCountToBeDistinctFromThreshold(85.0000000000000954, 85)).toBe( - '00000000000009'.length - ); - expect(getMinDecimalsCountToBeDistinctFromThreshold(85.00000000000000009, 85)).toBe(1); - }); -}); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/urls-test.ts b/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/urls-test.ts deleted file mode 100644 index 113838447bd..00000000000 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/__tests__/urls-test.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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 Initializer from '../init'; -import { getPathUrlAsString, getReturnUrl, isRelativeUrl } from '../urls'; - -const SIMPLE_COMPONENT_KEY = 'sonarqube'; -const COMPLEX_COMPONENT_KEY = 'org.sonarsource.sonarqube:sonarqube'; -const COMPLEX_COMPONENT_KEY_ENCODED = encodeURIComponent(COMPLEX_COMPONENT_KEY); - -afterEach(() => { - Initializer.setUrlContext(''); -}); - -describe('#getPathUrlAsString', () => { - it('should return component url', () => { - expect( - getPathUrlAsString({ pathname: '/dashboard', query: { id: SIMPLE_COMPONENT_KEY } }) - ).toBe('/dashboard?id=' + SIMPLE_COMPONENT_KEY); - }); - - it('should encode component key', () => { - expect( - getPathUrlAsString({ pathname: '/dashboard', query: { id: COMPLEX_COMPONENT_KEY } }) - ).toBe('/dashboard?id=' + COMPLEX_COMPONENT_KEY_ENCODED); - }); - - it('should take baseUrl into account', () => { - Initializer.setUrlContext('/context'); - expect( - getPathUrlAsString({ pathname: '/dashboard', query: { id: COMPLEX_COMPONENT_KEY } }) - ).toBe('/context/dashboard?id=' + COMPLEX_COMPONENT_KEY_ENCODED); - }); -}); - -describe('#getReturnUrl', () => { - it('should get the return url', () => { - expect(getReturnUrl({ query: { return_to: '/test' } })).toBe('/test'); - expect(getReturnUrl({ query: { return_to: 'http://www.google.com' } })).toBe('/'); - expect(getReturnUrl({})).toBe('/'); - }); -}); - -describe('#isRelativeUrl', () => { - it('should check a relative url', () => { - expect(isRelativeUrl('/test')).toBe(true); - expect(isRelativeUrl('http://www.google.com')).toBe(false); - expect(isRelativeUrl('javascript:alert("test")')).toBe(false); - expect(isRelativeUrl('\\test')).toBe(false); - expect(isRelativeUrl('//test')).toBe(false); - }); -}); - -describe('#getHostUrl', () => { - beforeEach(() => { - jest.resetModules(); - }); - it('should return host url on client side', () => { - jest.mock('../init', () => ({ - getUrlContext: () => '', - IS_SSR: false - })); - const mockedUrls = require('../urls'); - expect(mockedUrls.getHostUrl()).toBe('http://localhost'); - }); - it('should throw on server-side', () => { - jest.mock('../init', () => ({ - getUrlContext: () => '', - IS_SSR: true - })); - const mockedUrls = require('../urls'); - expect(mockedUrls.getHostUrl).toThrowErrorMatchingInlineSnapshot( - `"No host url available on server side."` - ); - }); -}); diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/l10n.ts b/server/sonar-web/src/main/js/sonar-ui-common/helpers/l10n.ts deleted file mode 100644 index 7758fa52d36..00000000000 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/l10n.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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 { getLocale, getMessages } from './init'; - -export type Messages = T.Dict<string>; - -export function translate(...keys: string[]): string { - const messageKey = keys.join('.'); - const l10nMessages = getMessages(); - if (process.env.NODE_ENV === 'development' && !l10nMessages[messageKey]) { - // eslint-disable-next-line no-console - console.error(`No message for: ${messageKey}`); - } - return l10nMessages[messageKey] || messageKey; -} - -export function translateWithParameters( - messageKey: string, - ...parameters: Array<string | number> -): string { - const message = getMessages()[messageKey]; - if (message) { - return parameters - .map(parameter => String(parameter)) - .reduce((acc, parameter, index) => acc.replace(`{${index}}`, () => parameter), message); - } - if (process.env.NODE_ENV === 'development') { - // eslint-disable-next-line no-console - console.error(`No message for: ${messageKey}`); - } - return `${messageKey}.${parameters.join('.')}`; -} - -export function hasMessage(...keys: string[]): boolean { - const messageKey = keys.join('.'); - return getMessages()[messageKey] != null; -} - -export function getLocalizedMetricName( - metric: { key: string; name?: string }, - short = false -): string { - const bundleKey = `metric.${metric.key}.${short ? 'short_name' : 'name'}`; - if (hasMessage(bundleKey)) { - return translate(bundleKey); - } else if (short) { - return getLocalizedMetricName(metric); - } - return metric.name || metric.key; -} - -export function getLocalizedCategoryMetricName(metric: { key: string; name?: string }) { - const bundleKey = `metric.${metric.key}.extra_short_name`; - return hasMessage(bundleKey) ? translate(bundleKey) : getLocalizedMetricName(metric, true); -} - -export function getLocalizedMetricDomain(domainName: string) { - const bundleKey = `metric_domain.${domainName}`; - return hasMessage(bundleKey) ? translate(bundleKey) : domainName; -} - -export function getCurrentLocale() { - return getLocale(); -} - -export function getShortMonthName(index: number) { - const months = [ - 'Jan', - 'Feb', - 'Mar', - 'Apr', - 'May', - 'Jun', - 'Jul', - 'Aug', - 'Sep', - 'Oct', - 'Nov', - 'Dec' - ]; - return translate(months[index]); -} - -export function getWeekDayName(index: number) { - const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; - return weekdays[index] ? translate(weekdays[index]) : ''; -} - -export function getShortWeekDayName(index: number) { - const weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; - return weekdays[index] ? translate(weekdays[index]) : ''; -} diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/measures.ts b/server/sonar-web/src/main/js/sonar-ui-common/helpers/measures.ts deleted file mode 100644 index 80e46bd1239..00000000000 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/measures.ts +++ /dev/null @@ -1,338 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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 { getCurrentLocale, translate, translateWithParameters } from './l10n'; - -const HOURS_IN_DAY = 8; - -interface Formatter { - (value: string | number, options?: any): string; -} - -/** Format a measure value for a given type */ -export function formatMeasure( - value: string | number | undefined, - type: string, - options?: any -): string { - const formatter = getFormatter(type); - // eslint-disable-next-line react-hooks/rules-of-hooks - return useFormatter(value, formatter, options); -} - -/** Return a localized metric name */ -export function localizeMetric(metricKey: string): string { - return translate('metric', metricKey, 'name'); -} - -/** Return corresponding "short" for better display in UI */ -export function getShortType(type: string): string { - if (type === 'INT') { - return 'SHORT_INT'; - } else if (type === 'WORK_DUR') { - return 'SHORT_WORK_DUR'; - } - return type; -} - -/** Check if metric is differential */ -export function isDiffMetric(metricKey: string): boolean { - return metricKey.indexOf('new_') === 0; -} - -/* - * Conditional decimal count for QualityGate-impacting measures - * (e.g. Coverage %) - * Increase the number of decimals if the value is close to the threshold - * We count the precision (number of 0's, i.e. log10 and round down) needed to show the difference - * E.g. threshold 85, value 84.9993 -> delta = 0.0007, we need 4 decimals to see the difference - * otherwise rounding will make it look like they are equal. - */ -const DEFAULT_DECIMALS = 1; -export function getMinDecimalsCountToBeDistinctFromThreshold( - value: number, - threshold: number | undefined -): number { - if (!threshold) { - return DEFAULT_DECIMALS; - } - const delta = Math.abs(threshold - value); - if (delta < 0.1 && delta > 0) { - return -Math.floor(Math.log10(delta)); - } - return DEFAULT_DECIMALS; -} - -function useFormatter( - value: string | number | undefined, - formatter: Formatter, - options?: any -): string { - return value !== undefined && value !== '' ? formatter(value, options) : ''; -} - -function getFormatter(type: string): Formatter { - const FORMATTERS: T.Dict<Formatter> = { - INT: intFormatter, - SHORT_INT: shortIntFormatter, - FLOAT: floatFormatter, - PERCENT: percentFormatter, - WORK_DUR: durationFormatter, - SHORT_WORK_DUR: shortDurationFormatter, - RATING: ratingFormatter, - LEVEL: levelFormatter, - MILLISEC: millisecondsFormatter - }; - return FORMATTERS[type] || noFormatter; -} - -function numberFormatter( - value: string | number, - minimumFractionDigits = 0, - maximumFractionDigits = minimumFractionDigits -) { - const { format } = new Intl.NumberFormat(getCurrentLocale(), { - minimumFractionDigits, - maximumFractionDigits - }); - if (typeof value === 'string') { - return format(parseFloat(value)); - } - return format(value); -} - -function noFormatter(value: string | number): string | number { - return value; -} - -function intFormatter(value: string | number): string { - return numberFormatter(value); -} - -const shortIntFormats = [ - { unit: 1e10, formatUnit: 1e9, fraction: 0, suffix: 'short_number_suffix.g' }, - { unit: 1e9, formatUnit: 1e9, fraction: 1, suffix: 'short_number_suffix.g' }, - { unit: 1e7, formatUnit: 1e6, fraction: 0, suffix: 'short_number_suffix.m' }, - { unit: 1e6, formatUnit: 1e6, fraction: 1, suffix: 'short_number_suffix.m' }, - { unit: 1e4, formatUnit: 1e3, fraction: 0, suffix: 'short_number_suffix.k' }, - { unit: 1e3, formatUnit: 1e3, fraction: 1, suffix: 'short_number_suffix.k' } -]; - -function shortIntFormatter( - value: string | number, - option?: { roundingFunc?: (x: number) => number } -): string { - const roundingFunc = (option && option.roundingFunc) || undefined; - if (typeof value === 'string') { - value = parseFloat(value); - } - for (let i = 0; i < shortIntFormats.length; i++) { - const { unit, formatUnit, fraction, suffix } = shortIntFormats[i]; - const nextFraction = unit / (shortIntFormats[i + 1] ? shortIntFormats[i + 1].unit / 10 : 1); - const roundedValue = numberRound(value / unit, nextFraction, roundingFunc); - if (roundedValue >= 1) { - return ( - numberFormatter( - numberRound(value / formatUnit, Math.pow(10, fraction), roundingFunc), - 0, - fraction - ) + translate(suffix) - ); - } - } - - return numberFormatter(value); -} - -function numberRound( - value: number, - fraction: number = 1000, - roundingFunc: (x: number) => number = Math.round -) { - return roundingFunc(value * fraction) / fraction; -} - -function floatFormatter(value: string | number): string { - return numberFormatter(value, 1, 5); -} - -function percentFormatter( - value: string | number, - { decimals, omitExtraDecimalZeros }: { decimals?: number; omitExtraDecimalZeros?: boolean } = {} -): string { - if (typeof value === 'string') { - value = parseFloat(value); - } - if (value === 100) { - return '100%'; - } else if (omitExtraDecimalZeros && decimals) { - // If omitExtraDecimalZeros is true, all trailing decimal 0s will be removed, - // except for the first decimal. - // E.g. for decimals=3: - // - omitExtraDecimalZeros: false, value: 45.450 => 45.450 - // - omitExtraDecimalZeros: true, value: 45.450 => 45.45 - // - omitExtraDecimalZeros: false, value: 85 => 85.000 - // - omitExtraDecimalZeros: true, value: 85 => 85.0 - return `${numberFormatter(value, 1, decimals)}%`; - } - return `${numberFormatter(value, decimals || 1)}%`; -} - -function ratingFormatter(value: string | number): string { - if (typeof value === 'string') { - value = parseInt(value, 10); - } - return String.fromCharCode(97 + value - 1).toUpperCase(); -} - -function levelFormatter(value: string | number): string { - if (typeof value === 'number') { - value = value.toString(); - } - const l10nKey = `metric.level.${value}`; - const result = translate(l10nKey); - - // if couldn't translate, return the initial value - return l10nKey !== result ? result : value; -} - -function millisecondsFormatter(value: string | number): string { - if (typeof value === 'string') { - value = parseInt(value, 10); - } - const ONE_SECOND = 1000; - const ONE_MINUTE = 60 * ONE_SECOND; - if (value >= ONE_MINUTE) { - const minutes = Math.round(value / ONE_MINUTE); - return `${minutes}min`; - } else if (value >= ONE_SECOND) { - const seconds = Math.round(value / ONE_SECOND); - return `${seconds}s`; - } - return `${value}ms`; -} - -/* - * Debt Formatters - */ - -function shouldDisplayDays(days: number): boolean { - return days > 0; -} - -function shouldDisplayDaysInShortFormat(days: number): boolean { - return days > 0.9; -} - -function shouldDisplayHours(days: number, hours: number): boolean { - return hours > 0 && days < 10; -} - -function shouldDisplayHoursInShortFormat(hours: number): boolean { - return hours > 0.9; -} - -function shouldDisplayMinutes(days: number, hours: number, minutes: number): boolean { - return minutes > 0 && hours < 10 && days === 0; -} - -function addSpaceIfNeeded(value: string): string { - return value.length > 0 ? `${value} ` : value; -} - -function formatDuration(isNegative: boolean, days: number, hours: number, minutes: number): string { - let formatted = ''; - if (shouldDisplayDays(days)) { - formatted += translateWithParameters('work_duration.x_days', isNegative ? -1 * days : days); - } - if (shouldDisplayHours(days, hours)) { - formatted = addSpaceIfNeeded(formatted); - formatted += translateWithParameters( - 'work_duration.x_hours', - isNegative && formatted.length === 0 ? -1 * hours : hours - ); - } - if (shouldDisplayMinutes(days, hours, minutes)) { - formatted = addSpaceIfNeeded(formatted); - formatted += translateWithParameters( - 'work_duration.x_minutes', - isNegative && formatted.length === 0 ? -1 * minutes : minutes - ); - } - return formatted; -} - -function formatDurationShort( - isNegative: boolean, - days: number, - hours: number, - minutes: number -): string { - if (shouldDisplayDaysInShortFormat(days)) { - const roundedDays = Math.round(days); - const formattedDays = formatMeasure(isNegative ? -1 * roundedDays : roundedDays, 'SHORT_INT'); - return translateWithParameters('work_duration.x_days', formattedDays); - } - - if (shouldDisplayHoursInShortFormat(hours)) { - const roundedHours = Math.round(hours); - const formattedHours = formatMeasure( - isNegative ? -1 * roundedHours : roundedHours, - 'SHORT_INT' - ); - return translateWithParameters('work_duration.x_hours', formattedHours); - } - - const formattedMinutes = formatMeasure(isNegative ? -1 * minutes : minutes, 'SHORT_INT'); - return translateWithParameters('work_duration.x_minutes', formattedMinutes); -} - -function durationFormatter(value: string | number): string { - if (typeof value === 'string') { - value = parseInt(value, 10); - } - if (value === 0) { - return '0'; - } - const hoursInDay = HOURS_IN_DAY; - const isNegative = value < 0; - const absValue = Math.abs(value); - const days = Math.floor(absValue / hoursInDay / 60); - let remainingValue = absValue - days * hoursInDay * 60; - const hours = Math.floor(remainingValue / 60); - remainingValue -= hours * 60; - return formatDuration(isNegative, days, hours, remainingValue); -} - -function shortDurationFormatter(value: string | number): string { - if (typeof value === 'string') { - value = parseInt(value, 10); - } - if (value === 0) { - return '0'; - } - const hoursInDay = HOURS_IN_DAY; - const isNegative = value < 0; - const absValue = Math.abs(value); - const days = absValue / hoursInDay / 60; - let remainingValue = absValue - Math.floor(days) * hoursInDay * 60; - const hours = remainingValue / 60; - remainingValue -= Math.floor(hours) * 60; - return formatDurationShort(isNegative, days, hours, remainingValue); -} diff --git a/server/sonar-web/src/main/js/sonar-ui-common/helpers/urls.ts b/server/sonar-web/src/main/js/sonar-ui-common/helpers/urls.ts deleted file mode 100644 index 296091d7b3c..00000000000 --- a/server/sonar-web/src/main/js/sonar-ui-common/helpers/urls.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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. - */ -/* - * SonarQube - * 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 { isNil, omitBy } from 'lodash'; -import { stringify } from 'querystring'; -import { getUrlContext, IS_SSR } from './init'; - -interface Query { - [x: string]: string | undefined; -} - -export interface Location { - pathname: string; - query?: Query; -} - -export function getBaseUrl(): string { - return getUrlContext(); -} - -export function getHostUrl(): string { - if (IS_SSR) { - throw new Error('No host url available on server side.'); - } - return window.location.origin + getBaseUrl(); -} - -export function getPathUrlAsString(path: Location, internal = true): string { - return `${internal ? getBaseUrl() : getHostUrl()}${path.pathname}?${stringify( - omitBy(path.query, isNil) - )}`; -} - -export function getReturnUrl(location: { hash?: string; query?: { return_to?: string } }) { - const returnTo = location.query && location.query['return_to']; - if (isRelativeUrl(returnTo)) { - return returnTo + (location.hash ? location.hash : ''); - } - return getBaseUrl() + '/'; -} - -export function isRelativeUrl(url?: string): boolean { - const regex = new RegExp(/^\/[^/\\]/); - return Boolean(url && regex.test(url)); -} diff --git a/server/sonar-web/src/main/js/types/extension.ts b/server/sonar-web/src/main/js/types/extension.ts index 57c9d181ae0..960671480af 100644 --- a/server/sonar-web/src/main/js/types/extension.ts +++ b/server/sonar-web/src/main/js/types/extension.ts @@ -20,7 +20,7 @@ import { InjectedIntl } from 'react-intl'; import { Store as ReduxStore } from 'redux'; import { Location, Router } from '../components/hoc/withRouter'; -import { Theme } from '../sonar-ui-common/components/theme'; +import { Theme } from '../components/theme'; import { Store } from '../store/rootReducer'; import { L10nBundle } from './l10n'; |