chore: Refactoring all import directories to alias and all .js|.jsx renamed to be .ts|.tsx

This commit is contained in:
a.bouhuolia
2022-07-15 23:25:23 +02:00
parent cd08d0ee16
commit f00097f6c8
3846 changed files with 125197 additions and 128236 deletions

View File

@@ -4,10 +4,10 @@ import intl from 'react-intl-universal';
import BranchesDataTable from './BranchesDataTable';
import BranchesEmptyStatus from './BranchesEmptyStatus';
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
import withDashboardActions from '@/containers/Dashboard/withDashboardActions';
import { useBranchesContext } from './BranchesProvider';
import { compose } from 'utils';
import { compose } from '@/utils';
function Branches({
// #withDashboardActions

View File

@@ -1,10 +1,10 @@
import React from 'react';
import { Button, Intent } from '@blueprintjs/core';
import { Features } from 'common';
import { FeatureCan, FormattedMessage as T, Icon } from 'components';
import withDialogActions from 'containers/Dialog/withDialogActions';
import { compose } from 'utils';
import { Features } from '@/constants';
import { FeatureCan, FormattedMessage as T, Icon } from '@/components';
import withDialogActions from '@/containers/Dialog/withDialogActions';
import { compose } from '@/utils';
function BranchesActions({
//#ownProps

View File

@@ -1,16 +0,0 @@
import React from 'react';
const BranchDeleteAlert = React.lazy(() =>
import('../../Alerts/Branches/BranchDeleteAlert'),
);
// const BranchMarkPrimaryAlert = React.lazy(() =>
// import('../../Alerts/Branches/BranchMarkPrimaryAlert'),
// );
export default [
{ name: 'branch-delete', component: BranchDeleteAlert },
// {
// name: 'branch-mark-primary',
// component: BranchMarkPrimaryAlert,
// },
];

View File

@@ -0,0 +1,7 @@
import React from 'react';
const BranchDeleteAlert = React.lazy(
() => import('@/containers/Alerts/Branches/BranchDeleteAlert'),
);
export default [{ name: 'branch-delete', component: BranchDeleteAlert }];

View File

@@ -3,18 +3,17 @@ import intl from 'react-intl-universal';
import styled from 'styled-components';
import { Intent } from '@blueprintjs/core';
import 'style/pages/Preferences/branchesList.scss';
import '@/style/pages/Preferences/branchesList.scss';
import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
import { DataTable, Card, AppToaster } from 'components';
import { DataTable, Card, AppToaster, TableSkeletonRows } from '@/components';
import { useBranchesTableColumns, ActionsMenu } from './components';
import { useBranchesContext } from './BranchesProvider';
import { useMarkBranchAsPrimary } from 'hooks/query';
import { useMarkBranchAsPrimary } from '@/hooks/query';
import withDialogActions from 'containers/Dialog/withDialogActions';
import withAlertActions from 'containers/Alert/withAlertActions';
import withDialogActions from '@/containers/Dialog/withDialogActions';
import withAlertActions from '@/containers/Alert/withAlertActions';
import { compose } from 'utils';
import { compose } from '@/utils';
/**
* Branches data table.

View File

@@ -1,9 +1,9 @@
import React from 'react';
import { Button, Intent } from '@blueprintjs/core';
import { FormattedMessage as T, EmptyStatus } from '../../../components';
import withDialogActions from 'containers/Dialog/withDialogActions';
import { FormattedMessage as T, EmptyStatus } from '@/components';
import withDialogActions from '@/containers/Dialog/withDialogActions';
import { compose } from 'utils';
import { compose } from '@/utils';
function BranchesEmptyStatus({
// #withDialogActions

View File

@@ -1,9 +1,9 @@
import React from 'react';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
import { useBranches } from 'hooks/query';
import { useFeatureCan } from 'hooks/state';
import { Features } from 'common';
import { CLASSES } from '@/constants/classes';
import { useBranches } from '@/hooks/query';
import { useFeatureCan } from '@/hooks/state';
import { Features } from '@/constants';
import { isEmpty } from 'lodash';
const BranchesContext = React.createContext();

View File

@@ -2,8 +2,8 @@ import React from 'react';
import intl from 'react-intl-universal';
import { Intent, Menu, MenuDivider, MenuItem } from '@blueprintjs/core';
import { safeCallback } from 'utils';
import { Icon, If } from 'components';
import { safeCallback } from '@/utils';
import { Icon, If } from '@/components';
/**
* Context menu of Branches.

View File

@@ -1,6 +1,6 @@
import intl from 'react-intl-universal';
import { Intent } from '@blueprintjs/core';
import { AppToaster } from 'components';
import { AppToaster } from '@/components';
/**
* Handle delete errors.