import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
import { BranchParameters } from '~sonar-aligned/types/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { post, RequestData } from '../helpers/request';
-import {
- ComponentQualifier,
- TreeComponent,
- TreeComponentWithPath,
- Visibility,
-} from '../types/component';
+import { TreeComponent, TreeComponentWithPath, Visibility } from '../types/component';
import {
ComponentMeasure,
Dict,
*/
import { HttpStatusCode } from 'axios';
import { cloneDeep, countBy, pick, trim } from 'lodash';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { RuleDescriptionSections } from '../../apps/coding-rules/rule';
import { mapRestRuleToRule } from '../../apps/coding-rules/utils';
import { getStandards } from '../../helpers/security-standard';
mockRuleRepository,
} from '../../helpers/testMocks';
import { RuleRepository, SearchRulesResponse } from '../../types/coding-rules';
-import { ComponentQualifier, Visibility } from '../../types/component';
+import { Visibility } from '../../types/component';
import { RawIssuesResponse } from '../../types/issues';
import { RuleStatus, SearchRulesQuery } from '../../types/rules';
import { SecurityStandard } from '../../types/security';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { chunk, cloneDeep, remove, uniq } from 'lodash';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import {
mockPermission,
mockPermissionGroup,
mockPermissionUser,
} from '../../helpers/mocks/permissions';
import { PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE } from '../../helpers/permissions';
-import { ComponentQualifier, Visibility } from '../../types/component';
+import { Visibility } from '../../types/component';
import { Permissions } from '../../types/permissions';
import { Permission, PermissionGroup, PermissionTemplate, PermissionUser } from '../../types/types';
import { BaseSearchProjectsParameters } from '../components';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { cloneDeep } from 'lodash';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockProject } from '../../helpers/mocks/projects';
-import { ComponentQualifier, Visibility } from '../../types/component';
+import { Visibility } from '../../types/component';
import { SettingsKey } from '../../types/settings';
import {
Project,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { times } from 'lodash';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockComponent } from '../../../helpers/mocks/component';
import {
mockDuplicatedFile,
mockSourceLine,
mockSourceViewerFile,
} from '../../../helpers/mocks/sources';
-import { ComponentQualifier } from '../../../types/component';
import {
Component,
Dict,
/* eslint-disable local-rules/use-metrickey-enum */
-import { ComponentQualifier, Visibility } from '../../../types/component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { Visibility } from '../../../types/component';
import { ComponentRaw } from '../../components';
export function mockProjects(): ComponentRaw[] {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { cloneDeep } from 'lodash';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockComponent } from '../../../helpers/mocks/component';
import { mockWebhook, mockWebhookDelivery } from '../../../helpers/mocks/webhook';
-import { ComponentQualifier } from '../../../types/component';
import { WebhookDelivery, WebhookResponse } from '../../../types/webhook';
import {
WEBHOOK_GLOBAL_1,
*/
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { post, postJSON } from '../helpers/request';
-import { ComponentQualifier, Visibility } from '../types/component';
+import { Visibility } from '../types/component';
import { Paging } from '../types/types';
export interface BaseSearchProjectsParameters {
import { Helmet } from 'react-helmet-async';
import { Outlet } from 'react-router-dom';
import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { validateProjectAlmBinding } from '../../api/alm-settings';
import { getTasksForComponent } from '../../api/ce';
import { getComponentData } from '../../api/components';
import { useBranchesQuery } from '../../queries/branch';
import { ProjectAlmBindingConfigurationErrors } from '../../types/alm-settings';
import { Branch } from '../../types/branch-like';
-import { ComponentQualifier, isFile, isPortfolioLike } from '../../types/component';
+import { isFile, isPortfolioLike } from '../../types/component';
import { Feature } from '../../types/features';
import { Task, TaskStatuses, TaskTypes } from '../../types/tasks';
import { Component } from '../../types/types';
import React, { useContext } from 'react';
import { Route } from 'react-router-dom';
import * as withRouter from '~sonar-aligned/components/hoc/withRouter';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { validateProjectAlmBinding } from '../../../api/alm-settings';
import { getTasksForComponent } from '../../../api/ce';
import { getComponentData } from '../../../api/components';
import { renderAppRoutes, renderComponent } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { getProjectUrl, getPullRequestUrl } from '../../../helpers/urls';
-import { ComponentQualifier, Visibility } from '../../../types/component';
+import { Visibility } from '../../../types/component';
import { TaskStatuses, TaskTypes } from '../../../types/tasks';
import handleRequiredAuthorization from '../../utils/handleRequiredAuthorization';
import ComponentContainer, { isSameBranch } from '../ComponentContainer';
import { render, screen } from '@testing-library/react';
import * as React from 'react';
import { MemoryRouter, Route, Routes } from 'react-router-dom';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockComponent } from '../../../helpers/mocks/component';
-import { ComponentContextShape, ComponentQualifier } from '../../../types/component';
+import { ComponentContextShape } from '../../../types/component';
import { Component } from '../../../types/types';
import NonAdminPagesContainer from '../NonAdminPagesContainer';
import { ComponentContext } from '../componentContext/ComponentContext';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { get, remove, save } from '../../../helpers/storage';
-import { ComponentQualifier } from '../../../types/component';
import RecentHistory, { History } from '../RecentHistory';
jest.mock('../../../helpers/storage', () => ({
*/
import * as React from 'react';
import { getWrappedDisplayName } from '~sonar-aligned/components/hoc/utils';
-import { ComponentContextShape, ComponentQualifier } from '../../../types/component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentContextShape } from '../../../types/component';
import { ComponentContext } from './ComponentContext';
export default function withComponentContext<P extends Partial<ComponentContextShape>>(
RadioButton,
} from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { createApplication } from '../../../api/application';
import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';
import { translate } from '../../../helpers/l10n';
-import { ComponentQualifier, Visibility } from '../../../types/component';
+import { Visibility } from '../../../types/component';
interface Props {
onClose: () => void;
import { debounce, uniqBy } from 'lodash';
import * as React from 'react';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Router } from '~sonar-aligned/types/router';
import { getSuggestions } from '../../../api/components';
import FocusOutHandler from '../../../components/controls/FocusOutHandler';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { getKeyboardShortcutEnabled } from '../../../helpers/preferences';
import { getComponentOverviewUrl } from '../../../helpers/urls';
-import { ComponentQualifier } from '../../../types/component';
import { Dict } from '../../../types/types';
import RecentHistory from '../RecentHistory';
import GlobalSearchResult from './GlobalSearchResult';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { sortBy } from 'lodash';
-import { ComponentQualifier } from '../../../../js/types/component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
const ORDER = [
ComponentQualifier.Portfolio,
*/
import { TopBar } from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import NCDAutoUpdateMessage from '../../../../components/new-code-definition/NCDAutoUpdateMessage';
import { translate } from '../../../../helpers/l10n';
import { withBranchLikes } from '../../../../queries/branch';
import { ProjectAlmBindingConfigurationErrors } from '../../../../types/alm-settings';
import { Branch } from '../../../../types/branch-like';
-import { ComponentQualifier } from '../../../../types/component';
import { Feature } from '../../../../types/features';
import { Component } from '../../../../types/types';
import RecentHistory from '../../RecentHistory';
import { useLocation } from '~sonar-aligned/components/hoc/withRouter';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
import { BranchParameters } from '~sonar-aligned/types/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { DEFAULT_ISSUES_QUERY } from '../../../../components/shared/utils';
import { isPullRequest } from '../../../../helpers/branch-like';
import { hasMessage, translate, translateWithParameters } from '../../../../helpers/l10n';
import { getPortfolioUrl, getProjectQueryUrl } from '../../../../helpers/urls';
import { useBranchesQuery } from '../../../../queries/branch';
-import {
- ComponentQualifier,
- isApplication,
- isPortfolioLike,
- isProject,
-} from '../../../../types/component';
+import { isApplication, isPortfolioLike, isProject } from '../../../../types/component';
import { Feature } from '../../../../types/features';
import { Component, Dict, Extension } from '../../../../types/types';
import withAvailableFeatures, {
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock';
import BranchesServiceMock from '../../../../../api/mocks/BranchesServiceMock';
import { mockProjectAlmBindingConfigurationErrors } from '../../../../../helpers/mocks/alm-settings';
import { mockComponent } from '../../../../../helpers/mocks/component';
import { renderApp } from '../../../../../helpers/testReactTestingUtils';
-import { ComponentQualifier } from '../../../../../types/component';
import ComponentNav, { ComponentNavProps } from '../ComponentNav';
const branchesHandler = new BranchesServiceMock();
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock';
import BranchesServiceMock from '../../../../../api/mocks/BranchesServiceMock';
import { mockMainBranch, mockPullRequest } from '../../../../../helpers/mocks/branch-like';
import { mockCurrentUser, mockLoggedInUser } from '../../../../../helpers/testMocks';
import { renderApp } from '../../../../../helpers/testReactTestingUtils';
import { AlmKeys } from '../../../../../types/alm-settings';
-import { ComponentQualifier } from '../../../../../types/component';
import { Feature } from '../../../../../types/features';
import { Header, HeaderProps } from '../Header';
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import BranchesServiceMock from '../../../../../api/mocks/BranchesServiceMock';
import { mockComponent } from '../../../../../helpers/mocks/component';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
import { ComponentPropsType } from '../../../../../helpers/testUtils';
-import { ComponentQualifier } from '../../../../../types/component';
import { Feature } from '../../../../../types/features';
import { Menu } from '../Menu';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockBranch } from '../../../../../helpers/mocks/branch-like';
import { mockComponent } from '../../../../../helpers/mocks/component';
-import { ComponentQualifier } from '../../../../../types/component';
import { getCurrentPage } from '../utils';
describe('getCurrentPage', () => {
import styled from '@emotion/styled';
import { ButtonSecondary, Popup, PopupPlacement, PopupZLevel } from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import EscKeydownHandler from '../../../../../components/controls/EscKeydownHandler';
import FocusOutHandler from '../../../../../components/controls/FocusOutHandler';
import OutsideClickHandler from '../../../../../components/controls/OutsideClickHandler';
import { useBranchesQuery } from '../../../../../queries/branch';
-import { ComponentQualifier } from '../../../../../types/component';
import { Feature } from '../../../../../types/features';
import { Component } from '../../../../../types/types';
import withAvailableFeatures, {
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { isBranch } from '~sonar-aligned/helpers/branch-like';
import { queryToSearch } from '~sonar-aligned/helpers/urls';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Router } from '~sonar-aligned/types/router';
import {
getBrancheLikesAsTree,
import { translate } from '../../../../../helpers/l10n';
import { getBranchLikeUrl } from '../../../../../helpers/urls';
import { BranchLike, BranchLikeTree } from '../../../../../types/branch-like';
-import { ComponentQualifier } from '../../../../../types/component';
import { Component } from '../../../../../types/types';
import MenuItemList from './MenuItemList';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { isBranch } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { BranchLike } from '../../../../types/branch-like';
-import { ComponentQualifier } from '../../../../types/component';
import { Component } from '../../../../types/types';
import { HomePage } from '../../../../types/users';
import { MainMenu, MainMenuItem } from 'design-system';
import * as React from 'react';
import { NavLink } from 'react-router-dom';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { isMySet } from '../../../../apps/issues/utils';
import Link from '../../../../components/common/Link';
import { DEFAULT_ISSUES_QUERY } from '../../../../components/shared/utils';
import { translate } from '../../../../helpers/l10n';
import { getQualityGatesUrl } from '../../../../helpers/urls';
import { AppState } from '../../../../types/appstate';
-import { ComponentQualifier } from '../../../../types/component';
import { CurrentUser } from '../../../../types/users';
import withAppStateContext from '../../app-state/withAppStateContext';
import GlobalNavMore from './GlobalNavMore';
Spinner,
} from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getSuggestions } from '../../../api/components';
import { KeyboardKeys } from '../../../helpers/keycodes';
import { translate } from '../../../helpers/l10n';
-import { ComponentQualifier } from '../../../types/component';
import { NotificationProject } from '../../../types/notifications';
interface Props {
import userEvent from '@testing-library/user-event';
import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import { keyBy, omit, times } from 'lodash';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock';
import IssuesServiceMock from '../../../api/mocks/IssuesServiceMock';
import { mockMeasure } from '../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { QuerySelector, byLabelText, byRole, byText } from '../../../helpers/testSelector';
-import { ComponentQualifier } from '../../../types/component';
import { MetricKey } from '../../../types/metrics';
import { Component } from '../../../types/types';
import routes from '../routes';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getBreadcrumbs, getChildren, getComponent } from '../../../api/components';
import { mockMainBranch, mockPullRequest } from '../../../helpers/mocks/branch-like';
-import { ComponentQualifier } from '../../../types/component';
import {
addComponent,
addComponentBreadcrumbs,
*/
import * as React from 'react';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Location, Router } from '~sonar-aligned/types/router';
import withComponentContext from '../../../app/components/componentContext/withComponentContext';
import withMetricsContext from '../../../app/components/metrics/withMetricsContext';
import { CodeScope, getCodeUrl, getProjectUrl } from '../../../helpers/urls';
import { WithBranchLikesProps, useBranchesQuery } from '../../../queries/branch';
-import { ComponentQualifier, isPortfolioLike } from '../../../types/component';
+import { isPortfolioLike } from '../../../types/component';
import { Breadcrumb, Component, ComponentMeasure, Dict, Metric } from '../../../types/types';
import { addComponent, addComponentBreadcrumbs, clearBucket } from '../bucket';
import { loadMoreChildren, retrieveComponent, retrieveComponentChildren } from '../utils';
*/
import { ContentCell, NumericalCell, TableRowInteractive } from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import DateFromNow from '../../../components/intl/DateFromNow';
import { WorkspaceContext } from '../../../components/workspace/context';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier } from '../../../types/component';
import { Metric, ComponentMeasure as TypeComponentMeasure } from '../../../types/types';
import ComponentMeasure from './ComponentMeasure';
import ComponentName from './ComponentName';
import * as React from 'react';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
import { queryToSearch } from '~sonar-aligned/helpers/urls';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { translate } from '../../../helpers/l10n';
import { isDefined } from '../../../helpers/types';
import { CodeScope, getComponentOverviewUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
-import {
- ComponentQualifier,
- isApplication,
- isPortfolioLike,
- isProject,
-} from '../../../types/component';
+import { isApplication, isPortfolioLike, isProject } from '../../../types/component';
import { ComponentMeasure } from '../../../types/types';
import { mostCommonPrefix } from '../utils';
import { ContentCell, Table, TableRow } from 'design-system';
import { sortBy, times } from 'lodash';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import withKeyboardNavigation from '../../../components/hoc/withKeyboardNavigation';
import { getComponentMeasureUniqueKey } from '../../../helpers/component';
import { isDefined } from '../../../helpers/types';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier } from '../../../types/component';
import { ComponentMeasure, Metric } from '../../../types/types';
import Component from './Component';
import ComponentsEmpty from './ComponentsEmpty';
import * as React from 'react';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Location, Router } from '~sonar-aligned/types/router';
import { getTree } from '../../../api/components';
import { KeyboardKeys } from '../../../helpers/keycodes';
import { translate } from '../../../helpers/l10n';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier, isPortfolioLike, isView } from '../../../types/component';
+import { isPortfolioLike, isView } from '../../../types/component';
import { ComponentMeasure } from '../../../types/types';
interface Props {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getBreadcrumbs, getChildren, getComponent, getComponentData } from '../../api/components';
import { isPullRequest } from '../../helpers/branch-like';
import { CCT_SOFTWARE_QUALITY_METRICS, OLD_TAXONOMY_METRICS } from '../../helpers/constants';
import { BranchLike } from '../../types/branch-like';
-import { ComponentQualifier, isPortfolioLike } from '../../types/component';
+import { isPortfolioLike } from '../../types/component';
import { MetricKey } from '../../types/metrics';
import { Breadcrumb, ComponentMeasure } from '../../types/types';
import {
import userEvent from '@testing-library/user-event';
import { times } from 'lodash';
import selectEvent from 'react-select-event';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock';
import IssuesServiceMock from '../../../api/mocks/IssuesServiceMock';
import { mockMeasure, mockMetric } from '../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byTestId, byText } from '../../../helpers/testSelector';
-import { ComponentContextShape, ComponentQualifier } from '../../../types/component';
+import { ComponentContextShape } from '../../../types/component';
import { Feature } from '../../../types/features';
import { MetricKey } from '../../../types/metrics';
import routes from '../routes';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ComponentQualifier } from '../../../types/component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { MeasurePageView } from '../../../types/measures';
import { MetricKey, MetricType } from '../../../types/metrics';
import { ComponentMeasure } from '../../../types/types';
import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Location, Router } from '~sonar-aligned/types/router';
import { getMeasuresWithPeriod } from '../../../api/measures';
import { getAllMetrics } from '../../../api/metrics';
import { translate } from '../../../helpers/l10n';
import { areLeakAndOverallCCTMeasuresComputed } from '../../../helpers/measures';
import { WithBranchLikesProps, useBranchesQuery } from '../../../queries/branch';
-import { ComponentQualifier, isPortfolioLike } from '../../../types/component';
+import { isPortfolioLike } from '../../../types/component';
import { MeasurePageView } from '../../../types/measures';
import { MetricKey } from '../../../types/metrics';
import { ComponentMeasure, Dict, MeasureEnhanced, Metric, Period } from '../../../types/types';
import { Highlight, Note, themeBorder, themeColor } from 'design-system';
import * as React from 'react';
import { WrappedComponentProps, injectIntl } from 'react-intl';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import Tooltip from '../../../components/controls/Tooltip';
import DateFormatter, { longFormatterOption } from '../../../components/intl/DateFormatter';
import DateFromNow from '../../../components/intl/DateFromNow';
import DateTimeFormatter, { formatterOption } from '../../../components/intl/DateTimeFormatter';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { getNewCodePeriodDate, getNewCodePeriodLabel } from '../../../helpers/new-code-period';
-import { ComponentQualifier } from '../../../types/component';
import { NewCodeDefinitionType } from '../../../types/new-code-definition';
import { ComponentMeasure, Period } from '../../../types/types';
import { MetricsRatingBadge, RatingLabel } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import LanguageDistribution from '../../../components/charts/LanguageDistribution';
import Tooltip from '../../../components/controls/Tooltip';
import Measure from '../../../components/measure/Measure';
import { isDiffMetric } from '../../../helpers/measures';
import { getMeasureHistoryUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier } from '../../../types/component';
import { MetricKey, MetricType } from '../../../types/metrics';
import { ComponentMeasure, Metric, Period, Measure as TypeMeasure } from '../../../types/types';
import { getMetricSubnavigationName, hasFullMeasures } from '../utils';
import { Breadcrumbs, ClipboardIconButton, HoverLink } from 'design-system';
import * as React from 'react';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getBreadcrumbs } from '../../../api/components';
import { isSameBranchLike } from '../../../helpers/branch-like';
import { KeyboardKeys } from '../../../helpers/keycodes';
import { translate } from '../../../helpers/l10n';
import { collapsePath, limitComponentName } from '../../../helpers/path';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier, isProject } from '../../../types/component';
+import { isProject } from '../../../types/component';
import { ComponentMeasure, ComponentMeasureIntern } from '../../../types/types';
interface Props {
*/
import { screen } from '@testing-library/react';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockComponentMeasure } from '../../../../helpers/mocks/component';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
-import { ComponentQualifier } from '../../../../types/component';
import { Period } from '../../../../types/types';
import LeakPeriodLegend, { LeakPeriodLegendProps } from '../LeakPeriodLegend';
import { ContentCell, HoverLink, Note, QualifierIcon } from 'design-system';
import * as React from 'react';
import { To } from 'react-router-dom';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { fillBranchLike } from '../../../helpers/branch-like';
import { limitComponentName, splitPath } from '../../../helpers/path';
import { getComponentDrilldownUrlWithSelection, getProjectUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier, isApplication, isProject } from '../../../types/component';
+import { isApplication, isProject } from '../../../types/component';
import { MeasurePageView } from '../../../types/measures';
import { MetricKey } from '../../../types/metrics';
import { ComponentMeasure, ComponentMeasureEnhanced, Metric } from '../../../types/types';
*/
import { groupBy, memoize, sortBy, toPairs } from 'lodash';
import { isBranch } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { RawQuery } from '~sonar-aligned/types/router';
import { enhanceMeasure } from '../../components/measure/utils';
import { isPullRequest } from '../../helpers/branch-like';
serializeString,
} from '../../helpers/query';
import { BranchLike } from '../../types/branch-like';
-import { ComponentQualifier } from '../../types/component';
import { Domain, MeasurePageView } from '../../types/measures';
import { MetricKey, MetricType } from '../../types/metrics';
import {
import { screen, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockLoggedInUser } from '../../../helpers/testMocks';
-import { ComponentQualifier } from '../../../types/component';
import { IssueType } from '../../../types/issues';
import { NoticeType } from '../../../types/users';
import {
import styled from '@emotion/styled';
import { Badge, BranchIcon, themeBorder, themeContrast } from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { collapsePath, limitComponentName } from '../../../helpers/path';
-import { ComponentQualifier, isView } from '../../../types/component';
+import { isView } from '../../../types/component';
import { Component, Issue } from '../../../types/types';
import { getSelectedLocation } from '../utils';
import { FormattedMessage } from 'react-intl';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Location, RawQuery, Router } from '~sonar-aligned/types/router';
import { listIssues, searchIssues } from '../../../api/issues';
import { getRuleDetails } from '../../../api/rules';
import { serializeDate } from '../../../helpers/query';
import { withBranchLikes } from '../../../queries/branch';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier, isPortfolioLike, isProject } from '../../../types/component';
+import { isPortfolioLike, isProject } from '../../../types/component';
import {
ASSIGNEE_ME,
Facet,
*/
import { screen } from '@testing-library/react';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockComponent } from '../../../../helpers/mocks/component';
import { mockIssue } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
-import { ComponentQualifier } from '../../../../types/component';
import { Component, Issue } from '../../../../types/types';
import ComponentBreadcrumbs from '../ComponentBreadcrumbs';
import * as React from 'react';
import { getBranchLikeQuery, isBranch } from '~sonar-aligned/helpers/branch-like';
import { getComponentIssuesUrl } from '~sonar-aligned/helpers/urls';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { ComponentContext } from '../../../app/components/componentContext/ComponentContext';
import { useCurrentUser } from '../../../app/components/current-user/CurrentUserContext';
import { DEFAULT_ISSUES_QUERY } from '../../../components/shared/utils';
import { collapsedDirFromPath, fileFromPath } from '../../../helpers/path';
import { getBranchLikeUrl } from '../../../helpers/urls';
import { useBranchesQuery } from '../../../queries/branch';
-import { ComponentQualifier } from '../../../types/component';
import { SourceViewerFile } from '../../../types/types';
import { isLoggedIn } from '../../../types/users';
import { IssueOpenInIdeButton } from '../components/IssueOpenInIdeButton';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { sortBy } from 'lodash';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { decorateWithUnderlineFlags } from '../../../helpers/code-viewer';
import { isDefined } from '../../../helpers/types';
import { useUsersQueries } from '../../../queries/users';
-import { ComponentQualifier } from '../../../types/component';
import { ReviewHistoryElement, ReviewHistoryType } from '../../../types/security-hotspots';
import {
ExpandDirection,
*/
import { omit } from 'lodash';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { searchIssueAuthors } from '../../../api/issues';
import { translate } from '../../../helpers/l10n';
import { highlightTerm } from '../../../helpers/search';
-import { ComponentQualifier } from '../../../types/component';
import { Facet } from '../../../types/issues';
import { Component, Dict } from '../../../types/types';
import { Query } from '../utils';
import { IconProject, Spinner } from '@sonarsource/echoes-react';
import { omit } from 'lodash';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getTree, searchProjects } from '../../../api/components';
import { translate } from '../../../helpers/l10n';
import { highlightTerm } from '../../../helpers/search';
import { useProjectQuery } from '../../../queries/projects';
-import { ComponentQualifier } from '../../../types/component';
import { Facet, ReferencedComponent } from '../../../types/issues';
import { MetricKey } from '../../../types/metrics';
import { Component, Dict, Paging } from '../../../types/types';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { isBranch } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import withAppStateContext from '../../../app/components/app-state/withAppStateContext';
import { isPullRequest } from '../../../helpers/branch-like';
import { translate } from '../../../helpers/l10n';
import { AppState } from '../../../types/appstate';
import { BranchLike } from '../../../types/branch-like';
-import {
- ComponentQualifier,
- isApplication,
- isPortfolioLike,
- isProject,
- isView,
-} from '../../../types/component';
+import { isApplication, isPortfolioLike, isProject, isView } from '../../../types/component';
import {
Facet,
ReferencedComponent,
*/
import { omit } from 'lodash';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { searchIssueTags } from '../../../api/issues';
import { translate } from '../../../helpers/l10n';
import { highlightTerm } from '../../../helpers/search';
-import { ComponentQualifier } from '../../../types/component';
import { Facet } from '../../../types/issues';
import { Component, Dict } from '../../../types/types';
import { Query } from '../utils';
*/
import { screen, waitFor } from '@testing-library/react';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockComponent } from '../../../../helpers/mocks/component';
import { mockQuery } from '../../../../helpers/mocks/issues';
import { mockAppState } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
-import { ComponentQualifier } from '../../../../types/component';
import { GlobalSettingKeys } from '../../../../types/settings';
import { SidebarClass as Sidebar } from '../Sidebar';
import { sortBy } from 'lodash';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import DateTimeFormatter from '../../../components/intl/DateTimeFormatter';
-import { ComponentQualifier } from '../../../types/component';
import {
AnalysisMeasuresVariations,
ProjectAnalysisEventCategory,
import { sortBy, uniq } from 'lodash';
import * as React from 'react';
import { getBranchLikeQuery, isMainBranch } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getApplicationDetails, getApplicationLeak } from '../../../api/application';
import { getMeasuresWithPeriodAndMetrics } from '../../../api/measures';
import { getProjectActivity } from '../../../api/projectActivity';
import { isDefined } from '../../../helpers/types';
import { ApplicationPeriod } from '../../../types/application';
import { Branch, BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier } from '../../../types/component';
import { MetricKey } from '../../../types/metrics';
import { Analysis, GraphType, MeasureHistory } from '../../../types/project-activity';
import { QualityGateStatus, QualityGateStatusCondition } from '../../../types/quality-gates';
} from 'design-system';
import * as React from 'react';
import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import A11ySkipTarget from '../../../components/a11y/A11ySkipTarget';
import AnalysisMissingInfoMessage from '../../../components/shared/AnalysisMissingInfoMessage';
import { parseDate } from '../../../helpers/dates';
import { CodeScope } from '../../../helpers/urls';
import { ApplicationPeriod } from '../../../types/application';
import { Branch } from '../../../types/branch-like';
-import { ComponentQualifier, isPortfolioLike } from '../../../types/component';
+import { isPortfolioLike } from '../../../types/component';
import { Analysis, GraphType, MeasureHistory } from '../../../types/project-activity';
import { QualityGateStatus } from '../../../types/quality-gates';
import { Component, MeasureEnhanced, Metric, Period, QualityGate } from '../../../types/types';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { queryToSearch } from '~sonar-aligned/helpers/urls';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext';
import DismissableAlert from '../../../components/ui/DismissableAlert';
import { translate } from '../../../helpers/l10n';
import { useProjectBindingQuery } from '../../../queries/devops-integration';
-import { ComponentQualifier } from '../../../types/component';
import { Component } from '../../../types/types';
import { CurrentUser, isLoggedIn } from '../../../types/users';
import { PULL_REQUEST_DECORATION_BINDING_CATEGORY } from '../../settings/constants';
import { FormattedMessage } from 'react-intl';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
import { queryToSearch } from '~sonar-aligned/helpers/urls';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import DocumentationLink from '../../../components/common/DocumentationLink';
import { Image } from '../../../components/common/Image';
import { translate } from '../../../helpers/l10n';
import { CodeScope } from '../../../helpers/urls';
import { Branch } from '../../../types/branch-like';
-import { ComponentQualifier } from '../../../types/component';
import { NewCodeDefinitionType } from '../../../types/new-code-definition';
import { Component, Period } from '../../../types/types';
import { FlagMessage } from 'design-system';
import * as React from 'react';
import { isMainBranch } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getBranchLikeDisplayName } from '../../../helpers/branch-like';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier } from '../../../types/component';
import { MetricKey } from '../../../types/metrics';
import { Component, MeasureEnhanced } from '../../../types/types';
*/
import { BasicSeparator, Card, Spinner } from 'design-system';
import * as React from 'react';
-import { ComponentQualifier, isApplication } from '../../../types/component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { isApplication } from '../../../types/component';
import { QualityGateStatus } from '../../../types/quality-gates';
import { CaycStatus, Component, QualityGate } from '../../../types/types';
import IgnoredConditionWarning from '../components/IgnoredConditionWarning';
import { ButtonLink, FlagMessage, LightLabel, Tabs } from 'design-system';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import DocumentationLink from '../../../components/common/DocumentationLink';
import { translate } from '../../../helpers/l10n';
import { isDiffMetric } from '../../../helpers/measures';
import { CodeScope } from '../../../helpers/urls';
import { ApplicationPeriod } from '../../../types/application';
-import { ComponentQualifier } from '../../../types/component';
import { Analysis, ProjectAnalysisEventCategory } from '../../../types/project-activity';
import { QualityGateStatus } from '../../../types/quality-gates';
import { Component, Period } from '../../../types/types';
*/
import { screen, waitFor } from '@testing-library/react';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import AlmSettingsServiceMock from '../../../../api/mocks/AlmSettingsServiceMock';
import ApplicationServiceMock from '../../../../api/mocks/ApplicationServiceMock';
import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { SoftwareImpactSeverity, SoftwareQuality } from '../../../../types/clean-code-taxonomy';
-import { ComponentQualifier } from '../../../../types/component';
import { MetricKey } from '../../../../types/metrics';
import { ProjectAnalysisEventCategory } from '../../../../types/project-activity';
import { CaycStatus } from '../../../../types/types';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { AppStateContext } from '../../../app/components/app-state/AppStateContext';
import Link from '../../../components/common/Link';
import { translate, translateWithParameters } from '../../../helpers/l10n';
-import { ComponentQualifier } from '../../../types/component';
import { Task } from '../../../types/tasks';
import { useLicenseIsValid } from './useLicenseIsValid';
import * as React from 'react';
import { Navigate } from 'react-router-dom';
import { isBranch, isMainBranch } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getScannableProjects } from '../../../api/components';
import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext';
import { getBranchLikeDisplayName } from '../../../helpers/branch-like';
import { hasGlobalPermission } from '../../../helpers/users';
import { useTaskForComponentQuery } from '../../../queries/component';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier } from '../../../types/component';
import { Permissions } from '../../../types/permissions';
import { TaskTypes } from '../../../types/tasks';
import { Component } from '../../../types/types';
*/
import { screen, waitFor } from '@testing-library/react';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getScannableProjects } from '../../../../api/components';
import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock';
import ComputeEngineServiceMock from '../../../../api/mocks/ComputeEngineServiceMock';
import { mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { getProjectTutorialLocation } from '../../../../helpers/urls';
-import { ComponentQualifier } from '../../../../types/component';
import { TaskStatuses, TaskTypes } from '../../../../types/tasks';
import { App } from '../App';
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock';
import { fetchQualityGate, getQualityGateProjectStatus } from '../../../../api/quality-gates';
import CurrentUserContextProvider from '../../../../app/components/current-user/CurrentUserContextProvider';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole } from '../../../../helpers/testSelector';
import { ComponentPropsType } from '../../../../helpers/testUtils';
-import { ComponentQualifier } from '../../../../types/component';
import { MetricKey, MetricType } from '../../../../types/metrics';
import { CaycStatus } from '../../../../types/types';
import { NoticeType } from '../../../../types/users';
import userEvent from '@testing-library/user-event';
import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import { uniq } from 'lodash';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import GithubProvisioningServiceMock from '../../../../api/mocks/GithubProvisioningServiceMock';
import PermissionsServiceMock from '../../../../api/mocks/PermissionsServiceMock';
import { mockPermissionGroup, mockPermissionUser } from '../../../../helpers/mocks/permissions';
import { mockAppState } from '../../../../helpers/testMocks';
import { renderAppWithAdminContext } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
-import { ComponentQualifier } from '../../../../types/component';
import { Feature } from '../../../../types/features';
import { Permissions } from '../../../../types/permissions';
import { PermissionGroup, PermissionUser } from '../../../../types/types';
import { without } from 'lodash';
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import * as api from '../../../../api/permissions';
import withAppStateContext, {
WithAppStateContextProps,
convertToPermissionDefinitions,
filterPermissions,
} from '../../../../helpers/permissions';
-import { ComponentQualifier } from '../../../../types/component';
import { Paging, PermissionGroup, PermissionUser } from '../../../../types/types';
import '../../styles.css';
import PageHeader from './PageHeader';
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { without } from 'lodash';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import PermissionsServiceMock from '../../../../../api/mocks/PermissionsServiceMock';
import { mockPermissionGroup, mockPermissionUser } from '../../../../../helpers/mocks/permissions';
import { PERMISSIONS_ORDER_GLOBAL } from '../../../../../helpers/permissions';
import { mockAppState } from '../../../../../helpers/testMocks';
import { renderAppRoutes } from '../../../../../helpers/testReactTestingUtils';
import { AppState } from '../../../../../types/appstate';
-import { ComponentQualifier } from '../../../../../types/component';
import { Permissions } from '../../../../../types/permissions';
import { PermissionGroup, PermissionUser } from '../../../../../types/types';
import { globalPermissionsRoutes } from '../../../routes';
*/
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock';
import GithubProvisioningServiceMock from '../../../../../api/mocks/GithubProvisioningServiceMock';
import PermissionsServiceMock from '../../../../../api/mocks/PermissionsServiceMock';
renderAppWithComponentContext,
} from '../../../../../helpers/testReactTestingUtils';
import { AlmKeys } from '../../../../../types/alm-settings';
-import {
- ComponentContextShape,
- ComponentQualifier,
- Visibility,
-} from '../../../../../types/component';
+import { ComponentContextShape, Visibility } from '../../../../../types/component';
import { Feature } from '../../../../../types/features';
import { Permissions } from '../../../../../types/permissions';
import { Component, PermissionGroup, PermissionUser, Provider } from '../../../../../types/types';
import { toShortISO8601String } from '../../../helpers/dates';
import { translate } from '../../../helpers/l10n';
-import { ComponentQualifier } from '../../../types/component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { ParsedAnalysis } from '../../../types/project-activity';
import { AnalysesByDay, Query, activityQueryChanged, getAnalysesByVersionByDay } from '../utils';
import ProjectActivityAnalysis, { BaselineMarker } from './ProjectActivityAnalysis';
} from 'design-system';
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import A11ySkipTarget from '../../../components/a11y/A11ySkipTarget';
import Suggestions from '../../../components/embed-docs-modal/Suggestions';
import { translate } from '../../../helpers/l10n';
-import { ComponentQualifier } from '../../../types/component';
import { MeasureHistory, ParsedAnalysis } from '../../../types/project-activity';
import { Component, Metric } from '../../../types/types';
import { Query } from '../utils';
*/
import { InputSelect, LabelValueSelectOption } from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { translate } from '../../../helpers/l10n';
-import { ComponentQualifier, isPortfolioLike } from '../../../types/component';
+import { isPortfolioLike } from '../../../types/component';
import {
ApplicationAnalysisEventCategory,
ProjectAnalysisEventCategory,
import { keyBy, times } from 'lodash';
import React from 'react';
import { Route } from 'react-router-dom';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import ApplicationServiceMock from '../../../../api/mocks/ApplicationServiceMock';
import { ProjectActivityServiceMock } from '../../../../api/mocks/ProjectActivityServiceMock';
import { TimeMachineServiceMock } from '../../../../api/mocks/TimeMachineServiceMock';
import { mockMetric } from '../../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byTestId, byText } from '../../../../helpers/testSelector';
-import { ComponentQualifier } from '../../../../types/component';
import { MetricKey, MetricType } from '../../../../types/metrics';
import {
ApplicationAnalysisEventCategory,
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { deleteApplication } from '../../../api/application';
import { deletePortfolio, deleteProject } from '../../../api/project-management';
import { ComponentContext } from '../../../app/components/componentContext/ComponentContext';
import { mockComponent } from '../../../helpers/mocks/component';
import { renderApp } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
-import { ComponentContextShape, ComponentQualifier } from '../../../types/component';
+import { ComponentContextShape } from '../../../types/component';
import { Component } from '../../../types/types';
import App from '../App';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { screen } from '@testing-library/react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
import CodingRulesServiceMock from '../../../api/mocks/CodingRulesServiceMock';
import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock';
import { mockCurrentUser, mockLoggedInUser, mockMeasure } from '../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { byRole } from '../../../helpers/testSelector';
-import { ComponentQualifier, Visibility } from '../../../types/component';
+import { Visibility } from '../../../types/component';
import { MetricKey } from '../../../types/metrics';
import { Component } from '../../../types/types';
import { CurrentUser } from '../../../types/users';
import classNames from 'classnames';
import { BasicSeparator, SubTitle } from 'design-system';
import React, { PropsWithChildren, useEffect, useState } from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getProjectLinks } from '../../../api/projectLinks';
import { translate } from '../../../helpers/l10n';
-import { ComponentQualifier, Visibility } from '../../../types/component';
+import { Visibility } from '../../../types/component';
import { Component, Measure, ProjectLink } from '../../../types/types';
import MetaDescription from './components/MetaDescription';
import MetaKey from './components/MetaKey';
import { DrilldownLink, Note, SizeIndicator, SubHeading } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { translate, translateWithParameters } from '../../../../helpers/l10n';
import { localizeMetric } from '../../../../helpers/measures';
import { getComponentDrilldownUrl } from '../../../../helpers/urls';
-import { ComponentQualifier } from '../../../../types/component';
import { MetricKey, MetricType } from '../../../../types/metrics';
import { Component, Measure } from '../../../../types/types';
import { MultiSelector, SubHeading, Tags } from 'design-system';
import { difference, without } from 'lodash';
import React, { useEffect, useState } from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { searchProjectTags, setApplicationTags, setProjectTags } from '../../../../api/components';
import Tooltip from '../../../../components/controls/Tooltip';
import { PopupPlacement } from '../../../../components/ui/popups';
import { translate } from '../../../../helpers/l10n';
-import { ComponentQualifier } from '../../../../types/component';
import { Component } from '../../../../types/types';
interface Props {
*/
import { screen } from '@testing-library/react';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
-import { ComponentQualifier } from '../../../../../types/component';
import MetaKey from '../MetaKey';
it('should render correctly', () => {
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { setApplicationTags, setProjectTags } from '../../../../../api/components';
import { mockComponent } from '../../../../../helpers/mocks/component';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
-import { ComponentQualifier } from '../../../../../types/component';
import { Component } from '../../../../../types/types';
import MetaTags from '../MetaTags';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import selectEvent from 'react-select-event';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getProjectBadgesToken } from '../../../../api/project-badges';
import { mockBranch } from '../../../../helpers/mocks/branch-like';
import { mockComponent } from '../../../../helpers/mocks/component';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { Location } from '../../../../helpers/urls';
-import { ComponentQualifier } from '../../../../types/component';
import { MetricKey } from '../../../../types/metrics';
import ProjectBadges, { ProjectBadgesProps } from '../ProjectBadges';
import { BadgeType } from '../utils';
import { Helmet } from 'react-helmet-async';
import { useSearchParams } from 'react-router-dom';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Location, RawQuery, Router } from '~sonar-aligned/types/router';
import { searchProjects } from '../../../api/components';
import withAppStateContext from '../../../app/components/app-state/withAppStateContext';
import { get, save } from '../../../helpers/storage';
import { isDefined } from '../../../helpers/types';
import { AppState } from '../../../types/appstate';
-import { ComponentQualifier } from '../../../types/component';
import { MetricKey } from '../../../types/metrics';
import { CurrentUser, isLoggedIn } from '../../../types/users';
import { Query, hasFilterParams, parseUrlQuery } from '../query';
import * as React from 'react';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { throwGlobalError } from '~sonar-aligned/helpers/error';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Router } from '~sonar-aligned/types/router';
import { getComponentNavigation } from '../../../api/navigation';
import withAppStateContext from '../../../app/components/app-state/withAppStateContext';
import { getComponentAdminUrl, getComponentOverviewUrl } from '../../../helpers/urls';
import { hasGlobalPermission } from '../../../helpers/users';
import { AppState } from '../../../types/appstate';
-import { ComponentQualifier } from '../../../types/component';
import { Permissions } from '../../../types/permissions';
import { LoggedInUser } from '../../../types/users';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { AutoSizerProps } from 'react-virtualized';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { ProjectsServiceMock } from '../../../../api/mocks/ProjectsServiceMock';
import { save } from '../../../../helpers/storage';
import { mockAppState, mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderAppRoutes } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
-import { ComponentQualifier } from '../../../../types/component';
import { MetricKey } from '../../../../types/metrics';
import { Dict } from '../../../../types/types';
import projectRoutes from '../../routes';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { queryToSearch } from '~sonar-aligned/helpers/urls';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { createApplication } from '../../../../api/application';
import { getComponentNavigation } from '../../../../api/navigation';
import { mockAppState, mockLoggedInUser, mockRouter } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
-import { ComponentQualifier, Visibility } from '../../../../types/component';
+import { Visibility } from '../../../../types/component';
import { FCProps } from '../../../../types/misc';
import { LoggedInUser } from '../../../../types/users';
import { ApplicationCreation } from '../ApplicationCreation';
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getAlmSettings } from '../../../../api/alm-settings';
import CurrentUserContextProvider from '../../../../app/components/current-user/CurrentUserContextProvider';
import { mockAppState, mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { AlmKeys } from '../../../../types/alm-settings';
-import { ComponentQualifier } from '../../../../types/component';
import { FCProps } from '../../../../types/misc';
import { CurrentUser } from '../../../../types/users';
import PageHeader from '../PageHeader';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import Favorite from '../../../../components/controls/Favorite';
import Tooltip from '../../../../components/controls/Tooltip';
import DateFromNow from '../../../../components/intl/DateFromNow';
import { translate, translateWithParameters } from '../../../../helpers/l10n';
import { isDefined } from '../../../../helpers/types';
import { getProjectUrl } from '../../../../helpers/urls';
-import { ComponentQualifier } from '../../../../types/component';
import { MetricKey, MetricType } from '../../../../types/metrics';
import { Status } from '../../../../types/types';
import { CurrentUser, isLoggedIn } from '../../../../types/users';
RatingLabel,
} from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import Measure from '../../../../components/measure/Measure';
import { duplicationRatingConverter } from '../../../../components/measure/utils';
import { translate } from '../../../../helpers/l10n';
import { formatRating } from '../../../../helpers/measures';
import { isDefined } from '../../../../helpers/types';
-import { ComponentQualifier } from '../../../../types/component';
import { MetricKey, MetricType } from '../../../../types/metrics';
import { Dict } from '../../../../types/types';
import ProjectCardMeasure from './ProjectCardMeasure';
*/
import { screen } from '@testing-library/react';
import React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockCurrentUser, mockLoggedInUser } from '../../../../../helpers/testMocks';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
-import { ComponentQualifier, Visibility } from '../../../../../types/component';
+import { Visibility } from '../../../../../types/component';
import { MetricKey } from '../../../../../types/metrics';
import { CurrentUser } from '../../../../../types/users';
import { Project } from '../../../types';
import { screen } from '@testing-library/react';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
-import { ComponentQualifier } from '../../../../../types/component';
import { MetricKey } from '../../../../../types/metrics';
import { Dict } from '../../../../../types/types';
import ProjectCardMeasures, { ProjectCardMeasuresProps } from '../ProjectCardMeasures';
*/
import { FacetBox, FacetItem } from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { RawQuery } from '~sonar-aligned/types/router';
import { translate } from '../../../helpers/l10n';
import { isDefined } from '../../../helpers/types';
-import { ComponentQualifier } from '../../../types/component';
import { FacetItemsList } from '../../issues/sidebar/FacetItemsList';
import { formatFacetStat } from '../../issues/utils';
import { Facet } from '../types';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { RawQuery } from '~sonar-aligned/types/router';
-import { ComponentQualifier } from '../../types/component';
import { Dict } from '../../types/types';
type Level = 'ERROR' | 'WARN' | 'OK';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ComponentQualifier, Visibility } from '../../types/component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { Visibility } from '../../types/component';
import { Dict } from '../../types/types';
export interface Project {
import { Checkbox, LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react';
import { ActionCell, Badge, ContentCell, Note, TableRow } from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Project } from '../../api/project-management';
import PrivacyBadgeContainer from '../../components/common/PrivacyBadgeContainer';
import Tooltip from '../../components/controls/Tooltip';
import { translate, translateWithParameters } from '../../helpers/l10n';
import { getComponentOverviewUrl } from '../../helpers/urls';
import { useGithubProvisioningEnabledQuery } from '../../queries/identity-provider/github';
-import { ComponentQualifier } from '../../types/component';
import { LoggedInUser } from '../../types/users';
import ProjectRowActions from './ProjectRowActions';
import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import selectEvent from 'react-select-event';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import GithubProvisioningServiceMock from '../../../api/mocks/GithubProvisioningServiceMock';
import PermissionsServiceMock from '../../../api/mocks/PermissionsServiceMock';
import ProjectManagementServiceMock from '../../../api/mocks/ProjectsManagementServiceMock';
import { RenderContext, renderAppWithAdminContext } from '../../../helpers/testReactTestingUtils';
import { byPlaceholderText, byRole, byText } from '../../../helpers/testSelector';
import { AppState } from '../../../types/appstate';
-import { ComponentQualifier } from '../../../types/component';
import { Feature } from '../../../types/features';
import { Permissions } from '../../../types/permissions';
import { GlobalSettingKeys } from '../../../types/settings';
import * as React from 'react';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Location, Router } from '~sonar-aligned/types/router';
import { getMeasures } from '../../api/measures';
import { getSecurityHotspotList, getSecurityHotspots } from '../../api/security-hotspots';
import { getStandards } from '../../helpers/security-standard';
import { withBranchLikes } from '../../queries/branch';
import { BranchLike } from '../../types/branch-like';
-import { ComponentQualifier } from '../../types/component';
import { MetricKey } from '../../types/metrics';
import { SecurityStandard, Standards } from '../../types/security';
import {
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
import { isBranch } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import A11ySkipTarget from '../../components/a11y/A11ySkipTarget';
import Suggestions from '../../components/embed-docs-modal/Suggestions';
import { translate } from '../../helpers/l10n';
import useFollowScroll from '../../hooks/useFollowScroll';
import { BranchLike } from '../../types/branch-like';
-import { ComponentQualifier } from '../../types/component';
import { MetricKey } from '../../types/metrics';
import { SecurityStandard, Standards } from '../../types/security';
import { HotspotFilters, HotspotStatusFilter, RawHotspot } from '../../types/security-hotspots';
import ListFooter from '../../../components/controls/ListFooter';
import Tooltip from '../../../components/controls/Tooltip';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { translate } from '../../../helpers/l10n';
import { fileFromPath } from '../../../helpers/path';
-import { ComponentQualifier } from '../../../types/component';
import { SecurityStandard, Standards } from '../../../types/security';
import { RawHotspot } from '../../../types/security-hotspots';
import { SECURITY_STANDARD_RENDERER } from '../utils';
import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext';
import { LinkHighlight, LinkStandalone } from '@sonarsource/echoes-react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { translate } from '../../../helpers/l10n';
import { collapsedDirFromPath, fileFromPath } from '../../../helpers/path';
import { getBranchLikeUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier } from '../../../types/component';
import { Hotspot } from '../../../types/security-hotspots';
import { Component } from '../../../types/types';
import { CurrentUser, isLoggedIn } from '../../../types/users';
import { intersection } from 'lodash';
import * as React from 'react';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import {
getComponentData,
getComponentForSourceViewer,
import { translate } from '../../helpers/l10n';
import { HttpStatus } from '../../helpers/request';
import { BranchLike } from '../../types/branch-like';
-import { ComponentQualifier } from '../../types/component';
import {
Dict,
DuplicatedFile,
getComponentIssuesUrl,
getComponentSecurityHotspotsUrl,
} from '~sonar-aligned/helpers/urls';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { SOFTWARE_QUALITIES } from '../../helpers/constants';
import {
ISSUETYPE_METRIC_KEYS_MAP,
import { isDefined } from '../../helpers/types';
import { getBranchLikeUrl, getCodeUrl } from '../../helpers/urls';
import type { BranchLike } from '../../types/branch-like';
-import { ComponentQualifier } from '../../types/component';
import { IssueType } from '../../types/issues';
import { MetricKey, MetricType } from '../../types/metrics';
import type { Measure, SourceViewerFile } from '../../types/types';
} from 'design-system';
import { groupBy, sortBy } from 'lodash';
import React, { Fragment, PureComponent } from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { isPullRequest } from '../../../helpers/branch-like';
import { translate } from '../../../helpers/l10n';
import { collapsedDirFromPath, fileFromPath } from '../../../helpers/path';
import { getProjectUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier } from '../../../types/component';
import { Dict, DuplicatedFile, DuplicationBlock, SourceViewerFile } from '../../../types/types';
import { WorkspaceContextShape } from '../../workspace/context';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockMainBranch } from '../../../../helpers/mocks/branch-like';
import { mockRawIssue } from '../../../../helpers/testMocks';
-import { ComponentQualifier } from '../../../../types/component';
import { IssueStatus, IssueType } from '../../../../types/issues';
import loadIssues from '../loadIssues';
import { addGlobalSuccessMessage } from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import {
getReportStatus,
subscribeToEmailReport,
import { translate, translateWithParameters } from '../../helpers/l10n';
import { AppState } from '../../types/appstate';
import { Branch } from '../../types/branch-like';
-import { ComponentQualifier } from '../../types/component';
import { ComponentReportStatus } from '../../types/component-report';
import { Component } from '../../types/types';
import { CurrentUser, isLoggedIn } from '../../types/users';
import userEvent from '@testing-library/user-event';
import { addGlobalSuccessMessage } from 'design-system';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import {
getReportStatus,
subscribeToEmailReport,
import { mockComponentReportStatus } from '../../../helpers/mocks/component-report';
import { mockAppState, mockCurrentUser, mockLoggedInUser } from '../../../helpers/testMocks';
import { renderApp } from '../../../helpers/testReactTestingUtils';
-import { ComponentQualifier } from '../../../types/component';
import { ComponentReportActions } from '../ComponentReportActions';
jest.mock('design-system', () => ({
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { addFavorite, removeFavorite } from '../../../api/favorites';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
-import { ComponentQualifier } from '../../../types/component';
import Favorite from '../Favorite';
jest.mock('../../../api/favorites', () => ({
*/
import userEvent from '@testing-library/user-event';
import * as React from 'react';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { mockBranch } from '../../../helpers/mocks/branch-like';
import { get, save } from '../../../helpers/storage';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { BranchLike } from '../../../types/branch-like';
-import { ComponentQualifier } from '../../../types/component';
import Workspace, { TYPE_KEY, WorkspaceTypes } from '../Workspace';
import { WorkspaceContext } from '../context';
*/
import { searchParamsToQuery } from '~sonar-aligned/helpers/router';
import { queryToSearch } from '~sonar-aligned/helpers/urls';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { AlmKeys } from '../../types/alm-settings';
-import { ComponentQualifier } from '../../types/component';
import { IssueType } from '../../types/issues';
import { MeasurePageView } from '../../types/measures';
import { mockBranch, mockMainBranch, mockPullRequest } from '../mocks/branch-like';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { colors } from '../app/theme';
import { AlmKeys } from '../types/alm-settings';
import {
SoftwareImpactSeverity,
SoftwareQuality,
} from '../types/clean-code-taxonomy';
-import { ComponentQualifier } from '../types/component';
import {
IssueResolution,
IssueScope,
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ComponentQualifier, TreeComponent, Visibility } from '../../types/component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { TreeComponent, Visibility } from '../../types/component';
import { MetricKey } from '../../types/metrics';
import { Component, ComponentMeasure, ComponentMeasureEnhanced } from '../../types/types';
import { mockMeasureEnhanced } from '../testMocks';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Project } from '../../api/project-management';
-import { ComponentQualifier, Visibility } from '../../types/component';
+import { Visibility } from '../../types/component';
export function mockProject(overrides: Partial<Project> = {}): Project {
return {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { HotspotRatingEnum } from 'design-system';
-import { ComponentQualifier } from '../../types/component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Standards } from '../../types/security';
import {
Hotspot,
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ComponentQualifier } from '../../types/component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import {
DuplicatedFile,
Duplication,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { uniqueId } from 'lodash';
-import { ComponentQualifier } from '../../types/component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Task, TaskStatuses, TaskTypes, TaskWarning } from '../../types/tasks';
export function mockTask(overrides: Partial<Task> = {}): Task {
*/
import { omit } from 'lodash';
import { To } from 'react-router-dom';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Location, Router } from '~sonar-aligned/types/router';
import { CompareResponse } from '../api/quality-profiles';
import { RuleDescriptionSections } from '../apps/coding-rules/rule';
SoftwareQuality,
} from '../types/clean-code-taxonomy';
import { RuleRepository } from '../types/coding-rules';
-import { ComponentQualifier } from '../types/component';
import { EditionKey } from '../types/editions';
import {
IssueDeprecatedStatus,
import { getBranchLikeQuery, isBranch, isMainBranch } from '~sonar-aligned/helpers/branch-like';
import { queryToSearch } from '~sonar-aligned/helpers/urls';
import { BranchParameters } from '~sonar-aligned/types/branch-like';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { getProfilePath } from '../apps/quality-profiles/utils';
import { DEFAULT_ISSUES_QUERY } from '../components/shared/utils';
import { BranchLike } from '../types/branch-like';
-import { ComponentQualifier, isApplication, isPortfolioLike } from '../types/component';
+import { isApplication, isPortfolioLike } from '../types/component';
import { MeasurePageView } from '../types/measures';
import { GraphType } from '../types/project-activity';
import { Dict } from '../types/types';
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2024 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+export enum ComponentQualifier {
+ Application = 'APP',
+ Directory = 'DIR',
+ Developer = 'DEV',
+ File = 'FIL',
+ Portfolio = 'VW',
+ Project = 'TRK',
+ SubPortfolio = 'SVW',
+ SubProject = 'BRC',
+ TestFile = 'UTS',
+}
exports[`[Function isApplication] should work properly 1`] = `
{
"APP": true,
+ "BRC": false,
+ "DEV": false,
"DIR": false,
"FIL": false,
"SVW": false,
exports[`[Function isFile] should work properly 1`] = `
{
"APP": false,
+ "BRC": false,
+ "DEV": false,
"DIR": false,
"FIL": true,
"SVW": false,
exports[`[Function isPortfolioLike] should work properly 1`] = `
{
"APP": false,
+ "BRC": false,
+ "DEV": false,
"DIR": false,
"FIL": false,
"SVW": true,
exports[`[Function isProject] should work properly 1`] = `
{
"APP": false,
+ "BRC": false,
+ "DEV": false,
"DIR": false,
"FIL": false,
"SVW": false,
exports[`[Function isView] should work properly 1`] = `
{
"APP": true,
+ "BRC": false,
+ "DEV": false,
"DIR": false,
"FIL": false,
"SVW": true,
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import {
- ComponentQualifier,
- isApplication,
- isFile,
- isPortfolioLike,
- isProject,
- isView,
-} from '../component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { isApplication, isFile, isPortfolioLike, isProject, isView } from '../component';
it.each([[isFile], [isView], [isProject], [isApplication], [isPortfolioLike]])(
'%p should work properly',
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { Task } from './tasks';
import { Component, LightComponent } from './types';
Private = 'private',
}
-export enum ComponentQualifier {
- Application = 'APP',
- Directory = 'DIR',
- File = 'FIL',
- Portfolio = 'VW',
- Project = 'TRK',
- SubPortfolio = 'SVW',
- TestFile = 'UTS',
-}
-
export enum ProjectKeyValidationResult {
Valid = 'valid',
Empty = 'empty',
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { HotspotRatingEnum } from 'design-system';
-import { ComponentQualifier } from './component';
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { MessageFormatting } from './issues';
import { FlowLocation, IssueChangelog, IssueChangelogDiff, Paging, TextRange } from './types';
import { UserBase } from './users';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { ComponentQualifier } from '~sonar-aligned/types/component';
import { RuleDescriptionSection } from '../apps/coding-rules/rule';
import {
CleanCodeAttribute,
CleanCodeAttributeCategory,
SoftwareImpact,
} from './clean-code-taxonomy';
-import { ComponentQualifier, Visibility } from './component';
+import { Visibility } from './component';
import { IssueStatus, IssueTransition, MessageFormatting } from './issues';
import { NewCodeDefinitionType } from './new-code-definition';
import { UserActive, UserBase } from './users';