diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2021-08-19 12:49:11 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-08-20 20:03:09 +0000 |
commit | 6f17541395dcedb52fe54e7755be95f2e5941086 (patch) | |
tree | ce3d742aee2af87e018c193c97eea5e7fc81a4e5 /server/sonar-web/src/main/js/app/components | |
parent | 4ce76b5cde3ee915a6c45bfa452e0c7c61c642a5 (diff) | |
download | sonarqube-6f17541395dcedb52fe54e7755be95f2e5941086.tar.gz sonarqube-6f17541395dcedb52fe54e7755be95f2e5941086.zip |
SONAR-15297 Move all code from sonar-ui-common back to respective sonar-web folders
Diffstat (limited to 'server/sonar-web/src/main/js/app/components')
88 files changed, 253 insertions, 266 deletions
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', () => { |