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

@@ -1,11 +1,11 @@
import React from 'react';
import intl from 'react-intl-universal';
import '../../../style/pages/Preferences/warehousesList.scss';
import '@/style/pages/Preferences/warehousesList.scss';
import WarehousesGrid from './WarehousesGrid';
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
import { compose } from 'utils';
import withDashboardActions from '@/containers/Dashboard/withDashboardActions';
import { compose } from '@/utils';
/**
* Warehouses.

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';
/**
* Warehouse actions.

View File

@@ -1,19 +0,0 @@
import React from 'react';
const WarehouseDeleteAlert = React.lazy(() =>
import('../../Alerts/Warehouses/WarehouseDeleteAlert'),
);
// const WarehouseMarkPrimaryAlert = React.lazy(() =>
// import('../../Alerts/Warehouses/WarehouseMarkPrimaryAlert'),
// );
/**
* Warehouses alerts.
*/
export default [
{ name: 'warehouse-delete', component: WarehouseDeleteAlert },
// {
// name: 'warehouse-mark-primary',
// component: WarehouseMarkPrimaryAlert,
// },
];

View File

@@ -0,0 +1,10 @@
import React from 'react';
const WarehouseDeleteAlert = React.lazy(
() => import('@/containers/Alerts/Warehouses/WarehouseDeleteAlert'),
);
/**
* Warehouses alerts.
*/
export default [{ name: 'warehouse-delete', component: WarehouseDeleteAlert }];

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 WarehousesEmptyStatus({
// #withDialogActions

View File

@@ -3,13 +3,13 @@ import intl from 'react-intl-universal';
import { Intent } from '@blueprintjs/core';
import { ContextMenu2 } from '@blueprintjs/popover2';
import { AppToaster } from 'components';
import { AppToaster } from '@/components';
import { WarehouseContextMenu, WarehousesGridItemBox } from './components';
import { useMarkWarehouseAsPrimary } from 'hooks/query';
import { useMarkWarehouseAsPrimary } from '@/hooks/query';
import withAlertsActions from '../../Alert/withAlertActions';
import withDialogActions from '../../Dialog/withDialogActions';
import { compose } from 'utils';
import withAlertsActions from '@/containers/Alert/withAlertActions';
import withDialogActions from '@/containers/Dialog/withDialogActions';
import { compose } from '@/utils';
/**
* warehouse grid item.

View File

@@ -1,12 +1,12 @@
import React from 'react';
import styled from 'styled-components';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
import { useWarehouses, useCashflowAccounts } from 'hooks/query';
import { CLASSES } from '@/constants/classes';
import { useWarehouses } from '@/hooks/query';
import { isEmpty } from 'lodash';
import { Features } from 'common';
import { useFeatureCan } from 'hooks/state';
import { Features } from '@/constants';
import { useFeatureCan } from '@/hooks/state';
const WarehousesContext = React.createContext();

View File

@@ -9,8 +9,8 @@ import {
Classes,
} from '@blueprintjs/core';
import { Icon, If } from '../../../components';
import { safeCallback } from 'utils';
import { Icon, If } from '@/components';
import { safeCallback } from '@/utils';
const WAREHOUSES_SKELETON_N = 4;

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.