diff --git a/.storybook/preview.js b/.storybook/preview.js index a989960794f2..a89c720976c9 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,16 +1,16 @@ +import {PortalProvider} from '@gorhom/portal'; import React from 'react'; import Onyx from 'react-native-onyx'; import {SafeAreaProvider} from 'react-native-safe-area-context'; -import {PortalProvider} from '@gorhom/portal'; -import './fonts.css'; import ComposeProviders from '../src/components/ComposeProviders'; import HTMLEngineProvider from '../src/components/HTMLEngineProvider'; -import OnyxProvider from '../src/components/OnyxProvider'; import {LocaleContextProvider} from '../src/components/LocaleContextProvider'; -import {KeyboardStateProvider} from '../src/components/withKeyboardState'; +import OnyxProvider from '../src/components/OnyxProvider'; import {EnvironmentProvider} from '../src/components/withEnvironment'; +import {KeyboardStateProvider} from '../src/components/withKeyboardState'; import {WindowDimensionsProvider} from '../src/components/withWindowDimensions'; import ONYXKEYS from '../src/ONYXKEYS'; +import './fonts.css'; Onyx.init({ keys: ONYXKEYS, diff --git a/assets/emojis/common.js b/assets/emojis/common.js index e8a8b15c2dd5..b7593b6e2960 100644 --- a/assets/emojis/common.js +++ b/assets/emojis/common.js @@ -1,11 +1,11 @@ import Smiley from '../images/emoji.svg'; -import AnimalsAndNature from '../images/emojiCategoryIcons/plant.svg'; +import Flags from '../images/emojiCategoryIcons/flag.svg'; import FoodAndDrink from '../images/emojiCategoryIcons/hamburger.svg'; -import TravelAndPlaces from '../images/emojiCategoryIcons/plane.svg'; -import Activities from '../images/emojiCategoryIcons/soccer-ball.svg'; import Objects from '../images/emojiCategoryIcons/light-bulb.svg'; import Symbols from '../images/emojiCategoryIcons/peace-sign.svg'; -import Flags from '../images/emojiCategoryIcons/flag.svg'; +import TravelAndPlaces from '../images/emojiCategoryIcons/plane.svg'; +import AnimalsAndNature from '../images/emojiCategoryIcons/plant.svg'; +import Activities from '../images/emojiCategoryIcons/soccer-ball.svg'; import FrequentlyUsed from '../images/history.svg'; const skinTones = [ diff --git a/index.js b/index.js index ac6b1e452a4b..2a3de088f934 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,8 @@ /** * @format */ - -import {enableLegacyWebImplementation} from 'react-native-gesture-handler'; import {AppRegistry} from 'react-native'; +import {enableLegacyWebImplementation} from 'react-native-gesture-handler'; import App from './src/App'; import Config from './src/CONFIG'; import additionalAppSetup from './src/setup'; diff --git a/jest/setup.js b/jest/setup.js index a54a90678491..38b4b55a68b3 100644 --- a/jest/setup.js +++ b/jest/setup.js @@ -1,8 +1,8 @@ -import 'setimmediate'; -import 'react-native-gesture-handler/jestSetup'; +import mockClipboard from '@react-native-clipboard/clipboard/jest/clipboard-mock'; import '@shopify/flash-list/jestSetup'; +import 'react-native-gesture-handler/jestSetup'; import * as reanimatedJestUtils from 'react-native-reanimated/src/reanimated2/jestUtils'; -import mockClipboard from '@react-native-clipboard/clipboard/jest/clipboard-mock'; +import 'setimmediate'; import setupMockImages from './setupMockImages'; setupMockImages(); diff --git a/src/App.js b/src/App.js index 27e8105c2189..bff766c1235f 100644 --- a/src/App.js +++ b/src/App.js @@ -1,32 +1,32 @@ -import '../wdyr'; +import {PortalProvider} from '@gorhom/portal'; import React from 'react'; import {LogBox} from 'react-native'; import {GestureHandlerRootView} from 'react-native-gesture-handler'; -import {SafeAreaProvider} from 'react-native-safe-area-context'; import Onyx from 'react-native-onyx'; -import {PortalProvider} from '@gorhom/portal'; import {PickerStateProvider} from 'react-native-picker-select'; +import {SafeAreaProvider} from 'react-native-safe-area-context'; +import '../wdyr'; +import ComposeProviders from './components/ComposeProviders'; import CustomStatusBar from './components/CustomStatusBar'; import ErrorBoundary from './components/ErrorBoundary'; -import Expensify from './Expensify'; +import HTMLEngineProvider from './components/HTMLEngineProvider'; import {LocaleContextProvider} from './components/LocaleContextProvider'; import OnyxProvider from './components/OnyxProvider'; -import HTMLEngineProvider from './components/HTMLEngineProvider'; import PopoverContextProvider from './components/PopoverProvider'; -import ComposeProviders from './components/ComposeProviders'; import SafeArea from './components/SafeArea'; -import * as Environment from './libs/Environment/Environment'; -import {WindowDimensionsProvider} from './components/withWindowDimensions'; -import {KeyboardStateProvider} from './components/withKeyboardState'; -import ThemeProvider from './styles/themes/ThemeProvider'; -import ThemeStylesProvider from './styles/ThemeStylesProvider'; import {CurrentReportIDContextProvider} from './components/withCurrentReportID'; import {EnvironmentProvider} from './components/withEnvironment'; -import {ReportAttachmentsProvider} from './pages/home/report/ReportAttachmentsContext'; -import * as Session from './libs/actions/Session'; +import {KeyboardStateProvider} from './components/withKeyboardState'; +import {WindowDimensionsProvider} from './components/withWindowDimensions'; +import Expensify from './Expensify'; import useDefaultDragAndDrop from './hooks/useDefaultDragAndDrop'; import OnyxUpdateManager from './libs/actions/OnyxUpdateManager'; +import * as Session from './libs/actions/Session'; +import * as Environment from './libs/Environment/Environment'; +import {ReportAttachmentsProvider} from './pages/home/report/ReportAttachmentsContext'; import {SidebarNavigationContextProvider} from './pages/home/sidebar/SidebarNavigationContext'; +import ThemeProvider from './styles/themes/ThemeProvider'; +import ThemeStylesProvider from './styles/ThemeStylesProvider'; // For easier debugging and development, when we are in web we expose Onyx to the window, so you can more easily set data into Onyx if (window && Environment.isDevelopment()) { diff --git a/src/CONFIG.ts b/src/CONFIG.ts index 8b1dab5b3d71..61e347671269 100644 --- a/src/CONFIG.ts +++ b/src/CONFIG.ts @@ -1,8 +1,8 @@ import {Platform} from 'react-native'; import Config, {NativeConfig} from 'react-native-config'; +import CONST from './CONST'; import getPlatform from './libs/getPlatform'; import * as Url from './libs/Url'; -import CONST from './CONST'; // react-native-config doesn't trim whitespace on iOS for some reason so we // add a trim() call to prevent headaches diff --git a/src/Expensify.js b/src/Expensify.js index 6010824cf275..b7e3f0f60567 100644 --- a/src/Expensify.js +++ b/src/Expensify.js @@ -1,42 +1,41 @@ -import _ from 'underscore'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; -import React, {useCallback, useState, useEffect, useRef, useLayoutEffect, useMemo} from 'react'; +import React, {useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState} from 'react'; import {AppState, Linking} from 'react-native'; import Onyx, {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import ConfirmModal from './components/ConfirmModal'; +import DeeplinkWrapper from './components/DeeplinkWrapper'; +import EmojiPicker from './components/EmojiPicker/EmojiPicker'; +import GrowlNotification from './components/GrowlNotification'; +import AppleAuthWrapper from './components/SignInButtons/AppleAuthWrapper'; +import SplashScreenHider from './components/SplashScreenHider'; +import UpdateAppModal from './components/UpdateAppModal'; +import withLocalize, {withLocalizePropTypes} from './components/withLocalize'; +import * as DemoActions from './libs/actions/DemoActions'; +import * as EmojiPickerAction from './libs/actions/EmojiPickerAction'; import * as Report from './libs/actions/Report'; -import BootSplash from './libs/BootSplash'; +import * as User from './libs/actions/User'; import * as ActiveClientManager from './libs/ActiveClientManager'; -import ONYXKEYS from './ONYXKEYS'; -import NavigationRoot from './libs/Navigation/NavigationRoot'; -import migrateOnyx from './libs/migrateOnyx'; -import PushNotification from './libs/Notification/PushNotification'; -import UpdateAppModal from './components/UpdateAppModal'; -import Visibility from './libs/Visibility'; -import GrowlNotification from './components/GrowlNotification'; +import BootSplash from './libs/BootSplash'; +import compose from './libs/compose'; import * as Growl from './libs/Growl'; -import StartupTimer from './libs/StartupTimer'; import Log from './libs/Log'; -import ConfirmModal from './components/ConfirmModal'; -import compose from './libs/compose'; -import withLocalize, {withLocalizePropTypes} from './components/withLocalize'; -import * as User from './libs/actions/User'; -import NetworkConnection from './libs/NetworkConnection'; +import migrateOnyx from './libs/migrateOnyx'; import Navigation from './libs/Navigation/Navigation'; -import PopoverReportActionContextMenu from './pages/home/report/ContextMenu/PopoverReportActionContextMenu'; -import * as ReportActionContextMenu from './pages/home/report/ContextMenu/ReportActionContextMenu'; -import SplashScreenHider from './components/SplashScreenHider'; -import AppleAuthWrapper from './components/SignInButtons/AppleAuthWrapper'; -import EmojiPicker from './components/EmojiPicker/EmojiPicker'; -import * as EmojiPickerAction from './libs/actions/EmojiPickerAction'; -import * as DemoActions from './libs/actions/DemoActions'; -import DeeplinkWrapper from './components/DeeplinkWrapper'; - +import NavigationRoot from './libs/Navigation/NavigationRoot'; +import NetworkConnection from './libs/NetworkConnection'; +import PushNotification from './libs/Notification/PushNotification'; +// eslint-disable-next-line no-unused-vars +import subscribePushNotification from './libs/Notification/PushNotification/subscribePushNotification'; +import StartupTimer from './libs/StartupTimer'; // This lib needs to be imported, but it has nothing to export since all it contains is an Onyx connection // eslint-disable-next-line no-unused-vars import UnreadIndicatorUpdater from './libs/UnreadIndicatorUpdater'; -// eslint-disable-next-line no-unused-vars -import subscribePushNotification from './libs/Notification/PushNotification/subscribePushNotification'; +import Visibility from './libs/Visibility'; +import ONYXKEYS from './ONYXKEYS'; +import PopoverReportActionContextMenu from './pages/home/report/ContextMenu/PopoverReportActionContextMenu'; +import * as ReportActionContextMenu from './pages/home/report/ContextMenu/ReportActionContextMenu'; Onyx.registerLogger(({level, message}) => { if (level === 'alert') { diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index 0f80359ddf30..9cd43badac6b 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -1,8 +1,8 @@ -import {ValueOf} from 'type-fest'; import {OnyxEntry} from 'react-native-onyx/lib/types'; -import DeepValueOf from './types/utils/DeepValueOf'; -import * as OnyxTypes from './types/onyx'; +import {ValueOf} from 'type-fest'; import CONST from './CONST'; +import * as OnyxTypes from './types/onyx'; +import DeepValueOf from './types/utils/DeepValueOf'; /** * This is a file containing constants for all the top level keys in our store diff --git a/src/components/AddPaymentMethodMenu.js b/src/components/AddPaymentMethodMenu.js index 2c3af95a3fad..252c8380b062 100644 --- a/src/components/AddPaymentMethodMenu.js +++ b/src/components/AddPaymentMethodMenu.js @@ -1,16 +1,16 @@ -import _ from 'underscore'; -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import compose from '@libs/compose'; +import Permissions from '@libs/Permissions'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as Expensicons from './Icon/Expensicons'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import compose from '../libs/compose'; -import ONYXKEYS from '../ONYXKEYS'; -import CONST from '../CONST'; -import withWindowDimensions from './withWindowDimensions'; -import Permissions from '../libs/Permissions'; import PopoverMenu from './PopoverMenu'; import refPropTypes from './refPropTypes'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; +import withWindowDimensions from './withWindowDimensions'; const propTypes = { /** Should the component be visible? */ diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index 246514f3420a..f9667807106b 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -1,26 +1,26 @@ -import _ from 'underscore'; -import React, {useEffect, useRef, useCallback} from 'react'; -import {ActivityIndicator, View} from 'react-native'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useRef} from 'react'; +import {ActivityIndicator, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import Log from '../libs/Log'; -import PlaidLink from './PlaidLink'; -import * as App from '../libs/actions/App'; -import * as BankAccounts from '../libs/actions/BankAccounts'; -import ONYXKEYS from '../ONYXKEYS'; -import styles from '../styles/styles'; -import themeColors from '../styles/themes/default'; +import _ from 'underscore'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import KeyboardShortcut from '@libs/KeyboardShortcut'; +import Log from '@libs/Log'; +import {plaidDataPropTypes} from '@pages/ReimbursementAccount/plaidDataPropTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as App from '@userActions/App'; +import * as BankAccounts from '@userActions/BankAccounts'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import FullPageOfflineBlockingView from './BlockingViews/FullPageOfflineBlockingView'; +import Icon from './Icon'; +import getBankIcon from './Icon/BankIcons'; import Picker from './Picker'; -import {plaidDataPropTypes} from '../pages/ReimbursementAccount/plaidDataPropTypes'; +import PlaidLink from './PlaidLink'; import Text from './Text'; -import getBankIcon from './Icon/BankIcons'; -import Icon from './Icon'; -import FullPageOfflineBlockingView from './BlockingViews/FullPageOfflineBlockingView'; -import CONST from '../CONST'; -import KeyboardShortcut from '../libs/KeyboardShortcut'; -import useLocalize from '../hooks/useLocalize'; -import useNetwork from '../hooks/useNetwork'; const propTypes = { /** If the user has been throttled from Plaid */ diff --git a/src/components/AddressSearch/CurrentLocationButton.js b/src/components/AddressSearch/CurrentLocationButton.js index 893ec031ab7f..326b82d31e8f 100644 --- a/src/components/AddressSearch/CurrentLocationButton.js +++ b/src/components/AddressSearch/CurrentLocationButton.js @@ -1,14 +1,14 @@ import PropTypes from 'prop-types'; import React from 'react'; import {Text} from 'react-native'; -import colors from '../../styles/colors'; -import styles from '../../styles/styles'; -import Icon from '../Icon'; -import * as Expensicons from '../Icon/Expensicons'; -import PressableWithFeedback from '../Pressable/PressableWithFeedback'; -import getButtonState from '../../libs/getButtonState'; -import * as StyleUtils from '../../styles/StyleUtils'; -import useLocalize from '../../hooks/useLocalize'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import useLocalize from '@hooks/useLocalize'; +import getButtonState from '@libs/getButtonState'; +import colors from '@styles/colors'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; const propTypes = { /** Callback that runs when location button is clicked */ diff --git a/src/components/AddressSearch/index.js b/src/components/AddressSearch/index.js index 28c61076332a..3e122e029969 100644 --- a/src/components/AddressSearch/index.js +++ b/src/components/AddressSearch/index.js @@ -1,26 +1,26 @@ -import _ from 'underscore'; -import React, {useEffect, useMemo, useRef, useState} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; -import {Keyboard, LogBox, ScrollView, View, Text, ActivityIndicator} from 'react-native'; +import React, {useEffect, useMemo, useRef, useState} from 'react'; +import {ActivityIndicator, Keyboard, LogBox, ScrollView, Text, View} from 'react-native'; import {GooglePlacesAutocomplete} from 'react-native-google-places-autocomplete'; -import lodashGet from 'lodash/get'; -import compose from '../../libs/compose'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import styles from '../../styles/styles'; -import themeColors from '../../styles/themes/default'; -import TextInput from '../TextInput'; -import * as ApiUtils from '../../libs/ApiUtils'; -import * as GooglePlacesUtils from '../../libs/GooglePlacesUtils'; -import getCurrentPosition from '../../libs/getCurrentPosition'; -import CONST from '../../CONST'; -import * as StyleUtils from '../../styles/StyleUtils'; -import isCurrentTargetInsideContainer from './isCurrentTargetInsideContainer'; -import variables from '../../styles/variables'; -import FullScreenLoadingIndicator from '../FullscreenLoadingIndicator'; -import LocationErrorMessage from '../LocationErrorMessage'; -import {withNetwork} from '../OnyxProvider'; -import networkPropTypes from '../networkPropTypes'; +import _ from 'underscore'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import LocationErrorMessage from '@components/LocationErrorMessage'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import * as ApiUtils from '@libs/ApiUtils'; +import compose from '@libs/compose'; +import getCurrentPosition from '@libs/getCurrentPosition'; +import * as GooglePlacesUtils from '@libs/GooglePlacesUtils'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; import CurrentLocationButton from './CurrentLocationButton'; +import isCurrentTargetInsideContainer from './isCurrentTargetInsideContainer'; // The error that's being thrown below will be ignored until we fork the // react-native-google-places-autocomplete repo and replace the diff --git a/src/components/AmountTextInput.js b/src/components/AmountTextInput.js index d110fe39cd6c..5899e68bedb3 100644 --- a/src/components/AmountTextInput.js +++ b/src/components/AmountTextInput.js @@ -1,9 +1,9 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import TextInput from './TextInput'; -import styles from '../styles/styles'; -import CONST from '../CONST'; +import React from 'react'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; import refPropTypes from './refPropTypes'; +import TextInput from './TextInput'; const propTypes = { /** Formatted amount in local currency */ diff --git a/src/components/AnchorForAttachmentsOnly/BaseAnchorForAttachmentsOnly.js b/src/components/AnchorForAttachmentsOnly/BaseAnchorForAttachmentsOnly.js index 46576bc62e7a..fd6c3d358a33 100644 --- a/src/components/AnchorForAttachmentsOnly/BaseAnchorForAttachmentsOnly.js +++ b/src/components/AnchorForAttachmentsOnly/BaseAnchorForAttachmentsOnly.js @@ -1,16 +1,16 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import {propTypes as anchorForAttachmentsOnlyPropTypes, defaultProps as anchorForAttachmentsOnlyDefaultProps} from './anchorForAttachmentsOnlyPropTypes'; -import CONST from '../../CONST'; -import ONYXKEYS from '../../ONYXKEYS'; -import AttachmentView from '../Attachments/AttachmentView'; -import * as Download from '../../libs/actions/Download'; -import fileDownload from '../../libs/fileDownload'; -import addEncryptedAuthTokenToURL from '../../libs/addEncryptedAuthTokenToURL'; -import {ShowContextMenuContext, showContextMenuForReport} from '../ShowContextMenuContext'; -import * as ReportUtils from '../../libs/ReportUtils'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; +import AttachmentView from '@components/Attachments/AttachmentView'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import {ShowContextMenuContext, showContextMenuForReport} from '@components/ShowContextMenuContext'; +import addEncryptedAuthTokenToURL from '@libs/addEncryptedAuthTokenToURL'; +import fileDownload from '@libs/fileDownload'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as Download from '@userActions/Download'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {defaultProps as anchorForAttachmentsOnlyDefaultProps, propTypes as anchorForAttachmentsOnlyPropTypes} from './anchorForAttachmentsOnlyPropTypes'; const propTypes = { /** Press in handler for the link */ diff --git a/src/components/AnchorForAttachmentsOnly/anchorForAttachmentsOnlyPropTypes.js b/src/components/AnchorForAttachmentsOnly/anchorForAttachmentsOnlyPropTypes.js index a17f0a27ce4d..9452e615d31c 100644 --- a/src/components/AnchorForAttachmentsOnly/anchorForAttachmentsOnlyPropTypes.js +++ b/src/components/AnchorForAttachmentsOnly/anchorForAttachmentsOnlyPropTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import stylePropTypes from '../../styles/stylePropTypes'; +import stylePropTypes from '@styles/stylePropTypes'; const propTypes = { /** The URL of the attachment */ diff --git a/src/components/AnchorForAttachmentsOnly/index.js b/src/components/AnchorForAttachmentsOnly/index.js index 1a58aa4b3ae1..1dae62e771ef 100644 --- a/src/components/AnchorForAttachmentsOnly/index.js +++ b/src/components/AnchorForAttachmentsOnly/index.js @@ -1,8 +1,8 @@ import React from 'react'; +import ControlSelection from '@libs/ControlSelection'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as anchorForAttachmentsOnlyPropTypes from './anchorForAttachmentsOnlyPropTypes'; import BaseAnchorForAttachmentsOnly from './BaseAnchorForAttachmentsOnly'; -import * as DeviceCapabilities from '../../libs/DeviceCapabilities'; -import ControlSelection from '../../libs/ControlSelection'; function AnchorForAttachmentsOnly(props) { return ( diff --git a/src/components/AnchorForAttachmentsOnly/index.native.js b/src/components/AnchorForAttachmentsOnly/index.native.js index f27aad641186..91e1b864544d 100644 --- a/src/components/AnchorForAttachmentsOnly/index.native.js +++ b/src/components/AnchorForAttachmentsOnly/index.native.js @@ -1,7 +1,7 @@ import React from 'react'; +import styles from '@styles/styles'; import * as anchorForAttachmentsOnlyPropTypes from './anchorForAttachmentsOnlyPropTypes'; import BaseAnchorForAttachmentsOnly from './BaseAnchorForAttachmentsOnly'; -import styles from '../../styles/styles'; function AnchorForAttachmentsOnly(props) { return ( diff --git a/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js b/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js index 9cfe9d893d8e..d79faf4dee9c 100644 --- a/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js +++ b/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js @@ -1,20 +1,20 @@ -import _ from 'underscore'; +import Str from 'expensify-common/lib/str'; +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useEffect} from 'react'; import {StyleSheet} from 'react-native'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; -import Str from 'expensify-common/lib/str'; -import Text from '../Text'; -import PressableWithSecondaryInteraction from '../PressableWithSecondaryInteraction'; -import * as ReportActionContextMenu from '../../pages/home/report/ContextMenu/ReportActionContextMenu'; -import * as ContextMenuActions from '../../pages/home/report/ContextMenu/ContextMenuActions'; -import Tooltip from '../Tooltip'; -import * as DeviceCapabilities from '../../libs/DeviceCapabilities'; -import styles from '../../styles/styles'; -import * as StyleUtils from '../../styles/StyleUtils'; +import _ from 'underscore'; +import PressableWithSecondaryInteraction from '@components/PressableWithSecondaryInteraction'; +import Text from '@components/Text'; +import Tooltip from '@components/Tooltip'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import * as ContextMenuActions from '@pages/home/report/ContextMenu/ContextMenuActions'; +import * as ReportActionContextMenu from '@pages/home/report/ContextMenu/ReportActionContextMenu'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; import {propTypes as anchorForCommentsOnlyPropTypes} from './anchorForCommentsOnlyPropTypes'; -import CONST from '../../CONST'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; const propTypes = { /** Press in handler for the link */ diff --git a/src/components/AnchorForCommentsOnly/anchorForCommentsOnlyPropTypes.js b/src/components/AnchorForCommentsOnly/anchorForCommentsOnlyPropTypes.js index 10b5a40c853d..6bf1d094497d 100644 --- a/src/components/AnchorForCommentsOnly/anchorForCommentsOnlyPropTypes.js +++ b/src/components/AnchorForCommentsOnly/anchorForCommentsOnlyPropTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import stylePropTypes from '../../styles/stylePropTypes'; +import stylePropTypes from '@styles/stylePropTypes'; const propTypes = { /** The URL to open */ diff --git a/src/components/AnchorForCommentsOnly/index.js b/src/components/AnchorForCommentsOnly/index.js index 6c72621deeea..24a903dca5fa 100644 --- a/src/components/AnchorForCommentsOnly/index.js +++ b/src/components/AnchorForCommentsOnly/index.js @@ -1,8 +1,8 @@ import React from 'react'; +import ControlSelection from '@libs/ControlSelection'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as anchorForCommentsOnlyPropTypes from './anchorForCommentsOnlyPropTypes'; import BaseAnchorForCommentsOnly from './BaseAnchorForCommentsOnly'; -import * as DeviceCapabilities from '../../libs/DeviceCapabilities'; -import ControlSelection from '../../libs/ControlSelection'; function AnchorForCommentsOnly(props) { return ( diff --git a/src/components/AnchorForCommentsOnly/index.native.js b/src/components/AnchorForCommentsOnly/index.native.js index 69211b75e855..b9dc74b7ba05 100644 --- a/src/components/AnchorForCommentsOnly/index.native.js +++ b/src/components/AnchorForCommentsOnly/index.native.js @@ -1,7 +1,6 @@ import React from 'react'; import {Linking} from 'react-native'; import _ from 'underscore'; - import * as anchorForCommentsOnlyPropTypes from './anchorForCommentsOnlyPropTypes'; import BaseAnchorForCommentsOnly from './BaseAnchorForCommentsOnly'; diff --git a/src/components/AnimatedStep/AnimatedStepProvider.js b/src/components/AnimatedStep/AnimatedStepProvider.js index 86d40b5bddeb..eb4797655344 100644 --- a/src/components/AnimatedStep/AnimatedStepProvider.js +++ b/src/components/AnimatedStep/AnimatedStepProvider.js @@ -1,7 +1,7 @@ -import React, {useMemo, useState} from 'react'; import PropTypes from 'prop-types'; +import React, {useMemo, useState} from 'react'; +import CONST from '@src/CONST'; import AnimatedStepContext from './AnimatedStepContext'; -import CONST from '../../CONST'; const propTypes = { children: PropTypes.node.isRequired, diff --git a/src/components/AnimatedStep/index.js b/src/components/AnimatedStep/index.js index 5b0dc8bc78fa..e916cbe1b84c 100644 --- a/src/components/AnimatedStep/index.js +++ b/src/components/AnimatedStep/index.js @@ -1,9 +1,9 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import * as Animatable from 'react-native-animatable'; -import CONST from '../../CONST'; -import styles from '../../styles/styles'; -import useNativeDriver from '../../libs/useNativeDriver'; +import useNativeDriver from '@libs/useNativeDriver'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /** Children to wrap in AnimatedStep. */ diff --git a/src/components/AnonymousReportFooter.js b/src/components/AnonymousReportFooter.js index 43933210dc0b..2dc4159d1627 100644 --- a/src/components/AnonymousReportFooter.js +++ b/src/components/AnonymousReportFooter.js @@ -1,14 +1,14 @@ -import React from 'react'; -import {View, Text} from 'react-native'; import PropTypes from 'prop-types'; -import Button from './Button'; +import React from 'react'; +import {Text, View} from 'react-native'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as Session from '@userActions/Session'; import AvatarWithDisplayName from './AvatarWithDisplayName'; +import Button from './Button'; import ExpensifyWordmark from './ExpensifyWordmark'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import reportPropTypes from '../pages/reportPropTypes'; -import styles from '../styles/styles'; -import * as Session from '../libs/actions/Session'; import participantPropTypes from './participantPropTypes'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { /** The report currently being looked at */ diff --git a/src/components/ArchivedReportFooter.js b/src/components/ArchivedReportFooter.js index 71d331b68db0..52484355a242 100644 --- a/src/components/ArchivedReportFooter.js +++ b/src/components/ArchivedReportFooter.js @@ -1,19 +1,19 @@ +import _ from 'lodash'; import lodashGet from 'lodash/get'; -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import _ from 'lodash'; -import CONST from '../CONST'; +import compose from '@libs/compose'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import Banner from './Banner'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import compose from '../libs/compose'; -import personalDetailsPropType from '../pages/personalDetailsPropType'; -import ONYXKEYS from '../ONYXKEYS'; -import * as ReportUtils from '../libs/ReportUtils'; -import reportPropTypes from '../pages/reportPropTypes'; -import * as ReportActionsUtils from '../libs/ReportActionsUtils'; -import styles from '../styles/styles'; -import * as PersonalDetailsUtils from '../libs/PersonalDetailsUtils'; const propTypes = { /** The reason this report was archived */ diff --git a/src/components/ArrowKeyFocusManager.js b/src/components/ArrowKeyFocusManager.js index b8c726e75af6..19dc3a7ac614 100644 --- a/src/components/ArrowKeyFocusManager.js +++ b/src/components/ArrowKeyFocusManager.js @@ -1,7 +1,7 @@ -import {Component} from 'react'; import PropTypes from 'prop-types'; -import CONST from '../CONST'; -import KeyboardShortcut from '../libs/KeyboardShortcut'; +import {Component} from 'react'; +import KeyboardShortcut from '@libs/KeyboardShortcut'; +import CONST from '@src/CONST'; const propTypes = { /** Children to render. */ diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js index f8c4122dddb0..8231dd7c4fe2 100755 --- a/src/components/AttachmentModal.js +++ b/src/components/AttachmentModal.js @@ -1,44 +1,44 @@ -import React, {useState, useCallback, useRef, useMemo, useEffect} from 'react'; -import PropTypes from 'prop-types'; -import {View, Animated, Keyboard} from 'react-native'; import Str from 'expensify-common/lib/str'; -import lodashGet from 'lodash/get'; import lodashExtend from 'lodash/extend'; -import _ from 'underscore'; +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {Animated, Keyboard, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import CONST from '../CONST'; -import Modal from './Modal'; -import AttachmentView from './Attachments/AttachmentView'; +import _ from 'underscore'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import addEncryptedAuthTokenToURL from '@libs/addEncryptedAuthTokenToURL'; +import compose from '@libs/compose'; +import fileDownload from '@libs/fileDownload'; +import * as FileUtils from '@libs/fileDownload/FileUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import useNativeDriver from '@libs/useNativeDriver'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import * as IOU from '@userActions/IOU'; +import * as Policy from '@userActions/Policy'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import AttachmentCarousel from './Attachments/AttachmentCarousel'; -import useLocalize from '../hooks/useLocalize'; -import styles from '../styles/styles'; -import * as StyleUtils from '../styles/StyleUtils'; -import * as FileUtils from '../libs/fileDownload/FileUtils'; -import themeColors from '../styles/themes/default'; -import compose from '../libs/compose'; -import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions'; +import AttachmentView from './Attachments/AttachmentView'; import Button from './Button'; -import HeaderWithBackButton from './HeaderWithBackButton'; -import fileDownload from '../libs/fileDownload'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; import ConfirmModal from './ConfirmModal'; import HeaderGap from './HeaderGap'; -import SafeAreaConsumer from './SafeAreaConsumer'; -import addEncryptedAuthTokenToURL from '../libs/addEncryptedAuthTokenToURL'; -import reportPropTypes from '../pages/reportPropTypes'; +import HeaderWithBackButton from './HeaderWithBackButton'; import * as Expensicons from './Icon/Expensicons'; -import useWindowDimensions from '../hooks/useWindowDimensions'; -import Navigation from '../libs/Navigation/Navigation'; -import ROUTES from '../ROUTES'; -import useNativeDriver from '../libs/useNativeDriver'; -import * as ReportActionsUtils from '../libs/ReportActionsUtils'; -import * as ReportUtils from '../libs/ReportUtils'; -import ONYXKEYS from '../ONYXKEYS'; -import * as Policy from '../libs/actions/Policy'; -import useNetwork from '../hooks/useNetwork'; -import * as IOU from '../libs/actions/IOU'; +import Modal from './Modal'; +import SafeAreaConsumer from './SafeAreaConsumer'; import transactionPropTypes from './transactionPropTypes'; -import * as TransactionUtils from '../libs/TransactionUtils'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions'; /** * Modal render prop component that exposes modal launching triggers that can be used diff --git a/src/components/AttachmentPicker/attachmentPickerPropTypes.js b/src/components/AttachmentPicker/attachmentPickerPropTypes.js index 3b6fb7d041c5..a3a346f5ea27 100644 --- a/src/components/AttachmentPicker/attachmentPickerPropTypes.js +++ b/src/components/AttachmentPicker/attachmentPickerPropTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; const propTypes = { /** diff --git a/src/components/AttachmentPicker/index.js b/src/components/AttachmentPicker/index.js index 9930fa49a909..24024eae6515 100644 --- a/src/components/AttachmentPicker/index.js +++ b/src/components/AttachmentPicker/index.js @@ -1,7 +1,7 @@ import React, {useRef} from 'react'; -import CONST from '../../CONST'; -import {propTypes, defaultProps} from './attachmentPickerPropTypes'; -import Visibility from '../../libs/Visibility'; +import Visibility from '@libs/Visibility'; +import CONST from '@src/CONST'; +import {defaultProps, propTypes} from './attachmentPickerPropTypes'; /** * Returns acceptable FileTypes based on ATTACHMENT_PICKER_TYPE diff --git a/src/components/AttachmentPicker/index.native.js b/src/components/AttachmentPicker/index.native.js index 063314a4268c..0e723d4cf048 100644 --- a/src/components/AttachmentPicker/index.native.js +++ b/src/components/AttachmentPicker/index.native.js @@ -1,23 +1,23 @@ -import _ from 'underscore'; -import React, {useState, useRef, useCallback, useMemo} from 'react'; +import lodashCompact from 'lodash/compact'; import PropTypes from 'prop-types'; -import {View, Alert} from 'react-native'; -import RNDocumentPicker from 'react-native-document-picker'; +import React, {useCallback, useMemo, useRef, useState} from 'react'; +import {Alert, View} from 'react-native'; import RNFetchBlob from 'react-native-blob-util'; -import lodashCompact from 'lodash/compact'; +import RNDocumentPicker from 'react-native-document-picker'; import {launchImageLibrary} from 'react-native-image-picker'; -import {propTypes as basePropTypes, defaultProps as baseDefaultProps} from './attachmentPickerPropTypes'; -import CONST from '../../CONST'; -import * as FileUtils from '../../libs/fileDownload/FileUtils'; -import * as Expensicons from '../Icon/Expensicons'; +import _ from 'underscore'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import Popover from '@components/Popover'; +import useArrowKeyFocusManager from '@hooks/useArrowKeyFocusManager'; +import useKeyboardShortcut from '@hooks/useKeyboardShortcut'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as FileUtils from '@libs/fileDownload/FileUtils'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import {defaultProps as baseDefaultProps, propTypes as basePropTypes} from './attachmentPickerPropTypes'; import launchCamera from './launchCamera'; -import Popover from '../Popover'; -import MenuItem from '../MenuItem'; -import styles from '../../styles/styles'; -import useLocalize from '../../hooks/useLocalize'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; -import useKeyboardShortcut from '../../hooks/useKeyboardShortcut'; -import useArrowKeyFocusManager from '../../hooks/useArrowKeyFocusManager'; const propTypes = { ...basePropTypes, diff --git a/src/components/AttachmentPicker/launchCamera.ios.js b/src/components/AttachmentPicker/launchCamera.ios.js index 7ac3708c5dd3..d6e3518d7188 100644 --- a/src/components/AttachmentPicker/launchCamera.ios.js +++ b/src/components/AttachmentPicker/launchCamera.ios.js @@ -1,5 +1,5 @@ -import {PERMISSIONS, request, RESULTS} from 'react-native-permissions'; import {launchCamera} from 'react-native-image-picker'; +import {PERMISSIONS, request, RESULTS} from 'react-native-permissions'; /** * Launching the camera for iOS involves checking for permissions diff --git a/src/components/Attachments/AttachmentCarousel/AttachmentCarouselCellRenderer.js b/src/components/Attachments/AttachmentCarousel/AttachmentCarouselCellRenderer.js index 2c698d5c8a61..673bb7c224e2 100644 --- a/src/components/Attachments/AttachmentCarousel/AttachmentCarouselCellRenderer.js +++ b/src/components/Attachments/AttachmentCarousel/AttachmentCarouselCellRenderer.js @@ -1,8 +1,8 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import {View, PixelRatio} from 'react-native'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; -import styles from '../../../styles/styles'; +import React from 'react'; +import {PixelRatio, View} from 'react-native'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import styles from '@styles/styles'; const propTypes = { /** Cell Container styles */ diff --git a/src/components/Attachments/AttachmentCarousel/CarouselActions.js b/src/components/Attachments/AttachmentCarousel/CarouselActions.js index 8861039b8501..cf5309222c4e 100644 --- a/src/components/Attachments/AttachmentCarousel/CarouselActions.js +++ b/src/components/Attachments/AttachmentCarousel/CarouselActions.js @@ -1,8 +1,8 @@ -import {useEffect} from 'react'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; -import KeyboardShortcut from '../../../libs/KeyboardShortcut'; -import CONST from '../../../CONST'; +import {useEffect} from 'react'; +import KeyboardShortcut from '@libs/KeyboardShortcut'; +import CONST from '@src/CONST'; const propTypes = { /** Callback to cycle through attachments */ diff --git a/src/components/Attachments/AttachmentCarousel/CarouselButtons.js b/src/components/Attachments/AttachmentCarousel/CarouselButtons.js index d33659fd04ae..9bef889e61a1 100644 --- a/src/components/Attachments/AttachmentCarousel/CarouselButtons.js +++ b/src/components/Attachments/AttachmentCarousel/CarouselButtons.js @@ -1,15 +1,15 @@ import PropTypes from 'prop-types'; import React from 'react'; -import _ from 'underscore'; import {View} from 'react-native'; -import * as Expensicons from '../../Icon/Expensicons'; -import Tooltip from '../../Tooltip'; -import Button from '../../Button'; -import styles from '../../../styles/styles'; -import themeColors from '../../../styles/themes/default'; -import * as AttachmentCarouselViewPropTypes from '../propTypes'; -import useLocalize from '../../../hooks/useLocalize'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; +import _ from 'underscore'; +import * as AttachmentCarouselViewPropTypes from '@components/Attachments/propTypes'; +import Button from '@components/Button'; +import * as Expensicons from '@components/Icon/Expensicons'; +import Tooltip from '@components/Tooltip'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; const propTypes = { /** Where the arrows should be visible */ diff --git a/src/components/Attachments/AttachmentCarousel/CarouselItem.js b/src/components/Attachments/AttachmentCarousel/CarouselItem.js index 2fe62a00b90f..2d271aa6d4c4 100644 --- a/src/components/Attachments/AttachmentCarousel/CarouselItem.js +++ b/src/components/Attachments/AttachmentCarousel/CarouselItem.js @@ -1,16 +1,16 @@ +import PropTypes from 'prop-types'; import React, {useContext, useState} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import CONST from '../../../CONST'; -import styles from '../../../styles/styles'; -import useLocalize from '../../../hooks/useLocalize'; -import PressableWithoutFeedback from '../../Pressable/PressableWithoutFeedback'; -import Text from '../../Text'; -import Button from '../../Button'; -import AttachmentView from '../AttachmentView'; -import SafeAreaConsumer from '../../SafeAreaConsumer'; -import ReportAttachmentsContext from '../../../pages/home/report/ReportAttachmentsContext'; -import * as AttachmentsPropTypes from '../propTypes'; +import AttachmentView from '@components/Attachments/AttachmentView'; +import * as AttachmentsPropTypes from '@components/Attachments/propTypes'; +import Button from '@components/Button'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import SafeAreaConsumer from '@components/SafeAreaConsumer'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import ReportAttachmentsContext from '@pages/home/report/ReportAttachmentsContext'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /** Attachment required information such as the source and file name */ diff --git a/src/components/Attachments/AttachmentCarousel/Pager/AttachmentCarouselPage.js b/src/components/Attachments/AttachmentCarousel/Pager/AttachmentCarouselPage.js index 580c7eaac732..2ded34829a08 100644 --- a/src/components/Attachments/AttachmentCarousel/Pager/AttachmentCarouselPage.js +++ b/src/components/Attachments/AttachmentCarousel/Pager/AttachmentCarouselPage.js @@ -1,12 +1,12 @@ /* eslint-disable es/no-optional-chaining */ +import PropTypes from 'prop-types'; import React, {useContext, useEffect, useRef, useState} from 'react'; import {ActivityIndicator, PixelRatio, StyleSheet, View} from 'react-native'; -import PropTypes from 'prop-types'; -import Image from '../../../Image'; +import * as AttachmentsPropTypes from '@components/Attachments/propTypes'; +import Image from '@components/Image'; import AttachmentCarouselPagerContext from './AttachmentCarouselPagerContext'; import ImageTransformer from './ImageTransformer'; import ImageWrapper from './ImageWrapper'; -import * as AttachmentsPropTypes from '../../propTypes'; function getCanvasFitScale({canvasWidth, canvasHeight, imageWidth, imageHeight}) { const imageScaleX = canvasWidth / imageWidth; diff --git a/src/components/Attachments/AttachmentCarousel/Pager/ImageTransformer.js b/src/components/Attachments/AttachmentCarousel/Pager/ImageTransformer.js index b1c2864a05f6..5bf8b79dae77 100644 --- a/src/components/Attachments/AttachmentCarousel/Pager/ImageTransformer.js +++ b/src/components/Attachments/AttachmentCarousel/Pager/ImageTransformer.js @@ -1,7 +1,7 @@ /* eslint-disable es/no-optional-chaining */ -import React, {useContext, useEffect, useRef, useState, useMemo} from 'react'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useContext, useEffect, useMemo, useRef, useState} from 'react'; +import {View} from 'react-native'; import {Gesture, GestureDetector} from 'react-native-gesture-handler'; import Animated, { cancelAnimation, @@ -15,7 +15,7 @@ import Animated, { withDecay, withSpring, } from 'react-native-reanimated'; -import styles from '../../../../styles/styles'; +import styles from '@styles/styles'; import AttachmentCarouselPagerContext from './AttachmentCarouselPagerContext'; import ImageWrapper from './ImageWrapper'; diff --git a/src/components/Attachments/AttachmentCarousel/Pager/ImageWrapper.js b/src/components/Attachments/AttachmentCarousel/Pager/ImageWrapper.js index a6a935bbba01..10f2ae94340a 100644 --- a/src/components/Attachments/AttachmentCarousel/Pager/ImageWrapper.js +++ b/src/components/Attachments/AttachmentCarousel/Pager/ImageWrapper.js @@ -1,9 +1,9 @@ /* eslint-disable es/no-optional-chaining */ +import PropTypes from 'prop-types'; import React from 'react'; import {StyleSheet} from 'react-native'; -import PropTypes from 'prop-types'; import Animated from 'react-native-reanimated'; -import styles from '../../../../styles/styles'; +import styles from '@styles/styles'; const imageWrapperPropTypes = { children: PropTypes.node.isRequired, diff --git a/src/components/Attachments/AttachmentCarousel/Pager/index.js b/src/components/Attachments/AttachmentCarousel/Pager/index.js index e5feaedf63b7..e4659caf24f0 100644 --- a/src/components/Attachments/AttachmentCarousel/Pager/index.js +++ b/src/components/Attachments/AttachmentCarousel/Pager/index.js @@ -1,14 +1,14 @@ /* eslint-disable es/no-optional-chaining */ -import React, {useRef, useState, useImperativeHandle, useMemo} from 'react'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; -import {GestureHandlerRootView, createNativeWrapper} from 'react-native-gesture-handler'; -import Animated, {runOnJS, useAnimatedProps, useAnimatedReaction, useEvent, useHandler, useSharedValue} from 'react-native-reanimated'; +import React, {useImperativeHandle, useMemo, useRef, useState} from 'react'; +import {View} from 'react-native'; +import {createNativeWrapper, GestureHandlerRootView} from 'react-native-gesture-handler'; import PagerView from 'react-native-pager-view'; +import Animated, {runOnJS, useAnimatedProps, useAnimatedReaction, useEvent, useHandler, useSharedValue} from 'react-native-reanimated'; import _ from 'underscore'; -import styles from '../../../../styles/styles'; +import refPropTypes from '@components/refPropTypes'; +import styles from '@styles/styles'; import AttachmentCarouselPagerContext from './AttachmentCarouselPagerContext'; -import refPropTypes from '../../../refPropTypes'; const AnimatedPagerView = Animated.createAnimatedComponent(createNativeWrapper(PagerView)); diff --git a/src/components/Attachments/AttachmentCarousel/attachmentCarouselPropTypes.js b/src/components/Attachments/AttachmentCarousel/attachmentCarouselPropTypes.js index 81f22f684243..8048773de42c 100644 --- a/src/components/Attachments/AttachmentCarousel/attachmentCarouselPropTypes.js +++ b/src/components/Attachments/AttachmentCarousel/attachmentCarouselPropTypes.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; -import reportPropTypes from '../../../pages/reportPropTypes'; -import reportActionPropTypes from '../../../pages/home/report/reportActionPropTypes'; +import reportActionPropTypes from '@pages/home/report/reportActionPropTypes'; +import reportPropTypes from '@pages/reportPropTypes'; const propTypes = { /** source is used to determine the starting index in the array of attachments */ diff --git a/src/components/Attachments/AttachmentCarousel/extractAttachmentsFromReport.js b/src/components/Attachments/AttachmentCarousel/extractAttachmentsFromReport.js index 8420a9e7831b..6f0dd335c2bb 100644 --- a/src/components/Attachments/AttachmentCarousel/extractAttachmentsFromReport.js +++ b/src/components/Attachments/AttachmentCarousel/extractAttachmentsFromReport.js @@ -1,11 +1,11 @@ import {Parser as HtmlParser} from 'htmlparser2'; -import _ from 'underscore'; import lodashGet from 'lodash/get'; -import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; -import * as TransactionUtils from '../../../libs/TransactionUtils'; -import * as ReceiptUtils from '../../../libs/ReceiptUtils'; -import CONST from '../../../CONST'; -import tryResolveUrlFromApiRoot from '../../../libs/tryResolveUrlFromApiRoot'; +import _ from 'underscore'; +import * as ReceiptUtils from '@libs/ReceiptUtils'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import tryResolveUrlFromApiRoot from '@libs/tryResolveUrlFromApiRoot'; +import CONST from '@src/CONST'; /** * Constructs the initial component state from report actions diff --git a/src/components/Attachments/AttachmentCarousel/index.js b/src/components/Attachments/AttachmentCarousel/index.js index 131c57d4c345..99a23835fd97 100644 --- a/src/components/Attachments/AttachmentCarousel/index.js +++ b/src/components/Attachments/AttachmentCarousel/index.js @@ -1,25 +1,25 @@ -import React, {useRef, useCallback, useState, useEffect} from 'react'; -import {View, FlatList, PixelRatio, Keyboard} from 'react-native'; +import React, {useCallback, useEffect, useRef, useState} from 'react'; +import {FlatList, Keyboard, PixelRatio, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import styles from '../../../styles/styles'; +import BlockingView from '@components/BlockingViews/BlockingView'; +import * as Illustrations from '@components/Icon/Illustrations'; +import withLocalize from '@components/withLocalize'; +import withWindowDimensions from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import ONYXKEYS from '@src/ONYXKEYS'; import AttachmentCarouselCellRenderer from './AttachmentCarouselCellRenderer'; +import {defaultProps, propTypes} from './attachmentCarouselPropTypes'; import CarouselActions from './CarouselActions'; -import withWindowDimensions from '../../withWindowDimensions'; import CarouselButtons from './CarouselButtons'; +import CarouselItem from './CarouselItem'; import extractAttachmentsFromReport from './extractAttachmentsFromReport'; -import {propTypes, defaultProps} from './attachmentCarouselPropTypes'; -import ONYXKEYS from '../../../ONYXKEYS'; -import withLocalize from '../../withLocalize'; -import compose from '../../../libs/compose'; import useCarouselArrows from './useCarouselArrows'; -import CarouselItem from './CarouselItem'; -import Navigation from '../../../libs/Navigation/Navigation'; -import BlockingView from '../../BlockingViews/BlockingView'; -import * as Illustrations from '../../Icon/Illustrations'; -import variables from '../../../styles/variables'; -import * as DeviceCapabilities from '../../../libs/DeviceCapabilities'; -import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; const viewabilityConfig = { // To facilitate paging through the attachments, we want to consider an item "viewable" when it is diff --git a/src/components/Attachments/AttachmentCarousel/index.native.js b/src/components/Attachments/AttachmentCarousel/index.native.js index bcea50698b3b..8c6957c9371a 100644 --- a/src/components/Attachments/AttachmentCarousel/index.native.js +++ b/src/components/Attachments/AttachmentCarousel/index.native.js @@ -1,22 +1,22 @@ import React, {useCallback, useEffect, useRef, useState} from 'react'; -import {View, Keyboard, PixelRatio} from 'react-native'; +import {Keyboard, PixelRatio, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import AttachmentCarouselPager from './Pager'; -import styles from '../../../styles/styles'; +import BlockingView from '@components/BlockingViews/BlockingView'; +import * as Illustrations from '@components/Icon/Illustrations'; +import withLocalize from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {defaultProps, propTypes} from './attachmentCarouselPropTypes'; import CarouselButtons from './CarouselButtons'; -import ONYXKEYS from '../../../ONYXKEYS'; -import {propTypes, defaultProps} from './attachmentCarouselPropTypes'; +import CarouselItem from './CarouselItem'; import extractAttachmentsFromReport from './extractAttachmentsFromReport'; +import AttachmentCarouselPager from './Pager'; import useCarouselArrows from './useCarouselArrows'; -import CarouselItem from './CarouselItem'; -import Navigation from '../../../libs/Navigation/Navigation'; -import BlockingView from '../../BlockingViews/BlockingView'; -import * as Illustrations from '../../Icon/Illustrations'; -import variables from '../../../styles/variables'; -import compose from '../../../libs/compose'; -import withLocalize from '../../withLocalize'; -import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; function AttachmentCarousel({report, reportActions, source, onNavigate, onClose, setDownloadButtonVisibility, translate}) { const pagerRef = useRef(null); diff --git a/src/components/Attachments/AttachmentCarousel/useCarouselArrows.js b/src/components/Attachments/AttachmentCarousel/useCarouselArrows.js index 64c97fa99819..0c55c3ae519d 100644 --- a/src/components/Attachments/AttachmentCarousel/useCarouselArrows.js +++ b/src/components/Attachments/AttachmentCarousel/useCarouselArrows.js @@ -1,6 +1,6 @@ import {useCallback, useEffect, useRef, useState} from 'react'; -import CONST from '../../../CONST'; -import * as DeviceCapabilities from '../../../libs/DeviceCapabilities'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import CONST from '@src/CONST'; function useCarouselArrows() { const canUseTouchScreen = DeviceCapabilities.canUseTouchScreen(); diff --git a/src/components/Attachments/AttachmentView/AttachmentViewImage/index.js b/src/components/Attachments/AttachmentView/AttachmentViewImage/index.js index 48ac954ced7f..23049915a8d9 100755 --- a/src/components/Attachments/AttachmentView/AttachmentViewImage/index.js +++ b/src/components/Attachments/AttachmentView/AttachmentViewImage/index.js @@ -1,11 +1,11 @@ import React, {memo} from 'react'; -import styles from '../../../../styles/styles'; -import ImageView from '../../../ImageView'; -import withLocalize, {withLocalizePropTypes} from '../../../withLocalize'; -import compose from '../../../../libs/compose'; -import PressableWithoutFeedback from '../../../Pressable/PressableWithoutFeedback'; -import CONST from '../../../../CONST'; -import {attachmentViewImagePropTypes, attachmentViewImageDefaultProps} from './propTypes'; +import ImageView from '@components/ImageView'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import {attachmentViewImageDefaultProps, attachmentViewImagePropTypes} from './propTypes'; const propTypes = { ...attachmentViewImagePropTypes, diff --git a/src/components/Attachments/AttachmentView/AttachmentViewImage/index.native.js b/src/components/Attachments/AttachmentView/AttachmentViewImage/index.native.js index 7334e5391bc1..faf2f21c133d 100755 --- a/src/components/Attachments/AttachmentView/AttachmentViewImage/index.native.js +++ b/src/components/Attachments/AttachmentView/AttachmentViewImage/index.native.js @@ -1,12 +1,12 @@ import React, {memo} from 'react'; -import styles from '../../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../withLocalize'; -import ImageView from '../../../ImageView'; -import compose from '../../../../libs/compose'; -import PressableWithoutFeedback from '../../../Pressable/PressableWithoutFeedback'; -import CONST from '../../../../CONST'; -import AttachmentCarouselPage from '../../AttachmentCarousel/Pager/AttachmentCarouselPage'; -import {attachmentViewImagePropTypes, attachmentViewImageDefaultProps} from './propTypes'; +import AttachmentCarouselPage from '@components/Attachments/AttachmentCarousel/Pager/AttachmentCarouselPage'; +import ImageView from '@components/ImageView'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import {attachmentViewImageDefaultProps, attachmentViewImagePropTypes} from './propTypes'; const propTypes = { ...attachmentViewImagePropTypes, diff --git a/src/components/Attachments/AttachmentView/AttachmentViewImage/propTypes.js b/src/components/Attachments/AttachmentView/AttachmentViewImage/propTypes.js index 661b940da207..184d3ae1a367 100644 --- a/src/components/Attachments/AttachmentView/AttachmentViewImage/propTypes.js +++ b/src/components/Attachments/AttachmentView/AttachmentViewImage/propTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import {attachmentViewPropTypes, attachmentViewDefaultProps} from '../propTypes'; +import {attachmentViewDefaultProps, attachmentViewPropTypes} from '@components/Attachments/AttachmentView/propTypes'; const attachmentViewImagePropTypes = { ...attachmentViewPropTypes, diff --git a/src/components/Attachments/AttachmentView/AttachmentViewPdf/index.js b/src/components/Attachments/AttachmentView/AttachmentViewPdf/index.js index 1d1de83951ee..c3d1423b17c9 100644 --- a/src/components/Attachments/AttachmentView/AttachmentViewPdf/index.js +++ b/src/components/Attachments/AttachmentView/AttachmentViewPdf/index.js @@ -1,6 +1,6 @@ import React, {memo} from 'react'; -import {attachmentViewPdfPropTypes, attachmentViewPdfDefaultProps} from './propTypes'; -import PDFView from '../../../PDFView'; +import PDFView from '@components/PDFView'; +import {attachmentViewPdfDefaultProps, attachmentViewPdfPropTypes} from './propTypes'; function AttachmentViewPdf({file, encryptedSourceUrl, isFocused, onPress, onScaleChanged, onToggleKeyboard, onLoadComplete, errorLabelStyles, style}) { return ( diff --git a/src/components/Attachments/AttachmentView/AttachmentViewPdf/index.native.js b/src/components/Attachments/AttachmentView/AttachmentViewPdf/index.native.js index fea72a3fe37a..9ab0b45f8c8f 100644 --- a/src/components/Attachments/AttachmentView/AttachmentViewPdf/index.native.js +++ b/src/components/Attachments/AttachmentView/AttachmentViewPdf/index.native.js @@ -1,7 +1,7 @@ import React, {memo, useCallback, useContext, useEffect} from 'react'; -import {attachmentViewPdfPropTypes, attachmentViewPdfDefaultProps} from './propTypes'; -import PDFView from '../../../PDFView'; -import AttachmentCarouselPagerContext from '../../AttachmentCarousel/Pager/AttachmentCarouselPagerContext'; +import AttachmentCarouselPagerContext from '@components/Attachments/AttachmentCarousel/Pager/AttachmentCarouselPagerContext'; +import PDFView from '@components/PDFView'; +import {attachmentViewPdfDefaultProps, attachmentViewPdfPropTypes} from './propTypes'; function AttachmentViewPdf({file, encryptedSourceUrl, isFocused, isUsedInCarousel, onPress, onScaleChanged: onScaleChangedProp, onToggleKeyboard, onLoadComplete, errorLabelStyles, style}) { const attachmentCarouselPagerContext = useContext(AttachmentCarouselPagerContext); diff --git a/src/components/Attachments/AttachmentView/AttachmentViewPdf/propTypes.js b/src/components/Attachments/AttachmentView/AttachmentViewPdf/propTypes.js index 07203cc2fe74..a34010f0ba8b 100644 --- a/src/components/Attachments/AttachmentView/AttachmentViewPdf/propTypes.js +++ b/src/components/Attachments/AttachmentView/AttachmentViewPdf/propTypes.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; -import * as AttachmentsPropTypes from '../../propTypes'; -import stylePropTypes from '../../../../styles/stylePropTypes'; +import * as AttachmentsPropTypes from '@components/Attachments/propTypes'; +import stylePropTypes from '@styles/stylePropTypes'; const attachmentViewPdfPropTypes = { /** File object maybe be instance of File or Object */ diff --git a/src/components/Attachments/AttachmentView/index.js b/src/components/Attachments/AttachmentView/index.js index 66d7b2fa89d6..98086dcc4a0c 100755 --- a/src/components/Attachments/AttachmentView/index.js +++ b/src/components/Attachments/AttachmentView/index.js @@ -1,29 +1,29 @@ -import React, {memo, useState} from 'react'; -import {View, ScrollView, ActivityIndicator} from 'react-native'; -import _ from 'underscore'; -import PropTypes from 'prop-types'; import Str from 'expensify-common/lib/str'; +import PropTypes from 'prop-types'; +import React, {memo, useState} from 'react'; +import {ActivityIndicator, ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import styles from '../../../styles/styles'; -import Icon from '../../Icon'; -import * as Expensicons from '../../Icon/Expensicons'; -import withLocalize, {withLocalizePropTypes} from '../../withLocalize'; -import compose from '../../../libs/compose'; -import Text from '../../Text'; -import Tooltip from '../../Tooltip'; -import themeColors from '../../../styles/themes/default'; -import variables from '../../../styles/variables'; +import _ from 'underscore'; +import DistanceEReceipt from '@components/DistanceEReceipt'; +import EReceipt from '@components/EReceipt'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import Text from '@components/Text'; +import Tooltip from '@components/Tooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import useNetwork from '@hooks/useNetwork'; +import addEncryptedAuthTokenToURL from '@libs/addEncryptedAuthTokenToURL'; +import compose from '@libs/compose'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import cursor from '@styles/utilities/cursor'; +import variables from '@styles/variables'; +import ONYXKEYS from '@src/ONYXKEYS'; import AttachmentViewImage from './AttachmentViewImage'; import AttachmentViewPdf from './AttachmentViewPdf'; -import addEncryptedAuthTokenToURL from '../../../libs/addEncryptedAuthTokenToURL'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import {attachmentViewPropTypes, attachmentViewDefaultProps} from './propTypes'; -import * as TransactionUtils from '../../../libs/TransactionUtils'; -import DistanceEReceipt from '../../DistanceEReceipt'; -import useNetwork from '../../../hooks/useNetwork'; -import ONYXKEYS from '../../../ONYXKEYS'; -import EReceipt from '../../EReceipt'; -import cursor from '../../../styles/utilities/cursor'; +import {attachmentViewDefaultProps, attachmentViewPropTypes} from './propTypes'; const propTypes = { ...attachmentViewPropTypes, diff --git a/src/components/Attachments/AttachmentView/propTypes.js b/src/components/Attachments/AttachmentView/propTypes.js index 71ae3639b61c..0c7c8814267f 100644 --- a/src/components/Attachments/AttachmentView/propTypes.js +++ b/src/components/Attachments/AttachmentView/propTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import * as AttachmentsPropTypes from '../propTypes'; +import * as AttachmentsPropTypes from '@components/Attachments/propTypes'; const attachmentViewPropTypes = { /** Whether source url requires authentication */ diff --git a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js index 7ba1e51bcdd3..c024b025c80e 100644 --- a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js +++ b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js @@ -1,12 +1,12 @@ import React, {useEffect, useRef} from 'react'; -import Animated, {Easing, FadeOutDown, useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; // We take FlatList from this package to properly handle the scrolling of AutoCompleteSuggestions in chats since one scroll is nested inside another import {FlatList} from 'react-native-gesture-handler'; -import styles from '../../styles/styles'; -import * as StyleUtils from '../../styles/StyleUtils'; -import CONST from '../../CONST'; +import Animated, {Easing, FadeOutDown, useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; import {propTypes} from './autoCompleteSuggestionsPropTypes'; -import PressableWithFeedback from '../Pressable/PressableWithFeedback'; /** * @param {Number} numRows diff --git a/src/components/AutoCompleteSuggestions/index.js b/src/components/AutoCompleteSuggestions/index.js index 9234d04f4507..30654caf5708 100644 --- a/src/components/AutoCompleteSuggestions/index.js +++ b/src/components/AutoCompleteSuggestions/index.js @@ -1,11 +1,11 @@ import React from 'react'; -import {View} from 'react-native'; import ReactDOM from 'react-dom'; -import BaseAutoCompleteSuggestions from './BaseAutoCompleteSuggestions'; -import * as DeviceCapabilities from '../../libs/DeviceCapabilities'; +import {View} from 'react-native'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import * as StyleUtils from '@styles/StyleUtils'; import {propTypes} from './autoCompleteSuggestionsPropTypes'; -import * as StyleUtils from '../../styles/StyleUtils'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; +import BaseAutoCompleteSuggestions from './BaseAutoCompleteSuggestions'; /** * On the mobile-web platform, when long-pressing on auto-complete suggestions, diff --git a/src/components/AutoCompleteSuggestions/index.native.js b/src/components/AutoCompleteSuggestions/index.native.js index f5ff4636f395..439fa45eae78 100644 --- a/src/components/AutoCompleteSuggestions/index.native.js +++ b/src/components/AutoCompleteSuggestions/index.native.js @@ -1,7 +1,7 @@ -import React from 'react'; import {Portal} from '@gorhom/portal'; -import BaseAutoCompleteSuggestions from './BaseAutoCompleteSuggestions'; +import React from 'react'; import {propTypes} from './autoCompleteSuggestionsPropTypes'; +import BaseAutoCompleteSuggestions from './BaseAutoCompleteSuggestions'; function AutoCompleteSuggestions({measureParentContainer, ...props}) { return ( diff --git a/src/components/AutoEmailLink.js b/src/components/AutoEmailLink.js index 9f39997bce13..eece1a16ca5a 100644 --- a/src/components/AutoEmailLink.js +++ b/src/components/AutoEmailLink.js @@ -1,10 +1,10 @@ -import React from 'react'; +import {CONST} from 'expensify-common/lib/CONST'; import PropTypes from 'prop-types'; +import React from 'react'; import _ from 'underscore'; -import {CONST} from 'expensify-common/lib/CONST'; +import styles from '@styles/styles'; import Text from './Text'; import TextLink from './TextLink'; -import styles from '../styles/styles'; const propTypes = { text: PropTypes.string.isRequired, diff --git a/src/components/AutoUpdateTime.js b/src/components/AutoUpdateTime.js index e7d8b133e903..c85f14ed2c29 100644 --- a/src/components/AutoUpdateTime.js +++ b/src/components/AutoUpdateTime.js @@ -2,13 +2,13 @@ * Displays the user's local time and updates it every minute. * The time auto-update logic is extracted to this component to avoid re-rendering a more complex component, e.g. DetailsPage. */ -import {View} from 'react-native'; -import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import PropTypes from 'prop-types'; -import styles from '../styles/styles'; -import DateUtils from '../libs/DateUtils'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {View} from 'react-native'; +import DateUtils from '@libs/DateUtils'; +import styles from '@styles/styles'; import Text from './Text'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { /** Timezone of the user from their personal details */ diff --git a/src/components/Avatar.js b/src/components/Avatar.js index 4f0eb60eb2e0..546387031643 100644 --- a/src/components/Avatar.js +++ b/src/components/Avatar.js @@ -1,17 +1,17 @@ +import PropTypes from 'prop-types'; import React, {useEffect, useState} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import stylePropTypes from '../styles/stylePropTypes'; +import useNetwork from '@hooks/useNetwork'; +import * as ReportUtils from '@libs/ReportUtils'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; import Icon from './Icon'; -import themeColors from '../styles/themes/default'; -import CONST from '../CONST'; -import * as StyleUtils from '../styles/StyleUtils'; import * as Expensicons from './Icon/Expensicons'; import Image from './Image'; -import styles from '../styles/styles'; -import * as ReportUtils from '../libs/ReportUtils'; -import useNetwork from '../hooks/useNetwork'; const propTypes = { /** Source for the avatar. Can be a URL or an icon. */ diff --git a/src/components/AvatarCropModal/AvatarCropModal.js b/src/components/AvatarCropModal/AvatarCropModal.js index 10e8a76f756d..c8bd7f6f7bc8 100644 --- a/src/components/AvatarCropModal/AvatarCropModal.js +++ b/src/components/AvatarCropModal/AvatarCropModal.js @@ -2,27 +2,27 @@ import PropTypes from 'prop-types'; import React, {useCallback, useEffect, useState} from 'react'; import {ActivityIndicator, Image, View} from 'react-native'; import {GestureHandlerRootView} from 'react-native-gesture-handler'; -import {runOnUI, interpolate, useAnimatedGestureHandler, useSharedValue, useWorkletCallback} from 'react-native-reanimated'; -import CONST from '../../CONST'; -import compose from '../../libs/compose'; -import styles from '../../styles/styles'; -import themeColors from '../../styles/themes/default'; -import Button from '../Button'; -import HeaderWithBackButton from '../HeaderWithBackButton'; -import Icon from '../Icon'; -import * as Expensicons from '../Icon/Expensicons'; -import Modal from '../Modal'; -import Text from '../Text'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions'; +import {interpolate, runOnUI, useAnimatedGestureHandler, useSharedValue, useWorkletCallback} from 'react-native-reanimated'; +import Button from '@components/Button'; +import HeaderGap from '@components/HeaderGap'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import Modal from '@components/Modal'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import Tooltip from '@components/Tooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import cropOrRotateImage from '@libs/cropOrRotateImage'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; import ImageCropView from './ImageCropView'; import Slider from './Slider'; -import cropOrRotateImage from '../../libs/cropOrRotateImage'; -import HeaderGap from '../HeaderGap'; -import * as StyleUtils from '../../styles/StyleUtils'; -import Tooltip from '../Tooltip'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; -import ScreenWrapper from '../ScreenWrapper'; const propTypes = { /** Link to image for cropping */ diff --git a/src/components/AvatarCropModal/ImageCropView.js b/src/components/AvatarCropModal/ImageCropView.js index be19109d7379..cb135cc76c69 100644 --- a/src/components/AvatarCropModal/ImageCropView.js +++ b/src/components/AvatarCropModal/ImageCropView.js @@ -3,12 +3,12 @@ import React from 'react'; import {View} from 'react-native'; import {PanGestureHandler} from 'react-native-gesture-handler'; import Animated, {interpolate, useAnimatedStyle} from 'react-native-reanimated'; -import styles from '../../styles/styles'; -import Icon from '../Icon'; -import * as Expensicons from '../Icon/Expensicons'; -import * as StyleUtils from '../../styles/StyleUtils'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import ControlSelection from '@libs/ControlSelection'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; import gestureHandlerPropTypes from './gestureHandlerPropTypes'; -import ControlSelection from '../../libs/ControlSelection'; const propTypes = { /** Link to image for cropping */ diff --git a/src/components/AvatarCropModal/Slider.js b/src/components/AvatarCropModal/Slider.js index 573ee781e5f8..4281da1e7b99 100644 --- a/src/components/AvatarCropModal/Slider.js +++ b/src/components/AvatarCropModal/Slider.js @@ -3,11 +3,11 @@ import React, {useState} from 'react'; import {View} from 'react-native'; import {PanGestureHandler} from 'react-native-gesture-handler'; import Animated, {useAnimatedStyle} from 'react-native-reanimated'; -import styles from '../../styles/styles'; +import Tooltip from '@components/Tooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import ControlSelection from '@libs/ControlSelection'; +import styles from '@styles/styles'; import gestureHandlerPropTypes from './gestureHandlerPropTypes'; -import ControlSelection from '../../libs/ControlSelection'; -import Tooltip from '../Tooltip'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; const propTypes = { /** React-native-reanimated lib handler which executes when the user is panning slider */ diff --git a/src/components/AvatarWithDisplayName.js b/src/components/AvatarWithDisplayName.js index 03ae8f51bfb6..a7647aef5e99 100644 --- a/src/components/AvatarWithDisplayName.js +++ b/src/components/AvatarWithDisplayName.js @@ -1,28 +1,28 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; -import CONST from '../CONST'; -import reportPropTypes from '../pages/reportPropTypes'; -import participantPropTypes from './participantPropTypes'; -import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import styles from '../styles/styles'; -import themeColors from '../styles/themes/default'; -import SubscriptAvatar from './SubscriptAvatar'; -import * as ReportUtils from '../libs/ReportUtils'; -import MultipleAvatars from './MultipleAvatars'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; import DisplayNames from './DisplayNames'; -import compose from '../libs/compose'; -import * as OptionsListUtils from '../libs/OptionsListUtils'; -import Text from './Text'; -import * as StyleUtils from '../styles/StyleUtils'; +import MultipleAvatars from './MultipleAvatars'; import ParentNavigationSubtitle from './ParentNavigationSubtitle'; +import participantPropTypes from './participantPropTypes'; import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; -import Navigation from '../libs/Navigation/Navigation'; -import ROUTES from '../ROUTES'; -import * as ReportActionsUtils from '../libs/ReportActionsUtils'; +import SubscriptAvatar from './SubscriptAvatar'; +import Text from './Text'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions'; const propTypes = { /** The report currently being looked at */ diff --git a/src/components/AvatarWithImagePicker.js b/src/components/AvatarWithImagePicker.js index 3dd23d9051eb..871d967e23dc 100644 --- a/src/components/AvatarWithImagePicker.js +++ b/src/components/AvatarWithImagePicker.js @@ -1,31 +1,31 @@ -import _ from 'underscore'; +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; +import _ from 'underscore'; +import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; +import * as FileUtils from '@libs/fileDownload/FileUtils'; +import getImageResolution from '@libs/fileDownload/getImageResolution'; +import SpinningIndicatorAnimation from '@styles/animation/SpinningIndicatorAnimation'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; +import AttachmentModal from './AttachmentModal'; +import AttachmentPicker from './AttachmentPicker'; import Avatar from './Avatar'; +import AvatarCropModal from './AvatarCropModal/AvatarCropModal'; +import DotIndicatorMessage from './DotIndicatorMessage'; import Icon from './Icon'; -import PopoverMenu from './PopoverMenu'; import * as Expensicons from './Icon/Expensicons'; -import styles from '../styles/styles'; -import themeColors from '../styles/themes/default'; -import AttachmentPicker from './AttachmentPicker'; -import AvatarCropModal from './AvatarCropModal/AvatarCropModal'; import OfflineWithFeedback from './OfflineWithFeedback'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import variables from '../styles/variables'; -import CONST from '../CONST'; -import SpinningIndicatorAnimation from '../styles/animation/SpinningIndicatorAnimation'; -import Tooltip from './Tooltip/PopoverAnchorTooltip'; -import stylePropTypes from '../styles/stylePropTypes'; -import * as FileUtils from '../libs/fileDownload/FileUtils'; -import getImageResolution from '../libs/fileDownload/getImageResolution'; +import PopoverMenu from './PopoverMenu'; import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; -import AttachmentModal from './AttachmentModal'; -import DotIndicatorMessage from './DotIndicatorMessage'; -import * as Browser from '../libs/Browser'; +import Tooltip from './Tooltip/PopoverAnchorTooltip'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; import withNavigationFocus from './withNavigationFocus'; -import compose from '../libs/compose'; const propTypes = { /** Avatar source to display */ diff --git a/src/components/AvatarWithIndicator.js b/src/components/AvatarWithIndicator.js index 5e7b8d1ee632..c2a8d5346e13 100644 --- a/src/components/AvatarWithIndicator.js +++ b/src/components/AvatarWithIndicator.js @@ -1,12 +1,12 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; +import * as UserUtils from '@libs/UserUtils'; +import styles from '@styles/styles'; import Avatar from './Avatar'; -import styles from '../styles/styles'; -import Tooltip from './Tooltip'; -import * as UserUtils from '../libs/UserUtils'; -import Indicator from './Indicator'; import * as Expensicons from './Icon/Expensicons'; +import Indicator from './Indicator'; +import Tooltip from './Tooltip'; const propTypes = { /** URL for the avatar */ diff --git a/src/components/Badge.js b/src/components/Badge.js index 942733baff37..0a6b72201655 100644 --- a/src/components/Badge.js +++ b/src/components/Badge.js @@ -1,11 +1,11 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../styles/styles'; -import * as StyleUtils from '../styles/StyleUtils'; -import Text from './Text'; -import CONST from '../CONST'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; +import Text from './Text'; const propTypes = { /** Is Success type */ diff --git a/src/components/Banner.js b/src/components/Banner.js index 7ff1ab8210dc..df1be45a96c5 100644 --- a/src/components/Banner.js +++ b/src/components/Banner.js @@ -1,19 +1,19 @@ -import React, {memo} from 'react'; import PropTypes from 'prop-types'; +import React, {memo} from 'react'; import {View} from 'react-native'; -import compose from '../libs/compose'; +import compose from '@libs/compose'; +import getButtonState from '@libs/getButtonState'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; import Hoverable from './Hoverable'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; +import PressableWithFeedback from './Pressable/PressableWithFeedback'; import RenderHTML from './RenderHTML'; import Text from './Text'; -import styles from '../styles/styles'; -import * as StyleUtils from '../styles/StyleUtils'; -import getButtonState from '../libs/getButtonState'; import Tooltip from './Tooltip'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import PressableWithFeedback from './Pressable/PressableWithFeedback'; -import CONST from '../CONST'; const propTypes = { /** Text to display in the banner. */ diff --git a/src/components/BaseMiniContextMenuItem.js b/src/components/BaseMiniContextMenuItem.js index cf7ff4d95b07..b8d7a4a7484b 100644 --- a/src/components/BaseMiniContextMenuItem.js +++ b/src/components/BaseMiniContextMenuItem.js @@ -1,15 +1,15 @@ -import {View} from 'react-native'; -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; +import {View} from 'react-native'; import _ from 'underscore'; -import styles from '../styles/styles'; -import * as StyleUtils from '../styles/StyleUtils'; -import getButtonState from '../libs/getButtonState'; -import variables from '../styles/variables'; -import Tooltip from './Tooltip/PopoverAnchorTooltip'; +import DomUtils from '@libs/DomUtils'; +import getButtonState from '@libs/getButtonState'; +import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; -import ReportActionComposeFocusManager from '../libs/ReportActionComposeFocusManager'; -import DomUtils from '../libs/DomUtils'; +import Tooltip from './Tooltip/PopoverAnchorTooltip'; const propTypes = { /** diff --git a/src/components/BigNumberPad.js b/src/components/BigNumberPad.js index 5587808a09fd..ecbde3a5afe6 100644 --- a/src/components/BigNumberPad.js +++ b/src/components/BigNumberPad.js @@ -1,12 +1,12 @@ +import PropTypes from 'prop-types'; import React, {useState} from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import PropTypes from 'prop-types'; -import styles from '../styles/styles'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import ControlSelection from '@libs/ControlSelection'; +import styles from '@styles/styles'; import Button from './Button'; -import ControlSelection from '../libs/ControlSelection'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import useWindowDimensions from '../hooks/useWindowDimensions'; const propTypes = { /** Callback to inform parent modal with key pressed */ diff --git a/src/components/BlockingViews/BlockingView.js b/src/components/BlockingViews/BlockingView.js index 5cb342b0fada..14daddea5f9c 100644 --- a/src/components/BlockingViews/BlockingView.js +++ b/src/components/BlockingViews/BlockingView.js @@ -1,15 +1,15 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../../styles/styles'; -import variables from '../../styles/variables'; -import Icon from '../Icon'; -import Text from '../Text'; -import themeColors from '../../styles/themes/default'; -import TextLink from '../TextLink'; -import Navigation from '../../libs/Navigation/Navigation'; -import AutoEmailLink from '../AutoEmailLink'; -import useLocalize from '../../hooks/useLocalize'; +import AutoEmailLink from '@components/AutoEmailLink'; +import Icon from '@components/Icon'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; const propTypes = { /** Expensicon for the page */ diff --git a/src/components/BlockingViews/FullPageNotFoundView.js b/src/components/BlockingViews/FullPageNotFoundView.js index a9c4bf63b65e..5232b5eca8dd 100644 --- a/src/components/BlockingViews/FullPageNotFoundView.js +++ b/src/components/BlockingViews/FullPageNotFoundView.js @@ -1,14 +1,14 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {View} from 'react-native'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Illustrations from '@components/Icon/Illustrations'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import ROUTES from '@src/ROUTES'; import BlockingView from './BlockingView'; -import * as Illustrations from '../Icon/Illustrations'; -import HeaderWithBackButton from '../HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import variables from '../../styles/variables'; -import styles from '../../styles/styles'; -import useLocalize from '../../hooks/useLocalize'; -import ROUTES from '../../ROUTES'; const propTypes = { /** Child elements */ diff --git a/src/components/BlockingViews/FullPageOfflineBlockingView.js b/src/components/BlockingViews/FullPageOfflineBlockingView.js index 148c7c751bee..5a876ecb8b1c 100644 --- a/src/components/BlockingViews/FullPageOfflineBlockingView.js +++ b/src/components/BlockingViews/FullPageOfflineBlockingView.js @@ -1,10 +1,10 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import networkPropTypes from '../networkPropTypes'; -import {withNetwork} from '../OnyxProvider'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import * as Expensicons from '../Icon/Expensicons'; -import compose from '../../libs/compose'; +import React from 'react'; +import * as Expensicons from '@components/Icon/Expensicons'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; import BlockingView from './BlockingView'; const propTypes = { diff --git a/src/components/Button/index.js b/src/components/Button/index.js index 26d33b1431b8..2039157d3f08 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -1,21 +1,21 @@ +import PropTypes from 'prop-types'; import React, {Component} from 'react'; import {ActivityIndicator, View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../../styles/styles'; -import themeColors from '../../styles/themes/default'; -import Text from '../Text'; -import KeyboardShortcut from '../../libs/KeyboardShortcut'; -import Icon from '../Icon'; -import CONST from '../../CONST'; -import * as StyleUtils from '../../styles/StyleUtils'; -import HapticFeedback from '../../libs/HapticFeedback'; -import withNavigationFallback from '../withNavigationFallback'; -import compose from '../../libs/compose'; -import * as Expensicons from '../Icon/Expensicons'; -import withNavigationFocus from '../withNavigationFocus'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import refPropTypes from '@components/refPropTypes'; +import Text from '@components/Text'; +import withNavigationFallback from '@components/withNavigationFallback'; +import withNavigationFocus from '@components/withNavigationFocus'; +import compose from '@libs/compose'; +import HapticFeedback from '@libs/HapticFeedback'; +import KeyboardShortcut from '@libs/KeyboardShortcut'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; import validateSubmitShortcut from './validateSubmitShortcut'; -import PressableWithFeedback from '../Pressable/PressableWithFeedback'; -import refPropTypes from '../refPropTypes'; const propTypes = { /** Should the press event bubble across multiple instances when Enter key triggers it. */ diff --git a/src/components/ButtonWithDropdownMenu.js b/src/components/ButtonWithDropdownMenu.js index 04bc3f6fb54a..7c88d9202b78 100644 --- a/src/components/ButtonWithDropdownMenu.js +++ b/src/components/ButtonWithDropdownMenu.js @@ -1,16 +1,16 @@ -import React, {useState, useRef, useEffect} from 'react'; import PropTypes from 'prop-types'; +import React, {useEffect, useRef, useState} from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import useWindowDimensions from '../hooks/useWindowDimensions'; -import styles from '../styles/styles'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; import Button from './Button'; -import PopoverMenu from './PopoverMenu'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; -import themeColors from '../styles/themes/default'; -import CONST from '../CONST'; -import * as StyleUtils from '../styles/StyleUtils'; +import PopoverMenu from './PopoverMenu'; const propTypes = { /** Text to display for the menu header */ diff --git a/src/components/CardPreview.js b/src/components/CardPreview.js index 4f774d67360c..9f59ca140ce5 100644 --- a/src/components/CardPreview.js +++ b/src/components/CardPreview.js @@ -1,13 +1,13 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import styles from '../styles/styles'; +import ExpensifyCardImage from '@assets/images/expensify-card.svg'; +import usePrivatePersonalDetails from '@hooks/usePrivatePersonalDetails'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import ONYXKEYS from '@src/ONYXKEYS'; import Text from './Text'; -import usePrivatePersonalDetails from '../hooks/usePrivatePersonalDetails'; -import ONYXKEYS from '../ONYXKEYS'; -import ExpensifyCardImage from '../../assets/images/expensify-card.svg'; -import variables from '../styles/variables'; const propTypes = { /** User's private personal details */ diff --git a/src/components/CategoryPicker/categoryPickerPropTypes.js b/src/components/CategoryPicker/categoryPickerPropTypes.js index 6f2800a5d98f..0bc116bf45cc 100644 --- a/src/components/CategoryPicker/categoryPickerPropTypes.js +++ b/src/components/CategoryPicker/categoryPickerPropTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import categoryPropTypes from '../categoryPropTypes'; +import categoryPropTypes from '@components/categoryPropTypes'; const propTypes = { /** The policyID we are getting categories for */ diff --git a/src/components/CategoryPicker/index.js b/src/components/CategoryPicker/index.js index e7f68e7011fc..f3127131b9b2 100644 --- a/src/components/CategoryPicker/index.js +++ b/src/components/CategoryPicker/index.js @@ -1,14 +1,14 @@ +import lodashGet from 'lodash/get'; import React, {useMemo, useState} from 'react'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import ONYXKEYS from '../../ONYXKEYS'; -import {propTypes, defaultProps} from './categoryPickerPropTypes'; -import styles from '../../styles/styles'; -import CONST from '../../CONST'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; -import OptionsSelector from '../OptionsSelector'; -import useLocalize from '../../hooks/useLocalize'; +import OptionsSelector from '@components/OptionsSelector'; +import useLocalize from '@hooks/useLocalize'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {defaultProps, propTypes} from './categoryPickerPropTypes'; function CategoryPicker({selectedCategory, policyCategories, policyRecentlyUsedCategories, onSubmit}) { const {translate} = useLocalize(); diff --git a/src/components/Checkbox.js b/src/components/Checkbox.js index b4ffd7a6b062..51b9212133a4 100644 --- a/src/components/Checkbox.js +++ b/src/components/Checkbox.js @@ -1,13 +1,13 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../styles/styles'; -import themeColors from '../styles/themes/default'; -import stylePropTypes from '../styles/stylePropTypes'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; -import * as StyleUtils from '../styles/StyleUtils'; -import CONST from '../CONST'; import PressableWithFeedback from './Pressable/PressableWithFeedback'; import refPropTypes from './refPropTypes'; diff --git a/src/components/CheckboxWithLabel.js b/src/components/CheckboxWithLabel.js index c10966934b9d..4bffadecb733 100644 --- a/src/components/CheckboxWithLabel.js +++ b/src/components/CheckboxWithLabel.js @@ -1,13 +1,13 @@ -import React, {useState} from 'react'; import PropTypes from 'prop-types'; +import React, {useState} from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import styles from '../styles/styles'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; import Checkbox from './Checkbox'; -import Text from './Text'; import FormHelpMessage from './FormHelpMessage'; -import variables from '../styles/variables'; import PressableWithFeedback from './Pressable/PressableWithFeedback'; +import Text from './Text'; /** * Returns an error if the required props are not provided diff --git a/src/components/CheckboxWithTooltip/CheckboxWithTooltipForMobileWebAndNative.js b/src/components/CheckboxWithTooltip/CheckboxWithTooltipForMobileWebAndNative.js index f5bc097d95f7..61a2d6feaa4b 100644 --- a/src/components/CheckboxWithTooltip/CheckboxWithTooltipForMobileWebAndNative.js +++ b/src/components/CheckboxWithTooltip/CheckboxWithTooltipForMobileWebAndNative.js @@ -1,9 +1,9 @@ import React from 'react'; import {View} from 'react-native'; -import Checkbox from '../Checkbox'; -import {propTypes, defaultProps} from './checkboxWithTooltipPropTypes'; -import Growl from '../../libs/Growl'; -import withWindowDimensions from '../withWindowDimensions'; +import Checkbox from '@components/Checkbox'; +import withWindowDimensions from '@components/withWindowDimensions'; +import Growl from '@libs/Growl'; +import {defaultProps, propTypes} from './checkboxWithTooltipPropTypes'; class CheckboxWithTooltipForMobileWebAndNative extends React.Component { constructor(props) { diff --git a/src/components/CheckboxWithTooltip/checkboxWithTooltipPropTypes.js b/src/components/CheckboxWithTooltip/checkboxWithTooltipPropTypes.js index 1656fa7a82cc..67588d00ef65 100644 --- a/src/components/CheckboxWithTooltip/checkboxWithTooltipPropTypes.js +++ b/src/components/CheckboxWithTooltip/checkboxWithTooltipPropTypes.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; -import {windowDimensionsPropTypes} from '../withWindowDimensions'; -import CONST from '../../CONST'; -import stylePropTypes from '../../styles/stylePropTypes'; +import {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import stylePropTypes from '@styles/stylePropTypes'; +import CONST from '@src/CONST'; const propTypes = { /** Whether the checkbox is checked */ diff --git a/src/components/CheckboxWithTooltip/index.js b/src/components/CheckboxWithTooltip/index.js index 70b1f345fb61..06e4e0412eba 100644 --- a/src/components/CheckboxWithTooltip/index.js +++ b/src/components/CheckboxWithTooltip/index.js @@ -1,10 +1,10 @@ import React from 'react'; import {View} from 'react-native'; +import Checkbox from '@components/Checkbox'; +import Tooltip from '@components/Tooltip'; +import withWindowDimensions from '@components/withWindowDimensions'; import CheckboxWithTooltipForMobileWebAndNative from './CheckboxWithTooltipForMobileWebAndNative'; -import Checkbox from '../Checkbox'; -import {propTypes, defaultProps} from './checkboxWithTooltipPropTypes'; -import Tooltip from '../Tooltip'; -import withWindowDimensions from '../withWindowDimensions'; +import {defaultProps, propTypes} from './checkboxWithTooltipPropTypes'; function CheckboxWithTooltip(props) { if (props.isSmallScreenWidth || props.isMediumScreenWidth) { diff --git a/src/components/CheckboxWithTooltip/index.native.js b/src/components/CheckboxWithTooltip/index.native.js index 61d171d1717a..46ce0bbd131e 100644 --- a/src/components/CheckboxWithTooltip/index.native.js +++ b/src/components/CheckboxWithTooltip/index.native.js @@ -1,7 +1,7 @@ import React from 'react'; -import {propTypes, defaultProps} from './checkboxWithTooltipPropTypes'; -import withWindowDimensions from '../withWindowDimensions'; +import withWindowDimensions from '@components/withWindowDimensions'; import CheckboxWithTooltipForMobileWebAndNative from './CheckboxWithTooltipForMobileWebAndNative'; +import {defaultProps, propTypes} from './checkboxWithTooltipPropTypes'; function CheckboxWithTooltip(props) { return ( diff --git a/src/components/CollapsibleSection/Collapsible/index.native.js b/src/components/CollapsibleSection/Collapsible/index.native.js index 022d2a2a2ff9..9b800304beeb 100644 --- a/src/components/CollapsibleSection/Collapsible/index.native.js +++ b/src/components/CollapsibleSection/Collapsible/index.native.js @@ -1,6 +1,6 @@ -import CollapsibleRN from 'react-native-collapsible'; import PropTypes from 'prop-types'; import React from 'react'; +import CollapsibleRN from 'react-native-collapsible'; const propTypes = { /** Whether the section should start expanded. False by default */ diff --git a/src/components/CollapsibleSection/index.js b/src/components/CollapsibleSection/index.js index 7009d1905e1d..32d422297ca4 100644 --- a/src/components/CollapsibleSection/index.js +++ b/src/components/CollapsibleSection/index.js @@ -1,13 +1,13 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import Text from '@components/Text'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; import Collapsible from './Collapsible'; -import Text from '../Text'; -import styles from '../../styles/styles'; -import Icon from '../Icon'; -import * as Expensicons from '../Icon/Expensicons'; -import PressableWithFeedback from '../Pressable/PressableWithFeedback'; -import CONST from '../../CONST'; const propTypes = { /** Title of the Collapsible section */ diff --git a/src/components/CommunicationsLink.js b/src/components/CommunicationsLink.js index c8ca37f51c0f..f09fecea5239 100644 --- a/src/components/CommunicationsLink.js +++ b/src/components/CommunicationsLink.js @@ -1,10 +1,10 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../styles/styles'; -import * as Expensicons from './Icon/Expensicons'; -import Clipboard from '../libs/Clipboard'; +import Clipboard from '@libs/Clipboard'; +import styles from '@styles/styles'; import ContextMenuItem from './ContextMenuItem'; +import * as Expensicons from './Icon/Expensicons'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { diff --git a/src/components/ComposeProviders.tsx b/src/components/ComposeProviders.tsx index bff36db25533..2c73719358d8 100644 --- a/src/components/ComposeProviders.tsx +++ b/src/components/ComposeProviders.tsx @@ -1,5 +1,5 @@ import React, {ComponentType, ReactNode} from 'react'; -import ChildrenProps from '../types/utils/ChildrenProps'; +import ChildrenProps from '@src/types/utils/ChildrenProps'; type ComposeProvidersProps = ChildrenProps & { /** Provider components go here */ diff --git a/src/components/Composer/index.android.js b/src/components/Composer/index.android.js index d5013e9340e3..aca2a9d06f7a 100644 --- a/src/components/Composer/index.android.js +++ b/src/components/Composer/index.android.js @@ -1,10 +1,10 @@ -import React, {useEffect, useCallback, useRef, useMemo} from 'react'; -import {StyleSheet} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef} from 'react'; +import {StyleSheet} from 'react-native'; import _ from 'underscore'; -import RNTextInput from '../RNTextInput'; -import themeColors from '../../styles/themes/default'; -import * as ComposerUtils from '../../libs/ComposerUtils'; +import RNTextInput from '@components/RNTextInput'; +import * as ComposerUtils from '@libs/ComposerUtils'; +import themeColors from '@styles/themes/default'; const propTypes = { /** Maximum number of lines in the text input */ diff --git a/src/components/Composer/index.ios.js b/src/components/Composer/index.ios.js index d073ad8287f6..e5dab3756594 100644 --- a/src/components/Composer/index.ios.js +++ b/src/components/Composer/index.ios.js @@ -1,10 +1,10 @@ -import React, {useEffect, useRef, useMemo, useCallback} from 'react'; -import {StyleSheet} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef} from 'react'; +import {StyleSheet} from 'react-native'; import _ from 'underscore'; -import RNTextInput from '../RNTextInput'; -import themeColors from '../../styles/themes/default'; -import * as ComposerUtils from '../../libs/ComposerUtils'; +import RNTextInput from '@components/RNTextInput'; +import * as ComposerUtils from '@libs/ComposerUtils'; +import themeColors from '@styles/themes/default'; const propTypes = { /** If the input should clear, it actually gets intercepted instead of .clear() */ diff --git a/src/components/Composer/index.js b/src/components/Composer/index.js index 2872060afba5..02042d86a6e0 100755 --- a/src/components/Composer/index.js +++ b/src/components/Composer/index.js @@ -1,25 +1,25 @@ -import React, {useState, useRef, useEffect, useCallback, useMemo} from 'react'; -import {StyleSheet, View} from 'react-native'; -import PropTypes from 'prop-types'; -import _ from 'underscore'; import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {flushSync} from 'react-dom'; -import RNTextInput from '../RNTextInput'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import themeColors from '../../styles/themes/default'; -import updateIsFullComposerAvailable from '../../libs/ComposerUtils/updateIsFullComposerAvailable'; -import * as ComposerUtils from '../../libs/ComposerUtils'; -import * as Browser from '../../libs/Browser'; -import * as StyleUtils from '../../styles/StyleUtils'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions'; -import compose from '../../libs/compose'; -import styles from '../../styles/styles'; -import Text from '../Text'; -import isEnterWhileComposition from '../../libs/KeyboardShortcut/isEnterWhileComposition'; -import CONST from '../../CONST'; -import withNavigation from '../withNavigation'; -import ReportActionComposeFocusManager from '../../libs/ReportActionComposeFocusManager'; -import * as DeviceCapabilities from '../../libs/DeviceCapabilities'; +import {StyleSheet, View} from 'react-native'; +import _ from 'underscore'; +import RNTextInput from '@components/RNTextInput'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withNavigation from '@components/withNavigation'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; +import * as ComposerUtils from '@libs/ComposerUtils'; +import updateIsFullComposerAvailable from '@libs/ComposerUtils/updateIsFullComposerAvailable'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import isEnterWhileComposition from '@libs/KeyboardShortcut/isEnterWhileComposition'; +import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; const propTypes = { /** Maximum number of lines in the text input */ diff --git a/src/components/ConfirmContent.js b/src/components/ConfirmContent.js index 469efb4f25d9..6142322848d0 100644 --- a/src/components/ConfirmContent.js +++ b/src/components/ConfirmContent.js @@ -1,15 +1,15 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import PropTypes from 'prop-types'; -import Header from './Header'; -import styles from '../styles/styles'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; import Button from './Button'; -import useLocalize from '../hooks/useLocalize'; -import useNetwork from '../hooks/useNetwork'; -import Text from './Text'; -import variables from '../styles/variables'; +import Header from './Header'; import Icon from './Icon'; +import Text from './Text'; const propTypes = { /** Title of the modal */ diff --git a/src/components/ConfirmModal.js b/src/components/ConfirmModal.js index 705a05ec2058..3fe3838c8c81 100755 --- a/src/components/ConfirmModal.js +++ b/src/components/ConfirmModal.js @@ -1,9 +1,9 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; +import CONST from '@src/CONST'; +import ConfirmContent from './ConfirmContent'; import Modal from './Modal'; -import CONST from '../CONST'; import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions'; -import ConfirmContent from './ConfirmContent'; const propTypes = { /** Title of the modal */ diff --git a/src/components/ConfirmPopover.js b/src/components/ConfirmPopover.js index 88df6347f850..83001736b471 100644 --- a/src/components/ConfirmPopover.js +++ b/src/components/ConfirmPopover.js @@ -1,8 +1,8 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; +import ConfirmContent from './ConfirmContent'; import Popover from './Popover'; import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions'; -import ConfirmContent from './ConfirmContent'; const propTypes = { /** Title of the modal */ diff --git a/src/components/ConfirmationPage.js b/src/components/ConfirmationPage.js index 4549d6ca6072..bc154923e926 100644 --- a/src/components/ConfirmationPage.js +++ b/src/components/ConfirmationPage.js @@ -1,12 +1,12 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; +import styles from '@styles/styles'; +import Button from './Button'; +import FixedFooter from './FixedFooter'; import Lottie from './Lottie'; import * as LottieAnimations from './LottieAnimations'; import Text from './Text'; -import styles from '../styles/styles'; -import Button from './Button'; -import FixedFooter from './FixedFooter'; const propTypes = { /** The asset to render */ diff --git a/src/components/ConfirmedRoute.js b/src/components/ConfirmedRoute.js index 8544de62eeb9..656e419449b3 100644 --- a/src/components/ConfirmedRoute.js +++ b/src/components/ConfirmedRoute.js @@ -1,21 +1,20 @@ -import React, {useEffect} from 'react'; -import PropTypes from 'prop-types'; - -import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; import lodashIsNil from 'lodash/isNil'; +import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; +import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import ONYXKEYS from '../ONYXKEYS'; -import CONST from '../CONST'; -import * as MapboxToken from '../libs/actions/MapboxToken'; -import * as TransactionUtils from '../libs/TransactionUtils'; +import useNetwork from '@hooks/useNetwork'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import styles from '@styles/styles'; +import theme from '@styles/themes/default'; +import * as MapboxToken from '@userActions/MapboxToken'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import DistanceMapView from './DistanceMapView'; import * as Expensicons from './Icon/Expensicons'; -import theme from '../styles/themes/default'; -import styles from '../styles/styles'; -import transactionPropTypes from './transactionPropTypes'; import PendingMapView from './MapView/PendingMapView'; -import useNetwork from '../hooks/useNetwork'; -import DistanceMapView from './DistanceMapView'; +import transactionPropTypes from './transactionPropTypes'; const propTypes = { /** Transaction that stores the distance request data */ diff --git a/src/components/ConnectBankAccountButton.js b/src/components/ConnectBankAccountButton.js index f5e0afe1d52e..64d2421c7d37 100644 --- a/src/components/ConnectBankAccountButton.js +++ b/src/components/ConnectBankAccountButton.js @@ -1,16 +1,16 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {View} from 'react-native'; -import * as ReimbursementAccount from '../libs/actions/ReimbursementAccount'; -import * as Expensicons from './Icon/Expensicons'; -import styles from '../styles/styles'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as ReimbursementAccount from '@userActions/ReimbursementAccount'; import Button from './Button'; -import {withNetwork} from './OnyxProvider'; -import compose from '../libs/compose'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; +import * as Expensicons from './Icon/Expensicons'; import networkPropTypes from './networkPropTypes'; +import {withNetwork} from './OnyxProvider'; import Text from './Text'; -import Navigation from '../libs/Navigation/Navigation'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/components/ContextMenuItem.js b/src/components/ContextMenuItem.js index 010e971784cb..80d4855392a4 100644 --- a/src/components/ContextMenuItem.js +++ b/src/components/ContextMenuItem.js @@ -1,14 +1,14 @@ -import React, {forwardRef, useImperativeHandle} from 'react'; import PropTypes from 'prop-types'; -import MenuItem from './MenuItem'; -import Icon from './Icon'; -import styles from '../styles/styles'; -import * as StyleUtils from '../styles/StyleUtils'; -import getButtonState from '../libs/getButtonState'; -import useThrottledButtonState from '../hooks/useThrottledButtonState'; +import React, {forwardRef, useImperativeHandle} from 'react'; +import useThrottledButtonState from '@hooks/useThrottledButtonState'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import getButtonState from '@libs/getButtonState'; +import getContextMenuItemStyles from '@styles/getContextMenuItemStyles'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; import BaseMiniContextMenuItem from './BaseMiniContextMenuItem'; -import useWindowDimensions from '../hooks/useWindowDimensions'; -import getContextMenuItemStyles from '../styles/getContextMenuItemStyles'; +import Icon from './Icon'; +import MenuItem from './MenuItem'; const propTypes = { /** Icon Component */ diff --git a/src/components/CopyTextToClipboard.js b/src/components/CopyTextToClipboard.js index 6adc45cbdf52..ac396c6cedf4 100644 --- a/src/components/CopyTextToClipboard.js +++ b/src/components/CopyTextToClipboard.js @@ -1,8 +1,8 @@ -import React, {useCallback} from 'react'; import PropTypes from 'prop-types'; +import React, {useCallback} from 'react'; +import Clipboard from '@libs/Clipboard'; import * as Expensicons from './Icon/Expensicons'; import PressableWithDelayToggle from './Pressable/PressableWithDelayToggle'; -import Clipboard from '../libs/Clipboard'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { diff --git a/src/components/CountrySelector.js b/src/components/CountrySelector.js index 3dac127b1963..93a90dcf6be9 100644 --- a/src/components/CountrySelector.js +++ b/src/components/CountrySelector.js @@ -1,12 +1,12 @@ -import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; import {View} from 'react-native'; -import styles from '../styles/styles'; -import Navigation from '../libs/Navigation/Navigation'; -import ROUTES from '../ROUTES'; -import useLocalize from '../hooks/useLocalize'; -import MenuItemWithTopDescription from './MenuItemWithTopDescription'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import ROUTES from '@src/ROUTES'; import FormHelpMessage from './FormHelpMessage'; +import MenuItemWithTopDescription from './MenuItemWithTopDescription'; const propTypes = { /** Form error text. e.g when no country is selected */ diff --git a/src/components/CurrencySymbolButton.js b/src/components/CurrencySymbolButton.js index 446641ab158c..695cb2bc10c8 100644 --- a/src/components/CurrencySymbolButton.js +++ b/src/components/CurrencySymbolButton.js @@ -1,11 +1,11 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; import Text from './Text'; -import styles from '../styles/styles'; import Tooltip from './Tooltip'; -import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; -import CONST from '../CONST'; -import useLocalize from '../hooks/useLocalize'; const propTypes = { /** Currency symbol of selected currency */ diff --git a/src/components/CurrentUserPersonalDetailsSkeletonView/index.js b/src/components/CurrentUserPersonalDetailsSkeletonView/index.js index cc305a628820..f2d7a8b71897 100644 --- a/src/components/CurrentUserPersonalDetailsSkeletonView/index.js +++ b/src/components/CurrentUserPersonalDetailsSkeletonView/index.js @@ -1,14 +1,14 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import _ from 'underscore'; +import React from 'react'; import SkeletonViewContentLoader from 'react-content-loader/native'; -import {Circle, Rect} from 'react-native-svg'; import {View} from 'react-native'; -import * as StyleUtils from '../../styles/StyleUtils'; -import CONST from '../../CONST'; -import themeColors from '../../styles/themes/default'; -import variables from '../../styles/variables'; -import styles from '../../styles/styles'; +import {Circle, Rect} from 'react-native-svg'; +import _ from 'underscore'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; const propTypes = { /** Whether to animate the skeleton view */ diff --git a/src/components/CurrentWalletBalance.js b/src/components/CurrentWalletBalance.js index 642e6937f1bf..c73c0815a003 100644 --- a/src/components/CurrentWalletBalance.js +++ b/src/components/CurrentWalletBalance.js @@ -1,12 +1,12 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import styles from '../styles/styles'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import compose from '../libs/compose'; -import ONYXKEYS from '../ONYXKEYS'; +import compose from '@libs/compose'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import styles from '@styles/styles'; +import ONYXKEYS from '@src/ONYXKEYS'; import Text from './Text'; -import * as CurrencyUtils from '../libs/CurrencyUtils'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { /** The user's wallet account */ diff --git a/src/components/CustomDevMenu/index.native.js b/src/components/CustomDevMenu/index.native.js index 52ca0e43782c..c8d0e1e099d4 100644 --- a/src/components/CustomDevMenu/index.native.js +++ b/src/components/CustomDevMenu/index.native.js @@ -1,6 +1,6 @@ import {useEffect} from 'react'; import DevMenu from 'react-native-dev-menu'; -import toggleTestToolsModal from '../../libs/actions/TestTool'; +import toggleTestToolsModal from '@userActions/TestTool'; function CustomDevMenu() { useEffect(() => { diff --git a/src/components/CustomStatusBar/index.js b/src/components/CustomStatusBar/index.js index 4848e6e35f59..2ffd763bf088 100644 --- a/src/components/CustomStatusBar/index.js +++ b/src/components/CustomStatusBar/index.js @@ -1,7 +1,7 @@ import React, {useEffect} from 'react'; -import StatusBar from '../../libs/StatusBar'; -import Navigation, {navigationRef} from '../../libs/Navigation/Navigation'; -import themeColors from '../../styles/themes/default'; +import Navigation, {navigationRef} from '@libs/Navigation/Navigation'; +import StatusBar from '@libs/StatusBar'; +import themeColors from '@styles/themes/default'; function CustomStatusBar() { useEffect(() => { diff --git a/src/components/DatePicker/datepickerPropTypes.js b/src/components/DatePicker/datepickerPropTypes.js index 8bd5d890c42c..c895d919cd33 100644 --- a/src/components/DatePicker/datepickerPropTypes.js +++ b/src/components/DatePicker/datepickerPropTypes.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; -import {propTypes as fieldPropTypes, defaultProps as defaultFieldPropTypes} from '../TextInput/baseTextInputPropTypes'; -import CONST from '../../CONST'; +import {defaultProps as defaultFieldPropTypes, propTypes as fieldPropTypes} from '@components/TextInput/baseTextInputPropTypes'; +import CONST from '@src/CONST'; const propTypes = { ...fieldPropTypes, diff --git a/src/components/DatePicker/index.android.js b/src/components/DatePicker/index.android.js index 4c034038305d..002cf5587e44 100644 --- a/src/components/DatePicker/index.android.js +++ b/src/components/DatePicker/index.android.js @@ -1,11 +1,11 @@ -import React, {forwardRef, useCallback, useImperativeHandle, useRef, useState} from 'react'; -import {Keyboard} from 'react-native'; import RNDatePicker from '@react-native-community/datetimepicker'; import moment from 'moment'; -import TextInput from '../TextInput'; -import CONST from '../../CONST'; -import {propTypes, defaultProps} from './datepickerPropTypes'; -import styles from '../../styles/styles'; +import React, {forwardRef, useCallback, useImperativeHandle, useRef, useState} from 'react'; +import {Keyboard} from 'react-native'; +import TextInput from '@components/TextInput'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import {defaultProps, propTypes} from './datepickerPropTypes'; function DatePicker({value, defaultValue, label, placeholder, errorText, containerStyles, disabled, onBlur, onInputChange, maxDate, minDate}, outerRef) { const ref = useRef(); diff --git a/src/components/DatePicker/index.ios.js b/src/components/DatePicker/index.ios.js index ea53492b34a6..705792b0fad8 100644 --- a/src/components/DatePicker/index.ios.js +++ b/src/components/DatePicker/index.ios.js @@ -1,16 +1,16 @@ -import React, {useState, useRef, useCallback, useEffect} from 'react'; -import {Button, View, Keyboard} from 'react-native'; import RNDatePicker from '@react-native-community/datetimepicker'; -import moment from 'moment'; import isFunction from 'lodash/isFunction'; -import TextInput from '../TextInput'; -import Popover from '../Popover'; -import CONST from '../../CONST'; -import styles from '../../styles/styles'; -import themeColors from '../../styles/themes/default'; -import {propTypes, defaultProps} from './datepickerPropTypes'; -import useKeyboardState from '../../hooks/useKeyboardState'; -import useLocalize from '../../hooks/useLocalize'; +import moment from 'moment'; +import React, {useCallback, useEffect, useRef, useState} from 'react'; +import {Button, Keyboard, View} from 'react-native'; +import Popover from '@components/Popover'; +import TextInput from '@components/TextInput'; +import useKeyboardState from '@hooks/useKeyboardState'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; +import {defaultProps, propTypes} from './datepickerPropTypes'; function DatePicker({value, defaultValue, innerRef, onInputChange, preferredLocale, minDate, maxDate, label, disabled, onBlur, placeholder, containerStyles, errorText}) { const [isPickerVisible, setIsPickerVisible] = useState(false); diff --git a/src/components/DatePicker/index.js b/src/components/DatePicker/index.js index 163f120b8b98..a5b282b22c73 100644 --- a/src/components/DatePicker/index.js +++ b/src/components/DatePicker/index.js @@ -1,10 +1,10 @@ -import React, {useEffect, useRef} from 'react'; import moment from 'moment'; +import React, {useEffect, useRef} from 'react'; import _ from 'underscore'; -import TextInput from '../TextInput'; -import CONST from '../../CONST'; -import * as Browser from '../../libs/Browser'; -import {propTypes, defaultProps} from './datepickerPropTypes'; +import TextInput from '@components/TextInput'; +import * as Browser from '@libs/Browser'; +import CONST from '@src/CONST'; +import {defaultProps, propTypes} from './datepickerPropTypes'; import './styles.css'; function DatePicker({maxDate, minDate, onInputChange, innerRef, label, value, placeholder, errorText, containerStyles, disabled, onBlur}) { diff --git a/src/components/DeeplinkWrapper/DeeplinkRedirectLoadingIndicator.js b/src/components/DeeplinkWrapper/DeeplinkRedirectLoadingIndicator.js index 61614c7e49e6..671744a3d59c 100644 --- a/src/components/DeeplinkWrapper/DeeplinkRedirectLoadingIndicator.js +++ b/src/components/DeeplinkWrapper/DeeplinkRedirectLoadingIndicator.js @@ -1,19 +1,19 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import TextLink from '../TextLink'; -import Text from '../Text'; -import Icon from '../Icon'; -import * as Illustrations from '../Icon/Illustrations'; -import * as Expensicons from '../Icon/Expensicons'; -import themeColors from '../../styles/themes/default'; -import styles from '../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { openLinkInBrowser: PropTypes.func.isRequired, diff --git a/src/components/DeeplinkWrapper/index.website.js b/src/components/DeeplinkWrapper/index.website.js index 0cd7bfd93241..166818e4ae27 100644 --- a/src/components/DeeplinkWrapper/index.website.js +++ b/src/components/DeeplinkWrapper/index.website.js @@ -1,15 +1,15 @@ -import PropTypes from 'prop-types'; -import {useRef, useState, useEffect} from 'react'; import Str from 'expensify-common/lib/str'; +import PropTypes from 'prop-types'; +import {useEffect, useRef, useState} from 'react'; import _ from 'underscore'; -import * as Browser from '../../libs/Browser'; -import ROUTES from '../../ROUTES'; -import * as App from '../../libs/actions/App'; -import CONST from '../../CONST'; -import CONFIG from '../../CONFIG'; -import shouldPreventDeeplinkPrompt from '../../libs/Navigation/shouldPreventDeeplinkPrompt'; -import navigationRef from '../../libs/Navigation/navigationRef'; -import Navigation from '../../libs/Navigation/Navigation'; +import * as Browser from '@libs/Browser'; +import Navigation from '@libs/Navigation/Navigation'; +import navigationRef from '@libs/Navigation/navigationRef'; +import shouldPreventDeeplinkPrompt from '@libs/Navigation/shouldPreventDeeplinkPrompt'; +import * as App from '@userActions/App'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Children to render. */ diff --git a/src/components/DisplayNames/DisplayNamesTooltipItem.js b/src/components/DisplayNames/DisplayNamesTooltipItem.js index 16f0f3a6420d..bc4d35777185 100644 --- a/src/components/DisplayNames/DisplayNamesTooltipItem.js +++ b/src/components/DisplayNames/DisplayNamesTooltipItem.js @@ -1,8 +1,8 @@ import PropTypes from 'prop-types'; import React, {useCallback} from 'react'; -import styles from '../../styles/styles'; -import Text from '../Text'; -import UserDetailsTooltip from '../UserDetailsTooltip'; +import Text from '@components/Text'; +import UserDetailsTooltip from '@components/UserDetailsTooltip'; +import styles from '@styles/styles'; const propTypes = { index: PropTypes.number, diff --git a/src/components/DisplayNames/DisplayNamesWithTooltip.js b/src/components/DisplayNames/DisplayNamesWithTooltip.js index 0e8c435f4457..254ad3ff824f 100644 --- a/src/components/DisplayNames/DisplayNamesWithTooltip.js +++ b/src/components/DisplayNames/DisplayNamesWithTooltip.js @@ -1,12 +1,12 @@ +import lodashGet from 'lodash/get'; import React, {Fragment, useCallback, useRef} from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import styles from '../../styles/styles'; -import Text from '../Text'; -import Tooltip from '../Tooltip'; -import DisplayNamesTooltipItem from './DisplayNamesTooltipItem'; +import Text from '@components/Text'; +import Tooltip from '@components/Tooltip'; +import styles from '@styles/styles'; import {defaultProps, propTypes} from './displayNamesPropTypes'; +import DisplayNamesTooltipItem from './DisplayNamesTooltipItem'; function DisplayNamesWithToolTip(props) { const containerRef = useRef(null); diff --git a/src/components/DisplayNames/DisplayNamesWithoutTooltip.js b/src/components/DisplayNames/DisplayNamesWithoutTooltip.js index 66604d09673c..bdc26d4c3f8d 100644 --- a/src/components/DisplayNames/DisplayNamesWithoutTooltip.js +++ b/src/components/DisplayNames/DisplayNamesWithoutTooltip.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import React from 'react'; -import styles from '../../styles/styles'; -import Text from '../Text'; +import Text from '@components/Text'; +import styles from '@styles/styles'; const propTypes = { /** The full title of the DisplayNames component (not split up) */ diff --git a/src/components/DisplayNames/index.js b/src/components/DisplayNames/index.js index 197940d80ca6..52ec6fb89de2 100644 --- a/src/components/DisplayNames/index.js +++ b/src/components/DisplayNames/index.js @@ -1,7 +1,7 @@ import React from 'react'; -import DisplayNamesWithToolTip from './DisplayNamesWithTooltip'; -import DisplayNamesWithoutTooltip from './DisplayNamesWithoutTooltip'; import {defaultProps, propTypes} from './displayNamesPropTypes'; +import DisplayNamesWithoutTooltip from './DisplayNamesWithoutTooltip'; +import DisplayNamesWithToolTip from './DisplayNamesWithTooltip'; function DisplayNames(props) { if (!props.tooltipEnabled) { diff --git a/src/components/DisplayNames/index.native.js b/src/components/DisplayNames/index.native.js index f1b1d7d0b7b5..e0f9635c0132 100644 --- a/src/components/DisplayNames/index.native.js +++ b/src/components/DisplayNames/index.native.js @@ -1,6 +1,6 @@ import React from 'react'; -import {propTypes, defaultProps} from './displayNamesPropTypes'; -import Text from '../Text'; +import Text from '@components/Text'; +import {defaultProps, propTypes} from './displayNamesPropTypes'; // As we don't have to show tooltips of the Native platform so we simply render the full display names list. function DisplayNames(props) { diff --git a/src/components/DistanceEReceipt.js b/src/components/DistanceEReceipt.js index 98f50b1f682f..9a63ff3a9df5 100644 --- a/src/components/DistanceEReceipt.js +++ b/src/components/DistanceEReceipt.js @@ -1,23 +1,23 @@ -import React, {useMemo} from 'react'; -import {View, ScrollView} from 'react-native'; import lodashGet from 'lodash/get'; +import React, {useMemo} from 'react'; +import {ScrollView, View} from 'react-native'; import _ from 'underscore'; -import Text from './Text'; -import styles from '../styles/styles'; -import transactionPropTypes from './transactionPropTypes'; -import * as ReceiptUtils from '../libs/ReceiptUtils'; -import * as ReportUtils from '../libs/ReportUtils'; -import * as CurrencyUtils from '../libs/CurrencyUtils'; -import * as TransactionUtils from '../libs/TransactionUtils'; -import tryResolveUrlFromApiRoot from '../libs/tryResolveUrlFromApiRoot'; -import ThumbnailImage from './ThumbnailImage'; -import useLocalize from '../hooks/useLocalize'; +import EReceiptBackground from '@assets/images/eReceipt_background.svg'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import * as ReceiptUtils from '@libs/ReceiptUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import tryResolveUrlFromApiRoot from '@libs/tryResolveUrlFromApiRoot'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; import Icon from './Icon'; -import themeColors from '../styles/themes/default'; import * as Expensicons from './Icon/Expensicons'; -import EReceiptBackground from '../../assets/images/eReceipt_background.svg'; -import useNetwork from '../hooks/useNetwork'; import PendingMapView from './MapView/PendingMapView'; +import Text from './Text'; +import ThumbnailImage from './ThumbnailImage'; +import transactionPropTypes from './transactionPropTypes'; const propTypes = { /** The transaction for the distance request */ diff --git a/src/components/DistanceMapView/index.android.js b/src/components/DistanceMapView/index.android.js index ea72fb4de299..358b2f483a2b 100644 --- a/src/components/DistanceMapView/index.android.js +++ b/src/components/DistanceMapView/index.android.js @@ -1,13 +1,13 @@ import React, {useState} from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import BlockingView from '../BlockingViews/BlockingView'; -import MapView from '../MapView'; -import styles from '../../styles/styles'; -import useNetwork from '../../hooks/useNetwork'; -import useLocalize from '../../hooks/useLocalize'; -import * as Expensicons from '../Icon/Expensicons'; -import * as StyleUtils from '../../styles/StyleUtils'; +import BlockingView from '@components/BlockingViews/BlockingView'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MapView from '@components/MapView'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; import * as distanceMapViewPropTypes from './distanceMapViewPropTypes'; function DistanceMapView(props) { diff --git a/src/components/DistanceMapView/index.js b/src/components/DistanceMapView/index.js index 24bdf99382d1..49f47122dd4a 100644 --- a/src/components/DistanceMapView/index.js +++ b/src/components/DistanceMapView/index.js @@ -1,6 +1,6 @@ import React from 'react'; import _ from 'underscore'; -import MapView from '../MapView'; +import MapView from '@components/MapView'; import * as distanceMapViewPropTypes from './distanceMapViewPropTypes'; function DistanceMapView(props) { diff --git a/src/components/DistanceRequest/DistanceRequestFooter.js b/src/components/DistanceRequest/DistanceRequestFooter.js index eaa02968c388..e476b2fa6d34 100644 --- a/src/components/DistanceRequest/DistanceRequestFooter.js +++ b/src/components/DistanceRequest/DistanceRequestFooter.js @@ -1,22 +1,22 @@ -import React, {useMemo} from 'react'; -import {View} from 'react-native'; -import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; import lodashIsNil from 'lodash/isNil'; import PropTypes from 'prop-types'; +import React, {useMemo} from 'react'; +import {View} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import CONST from '../../CONST'; -import ONYXKEYS from '../../ONYXKEYS'; -import styles from '../../styles/styles'; -import useNetwork from '../../hooks/useNetwork'; -import useLocalize from '../../hooks/useLocalize'; -import theme from '../../styles/themes/default'; -import * as TransactionUtils from '../../libs/TransactionUtils'; -import Button from '../Button'; -import DistanceMapView from '../DistanceMapView'; -import * as Expensicons from '../Icon/Expensicons'; -import PendingMapView from '../MapView/PendingMapView'; -import transactionPropTypes from '../transactionPropTypes'; +import Button from '@components/Button'; +import DistanceMapView from '@components/DistanceMapView'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PendingMapView from '@components/MapView/PendingMapView'; +import transactionPropTypes from '@components/transactionPropTypes'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import styles from '@styles/styles'; +import theme from '@styles/themes/default'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const MAX_WAYPOINTS = 25; diff --git a/src/components/DistanceRequest/DistanceRequestRenderItem.js b/src/components/DistanceRequest/DistanceRequestRenderItem.js index 0e54635e82cc..0ee45febb21a 100644 --- a/src/components/DistanceRequest/DistanceRequestRenderItem.js +++ b/src/components/DistanceRequest/DistanceRequestRenderItem.js @@ -1,11 +1,11 @@ -import React from 'react'; import lodashGet from 'lodash/get'; -import _ from 'underscore'; import PropTypes from 'prop-types'; -import * as Expensicons from '../Icon/Expensicons'; -import MenuItemWithTopDescription from '../MenuItemWithTopDescription'; -import theme from '../../styles/themes/default'; -import useLocalize from '../../hooks/useLocalize'; +import React from 'react'; +import _ from 'underscore'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import useLocalize from '@hooks/useLocalize'; +import theme from '@styles/themes/default'; const propTypes = { /** The waypoints for the distance request */ diff --git a/src/components/DistanceRequest/index.js b/src/components/DistanceRequest/index.js index bd35678273ec..3a41d52eb7f4 100644 --- a/src/components/DistanceRequest/index.js +++ b/src/components/DistanceRequest/index.js @@ -1,32 +1,32 @@ -import React, {useCallback, useEffect, useMemo, useState, useRef} from 'react'; -import {View} from 'react-native'; -import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {View} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import ROUTES from '../../ROUTES'; -import ONYXKEYS from '../../ONYXKEYS'; -import styles from '../../styles/styles'; -import variables from '../../styles/variables'; -import * as MapboxToken from '../../libs/actions/MapboxToken'; -import useNetwork from '../../hooks/useNetwork'; -import useLocalize from '../../hooks/useLocalize'; -import Navigation from '../../libs/Navigation/Navigation'; -import reportPropTypes from '../../pages/reportPropTypes'; -import usePrevious from '../../hooks/usePrevious'; -import * as Transaction from '../../libs/actions/Transaction'; -import * as TransactionUtils from '../../libs/TransactionUtils'; -import * as IOUUtils from '../../libs/IOUUtils'; -import * as ErrorUtils from '../../libs/ErrorUtils'; -import Button from '../Button'; -import DraggableList from '../DraggableList'; -import transactionPropTypes from '../transactionPropTypes'; -import ScreenWrapper from '../ScreenWrapper'; -import FullPageNotFoundView from '../BlockingViews/FullPageNotFoundView'; -import HeaderWithBackButton from '../HeaderWithBackButton'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import Button from '@components/Button'; +import DotIndicatorMessage from '@components/DotIndicatorMessage'; +import DraggableList from '@components/DraggableList'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import transactionPropTypes from '@components/transactionPropTypes'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import usePrevious from '@hooks/usePrevious'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import * as IOUUtils from '@libs/IOUUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import * as MapboxToken from '@userActions/MapboxToken'; +import * as Transaction from '@userActions/Transaction'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import DistanceRequestFooter from './DistanceRequestFooter'; import DistanceRequestRenderItem from './DistanceRequestRenderItem'; -import DotIndicatorMessage from '../DotIndicatorMessage'; const propTypes = { /** The transactionID of this request */ diff --git a/src/components/DotIndicatorMessage.js b/src/components/DotIndicatorMessage.js index fc4d74339d6e..26e42c0b9ec7 100644 --- a/src/components/DotIndicatorMessage.js +++ b/src/components/DotIndicatorMessage.js @@ -1,14 +1,14 @@ -import React from 'react'; -import _ from 'underscore'; import PropTypes from 'prop-types'; +import React from 'react'; import {View} from 'react-native'; -import styles from '../styles/styles'; -import stylePropTypes from '../styles/stylePropTypes'; +import _ from 'underscore'; +import * as Localize from '@libs/Localize'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; -import themeColors from '../styles/themes/default'; import Text from './Text'; -import * as Localize from '../libs/Localize'; const propTypes = { /** diff --git a/src/components/DragAndDrop/Consumer/index.js b/src/components/DragAndDrop/Consumer/index.js index cf21afe627f4..5c9f16bc0bed 100644 --- a/src/components/DragAndDrop/Consumer/index.js +++ b/src/components/DragAndDrop/Consumer/index.js @@ -1,7 +1,7 @@ -import React, {useContext, useEffect} from 'react'; import {Portal} from '@gorhom/portal'; +import React, {useContext, useEffect} from 'react'; +import {DragAndDropContext} from '@components/DragAndDrop/Provider'; import dragAndDropConsumerPropTypes from './dragAndDropConsumerPropTypes'; -import {DragAndDropContext} from '../Provider'; function DragAndDropConsumer({children, onDrop}) { const {isDraggingOver, setOnDropHandler, dropZoneID} = useContext(DragAndDropContext); diff --git a/src/components/DragAndDrop/NoDropZone/index.js b/src/components/DragAndDrop/NoDropZone/index.js index 5573136a3bc7..ac5b759dee63 100644 --- a/src/components/DragAndDrop/NoDropZone/index.js +++ b/src/components/DragAndDrop/NoDropZone/index.js @@ -1,8 +1,8 @@ +import PropTypes from 'prop-types'; import React, {useRef} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../../../styles/styles'; -import useDragAndDrop from '../../../hooks/useDragAndDrop'; +import useDragAndDrop from '@hooks/useDragAndDrop'; +import styles from '@styles/styles'; const propTypes = { /** Content */ diff --git a/src/components/DragAndDrop/Provider/index.js b/src/components/DragAndDrop/Provider/index.js index f76bf13c99fd..c31b83a7d605 100644 --- a/src/components/DragAndDrop/Provider/index.js +++ b/src/components/DragAndDrop/Provider/index.js @@ -1,11 +1,11 @@ -import _ from 'underscore'; -import React, {useRef, useCallback, useEffect, useMemo} from 'react'; -import {View} from 'react-native'; import {PortalHost} from '@gorhom/portal'; import Str from 'expensify-common/lib/str'; +import React, {useCallback, useEffect, useMemo, useRef} from 'react'; +import {View} from 'react-native'; +import _ from 'underscore'; +import useDragAndDrop from '@hooks/useDragAndDrop'; +import styles from '@styles/styles'; import dragAndDropProviderPropTypes from './dragAndDropProviderPropTypes'; -import styles from '../../../styles/styles'; -import useDragAndDrop from '../../../hooks/useDragAndDrop'; const DragAndDropContext = React.createContext({}); diff --git a/src/components/DraggableList/index.native.tsx b/src/components/DraggableList/index.native.tsx index e3b7558c1e21..d7e42a5f5525 100644 --- a/src/components/DraggableList/index.native.tsx +++ b/src/components/DraggableList/index.native.tsx @@ -1,8 +1,8 @@ import React from 'react'; import DraggableFlatList from 'react-native-draggable-flatlist'; import {FlatList} from 'react-native-gesture-handler'; +import styles from '@styles/styles'; import type {DraggableListProps} from './types'; -import styles from '../../styles/styles'; function DraggableList({renderClone, shouldUsePortal, ...viewProps}: DraggableListProps, ref: React.ForwardedRef>) { return ( diff --git a/src/components/DraggableList/index.tsx b/src/components/DraggableList/index.tsx index ea9ac548e850..287b549d6d0a 100644 --- a/src/components/DraggableList/index.tsx +++ b/src/components/DraggableList/index.tsx @@ -1,9 +1,9 @@ import React, {useCallback} from 'react'; -import {DragDropContext, Droppable, Draggable, type OnDragEndResponder} from 'react-beautiful-dnd'; +import {DragDropContext, Draggable, Droppable, type OnDragEndResponder} from 'react-beautiful-dnd'; import {ScrollView} from 'react-native'; -import useDraggableInPortal from './useDraggableInPortal'; +import styles from '@styles/styles'; import type {DraggableListProps} from './types'; -import styles from '../../styles/styles'; +import useDraggableInPortal from './useDraggableInPortal'; type ReorderParams = { list: T[]; diff --git a/src/components/DraggableList/useDraggableInPortal.ts b/src/components/DraggableList/useDraggableInPortal.ts index 6b7f958d6a3e..3b4610ce1e5e 100644 --- a/src/components/DraggableList/useDraggableInPortal.ts +++ b/src/components/DraggableList/useDraggableInPortal.ts @@ -1,5 +1,5 @@ -import type {DraggableChildrenFn} from 'react-beautiful-dnd'; import {useEffect, useRef} from 'react'; +import type {DraggableChildrenFn} from 'react-beautiful-dnd'; import {createPortal} from 'react-dom'; type DraggableInPortal = { diff --git a/src/components/EReceipt.js b/src/components/EReceipt.js index 84daabb96c9b..7c186216a1fa 100644 --- a/src/components/EReceipt.js +++ b/src/components/EReceipt.js @@ -1,21 +1,21 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import ONYXKEYS from '../ONYXKEYS'; -import * as StyleUtils from '../styles/StyleUtils'; -import transactionPropTypes from './transactionPropTypes'; -import styles from '../styles/styles'; -import * as Expensicons from './Icon/Expensicons'; +import useLocalize from '@hooks/useLocalize'; +import * as CardUtils from '@libs/CardUtils'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import EReceiptThumbnail from './EReceiptThumbnail'; import Icon from './Icon'; +import * as Expensicons from './Icon/Expensicons'; import Text from './Text'; -import * as ReportUtils from '../libs/ReportUtils'; -import * as CurrencyUtils from '../libs/CurrencyUtils'; -import * as CardUtils from '../libs/CardUtils'; -import variables from '../styles/variables'; -import useLocalize from '../hooks/useLocalize'; -import EReceiptThumbnail from './EReceiptThumbnail'; -import CONST from '../CONST'; +import transactionPropTypes from './transactionPropTypes'; const propTypes = { /* TransactionID of the transaction this EReceipt corresponds to */ diff --git a/src/components/EReceiptThumbnail.js b/src/components/EReceiptThumbnail.js index f1bb5b025e2f..fc69601983f8 100644 --- a/src/components/EReceiptThumbnail.js +++ b/src/components/EReceiptThumbnail.js @@ -1,19 +1,19 @@ +import PropTypes from 'prop-types'; import React, {useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import ONYXKEYS from '../ONYXKEYS'; -import * as StyleUtils from '../styles/StyleUtils'; -import transactionPropTypes from './transactionPropTypes'; -import styles from '../styles/styles'; -import * as Expensicons from './Icon/Expensicons'; -import * as MCCIcons from './Icon/MCCIcons'; +import * as ReportUtils from '@libs/ReportUtils'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import Icon from './Icon'; -import * as ReportUtils from '../libs/ReportUtils'; -import variables from '../styles/variables'; import * as eReceiptBGs from './Icon/EReceiptBGs'; +import * as Expensicons from './Icon/Expensicons'; +import * as MCCIcons from './Icon/MCCIcons'; import Image from './Image'; -import CONST from '../CONST'; +import transactionPropTypes from './transactionPropTypes'; const propTypes = { /* TransactionID of the transaction this EReceipt corresponds to */ diff --git a/src/components/EmojiPicker/CategoryShortcutBar.js b/src/components/EmojiPicker/CategoryShortcutBar.js index 00fee688f986..bab1e344da40 100644 --- a/src/components/EmojiPicker/CategoryShortcutBar.js +++ b/src/components/EmojiPicker/CategoryShortcutBar.js @@ -1,8 +1,8 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import styles from '../../styles/styles'; +import styles from '@styles/styles'; import CategoryShortcutButton from './CategoryShortcutButton'; const propTypes = { diff --git a/src/components/EmojiPicker/CategoryShortcutButton.js b/src/components/EmojiPicker/CategoryShortcutButton.js index a7658ae0542d..132da7c540c2 100644 --- a/src/components/EmojiPicker/CategoryShortcutButton.js +++ b/src/components/EmojiPicker/CategoryShortcutButton.js @@ -1,15 +1,15 @@ -import React, {useState} from 'react'; import PropTypes from 'prop-types'; -import Icon from '../Icon'; -import Tooltip from '../Tooltip'; -import useLocalize from '../../hooks/useLocalize'; -import variables from '../../styles/variables'; -import styles from '../../styles/styles'; -import * as StyleUtils from '../../styles/StyleUtils'; -import getButtonState from '../../libs/getButtonState'; -import themeColors from '../../styles/themes/default'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; -import CONST from '../../CONST'; +import React, {useState} from 'react'; +import Icon from '@components/Icon'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Tooltip from '@components/Tooltip'; +import useLocalize from '@hooks/useLocalize'; +import getButtonState from '@libs/getButtonState'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; const propTypes = { /** The emoji code of the category header */ diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index 5c2f65e24b01..d0ba8f80f94b 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -1,15 +1,15 @@ -import React, {useState, useEffect, useRef, forwardRef, useImperativeHandle} from 'react'; +import PropTypes from 'prop-types'; +import React, {forwardRef, useEffect, useImperativeHandle, useRef, useState} from 'react'; import {Dimensions} from 'react-native'; import _ from 'underscore'; -import PropTypes from 'prop-types'; +import PopoverWithMeasuredContent from '@components/PopoverWithMeasuredContent'; +import withViewportOffsetTop from '@components/withViewportOffsetTop'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import calculateAnchorPosition from '@libs/calculateAnchorPosition'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; import EmojiPickerMenu from './EmojiPickerMenu'; -import CONST from '../../CONST'; -import styles from '../../styles/styles'; -import PopoverWithMeasuredContent from '../PopoverWithMeasuredContent'; -import withViewportOffsetTop from '../withViewportOffsetTop'; -import * as StyleUtils from '../../styles/StyleUtils'; -import calculateAnchorPosition from '../../libs/calculateAnchorPosition'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; const DEFAULT_ANCHOR_ORIGIN = { horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT, diff --git a/src/components/EmojiPicker/EmojiPickerButton.js b/src/components/EmojiPicker/EmojiPickerButton.js index 0d1426cbf987..0989e4df88c6 100644 --- a/src/components/EmojiPicker/EmojiPickerButton.js +++ b/src/components/EmojiPicker/EmojiPickerButton.js @@ -1,14 +1,14 @@ -import React, {useEffect, useRef} from 'react'; import PropTypes from 'prop-types'; -import styles from '../../styles/styles'; -import * as StyleUtils from '../../styles/StyleUtils'; -import getButtonState from '../../libs/getButtonState'; -import * as Expensicons from '../Icon/Expensicons'; -import Tooltip from '../Tooltip/PopoverAnchorTooltip'; -import Icon from '../Icon'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import * as EmojiPickerAction from '../../libs/actions/EmojiPickerAction'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; +import React, {useEffect, useRef} from 'react'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Tooltip from '@components/Tooltip/PopoverAnchorTooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import getButtonState from '@libs/getButtonState'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import * as EmojiPickerAction from '@userActions/EmojiPickerAction'; const propTypes = { /** Flag to disable the emoji picker button */ diff --git a/src/components/EmojiPicker/EmojiPickerButtonDropdown.js b/src/components/EmojiPicker/EmojiPickerButtonDropdown.js index a1a22d8c50dd..8a5a66444fda 100644 --- a/src/components/EmojiPicker/EmojiPickerButtonDropdown.js +++ b/src/components/EmojiPicker/EmojiPickerButtonDropdown.js @@ -1,17 +1,17 @@ -import React, {useRef, useEffect} from 'react'; import PropTypes from 'prop-types'; +import React, {useEffect, useRef} from 'react'; import {View} from 'react-native'; -import styles from '../../styles/styles'; -import CONST from '../../CONST'; -import * as StyleUtils from '../../styles/StyleUtils'; -import getButtonState from '../../libs/getButtonState'; -import * as Expensicons from '../Icon/Expensicons'; -import Tooltip from '../Tooltip'; -import Text from '../Text'; -import Icon from '../Icon'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import * as EmojiPickerAction from '../../libs/actions/EmojiPickerAction'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Text from '@components/Text'; +import Tooltip from '@components/Tooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import getButtonState from '@libs/getButtonState'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import * as EmojiPickerAction from '@userActions/EmojiPickerAction'; +import CONST from '@src/CONST'; const propTypes = { /** Flag to disable the emoji picker button */ diff --git a/src/components/EmojiPicker/EmojiPickerMenu/index.js b/src/components/EmojiPicker/EmojiPickerMenu/index.js index 38a47c9b2914..7dc53e958849 100755 --- a/src/components/EmojiPicker/EmojiPickerMenu/index.js +++ b/src/components/EmojiPicker/EmojiPickerMenu/index.js @@ -1,28 +1,28 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useCallback, useEffect, useRef, useState} from 'react'; -import {View, FlatList} from 'react-native'; +import {FlatList, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import CONST from '../../../CONST'; -import ONYXKEYS from '../../../ONYXKEYS'; -import styles from '../../../styles/styles'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import emojiAssets from '../../../../assets/emojis'; -import EmojiPickerMenuItem from '../EmojiPickerMenuItem'; -import Text from '../../Text'; -import withLocalize, {withLocalizePropTypes} from '../../withLocalize'; -import compose from '../../../libs/compose'; -import getOperatingSystem from '../../../libs/getOperatingSystem'; -import * as User from '../../../libs/actions/User'; -import EmojiSkinToneList from '../EmojiSkinToneList'; -import * as EmojiUtils from '../../../libs/EmojiUtils'; -import * as Browser from '../../../libs/Browser'; -import CategoryShortcutBar from '../CategoryShortcutBar'; -import TextInput from '../../TextInput'; -import isEnterWhileComposition from '../../../libs/KeyboardShortcut/isEnterWhileComposition'; -import canFocusInputOnScreenFocus from '../../../libs/canFocusInputOnScreenFocus'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; +import emojiAssets from '@assets/emojis'; +import CategoryShortcutBar from '@components/EmojiPicker/CategoryShortcutBar'; +import EmojiPickerMenuItem from '@components/EmojiPicker/EmojiPickerMenuItem'; +import EmojiSkinToneList from '@components/EmojiPicker/EmojiSkinToneList'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as Browser from '@libs/Browser'; +import canFocusInputOnScreenFocus from '@libs/canFocusInputOnScreenFocus'; +import compose from '@libs/compose'; +import * as EmojiUtils from '@libs/EmojiUtils'; +import getOperatingSystem from '@libs/getOperatingSystem'; +import isEnterWhileComposition from '@libs/KeyboardShortcut/isEnterWhileComposition'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Function to add the selected emoji to the main compose text input */ diff --git a/src/components/EmojiPicker/EmojiPickerMenu/index.native.js b/src/components/EmojiPicker/EmojiPickerMenu/index.native.js index b54b67294d40..140dd8f2625c 100644 --- a/src/components/EmojiPicker/EmojiPickerMenu/index.native.js +++ b/src/components/EmojiPicker/EmojiPickerMenu/index.native.js @@ -1,25 +1,25 @@ -import React, {useState, useMemo, useEffect} from 'react'; +import PropTypes from 'prop-types'; +import React, {useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import _ from 'underscore'; import Animated, {runOnUI, scrollTo, useAnimatedRef} from 'react-native-reanimated'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; -import compose from '../../../libs/compose'; -import CONST from '../../../CONST'; -import ONYXKEYS from '../../../ONYXKEYS'; -import styles from '../../../styles/styles'; -import emojis from '../../../../assets/emojis'; -import EmojiPickerMenuItem from '../EmojiPickerMenuItem'; -import Text from '../../Text'; -import withLocalize, {withLocalizePropTypes} from '../../withLocalize'; -import EmojiSkinToneList from '../EmojiSkinToneList'; -import * as EmojiUtils from '../../../libs/EmojiUtils'; -import * as User from '../../../libs/actions/User'; -import TextInput from '../../TextInput'; -import CategoryShortcutBar from '../CategoryShortcutBar'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import useSingleExecution from '../../../hooks/useSingleExecution'; +import _ from 'underscore'; +import emojis from '@assets/emojis'; +import CategoryShortcutBar from '@components/EmojiPicker/CategoryShortcutBar'; +import EmojiPickerMenuItem from '@components/EmojiPicker/EmojiPickerMenuItem'; +import EmojiSkinToneList from '@components/EmojiPicker/EmojiSkinToneList'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import useSingleExecution from '@hooks/useSingleExecution'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import compose from '@libs/compose'; +import * as EmojiUtils from '@libs/EmojiUtils'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Function to add the selected emoji to the main compose text input */ diff --git a/src/components/EmojiPicker/EmojiPickerMenuItem/index.js b/src/components/EmojiPicker/EmojiPickerMenuItem/index.js index 1b3e457f7525..90f7f966172f 100644 --- a/src/components/EmojiPicker/EmojiPickerMenuItem/index.js +++ b/src/components/EmojiPicker/EmojiPickerMenuItem/index.js @@ -1,12 +1,12 @@ -import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import styles from '../../../styles/styles'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import getButtonState from '../../../libs/getButtonState'; -import Text from '../../Text'; -import PressableWithoutFeedback from '../../Pressable/PressableWithoutFeedback'; -import CONST from '../../../CONST'; -import * as Browser from '../../../libs/Browser'; +import React, {PureComponent} from 'react'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Text from '@components/Text'; +import * as Browser from '@libs/Browser'; +import getButtonState from '@libs/getButtonState'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; const propTypes = { /** The unicode that is used to display the emoji */ diff --git a/src/components/EmojiPicker/EmojiPickerMenuItem/index.native.js b/src/components/EmojiPicker/EmojiPickerMenuItem/index.native.js index 54416a4a2518..099adf620af7 100644 --- a/src/components/EmojiPicker/EmojiPickerMenuItem/index.native.js +++ b/src/components/EmojiPicker/EmojiPickerMenuItem/index.native.js @@ -1,11 +1,11 @@ -import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import styles from '../../../styles/styles'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import getButtonState from '../../../libs/getButtonState'; -import Text from '../../Text'; -import PressableWithoutFeedback from '../../Pressable/PressableWithoutFeedback'; -import CONST from '../../../CONST'; +import React, {PureComponent} from 'react'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Text from '@components/Text'; +import getButtonState from '@libs/getButtonState'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; const propTypes = { /** The unicode that is used to display the emoji */ diff --git a/src/components/EmojiPicker/EmojiSkinToneList.js b/src/components/EmojiPicker/EmojiSkinToneList.js index 0c876910e746..edb8bf49e77f 100644 --- a/src/components/EmojiPicker/EmojiSkinToneList.js +++ b/src/components/EmojiPicker/EmojiSkinToneList.js @@ -1,15 +1,15 @@ -import _ from 'underscore'; -import React, {useState, useCallback} from 'react'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; -import styles from '../../styles/styles'; -import * as Emojis from '../../../assets/emojis'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import Text from '../Text'; +import React, {useCallback, useState} from 'react'; +import {View} from 'react-native'; +import _ from 'underscore'; +import * as Emojis from '@assets/emojis'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; import EmojiPickerMenuItem from './EmojiPickerMenuItem'; import getSkinToneEmojiFromIndex from './getSkinToneEmojiFromIndex'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; -import CONST from '../../CONST'; const propTypes = { /** Stores user's preferred skin tone */ diff --git a/src/components/EmojiPicker/getSkinToneEmojiFromIndex.js b/src/components/EmojiPicker/getSkinToneEmojiFromIndex.js index 1b0731876f4e..48f9e2177a73 100644 --- a/src/components/EmojiPicker/getSkinToneEmojiFromIndex.js +++ b/src/components/EmojiPicker/getSkinToneEmojiFromIndex.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import * as Emojis from '../../../assets/emojis'; +import * as Emojis from '@assets/emojis'; /** * Fetch the emoji code of selected skinTone diff --git a/src/components/EmojiSuggestions.js b/src/components/EmojiSuggestions.js index d7f7a8d6091a..2a15cfba995e 100644 --- a/src/components/EmojiSuggestions.js +++ b/src/components/EmojiSuggestions.js @@ -1,13 +1,13 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import styles from '../styles/styles'; -import * as StyleUtils from '../styles/StyleUtils'; -import * as EmojiUtils from '../libs/EmojiUtils'; -import Text from './Text'; -import getStyledTextArray from '../libs/GetStyledTextArray'; +import * as EmojiUtils from '@libs/EmojiUtils'; +import getStyledTextArray from '@libs/GetStyledTextArray'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; import AutoCompleteSuggestions from './AutoCompleteSuggestions'; +import Text from './Text'; const propTypes = { /** The index of the highlighted emoji */ diff --git a/src/components/EnvironmentBadge.js b/src/components/EnvironmentBadge.js index a83fcedfabe4..a9236fc50abe 100644 --- a/src/components/EnvironmentBadge.js +++ b/src/components/EnvironmentBadge.js @@ -1,10 +1,10 @@ import React from 'react'; -import CONST from '../CONST'; -import Badge from './Badge'; -import styles from '../styles/styles'; -import * as Environment from '../libs/Environment/Environment'; +import useEnvironment from '@hooks/useEnvironment'; +import * as Environment from '@libs/Environment/Environment'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; import pkg from '../../package.json'; -import useEnvironment from '../hooks/useEnvironment'; +import Badge from './Badge'; const ENVIRONMENT_SHORT_FORM = { [CONST.ENVIRONMENT.DEV]: 'DEV', diff --git a/src/components/ErrorBoundary/BaseErrorBoundary.js b/src/components/ErrorBoundary/BaseErrorBoundary.js index d626442e81dd..b532ca23b61b 100644 --- a/src/components/ErrorBoundary/BaseErrorBoundary.js +++ b/src/components/ErrorBoundary/BaseErrorBoundary.js @@ -1,8 +1,8 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {ErrorBoundary} from 'react-error-boundary'; -import BootSplash from '../../libs/BootSplash'; -import GenericErrorPage from '../../pages/ErrorPage/GenericErrorPage'; +import BootSplash from '@libs/BootSplash'; +import GenericErrorPage from '@pages/ErrorPage/GenericErrorPage'; const propTypes = { /* A message posted to `logError` (along with error data) when this component intercepts an error */ diff --git a/src/components/ErrorBoundary/index.js b/src/components/ErrorBoundary/index.js index 4a113fa040dd..c5498eb6f080 100644 --- a/src/components/ErrorBoundary/index.js +++ b/src/components/ErrorBoundary/index.js @@ -1,5 +1,5 @@ +import Log from '@libs/Log'; import BaseErrorBoundary from './BaseErrorBoundary'; -import Log from '../../libs/Log'; BaseErrorBoundary.defaultProps.logError = (errorMessage, error, errorInfo) => { // Log the error to the server diff --git a/src/components/ErrorBoundary/index.native.js b/src/components/ErrorBoundary/index.native.js index 68815acf670f..a7f6a68bb01f 100644 --- a/src/components/ErrorBoundary/index.native.js +++ b/src/components/ErrorBoundary/index.native.js @@ -1,7 +1,6 @@ import crashlytics from '@react-native-firebase/crashlytics'; - +import Log from '@libs/Log'; import BaseErrorBoundary from './BaseErrorBoundary'; -import Log from '../../libs/Log'; BaseErrorBoundary.defaultProps.logError = (errorMessage, error, errorInfo) => { // Log the error to the server diff --git a/src/components/ExceededCommentLength.js b/src/components/ExceededCommentLength.js index 9c785cec0395..43589be566ff 100644 --- a/src/components/ExceededCommentLength.js +++ b/src/components/ExceededCommentLength.js @@ -1,13 +1,13 @@ -import React, {useEffect, useState, useMemo} from 'react'; -import PropTypes from 'prop-types'; import {debounce} from 'lodash'; +import PropTypes from 'prop-types'; +import React, {useEffect, useMemo, useState} from 'react'; import {withOnyx} from 'react-native-onyx'; -import CONST from '../CONST'; -import * as ReportUtils from '../libs/ReportUtils'; -import useLocalize from '../hooks/useLocalize'; +import useLocalize from '@hooks/useLocalize'; +import * as ReportUtils from '@libs/ReportUtils'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import Text from './Text'; -import styles from '../styles/styles'; -import ONYXKEYS from '../ONYXKEYS'; const propTypes = { /** Report ID to get the comment from (used in withOnyx) */ diff --git a/src/components/ExpensifyWordmark.js b/src/components/ExpensifyWordmark.js index dde792e87e22..1fe6aee91e67 100644 --- a/src/components/ExpensifyWordmark.js +++ b/src/components/ExpensifyWordmark.js @@ -1,18 +1,18 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import ProductionLogo from '../../assets/images/expensify-wordmark.svg'; -import DevLogo from '../../assets/images/expensify-logo--dev.svg'; -import StagingLogo from '../../assets/images/expensify-logo--staging.svg'; -import AdHocLogo from '../../assets/images/expensify-logo--adhoc.svg'; -import CONST from '../CONST'; +import AdHocLogo from '@assets/images/expensify-logo--adhoc.svg'; +import DevLogo from '@assets/images/expensify-logo--dev.svg'; +import StagingLogo from '@assets/images/expensify-logo--staging.svg'; +import ProductionLogo from '@assets/images/expensify-wordmark.svg'; +import useEnvironment from '@hooks/useEnvironment'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions'; -import themeColors from '../styles/themes/default'; -import styles from '../styles/styles'; -import * as StyleUtils from '../styles/StyleUtils'; -import variables from '../styles/variables'; -import useEnvironment from '../hooks/useEnvironment'; const propTypes = { /** Additional styles to add to the component */ diff --git a/src/components/FeatureList.js b/src/components/FeatureList.js index 3e468abea8cc..94bb309edc84 100644 --- a/src/components/FeatureList.js +++ b/src/components/FeatureList.js @@ -1,11 +1,11 @@ -import _ from 'underscore'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import menuItemPropTypes from './menuItemPropTypes'; +import _ from 'underscore'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; import MenuItem from './MenuItem'; -import styles from '../styles/styles'; -import useLocalize from '../hooks/useLocalize'; +import menuItemPropTypes from './menuItemPropTypes'; import Text from './Text'; const propTypes = { diff --git a/src/components/FixedFooter.tsx b/src/components/FixedFooter.tsx index c44b9bf3d0e0..afda41f16d06 100644 --- a/src/components/FixedFooter.tsx +++ b/src/components/FixedFooter.tsx @@ -1,6 +1,6 @@ import React, {ReactNode} from 'react'; import {StyleProp, View, ViewStyle} from 'react-native'; -import styles from '../styles/styles'; +import styles from '@styles/styles'; type FixedFooterProps = { /** Children to wrap in FixedFooter. */ diff --git a/src/components/FlatList/index.android.js b/src/components/FlatList/index.android.js index d047124da914..fdb3a24667aa 100644 --- a/src/components/FlatList/index.android.js +++ b/src/components/FlatList/index.android.js @@ -1,7 +1,7 @@ +import {useFocusEffect} from '@react-navigation/native'; +import PropTypes from 'prop-types'; import React, {forwardRef, useCallback, useState} from 'react'; import {FlatList} from 'react-native'; -import PropTypes from 'prop-types'; -import {useFocusEffect} from '@react-navigation/native'; const propTypes = { /** Same as for FlatList */ diff --git a/src/components/FloatingActionButton.js b/src/components/FloatingActionButton.js index 947acf801f19..22f88cc53f59 100644 --- a/src/components/FloatingActionButton.js +++ b/src/components/FloatingActionButton.js @@ -1,15 +1,15 @@ +import PropTypes from 'prop-types'; import React, {PureComponent} from 'react'; import {Animated, Easing, View} from 'react-native'; -import PropTypes from 'prop-types'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; -import styles from '../styles/styles'; -import * as StyleUtils from '../styles/StyleUtils'; -import themeColors from '../styles/themes/default'; +import PressableWithFeedback from './Pressable/PressableWithFeedback'; import Tooltip from './Tooltip/PopoverAnchorTooltip'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import PressableWithFeedback from './Pressable/PressableWithFeedback'; -import variables from '../styles/variables'; const AnimatedIcon = Animated.createAnimatedComponent(Icon); AnimatedIcon.displayName = 'AnimatedIcon'; diff --git a/src/components/Form.js b/src/components/Form.js index 436af78a2b2c..4d3acf754715 100644 --- a/src/components/Form.js +++ b/src/components/Form.js @@ -1,23 +1,23 @@ -import React, {useState, useEffect, useCallback, useMemo, useRef} from 'react'; import lodashGet from 'lodash/get'; -import {Keyboard, ScrollView, StyleSheet} from 'react-native'; import PropTypes from 'prop-types'; -import _ from 'underscore'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {Keyboard, ScrollView, StyleSheet} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import compose from '../libs/compose'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import * as FormActions from '../libs/actions/FormActions'; -import * as ErrorUtils from '../libs/ErrorUtils'; -import styles from '../styles/styles'; -import CONST from '../CONST'; +import _ from 'underscore'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Visibility from '@libs/Visibility'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; +import * as FormActions from '@userActions/FormActions'; +import CONST from '@src/CONST'; import FormAlertWithSubmitButton from './FormAlertWithSubmitButton'; import FormSubmit from './FormSubmit'; +import networkPropTypes from './networkPropTypes'; +import {withNetwork} from './OnyxProvider'; import SafeAreaConsumer from './SafeAreaConsumer'; import ScrollViewWithContext from './ScrollViewWithContext'; -import stylePropTypes from '../styles/stylePropTypes'; -import {withNetwork} from './OnyxProvider'; -import networkPropTypes from './networkPropTypes'; -import Visibility from '../libs/Visibility'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { /** A unique Onyx key identifying the form */ diff --git a/src/components/Form/FormProvider.js b/src/components/Form/FormProvider.js index 75fef47bdbf8..92baa9727832 100644 --- a/src/components/Form/FormProvider.js +++ b/src/components/Form/FormProvider.js @@ -1,17 +1,17 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {createRef, useCallback, useMemo, useRef, useState} from 'react'; -import _ from 'underscore'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; -import Visibility from '../../libs/Visibility'; -import * as FormActions from '../../libs/actions/FormActions'; +import _ from 'underscore'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import compose from '@libs/compose'; +import Visibility from '@libs/Visibility'; +import stylePropTypes from '@styles/stylePropTypes'; +import * as FormActions from '@userActions/FormActions'; +import CONST from '@src/CONST'; import FormContext from './FormContext'; import FormWrapper from './FormWrapper'; -import compose from '../../libs/compose'; -import {withNetwork} from '../OnyxProvider'; -import stylePropTypes from '../../styles/stylePropTypes'; -import networkPropTypes from '../networkPropTypes'; -import CONST from '../../CONST'; const propTypes = { /** A unique Onyx key identifying the form */ diff --git a/src/components/Form/FormWrapper.js b/src/components/Form/FormWrapper.js index 82e70b68b3f0..55abcc1fc923 100644 --- a/src/components/Form/FormWrapper.js +++ b/src/components/Form/FormWrapper.js @@ -1,16 +1,15 @@ +import PropTypes from 'prop-types'; import React, {useCallback, useMemo, useRef} from 'react'; import {Keyboard, ScrollView, StyleSheet} from 'react-native'; -import _ from 'underscore'; -import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; -import * as ErrorUtils from '../../libs/ErrorUtils'; -import FormSubmit from '../FormSubmit'; -import FormAlertWithSubmitButton from '../FormAlertWithSubmitButton'; -import styles from '../../styles/styles'; -import SafeAreaConsumer from '../SafeAreaConsumer'; -import ScrollViewWithContext from '../ScrollViewWithContext'; - -import stylePropTypes from '../../styles/stylePropTypes'; +import _ from 'underscore'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import FormSubmit from '@components/FormSubmit'; +import SafeAreaConsumer from '@components/SafeAreaConsumer'; +import ScrollViewWithContext from '@components/ScrollViewWithContext'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; import errorsPropType from './errorsPropType'; const propTypes = { diff --git a/src/components/Form/InputWrapper.js b/src/components/Form/InputWrapper.js index 8a87bc2f5a5a..99237fd8db43 100644 --- a/src/components/Form/InputWrapper.js +++ b/src/components/Form/InputWrapper.js @@ -1,5 +1,5 @@ -import React, {forwardRef, useContext} from 'react'; import PropTypes from 'prop-types'; +import React, {forwardRef, useContext} from 'react'; import FormContext from './FormContext'; const propTypes = { diff --git a/src/components/FormAlertWithSubmitButton.js b/src/components/FormAlertWithSubmitButton.js index 33d188719d11..1ffbf0d667e2 100644 --- a/src/components/FormAlertWithSubmitButton.js +++ b/src/components/FormAlertWithSubmitButton.js @@ -1,8 +1,8 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import styles from '../styles/styles'; +import styles from '@styles/styles'; import Button from './Button'; import FormAlertWrapper from './FormAlertWrapper'; diff --git a/src/components/FormAlertWrapper.js b/src/components/FormAlertWrapper.js index 67e031ce6ab6..87304ee5dc3e 100644 --- a/src/components/FormAlertWrapper.js +++ b/src/components/FormAlertWrapper.js @@ -1,16 +1,16 @@ -import _ from 'underscore'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; import React from 'react'; +import {View} from 'react-native'; +import _ from 'underscore'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import FormHelpMessage from './FormHelpMessage'; +import networkPropTypes from './networkPropTypes'; import {withNetwork} from './OnyxProvider'; import RenderHTML from './RenderHTML'; import Text from './Text'; import TextLink from './TextLink'; -import compose from '../libs/compose'; -import networkPropTypes from './networkPropTypes'; -import styles from '../styles/styles'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import FormHelpMessage from './FormHelpMessage'; const propTypes = { /** Wrapped child components */ diff --git a/src/components/FormElement.js b/src/components/FormElement.js index f46b24708c4c..cc9423a6147f 100644 --- a/src/components/FormElement.js +++ b/src/components/FormElement.js @@ -1,6 +1,6 @@ import React, {forwardRef} from 'react'; import {View} from 'react-native'; -import * as ComponentUtils from '../libs/ComponentUtils'; +import * as ComponentUtils from '@libs/ComponentUtils'; const FormElement = forwardRef((props, ref) => ( ; diff --git a/src/components/Icon/DefaultAvatars.js b/src/components/Icon/DefaultAvatars.js index 2c143f68705d..698c2ce7368c 100644 --- a/src/components/Icon/DefaultAvatars.js +++ b/src/components/Icon/DefaultAvatars.js @@ -1,27 +1,27 @@ -import Avatar1 from '../../../assets/images/avatars/user/default-avatar_1.svg'; -import Avatar2 from '../../../assets/images/avatars/user/default-avatar_2.svg'; -import Avatar3 from '../../../assets/images/avatars/user/default-avatar_3.svg'; -import Avatar4 from '../../../assets/images/avatars/user/default-avatar_4.svg'; -import Avatar5 from '../../../assets/images/avatars/user/default-avatar_5.svg'; -import Avatar6 from '../../../assets/images/avatars/user/default-avatar_6.svg'; -import Avatar7 from '../../../assets/images/avatars/user/default-avatar_7.svg'; -import Avatar8 from '../../../assets/images/avatars/user/default-avatar_8.svg'; -import Avatar9 from '../../../assets/images/avatars/user/default-avatar_9.svg'; -import Avatar10 from '../../../assets/images/avatars/user/default-avatar_10.svg'; -import Avatar11 from '../../../assets/images/avatars/user/default-avatar_11.svg'; -import Avatar12 from '../../../assets/images/avatars/user/default-avatar_12.svg'; -import Avatar13 from '../../../assets/images/avatars/user/default-avatar_13.svg'; -import Avatar14 from '../../../assets/images/avatars/user/default-avatar_14.svg'; -import Avatar15 from '../../../assets/images/avatars/user/default-avatar_15.svg'; -import Avatar16 from '../../../assets/images/avatars/user/default-avatar_16.svg'; -import Avatar17 from '../../../assets/images/avatars/user/default-avatar_17.svg'; -import Avatar18 from '../../../assets/images/avatars/user/default-avatar_18.svg'; -import Avatar19 from '../../../assets/images/avatars/user/default-avatar_19.svg'; -import Avatar20 from '../../../assets/images/avatars/user/default-avatar_20.svg'; -import Avatar21 from '../../../assets/images/avatars/user/default-avatar_21.svg'; -import Avatar22 from '../../../assets/images/avatars/user/default-avatar_22.svg'; -import Avatar23 from '../../../assets/images/avatars/user/default-avatar_23.svg'; -import Avatar24 from '../../../assets/images/avatars/user/default-avatar_24.svg'; +import Avatar1 from '@assets/images/avatars/user/default-avatar_1.svg'; +import Avatar2 from '@assets/images/avatars/user/default-avatar_2.svg'; +import Avatar3 from '@assets/images/avatars/user/default-avatar_3.svg'; +import Avatar4 from '@assets/images/avatars/user/default-avatar_4.svg'; +import Avatar5 from '@assets/images/avatars/user/default-avatar_5.svg'; +import Avatar6 from '@assets/images/avatars/user/default-avatar_6.svg'; +import Avatar7 from '@assets/images/avatars/user/default-avatar_7.svg'; +import Avatar8 from '@assets/images/avatars/user/default-avatar_8.svg'; +import Avatar9 from '@assets/images/avatars/user/default-avatar_9.svg'; +import Avatar10 from '@assets/images/avatars/user/default-avatar_10.svg'; +import Avatar11 from '@assets/images/avatars/user/default-avatar_11.svg'; +import Avatar12 from '@assets/images/avatars/user/default-avatar_12.svg'; +import Avatar13 from '@assets/images/avatars/user/default-avatar_13.svg'; +import Avatar14 from '@assets/images/avatars/user/default-avatar_14.svg'; +import Avatar15 from '@assets/images/avatars/user/default-avatar_15.svg'; +import Avatar16 from '@assets/images/avatars/user/default-avatar_16.svg'; +import Avatar17 from '@assets/images/avatars/user/default-avatar_17.svg'; +import Avatar18 from '@assets/images/avatars/user/default-avatar_18.svg'; +import Avatar19 from '@assets/images/avatars/user/default-avatar_19.svg'; +import Avatar20 from '@assets/images/avatars/user/default-avatar_20.svg'; +import Avatar21 from '@assets/images/avatars/user/default-avatar_21.svg'; +import Avatar22 from '@assets/images/avatars/user/default-avatar_22.svg'; +import Avatar23 from '@assets/images/avatars/user/default-avatar_23.svg'; +import Avatar24 from '@assets/images/avatars/user/default-avatar_24.svg'; export { Avatar1, diff --git a/src/components/Icon/EReceiptBGs.js b/src/components/Icon/EReceiptBGs.js index ff74c0fb83c2..16c23f4a99d4 100644 --- a/src/components/Icon/EReceiptBGs.js +++ b/src/components/Icon/EReceiptBGs.js @@ -1,8 +1,8 @@ -import EReceiptBG_Yellow from '../../../assets/images/eReceiptBGs/eReceiptBG_yellow.png'; -import EReceiptBG_Ice from '../../../assets/images/eReceiptBGs/eReceiptBG_navy.png'; -import EReceiptBG_Blue from '../../../assets/images/eReceiptBGs/eReceiptBG_blue.png'; -import EReceiptBG_Green from '../../../assets/images/eReceiptBGs/eReceiptBG_green.png'; -import EReceiptBG_Tangerine from '../../../assets/images/eReceiptBGs/eReceiptBG_tangerine.png'; -import EReceiptBG_Pink from '../../../assets/images/eReceiptBGs/eReceiptBG_pink.png'; +import EReceiptBG_Blue from '@assets/images/eReceiptBGs/eReceiptBG_blue.png'; +import EReceiptBG_Green from '@assets/images/eReceiptBGs/eReceiptBG_green.png'; +import EReceiptBG_Ice from '@assets/images/eReceiptBGs/eReceiptBG_navy.png'; +import EReceiptBG_Pink from '@assets/images/eReceiptBGs/eReceiptBG_pink.png'; +import EReceiptBG_Tangerine from '@assets/images/eReceiptBGs/eReceiptBG_tangerine.png'; +import EReceiptBG_Yellow from '@assets/images/eReceiptBGs/eReceiptBG_yellow.png'; export {EReceiptBG_Yellow, EReceiptBG_Ice, EReceiptBG_Blue, EReceiptBG_Green, EReceiptBG_Tangerine, EReceiptBG_Pink}; diff --git a/src/components/Icon/Expensicons.js b/src/components/Icon/Expensicons.js index e15db475597d..a4aa6b13cb29 100644 --- a/src/components/Icon/Expensicons.js +++ b/src/components/Icon/Expensicons.js @@ -1,132 +1,132 @@ -import ActiveRoomAvatar from '../../../assets/images/avatars/room.svg'; -import AdminRoomAvatar from '../../../assets/images/avatars/admin-room.svg'; -import Android from '../../../assets/images/android.svg'; -import AnnounceRoomAvatar from '../../../assets/images/avatars/announce-room.svg'; -import Apple from '../../../assets/images/apple.svg'; -import AppleLogo from '../../../assets/images/signIn/apple-logo.svg'; -import ArrowRight from '../../../assets/images/arrow-right.svg'; -import ArrowRightLong from '../../../assets/images/arrow-right-long.svg'; -import ArrowsUpDown from '../../../assets/images/arrows-updown.svg'; -import BackArrow from '../../../assets/images/back-left.svg'; -import Bank from '../../../assets/images/bank.svg'; -import Bell from '../../../assets/images/bell.svg'; -import BellSlash from '../../../assets/images/bellSlash.svg'; -import Bill from '../../../assets/images/bill.svg'; -import Bolt from '../../../assets/images/bolt.svg'; -import Briefcase from '../../../assets/images/briefcase.svg'; -import Bug from '../../../assets/images/bug.svg'; -import Building from '../../../assets/images/building.svg'; -import Calendar from '../../../assets/images/calendar.svg'; -import Camera from '../../../assets/images/camera.svg'; -import Car from '../../../assets/images/car.svg'; -import Cash from '../../../assets/images/cash.svg'; -import ChatBubble from '../../../assets/images/chatbubble.svg'; -import ChatBubbles from '../../../assets/images/chatbubbles.svg'; -import Checkmark from '../../../assets/images/checkmark.svg'; -import Chair from '../../../assets/images/chair.svg'; -import Close from '../../../assets/images/close.svg'; -import ClosedSign from '../../../assets/images/closed-sign.svg'; -import Collapse from '../../../assets/images/collapse.svg'; -import Concierge from '../../../assets/images/concierge.svg'; -import ConciergeAvatar from '../../../assets/images/avatars/concierge-avatar.svg'; -import Connect from '../../../assets/images/connect.svg'; -import Copy from '../../../assets/images/copy.svg'; -import CreditCard from '../../../assets/images/creditcard.svg'; -import Document from '../../../assets/images/document.svg'; -import DeletedRoomAvatar from '../../../assets/images/avatars/deleted-room.svg'; -import DomainRoomAvatar from '../../../assets/images/avatars/domain-room.svg'; -import DotIndicator from '../../../assets/images/dot-indicator.svg'; -import DotIndicatorUnfilled from '../../../assets/images/dot-indicator-unfilled.svg'; -import DownArrow from '../../../assets/images/down.svg'; -import Download from '../../../assets/images/download.svg'; -import DragHandles from '../../../assets/images/drag-handles.svg'; -import Emoji from '../../../assets/images/emoji.svg'; -import EmptyStateRoutePending from '../../../assets/images/emptystate__routepending.svg'; -import Exclamation from '../../../assets/images/exclamation.svg'; -import Exit from '../../../assets/images/exit.svg'; -import ExpensifyCard from '../../../assets/images/expensifycard.svg'; -import ExpensifyWordmark from '../../../assets/images/expensify-wordmark.svg'; -import Expand from '../../../assets/images/expand.svg'; -import Eye from '../../../assets/images/eye.svg'; -import EyeDisabled from '../../../assets/images/eye-disabled.svg'; -import Flag from '../../../assets/images/flag.svg'; -import FlagLevelOne from '../../../assets/images/flag_level_01.svg'; -import FlagLevelTwo from '../../../assets/images/flag_level_02.svg'; -import FlagLevelThree from '../../../assets/images/flag_level_03.svg'; -import Gallery from '../../../assets/images/gallery.svg'; -import Gear from '../../../assets/images/gear.svg'; -import Globe from '../../../assets/images/globe.svg'; -import GoogleLogo from '../../../assets/images/signIn/google-logo.svg'; -import Hashtag from '../../../assets/images/hashtag.svg'; -import Heart from '../../../assets/images/heart.svg'; -import History from '../../../assets/images/history.svg'; -import Hourglass from '../../../assets/images/hourglass.svg'; -import ImageCropCircleMask from '../../../assets/images/image-crop-circle-mask.svg'; -import ImageCropSquareMask from '../../../assets/images/image-crop-square-mask.svg'; -import Info from '../../../assets/images/info.svg'; -import Invoice from '../../../assets/images/invoice.svg'; -import Key from '../../../assets/images/key.svg'; -import Keyboard from '../../../assets/images/keyboard.svg'; -import Link from '../../../assets/images/link.svg'; -import LinkCopy from '../../../assets/images/link-copy.svg'; -import Location from '../../../assets/images/location.svg'; -import Lock from '../../../assets/images/lock.svg'; +import AddReaction from '@assets/images/add-reaction.svg'; +import Android from '@assets/images/android.svg'; +import Apple from '@assets/images/apple.svg'; +import ArrowRightLong from '@assets/images/arrow-right-long.svg'; +import ArrowRight from '@assets/images/arrow-right.svg'; +import UpArrow from '@assets/images/arrow-up.svg'; +import ArrowsUpDown from '@assets/images/arrows-updown.svg'; +import AdminRoomAvatar from '@assets/images/avatars/admin-room.svg'; +import AnnounceRoomAvatar from '@assets/images/avatars/announce-room.svg'; +import ConciergeAvatar from '@assets/images/avatars/concierge-avatar.svg'; +import DeletedRoomAvatar from '@assets/images/avatars/deleted-room.svg'; +import DomainRoomAvatar from '@assets/images/avatars/domain-room.svg'; +import FallbackAvatar from '@assets/images/avatars/fallback-avatar.svg'; +import FallbackWorkspaceAvatar from '@assets/images/avatars/fallback-workspace-avatar.svg'; +import ActiveRoomAvatar from '@assets/images/avatars/room.svg'; +import BackArrow from '@assets/images/back-left.svg'; +import Bank from '@assets/images/bank.svg'; +import Bell from '@assets/images/bell.svg'; +import BellSlash from '@assets/images/bellSlash.svg'; +import Bill from '@assets/images/bill.svg'; +import Bolt from '@assets/images/bolt.svg'; +import Briefcase from '@assets/images/briefcase.svg'; +import Bug from '@assets/images/bug.svg'; +import Building from '@assets/images/building.svg'; +import Calendar from '@assets/images/calendar.svg'; +import Camera from '@assets/images/camera.svg'; +import Car from '@assets/images/car.svg'; +import Cash from '@assets/images/cash.svg'; +import Chair from '@assets/images/chair.svg'; +import ChatBubble from '@assets/images/chatbubble.svg'; +import ChatBubbles from '@assets/images/chatbubbles.svg'; +import Checkmark from '@assets/images/checkmark.svg'; +import Close from '@assets/images/close.svg'; +import ClosedSign from '@assets/images/closed-sign.svg'; +import Collapse from '@assets/images/collapse.svg'; +import Concierge from '@assets/images/concierge.svg'; +import Connect from '@assets/images/connect.svg'; +import Copy from '@assets/images/copy.svg'; +import CreditCard from '@assets/images/creditcard.svg'; +import Document from '@assets/images/document.svg'; +import DotIndicatorUnfilled from '@assets/images/dot-indicator-unfilled.svg'; +import DotIndicator from '@assets/images/dot-indicator.svg'; +import DownArrow from '@assets/images/down.svg'; +import Download from '@assets/images/download.svg'; +import DragAndDrop from '@assets/images/drag-and-drop.svg'; +import DragHandles from '@assets/images/drag-handles.svg'; +import Emoji from '@assets/images/emoji.svg'; +import EmptyStateRoutePending from '@assets/images/emptystate__routepending.svg'; +import EReceiptIcon from '@assets/images/eReceiptIcon.svg'; +import Exclamation from '@assets/images/exclamation.svg'; +import Exit from '@assets/images/exit.svg'; +import Expand from '@assets/images/expand.svg'; +import ExpensifyFooterLogoVertical from '@assets/images/expensify-footer-logo-vertical.svg'; +import ExpensifyFooterLogo from '@assets/images/expensify-footer-logo.svg'; +import ExpensifyWordmark from '@assets/images/expensify-wordmark.svg'; +import ExpensifyCard from '@assets/images/expensifycard.svg'; +import EyeDisabled from '@assets/images/eye-disabled.svg'; +import Eye from '@assets/images/eye.svg'; +import Flag from '@assets/images/flag.svg'; +import FlagLevelOne from '@assets/images/flag_level_01.svg'; +import FlagLevelTwo from '@assets/images/flag_level_02.svg'; +import FlagLevelThree from '@assets/images/flag_level_03.svg'; +import Gallery from '@assets/images/gallery.svg'; +import Gear from '@assets/images/gear.svg'; +import Globe from '@assets/images/globe.svg'; +import Hashtag from '@assets/images/hashtag.svg'; +import Heart from '@assets/images/heart.svg'; +import History from '@assets/images/history.svg'; +import Hourglass from '@assets/images/hourglass.svg'; +import ImageCropCircleMask from '@assets/images/image-crop-circle-mask.svg'; +import ImageCropSquareMask from '@assets/images/image-crop-square-mask.svg'; +import Info from '@assets/images/info.svg'; +import Invoice from '@assets/images/invoice.svg'; +import Key from '@assets/images/key.svg'; +import Keyboard from '@assets/images/keyboard.svg'; +import LinkCopy from '@assets/images/link-copy.svg'; +import Link from '@assets/images/link.svg'; +import Location from '@assets/images/location.svg'; +import Lock from '@assets/images/lock.svg'; +import Luggage from '@assets/images/luggage.svg'; +import MagnifyingGlass from '@assets/images/magnifying-glass.svg'; +import Mail from '@assets/images/mail.svg'; +import Megaphone from '@assets/images/megaphone.svg'; +import Menu from '@assets/images/menu.svg'; +import MoneyBag from '@assets/images/money-bag.svg'; +import MoneyCircle from '@assets/images/money-circle.svg'; +import Monitor from '@assets/images/monitor.svg'; +import NewWindow from '@assets/images/new-window.svg'; +import NewWorkspace from '@assets/images/new-workspace.svg'; +import OfflineCloud from '@assets/images/offline-cloud.svg'; +import Offline from '@assets/images/offline.svg'; +import Paperclip from '@assets/images/paperclip.svg'; +import Paycheck from '@assets/images/paycheck.svg'; +import Pencil from '@assets/images/pencil.svg'; +import Phone from '@assets/images/phone.svg'; +import Pin from '@assets/images/pin.svg'; +import Plus from '@assets/images/plus.svg'; +import Printer from '@assets/images/printer.svg'; +import Profile from '@assets/images/profile.svg'; +import QrCode from '@assets/images/qrcode.svg'; +import QuestionMark from '@assets/images/question-mark-circle.svg'; +import ReceiptSearch from '@assets/images/receipt-search.svg'; +import Receipt from '@assets/images/receipt.svg'; +import Rotate from '@assets/images/rotate-image.svg'; +import RotateLeft from '@assets/images/rotate-left.svg'; +import Send from '@assets/images/send.svg'; +import Shield from '@assets/images/shield.svg'; +import AppleLogo from '@assets/images/signIn/apple-logo.svg'; +import GoogleLogo from '@assets/images/signIn/google-logo.svg'; +import Facebook from '@assets/images/social-facebook.svg'; +import Instagram from '@assets/images/social-instagram.svg'; +import Linkedin from '@assets/images/social-linkedin.svg'; +import Podcast from '@assets/images/social-podcast.svg'; +import Twitter from '@assets/images/social-twitter.svg'; +import Youtube from '@assets/images/social-youtube.svg'; +import Sync from '@assets/images/sync.svg'; +import Task from '@assets/images/task.svg'; +import ThreeDots from '@assets/images/three-dots.svg'; +import Transfer from '@assets/images/transfer.svg'; +import Trashcan from '@assets/images/trashcan.svg'; +import Unlock from '@assets/images/unlock.svg'; +import UploadAlt from '@assets/images/upload-alt.svg'; +import Upload from '@assets/images/upload.svg'; +import User from '@assets/images/user.svg'; +import Users from '@assets/images/users.svg'; +import Wallet from '@assets/images/wallet.svg'; +import Workspace from '@assets/images/workspace-default-avatar.svg'; +import Zoom from '@assets/images/zoom.svg'; import LoungeAccess from './svgs/LoungeAccessIcon'; -import Luggage from '../../../assets/images/luggage.svg'; -import MagnifyingGlass from '../../../assets/images/magnifying-glass.svg'; -import Mail from '../../../assets/images/mail.svg'; -import Megaphone from '../../../assets/images/megaphone.svg'; -import Menu from '../../../assets/images/menu.svg'; -import MoneyBag from '../../../assets/images/money-bag.svg'; -import MoneyCircle from '../../../assets/images/money-circle.svg'; -import Monitor from '../../../assets/images/monitor.svg'; -import NewWindow from '../../../assets/images/new-window.svg'; -import NewWorkspace from '../../../assets/images/new-workspace.svg'; -import Offline from '../../../assets/images/offline.svg'; -import OfflineCloud from '../../../assets/images/offline-cloud.svg'; -import Paperclip from '../../../assets/images/paperclip.svg'; -import Paycheck from '../../../assets/images/paycheck.svg'; -import Pencil from '../../../assets/images/pencil.svg'; -import Phone from '../../../assets/images/phone.svg'; -import Pin from '../../../assets/images/pin.svg'; -import Plus from '../../../assets/images/plus.svg'; -import Printer from '../../../assets/images/printer.svg'; -import Profile from '../../../assets/images/profile.svg'; -import QrCode from '../../../assets/images/qrcode.svg'; -import QuestionMark from '../../../assets/images/question-mark-circle.svg'; -import Receipt from '../../../assets/images/receipt.svg'; -import ReceiptSearch from '../../../assets/images/receipt-search.svg'; -import Rotate from '../../../assets/images/rotate-image.svg'; -import RotateLeft from '../../../assets/images/rotate-left.svg'; -import Send from '../../../assets/images/send.svg'; -import Shield from '../../../assets/images/shield.svg'; -import Sync from '../../../assets/images/sync.svg'; -import ThreeDots from '../../../assets/images/three-dots.svg'; -import Transfer from '../../../assets/images/transfer.svg'; -import Trashcan from '../../../assets/images/trashcan.svg'; -import Unlock from '../../../assets/images/unlock.svg'; -import UpArrow from '../../../assets/images/arrow-up.svg'; -import Upload from '../../../assets/images/upload.svg'; -import UploadAlt from '../../../assets/images/upload-alt.svg'; -import User from '../../../assets/images/user.svg'; -import Users from '../../../assets/images/users.svg'; -import Wallet from '../../../assets/images/wallet.svg'; -import Workspace from '../../../assets/images/workspace-default-avatar.svg'; -import Zoom from '../../../assets/images/zoom.svg'; -import FallbackAvatar from '../../../assets/images/avatars/fallback-avatar.svg'; -import FallbackWorkspaceAvatar from '../../../assets/images/avatars/fallback-workspace-avatar.svg'; -import DragAndDrop from '../../../assets/images/drag-and-drop.svg'; -import ExpensifyFooterLogo from '../../../assets/images/expensify-footer-logo.svg'; -import ExpensifyFooterLogoVertical from '../../../assets/images/expensify-footer-logo-vertical.svg'; -import Twitter from '../../../assets/images/social-twitter.svg'; -import Youtube from '../../../assets/images/social-youtube.svg'; -import Facebook from '../../../assets/images/social-facebook.svg'; -import Podcast from '../../../assets/images/social-podcast.svg'; -import Linkedin from '../../../assets/images/social-linkedin.svg'; -import Instagram from '../../../assets/images/social-instagram.svg'; -import AddReaction from '../../../assets/images/add-reaction.svg'; -import Task from '../../../assets/images/task.svg'; -import EReceiptIcon from '../../../assets/images/eReceiptIcon.svg'; export { ActiveRoomAvatar, diff --git a/src/components/Icon/Illustrations.js b/src/components/Icon/Illustrations.js index c9a86cf8f10c..728e5b830fa6 100644 --- a/src/components/Icon/Illustrations.js +++ b/src/components/Icon/Illustrations.js @@ -1,52 +1,52 @@ -import Abracadabra from '../../../assets/images/product-illustrations/abracadabra.svg'; -import BankArrowPink from '../../../assets/images/product-illustrations/bank-arrow--pink.svg'; -import BankMouseGreen from '../../../assets/images/product-illustrations/bank-mouse--green.svg'; -import BankUserGreen from '../../../assets/images/product-illustrations/bank-user--green.svg'; -import ChatBubbles from '../../../assets/images/simple-illustrations/simple-illustration__chatbubbles.svg'; -import CoffeeMug from '../../../assets/images/simple-illustrations/simple-illustration__coffeemug.svg'; -import ConciergeBlue from '../../../assets/images/product-illustrations/concierge--blue.svg'; -import ConciergeExclamation from '../../../assets/images/product-illustrations/concierge--exclamation.svg'; -import CreditCardsBlue from '../../../assets/images/product-illustrations/credit-cards--blue.svg'; -import EmailAddress from '../../../assets/images/simple-illustrations/simple-illustration__email-address.svg'; -import InvoiceOrange from '../../../assets/images/product-illustrations/invoice--orange.svg'; -import JewelBoxBlue from '../../../assets/images/product-illustrations/jewel-box--blue.svg'; -import JewelBoxGreen from '../../../assets/images/product-illustrations/jewel-box--green.svg'; -import JewelBoxPink from '../../../assets/images/product-illustrations/jewel-box--pink.svg'; -import JewelBoxYellow from '../../../assets/images/product-illustrations/jewel-box--yellow.svg'; -import MagicCode from '../../../assets/images/product-illustrations/magic-code.svg'; -import MoneyEnvelopeBlue from '../../../assets/images/product-illustrations/money-envelope--blue.svg'; -import MoneyMousePink from '../../../assets/images/product-illustrations/money-mouse--pink.svg'; -import ReceiptsSearchYellow from '../../../assets/images/product-illustrations/receipts-search--yellow.svg'; -import ReceiptYellow from '../../../assets/images/product-illustrations/receipt--yellow.svg'; -import RocketBlue from '../../../assets/images/product-illustrations/rocket--blue.svg'; -import RocketOrange from '../../../assets/images/product-illustrations/rocket--orange.svg'; -import SafeBlue from '../../../assets/images/product-illustrations/safe.svg'; -import SanFrancisco from '../../../assets/images/simple-illustrations/simple-illustration__sanfrancisco.svg'; -import TadaYellow from '../../../assets/images/product-illustrations/tada--yellow.svg'; -import TadaBlue from '../../../assets/images/product-illustrations/tada--blue.svg'; -import ToddBehindCloud from '../../../assets/images/product-illustrations/todd-behind-cloud.svg'; -import GpsTrackOrange from '../../../assets/images/product-illustrations/gps-track--orange.svg'; -import ShieldYellow from '../../../assets/images/simple-illustrations/simple-illustration__shield.svg'; -import MoneyReceipts from '../../../assets/images/simple-illustrations/simple-illustration__money-receipts.svg'; -import PinkBill from '../../../assets/images/simple-illustrations/simple-illustration__bill.svg'; -import CreditCardsNew from '../../../assets/images/simple-illustrations/simple-illustration__credit-cards.svg'; -import InvoiceBlue from '../../../assets/images/simple-illustrations/simple-illustration__invoice.svg'; -import LockOpen from '../../../assets/images/simple-illustrations/simple-illustration__lockopen.svg'; -import Lounge from '../../../assets/images/product-illustrations/lounge.svg'; -import Luggage from '../../../assets/images/simple-illustrations/simple-illustration__luggage.svg'; -import MoneyIntoWallet from '../../../assets/images/simple-illustrations/simple-illustration__moneyintowallet.svg'; -import MoneyWings from '../../../assets/images/simple-illustrations/simple-illustration__moneywings.svg'; -import OpenSafe from '../../../assets/images/simple-illustrations/simple-illustration__opensafe.svg'; -import TrackShoe from '../../../assets/images/simple-illustrations/simple-illustration__track-shoe.svg'; -import BankArrow from '../../../assets/images/simple-illustrations/simple-illustration__bank-arrow.svg'; -import ConciergeBubble from '../../../assets/images/simple-illustrations/simple-illustration__concierge-bubble.svg'; -import ConciergeNew from '../../../assets/images/simple-illustrations/simple-illustration__concierge.svg'; -import MoneyBadge from '../../../assets/images/simple-illustrations/simple-illustration__moneybadge.svg'; -import TreasureChest from '../../../assets/images/simple-illustrations/simple-illustration__treasurechest.svg'; -import ThumbsUpStars from '../../../assets/images/simple-illustrations/simple-illustration__thumbsupstars.svg'; -import Hands from '../../../assets/images/product-illustrations/home-illustration-hands.svg'; -import HandEarth from '../../../assets/images/simple-illustrations/simple-illustration__handearth.svg'; -import SmartScan from '../../../assets/images/product-illustrations/simple-illustration__smartscan.svg'; +import Abracadabra from '@assets/images/product-illustrations/abracadabra.svg'; +import BankArrowPink from '@assets/images/product-illustrations/bank-arrow--pink.svg'; +import BankMouseGreen from '@assets/images/product-illustrations/bank-mouse--green.svg'; +import BankUserGreen from '@assets/images/product-illustrations/bank-user--green.svg'; +import ConciergeBlue from '@assets/images/product-illustrations/concierge--blue.svg'; +import ConciergeExclamation from '@assets/images/product-illustrations/concierge--exclamation.svg'; +import CreditCardsBlue from '@assets/images/product-illustrations/credit-cards--blue.svg'; +import GpsTrackOrange from '@assets/images/product-illustrations/gps-track--orange.svg'; +import Hands from '@assets/images/product-illustrations/home-illustration-hands.svg'; +import InvoiceOrange from '@assets/images/product-illustrations/invoice--orange.svg'; +import JewelBoxBlue from '@assets/images/product-illustrations/jewel-box--blue.svg'; +import JewelBoxGreen from '@assets/images/product-illustrations/jewel-box--green.svg'; +import JewelBoxPink from '@assets/images/product-illustrations/jewel-box--pink.svg'; +import JewelBoxYellow from '@assets/images/product-illustrations/jewel-box--yellow.svg'; +import Lounge from '@assets/images/product-illustrations/lounge.svg'; +import MagicCode from '@assets/images/product-illustrations/magic-code.svg'; +import MoneyEnvelopeBlue from '@assets/images/product-illustrations/money-envelope--blue.svg'; +import MoneyMousePink from '@assets/images/product-illustrations/money-mouse--pink.svg'; +import ReceiptYellow from '@assets/images/product-illustrations/receipt--yellow.svg'; +import ReceiptsSearchYellow from '@assets/images/product-illustrations/receipts-search--yellow.svg'; +import RocketBlue from '@assets/images/product-illustrations/rocket--blue.svg'; +import RocketOrange from '@assets/images/product-illustrations/rocket--orange.svg'; +import SafeBlue from '@assets/images/product-illustrations/safe.svg'; +import SmartScan from '@assets/images/product-illustrations/simple-illustration__smartscan.svg'; +import TadaBlue from '@assets/images/product-illustrations/tada--blue.svg'; +import TadaYellow from '@assets/images/product-illustrations/tada--yellow.svg'; +import ToddBehindCloud from '@assets/images/product-illustrations/todd-behind-cloud.svg'; +import BankArrow from '@assets/images/simple-illustrations/simple-illustration__bank-arrow.svg'; +import PinkBill from '@assets/images/simple-illustrations/simple-illustration__bill.svg'; +import ChatBubbles from '@assets/images/simple-illustrations/simple-illustration__chatbubbles.svg'; +import CoffeeMug from '@assets/images/simple-illustrations/simple-illustration__coffeemug.svg'; +import ConciergeBubble from '@assets/images/simple-illustrations/simple-illustration__concierge-bubble.svg'; +import ConciergeNew from '@assets/images/simple-illustrations/simple-illustration__concierge.svg'; +import CreditCardsNew from '@assets/images/simple-illustrations/simple-illustration__credit-cards.svg'; +import EmailAddress from '@assets/images/simple-illustrations/simple-illustration__email-address.svg'; +import HandEarth from '@assets/images/simple-illustrations/simple-illustration__handearth.svg'; +import InvoiceBlue from '@assets/images/simple-illustrations/simple-illustration__invoice.svg'; +import LockOpen from '@assets/images/simple-illustrations/simple-illustration__lockopen.svg'; +import Luggage from '@assets/images/simple-illustrations/simple-illustration__luggage.svg'; +import MoneyReceipts from '@assets/images/simple-illustrations/simple-illustration__money-receipts.svg'; +import MoneyBadge from '@assets/images/simple-illustrations/simple-illustration__moneybadge.svg'; +import MoneyIntoWallet from '@assets/images/simple-illustrations/simple-illustration__moneyintowallet.svg'; +import MoneyWings from '@assets/images/simple-illustrations/simple-illustration__moneywings.svg'; +import OpenSafe from '@assets/images/simple-illustrations/simple-illustration__opensafe.svg'; +import SanFrancisco from '@assets/images/simple-illustrations/simple-illustration__sanfrancisco.svg'; +import ShieldYellow from '@assets/images/simple-illustrations/simple-illustration__shield.svg'; +import ThumbsUpStars from '@assets/images/simple-illustrations/simple-illustration__thumbsupstars.svg'; +import TrackShoe from '@assets/images/simple-illustrations/simple-illustration__track-shoe.svg'; +import TreasureChest from '@assets/images/simple-illustrations/simple-illustration__treasurechest.svg'; export { Abracadabra, diff --git a/src/components/Icon/MCCIcons.js b/src/components/Icon/MCCIcons.js index a704f7d46bc6..922fb274f23d 100644 --- a/src/components/Icon/MCCIcons.js +++ b/src/components/Icon/MCCIcons.js @@ -1,15 +1,15 @@ -import Airlines from '../../../assets/images/MCCGroupIcons/MCC-Airlines.svg'; -import Commuter from '../../../assets/images/MCCGroupIcons/MCC-Commuter.svg'; -import Gas from '../../../assets/images/MCCGroupIcons/MCC-Gas.svg'; -import Goods from '../../../assets/images/MCCGroupIcons/MCC-Goods.svg'; -import Groceries from '../../../assets/images/MCCGroupIcons/MCC-Groceries.svg'; -import Hotel from '../../../assets/images/MCCGroupIcons/MCC-Hotel.svg'; -import Mail from '../../../assets/images/MCCGroupIcons/MCC-Mail.svg'; -import Meals from '../../../assets/images/MCCGroupIcons/MCC-Meals.svg'; -import Rental from '../../../assets/images/MCCGroupIcons/MCC-RentalCar.svg'; -import Services from '../../../assets/images/MCCGroupIcons/MCC-Services.svg'; -import Taxi from '../../../assets/images/MCCGroupIcons/MCC-Taxi.svg'; -import Miscellaneous from '../../../assets/images/MCCGroupIcons/MCC-Misc.svg'; -import Utilities from '../../../assets/images/MCCGroupIcons/MCC-Utilities.svg'; +import Airlines from '@assets/images/MCCGroupIcons/MCC-Airlines.svg'; +import Commuter from '@assets/images/MCCGroupIcons/MCC-Commuter.svg'; +import Gas from '@assets/images/MCCGroupIcons/MCC-Gas.svg'; +import Goods from '@assets/images/MCCGroupIcons/MCC-Goods.svg'; +import Groceries from '@assets/images/MCCGroupIcons/MCC-Groceries.svg'; +import Hotel from '@assets/images/MCCGroupIcons/MCC-Hotel.svg'; +import Mail from '@assets/images/MCCGroupIcons/MCC-Mail.svg'; +import Meals from '@assets/images/MCCGroupIcons/MCC-Meals.svg'; +import Miscellaneous from '@assets/images/MCCGroupIcons/MCC-Misc.svg'; +import Rental from '@assets/images/MCCGroupIcons/MCC-RentalCar.svg'; +import Services from '@assets/images/MCCGroupIcons/MCC-Services.svg'; +import Taxi from '@assets/images/MCCGroupIcons/MCC-Taxi.svg'; +import Utilities from '@assets/images/MCCGroupIcons/MCC-Utilities.svg'; export {Airlines, Commuter, Gas, Goods, Groceries, Hotel, Mail, Meals, Rental, Services, Taxi, Miscellaneous, Utilities}; diff --git a/src/components/Icon/WorkspaceDefaultAvatars.js b/src/components/Icon/WorkspaceDefaultAvatars.js index 0f5490b981bd..53d2ca088118 100644 --- a/src/components/Icon/WorkspaceDefaultAvatars.js +++ b/src/components/Icon/WorkspaceDefaultAvatars.js @@ -1,40 +1,40 @@ -import Workspace0 from '../../../assets/images/avatars/workspace/default-avatar_0.svg'; -import Workspace1 from '../../../assets/images/avatars/workspace/default-avatar_1.svg'; -import Workspace2 from '../../../assets/images/avatars/workspace/default-avatar_2.svg'; -import Workspace3 from '../../../assets/images/avatars/workspace/default-avatar_3.svg'; -import Workspace4 from '../../../assets/images/avatars/workspace/default-avatar_4.svg'; -import Workspace5 from '../../../assets/images/avatars/workspace/default-avatar_5.svg'; -import Workspace6 from '../../../assets/images/avatars/workspace/default-avatar_6.svg'; -import Workspace7 from '../../../assets/images/avatars/workspace/default-avatar_7.svg'; -import Workspace8 from '../../../assets/images/avatars/workspace/default-avatar_8.svg'; -import Workspace9 from '../../../assets/images/avatars/workspace/default-avatar_9.svg'; -import WorkspaceA from '../../../assets/images/avatars/workspace/default-avatar_a.svg'; -import WorkspaceB from '../../../assets/images/avatars/workspace/default-avatar_b.svg'; -import WorkspaceC from '../../../assets/images/avatars/workspace/default-avatar_c.svg'; -import WorkspaceD from '../../../assets/images/avatars/workspace/default-avatar_d.svg'; -import WorkspaceE from '../../../assets/images/avatars/workspace/default-avatar_e.svg'; -import WorkspaceF from '../../../assets/images/avatars/workspace/default-avatar_f.svg'; -import WorkspaceG from '../../../assets/images/avatars/workspace/default-avatar_g.svg'; -import WorkspaceH from '../../../assets/images/avatars/workspace/default-avatar_h.svg'; -import WorkspaceI from '../../../assets/images/avatars/workspace/default-avatar_i.svg'; -import WorkspaceJ from '../../../assets/images/avatars/workspace/default-avatar_j.svg'; -import WorkspaceK from '../../../assets/images/avatars/workspace/default-avatar_k.svg'; -import WorkspaceL from '../../../assets/images/avatars/workspace/default-avatar_l.svg'; -import WorkspaceM from '../../../assets/images/avatars/workspace/default-avatar_m.svg'; -import WorkspaceN from '../../../assets/images/avatars/workspace/default-avatar_n.svg'; -import WorkspaceO from '../../../assets/images/avatars/workspace/default-avatar_o.svg'; -import WorkspaceP from '../../../assets/images/avatars/workspace/default-avatar_p.svg'; -import WorkspaceQ from '../../../assets/images/avatars/workspace/default-avatar_q.svg'; -import WorkspaceR from '../../../assets/images/avatars/workspace/default-avatar_r.svg'; -import WorkspaceS from '../../../assets/images/avatars/workspace/default-avatar_s.svg'; -import WorkspaceT from '../../../assets/images/avatars/workspace/default-avatar_t.svg'; -import WorkspaceU from '../../../assets/images/avatars/workspace/default-avatar_u.svg'; -import WorkspaceV from '../../../assets/images/avatars/workspace/default-avatar_v.svg'; -import WorkspaceW from '../../../assets/images/avatars/workspace/default-avatar_w.svg'; -import WorkspaceX from '../../../assets/images/avatars/workspace/default-avatar_x.svg'; -import WorkspaceY from '../../../assets/images/avatars/workspace/default-avatar_y.svg'; -import WorkspaceZ from '../../../assets/images/avatars/workspace/default-avatar_z.svg'; -import WorkspaceBuilding from '../../../assets/images/avatars/workspace/default-avatar_building.svg'; +import Workspace0 from '@assets/images/avatars/workspace/default-avatar_0.svg'; +import Workspace1 from '@assets/images/avatars/workspace/default-avatar_1.svg'; +import Workspace2 from '@assets/images/avatars/workspace/default-avatar_2.svg'; +import Workspace3 from '@assets/images/avatars/workspace/default-avatar_3.svg'; +import Workspace4 from '@assets/images/avatars/workspace/default-avatar_4.svg'; +import Workspace5 from '@assets/images/avatars/workspace/default-avatar_5.svg'; +import Workspace6 from '@assets/images/avatars/workspace/default-avatar_6.svg'; +import Workspace7 from '@assets/images/avatars/workspace/default-avatar_7.svg'; +import Workspace8 from '@assets/images/avatars/workspace/default-avatar_8.svg'; +import Workspace9 from '@assets/images/avatars/workspace/default-avatar_9.svg'; +import WorkspaceA from '@assets/images/avatars/workspace/default-avatar_a.svg'; +import WorkspaceB from '@assets/images/avatars/workspace/default-avatar_b.svg'; +import WorkspaceBuilding from '@assets/images/avatars/workspace/default-avatar_building.svg'; +import WorkspaceC from '@assets/images/avatars/workspace/default-avatar_c.svg'; +import WorkspaceD from '@assets/images/avatars/workspace/default-avatar_d.svg'; +import WorkspaceE from '@assets/images/avatars/workspace/default-avatar_e.svg'; +import WorkspaceF from '@assets/images/avatars/workspace/default-avatar_f.svg'; +import WorkspaceG from '@assets/images/avatars/workspace/default-avatar_g.svg'; +import WorkspaceH from '@assets/images/avatars/workspace/default-avatar_h.svg'; +import WorkspaceI from '@assets/images/avatars/workspace/default-avatar_i.svg'; +import WorkspaceJ from '@assets/images/avatars/workspace/default-avatar_j.svg'; +import WorkspaceK from '@assets/images/avatars/workspace/default-avatar_k.svg'; +import WorkspaceL from '@assets/images/avatars/workspace/default-avatar_l.svg'; +import WorkspaceM from '@assets/images/avatars/workspace/default-avatar_m.svg'; +import WorkspaceN from '@assets/images/avatars/workspace/default-avatar_n.svg'; +import WorkspaceO from '@assets/images/avatars/workspace/default-avatar_o.svg'; +import WorkspaceP from '@assets/images/avatars/workspace/default-avatar_p.svg'; +import WorkspaceQ from '@assets/images/avatars/workspace/default-avatar_q.svg'; +import WorkspaceR from '@assets/images/avatars/workspace/default-avatar_r.svg'; +import WorkspaceS from '@assets/images/avatars/workspace/default-avatar_s.svg'; +import WorkspaceT from '@assets/images/avatars/workspace/default-avatar_t.svg'; +import WorkspaceU from '@assets/images/avatars/workspace/default-avatar_u.svg'; +import WorkspaceV from '@assets/images/avatars/workspace/default-avatar_v.svg'; +import WorkspaceW from '@assets/images/avatars/workspace/default-avatar_w.svg'; +import WorkspaceX from '@assets/images/avatars/workspace/default-avatar_x.svg'; +import WorkspaceY from '@assets/images/avatars/workspace/default-avatar_y.svg'; +import WorkspaceZ from '@assets/images/avatars/workspace/default-avatar_z.svg'; export { Workspace0, diff --git a/src/components/Icon/index.js b/src/components/Icon/index.js index 5cdd5c79704d..d4d95ca117d4 100644 --- a/src/components/Icon/index.js +++ b/src/components/Icon/index.js @@ -1,10 +1,10 @@ +import PropTypes from 'prop-types'; import React, {PureComponent} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import themeColors from '../../styles/themes/default'; -import variables from '../../styles/variables'; -import styles from '../../styles/styles'; -import * as StyleUtils from '../../styles/StyleUtils'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; import IconWrapperStyles from './IconWrapperStyles'; const propTypes = { diff --git a/src/components/Icon/svgs/LoungeAccessIcon.js b/src/components/Icon/svgs/LoungeAccessIcon.js index b00fbb312c85..9117fb24bb42 100644 --- a/src/components/Icon/svgs/LoungeAccessIcon.js +++ b/src/components/Icon/svgs/LoungeAccessIcon.js @@ -1,7 +1,7 @@ +import PropTypes from 'prop-types'; import * as React from 'react'; import Svg, {G, Path, Polygon} from 'react-native-svg'; -import PropTypes from 'prop-types'; -import themeColors from '../../../styles/themes/default'; +import themeColors from '@styles/themes/default'; const propTypes = { /** The fill color for the icon. Can be hex, rgb, rgba, or valid react-native named color such as 'red' or 'blue'. */ diff --git a/src/components/IllustratedHeaderPageLayout.js b/src/components/IllustratedHeaderPageLayout.js index c45f5e2452dd..54a3b0e7b07c 100644 --- a/src/components/IllustratedHeaderPageLayout.js +++ b/src/components/IllustratedHeaderPageLayout.js @@ -1,10 +1,10 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import Lottie from './Lottie'; -import headerWithBackButtonPropTypes from './HeaderWithBackButton/headerWithBackButtonPropTypes'; -import styles from '../styles/styles'; -import themeColors from '../styles/themes/default'; +import React from 'react'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; import HeaderPageLayout from './HeaderPageLayout'; +import headerWithBackButtonPropTypes from './HeaderWithBackButton/headerWithBackButtonPropTypes'; +import Lottie from './Lottie'; const propTypes = { ...headerWithBackButtonPropTypes, diff --git a/src/components/Image/imagePropTypes.js b/src/components/Image/imagePropTypes.js index c02e48eef659..78bd48ba47ec 100644 --- a/src/components/Image/imagePropTypes.js +++ b/src/components/Image/imagePropTypes.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; -import stylePropTypes from '../../styles/stylePropTypes'; -import sourcePropTypes from './sourcePropTypes'; +import stylePropTypes from '@styles/stylePropTypes'; import RESIZE_MODES from './resizeModes'; +import sourcePropTypes from './sourcePropTypes'; const imagePropTypes = { /** Styles for the Image */ diff --git a/src/components/Image/index.js b/src/components/Image/index.js index 7434c16c6491..c2800511ff45 100644 --- a/src/components/Image/index.js +++ b/src/components/Image/index.js @@ -1,9 +1,9 @@ +import lodashGet from 'lodash/get'; import React, {useEffect, useMemo} from 'react'; import {Image as RNImage} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; import _ from 'underscore'; -import ONYXKEYS from '../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; import {defaultProps, imagePropTypes} from './imagePropTypes'; import RESIZE_MODES from './resizeModes'; diff --git a/src/components/Image/index.native.js b/src/components/Image/index.native.js index 9d9ad600b1d4..52ac503081e6 100644 --- a/src/components/Image/index.native.js +++ b/src/components/Image/index.native.js @@ -1,9 +1,9 @@ +import lodashGet from 'lodash/get'; import React from 'react'; import RNFastImage from 'react-native-fast-image'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import CONST from '../../CONST'; -import ONYXKEYS from '../../ONYXKEYS'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import {defaultProps, imagePropTypes} from './imagePropTypes'; import RESIZE_MODES from './resizeModes'; diff --git a/src/components/ImageView/index.js b/src/components/ImageView/index.js index 1d90a5723016..09656d700917 100644 --- a/src/components/ImageView/index.js +++ b/src/components/ImageView/index.js @@ -1,13 +1,13 @@ -import React, {useState, useEffect, useRef, useCallback} from 'react'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useRef, useState} from 'react'; import {View} from 'react-native'; -import Image from '../Image'; -import styles from '../../styles/styles'; -import * as StyleUtils from '../../styles/StyleUtils'; -import * as DeviceCapabilities from '../../libs/DeviceCapabilities'; -import FullscreenLoadingIndicator from '../FullscreenLoadingIndicator'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; -import CONST from '../../CONST'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import Image from '@components/Image'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; const propTypes = { /** Whether source url requires authentication */ diff --git a/src/components/ImageView/index.native.js b/src/components/ImageView/index.native.js index b365f507a4fc..dd17e2d27a4e 100644 --- a/src/components/ImageView/index.native.js +++ b/src/components/ImageView/index.native.js @@ -1,13 +1,13 @@ -import React, {useState, useRef, useEffect} from 'react'; import PropTypes from 'prop-types'; -import {View, PanResponder} from 'react-native'; +import React, {useEffect, useRef, useState} from 'react'; +import {PanResponder, View} from 'react-native'; import ImageZoom from 'react-native-image-pan-zoom'; import _ from 'underscore'; -import styles from '../../styles/styles'; -import variables from '../../styles/variables'; -import FullscreenLoadingIndicator from '../FullscreenLoadingIndicator'; -import Image from '../Image'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import Image from '@components/Image'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; /** * On the native layer, we use a image library to handle zoom functionality diff --git a/src/components/ImageWithSizeCalculation.js b/src/components/ImageWithSizeCalculation.js index 6aa87d07f23e..5db78e0c1276 100644 --- a/src/components/ImageWithSizeCalculation.js +++ b/src/components/ImageWithSizeCalculation.js @@ -1,9 +1,9 @@ -import _ from 'underscore'; -import React, {useState, useRef, useEffect} from 'react'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; -import Log from '../libs/Log'; -import styles from '../styles/styles'; +import React, {useEffect, useRef, useState} from 'react'; +import {View} from 'react-native'; +import _ from 'underscore'; +import Log from '@libs/Log'; +import styles from '@styles/styles'; import FullscreenLoadingIndicator from './FullscreenLoadingIndicator'; import Image from './Image'; diff --git a/src/components/Indicator.js b/src/components/Indicator.js index 24eb20ad5eee..046c3ca523e1 100644 --- a/src/components/Indicator.js +++ b/src/components/Indicator.js @@ -1,21 +1,21 @@ -import _ from 'underscore'; +import PropTypes from 'prop-types'; import React from 'react'; import {StyleSheet, View} from 'react-native'; -import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; -import styles from '../styles/styles'; -import ONYXKEYS from '../ONYXKEYS'; -import policyMemberPropType from '../pages/policyMemberPropType'; +import _ from 'underscore'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as UserUtils from '@libs/UserUtils'; +import userWalletPropTypes from '@pages/EnablePayments/userWalletPropTypes'; +import walletTermsPropTypes from '@pages/EnablePayments/walletTermsPropTypes'; +import policyMemberPropType from '@pages/policyMemberPropType'; +import * as ReimbursementAccountProps from '@pages/ReimbursementAccount/reimbursementAccountPropTypes'; +import {policyPropTypes} from '@pages/workspace/withPolicy'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import ONYXKEYS from '@src/ONYXKEYS'; import bankAccountPropTypes from './bankAccountPropTypes'; import cardPropTypes from './cardPropTypes'; -import userWalletPropTypes from '../pages/EnablePayments/userWalletPropTypes'; -import {policyPropTypes} from '../pages/workspace/withPolicy'; -import walletTermsPropTypes from '../pages/EnablePayments/walletTermsPropTypes'; -import * as PolicyUtils from '../libs/PolicyUtils'; -import * as PaymentMethods from '../libs/actions/PaymentMethods'; -import * as ReimbursementAccountProps from '../pages/ReimbursementAccount/reimbursementAccountPropTypes'; -import * as UserUtils from '../libs/UserUtils'; -import themeColors from '../styles/themes/default'; const propTypes = { /* Onyx Props */ diff --git a/src/components/InlineCodeBlock/WrappedText.js b/src/components/InlineCodeBlock/WrappedText.js index 14bab44f2126..e28f0f6b1f55 100644 --- a/src/components/InlineCodeBlock/WrappedText.js +++ b/src/components/InlineCodeBlock/WrappedText.js @@ -1,10 +1,10 @@ -import _ from 'underscore'; +import PropTypes from 'prop-types'; import React, {Fragment} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../../styles/styles'; -import Text from '../Text'; -import CONST from '../../CONST'; +import _ from 'underscore'; +import Text from '@components/Text'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; /** * Breaks the text into matrix diff --git a/src/components/InlineCodeBlock/index.js b/src/components/InlineCodeBlock/index.js index 7610ba4fa583..84666931d9b2 100644 --- a/src/components/InlineCodeBlock/index.js +++ b/src/components/InlineCodeBlock/index.js @@ -1,7 +1,7 @@ -import React from 'react'; import _ from 'lodash'; +import React from 'react'; +import Text from '@components/Text'; import inlineCodeBlockPropTypes from './inlineCodeBlockPropTypes'; -import Text from '../Text'; function InlineCodeBlock(props) { const TDefaultRenderer = props.TDefaultRenderer; diff --git a/src/components/InlineCodeBlock/index.native.js b/src/components/InlineCodeBlock/index.native.js index 2aa718832180..ff92ebbbcb9e 100644 --- a/src/components/InlineCodeBlock/index.native.js +++ b/src/components/InlineCodeBlock/index.native.js @@ -1,7 +1,7 @@ import React from 'react'; -import styles from '../../styles/styles'; -import WrappedText from './WrappedText'; +import styles from '@styles/styles'; import inlineCodeBlockPropTypes from './inlineCodeBlockPropTypes'; +import WrappedText from './WrappedText'; function InlineCodeBlock(props) { const TDefaultRenderer = props.TDefaultRenderer; diff --git a/src/components/InlineErrorText.js b/src/components/InlineErrorText.js index ea701a3f6e8e..80438eea8b5f 100644 --- a/src/components/InlineErrorText.js +++ b/src/components/InlineErrorText.js @@ -1,7 +1,7 @@ -import _ from 'underscore'; -import React from 'react'; import PropTypes from 'prop-types'; -import styles from '../styles/styles'; +import React from 'react'; +import _ from 'underscore'; +import styles from '@styles/styles'; import Text from './Text'; const propTypes = { diff --git a/src/components/InlineSystemMessage.tsx b/src/components/InlineSystemMessage.tsx index 31d102590681..e9de0111cd23 100644 --- a/src/components/InlineSystemMessage.tsx +++ b/src/components/InlineSystemMessage.tsx @@ -1,10 +1,10 @@ import React from 'react'; import {View} from 'react-native'; -import styles from '../styles/styles'; -import theme from '../styles/themes/default'; -import Text from './Text'; -import * as Expensicons from './Icon/Expensicons'; +import styles from '@styles/styles'; +import theme from '@styles/themes/default'; import Icon from './Icon'; +import * as Expensicons from './Icon/Expensicons'; +import Text from './Text'; type InlineSystemMessageProps = { /** Error to display */ diff --git a/src/components/InvertedFlatList/BaseInvertedFlatList.js b/src/components/InvertedFlatList/BaseInvertedFlatList.js index 044143774dd6..802ae373d22a 100644 --- a/src/components/InvertedFlatList/BaseInvertedFlatList.js +++ b/src/components/InvertedFlatList/BaseInvertedFlatList.js @@ -1,10 +1,10 @@ +import PropTypes from 'prop-types'; import React, {forwardRef, useCallback, useRef} from 'react'; -import {View, FlatList as NativeFlatlist} from 'react-native'; +import {FlatList as NativeFlatlist, View} from 'react-native'; import _ from 'underscore'; -import PropTypes from 'prop-types'; -import * as CollectionUtils from '../../libs/CollectionUtils'; -import FlatList from '../FlatList'; -import variables from '../../styles/variables'; +import FlatList from '@components/FlatList'; +import * as CollectionUtils from '@libs/CollectionUtils'; +import variables from '@styles/variables'; const propTypes = { /** Same as FlatList can be any array of anything */ diff --git a/src/components/InvertedFlatList/CellRendererComponent.js b/src/components/InvertedFlatList/CellRendererComponent.js index 77397aeb4610..2b2d214000bf 100644 --- a/src/components/InvertedFlatList/CellRendererComponent.js +++ b/src/components/InvertedFlatList/CellRendererComponent.js @@ -1,6 +1,6 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; const propTypes = { /** Position index of the list item in a list view */ diff --git a/src/components/InvertedFlatList/index.js b/src/components/InvertedFlatList/index.js index d328ca93575b..14b781759904 100644 --- a/src/components/InvertedFlatList/index.js +++ b/src/components/InvertedFlatList/index.js @@ -1,10 +1,10 @@ -import React, {forwardRef, useEffect, useRef} from 'react'; import PropTypes from 'prop-types'; +import React, {forwardRef, useEffect, useRef} from 'react'; import {DeviceEventEmitter, FlatList, StyleSheet} from 'react-native'; import _ from 'underscore'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; import BaseInvertedFlatList from './BaseInvertedFlatList'; -import styles from '../../styles/styles'; -import CONST from '../../CONST'; const propTypes = { /** Passed via forwardRef so we can access the FlatList ref */ diff --git a/src/components/KYCWall/BaseKYCWall.js b/src/components/KYCWall/BaseKYCWall.js index ccee8bc4e6a0..d55417a6190a 100644 --- a/src/components/KYCWall/BaseKYCWall.js +++ b/src/components/KYCWall/BaseKYCWall.js @@ -1,19 +1,19 @@ -import _ from 'underscore'; +import lodashGet from 'lodash/get'; import React from 'react'; -import {withOnyx} from 'react-native-onyx'; import {Dimensions} from 'react-native'; -import lodashGet from 'lodash/get'; -import CONST from '../../CONST'; -import Navigation from '../../libs/Navigation/Navigation'; -import AddPaymentMethodMenu from '../AddPaymentMethodMenu'; -import getClickedTargetLocation from '../../libs/getClickedTargetLocation'; -import * as PaymentUtils from '../../libs/PaymentUtils'; -import * as PaymentMethods from '../../libs/actions/PaymentMethods'; -import ONYXKEYS from '../../ONYXKEYS'; -import Log from '../../libs/Log'; -import {propTypes, defaultProps} from './kycWallPropTypes'; -import * as Wallet from '../../libs/actions/Wallet'; -import * as ReportUtils from '../../libs/ReportUtils'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import AddPaymentMethodMenu from '@components/AddPaymentMethodMenu'; +import getClickedTargetLocation from '@libs/getClickedTargetLocation'; +import Log from '@libs/Log'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PaymentUtils from '@libs/PaymentUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import * as Wallet from '@userActions/Wallet'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {defaultProps, propTypes} from './kycWallPropTypes'; // This component allows us to block various actions by forcing the user to first add a default payment method and successfully make it through our Know Your Customer flow // before continuing to take whatever action they originally intended to take. It requires a button as a child and a native event so we can get the coordinates and use it diff --git a/src/components/KYCWall/index.js b/src/components/KYCWall/index.js index 81e7a2d37481..49329c73d474 100644 --- a/src/components/KYCWall/index.js +++ b/src/components/KYCWall/index.js @@ -1,6 +1,6 @@ import React from 'react'; -import {propTypes, defaultProps} from './kycWallPropTypes'; import BaseKYCWall from './BaseKYCWall'; +import {defaultProps, propTypes} from './kycWallPropTypes'; function KYCWall(props) { return ( diff --git a/src/components/KYCWall/kycWallPropTypes.js b/src/components/KYCWall/kycWallPropTypes.js index b585535784dc..58db2c1c1940 100644 --- a/src/components/KYCWall/kycWallPropTypes.js +++ b/src/components/KYCWall/kycWallPropTypes.js @@ -1,12 +1,12 @@ -import _ from 'underscore'; import PropTypes from 'prop-types'; -import userWalletPropTypes from '../../pages/EnablePayments/userWalletPropTypes'; -import bankAccountPropTypes from '../bankAccountPropTypes'; -import cardPropTypes from '../cardPropTypes'; -import iouReportPropTypes from '../../pages/iouReportPropTypes'; -import reimbursementAccountPropTypes from '../../pages/ReimbursementAccount/ReimbursementAccountDraftPropTypes'; -import walletTermsPropTypes from '../../pages/EnablePayments/walletTermsPropTypes'; -import CONST from '../../CONST'; +import _ from 'underscore'; +import bankAccountPropTypes from '@components/bankAccountPropTypes'; +import cardPropTypes from '@components/cardPropTypes'; +import userWalletPropTypes from '@pages/EnablePayments/userWalletPropTypes'; +import walletTermsPropTypes from '@pages/EnablePayments/walletTermsPropTypes'; +import iouReportPropTypes from '@pages/iouReportPropTypes'; +import reimbursementAccountPropTypes from '@pages/ReimbursementAccount/ReimbursementAccountDraftPropTypes'; +import CONST from '@src/CONST'; const propTypes = { /** Route for the Add Bank Account screen for a given navigation stack */ diff --git a/src/components/KeyboardSpacer/BaseKeyboardSpacer.js b/src/components/KeyboardSpacer/BaseKeyboardSpacer.js index 2066f3492373..adab3e2ea66d 100644 --- a/src/components/KeyboardSpacer/BaseKeyboardSpacer.js +++ b/src/components/KeyboardSpacer/BaseKeyboardSpacer.js @@ -1,7 +1,7 @@ -import React, {useState, useEffect, useCallback} from 'react'; +import React, {useCallback, useEffect, useState} from 'react'; import {Dimensions, Keyboard, View} from 'react-native'; -import * as StyleUtils from '../../styles/StyleUtils'; -import {propTypes, defaultProps} from './BaseKeyboardSpacerPropTypes'; +import * as StyleUtils from '@styles/StyleUtils'; +import {defaultProps, propTypes} from './BaseKeyboardSpacerPropTypes'; function BaseKeyboardSpacer(props) { const [keyboardSpace, setKeyboardSpace] = useState(0); diff --git a/src/components/KeyboardSpacer/index.android.js b/src/components/KeyboardSpacer/index.android.js index 15755be70e31..d7c57f7d73c2 100644 --- a/src/components/KeyboardSpacer/index.android.js +++ b/src/components/KeyboardSpacer/index.android.js @@ -3,9 +3,9 @@ * view up with the keyboard allowing the user to see what they are typing. */ import React from 'react'; -import StatusBar from '../../libs/StatusBar'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import StatusBar from '@libs/StatusBar'; import BaseKeyboardSpacer from './BaseKeyboardSpacer'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions'; function KeyboardSpacer() { return ( diff --git a/src/components/KeyboardSpacer/index.ios.js b/src/components/KeyboardSpacer/index.ios.js index 63cae305c362..612ef75c290f 100644 --- a/src/components/KeyboardSpacer/index.ios.js +++ b/src/components/KeyboardSpacer/index.ios.js @@ -3,10 +3,10 @@ * keyboard allowing the user to see what they are typing. */ import React from 'react'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; import BaseKeyboardSpacer from './BaseKeyboardSpacer'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions'; -import * as StyleUtils from '../../styles/StyleUtils'; -import CONST from '../../CONST'; function KeyboardSpacer(props) { return ( diff --git a/src/components/LHNOptionsList/LHNOptionsList.js b/src/components/LHNOptionsList/LHNOptionsList.js index 5e07b487c4f7..a06b3314e5a9 100644 --- a/src/components/LHNOptionsList/LHNOptionsList.js +++ b/src/components/LHNOptionsList/LHNOptionsList.js @@ -2,9 +2,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import {FlatList, View} from 'react-native'; import _ from 'underscore'; -import CONST from '../../CONST'; -import styles from '../../styles/styles'; -import variables from '../../styles/variables'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; import OptionRowLHNDataWithFocus from './OptionRowLHNDataWithFocus'; const propTypes = { diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index 2b992e462e34..f83e0b834287 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -1,34 +1,34 @@ -import _ from 'underscore'; -import React, {useState, useRef, useCallback} from 'react'; -import PropTypes from 'prop-types'; -import {View, StyleSheet} from 'react-native'; -import lodashGet from 'lodash/get'; import {useFocusEffect} from '@react-navigation/native'; -import * as optionRowStyles from '../../styles/optionRowStyles'; -import styles from '../../styles/styles'; -import * as StyleUtils from '../../styles/StyleUtils'; -import DateUtils from '../../libs/DateUtils'; -import Icon from '../Icon'; -import * as Expensicons from '../Icon/Expensicons'; -import MultipleAvatars from '../MultipleAvatars'; -import Hoverable from '../Hoverable'; -import DisplayNames from '../DisplayNames'; -import Text from '../Text'; -import SubscriptAvatar from '../SubscriptAvatar'; -import CONST from '../../CONST'; -import themeColors from '../../styles/themes/default'; -import OfflineWithFeedback from '../OfflineWithFeedback'; -import PressableWithSecondaryInteraction from '../PressableWithSecondaryInteraction'; -import * as ReportActionContextMenu from '../../pages/home/report/ContextMenu/ReportActionContextMenu'; -import * as ContextMenuActions from '../../pages/home/report/ContextMenu/ContextMenuActions'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; -import * as ReportUtils from '../../libs/ReportUtils'; -import useLocalize from '../../hooks/useLocalize'; -import Permissions from '../../libs/Permissions'; -import Tooltip from '../Tooltip'; -import DomUtils from '../../libs/DomUtils'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; -import ReportActionComposeFocusManager from '../../libs/ReportActionComposeFocusManager'; +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useCallback, useRef, useState} from 'react'; +import {StyleSheet, View} from 'react-native'; +import _ from 'underscore'; +import DisplayNames from '@components/DisplayNames'; +import Hoverable from '@components/Hoverable'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MultipleAvatars from '@components/MultipleAvatars'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import PressableWithSecondaryInteraction from '@components/PressableWithSecondaryInteraction'; +import SubscriptAvatar from '@components/SubscriptAvatar'; +import Text from '@components/Text'; +import Tooltip from '@components/Tooltip'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import DateUtils from '@libs/DateUtils'; +import DomUtils from '@libs/DomUtils'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import Permissions from '@libs/Permissions'; +import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as ContextMenuActions from '@pages/home/report/ContextMenu/ContextMenuActions'; +import * as ReportActionContextMenu from '@pages/home/report/ContextMenu/ReportActionContextMenu'; +import * as optionRowStyles from '@styles/optionRowStyles'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; const propTypes = { /** Style for hovered state */ diff --git a/src/components/LHNOptionsList/OptionRowLHNData.js b/src/components/LHNOptionsList/OptionRowLHNData.js index e93e3690138e..ebba2ffe0587 100644 --- a/src/components/LHNOptionsList/OptionRowLHNData.js +++ b/src/components/LHNOptionsList/OptionRowLHNData.js @@ -1,21 +1,20 @@ -import {withOnyx} from 'react-native-onyx'; +import {deepEqual} from 'fast-equals'; import lodashGet from 'lodash/get'; -import _ from 'underscore'; import PropTypes from 'prop-types'; -import React, {useEffect, useRef, useMemo} from 'react'; -import {deepEqual} from 'fast-equals'; -import SidebarUtils from '../../libs/SidebarUtils'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import OptionRowLHN, {propTypes as basePropTypes, defaultProps as baseDefaultProps} from './OptionRowLHN'; -import * as Report from '../../libs/actions/Report'; -import * as UserUtils from '../../libs/UserUtils'; -import * as ReportActionsUtils from '../../libs/ReportActionsUtils'; -import * as TransactionUtils from '../../libs/TransactionUtils'; - -import participantPropTypes from '../participantPropTypes'; -import CONST from '../../CONST'; -import reportActionPropTypes from '../../pages/home/report/reportActionPropTypes'; +import React, {useEffect, useMemo, useRef} from 'react'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import participantPropTypes from '@components/participantPropTypes'; +import compose from '@libs/compose'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import SidebarUtils from '@libs/SidebarUtils'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import * as UserUtils from '@libs/UserUtils'; +import reportActionPropTypes from '@pages/home/report/reportActionPropTypes'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import OptionRowLHN, {defaultProps as baseDefaultProps, propTypes as basePropTypes} from './OptionRowLHN'; const propTypes = { /** Whether row should be focused */ diff --git a/src/components/LHNOptionsList/OptionRowLHNDataWithFocus.js b/src/components/LHNOptionsList/OptionRowLHNDataWithFocus.js index 5e58be79e088..67e90bcbb0e0 100644 --- a/src/components/LHNOptionsList/OptionRowLHNDataWithFocus.js +++ b/src/components/LHNOptionsList/OptionRowLHNDataWithFocus.js @@ -1,6 +1,6 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import withCurrentReportID, {withCurrentReportIDPropTypes, withCurrentReportIDDefaultProps} from '../withCurrentReportID'; +import React from 'react'; +import withCurrentReportID, {withCurrentReportIDDefaultProps, withCurrentReportIDPropTypes} from '@components/withCurrentReportID'; import OptionRowLHNData from './OptionRowLHNData'; const propTypes = { diff --git a/src/components/LocaleContextProvider.js b/src/components/LocaleContextProvider.js index b8838f253e74..5fbb7716befe 100644 --- a/src/components/LocaleContextProvider.js +++ b/src/components/LocaleContextProvider.js @@ -1,17 +1,16 @@ -import React, {createContext, useMemo} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {createContext, useMemo} from 'react'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; - -import ONYXKEYS from '../ONYXKEYS'; -import * as Localize from '../libs/Localize'; -import DateUtils from '../libs/DateUtils'; -import * as NumberFormatUtils from '../libs/NumberFormatUtils'; -import * as LocaleDigitUtils from '../libs/LocaleDigitUtils'; -import CONST from '../CONST'; -import compose from '../libs/compose'; +import compose from '@libs/compose'; +import DateUtils from '@libs/DateUtils'; +import * as LocaleDigitUtils from '@libs/LocaleDigitUtils'; +import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; +import * as Localize from '@libs/Localize'; +import * as NumberFormatUtils from '@libs/NumberFormatUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import withCurrentUserPersonalDetails from './withCurrentUserPersonalDetails'; -import * as LocalePhoneNumber from '../libs/LocalePhoneNumber'; const LocaleContext = createContext(null); diff --git a/src/components/LocalePicker.js b/src/components/LocalePicker.js index 435f88e51e53..2c5a6e7b7ec6 100644 --- a/src/components/LocalePicker.js +++ b/src/components/LocalePicker.js @@ -1,15 +1,15 @@ -import _ from 'underscore'; +import PropTypes from 'prop-types'; import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import compose from '../libs/compose'; -import * as App from '../libs/actions/App'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import ONYXKEYS from '../ONYXKEYS'; -import CONST from '../CONST'; +import _ from 'underscore'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as App from '@userActions/App'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import Picker from './Picker'; -import styles from '../styles/styles'; -import themeColors from '../styles/themes/default'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { /** Indicates which locale the user currently has selected */ diff --git a/src/components/LocationErrorMessage/BaseLocationErrorMessage.js b/src/components/LocationErrorMessage/BaseLocationErrorMessage.js index 3a638f3e999e..786588993cd8 100644 --- a/src/components/LocationErrorMessage/BaseLocationErrorMessage.js +++ b/src/components/LocationErrorMessage/BaseLocationErrorMessage.js @@ -1,16 +1,16 @@ import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import CONST from '../../CONST'; -import colors from '../../styles/colors'; -import styles from '../../styles/styles'; -import Icon from '../Icon'; -import * as Expensicons from '../Icon/Expensicons'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; -import Text from '../Text'; -import TextLink from '../TextLink'; -import Tooltip from '../Tooltip'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import Tooltip from '@components/Tooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import colors from '@styles/colors'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; import * as locationErrorMessagePropTypes from './locationErrorMessagePropTypes'; const propTypes = { diff --git a/src/components/LocationErrorMessage/index.js b/src/components/LocationErrorMessage/index.js index e8ec402401cf..60fb4489799e 100644 --- a/src/components/LocationErrorMessage/index.js +++ b/src/components/LocationErrorMessage/index.js @@ -1,6 +1,6 @@ import React from 'react'; import {Linking} from 'react-native'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import BaseLocationErrorMessage from './BaseLocationErrorMessage'; import * as locationErrorMessagePropTypes from './locationErrorMessagePropTypes'; diff --git a/src/components/Lottie/Lottie.tsx b/src/components/Lottie/Lottie.tsx index 97c7e8fffdd1..cf689224278f 100644 --- a/src/components/Lottie/Lottie.tsx +++ b/src/components/Lottie/Lottie.tsx @@ -1,6 +1,6 @@ -import React, {forwardRef} from 'react'; import LottieView, {LottieViewProps} from 'lottie-react-native'; -import styles from '../../styles/styles'; +import React, {forwardRef} from 'react'; +import styles from '@styles/styles'; const Lottie = forwardRef((props: LottieViewProps, ref) => ( = styles.mapDirectionLayer.layout; const layerPointStyle: Record = styles.mapDirectionLayer.paint; diff --git a/src/components/MapView/MapView.tsx b/src/components/MapView/MapView.tsx index 5f791112da62..c91dc63a3bd1 100644 --- a/src/components/MapView/MapView.tsx +++ b/src/components/MapView/MapView.tsx @@ -1,15 +1,13 @@ -import {View} from 'react-native'; import {useFocusEffect, useNavigation} from '@react-navigation/native'; import Mapbox, {MapState, MarkerView, setAccessToken} from '@rnmapbox/maps'; import {forwardRef, memo, useCallback, useEffect, useImperativeHandle, useRef, useState} from 'react'; -import styles from '../../styles/styles'; - +import {View} from 'react-native'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import Direction from './Direction'; +import {MapViewHandle, MapViewProps} from './MapViewTypes'; import responder from './responder'; import utils from './utils'; -import Direction from './Direction'; -import CONST from '../../CONST'; - -import {MapViewProps, MapViewHandle} from './MapViewTypes'; const MapView = forwardRef(({accessToken, style, mapPadding, styleURL, pitchEnabled, initialState, waypoints, directionCoordinates, onMapReady}, ref) => { const cameraRef = useRef(null); diff --git a/src/components/MapView/MapView.web.tsx b/src/components/MapView/MapView.web.tsx index 78c5a9175594..fe240c1f5121 100644 --- a/src/components/MapView/MapView.web.tsx +++ b/src/components/MapView/MapView.web.tsx @@ -2,22 +2,18 @@ // This is why we have separate components for web and native to handle the specific implementations. // For the web version, we use the Mapbox Web library called react-map-gl, while for the native mobile version, // we utilize a different Mapbox library @rnmapbox/maps tailored for mobile development. - +import mapboxgl from 'mapbox-gl'; +import 'mapbox-gl/dist/mapbox-gl.css'; import React, {forwardRef, useCallback, useEffect, useImperativeHandle, useState} from 'react'; -import {View} from 'react-native'; import Map, {MapRef, Marker} from 'react-map-gl'; -import mapboxgl from 'mapbox-gl'; - -import responder from './responder'; -import utils from './utils'; - -import CONST from '../../CONST'; -import * as StyleUtils from '../../styles/StyleUtils'; -import themeColors from '../../styles/themes/default'; +import {View} from 'react-native'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; import Direction from './Direction'; import {MapViewHandle, MapViewProps} from './MapViewTypes'; - -import 'mapbox-gl/dist/mapbox-gl.css'; +import responder from './responder'; +import utils from './utils'; const MapView = forwardRef( ({style, styleURL, waypoints, mapPadding, accessToken, directionCoordinates, initialState = {location: CONST.MAPBOX.DEFAULT_COORDINATE, zoom: CONST.MAPBOX.DEFAULT_ZOOM}}, ref) => { diff --git a/src/components/MapView/PendingMapView.tsx b/src/components/MapView/PendingMapView.tsx index d97d4aaee16f..8a6799035fec 100644 --- a/src/components/MapView/PendingMapView.tsx +++ b/src/components/MapView/PendingMapView.tsx @@ -1,12 +1,12 @@ +import _ from 'lodash'; import React from 'react'; import {View} from 'react-native'; -import _ from 'lodash'; -import variables from '../../styles/variables'; -import styles from '../../styles/styles'; -import Icon from '../Icon'; +import BlockingView from '@components/BlockingViews/BlockingView'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; import {PendingMapViewProps} from './MapViewTypes'; -import BlockingView from '../BlockingViews/BlockingView'; -import * as Expensicons from '../Icon/Expensicons'; function PendingMapView({title = '', subtitle = '', style}: PendingMapViewProps) { const hasTextContent = !_.isEmpty(title) || !_.isEmpty(subtitle); diff --git a/src/components/MapView/responder/index.ts b/src/components/MapView/responder/index.ts index c4c325444f70..f417f7769ae8 100644 --- a/src/components/MapView/responder/index.ts +++ b/src/components/MapView/responder/index.ts @@ -1,3 +1,3 @@ -import SwipeInterceptPanResponder from '../../SwipeInterceptPanResponder'; +import SwipeInterceptPanResponder from '@components/SwipeInterceptPanResponder'; export default SwipeInterceptPanResponder; diff --git a/src/components/MentionSuggestions.js b/src/components/MentionSuggestions.js index 6c0803ca9d64..d18b8947e68d 100644 --- a/src/components/MentionSuggestions.js +++ b/src/components/MentionSuggestions.js @@ -1,16 +1,16 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import styles from '../styles/styles'; -import themeColors from '../styles/themes/default'; -import * as StyleUtils from '../styles/StyleUtils'; -import Text from './Text'; -import CONST from '../CONST'; -import Avatar from './Avatar'; +import getStyledTextArray from '@libs/GetStyledTextArray'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; import AutoCompleteSuggestions from './AutoCompleteSuggestions'; -import getStyledTextArray from '../libs/GetStyledTextArray'; +import Avatar from './Avatar'; import avatarPropTypes from './avatarPropTypes'; +import Text from './Text'; const propTypes = { /** The index of the highlighted mention */ diff --git a/src/components/MenuItem.js b/src/components/MenuItem.js index 3c52c41f1992..08535f1724fb 100644 --- a/src/components/MenuItem.js +++ b/src/components/MenuItem.js @@ -1,31 +1,31 @@ -import _ from 'underscore'; +import ExpensiMark from 'expensify-common/lib/ExpensiMark'; import React, {useEffect, useMemo} from 'react'; import {View} from 'react-native'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import Text from './Text'; -import styles from '../styles/styles'; -import themeColors from '../styles/themes/default'; -import * as StyleUtils from '../styles/StyleUtils'; -import Icon from './Icon'; -import * as Expensicons from './Icon/Expensicons'; -import getButtonState from '../libs/getButtonState'; -import convertToLTR from '../libs/convertToLTR'; +import _ from 'underscore'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import ControlSelection from '@libs/ControlSelection'; +import convertToLTR from '@libs/convertToLTR'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import getButtonState from '@libs/getButtonState'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; import Avatar from './Avatar'; import Badge from './Badge'; -import CONST from '../CONST'; +import DisplayNames from './DisplayNames'; +import Hoverable from './Hoverable'; +import Icon from './Icon'; +import * as Expensicons from './Icon/Expensicons'; +import * as defaultWorkspaceAvatars from './Icon/WorkspaceDefaultAvatars'; import menuItemPropTypes from './menuItemPropTypes'; -import SelectCircle from './SelectCircle'; import MultipleAvatars from './MultipleAvatars'; -import * as defaultWorkspaceAvatars from './Icon/WorkspaceDefaultAvatars'; import PressableWithSecondaryInteraction from './PressableWithSecondaryInteraction'; -import * as DeviceCapabilities from '../libs/DeviceCapabilities'; -import ControlSelection from '../libs/ControlSelection'; -import variables from '../styles/variables'; -import * as Session from '../libs/actions/Session'; -import Hoverable from './Hoverable'; -import useWindowDimensions from '../hooks/useWindowDimensions'; import RenderHTML from './RenderHTML'; -import DisplayNames from './DisplayNames'; +import SelectCircle from './SelectCircle'; +import Text from './Text'; const propTypes = menuItemPropTypes; diff --git a/src/components/MenuItemList.js b/src/components/MenuItemList.js index 19253ce8bd94..b9f2e6fc228b 100644 --- a/src/components/MenuItemList.js +++ b/src/components/MenuItemList.js @@ -1,11 +1,11 @@ +import PropTypes from 'prop-types'; import React from 'react'; import _ from 'underscore'; -import PropTypes from 'prop-types'; -import useSingleExecution from '../hooks/useSingleExecution'; +import useSingleExecution from '@hooks/useSingleExecution'; +import {CONTEXT_MENU_TYPES} from '@pages/home/report/ContextMenu/ContextMenuActions'; +import * as ReportActionContextMenu from '@pages/home/report/ContextMenu/ReportActionContextMenu'; import MenuItem from './MenuItem'; import menuItemPropTypes from './menuItemPropTypes'; -import * as ReportActionContextMenu from '../pages/home/report/ContextMenu/ReportActionContextMenu'; -import {CONTEXT_MENU_TYPES} from '../pages/home/report/ContextMenu/ContextMenuActions'; const propTypes = { /** An array of props that are pass to individual MenuItem components */ diff --git a/src/components/MenuItemWithTopDescription.js b/src/components/MenuItemWithTopDescription.js index 94f44a1869b6..8215b7eb3a19 100644 --- a/src/components/MenuItemWithTopDescription.js +++ b/src/components/MenuItemWithTopDescription.js @@ -1,6 +1,6 @@ import React from 'react'; -import menuItemPropTypes from './menuItemPropTypes'; import MenuItem from './MenuItem'; +import menuItemPropTypes from './menuItemPropTypes'; const propTypes = menuItemPropTypes; diff --git a/src/components/MessagesRow.js b/src/components/MessagesRow.js index 8a699265bb56..b843e0dfa61e 100644 --- a/src/components/MessagesRow.js +++ b/src/components/MessagesRow.js @@ -1,17 +1,17 @@ -import React from 'react'; -import _ from 'underscore'; import PropTypes from 'prop-types'; +import React from 'react'; import {View} from 'react-native'; -import styles from '../styles/styles'; +import _ from 'underscore'; +import useLocalize from '@hooks/useLocalize'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; +import DotIndicatorMessage from './DotIndicatorMessage'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; -import DotIndicatorMessage from './DotIndicatorMessage'; -import Tooltip from './Tooltip'; -import CONST from '../CONST'; -import * as StyleUtils from '../styles/StyleUtils'; import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; -import stylePropTypes from '../styles/stylePropTypes'; -import useLocalize from '../hooks/useLocalize'; +import Tooltip from './Tooltip'; const propTypes = { /* The messages to display */ diff --git a/src/components/Modal/BaseModal.js b/src/components/Modal/BaseModal.js index d1a906efc951..6ed3b16c676d 100644 --- a/src/components/Modal/BaseModal.js +++ b/src/components/Modal/BaseModal.js @@ -1,20 +1,20 @@ +import PropTypes from 'prop-types'; import React, {forwardRef, useCallback, useEffect, useMemo, useRef} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import ReactNativeModal from 'react-native-modal'; import {useSafeAreaInsets} from 'react-native-safe-area-context'; -import styles from '../../styles/styles'; -import * as Modal from '../../libs/actions/Modal'; -import * as StyleUtils from '../../styles/StyleUtils'; -import themeColors from '../../styles/themes/default'; -import {propTypes as modalPropTypes, defaultProps as modalDefaultProps} from './modalPropTypes'; -import getModalStyles from '../../styles/getModalStyles'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; -import variables from '../../styles/variables'; -import CONST from '../../CONST'; -import ComposerFocusManager from '../../libs/ComposerFocusManager'; -import useNativeDriver from '../../libs/useNativeDriver'; -import usePrevious from '../../hooks/usePrevious'; +import usePrevious from '@hooks/usePrevious'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import ComposerFocusManager from '@libs/ComposerFocusManager'; +import useNativeDriver from '@libs/useNativeDriver'; +import getModalStyles from '@styles/getModalStyles'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import * as Modal from '@userActions/Modal'; +import CONST from '@src/CONST'; +import {defaultProps as modalDefaultProps, propTypes as modalPropTypes} from './modalPropTypes'; const propTypes = { ...modalPropTypes, diff --git a/src/components/Modal/index.android.js b/src/components/Modal/index.android.js index b5f11a02650a..51745ae6a20f 100644 --- a/src/components/Modal/index.android.js +++ b/src/components/Modal/index.android.js @@ -1,9 +1,9 @@ import React from 'react'; import {AppState} from 'react-native'; -import withWindowDimensions from '../withWindowDimensions'; +import withWindowDimensions from '@components/withWindowDimensions'; +import ComposerFocusManager from '@libs/ComposerFocusManager'; import BaseModal from './BaseModal'; -import {propTypes, defaultProps} from './modalPropTypes'; -import ComposerFocusManager from '../../libs/ComposerFocusManager'; +import {defaultProps, propTypes} from './modalPropTypes'; AppState.addEventListener('focus', () => { ComposerFocusManager.setReadyToFocus(); diff --git a/src/components/Modal/index.ios.js b/src/components/Modal/index.ios.js index d8206d12532d..38f477e2049b 100644 --- a/src/components/Modal/index.ios.js +++ b/src/components/Modal/index.ios.js @@ -1,7 +1,7 @@ import React from 'react'; -import withWindowDimensions from '../withWindowDimensions'; +import withWindowDimensions from '@components/withWindowDimensions'; import BaseModal from './BaseModal'; -import {propTypes, defaultProps} from './modalPropTypes'; +import {defaultProps, propTypes} from './modalPropTypes'; function Modal(props) { return ( diff --git a/src/components/Modal/index.web.js b/src/components/Modal/index.web.js index 065b3a9f210f..3bea0eb58aa9 100644 --- a/src/components/Modal/index.web.js +++ b/src/components/Modal/index.web.js @@ -1,11 +1,11 @@ import React, {useState} from 'react'; -import withWindowDimensions from '../withWindowDimensions'; +import withWindowDimensions from '@components/withWindowDimensions'; +import StatusBar from '@libs/StatusBar'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; import BaseModal from './BaseModal'; -import {propTypes, defaultProps} from './modalPropTypes'; -import * as StyleUtils from '../../styles/StyleUtils'; -import themeColors from '../../styles/themes/default'; -import StatusBar from '../../libs/StatusBar'; -import CONST from '../../CONST'; +import {defaultProps, propTypes} from './modalPropTypes'; function Modal(props) { const [previousStatusBarColor, setPreviousStatusBarColor] = useState(); diff --git a/src/components/Modal/modalPropTypes.js b/src/components/Modal/modalPropTypes.js index 58de5a6c57ca..84e610b694e4 100644 --- a/src/components/Modal/modalPropTypes.js +++ b/src/components/Modal/modalPropTypes.js @@ -1,8 +1,8 @@ import PropTypes from 'prop-types'; import _ from 'underscore'; -import CONST from '../../CONST'; -import {windowDimensionsPropTypes} from '../withWindowDimensions'; -import stylePropTypes from '../../styles/stylePropTypes'; +import {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import stylePropTypes from '@styles/stylePropTypes'; +import CONST from '@src/CONST'; const propTypes = { /** Decides whether the modal should cover fullscreen. FullScreen modal has backdrop */ diff --git a/src/components/MoneyReportHeader.js b/src/components/MoneyReportHeader.js index ab0b77c21653..a8fb5390ebb6 100644 --- a/src/components/MoneyReportHeader.js +++ b/src/components/MoneyReportHeader.js @@ -1,28 +1,28 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useMemo} from 'react'; -import _ from 'underscore'; -import {withOnyx} from 'react-native-onyx'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; -import useLocalize from '../hooks/useLocalize'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import iouReportPropTypes from '@pages/iouReportPropTypes'; +import nextStepPropTypes from '@pages/nextStepPropTypes'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import Button from './Button'; import HeaderWithBackButton from './HeaderWithBackButton'; -import iouReportPropTypes from '../pages/iouReportPropTypes'; -import * as ReportUtils from '../libs/ReportUtils'; -import participantPropTypes from './participantPropTypes'; -import styles from '../styles/styles'; -import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions'; -import compose from '../libs/compose'; -import Navigation from '../libs/Navigation/Navigation'; -import ROUTES from '../ROUTES'; -import ONYXKEYS from '../ONYXKEYS'; -import CONST from '../CONST'; import MoneyReportHeaderStatusBar from './MoneyReportHeaderStatusBar'; +import participantPropTypes from './participantPropTypes'; import SettlementButton from './SettlementButton'; -import Button from './Button'; -import * as IOU from '../libs/actions/IOU'; -import * as CurrencyUtils from '../libs/CurrencyUtils'; -import reportPropTypes from '../pages/reportPropTypes'; -import nextStepPropTypes from '../pages/nextStepPropTypes'; +import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions'; const propTypes = { /** The report currently being looked at */ diff --git a/src/components/MoneyReportHeaderStatusBar.js b/src/components/MoneyReportHeaderStatusBar.js index 9c4362b620d1..db6502aa0119 100644 --- a/src/components/MoneyReportHeaderStatusBar.js +++ b/src/components/MoneyReportHeaderStatusBar.js @@ -1,10 +1,10 @@ import React, {useMemo} from 'react'; import {Text, View} from 'react-native'; import _ from 'underscore'; -import styles from '../styles/styles'; -import * as NextStepUtils from '../libs/NextStepUtils'; -import useLocalize from '../hooks/useLocalize'; -import nextStepPropTypes from '../pages/nextStepPropTypes'; +import useLocalize from '@hooks/useLocalize'; +import * as NextStepUtils from '@libs/NextStepUtils'; +import nextStepPropTypes from '@pages/nextStepPropTypes'; +import styles from '@styles/styles'; import RenderHTML from './RenderHTML'; const propTypes = { diff --git a/src/components/MoneyRequestConfirmationList.js b/src/components/MoneyRequestConfirmationList.js index fd3a89d14c86..b60e950b2bbf 100755 --- a/src/components/MoneyRequestConfirmationList.js +++ b/src/components/MoneyRequestConfirmationList.js @@ -1,49 +1,49 @@ -import React, {useCallback, useMemo, useReducer, useState, useEffect} from 'react'; +import {useIsFocused} from '@react-navigation/native'; +import {format} from 'date-fns'; +import {isEmpty} from 'lodash'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useReducer, useState} from 'react'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import {format} from 'date-fns'; import _ from 'underscore'; -import {View} from 'react-native'; -import lodashGet from 'lodash/get'; -import {useIsFocused} from '@react-navigation/native'; -import {isEmpty} from 'lodash'; -import Text from './Text'; -import styles from '../styles/styles'; -import * as ReportUtils from '../libs/ReportUtils'; -import * as OptionsListUtils from '../libs/OptionsListUtils'; -import Permissions from '../libs/Permissions'; -import OptionsSelector from './OptionsSelector'; -import ONYXKEYS from '../ONYXKEYS'; -import compose from '../libs/compose'; -import CONST from '../CONST'; -import ButtonWithDropdownMenu from './ButtonWithDropdownMenu'; -import Log from '../libs/Log'; -import SettlementButton from './SettlementButton'; -import ROUTES from '../ROUTES'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from './withCurrentUserPersonalDetails'; -import * as IOUUtils from '../libs/IOUUtils'; -import MenuItemWithTopDescription from './MenuItemWithTopDescription'; -import Navigation from '../libs/Navigation/Navigation'; -import optionPropTypes from './optionPropTypes'; -import * as CurrencyUtils from '../libs/CurrencyUtils'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import DistanceRequestUtils from '@libs/DistanceRequestUtils'; +import * as IOUUtils from '@libs/IOUUtils'; +import Log from '@libs/Log'; +import * as MoneyRequestUtils from '@libs/MoneyRequestUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import Permissions from '@libs/Permissions'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReceiptUtils from '@libs/ReceiptUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import {iouDefaultProps, iouPropTypes} from '@pages/iou/propTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import Button from './Button'; +import ButtonWithDropdownMenu from './ButtonWithDropdownMenu'; +import categoryPropTypes from './categoryPropTypes'; +import ConfirmedRoute from './ConfirmedRoute'; +import FormHelpMessage from './FormHelpMessage'; import * as Expensicons from './Icon/Expensicons'; -import themeColors from '../styles/themes/default'; import Image from './Image'; -import useLocalize from '../hooks/useLocalize'; -import * as ReceiptUtils from '../libs/ReceiptUtils'; -import categoryPropTypes from './categoryPropTypes'; +import MenuItemWithTopDescription from './MenuItemWithTopDescription'; +import optionPropTypes from './optionPropTypes'; +import OptionsSelector from './OptionsSelector'; +import SettlementButton from './SettlementButton'; import Switch from './Switch'; import tagPropTypes from './tagPropTypes'; -import ConfirmedRoute from './ConfirmedRoute'; +import Text from './Text'; import transactionPropTypes from './transactionPropTypes'; -import DistanceRequestUtils from '../libs/DistanceRequestUtils'; -import FormHelpMessage from './FormHelpMessage'; -import * as IOU from '../libs/actions/IOU'; -import * as TransactionUtils from '../libs/TransactionUtils'; -import * as PolicyUtils from '../libs/PolicyUtils'; -import * as MoneyRequestUtils from '../libs/MoneyRequestUtils'; -import {iouDefaultProps, iouPropTypes} from '../pages/iou/propTypes'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from './withCurrentUserPersonalDetails'; const propTypes = { /** Callback to inform parent modal of success */ diff --git a/src/components/MoneyRequestHeader.js b/src/components/MoneyRequestHeader.js index 086e1429baef..cbadbf40ff5c 100644 --- a/src/components/MoneyRequestHeader.js +++ b/src/components/MoneyRequestHeader.js @@ -1,29 +1,29 @@ -import React, {useState, useCallback, useEffect} from 'react'; -import {withOnyx} from 'react-native-onyx'; -import {View} from 'react-native'; -import PropTypes from 'prop-types'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useState} from 'react'; +import {View} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import compose from '@libs/compose'; +import * as HeaderUtils from '@libs/HeaderUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import reportActionPropTypes from '@pages/home/report/reportActionPropTypes'; +import iouReportPropTypes from '@pages/iouReportPropTypes'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import ConfirmModal from './ConfirmModal'; import HeaderWithBackButton from './HeaderWithBackButton'; -import iouReportPropTypes from '../pages/iouReportPropTypes'; -import * as ReportUtils from '../libs/ReportUtils'; -import compose from '../libs/compose'; import * as Expensicons from './Icon/Expensicons'; -import participantPropTypes from './participantPropTypes'; -import styles from '../styles/styles'; -import Navigation from '../libs/Navigation/Navigation'; -import ROUTES from '../ROUTES'; -import CONST from '../CONST'; -import ONYXKEYS from '../ONYXKEYS'; -import * as IOU from '../libs/actions/IOU'; -import ConfirmModal from './ConfirmModal'; -import useLocalize from '../hooks/useLocalize'; import MoneyRequestHeaderStatusBar from './MoneyRequestHeaderStatusBar'; -import * as TransactionUtils from '../libs/TransactionUtils'; -import * as ReportActionsUtils from '../libs/ReportActionsUtils'; -import * as HeaderUtils from '../libs/HeaderUtils'; -import reportActionPropTypes from '../pages/home/report/reportActionPropTypes'; +import participantPropTypes from './participantPropTypes'; import transactionPropTypes from './transactionPropTypes'; -import useWindowDimensions from '../hooks/useWindowDimensions'; const propTypes = { /** The report currently being looked at */ diff --git a/src/components/MoneyRequestHeaderStatusBar.js b/src/components/MoneyRequestHeaderStatusBar.js index 31a6e9c0e897..f217d7fc2426 100644 --- a/src/components/MoneyRequestHeaderStatusBar.js +++ b/src/components/MoneyRequestHeaderStatusBar.js @@ -1,7 +1,7 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../styles/styles'; +import styles from '@styles/styles'; import Text from './Text'; const propTypes = { diff --git a/src/components/MoneyRequestSkeletonView.js b/src/components/MoneyRequestSkeletonView.js index 50a7b56b91e3..e03cb78972cf 100644 --- a/src/components/MoneyRequestSkeletonView.js +++ b/src/components/MoneyRequestSkeletonView.js @@ -1,9 +1,9 @@ import React from 'react'; -import {Rect} from 'react-native-svg'; import SkeletonViewContentLoader from 'react-content-loader/native'; -import variables from '../styles/variables'; -import themeColors from '../styles/themes/default'; -import styles from '../styles/styles'; +import {Rect} from 'react-native-svg'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; function MoneyRequestSkeletonView() { return ( diff --git a/src/components/MultipleAvatars.js b/src/components/MultipleAvatars.js index 8866d61d3870..85b6f7995693 100644 --- a/src/components/MultipleAvatars.js +++ b/src/components/MultipleAvatars.js @@ -1,16 +1,16 @@ -import React, {memo, useMemo} from 'react'; import PropTypes from 'prop-types'; +import React, {memo, useMemo} from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import styles from '../styles/styles'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; import Avatar from './Avatar'; -import Tooltip from './Tooltip'; -import Text from './Text'; -import themeColors from '../styles/themes/default'; -import * as StyleUtils from '../styles/StyleUtils'; -import CONST from '../CONST'; -import variables from '../styles/variables'; import avatarPropTypes from './avatarPropTypes'; +import Text from './Text'; +import Tooltip from './Tooltip'; import UserDetailsTooltip from './UserDetailsTooltip'; const propTypes = { diff --git a/src/components/NewDatePicker/CalendarPicker/ArrowIcon.js b/src/components/NewDatePicker/CalendarPicker/ArrowIcon.js index 6d5757323480..cb680a8bc43b 100644 --- a/src/components/NewDatePicker/CalendarPicker/ArrowIcon.js +++ b/src/components/NewDatePicker/CalendarPicker/ArrowIcon.js @@ -1,11 +1,11 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../../../styles/styles'; -import * as Expensicons from '../../Icon/Expensicons'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import Icon from '../../Icon'; -import CONST from '../../../CONST'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; const propTypes = { /** Specifies if the arrow icon should be disabled or not. */ diff --git a/src/components/NewDatePicker/CalendarPicker/YearPickerModal.js b/src/components/NewDatePicker/CalendarPicker/YearPickerModal.js index 9825109fbb63..5489a9244f68 100644 --- a/src/components/NewDatePicker/CalendarPicker/YearPickerModal.js +++ b/src/components/NewDatePicker/CalendarPicker/YearPickerModal.js @@ -1,14 +1,14 @@ -import React, {useEffect, useMemo, useState} from 'react'; import PropTypes from 'prop-types'; +import React, {useEffect, useMemo, useState} from 'react'; import _ from 'underscore'; -import HeaderWithBackButton from '../../HeaderWithBackButton'; -import CONST from '../../../CONST'; -import SelectionList from '../../SelectionList'; -import Modal from '../../Modal'; -import {radioListItemPropTypes} from '../../SelectionList/selectionListPropTypes'; -import useLocalize from '../../../hooks/useLocalize'; -import ScreenWrapper from '../../ScreenWrapper'; -import styles from '../../../styles/styles'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import Modal from '@components/Modal'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import {radioListItemPropTypes} from '@components/SelectionList/selectionListPropTypes'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /** Whether the modal is visible */ diff --git a/src/components/NewDatePicker/CalendarPicker/generateMonthMatrix.js b/src/components/NewDatePicker/CalendarPicker/generateMonthMatrix.js index 7a3c55305a33..a3497654feec 100644 --- a/src/components/NewDatePicker/CalendarPicker/generateMonthMatrix.js +++ b/src/components/NewDatePicker/CalendarPicker/generateMonthMatrix.js @@ -1,4 +1,4 @@ -import {getDaysInMonth, startOfMonth, getDay, addDays, format} from 'date-fns'; +import {addDays, format, getDay, getDaysInMonth, startOfMonth} from 'date-fns'; /** * Generates a matrix representation of a month's calendar given the year and month. diff --git a/src/components/NewDatePicker/CalendarPicker/index.js b/src/components/NewDatePicker/CalendarPicker/index.js index d03c36997845..0300b4bf476f 100644 --- a/src/components/NewDatePicker/CalendarPicker/index.js +++ b/src/components/NewDatePicker/CalendarPicker/index.js @@ -1,20 +1,20 @@ -import _ from 'underscore'; -import React from 'react'; -import {View} from 'react-native'; +import Str from 'expensify-common/lib/str'; import moment from 'moment'; import PropTypes from 'prop-types'; -import Str from 'expensify-common/lib/str'; -import Text from '../../Text'; -import YearPickerModal from './YearPickerModal'; +import React from 'react'; +import {View} from 'react-native'; +import _ from 'underscore'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import getButtonState from '@libs/getButtonState'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; import ArrowIcon from './ArrowIcon'; -import styles from '../../../styles/styles'; import generateMonthMatrix from './generateMonthMatrix'; -import withLocalize, {withLocalizePropTypes} from '../../withLocalize'; -import CONST from '../../../CONST'; -import getButtonState from '../../../libs/getButtonState'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import PressableWithFeedback from '../../Pressable/PressableWithFeedback'; -import PressableWithoutFeedback from '../../Pressable/PressableWithoutFeedback'; +import YearPickerModal from './YearPickerModal'; const propTypes = { /** An initial value of date string */ diff --git a/src/components/NewDatePicker/index.js b/src/components/NewDatePicker/index.js index 3201388790c9..30e15ac43bfc 100644 --- a/src/components/NewDatePicker/index.js +++ b/src/components/NewDatePicker/index.js @@ -1,16 +1,16 @@ -import React, {useEffect, useState} from 'react'; -import {View} from 'react-native'; +import _ from 'lodash'; import moment from 'moment'; import PropTypes from 'prop-types'; -import _ from 'lodash'; -import TextInput from '../TextInput'; -import CONST from '../../CONST'; -import styles from '../../styles/styles'; -import * as Expensicons from '../Icon/Expensicons'; -import {defaultProps as defaultBaseTextInputPropTypes, propTypes as baseTextInputPropTypes} from '../TextInput/baseTextInputPropTypes'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; +import React, {useEffect, useState} from 'react'; +import {View} from 'react-native'; +import InputWrapper from '@components/Form/InputWrapper'; +import * as Expensicons from '@components/Icon/Expensicons'; +import TextInput from '@components/TextInput'; +import {propTypes as baseTextInputPropTypes, defaultProps as defaultBaseTextInputPropTypes} from '@components/TextInput/baseTextInputPropTypes'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; import CalendarPicker from './CalendarPicker'; -import InputWrapper from '../Form/InputWrapper'; const propTypes = { /** diff --git a/src/components/OfflineIndicator.js b/src/components/OfflineIndicator.js index 43cd374421ea..f120fe535834 100644 --- a/src/components/OfflineIndicator.js +++ b/src/components/OfflineIndicator.js @@ -1,16 +1,16 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import {withNetwork} from './OnyxProvider'; -import networkPropTypes from './networkPropTypes'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; -import variables from '../styles/variables'; +import networkPropTypes from './networkPropTypes'; +import {withNetwork} from './OnyxProvider'; import Text from './Text'; -import styles from '../styles/styles'; -import compose from '../libs/compose'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import * as StyleUtils from '../styles/StyleUtils'; import withWindowDimensions from './withWindowDimensions'; const propTypes = { diff --git a/src/components/OfflineWithFeedback.js b/src/components/OfflineWithFeedback.js index 51f6e410424f..ba893aeb2fe4 100644 --- a/src/components/OfflineWithFeedback.js +++ b/src/components/OfflineWithFeedback.js @@ -1,14 +1,14 @@ -import _ from 'underscore'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import CONST from '../CONST'; -import stylePropTypes from '../styles/stylePropTypes'; -import styles from '../styles/styles'; -import * as StyleUtils from '../styles/StyleUtils'; -import shouldRenderOffscreen from '../libs/shouldRenderOffscreen'; +import _ from 'underscore'; +import useNetwork from '@hooks/useNetwork'; +import shouldRenderOffscreen from '@libs/shouldRenderOffscreen'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; import MessagesRow from './MessagesRow'; -import useNetwork from '../hooks/useNetwork'; /** * This component should be used when we are using the offline pattern B (offline with feedback). diff --git a/src/components/Onfido/BaseOnfidoWeb.js b/src/components/Onfido/BaseOnfidoWeb.js index 394996331d5e..5c0f83902e55 100644 --- a/src/components/Onfido/BaseOnfidoWeb.js +++ b/src/components/Onfido/BaseOnfidoWeb.js @@ -1,16 +1,16 @@ -import _ from 'underscore'; -import './index.css'; import lodashGet from 'lodash/get'; -import React, {useEffect, forwardRef} from 'react'; import * as OnfidoSDK from 'onfido-sdk-ui'; +import React, {forwardRef, useEffect} from 'react'; +import _ from 'underscore'; +import useLocalize from '@hooks/useLocalize'; +import Log from '@libs/Log'; +import fontFamily from '@styles/fontFamily'; +import fontWeightBold from '@styles/fontWeight/bold'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; +import './index.css'; import onfidoPropTypes from './onfidoPropTypes'; -import CONST from '../../CONST'; -import variables from '../../styles/variables'; -import themeColors from '../../styles/themes/default'; -import fontWeightBold from '../../styles/fontWeight/bold'; -import fontFamily from '../../styles/fontFamily'; -import Log from '../../libs/Log'; -import useLocalize from '../../hooks/useLocalize'; function initializeOnfido({sdkToken, onSuccess, onError, onUserExit, preferredLocale, translate}) { OnfidoSDK.init({ diff --git a/src/components/Onfido/index.native.js b/src/components/Onfido/index.native.js index 424e370b5fe6..ed0578187d3c 100644 --- a/src/components/Onfido/index.native.js +++ b/src/components/Onfido/index.native.js @@ -1,13 +1,13 @@ -import _ from 'underscore'; +import {OnfidoCaptureType, OnfidoCountryCode, OnfidoDocumentType, Onfido as OnfidoSDK} from '@onfido/react-native-sdk'; import lodashGet from 'lodash/get'; import React, {useEffect} from 'react'; import {Alert, Linking} from 'react-native'; -import {Onfido as OnfidoSDK, OnfidoCaptureType, OnfidoDocumentType, OnfidoCountryCode} from '@onfido/react-native-sdk'; +import _ from 'underscore'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import useLocalize from '@hooks/useLocalize'; +import Log from '@libs/Log'; +import CONST from '@src/CONST'; import onfidoPropTypes from './onfidoPropTypes'; -import CONST from '../../CONST'; -import Log from '../../libs/Log'; -import FullscreenLoadingIndicator from '../FullscreenLoadingIndicator'; -import useLocalize from '../../hooks/useLocalize'; function Onfido({sdkToken, onUserExit, onSuccess, onError}) { const {translate} = useLocalize(); diff --git a/src/components/Onfido/index.website.js b/src/components/Onfido/index.website.js index 23e59fb1e08f..12ad1edd8fb9 100644 --- a/src/components/Onfido/index.website.js +++ b/src/components/Onfido/index.website.js @@ -1,5 +1,5 @@ -import React, {useEffect, useRef} from 'react'; import lodashGet from 'lodash/get'; +import React, {useEffect, useRef} from 'react'; import BaseOnfidoWeb from './BaseOnfidoWeb'; import onfidoPropTypes from './onfidoPropTypes'; diff --git a/src/components/OnyxProvider.tsx b/src/components/OnyxProvider.tsx index 8682e832debc..1009a74ef1f7 100644 --- a/src/components/OnyxProvider.tsx +++ b/src/components/OnyxProvider.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import ONYXKEYS from '../ONYXKEYS'; -import createOnyxContext from './createOnyxContext'; +import ONYXKEYS from '@src/ONYXKEYS'; import ComposeProviders from './ComposeProviders'; +import createOnyxContext from './createOnyxContext'; // Set up any providers for individual keys. This should only be used in cases where many components will subscribe to // the same key (e.g. FlatList renderItem components) diff --git a/src/components/OpacityView.js b/src/components/OpacityView.js index daef93cdc09b..ebd261916e65 100644 --- a/src/components/OpacityView.js +++ b/src/components/OpacityView.js @@ -1,9 +1,9 @@ +import PropTypes from 'prop-types'; import React from 'react'; import Animated, {useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; -import PropTypes from 'prop-types'; -import variables from '../styles/variables'; -import * as StyleUtils from '../styles/StyleUtils'; -import shouldRenderOffscreen from '../libs/shouldRenderOffscreen'; +import shouldRenderOffscreen from '@libs/shouldRenderOffscreen'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; const propTypes = { /** diff --git a/src/components/OptionRow.js b/src/components/OptionRow.js index e3ea3acfc2ee..4939c5bac431 100644 --- a/src/components/OptionRow.js +++ b/src/components/OptionRow.js @@ -1,27 +1,27 @@ -import _ from 'underscore'; import lodashGet from 'lodash/get'; -import React, {useState, useEffect, useRef} from 'react'; import PropTypes from 'prop-types'; -import {View, StyleSheet, InteractionManager} from 'react-native'; -import styles from '../styles/styles'; -import * as StyleUtils from '../styles/StyleUtils'; -import optionPropTypes from './optionPropTypes'; +import React, {useEffect, useRef, useState} from 'react'; +import {InteractionManager, StyleSheet, View} from 'react-native'; +import _ from 'underscore'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; +import Button from './Button'; +import DisplayNames from './DisplayNames'; +import Hoverable from './Hoverable'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; -import Button from './Button'; import MultipleAvatars from './MultipleAvatars'; -import Hoverable from './Hoverable'; -import DisplayNames from './DisplayNames'; -import themeColors from '../styles/themes/default'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import Text from './Text'; -import SelectCircle from './SelectCircle'; -import SubscriptAvatar from './SubscriptAvatar'; import OfflineWithFeedback from './OfflineWithFeedback'; -import CONST from '../CONST'; -import * as ReportUtils from '../libs/ReportUtils'; +import optionPropTypes from './optionPropTypes'; import PressableWithFeedback from './Pressable/PressableWithFeedback'; -import * as OptionsListUtils from '../libs/OptionsListUtils'; +import SelectCircle from './SelectCircle'; +import SubscriptAvatar from './SubscriptAvatar'; +import Text from './Text'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { /** Style for hovered state */ diff --git a/src/components/OptionsList/BaseOptionsList.js b/src/components/OptionsList/BaseOptionsList.js index 91fd77dbea30..c7d378cde6e3 100644 --- a/src/components/OptionsList/BaseOptionsList.js +++ b/src/components/OptionsList/BaseOptionsList.js @@ -1,15 +1,15 @@ -import _ from 'underscore'; -import React, {useRef, useEffect, forwardRef, memo} from 'react'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; -import styles from '../../styles/styles'; -import variables from '../../styles/variables'; -import OptionRow from '../OptionRow'; -import SectionList from '../SectionList'; -import Text from '../Text'; -import {propTypes as optionsListPropTypes, defaultProps as optionsListDefaultProps} from './optionsListPropTypes'; -import OptionsListSkeletonView from '../OptionsListSkeletonView'; -import usePrevious from '../../hooks/usePrevious'; +import React, {forwardRef, memo, useEffect, useRef} from 'react'; +import {View} from 'react-native'; +import _ from 'underscore'; +import OptionRow from '@components/OptionRow'; +import OptionsListSkeletonView from '@components/OptionsListSkeletonView'; +import SectionList from '@components/SectionList'; +import Text from '@components/Text'; +import usePrevious from '@hooks/usePrevious'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import {defaultProps as optionsListDefaultProps, propTypes as optionsListPropTypes} from './optionsListPropTypes'; const propTypes = { /** Determines whether the keyboard gets dismissed in response to a drag */ diff --git a/src/components/OptionsList/index.js b/src/components/OptionsList/index.js index 017d9c23d9ae..36b8e7fccf12 100644 --- a/src/components/OptionsList/index.js +++ b/src/components/OptionsList/index.js @@ -1,10 +1,10 @@ -import React, {forwardRef, useEffect, useRef, useCallback} from 'react'; +import React, {forwardRef, useCallback, useEffect, useRef} from 'react'; import {Keyboard} from 'react-native'; import _ from 'underscore'; +import withWindowDimensions from '@components/withWindowDimensions'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import BaseOptionsList from './BaseOptionsList'; -import withWindowDimensions from '../withWindowDimensions'; -import {propTypes, defaultProps} from './optionsListPropTypes'; -import * as DeviceCapabilities from '../../libs/DeviceCapabilities'; +import {defaultProps, propTypes} from './optionsListPropTypes'; function OptionsList(props) { const isScreenTouched = useRef(false); diff --git a/src/components/OptionsList/index.native.js b/src/components/OptionsList/index.native.js index 7701096fde8f..ab2db4f20967 100644 --- a/src/components/OptionsList/index.native.js +++ b/src/components/OptionsList/index.native.js @@ -1,7 +1,7 @@ import React, {forwardRef} from 'react'; import {Keyboard} from 'react-native'; import BaseOptionsList from './BaseOptionsList'; -import {propTypes, defaultProps} from './optionsListPropTypes'; +import {defaultProps, propTypes} from './optionsListPropTypes'; const OptionsList = forwardRef((props, ref) => ( { const [isScreenTouched, setIsScreenTouched] = useState(false); diff --git a/src/components/SelectionList/selectionListPropTypes.js b/src/components/SelectionList/selectionListPropTypes.js index 58aecb0da1a1..2b53f555134e 100644 --- a/src/components/SelectionList/selectionListPropTypes.js +++ b/src/components/SelectionList/selectionListPropTypes.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import _ from 'underscore'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; const commonListItemPropTypes = { /** Whether this item is focused (for arrow key controls) */ diff --git a/src/components/SettlementButton.js b/src/components/SettlementButton.js index 2989fd103850..d2030eac8d7d 100644 --- a/src/components/SettlementButton.js +++ b/src/components/SettlementButton.js @@ -1,22 +1,22 @@ -import React, {useEffect, useMemo} from 'react'; -import _ from 'underscore'; import PropTypes from 'prop-types'; +import React, {useEffect, useMemo} from 'react'; import {withOnyx} from 'react-native-onyx'; -import CONST from '../CONST'; -import ONYXKEYS from '../ONYXKEYS'; -import compose from '../libs/compose'; -import Permissions from '../libs/Permissions'; -import useNetwork from '../hooks/useNetwork'; -import useLocalize from '../hooks/useLocalize'; -import * as ReportUtils from '../libs/ReportUtils'; -import iouReportPropTypes from '../pages/iouReportPropTypes'; -import * as PaymentMethods from '../libs/actions/PaymentMethods'; +import _ from 'underscore'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import compose from '@libs/compose'; +import Permissions from '@libs/Permissions'; +import * as ReportUtils from '@libs/ReportUtils'; +import iouReportPropTypes from '@pages/iouReportPropTypes'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import ButtonWithDropdownMenu from './ButtonWithDropdownMenu'; +import * as Expensicons from './Icon/Expensicons'; import KYCWall from './KYCWall'; import withNavigation from './withNavigation'; -import * as Expensicons from './Icon/Expensicons'; -import ButtonWithDropdownMenu from './ButtonWithDropdownMenu'; -import * as BankAccounts from '../libs/actions/BankAccounts'; -import ROUTES from '../ROUTES'; const propTypes = { /** Callback to execute when this button is pressed. Receives a single payment type argument. */ diff --git a/src/components/ShowContextMenuContext.js b/src/components/ShowContextMenuContext.js index fff233162d74..6248478e5fea 100644 --- a/src/components/ShowContextMenuContext.js +++ b/src/components/ShowContextMenuContext.js @@ -1,8 +1,8 @@ import React from 'react'; -import * as ReportActionContextMenu from '../pages/home/report/ContextMenu/ReportActionContextMenu'; -import * as ContextMenuActions from '../pages/home/report/ContextMenu/ContextMenuActions'; -import * as DeviceCapabilities from '../libs/DeviceCapabilities'; -import * as ReportUtils from '../libs/ReportUtils'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as ContextMenuActions from '@pages/home/report/ContextMenu/ContextMenuActions'; +import * as ReportActionContextMenu from '@pages/home/report/ContextMenu/ReportActionContextMenu'; const ShowContextMenuContext = React.createContext({ anchor: null, diff --git a/src/components/SignInButtons/AppleAuthWrapper/index.ios.js b/src/components/SignInButtons/AppleAuthWrapper/index.ios.js index 9f97182b2e7b..69882d89b1fe 100644 --- a/src/components/SignInButtons/AppleAuthWrapper/index.ios.js +++ b/src/components/SignInButtons/AppleAuthWrapper/index.ios.js @@ -1,6 +1,6 @@ -import {useEffect} from 'react'; import appleAuth from '@invertase/react-native-apple-authentication'; -import * as Session from '../../../libs/actions/Session'; +import {useEffect} from 'react'; +import * as Session from '@userActions/Session'; /** * Apple Sign In wrapper for iOS diff --git a/src/components/SignInButtons/AppleSignIn/index.android.js b/src/components/SignInButtons/AppleSignIn/index.android.js index 48d2bf3cc861..9dc736789c61 100644 --- a/src/components/SignInButtons/AppleSignIn/index.android.js +++ b/src/components/SignInButtons/AppleSignIn/index.android.js @@ -1,10 +1,10 @@ -import React from 'react'; import {appleAuthAndroid} from '@invertase/react-native-apple-authentication'; -import Log from '../../../libs/Log'; -import IconButton from '../IconButton'; -import * as Session from '../../../libs/actions/Session'; -import CONFIG from '../../../CONFIG'; -import CONST from '../../../CONST'; +import React from 'react'; +import IconButton from '@components/SignInButtons/IconButton'; +import Log from '@libs/Log'; +import * as Session from '@userActions/Session'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; /** * Apple Sign In Configuration for Android. diff --git a/src/components/SignInButtons/AppleSignIn/index.desktop.js b/src/components/SignInButtons/AppleSignIn/index.desktop.js index 52ff3ef710b0..cad37d585de4 100644 --- a/src/components/SignInButtons/AppleSignIn/index.desktop.js +++ b/src/components/SignInButtons/AppleSignIn/index.desktop.js @@ -1,10 +1,10 @@ import React from 'react'; import {View} from 'react-native'; -import IconButton from '../IconButton'; -import CONFIG from '../../../CONFIG'; -import ROUTES from '../../../ROUTES'; -import styles from '../../../styles/styles'; -import CONST from '../../../CONST'; +import IconButton from '@components/SignInButtons/IconButton'; +import styles from '@styles/styles'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; const appleSignInWebRouteForDesktopFlow = `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.APPLE_SIGN_IN}`; diff --git a/src/components/SignInButtons/AppleSignIn/index.ios.js b/src/components/SignInButtons/AppleSignIn/index.ios.js index 0c9a8c9e8211..f5c6333dcf7b 100644 --- a/src/components/SignInButtons/AppleSignIn/index.ios.js +++ b/src/components/SignInButtons/AppleSignIn/index.ios.js @@ -1,9 +1,9 @@ -import React from 'react'; import appleAuth from '@invertase/react-native-apple-authentication'; -import Log from '../../../libs/Log'; -import IconButton from '../IconButton'; -import * as Session from '../../../libs/actions/Session'; -import CONST from '../../../CONST'; +import React from 'react'; +import IconButton from '@components/SignInButtons/IconButton'; +import Log from '@libs/Log'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; /** * Apple Sign In method for iOS that returns identityToken. diff --git a/src/components/SignInButtons/AppleSignIn/index.website.js b/src/components/SignInButtons/AppleSignIn/index.website.js index 7046de5068b1..adae0a691e13 100644 --- a/src/components/SignInButtons/AppleSignIn/index.website.js +++ b/src/components/SignInButtons/AppleSignIn/index.website.js @@ -1,13 +1,13 @@ -import React, {useEffect, useState} from 'react'; +import get from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useEffect, useState} from 'react'; import Config from 'react-native-config'; -import get from 'lodash/get'; -import getUserLanguage from '../GetUserLanguage'; -import * as Session from '../../../libs/actions/Session'; -import Log from '../../../libs/Log'; -import CONFIG from '../../../CONFIG'; -import CONST from '../../../CONST'; -import withNavigationFocus from '../../withNavigationFocus'; +import getUserLanguage from '@components/SignInButtons/GetUserLanguage'; +import withNavigationFocus from '@components/withNavigationFocus'; +import Log from '@libs/Log'; +import * as Session from '@userActions/Session'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; // react-native-config doesn't trim whitespace on iOS for some reason so we // add a trim() call to lodashGet here to prevent headaches. diff --git a/src/components/SignInButtons/GoogleSignIn/index.desktop.js b/src/components/SignInButtons/GoogleSignIn/index.desktop.js index 95a78f34614b..e69905dcad05 100644 --- a/src/components/SignInButtons/GoogleSignIn/index.desktop.js +++ b/src/components/SignInButtons/GoogleSignIn/index.desktop.js @@ -1,11 +1,11 @@ import React from 'react'; import {View} from 'react-native'; -import withLocalize, {withLocalizePropTypes} from '../../withLocalize'; -import IconButton from '../IconButton'; -import CONFIG from '../../../CONFIG'; -import ROUTES from '../../../ROUTES'; -import styles from '../../../styles/styles'; -import CONST from '../../../CONST'; +import IconButton from '@components/SignInButtons/IconButton'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; const propTypes = {...withLocalizePropTypes}; diff --git a/src/components/SignInButtons/GoogleSignIn/index.native.js b/src/components/SignInButtons/GoogleSignIn/index.native.js index 099fbfde22fd..c7ac763cfb73 100644 --- a/src/components/SignInButtons/GoogleSignIn/index.native.js +++ b/src/components/SignInButtons/GoogleSignIn/index.native.js @@ -1,10 +1,10 @@ -import React from 'react'; import {GoogleSignin, statusCodes} from '@react-native-google-signin/google-signin'; -import Log from '../../../libs/Log'; -import IconButton from '../IconButton'; -import * as Session from '../../../libs/actions/Session'; -import CONST from '../../../CONST'; -import CONFIG from '../../../CONFIG'; +import React from 'react'; +import IconButton from '@components/SignInButtons/IconButton'; +import Log from '@libs/Log'; +import * as Session from '@userActions/Session'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; /** * Google Sign In method for iOS and android that returns identityToken. diff --git a/src/components/SignInButtons/GoogleSignIn/index.website.js b/src/components/SignInButtons/GoogleSignIn/index.website.js index 5362433142af..7f3a3019c318 100644 --- a/src/components/SignInButtons/GoogleSignIn/index.website.js +++ b/src/components/SignInButtons/GoogleSignIn/index.website.js @@ -1,10 +1,10 @@ +import PropTypes from 'prop-types'; import React, {useCallback} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import withLocalize, {withLocalizePropTypes} from '../../withLocalize'; -import * as Session from '../../../libs/actions/Session'; -import CONFIG from '../../../CONFIG'; -import styles from '../../../styles/styles'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import * as Session from '@userActions/Session'; +import CONFIG from '@src/CONFIG'; const propTypes = { /** Whether we're rendering in the Desktop Flow, if so show a different button. */ diff --git a/src/components/SignInButtons/IconButton.js b/src/components/SignInButtons/IconButton.js index 4f1692ddb677..0d18779ea9ba 100644 --- a/src/components/SignInButtons/IconButton.js +++ b/src/components/SignInButtons/IconButton.js @@ -1,11 +1,11 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import styles from '../../styles/styles'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import CONST from '../../CONST'; -import * as Expensicons from '../Icon/Expensicons'; -import Icon from '../Icon'; +import React from 'react'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /** The on press method */ diff --git a/src/components/SignInPageForm/index.native.tsx b/src/components/SignInPageForm/index.native.tsx index 487822c62de9..b39e4d681bbe 100644 --- a/src/components/SignInPageForm/index.native.tsx +++ b/src/components/SignInPageForm/index.native.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import FormElement from '../FormElement'; +import FormElement from '@components/FormElement'; import SignInPageFormProps from './types'; function SignInPageForm(props: SignInPageFormProps) { diff --git a/src/components/SignInPageForm/index.tsx b/src/components/SignInPageForm/index.tsx index fd415dbbd930..1cdc31b33fd9 100644 --- a/src/components/SignInPageForm/index.tsx +++ b/src/components/SignInPageForm/index.tsx @@ -1,5 +1,5 @@ import React, {useEffect, useRef} from 'react'; -import FormElement from '../FormElement'; +import FormElement from '@components/FormElement'; import SignInPageFormProps from './types'; const preventFormDefault = (event: SubmitEvent) => { diff --git a/src/components/SingleOptionSelector.js b/src/components/SingleOptionSelector.js index 889b6a7d1f96..ef212937920e 100644 --- a/src/components/SingleOptionSelector.js +++ b/src/components/SingleOptionSelector.js @@ -1,12 +1,12 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import _ from 'underscore'; +import React from 'react'; import {View} from 'react-native'; +import _ from 'underscore'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; import SelectCircle from './SelectCircle'; -import styles from '../styles/styles'; -import CONST from '../CONST'; import Text from './Text'; -import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { diff --git a/src/components/SpacerView.js b/src/components/SpacerView.js index 3b81bbfa0dc5..60ff7fd85e55 100644 --- a/src/components/SpacerView.js +++ b/src/components/SpacerView.js @@ -1,9 +1,9 @@ +import PropTypes from 'prop-types'; import React from 'react'; import Animated, {useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; -import PropTypes from 'prop-types'; -import * as StyleUtils from '../styles/StyleUtils'; -import stylePropTypes from '../styles/stylePropTypes'; -import CONST from '../CONST'; +import stylePropTypes from '@styles/stylePropTypes'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; const propTypes = { /** diff --git a/src/components/SplashScreenHider/index.js b/src/components/SplashScreenHider/index.js index a3f3647ede81..9bbddd2a0891 100644 --- a/src/components/SplashScreenHider/index.js +++ b/src/components/SplashScreenHider/index.js @@ -1,6 +1,6 @@ -import {useEffect} from 'react'; import PropTypes from 'prop-types'; -import BootSplash from '../../libs/BootSplash'; +import {useEffect} from 'react'; +import BootSplash from '@libs/BootSplash'; const propTypes = { /** Splash screen has been hidden */ diff --git a/src/components/SplashScreenHider/index.native.js b/src/components/SplashScreenHider/index.native.js index dbfac3331484..711ce9f6fb80 100644 --- a/src/components/SplashScreenHider/index.native.js +++ b/src/components/SplashScreenHider/index.native.js @@ -1,10 +1,10 @@ -import {useCallback, useRef} from 'react'; import PropTypes from 'prop-types'; +import {useCallback, useRef} from 'react'; import {StyleSheet} from 'react-native'; -import Reanimated, {useSharedValue, withTiming, Easing, useAnimatedStyle, runOnJS} from 'react-native-reanimated'; -import BootSplash from '../../libs/BootSplash'; -import Logo from '../../../assets/images/new-expensify-dark.svg'; -import styles from '../../styles/styles'; +import Reanimated, {Easing, runOnJS, useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; +import Logo from '@assets/images/new-expensify-dark.svg'; +import BootSplash from '@libs/BootSplash'; +import styles from '@styles/styles'; const propTypes = { /** Splash screen has been hidden */ diff --git a/src/components/StatePicker/StateSelectorModal.js b/src/components/StatePicker/StateSelectorModal.js index 378dcc4ebc8b..8bda9d5303c8 100644 --- a/src/components/StatePicker/StateSelectorModal.js +++ b/src/components/StatePicker/StateSelectorModal.js @@ -1,16 +1,16 @@ -import _ from 'underscore'; -import React, {useMemo, useEffect} from 'react'; -import PropTypes from 'prop-types'; import {CONST as COMMON_CONST} from 'expensify-common/lib/CONST'; -import CONST from '../../CONST'; -import Modal from '../Modal'; -import HeaderWithBackButton from '../HeaderWithBackButton'; -import SelectionList from '../SelectionList'; -import useLocalize from '../../hooks/useLocalize'; -import ScreenWrapper from '../ScreenWrapper'; -import styles from '../../styles/styles'; -import searchCountryOptions from '../../libs/searchCountryOptions'; -import StringUtils from '../../libs/StringUtils'; +import PropTypes from 'prop-types'; +import React, {useEffect, useMemo} from 'react'; +import _ from 'underscore'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import Modal from '@components/Modal'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import useLocalize from '@hooks/useLocalize'; +import searchCountryOptions from '@libs/searchCountryOptions'; +import StringUtils from '@libs/StringUtils'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /** Whether the modal is visible */ diff --git a/src/components/StatePicker/index.js b/src/components/StatePicker/index.js index 586abc26f702..c36c7e6b97a0 100644 --- a/src/components/StatePicker/index.js +++ b/src/components/StatePicker/index.js @@ -1,14 +1,14 @@ +import {CONST as COMMON_CONST} from 'expensify-common/lib/CONST'; +import PropTypes from 'prop-types'; import React, {useState} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import {CONST as COMMON_CONST} from 'expensify-common/lib/CONST'; -import styles from '../../styles/styles'; -import MenuItemWithTopDescription from '../MenuItemWithTopDescription'; -import useLocalize from '../../hooks/useLocalize'; -import FormHelpMessage from '../FormHelpMessage'; +import FormHelpMessage from '@components/FormHelpMessage'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import refPropTypes from '@components/refPropTypes'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; import StateSelectorModal from './StateSelectorModal'; -import refPropTypes from '../refPropTypes'; const propTypes = { /** Error text to display */ diff --git a/src/components/SubscriptAvatar.js b/src/components/SubscriptAvatar.js index 66d9812d994e..4a232419aff7 100644 --- a/src/components/SubscriptAvatar.js +++ b/src/components/SubscriptAvatar.js @@ -1,13 +1,13 @@ -import React, {memo} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {memo} from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import styles from '../styles/styles'; -import themeColors from '../styles/themes/default'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; import Avatar from './Avatar'; -import CONST from '../CONST'; -import * as StyleUtils from '../styles/StyleUtils'; import avatarPropTypes from './avatarPropTypes'; import UserDetailsTooltip from './UserDetailsTooltip'; diff --git a/src/components/SwipeableView/index.native.tsx b/src/components/SwipeableView/index.native.tsx index ac500f025016..91d851101d4e 100644 --- a/src/components/SwipeableView/index.native.tsx +++ b/src/components/SwipeableView/index.native.tsx @@ -1,6 +1,6 @@ import React, {useRef} from 'react'; import {PanResponder, View} from 'react-native'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import SwipeableViewProps from './types'; function SwipeableView({children, onSwipeDown}: SwipeableViewProps) { diff --git a/src/components/Switch.js b/src/components/Switch.js index 5c8a0da925f3..755cd60f2597 100644 --- a/src/components/Switch.js +++ b/src/components/Switch.js @@ -1,10 +1,10 @@ import PropTypes from 'prop-types'; import React, {useEffect, useRef} from 'react'; import {Animated} from 'react-native'; -import CONST from '../CONST'; -import styles from '../styles/styles'; +import useNativeDriver from '@libs/useNativeDriver'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; import PressableWithFeedback from './Pressable/PressableWithFeedback'; -import useNativeDriver from '../libs/useNativeDriver'; const propTypes = { /** Whether the switch is toggled to the on position */ diff --git a/src/components/TabSelector/TabIcon.js b/src/components/TabSelector/TabIcon.js index 85f1cd912ff6..d9d802d2076a 100644 --- a/src/components/TabSelector/TabIcon.js +++ b/src/components/TabSelector/TabIcon.js @@ -1,8 +1,8 @@ -import {StyleSheet, View, Animated} from 'react-native'; -import React from 'react'; import PropTypes from 'prop-types'; -import Icon from '../Icon'; -import themeColors from '../../styles/themes/default'; +import React from 'react'; +import {Animated, StyleSheet, View} from 'react-native'; +import Icon from '@components/Icon'; +import themeColors from '@styles/themes/default'; const propTypes = { /** Icon to display on tab */ diff --git a/src/components/TabSelector/TabLabel.js b/src/components/TabSelector/TabLabel.js index 32c8a384d814..9993e2fe4ed6 100644 --- a/src/components/TabSelector/TabLabel.js +++ b/src/components/TabSelector/TabLabel.js @@ -1,7 +1,7 @@ -import {StyleSheet, View, Text, Animated} from 'react-native'; -import React from 'react'; import PropTypes from 'prop-types'; -import styles from '../../styles/styles'; +import React from 'react'; +import {Animated, StyleSheet, Text, View} from 'react-native'; +import styles from '@styles/styles'; const propTypes = { /** Title of the tab */ diff --git a/src/components/TabSelector/TabSelector.js b/src/components/TabSelector/TabSelector.js index 3483ec10f804..b6ee359dc4ca 100644 --- a/src/components/TabSelector/TabSelector.js +++ b/src/components/TabSelector/TabSelector.js @@ -1,13 +1,13 @@ -import {View} from 'react-native'; -import React, {useMemo, useState} from 'react'; import PropTypes from 'prop-types'; +import React, {useMemo, useState} from 'react'; +import {View} from 'react-native'; import _ from 'underscore'; -import * as Expensicons from '../Icon/Expensicons'; +import * as Expensicons from '@components/Icon/Expensicons'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; import TabSelectorItem from './TabSelectorItem'; -import CONST from '../../CONST'; -import useLocalize from '../../hooks/useLocalize'; -import styles from '../../styles/styles'; -import themeColors from '../../styles/themes/default'; const propTypes = { /* Navigation state provided by React Navigation */ diff --git a/src/components/TabSelector/TabSelectorItem.js b/src/components/TabSelector/TabSelectorItem.js index 04a576f9dbf0..94861d0ccbba 100644 --- a/src/components/TabSelector/TabSelectorItem.js +++ b/src/components/TabSelector/TabSelectorItem.js @@ -1,8 +1,8 @@ -import {Animated, StyleSheet} from 'react-native'; -import React from 'react'; import PropTypes from 'prop-types'; -import styles from '../../styles/styles'; -import PressableWithFeedback from '../Pressable/PressableWithFeedback'; +import React from 'react'; +import {Animated, StyleSheet} from 'react-native'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import styles from '@styles/styles'; import TabIcon from './TabIcon'; import TabLabel from './TabLabel'; diff --git a/src/components/TagPicker/index.js b/src/components/TagPicker/index.js index 05eca664bd0f..d680cea15c8f 100644 --- a/src/components/TagPicker/index.js +++ b/src/components/TagPicker/index.js @@ -1,15 +1,15 @@ -import React, {useMemo, useState} from 'react'; -import _ from 'underscore'; import lodashGet from 'lodash/get'; +import React, {useMemo, useState} from 'react'; import {withOnyx} from 'react-native-onyx'; -import CONST from '../../CONST'; -import ONYXKEYS from '../../ONYXKEYS'; -import styles from '../../styles/styles'; -import useLocalize from '../../hooks/useLocalize'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import OptionsSelector from '../OptionsSelector'; -import {propTypes, defaultProps} from './tagPickerPropTypes'; +import _ from 'underscore'; +import OptionsSelector from '@components/OptionsSelector'; +import useLocalize from '@hooks/useLocalize'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {defaultProps, propTypes} from './tagPickerPropTypes'; function TagPicker({selectedTag, tag, policyTags, policyRecentlyUsedTags, onSubmit}) { const {translate} = useLocalize(); diff --git a/src/components/TagPicker/tagPickerPropTypes.js b/src/components/TagPicker/tagPickerPropTypes.js index 011885fe0f81..3010ab24a9c1 100644 --- a/src/components/TagPicker/tagPickerPropTypes.js +++ b/src/components/TagPicker/tagPickerPropTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import tagPropTypes from '../tagPropTypes'; +import tagPropTypes from '@components/tagPropTypes'; const propTypes = { /** The policyID we are getting tags for */ diff --git a/src/components/TaskHeaderActionButton.js b/src/components/TaskHeaderActionButton.js index a16f415f0fd7..b5dbe49fdd8d 100644 --- a/src/components/TaskHeaderActionButton.js +++ b/src/components/TaskHeaderActionButton.js @@ -1,15 +1,15 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; -import reportPropTypes from '../pages/reportPropTypes'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; -import styles from '../styles/styles'; +import compose from '@libs/compose'; +import * as ReportUtils from '@libs/ReportUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as Task from '@userActions/Task'; +import ONYXKEYS from '@src/ONYXKEYS'; import Button from './Button'; -import * as Task from '../libs/actions/Task'; -import * as ReportUtils from '../libs/ReportUtils'; -import compose from '../libs/compose'; -import ONYXKEYS from '../ONYXKEYS'; +import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { /** The report currently being looked at */ diff --git a/src/components/TestToolMenu.js b/src/components/TestToolMenu.js index 474e4c9bb10c..096bdfd5f97e 100644 --- a/src/components/TestToolMenu.js +++ b/src/components/TestToolMenu.js @@ -1,21 +1,21 @@ -import React from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import styles from '../styles/styles'; -import Switch from './Switch'; -import Text from './Text'; -import * as User from '../libs/actions/User'; -import * as Network from '../libs/actions/Network'; -import * as Session from '../libs/actions/Session'; -import ONYXKEYS from '../ONYXKEYS'; +import * as ApiUtils from '@libs/ApiUtils'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import * as Network from '@userActions/Network'; +import * as Session from '@userActions/Session'; +import * as User from '@userActions/User'; +import CONFIG from '@src/CONFIG'; +import ONYXKEYS from '@src/ONYXKEYS'; import Button from './Button'; -import TestToolRow from './TestToolRow'; import networkPropTypes from './networkPropTypes'; -import compose from '../libs/compose'; import {withNetwork} from './OnyxProvider'; -import * as ApiUtils from '../libs/ApiUtils'; -import CONFIG from '../CONFIG'; +import Switch from './Switch'; +import TestToolRow from './TestToolRow'; +import Text from './Text'; const propTypes = { /** User object in Onyx */ diff --git a/src/components/TestToolRow.tsx b/src/components/TestToolRow.tsx index 540c9dbc5068..149014893a83 100644 --- a/src/components/TestToolRow.tsx +++ b/src/components/TestToolRow.tsx @@ -1,6 +1,6 @@ import React from 'react'; import {View} from 'react-native'; -import styles from '../styles/styles'; +import styles from '@styles/styles'; import Text from './Text'; type TestToolRowProps = { diff --git a/src/components/TestToolsModal.js b/src/components/TestToolsModal.js index 43a74e48df5d..3ae8223b34e7 100644 --- a/src/components/TestToolsModal.js +++ b/src/components/TestToolsModal.js @@ -1,13 +1,13 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import {withOnyx} from 'react-native-onyx'; +import React from 'react'; import {View} from 'react-native'; -import ONYXKEYS from '../ONYXKEYS'; +import {withOnyx} from 'react-native-onyx'; +import styles from '@styles/styles'; +import toggleTestToolsModal from '@userActions/TestTool'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import Modal from './Modal'; -import CONST from '../CONST'; -import toggleTestToolsModal from '../libs/actions/TestTool'; import TestToolMenu from './TestToolMenu'; -import styles from '../styles/styles'; const propTypes = { /** Details about modal */ diff --git a/src/components/Text.tsx b/src/components/Text.tsx index 5cb252626d1f..80181156ee3a 100644 --- a/src/components/Text.tsx +++ b/src/components/Text.tsx @@ -2,9 +2,9 @@ import React, {ForwardedRef} from 'react'; // eslint-disable-next-line no-restricted-imports import {Text as RNText, TextProps as RNTextProps, StyleSheet} from 'react-native'; import type {TextStyle} from 'react-native'; -import fontFamily from '../styles/fontFamily'; -import themeColors from '../styles/themes/default'; -import variables from '../styles/variables'; +import fontFamily from '@styles/fontFamily'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; type TextProps = RNTextProps & { /** The color of the text */ diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 9bfdc79fad68..c9b1944b5b81 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -1,28 +1,28 @@ -import _ from 'underscore'; -import React, {useState, useRef, useEffect, useCallback, useMemo} from 'react'; -import {Animated, View, StyleSheet, ActivityIndicator} from 'react-native'; import Str from 'expensify-common/lib/str'; -import RNTextInput from '../RNTextInput'; -import TextInputLabel from './TextInputLabel'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {ActivityIndicator, Animated, StyleSheet, View} from 'react-native'; +import _ from 'underscore'; +import Checkbox from '@components/Checkbox'; +import FormHelpMessage from '@components/FormHelpMessage'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import RNTextInput from '@components/RNTextInput'; +import SwipeInterceptPanResponder from '@components/SwipeInterceptPanResponder'; +import Text from '@components/Text'; +import withLocalize from '@components/withLocalize'; +import * as Browser from '@libs/Browser'; +import getSecureEntryKeyboardType from '@libs/getSecureEntryKeyboardType'; +import isInputAutoFilled from '@libs/isInputAutoFilled'; +import useNativeDriver from '@libs/useNativeDriver'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; import * as baseTextInputPropTypes from './baseTextInputPropTypes'; -import themeColors from '../../styles/themes/default'; -import styles from '../../styles/styles'; -import Icon from '../Icon'; -import * as Expensicons from '../Icon/Expensicons'; -import Text from '../Text'; import * as styleConst from './styleConst'; -import * as StyleUtils from '../../styles/StyleUtils'; -import variables from '../../styles/variables'; -import Checkbox from '../Checkbox'; -import getSecureEntryKeyboardType from '../../libs/getSecureEntryKeyboardType'; -import CONST from '../../CONST'; -import FormHelpMessage from '../FormHelpMessage'; -import isInputAutoFilled from '../../libs/isInputAutoFilled'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; -import withLocalize from '../withLocalize'; -import useNativeDriver from '../../libs/useNativeDriver'; -import * as Browser from '../../libs/Browser'; -import SwipeInterceptPanResponder from '../SwipeInterceptPanResponder'; +import TextInputLabel from './TextInputLabel'; function BaseTextInput(props) { const initialValue = props.value || props.defaultValue || ''; diff --git a/src/components/TextInput/TextInputLabel/index.js b/src/components/TextInput/TextInputLabel/index.js index 4267099a56ea..f777eff039bd 100644 --- a/src/components/TextInput/TextInputLabel/index.js +++ b/src/components/TextInput/TextInputLabel/index.js @@ -1,8 +1,8 @@ -import React, {useRef, useEffect} from 'react'; +import React, {useEffect, useRef} from 'react'; import {Animated} from 'react-native'; -import styles from '../../../styles/styles'; -import {propTypes, defaultProps} from './TextInputLabelPropTypes'; -import CONST from '../../../CONST'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import {defaultProps, propTypes} from './TextInputLabelPropTypes'; function TextInputLabel({for: inputId, label, labelTranslateY, labelScale}) { const labelRef = useRef(null); diff --git a/src/components/TextInput/TextInputLabel/index.native.js b/src/components/TextInput/TextInputLabel/index.native.js index 9b065d4c722b..51b231287b1f 100644 --- a/src/components/TextInput/TextInputLabel/index.native.js +++ b/src/components/TextInput/TextInputLabel/index.native.js @@ -1,8 +1,8 @@ import React, {useState} from 'react'; import {Animated} from 'react-native'; -import styles from '../../../styles/styles'; +import * as styleConst from '@components/TextInput/styleConst'; +import styles from '@styles/styles'; import * as TextInputLabelPropTypes from './TextInputLabelPropTypes'; -import * as styleConst from '../styleConst'; function TextInputLabel(props) { const [width, setWidth] = useState(0); diff --git a/src/components/TextInput/index.js b/src/components/TextInput/index.js index 010121282a45..5f6164d3bc9a 100644 --- a/src/components/TextInput/index.js +++ b/src/components/TextInput/index.js @@ -1,12 +1,12 @@ import React, {useEffect, useRef} from 'react'; import _ from 'underscore'; -import styles from '../../styles/styles'; -import * as styleConst from './styleConst'; +import * as Browser from '@libs/Browser'; +import DomUtils from '@libs/DomUtils'; +import Visibility from '@libs/Visibility'; +import styles from '@styles/styles'; import BaseTextInput from './BaseTextInput'; import * as baseTextInputPropTypes from './baseTextInputPropTypes'; -import DomUtils from '../../libs/DomUtils'; -import Visibility from '../../libs/Visibility'; -import * as Browser from '../../libs/Browser'; +import * as styleConst from './styleConst'; function TextInput(props) { const textInputRef = useRef(null); diff --git a/src/components/TextInput/index.native.js b/src/components/TextInput/index.native.js index 059550855c0a..d28824a9977b 100644 --- a/src/components/TextInput/index.native.js +++ b/src/components/TextInput/index.native.js @@ -1,6 +1,6 @@ import React, {forwardRef, useEffect} from 'react'; import {AppState, Keyboard} from 'react-native'; -import styles from '../../styles/styles'; +import styles from '@styles/styles'; import BaseTextInput from './BaseTextInput'; import * as baseTextInputPropTypes from './baseTextInputPropTypes'; diff --git a/src/components/TextInput/styleConst.js b/src/components/TextInput/styleConst.js index f57b3f3ca56d..7d2f3021e3be 100644 --- a/src/components/TextInput/styleConst.js +++ b/src/components/TextInput/styleConst.js @@ -1,4 +1,4 @@ -import variables from '../../styles/variables'; +import variables from '@styles/variables'; const ACTIVE_LABEL_TRANSLATE_Y = 4; const ACTIVE_LABEL_SCALE = 0.8668; diff --git a/src/components/TextInputWithCurrencySymbol/BaseTextInputWithCurrencySymbol.js b/src/components/TextInputWithCurrencySymbol/BaseTextInputWithCurrencySymbol.js index ac0f4ccbe143..ee7abde8c554 100644 --- a/src/components/TextInputWithCurrencySymbol/BaseTextInputWithCurrencySymbol.js +++ b/src/components/TextInputWithCurrencySymbol/BaseTextInputWithCurrencySymbol.js @@ -1,9 +1,9 @@ import React from 'react'; -import AmountTextInput from '../AmountTextInput'; -import CurrencySymbolButton from '../CurrencySymbolButton'; -import * as CurrencyUtils from '../../libs/CurrencyUtils'; -import useLocalize from '../../hooks/useLocalize'; -import * as MoneyRequestUtils from '../../libs/MoneyRequestUtils'; +import AmountTextInput from '@components/AmountTextInput'; +import CurrencySymbolButton from '@components/CurrencySymbolButton'; +import useLocalize from '@hooks/useLocalize'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import * as MoneyRequestUtils from '@libs/MoneyRequestUtils'; import * as textInputWithCurrencySymbolPropTypes from './textInputWithCurrencySymbolPropTypes'; function BaseTextInputWithCurrencySymbol(props) { diff --git a/src/components/TextInputWithCurrencySymbol/index.android.js b/src/components/TextInputWithCurrencySymbol/index.android.js index 57b3c96136e8..f152cd3aa54f 100644 --- a/src/components/TextInputWithCurrencySymbol/index.android.js +++ b/src/components/TextInputWithCurrencySymbol/index.android.js @@ -1,4 +1,4 @@ -import React, {useState, useEffect} from 'react'; +import React, {useEffect, useState} from 'react'; import _ from 'underscore'; import BaseTextInputWithCurrencySymbol from './BaseTextInputWithCurrencySymbol'; import * as textInputWithCurrencySymbolPropTypes from './textInputWithCurrencySymbolPropTypes'; diff --git a/src/components/TextInputWithCurrencySymbol/textInputWithCurrencySymbolPropTypes.js b/src/components/TextInputWithCurrencySymbol/textInputWithCurrencySymbolPropTypes.js index 4e891029e71d..656561c14b14 100644 --- a/src/components/TextInputWithCurrencySymbol/textInputWithCurrencySymbolPropTypes.js +++ b/src/components/TextInputWithCurrencySymbol/textInputWithCurrencySymbolPropTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import refPropTypes from '../refPropTypes'; +import refPropTypes from '@components/refPropTypes'; const propTypes = { /** A ref to forward to amount text input */ diff --git a/src/components/TextLink.js b/src/components/TextLink.js index 3f7b7ff729c3..79f3d43a7743 100644 --- a/src/components/TextLink.js +++ b/src/components/TextLink.js @@ -1,12 +1,12 @@ -import _ from 'underscore'; -import React from 'react'; import PropTypes from 'prop-types'; -import Text from './Text'; -import styles from '../styles/styles'; -import stylePropTypes from '../styles/stylePropTypes'; -import CONST from '../CONST'; -import * as Link from '../libs/actions/Link'; +import React from 'react'; +import _ from 'underscore'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; +import CONST from '@src/CONST'; import refPropTypes from './refPropTypes'; +import Text from './Text'; const propTypes = { /** Link to open in new tab */ diff --git a/src/components/TextPill.js b/src/components/TextPill.js index a8a4f35b64fb..81bb0ca1e037 100644 --- a/src/components/TextPill.js +++ b/src/components/TextPill.js @@ -1,9 +1,9 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; import Text from './Text'; -import styles from '../styles/styles'; -import stylePropTypes from '../styles/stylePropTypes'; -import * as StyleUtils from '../styles/StyleUtils'; const propTypes = { text: PropTypes.string.isRequired, diff --git a/src/components/TextWithEllipsis/index.js b/src/components/TextWithEllipsis/index.js index 1734e24b03b6..8c2cd0dd9557 100644 --- a/src/components/TextWithEllipsis/index.js +++ b/src/components/TextWithEllipsis/index.js @@ -1,10 +1,10 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {View} from 'react-native'; -import Text from '../Text'; -import styles from '../../styles/styles'; -import stylePropTypes from '../../styles/stylePropTypes'; -import * as StyleUtils from '../../styles/StyleUtils'; +import Text from '@components/Text'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; const propTypes = { /** Leading text before the ellipsis */ diff --git a/src/components/ThreeDotsMenu/index.js b/src/components/ThreeDotsMenu/index.js index ab7ca57ed721..973aa7e5e189 100644 --- a/src/components/ThreeDotsMenu/index.js +++ b/src/components/ThreeDotsMenu/index.js @@ -1,17 +1,17 @@ -import React, {useState, useRef} from 'react'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useRef, useState} from 'react'; +import {View} from 'react-native'; import _ from 'underscore'; -import Icon from '../Icon'; -import PopoverMenu from '../PopoverMenu'; -import styles from '../../styles/styles'; -import useLocalize from '../../hooks/useLocalize'; -import Tooltip from '../Tooltip/PopoverAnchorTooltip'; -import * as Expensicons from '../Icon/Expensicons'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PopoverMenu from '@components/PopoverMenu'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Tooltip from '@components/Tooltip/PopoverAnchorTooltip'; +import useLocalize from '@hooks/useLocalize'; +import * as Browser from '@libs/Browser'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; import ThreeDotsMenuItemPropTypes from './ThreeDotsMenuItemPropTypes'; -import CONST from '../../CONST'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; -import * as Browser from '../../libs/Browser'; const propTypes = { /** Tooltip for the popup icon */ diff --git a/src/components/ThumbnailImage.js b/src/components/ThumbnailImage.js index 983f806bb2e2..bbd5e27accc1 100644 --- a/src/components/ThumbnailImage.js +++ b/src/components/ThumbnailImage.js @@ -1,12 +1,12 @@ import lodashClamp from 'lodash/clamp'; -import React, {useCallback, useState} from 'react'; -import {View, Dimensions} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useCallback, useState} from 'react'; +import {Dimensions, View} from 'react-native'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; import ImageWithSizeCalculation from './ImageWithSizeCalculation'; -import styles from '../styles/styles'; -import * as StyleUtils from '../styles/StyleUtils'; -import * as DeviceCapabilities from '../libs/DeviceCapabilities'; -import useWindowDimensions from '../hooks/useWindowDimensions'; const propTypes = { /** Source URL for the preview image */ diff --git a/src/components/Tooltip/BaseTooltip.js b/src/components/Tooltip/BaseTooltip.js index 7ef80c552980..3eb905e7a3e5 100644 --- a/src/components/Tooltip/BaseTooltip.js +++ b/src/components/Tooltip/BaseTooltip.js @@ -1,16 +1,16 @@ -import _ from 'underscore'; -import React, {memo, useCallback, useEffect, useRef, useState} from 'react'; -import {Animated} from 'react-native'; import {BoundsObserver} from '@react-ng/bounds-observer'; import Str from 'expensify-common/lib/str'; -import TooltipRenderedOnPageBody from './TooltipRenderedOnPageBody'; -import Hoverable from '../Hoverable'; +import React, {memo, useCallback, useEffect, useRef, useState} from 'react'; +import {Animated} from 'react-native'; +import _ from 'underscore'; +import Hoverable from '@components/Hoverable'; +import useLocalize from '@hooks/useLocalize'; +import usePrevious from '@hooks/usePrevious'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import * as tooltipPropTypes from './tooltipPropTypes'; +import TooltipRenderedOnPageBody from './TooltipRenderedOnPageBody'; import TooltipSense from './TooltipSense'; -import * as DeviceCapabilities from '../../libs/DeviceCapabilities'; -import usePrevious from '../../hooks/usePrevious'; -import useLocalize from '../../hooks/useLocalize'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; const hasHoverSupport = DeviceCapabilities.hasHoverSupport(); diff --git a/src/components/Tooltip/PopoverAnchorTooltip.js b/src/components/Tooltip/PopoverAnchorTooltip.js index bca49ac9b7bc..6123be56544c 100644 --- a/src/components/Tooltip/PopoverAnchorTooltip.js +++ b/src/components/Tooltip/PopoverAnchorTooltip.js @@ -1,8 +1,8 @@ -import React, {useContext, useRef, useMemo} from 'react'; import PropTypes from 'prop-types'; -import {propTypes as tooltipPropTypes, defaultProps as tooltipDefaultProps} from './tooltipPropTypes'; +import React, {useContext, useMemo, useRef} from 'react'; +import {PopoverContext} from '@components/PopoverProvider'; import BaseTooltip from './BaseTooltip'; -import {PopoverContext} from '../PopoverProvider'; +import {defaultProps as tooltipDefaultProps, propTypes as tooltipPropTypes} from './tooltipPropTypes'; const propTypes = { ...tooltipPropTypes, diff --git a/src/components/Tooltip/TooltipRenderedOnPageBody.js b/src/components/Tooltip/TooltipRenderedOnPageBody.js index f61ecaee1059..69d06775ae2a 100644 --- a/src/components/Tooltip/TooltipRenderedOnPageBody.js +++ b/src/components/Tooltip/TooltipRenderedOnPageBody.js @@ -1,10 +1,10 @@ -import React, {useLayoutEffect, useEffect, useState, useRef, useMemo} from 'react'; import PropTypes from 'prop-types'; -import {Animated, View} from 'react-native'; +import React, {useEffect, useLayoutEffect, useMemo, useRef, useState} from 'react'; import ReactDOM from 'react-dom'; -import getTooltipStyles from '../../styles/getTooltipStyles'; -import Text from '../Text'; -import Log from '../../libs/Log'; +import {Animated, View} from 'react-native'; +import Text from '@components/Text'; +import Log from '@libs/Log'; +import getTooltipStyles from '@styles/getTooltipStyles'; const propTypes = { /** Window width */ diff --git a/src/components/Tooltip/TooltipSense.js b/src/components/Tooltip/TooltipSense.js index 76cd25294497..0e551e687cf3 100644 --- a/src/components/Tooltip/TooltipSense.js +++ b/src/components/Tooltip/TooltipSense.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; let active = false; diff --git a/src/components/Tooltip/index.js b/src/components/Tooltip/index.js index 2e6789ec73f6..19a607220e1c 100644 --- a/src/components/Tooltip/index.js +++ b/src/components/Tooltip/index.js @@ -1,7 +1,7 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import {propTypes as tooltipPropTypes, defaultProps as tooltipDefaultProps} from './tooltipPropTypes'; +import React from 'react'; import BaseTooltip from './BaseTooltip'; +import {defaultProps as tooltipDefaultProps, propTypes as tooltipPropTypes} from './tooltipPropTypes'; const propTypes = { ...tooltipPropTypes, diff --git a/src/components/Tooltip/tooltipPropTypes.js b/src/components/Tooltip/tooltipPropTypes.js index 684a102e0339..21df0df07f0d 100644 --- a/src/components/Tooltip/tooltipPropTypes.js +++ b/src/components/Tooltip/tooltipPropTypes.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; -import refPropTypes from '../refPropTypes'; -import variables from '../../styles/variables'; -import CONST from '../../CONST'; +import refPropTypes from '@components/refPropTypes'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; const propTypes = { /** The text to display in the tooltip. If text is ommitted, only children will be rendered. */ diff --git a/src/components/UnorderedList.js b/src/components/UnorderedList.js index 4500d9fc3538..de8cb4abd7f8 100644 --- a/src/components/UnorderedList.js +++ b/src/components/UnorderedList.js @@ -1,9 +1,9 @@ +import PropTypes from 'prop-types'; import React from 'react'; -import _ from 'underscore'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; +import _ from 'underscore'; +import styles from '@styles/styles'; import Text from './Text'; -import styles from '../styles/styles'; const propTypes = { /** An array of strings to display as an unordered list */ diff --git a/src/components/UnreadActionIndicator.js b/src/components/UnreadActionIndicator.js index ff1090640570..4ba4ded97820 100755 --- a/src/components/UnreadActionIndicator.js +++ b/src/components/UnreadActionIndicator.js @@ -1,8 +1,8 @@ import React from 'react'; import {View} from 'react-native'; -import styles from '../styles/styles'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; import Text from './Text'; -import CONST from '../CONST'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; function UnreadActionIndicator(props) { diff --git a/src/components/UpdateAppModal/BaseUpdateAppModal.js b/src/components/UpdateAppModal/BaseUpdateAppModal.js index 7dfa0e7d3a82..07b446172286 100755 --- a/src/components/UpdateAppModal/BaseUpdateAppModal.js +++ b/src/components/UpdateAppModal/BaseUpdateAppModal.js @@ -1,7 +1,7 @@ -import React, {useState, memo} from 'react'; -import {propTypes, defaultProps} from './updateAppModalPropTypes'; -import ConfirmModal from '../ConfirmModal'; -import withLocalize from '../withLocalize'; +import React, {memo, useState} from 'react'; +import ConfirmModal from '@components/ConfirmModal'; +import withLocalize from '@components/withLocalize'; +import {defaultProps, propTypes} from './updateAppModalPropTypes'; function BaseUpdateAppModal({translate, onSubmit}) { const [isModalOpen, setIsModalOpen] = useState(true); diff --git a/src/components/UpdateAppModal/index.desktop.js b/src/components/UpdateAppModal/index.desktop.js index 424b7a616e39..397ce2c75ea3 100644 --- a/src/components/UpdateAppModal/index.desktop.js +++ b/src/components/UpdateAppModal/index.desktop.js @@ -1,7 +1,7 @@ import React from 'react'; +import ELECTRON_EVENTS from '../../../desktop/ELECTRON_EVENTS'; import BaseUpdateAppModal from './BaseUpdateAppModal'; import {propTypes} from './updateAppModalPropTypes'; -import ELECTRON_EVENTS from '../../../desktop/ELECTRON_EVENTS'; function UpdateAppModal(props) { const updateApp = () => { diff --git a/src/components/UserDetailsTooltip/BaseUserDetailsTooltip.web.js b/src/components/UserDetailsTooltip/BaseUserDetailsTooltip.web.js index 5f124cb21467..871173d01b56 100644 --- a/src/components/UserDetailsTooltip/BaseUserDetailsTooltip.web.js +++ b/src/components/UserDetailsTooltip/BaseUserDetailsTooltip.web.js @@ -1,18 +1,18 @@ -import React, {useCallback} from 'react'; -import {View, Text} from 'react-native'; -import {withOnyx} from 'react-native-onyx'; import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; +import React, {useCallback} from 'react'; +import {Text, View} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import Avatar from '../Avatar'; -import Tooltip from '../Tooltip'; -import {propTypes, defaultProps} from './userDetailsTooltipPropTypes'; -import styles from '../../styles/styles'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as UserUtils from '../../libs/UserUtils'; -import CONST from '../../CONST'; -import * as LocalePhoneNumber from '../../libs/LocalePhoneNumber'; -import useLocalize from '../../hooks/useLocalize'; +import Avatar from '@components/Avatar'; +import Tooltip from '@components/Tooltip'; +import useLocalize from '@hooks/useLocalize'; +import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; +import * as UserUtils from '@libs/UserUtils'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {defaultProps, propTypes} from './userDetailsTooltipPropTypes'; function BaseUserDetailsTooltip(props) { const {translate} = useLocalize(); diff --git a/src/components/UserDetailsTooltip/index.js b/src/components/UserDetailsTooltip/index.js index 86778e4a1019..ea5cd4337071 100644 --- a/src/components/UserDetailsTooltip/index.js +++ b/src/components/UserDetailsTooltip/index.js @@ -1,7 +1,7 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import {propTypes as userDetailsTooltipPropTypes, defaultProps as userDetailsTooltipDefaultProps} from './userDetailsTooltipPropTypes'; +import React from 'react'; import BaseUserDetailsTooltip from './BaseUserDetailsTooltip'; +import {defaultProps as userDetailsTooltipDefaultProps, propTypes as userDetailsTooltipPropTypes} from './userDetailsTooltipPropTypes'; const propTypes = { ...userDetailsTooltipPropTypes, diff --git a/src/components/UserDetailsTooltip/userDetailsTooltipPropTypes.js b/src/components/UserDetailsTooltip/userDetailsTooltipPropTypes.js index f311ed0d18df..538e9ad5348f 100644 --- a/src/components/UserDetailsTooltip/userDetailsTooltipPropTypes.js +++ b/src/components/UserDetailsTooltip/userDetailsTooltipPropTypes.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; -import personalDetailsPropType from '../../pages/personalDetailsPropType'; -import avatarPropTypes from '../avatarPropTypes'; +import avatarPropTypes from '@components/avatarPropTypes'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; const propTypes = { /** User's Account ID */ diff --git a/src/components/ValidateCode/ExpiredValidateCodeModal.js b/src/components/ValidateCode/ExpiredValidateCodeModal.js index e31e0772a8c5..f75cc3f19d49 100644 --- a/src/components/ValidateCode/ExpiredValidateCodeModal.js +++ b/src/components/ValidateCode/ExpiredValidateCodeModal.js @@ -1,13 +1,13 @@ import React from 'react'; import {View} from 'react-native'; -import themeColors from '../../styles/themes/default'; -import styles from '../../styles/styles'; -import Icon from '../Icon'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import Text from '../Text'; -import * as Expensicons from '../Icon/Expensicons'; -import * as Illustrations from '../Icon/Illustrations'; -import variables from '../../styles/variables'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/components/ValidateCode/JustSignedInModal.js b/src/components/ValidateCode/JustSignedInModal.js index e96505470eba..dd6085646120 100644 --- a/src/components/ValidateCode/JustSignedInModal.js +++ b/src/components/ValidateCode/JustSignedInModal.js @@ -1,14 +1,14 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {View} from 'react-native'; -import themeColors from '../../styles/themes/default'; -import styles from '../../styles/styles'; -import Icon from '../Icon'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import Text from '../Text'; -import * as Expensicons from '../Icon/Expensicons'; -import * as Illustrations from '../Icon/Illustrations'; -import variables from '../../styles/variables'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/components/ValidateCode/ValidateCodeModal.js b/src/components/ValidateCode/ValidateCodeModal.js index ceebc54a47af..173467d16b14 100644 --- a/src/components/ValidateCode/ValidateCodeModal.js +++ b/src/components/ValidateCode/ValidateCodeModal.js @@ -1,20 +1,20 @@ -import React, {useCallback} from 'react'; -import PropTypes from 'prop-types'; -import {compose} from 'underscore'; -import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useCallback} from 'react'; import {View} from 'react-native'; -import themeColors from '../../styles/themes/default'; -import styles from '../../styles/styles'; -import Icon from '../Icon'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import Text from '../Text'; -import * as Expensicons from '../Icon/Expensicons'; -import * as Illustrations from '../Icon/Illustrations'; -import variables from '../../styles/variables'; -import TextLink from '../TextLink'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as Session from '../../libs/actions/Session'; +import {withOnyx} from 'react-native-onyx'; +import {compose} from 'underscore'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import * as Session from '@userActions/Session'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Code to display. */ diff --git a/src/components/ValuePicker/ValueSelectorModal.js b/src/components/ValuePicker/ValueSelectorModal.js index 23aac4839d2a..0a524a324959 100644 --- a/src/components/ValuePicker/ValueSelectorModal.js +++ b/src/components/ValuePicker/ValueSelectorModal.js @@ -1,12 +1,12 @@ -import React, {useState, useEffect} from 'react'; -import PropTypes from 'prop-types'; import _ from 'lodash'; -import CONST from '../../CONST'; -import HeaderWithBackButton from '../HeaderWithBackButton'; -import SelectionList from '../SelectionList'; -import Modal from '../Modal'; -import ScreenWrapper from '../ScreenWrapper'; -import styles from '../../styles/styles'; +import PropTypes from 'prop-types'; +import React, {useEffect, useState} from 'react'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import Modal from '@components/Modal'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /** Whether the modal is visible */ diff --git a/src/components/ValuePicker/index.js b/src/components/ValuePicker/index.js index 09573c1fdeca..e9ec200b7a7d 100644 --- a/src/components/ValuePicker/index.js +++ b/src/components/ValuePicker/index.js @@ -1,14 +1,14 @@ +import _ from 'lodash'; +import PropTypes from 'prop-types'; import React, {useState} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import _ from 'lodash'; -import styles from '../../styles/styles'; -import MenuItemWithTopDescription from '../MenuItemWithTopDescription'; +import FormHelpMessage from '@components/FormHelpMessage'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import refPropTypes from '@components/refPropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; import ValueSelectorModal from './ValueSelectorModal'; -import FormHelpMessage from '../FormHelpMessage'; -import refPropTypes from '../refPropTypes'; -import * as StyleUtils from '../../styles/StyleUtils'; -import variables from '../../styles/variables'; const propTypes = { /** Form Error description */ diff --git a/src/components/VideoChatButtonAndMenu/BaseVideoChatButtonAndMenu.js b/src/components/VideoChatButtonAndMenu/BaseVideoChatButtonAndMenu.js index ed1b71c8fb0f..ceb10de0f909 100755 --- a/src/components/VideoChatButtonAndMenu/BaseVideoChatButtonAndMenu.js +++ b/src/components/VideoChatButtonAndMenu/BaseVideoChatButtonAndMenu.js @@ -1,24 +1,24 @@ -import _ from 'underscore'; -import React, {useState, useRef, useEffect, useCallback} from 'react'; -import {View, Dimensions} from 'react-native'; import PropTypes from 'prop-types'; -import Icon from '../Icon'; -import * as Expensicons from '../Icon/Expensicons'; -import Popover from '../Popover'; -import MenuItem from '../MenuItem'; -import ZoomIcon from '../../../assets/images/zoom-icon.svg'; -import GoogleMeetIcon from '../../../assets/images/google-meet.svg'; -import CONST from '../../CONST'; -import styles from '../../styles/styles'; -import themeColors from '../../styles/themes/default'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions'; -import withLocalize, {withLocalizePropTypes} from '../withLocalize'; -import compose from '../../libs/compose'; -import Tooltip from '../Tooltip/PopoverAnchorTooltip'; -import {propTypes as videoChatButtonAndMenuPropTypes, defaultProps} from './videoChatButtonAndMenuPropTypes'; -import * as Session from '../../libs/actions/Session'; -import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; -import * as Link from '../../libs/actions/Link'; +import React, {useCallback, useEffect, useRef, useState} from 'react'; +import {Dimensions, View} from 'react-native'; +import _ from 'underscore'; +import GoogleMeetIcon from '@assets/images/google-meet.svg'; +import ZoomIcon from '@assets/images/zoom-icon.svg'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import Popover from '@components/Popover'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Tooltip from '@components/Tooltip/PopoverAnchorTooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as Link from '@userActions/Link'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; +import {defaultProps, propTypes as videoChatButtonAndMenuPropTypes} from './videoChatButtonAndMenuPropTypes'; const propTypes = { /** Link to open when user wants to create a new google meet meeting */ diff --git a/src/components/VideoChatButtonAndMenu/index.android.js b/src/components/VideoChatButtonAndMenu/index.android.js index 53f43b73d600..fe19a530aa95 100644 --- a/src/components/VideoChatButtonAndMenu/index.android.js +++ b/src/components/VideoChatButtonAndMenu/index.android.js @@ -1,7 +1,7 @@ import React from 'react'; -import CONST from '../../CONST'; -import {propTypes, defaultProps} from './videoChatButtonAndMenuPropTypes'; +import CONST from '@src/CONST'; import BaseVideoChatButtonAndMenu from './BaseVideoChatButtonAndMenu'; +import {defaultProps, propTypes} from './videoChatButtonAndMenuPropTypes'; // On Android creating a new google meet meeting requires the CALL_PHONE permission in some cases // so we're just opening the google meet app instead, more details: diff --git a/src/components/VideoChatButtonAndMenu/index.js b/src/components/VideoChatButtonAndMenu/index.js index bf3be904103a..f3f657066e54 100644 --- a/src/components/VideoChatButtonAndMenu/index.js +++ b/src/components/VideoChatButtonAndMenu/index.js @@ -1,7 +1,7 @@ import React from 'react'; -import CONST from '../../CONST'; -import {propTypes, defaultProps} from './videoChatButtonAndMenuPropTypes'; +import CONST from '@src/CONST'; import BaseVideoChatButtonAndMenu from './BaseVideoChatButtonAndMenu'; +import {defaultProps, propTypes} from './videoChatButtonAndMenuPropTypes'; function VideoChatButtonAndMenu(props) { return ( diff --git a/src/components/WalletSection.js b/src/components/WalletSection.js index ec8a1680937c..d79d2be0ddc9 100644 --- a/src/components/WalletSection.js +++ b/src/components/WalletSection.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import React from 'react'; +import styles from '@styles/styles'; import Section from './Section'; -import styles from '../styles/styles'; const propTypes = { /** Contents to display inside the section */ diff --git a/src/components/WalletStatementModal/index.js b/src/components/WalletStatementModal/index.js index b4d87bf4e0e4..59508f8057ab 100644 --- a/src/components/WalletStatementModal/index.js +++ b/src/components/WalletStatementModal/index.js @@ -1,18 +1,18 @@ -import React, {useState} from 'react'; -import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; +import React, {useState} from 'react'; import {View} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import compose from '../../libs/compose'; -import withLocalize from '../withLocalize'; -import ONYXKEYS from '../../ONYXKEYS'; -import {walletStatementPropTypes, walletStatementDefaultProps} from './WalletStatementModalPropTypes'; -import styles from '../../styles/styles'; -import FullScreenLoadingIndicator from '../FullscreenLoadingIndicator'; -import ROUTES from '../../ROUTES'; -import Navigation from '../../libs/Navigation/Navigation'; -import * as Report from '../../libs/actions/Report'; -import CONST from '../../CONST'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import withLocalize from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {walletStatementDefaultProps, walletStatementPropTypes} from './WalletStatementModalPropTypes'; function WalletStatementModal({statementPageURL, session}) { const [isLoading, setIsLoading] = useState(true); diff --git a/src/components/WalletStatementModal/index.native.js b/src/components/WalletStatementModal/index.native.js index 38d1f90af00d..9c2aea8e8ec4 100644 --- a/src/components/WalletStatementModal/index.native.js +++ b/src/components/WalletStatementModal/index.native.js @@ -1,15 +1,15 @@ -import React, {useCallback, useRef} from 'react'; -import {WebView} from 'react-native-webview'; import lodashGet from 'lodash/get'; +import React, {useCallback, useRef} from 'react'; import {withOnyx} from 'react-native-onyx'; +import {WebView} from 'react-native-webview'; import _ from 'underscore'; -import {walletStatementPropTypes, walletStatementDefaultProps} from './WalletStatementModalPropTypes'; -import FullScreenLoadingIndicator from '../FullscreenLoadingIndicator'; -import * as Report from '../../libs/actions/Report'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import Navigation from '@libs/Navigation/Navigation'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {walletStatementDefaultProps, walletStatementPropTypes} from './WalletStatementModalPropTypes'; const IOU_ROUTES = [ROUTES.IOU_REQUEST, ROUTES.IOU_SEND]; const renderLoading = () => ; diff --git a/src/components/ZeroWidthView/index.js b/src/components/ZeroWidthView/index.js index 6c3809a40a04..58b2dfa039ef 100644 --- a/src/components/ZeroWidthView/index.js +++ b/src/components/ZeroWidthView/index.js @@ -1,8 +1,8 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import * as EmojiUtils from '../../libs/EmojiUtils'; -import * as Browser from '../../libs/Browser'; -import Text from '../Text'; +import React from 'react'; +import Text from '@components/Text'; +import * as Browser from '@libs/Browser'; +import * as EmojiUtils from '@libs/EmojiUtils'; const propTypes = { /** If this is the Concierge chat, we'll open the modal for requesting a setup call instead of showing popover menu */ diff --git a/src/components/avatarPropTypes.js b/src/components/avatarPropTypes.js index 915eac995fcb..9ecea0fad778 100644 --- a/src/components/avatarPropTypes.js +++ b/src/components/avatarPropTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import CONST from '../CONST'; +import CONST from '@src/CONST'; export default PropTypes.shape({ source: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), diff --git a/src/components/createOnyxContext.tsx b/src/components/createOnyxContext.tsx index a0ac5942b098..f7b2d6cbf297 100644 --- a/src/components/createOnyxContext.tsx +++ b/src/components/createOnyxContext.tsx @@ -1,9 +1,9 @@ -import React, {ComponentType, ForwardRefExoticComponent, ForwardedRef, PropsWithoutRef, ReactNode, RefAttributes, createContext, forwardRef, useContext} from 'react'; -import {withOnyx} from 'react-native-onyx'; import Str from 'expensify-common/lib/str'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; -import {OnyxCollectionKey, OnyxKey, OnyxKeyValue, OnyxValues} from '../ONYXKEYS'; -import ChildrenProps from '../types/utils/ChildrenProps'; +import React, {ComponentType, createContext, ForwardedRef, forwardRef, ForwardRefExoticComponent, PropsWithoutRef, ReactNode, RefAttributes, useContext} from 'react'; +import {withOnyx} from 'react-native-onyx'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import {OnyxCollectionKey, OnyxKey, OnyxKeyValue, OnyxValues} from '@src/ONYXKEYS'; +import ChildrenProps from '@src/types/utils/ChildrenProps'; type OnyxKeys = (OnyxKey | OnyxCollectionKey) & keyof OnyxValues; diff --git a/src/components/menuItemPropTypes.js b/src/components/menuItemPropTypes.js index 4b37e8040d45..d4b12b9cf479 100644 --- a/src/components/menuItemPropTypes.js +++ b/src/components/menuItemPropTypes.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import _ from 'underscore'; -import CONST from '../CONST'; -import stylePropTypes from '../styles/stylePropTypes'; +import stylePropTypes from '@styles/stylePropTypes'; +import CONST from '@src/CONST'; import avatarPropTypes from './avatarPropTypes'; import refPropTypes from './refPropTypes'; diff --git a/src/components/optionPropTypes.js b/src/components/optionPropTypes.js index 709298036f07..d5ef485b8276 100644 --- a/src/components/optionPropTypes.js +++ b/src/components/optionPropTypes.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; -import CONST from '../CONST'; -import participantPropTypes from './participantPropTypes'; +import CONST from '@src/CONST'; import avatarPropTypes from './avatarPropTypes'; +import participantPropTypes from './participantPropTypes'; export default PropTypes.shape({ // Text to display diff --git a/src/components/transactionPropTypes.js b/src/components/transactionPropTypes.js index e3e06bb00c01..049fe60630e5 100644 --- a/src/components/transactionPropTypes.js +++ b/src/components/transactionPropTypes.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import _ from 'underscore'; -import CONST from '../CONST'; +import CONST from '@src/CONST'; export default PropTypes.shape({ /** The transaction id */ diff --git a/src/components/withCurrentReportID.js b/src/components/withCurrentReportID.js index 18f716981e65..ab1b5abc2395 100644 --- a/src/components/withCurrentReportID.js +++ b/src/components/withCurrentReportID.js @@ -1,8 +1,7 @@ -import React, {createContext, forwardRef, useCallback, useState, useMemo} from 'react'; import PropTypes from 'prop-types'; - -import getComponentDisplayName from '../libs/getComponentDisplayName'; -import Navigation from '../libs/Navigation/Navigation'; +import React, {createContext, forwardRef, useCallback, useMemo, useState} from 'react'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import Navigation from '@libs/Navigation/Navigation'; const CurrentReportIDContext = createContext(null); diff --git a/src/components/withCurrentUserPersonalDetails.tsx b/src/components/withCurrentUserPersonalDetails.tsx index e1472f280f17..ed580b4dbe4a 100644 --- a/src/components/withCurrentUserPersonalDetails.tsx +++ b/src/components/withCurrentUserPersonalDetails.tsx @@ -1,9 +1,9 @@ -import React, {ComponentType, RefAttributes, ForwardedRef, useMemo} from 'react'; +import React, {ComponentType, ForwardedRef, RefAttributes, useMemo} from 'react'; import {OnyxEntry, withOnyx} from 'react-native-onyx'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; -import ONYXKEYS from '../ONYXKEYS'; -import personalDetailsPropType from '../pages/personalDetailsPropType'; -import type {PersonalDetails, Session} from '../types/onyx'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import ONYXKEYS from '@src/ONYXKEYS'; +import type {PersonalDetails, Session} from '@src/types/onyx'; type CurrentUserPersonalDetails = PersonalDetails | Record; diff --git a/src/components/withEnvironment.tsx b/src/components/withEnvironment.tsx index 0f065eac68fe..1bfc147f0db3 100644 --- a/src/components/withEnvironment.tsx +++ b/src/components/withEnvironment.tsx @@ -1,8 +1,8 @@ -import React, {ComponentType, RefAttributes, ReactNode, ForwardedRef, ReactElement, createContext, useState, useEffect, forwardRef, useContext, useMemo} from 'react'; +import React, {ComponentType, createContext, ForwardedRef, forwardRef, ReactElement, ReactNode, RefAttributes, useContext, useEffect, useMemo, useState} from 'react'; import {ValueOf} from 'type-fest'; -import * as Environment from '../libs/Environment/Environment'; -import CONST from '../CONST'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; +import * as Environment from '@libs/Environment/Environment'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import CONST from '@src/CONST'; type EnvironmentProviderProps = { /** Actual content wrapped by this component */ diff --git a/src/components/withKeyboardState.js b/src/components/withKeyboardState.js index 3154f7e98d67..d89a4a8228bf 100755 --- a/src/components/withKeyboardState.js +++ b/src/components/withKeyboardState.js @@ -1,7 +1,7 @@ -import React, {forwardRef, createContext, useEffect, useState, useMemo} from 'react'; -import {Keyboard} from 'react-native'; import PropTypes from 'prop-types'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; +import React, {createContext, forwardRef, useEffect, useMemo, useState} from 'react'; +import {Keyboard} from 'react-native'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; const KeyboardStateContext = createContext(null); const keyboardStatePropTypes = { diff --git a/src/components/withLocalize.js b/src/components/withLocalize.js index 65e98f78f312..346d402829bd 100755 --- a/src/components/withLocalize.js +++ b/src/components/withLocalize.js @@ -1,7 +1,7 @@ -import React, {forwardRef} from 'react'; import PropTypes from 'prop-types'; +import React, {forwardRef} from 'react'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; import {LocaleContext} from './LocaleContextProvider'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; const withLocalizePropTypes = { /** Returns translated string for given locale and phrase */ diff --git a/src/components/withNavigation.tsx b/src/components/withNavigation.tsx index c5842fdacc44..0834eabc2adb 100644 --- a/src/components/withNavigation.tsx +++ b/src/components/withNavigation.tsx @@ -1,6 +1,6 @@ -import React, {ComponentType, ForwardedRef, RefAttributes} from 'react'; import {NavigationProp, useNavigation} from '@react-navigation/native'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; +import React, {ComponentType, ForwardedRef, RefAttributes} from 'react'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; type WithNavigationProps = { navigation: NavigationProp; diff --git a/src/components/withNavigationFallback.js b/src/components/withNavigationFallback.js index 413d0734507a..a03c1155fa46 100644 --- a/src/components/withNavigationFallback.js +++ b/src/components/withNavigationFallback.js @@ -1,6 +1,6 @@ -import React, {forwardRef, useContext, useMemo} from 'react'; import {NavigationContext} from '@react-navigation/core'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; +import React, {forwardRef, useContext, useMemo} from 'react'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; import refPropTypes from './refPropTypes'; export default function (WrappedComponent) { diff --git a/src/components/withNavigationFocus.tsx b/src/components/withNavigationFocus.tsx index f3f1d3561d9c..8dcd06ecb4c8 100644 --- a/src/components/withNavigationFocus.tsx +++ b/src/components/withNavigationFocus.tsx @@ -1,6 +1,6 @@ -import React, {ComponentType, ForwardedRef, RefAttributes} from 'react'; import {useIsFocused} from '@react-navigation/native'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; +import React, {ComponentType, ForwardedRef, RefAttributes} from 'react'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; type WithNavigationFocusProps = { isFocused: boolean; diff --git a/src/components/withTheme.js b/src/components/withTheme.js index 753a75d2c354..1d8af53de01d 100644 --- a/src/components/withTheme.js +++ b/src/components/withTheme.js @@ -1,7 +1,7 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import useTheme from '../styles/themes/useTheme'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; +import React from 'react'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import useTheme from '@styles/themes/useTheme'; import refPropTypes from './refPropTypes'; const withThemePropTypes = { diff --git a/src/components/withThemeStyles.js b/src/components/withThemeStyles.js index 63356e20d990..533efa79a580 100644 --- a/src/components/withThemeStyles.js +++ b/src/components/withThemeStyles.js @@ -1,7 +1,7 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import useThemeStyles from '../styles/useThemeStyles'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; +import React from 'react'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import useThemeStyles from '@styles/useThemeStyles'; import refPropTypes from './refPropTypes'; const withThemeStylesPropTypes = { diff --git a/src/components/withToggleVisibilityView.js b/src/components/withToggleVisibilityView.js index c168b49ced20..04c6ab8e8481 100644 --- a/src/components/withToggleVisibilityView.js +++ b/src/components/withToggleVisibilityView.js @@ -1,8 +1,8 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../styles/styles'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import styles from '@styles/styles'; import refPropTypes from './refPropTypes'; const toggleVisibilityViewPropTypes = { diff --git a/src/components/withViewportOffsetTop.tsx b/src/components/withViewportOffsetTop.tsx index e2e1dc2d3484..d6c170b20480 100644 --- a/src/components/withViewportOffsetTop.tsx +++ b/src/components/withViewportOffsetTop.tsx @@ -1,6 +1,6 @@ -import React, {useEffect, forwardRef, useState, ComponentType, RefAttributes, ForwardedRef} from 'react'; -import getComponentDisplayName from '../libs/getComponentDisplayName'; -import addViewportResizeListener from '../libs/VisualViewport'; +import React, {ComponentType, ForwardedRef, forwardRef, RefAttributes, useEffect, useState} from 'react'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import addViewportResizeListener from '@libs/VisualViewport'; type ViewportOffsetTopProps = { // viewportOffsetTop returns the offset of the top edge of the visual viewport from the diff --git a/src/components/withWindowDimensions/index.js b/src/components/withWindowDimensions/index.js index 16e5985e0985..f46624b2f41c 100644 --- a/src/components/withWindowDimensions/index.js +++ b/src/components/withWindowDimensions/index.js @@ -1,11 +1,11 @@ -import React, {forwardRef, createContext, useState, useEffect, useMemo} from 'react'; -import PropTypes from 'prop-types'; import lodashDebounce from 'lodash/debounce'; +import PropTypes from 'prop-types'; +import React, {createContext, forwardRef, useEffect, useMemo, useState} from 'react'; import {Dimensions} from 'react-native'; import {useSafeAreaInsets} from 'react-native-safe-area-context'; -import getComponentDisplayName from '../../libs/getComponentDisplayName'; -import variables from '../../styles/variables'; -import getWindowHeightAdjustment from '../../libs/getWindowHeightAdjustment'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import getWindowHeightAdjustment from '@libs/getWindowHeightAdjustment'; +import variables from '@styles/variables'; const WindowDimensionsContext = createContext(null); const windowDimensionsPropTypes = { diff --git a/src/components/withWindowDimensions/index.native.js b/src/components/withWindowDimensions/index.native.js index 363196b3fd4d..91d81f5fb4e0 100644 --- a/src/components/withWindowDimensions/index.native.js +++ b/src/components/withWindowDimensions/index.native.js @@ -1,10 +1,10 @@ -import React, {forwardRef, createContext, useState, useEffect, useMemo} from 'react'; import PropTypes from 'prop-types'; +import React, {createContext, forwardRef, useEffect, useMemo, useState} from 'react'; import {Dimensions} from 'react-native'; import {useSafeAreaInsets} from 'react-native-safe-area-context'; -import getComponentDisplayName from '../../libs/getComponentDisplayName'; -import variables from '../../styles/variables'; -import getWindowHeightAdjustment from '../../libs/getWindowHeightAdjustment'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import getWindowHeightAdjustment from '@libs/getWindowHeightAdjustment'; +import variables from '@styles/variables'; const WindowDimensionsContext = createContext(null); const windowDimensionsPropTypes = { diff --git a/src/hooks/useArrowKeyFocusManager.js b/src/hooks/useArrowKeyFocusManager.js index 58cecb169249..a633dba5ffc5 100644 --- a/src/hooks/useArrowKeyFocusManager.js +++ b/src/hooks/useArrowKeyFocusManager.js @@ -1,6 +1,6 @@ -import {useState, useEffect, useCallback, useMemo} from 'react'; +import {useCallback, useEffect, useMemo, useState} from 'react'; +import CONST from '@src/CONST'; import useKeyboardShortcut from './useKeyboardShortcut'; -import CONST from '../CONST'; /** * A hook that makes it easy to use the arrow keys to manage focus of items in a list diff --git a/src/hooks/useAutoFocusInput.js b/src/hooks/useAutoFocusInput.js index 6611f867f210..275fed67f52d 100644 --- a/src/hooks/useAutoFocusInput.js +++ b/src/hooks/useAutoFocusInput.js @@ -1,6 +1,6 @@ import {useFocusEffect} from '@react-navigation/native'; -import {useState, useEffect, useRef, useCallback} from 'react'; -import CONST from '../CONST'; +import {useCallback, useEffect, useRef, useState} from 'react'; +import CONST from '@src/CONST'; export default function useAutoFocusInput() { const [isInputInitialized, setIsInputInitialized] = useState(false); diff --git a/src/hooks/useCopySelectionHelper.ts b/src/hooks/useCopySelectionHelper.ts index b41bfb3c4aee..be7830dc6170 100644 --- a/src/hooks/useCopySelectionHelper.ts +++ b/src/hooks/useCopySelectionHelper.ts @@ -1,9 +1,9 @@ -import {useEffect} from 'react'; import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import CONST from '../CONST'; -import KeyboardShortcut from '../libs/KeyboardShortcut'; -import Clipboard from '../libs/Clipboard'; -import SelectionScraper from '../libs/SelectionScraper'; +import {useEffect} from 'react'; +import Clipboard from '@libs/Clipboard'; +import KeyboardShortcut from '@libs/KeyboardShortcut'; +import SelectionScraper from '@libs/SelectionScraper'; +import CONST from '@src/CONST'; function copySelectionToClipboard() { const selection = SelectionScraper.getCurrentSelection(); diff --git a/src/hooks/useCurrentReportID.js b/src/hooks/useCurrentReportID.js index b22ac55616e8..1b3e4b706c4c 100644 --- a/src/hooks/useCurrentReportID.js +++ b/src/hooks/useCurrentReportID.js @@ -1,5 +1,5 @@ import {useContext} from 'react'; -import {CurrentReportIDContext} from '../components/withCurrentReportID'; +import {CurrentReportIDContext} from '@components/withCurrentReportID'; export default function useCurrentReportID() { return useContext(CurrentReportIDContext); diff --git a/src/hooks/useDebounce.js b/src/hooks/useDebounce.js index 8995a0443b85..874f9d72b276 100644 --- a/src/hooks/useDebounce.js +++ b/src/hooks/useDebounce.js @@ -1,5 +1,5 @@ -import {useEffect, useRef} from 'react'; import lodashDebounce from 'lodash/debounce'; +import {useEffect, useRef} from 'react'; /** * Create and return a debounced function. diff --git a/src/hooks/useDelayedInputFocus.js b/src/hooks/useDelayedInputFocus.js index 2fd94327a588..7a4a64104e48 100644 --- a/src/hooks/useDelayedInputFocus.js +++ b/src/hooks/useDelayedInputFocus.js @@ -1,6 +1,6 @@ -import {useCallback, useRef} from 'react'; import {useFocusEffect} from '@react-navigation/native'; -import CONST from '../CONST'; +import {useCallback, useRef} from 'react'; +import CONST from '@src/CONST'; /** * Focus a text input when a screen is navigated to, after the specified time delay has elapsed. diff --git a/src/hooks/useDragAndDrop.ts b/src/hooks/useDragAndDrop.ts index 27230dd94679..3f0142492d0d 100644 --- a/src/hooks/useDragAndDrop.ts +++ b/src/hooks/useDragAndDrop.ts @@ -1,5 +1,5 @@ -import React, {useEffect, useRef, useState, useCallback} from 'react'; import {useIsFocused} from '@react-navigation/native'; +import React, {useCallback, useEffect, useRef, useState} from 'react'; const COPY_DROP_EFFECT = 'copy'; const NONE_DROP_EFFECT = 'none'; diff --git a/src/hooks/useEnvironment.ts b/src/hooks/useEnvironment.ts index 0b1601ee972a..60e0b4a12394 100644 --- a/src/hooks/useEnvironment.ts +++ b/src/hooks/useEnvironment.ts @@ -1,7 +1,7 @@ import {useContext} from 'react'; -import CONST from '../CONST'; -import {EnvironmentContext} from '../components/withEnvironment'; -import type {EnvironmentContextValue} from '../components/withEnvironment'; +import {EnvironmentContext} from '@components/withEnvironment'; +import type {EnvironmentContextValue} from '@components/withEnvironment'; +import CONST from '@src/CONST'; type UseEnvironment = Partial & { isProduction: boolean; diff --git a/src/hooks/useKeyboardShortcut.js b/src/hooks/useKeyboardShortcut.js index b8e297c966ed..470d29243fe8 100644 --- a/src/hooks/useKeyboardShortcut.js +++ b/src/hooks/useKeyboardShortcut.js @@ -1,6 +1,6 @@ import {useEffect} from 'react'; -import KeyboardShortcut from '../libs/KeyboardShortcut'; -import CONST from '../CONST'; +import KeyboardShortcut from '@libs/KeyboardShortcut'; +import CONST from '@src/CONST'; /** * Register a keyboard shortcut handler. diff --git a/src/hooks/useKeyboardState.js b/src/hooks/useKeyboardState.js index 8b57fb60f2b6..68e9dbfc2b13 100644 --- a/src/hooks/useKeyboardState.js +++ b/src/hooks/useKeyboardState.js @@ -1,5 +1,5 @@ import {useContext} from 'react'; -import {KeyboardStateContext} from '../components/withKeyboardState'; +import {KeyboardStateContext} from '@components/withKeyboardState'; /** * Hook for getting current state of keyboard diff --git a/src/hooks/useLocalize.js b/src/hooks/useLocalize.js index 7f7a610fca8b..71968cdb6e61 100644 --- a/src/hooks/useLocalize.js +++ b/src/hooks/useLocalize.js @@ -1,5 +1,5 @@ import {useContext} from 'react'; -import {LocaleContext} from '../components/LocaleContextProvider'; +import {LocaleContext} from '@components/LocaleContextProvider'; export default function useLocalize() { return useContext(LocaleContext); diff --git a/src/hooks/useNetwork.ts b/src/hooks/useNetwork.ts index 4405dd7126a5..f9e1a627c5f5 100644 --- a/src/hooks/useNetwork.ts +++ b/src/hooks/useNetwork.ts @@ -1,5 +1,5 @@ -import {useRef, useContext, useEffect} from 'react'; -import {NetworkContext} from '../components/OnyxProvider'; +import {useContext, useEffect, useRef} from 'react'; +import {NetworkContext} from '@components/OnyxProvider'; type UseNetworkProps = { onReconnect?: () => void; diff --git a/src/hooks/usePermissions.ts b/src/hooks/usePermissions.ts index 09e87554b5c3..e60825b610e9 100644 --- a/src/hooks/usePermissions.ts +++ b/src/hooks/usePermissions.ts @@ -1,6 +1,6 @@ import {useContext, useMemo} from 'react'; -import Permissions from '../libs/Permissions'; -import {BetasContext} from '../components/OnyxProvider'; +import {BetasContext} from '@components/OnyxProvider'; +import Permissions from '@libs/Permissions'; type PermissionKey = keyof typeof Permissions; type UsePermissions = Partial>; diff --git a/src/hooks/usePrivatePersonalDetails.js b/src/hooks/usePrivatePersonalDetails.js index 14c1e42e629a..04d90f1ce5de 100644 --- a/src/hooks/usePrivatePersonalDetails.js +++ b/src/hooks/usePrivatePersonalDetails.js @@ -1,7 +1,7 @@ -import {useEffect, useContext} from 'react'; +import {useContext, useEffect} from 'react'; import _ from 'underscore'; -import * as PersonalDetails from '../libs/actions/PersonalDetails'; -import {NetworkContext} from '../components/OnyxProvider'; +import {NetworkContext} from '@components/OnyxProvider'; +import * as PersonalDetails from '@userActions/PersonalDetails'; /** * Hook for fetching private personal details diff --git a/src/hooks/useReportScrollManager/index.native.ts b/src/hooks/useReportScrollManager/index.native.ts index ed9b7968636c..0d4c956b7bd8 100644 --- a/src/hooks/useReportScrollManager/index.native.ts +++ b/src/hooks/useReportScrollManager/index.native.ts @@ -1,5 +1,5 @@ -import {useContext, useCallback} from 'react'; -import {ActionListContext} from '../../pages/home/ReportScreenContext'; +import {useCallback, useContext} from 'react'; +import {ActionListContext} from '@pages/home/ReportScreenContext'; import ReportScrollManagerData from './types'; function useReportScrollManager(): ReportScrollManagerData { diff --git a/src/hooks/useReportScrollManager/index.ts b/src/hooks/useReportScrollManager/index.ts index fd2c884e5b4c..081844fc8c79 100644 --- a/src/hooks/useReportScrollManager/index.ts +++ b/src/hooks/useReportScrollManager/index.ts @@ -1,5 +1,5 @@ -import {useContext, useCallback} from 'react'; -import {ActionListContext} from '../../pages/home/ReportScreenContext'; +import {useCallback, useContext} from 'react'; +import {ActionListContext} from '@pages/home/ReportScreenContext'; import ReportScrollManagerData from './types'; function useReportScrollManager(): ReportScrollManagerData { diff --git a/src/hooks/useReportScrollManager/types.ts b/src/hooks/useReportScrollManager/types.ts index f5ff9b2f35cd..a10238d51f74 100644 --- a/src/hooks/useReportScrollManager/types.ts +++ b/src/hooks/useReportScrollManager/types.ts @@ -1,4 +1,4 @@ -import {ActionListContextType} from '../../pages/home/ReportScreenContext'; +import {ActionListContextType} from '@pages/home/ReportScreenContext'; type ReportScrollManagerData = { ref: ActionListContextType; diff --git a/src/hooks/useSingleExecution.js b/src/hooks/useSingleExecution.js index 0b466252ed58..a2b4ccb4cd53 100644 --- a/src/hooks/useSingleExecution.js +++ b/src/hooks/useSingleExecution.js @@ -1,5 +1,5 @@ +import {useCallback, useRef, useState} from 'react'; import {InteractionManager} from 'react-native'; -import {useCallback, useState, useRef} from 'react'; /** * With any action passed in, it will only allow 1 such action to occur at a time. diff --git a/src/hooks/useWaitForNavigation.js b/src/hooks/useWaitForNavigation.js index 00f4405dff12..81c26d7beb46 100644 --- a/src/hooks/useWaitForNavigation.js +++ b/src/hooks/useWaitForNavigation.js @@ -1,5 +1,5 @@ -import {useEffect, useRef} from 'react'; import {useNavigation} from '@react-navigation/native'; +import {useEffect, useRef} from 'react'; /** * Returns a promise that resolves when navigation finishes. diff --git a/src/hooks/useWindowDimensions/index.native.ts b/src/hooks/useWindowDimensions/index.native.ts index 5b0ec2002201..e0268445fe4e 100644 --- a/src/hooks/useWindowDimensions/index.native.ts +++ b/src/hooks/useWindowDimensions/index.native.ts @@ -1,6 +1,6 @@ // eslint-disable-next-line no-restricted-imports import {useWindowDimensions} from 'react-native'; -import variables from '../../styles/variables'; +import variables from '@styles/variables'; import WindowDimensions from './types'; /** diff --git a/src/hooks/useWindowDimensions/index.ts b/src/hooks/useWindowDimensions/index.ts index f9fee6301d06..ab856bcf8e1b 100644 --- a/src/hooks/useWindowDimensions/index.ts +++ b/src/hooks/useWindowDimensions/index.ts @@ -1,6 +1,6 @@ // eslint-disable-next-line no-restricted-imports import {Dimensions, useWindowDimensions} from 'react-native'; -import variables from '../../styles/variables'; +import variables from '@styles/variables'; import WindowDimensions from './types'; /** diff --git a/src/languages/en.ts b/src/languages/en.ts index 1251e44cfac5..7cdce062faac 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1,84 +1,84 @@ import {CONST as COMMON_CONST} from 'expensify-common/lib/CONST'; -import CONST from '../CONST'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import CONST from '@src/CONST'; import type { AddressLineParams, - CharacterLimitParams, - MaxParticipantsReachedParams, - ZipCodeExampleFormatParams, - LoggedInAsParams, - NewFaceEnterMagicCodeParams, - WelcomeEnterMagicCodeParams, AlreadySignedInParams, - GoBackMessageParams, - LocalTimeParams, - EditActionParams, - DeleteActionParams, - DeleteConfirmationParams, - BeginningOfChatHistoryDomainRoomPartOneParams, + AmountEachParams, BeginningOfChatHistoryAdminRoomPartOneParams, BeginningOfChatHistoryAnnounceRoomPartOneParams, BeginningOfChatHistoryAnnounceRoomPartTwo, - WelcomeToRoomParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ReportArchiveReasonsPolicyDeletedParams, - RequestCountParams, - SettleExpensifyCardParams, - RequestAmountParams, - SplitAmountParams, + BeginningOfChatHistoryDomainRoomPartOneParams, + CharacterLimitParams, + ConfirmThatParams, + DateShouldBeAfterParams, + DateShouldBeBeforeParams, + DeleteActionParams, + DeleteConfirmationParams, DidSplitAmountMessageParams, - AmountEachParams, + EditActionParams, + EnterMagicCodeParams, + FormattedMaxLengthParams, + GoBackMessageParams, + GoToRoomParams, + IncorrectZipFormatParams, + InstantSummaryParams, + LocalTimeParams, + LoggedInAsParams, + ManagerApprovedParams, + MaxParticipantsReachedParams, + NewFaceEnterMagicCodeParams, + NoLongerHaveAccessParams, + NotAllowedExtensionParams, + NotYouParams, + OOOEventSummaryFullDayParams, + OOOEventSummaryPartialDayParams, + OurEmailProviderParams, + PaidElsewhereWithAmountParams, + PaidWithExpensifyWithAmountParams, + ParentNavigationSummaryParams, PayerOwesAmountParams, PayerOwesParams, PayerPaidAmountParams, PayerPaidParams, PayerSettledParams, - WaitingOnBankAccountParams, - SettledAfterAddedBankAccountParams, - PaidElsewhereWithAmountParams, - PaidWithExpensifyWithAmountParams, - ThreadRequestReportNameParams, - ThreadSentMoneyReportNameParams, - SizeExceededParams, + RemovedTheRequestParams, + RenamedRoomActionParams, + ReportArchiveReasonsClosedParams, + ReportArchiveReasonsMergedParams, + ReportArchiveReasonsPolicyDeletedParams, + ReportArchiveReasonsRemovedFromPolicyParams, + RequestAmountParams, + RequestCountParams, + RequestedAmountMessageParams, ResolutionConstraintsParams, - NotAllowedExtensionParams, - EnterMagicCodeParams, - TransferParams, - InstantSummaryParams, - NotYouParams, - DateShouldBeBeforeParams, - DateShouldBeAfterParams, - IncorrectZipFormatParams, - WeSentYouMagicSignInLinkParams, - ToValidateLoginParams, - NoLongerHaveAccessParams, - OurEmailProviderParams, - ConfirmThatParams, - UntilTimeParams, - StepCounterParams, - UserIsAlreadyMemberParams, - GoToRoomParams, - WelcomeNoteParams, RoomNameReservedErrorParams, - RenamedRoomActionParams, RoomRenamedToParams, - OOOEventSummaryFullDayParams, - OOOEventSummaryPartialDayParams, - ParentNavigationSummaryParams, - ManagerApprovedParams, - SetTheRequestParams, - UpdatedTheRequestParams, SetTheDistanceParams, - UpdatedTheDistanceParams, - RemovedTheRequestParams, - FormattedMaxLengthParams, - RequestedAmountMessageParams, + SetTheRequestParams, + SettledAfterAddedBankAccountParams, + SettleExpensifyCardParams, + SizeExceededParams, + SplitAmountParams, + StepCounterParams, TagSelectionParams, + ThreadRequestReportNameParams, + ThreadSentMoneyReportNameParams, + ToValidateLoginParams, + TransferParams, TranslationBase, + UntilTimeParams, + UpdatedTheDistanceParams, + UpdatedTheRequestParams, + UserIsAlreadyMemberParams, + WaitingOnBankAccountParams, WalletProgramParams, + WelcomeEnterMagicCodeParams, + WelcomeNoteParams, + WelcomeToRoomParams, + WeSentYouMagicSignInLinkParams, + ZipCodeExampleFormatParams, } from './types'; -import * as ReportActionsUtils from '../libs/ReportActionsUtils'; type StateValue = { stateISO: string; diff --git a/src/languages/es.ts b/src/languages/es.ts index 537d135f41de..578e027e1d14 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -1,82 +1,82 @@ -import CONST from '../CONST'; -import * as ReportActionsUtils from '../libs/ReportActionsUtils'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import CONST from '@src/CONST'; import type { AddressLineParams, - CharacterLimitParams, - MaxParticipantsReachedParams, - ZipCodeExampleFormatParams, - LoggedInAsParams, - NewFaceEnterMagicCodeParams, - WelcomeEnterMagicCodeParams, AlreadySignedInParams, - GoBackMessageParams, - LocalTimeParams, - EditActionParams, - DeleteActionParams, - DeleteConfirmationParams, - BeginningOfChatHistoryDomainRoomPartOneParams, + AmountEachParams, BeginningOfChatHistoryAdminRoomPartOneParams, BeginningOfChatHistoryAnnounceRoomPartOneParams, BeginningOfChatHistoryAnnounceRoomPartTwo, - WelcomeToRoomParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - ReportArchiveReasonsPolicyDeletedParams, - RequestCountParams, - SettleExpensifyCardParams, - RequestAmountParams, - SplitAmountParams, + BeginningOfChatHistoryDomainRoomPartOneParams, + CharacterLimitParams, + ConfirmThatParams, + DateShouldBeAfterParams, + DateShouldBeBeforeParams, + DeleteActionParams, + DeleteConfirmationParams, DidSplitAmountMessageParams, - AmountEachParams, + EditActionParams, + EnglishTranslation, + EnterMagicCodeParams, + FormattedMaxLengthParams, + GoBackMessageParams, + GoToRoomParams, + IncorrectZipFormatParams, + InstantSummaryParams, + LocalTimeParams, + LoggedInAsParams, + ManagerApprovedParams, + MaxParticipantsReachedParams, + NewFaceEnterMagicCodeParams, + NoLongerHaveAccessParams, + NotAllowedExtensionParams, + NotYouParams, + OOOEventSummaryFullDayParams, + OOOEventSummaryPartialDayParams, + OurEmailProviderParams, + PaidElsewhereWithAmountParams, + PaidWithExpensifyWithAmountParams, + ParentNavigationSummaryParams, PayerOwesAmountParams, PayerOwesParams, PayerPaidAmountParams, PayerPaidParams, PayerSettledParams, - WaitingOnBankAccountParams, + RemovedTheRequestParams, + RenamedRoomActionParams, + ReportArchiveReasonsClosedParams, + ReportArchiveReasonsMergedParams, + ReportArchiveReasonsPolicyDeletedParams, + ReportArchiveReasonsRemovedFromPolicyParams, + RequestAmountParams, + RequestCountParams, + RequestedAmountMessageParams, + ResolutionConstraintsParams, + RoomNameReservedErrorParams, + RoomRenamedToParams, + SetTheDistanceParams, + SetTheRequestParams, SettledAfterAddedBankAccountParams, - PaidElsewhereWithAmountParams, - PaidWithExpensifyWithAmountParams, + SettleExpensifyCardParams, + SizeExceededParams, + SplitAmountParams, + StepCounterParams, + TagSelectionParams, ThreadRequestReportNameParams, ThreadSentMoneyReportNameParams, - SizeExceededParams, - ResolutionConstraintsParams, - NotAllowedExtensionParams, - EnterMagicCodeParams, - TransferParams, - InstantSummaryParams, - NotYouParams, - DateShouldBeBeforeParams, - DateShouldBeAfterParams, - IncorrectZipFormatParams, - WeSentYouMagicSignInLinkParams, ToValidateLoginParams, - NoLongerHaveAccessParams, - OurEmailProviderParams, - ConfirmThatParams, + TransferParams, UntilTimeParams, - StepCounterParams, - UserIsAlreadyMemberParams, - GoToRoomParams, - WelcomeNoteParams, - RoomNameReservedErrorParams, - RenamedRoomActionParams, - RoomRenamedToParams, - OOOEventSummaryFullDayParams, - OOOEventSummaryPartialDayParams, - ParentNavigationSummaryParams, - ManagerApprovedParams, - SetTheRequestParams, - SetTheDistanceParams, - UpdatedTheRequestParams, UpdatedTheDistanceParams, - RemovedTheRequestParams, - FormattedMaxLengthParams, - RequestedAmountMessageParams, - TagSelectionParams, - EnglishTranslation, + UpdatedTheRequestParams, + UserIsAlreadyMemberParams, + WaitingOnBankAccountParams, WalletProgramParams, + WelcomeEnterMagicCodeParams, + WelcomeNoteParams, + WelcomeToRoomParams, + WeSentYouMagicSignInLinkParams, + ZipCodeExampleFormatParams, } from './types'; /* eslint-disable max-len */ diff --git a/src/languages/types.ts b/src/languages/types.ts index 5a1847e31e71..d2a387a329d0 100644 --- a/src/languages/types.ts +++ b/src/languages/types.ts @@ -1,4 +1,4 @@ -import {ReportAction} from '../types/onyx'; +import {ReportAction} from '@src/types/onyx'; import en from './en'; type AddressLineParams = { diff --git a/src/libs/API.ts b/src/libs/API.ts index ce3d6bab19bc..91cf6a7db877 100644 --- a/src/libs/API.ts +++ b/src/libs/API.ts @@ -1,14 +1,14 @@ import Onyx, {OnyxUpdate} from 'react-native-onyx'; import {ValueOf} from 'type-fest'; +import CONST from '@src/CONST'; +import OnyxRequest from '@src/types/onyx/Request'; +import Response from '@src/types/onyx/Response'; +import pkg from '../../package.json'; import Log from './Log'; -import * as Request from './Request'; import * as Middleware from './Middleware'; import * as SequentialQueue from './Network/SequentialQueue'; -import pkg from '../../package.json'; -import CONST from '../CONST'; import * as Pusher from './Pusher/pusher'; -import OnyxRequest from '../types/onyx/Request'; -import Response from '../types/onyx/Response'; +import * as Request from './Request'; // Setup API middlewares. Each request made will pass through a series of middleware functions that will get called in sequence (each one passing the result of the previous to the next). // Note: The ordering here is intentional as we want to Log, Recheck Connection, Reauthenticate, and Save the Response in Onyx. Errors thrown in one middleware will bubble to the next. diff --git a/src/libs/Accessibility/index.ts b/src/libs/Accessibility/index.ts index 213d28139c2c..5eceda8edcb1 100644 --- a/src/libs/Accessibility/index.ts +++ b/src/libs/Accessibility/index.ts @@ -1,4 +1,4 @@ -import {useEffect, useState, useCallback} from 'react'; +import {useCallback, useEffect, useState} from 'react'; import {AccessibilityInfo, LayoutChangeEvent} from 'react-native'; import moveAccessibilityFocus from './moveAccessibilityFocus'; diff --git a/src/libs/ActiveClientManager/index.native.ts b/src/libs/ActiveClientManager/index.native.ts index 1d455a84a28a..866992bcc841 100644 --- a/src/libs/ActiveClientManager/index.native.ts +++ b/src/libs/ActiveClientManager/index.native.ts @@ -2,8 +2,7 @@ * For native devices, there will never be more than one * client running at a time, so this lib is a big no-op */ - -import {Init, IsReady, IsClientTheLeader} from './types'; +import {Init, IsClientTheLeader, IsReady} from './types'; const init: Init = () => {}; diff --git a/src/libs/ActiveClientManager/index.ts b/src/libs/ActiveClientManager/index.ts index f99f54e84aa5..0baeb2becfce 100644 --- a/src/libs/ActiveClientManager/index.ts +++ b/src/libs/ActiveClientManager/index.ts @@ -3,12 +3,11 @@ * only one tab is processing those saved requests or we would be duplicating data (or creating errors). * This file ensures exactly that by tracking all the clientIDs connected, storing the most recent one last and it considers that last clientID the "leader". */ - -import Onyx from 'react-native-onyx'; import Str from 'expensify-common/lib/str'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as ActiveClients from '../actions/ActiveClients'; -import {Init, IsReady, IsClientTheLeader} from './types'; +import Onyx from 'react-native-onyx'; +import * as ActiveClients from '@userActions/ActiveClients'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {Init, IsClientTheLeader, IsReady} from './types'; const clientID = Str.guid(); const maxClients = 20; diff --git a/src/libs/ApiUtils.ts b/src/libs/ApiUtils.ts index 87a251ccb086..a15c900b9387 100644 --- a/src/libs/ApiUtils.ts +++ b/src/libs/ApiUtils.ts @@ -1,10 +1,10 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../ONYXKEYS'; -import CONFIG from '../CONFIG'; -import CONST from '../CONST'; -import * as Environment from './Environment/Environment'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {Request} from '@src/types/onyx'; import proxyConfig from '../../config/proxyConfig'; -import {Request} from '../types/onyx'; +import * as Environment from './Environment/Environment'; // To avoid rebuilding native apps, native apps use production config for both staging and prod // We use the async environment check because it works on all platforms diff --git a/src/libs/AppStateMonitor/index.ts b/src/libs/AppStateMonitor/index.ts index 5c206579944d..f95fad042b98 100644 --- a/src/libs/AppStateMonitor/index.ts +++ b/src/libs/AppStateMonitor/index.ts @@ -1,5 +1,5 @@ import {AppState, AppStateStatus} from 'react-native'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import shouldReportActivity from './shouldReportActivity'; let appState: AppStateStatus = CONST.APP_STATE.ACTIVE; diff --git a/src/libs/Authentication.ts b/src/libs/Authentication.ts index cec20504dd04..9962fa55b0af 100644 --- a/src/libs/Authentication.ts +++ b/src/libs/Authentication.ts @@ -1,13 +1,13 @@ -import requireParameters from './requireParameters'; -import * as Network from './Network'; -import * as NetworkStore from './Network/NetworkStore'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import Response from '@src/types/onyx/Response'; import updateSessionAuthTokens from './actions/Session/updateSessionAuthTokens'; -import CONFIG from '../CONFIG'; import redirectToSignIn from './actions/SignInRedirect'; -import CONST from '../CONST'; -import Log from './Log'; import * as ErrorUtils from './ErrorUtils'; -import Response from '../types/onyx/Response'; +import Log from './Log'; +import * as Network from './Network'; +import * as NetworkStore from './Network/NetworkStore'; +import requireParameters from './requireParameters'; type Parameters = { useExpensifyLogin?: boolean; diff --git a/src/libs/BootSplash/index.native.ts b/src/libs/BootSplash/index.native.ts index 307d0d62c8dd..9d472aec4a96 100644 --- a/src/libs/BootSplash/index.native.ts +++ b/src/libs/BootSplash/index.native.ts @@ -1,5 +1,5 @@ import {NativeModules} from 'react-native'; -import Log from '../Log'; +import Log from '@libs/Log'; const BootSplash = NativeModules.BootSplash; diff --git a/src/libs/BootSplash/index.ts b/src/libs/BootSplash/index.ts index e58763039129..605e65a21a7b 100644 --- a/src/libs/BootSplash/index.ts +++ b/src/libs/BootSplash/index.ts @@ -1,4 +1,4 @@ -import Log from '../Log'; +import Log from '@libs/Log'; import {VisibilityStatus} from './types'; function resolveAfter(delay: number): Promise { diff --git a/src/libs/Browser/index.web.ts b/src/libs/Browser/index.web.ts index 064358c6bed5..2ce4c5ad2040 100644 --- a/src/libs/Browser/index.web.ts +++ b/src/libs/Browser/index.web.ts @@ -1,6 +1,6 @@ -import CONST from '../../CONST'; -import CONFIG from '../../CONFIG'; -import ROUTES from '../../ROUTES'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; /** * Fetch browser name from UA string diff --git a/src/libs/CardUtils.ts b/src/libs/CardUtils.ts index 52c4f7067acf..0dc483aff50e 100644 --- a/src/libs/CardUtils.ts +++ b/src/libs/CardUtils.ts @@ -1,10 +1,10 @@ import lodash from 'lodash'; import Onyx from 'react-native-onyx'; -import CONST from '../CONST'; +import CONST from '@src/CONST'; +import ONYXKEYS, {OnyxValues} from '@src/ONYXKEYS'; +import * as OnyxTypes from '@src/types/onyx'; +import {Card} from '@src/types/onyx'; import * as Localize from './Localize'; -import * as OnyxTypes from '../types/onyx'; -import ONYXKEYS, {OnyxValues} from '../ONYXKEYS'; -import {Card} from '../types/onyx'; let allCards: OnyxValues[typeof ONYXKEYS.CARD_LIST] = {}; Onyx.connect({ diff --git a/src/libs/Clipboard/index.js b/src/libs/Clipboard/index.js index 6fbaa8eccd31..ff05fcb45d0a 100644 --- a/src/libs/Clipboard/index.js +++ b/src/libs/Clipboard/index.js @@ -1,7 +1,7 @@ import Clipboard from '@react-native-clipboard/clipboard'; import lodashGet from 'lodash/get'; -import CONST from '../../CONST'; -import * as Browser from '../Browser'; +import * as Browser from '@libs/Browser'; +import CONST from '@src/CONST'; const canSetHtml = () => lodashGet(navigator, 'clipboard.write'); diff --git a/src/libs/CollectionUtils.ts b/src/libs/CollectionUtils.ts index ac47633c2e08..3a980906d614 100644 --- a/src/libs/CollectionUtils.ts +++ b/src/libs/CollectionUtils.ts @@ -1,4 +1,4 @@ -import {OnyxCollectionKey} from '../ONYXKEYS'; +import {OnyxCollectionKey} from '@src/ONYXKEYS'; /** * Return the highest item in a numbered collection diff --git a/src/libs/ComposerUtils/getDraftComment.ts b/src/libs/ComposerUtils/getDraftComment.ts index ac3d2f3d09be..97567a42b263 100644 --- a/src/libs/ComposerUtils/getDraftComment.ts +++ b/src/libs/ComposerUtils/getDraftComment.ts @@ -1,5 +1,5 @@ import Onyx, {OnyxEntry} from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; const draftCommentMap: Record> = {}; Onyx.connect({ diff --git a/src/libs/ComposerUtils/index.ts b/src/libs/ComposerUtils/index.ts index 5e2a42fc65dd..5a7da7ca08cf 100644 --- a/src/libs/ComposerUtils/index.ts +++ b/src/libs/ComposerUtils/index.ts @@ -1,6 +1,6 @@ +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import getNumberOfLines from './getNumberOfLines'; import updateNumberOfLines from './updateNumberOfLines'; -import * as DeviceCapabilities from '../DeviceCapabilities'; type Selection = { start: number; diff --git a/src/libs/ComposerUtils/updateIsFullComposerAvailable.ts b/src/libs/ComposerUtils/updateIsFullComposerAvailable.ts index 5d73619482db..761abb8c9c8f 100644 --- a/src/libs/ComposerUtils/updateIsFullComposerAvailable.ts +++ b/src/libs/ComposerUtils/updateIsFullComposerAvailable.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import ComposerProps from './types'; /** diff --git a/src/libs/ComposerUtils/updateNumberOfLines/index.native.ts b/src/libs/ComposerUtils/updateNumberOfLines/index.native.ts index b5c28cfc79e8..df9292ecd690 100644 --- a/src/libs/ComposerUtils/updateNumberOfLines/index.native.ts +++ b/src/libs/ComposerUtils/updateNumberOfLines/index.native.ts @@ -1,6 +1,6 @@ -import styles from '../../../styles/styles'; -import updateIsFullComposerAvailable from '../updateIsFullComposerAvailable'; -import getNumberOfLines from '../getNumberOfLines'; +import getNumberOfLines from '@libs/ComposerUtils/getNumberOfLines'; +import updateIsFullComposerAvailable from '@libs/ComposerUtils/updateIsFullComposerAvailable'; +import styles from '@styles/styles'; import UpdateNumberOfLines from './types'; /** diff --git a/src/libs/ComposerUtils/updateNumberOfLines/types.ts b/src/libs/ComposerUtils/updateNumberOfLines/types.ts index c0650be25433..b0f9ba48ddc2 100644 --- a/src/libs/ComposerUtils/updateNumberOfLines/types.ts +++ b/src/libs/ComposerUtils/updateNumberOfLines/types.ts @@ -1,5 +1,5 @@ import {NativeSyntheticEvent, TextInputContentSizeChangeEventData} from 'react-native'; -import ComposerProps from '../types'; +import ComposerProps from '@libs/ComposerUtils/types'; type UpdateNumberOfLines = (props: ComposerProps, event: NativeSyntheticEvent) => void; diff --git a/src/libs/ControlSelection/index.ts b/src/libs/ControlSelection/index.ts index 9625b4e49787..44d4530bc4fd 100644 --- a/src/libs/ControlSelection/index.ts +++ b/src/libs/ControlSelection/index.ts @@ -1,5 +1,5 @@ +import CustomRefObject from '@src/types/utils/CustomRefObject'; import ControlSelectionModule from './types'; -import CustomRefObject from '../../types/utils/CustomRefObject'; /** * Block selection on the whole app diff --git a/src/libs/ControlSelection/types.ts b/src/libs/ControlSelection/types.ts index 5706a4981d30..d84347fd7ba6 100644 --- a/src/libs/ControlSelection/types.ts +++ b/src/libs/ControlSelection/types.ts @@ -1,4 +1,4 @@ -import CustomRefObject from '../../types/utils/CustomRefObject'; +import CustomRefObject from '@src/types/utils/CustomRefObject'; type ControlSelectionModule = { block: () => void; diff --git a/src/libs/CurrencyUtils.ts b/src/libs/CurrencyUtils.ts index 85ba8340c13e..4829ce115592 100644 --- a/src/libs/CurrencyUtils.ts +++ b/src/libs/CurrencyUtils.ts @@ -1,8 +1,8 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS, {OnyxValues} from '../ONYXKEYS'; -import CONST from '../CONST'; -import BaseLocaleListener from './Localize/LocaleListener/BaseLocaleListener'; +import CONST from '@src/CONST'; +import ONYXKEYS, {OnyxValues} from '@src/ONYXKEYS'; import * as Localize from './Localize'; +import BaseLocaleListener from './Localize/LocaleListener/BaseLocaleListener'; import * as NumberFormatUtils from './NumberFormatUtils'; let currencyList: OnyxValues[typeof ONYXKEYS.CURRENCY_LIST] = {}; diff --git a/src/libs/DateUtils.ts b/src/libs/DateUtils.ts index a6f2860310c2..e03e3dd55680 100644 --- a/src/libs/DateUtils.ts +++ b/src/libs/DateUtils.ts @@ -1,29 +1,28 @@ -import {zonedTimeToUtc, utcToZonedTime, formatInTimeZone} from 'date-fns-tz'; -import {es, enGB} from 'date-fns/locale'; import { - formatDistanceToNow, - subMinutes, addDays, - subDays, - isBefore, - subMilliseconds, - startOfWeek, + endOfDay, endOfWeek, format, - setDefaultOptions, - endOfDay, - isSameDay, + formatDistanceToNow, isAfter, + isBefore, + isSameDay, isSameYear, + setDefaultOptions, + startOfWeek, + subDays, + subMilliseconds, + subMinutes, } from 'date-fns'; - -import Onyx from 'react-native-onyx'; +import {formatInTimeZone, utcToZonedTime, zonedTimeToUtc} from 'date-fns-tz'; +import {enGB, es} from 'date-fns/locale'; import throttle from 'lodash/throttle'; -import ONYXKEYS from '../ONYXKEYS'; -import CONST from '../CONST'; -import * as Localize from './Localize'; +import Onyx from 'react-native-onyx'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {Timezone} from '@src/types/onyx/PersonalDetails'; import * as CurrentDate from './actions/CurrentDate'; -import {Timezone} from '../types/onyx/PersonalDetails'; +import * as Localize from './Localize'; let currentUserAccountID: number | undefined; Onyx.connect({ diff --git a/src/libs/DistanceRequestUtils.js b/src/libs/DistanceRequestUtils.js index 32de571c218c..0cc4e39d83af 100644 --- a/src/libs/DistanceRequestUtils.js +++ b/src/libs/DistanceRequestUtils.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import CONST from '../CONST'; +import CONST from '@src/CONST'; import * as CurrencyUtils from './CurrencyUtils'; import * as PolicyUtils from './PolicyUtils'; diff --git a/src/libs/E2E/API.mock.js b/src/libs/E2E/API.mock.js index 47f445f72222..2c7da3f420a3 100644 --- a/src/libs/E2E/API.mock.js +++ b/src/libs/E2E/API.mock.js @@ -1,14 +1,13 @@ /* eslint-disable rulesdir/no-api-in-views */ -import _ from 'underscore'; import Onyx from 'react-native-onyx'; -import Log from '../Log'; - +import _ from 'underscore'; +import Log from '@libs/Log'; +import mockAuthenticatePusher from './apiMocks/authenticatePusher'; // mock functions import mockBeginSignin from './apiMocks/beginSignin'; -import mockSigninUser from './apiMocks/signinUser'; -import mockAuthenticatePusher from './apiMocks/authenticatePusher'; import mockOpenApp from './apiMocks/openApp'; import mockOpenReport from './apiMocks/openReport'; +import mockSigninUser from './apiMocks/signinUser'; /** * A dictionary which has the name of a API command as key, and a function which diff --git a/src/libs/E2E/actions/e2eLogin.js b/src/libs/E2E/actions/e2eLogin.js index 77576b09d88d..e2202f7e5662 100644 --- a/src/libs/E2E/actions/e2eLogin.js +++ b/src/libs/E2E/actions/e2eLogin.js @@ -1,7 +1,7 @@ /* eslint-disable rulesdir/prefer-onyx-connect-in-libs */ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import * as Session from '../../actions/Session'; +import * as Session from '@userActions/Session'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * Command for e2e test to automatically sign in a user. diff --git a/src/libs/E2E/client.js b/src/libs/E2E/client.js index c948c7c2c6d2..7e6932d9fce5 100644 --- a/src/libs/E2E/client.js +++ b/src/libs/E2E/client.js @@ -1,5 +1,5 @@ -import Routes from '../../../tests/e2e/server/routes'; import Config from '../../../tests/e2e/config'; +import Routes from '../../../tests/e2e/server/routes'; const SERVER_ADDRESS = `http://localhost:${Config.SERVER_PORT}`; diff --git a/src/libs/E2E/isE2ETestSession.native.js b/src/libs/E2E/isE2ETestSession.native.js index 214e8241c5dc..3c4c19e8ba24 100644 --- a/src/libs/E2E/isE2ETestSession.native.js +++ b/src/libs/E2E/isE2ETestSession.native.js @@ -1,3 +1,3 @@ -import CONFIG from '../../CONFIG'; +import CONFIG from '@src/CONFIG'; export default () => CONFIG.E2E_TESTING; diff --git a/src/libs/E2E/reactNativeLaunchingTest.js b/src/libs/E2E/reactNativeLaunchingTest.js index 13183c1044db..1e0d6a8afa3b 100644 --- a/src/libs/E2E/reactNativeLaunchingTest.js +++ b/src/libs/E2E/reactNativeLaunchingTest.js @@ -1,13 +1,13 @@ /* eslint-disable import/newline-after-import,import/first */ + /** * We are using a separate entry point for the E2E tests. * By doing this, we avoid bundling any E2E testing code * into the actual release app. */ - -import Performance from '../Performance'; -import * as Metrics from '../Metrics'; - +import * as Metrics from '@libs/Metrics'; +import Performance from '@libs/Performance'; +import '../../../index'; import E2EConfig from '../../../tests/e2e/config'; import E2EClient from './client'; @@ -65,5 +65,5 @@ E2EClient.getTestConfig() // start the usual app Performance.markStart('regularAppStart'); -import '../../../index'; + Performance.markEnd('regularAppStart'); diff --git a/src/libs/E2E/tests/appStartTimeTest.e2e.js b/src/libs/E2E/tests/appStartTimeTest.e2e.js index d44fd6ce1195..311b891fcd4c 100644 --- a/src/libs/E2E/tests/appStartTimeTest.e2e.js +++ b/src/libs/E2E/tests/appStartTimeTest.e2e.js @@ -1,7 +1,7 @@ import _ from 'underscore'; -import E2ELogin from '../actions/e2eLogin'; -import Performance from '../../Performance'; -import E2EClient from '../client'; +import E2ELogin from '@libs/E2E/actions/e2eLogin'; +import E2EClient from '@libs/E2E/client'; +import Performance from '@libs/Performance'; const test = () => { // check for login (if already logged in the action will simply resolve) diff --git a/src/libs/E2E/tests/openSearchPageTest.e2e.js b/src/libs/E2E/tests/openSearchPageTest.e2e.js index 3b2d91322cf0..1101a620f413 100644 --- a/src/libs/E2E/tests/openSearchPageTest.e2e.js +++ b/src/libs/E2E/tests/openSearchPageTest.e2e.js @@ -1,9 +1,9 @@ -import E2ELogin from '../actions/e2eLogin'; -import Performance from '../../Performance'; -import E2EClient from '../client'; -import Navigation from '../../Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import CONST from '../../../CONST'; +import E2ELogin from '@libs/E2E/actions/e2eLogin'; +import E2EClient from '@libs/E2E/client'; +import Navigation from '@libs/Navigation/Navigation'; +import Performance from '@libs/Performance'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; const test = () => { // check for login (if already logged in the action will simply resolve) diff --git a/src/libs/EmojiTrie.ts b/src/libs/EmojiTrie.ts index d0a53acf29c9..2ab950621f87 100644 --- a/src/libs/EmojiTrie.ts +++ b/src/libs/EmojiTrie.ts @@ -1,9 +1,9 @@ import React from 'react'; import {SvgProps} from 'react-native-svg'; -import emojis, {localeEmojis} from '../../assets/emojis'; -import Trie from './Trie'; +import emojis, {localeEmojis} from '@assets/emojis'; +import CONST from '@src/CONST'; import Timing from './actions/Timing'; -import CONST from '../CONST'; +import Trie from './Trie'; type Emoji = { code: string; diff --git a/src/libs/EmojiUtils.js b/src/libs/EmojiUtils.js index 05ad1bd3c2ce..4ade70537b0b 100644 --- a/src/libs/EmojiUtils.js +++ b/src/libs/EmojiUtils.js @@ -1,14 +1,14 @@ -import _ from 'underscore'; import {getUnixTime} from 'date-fns'; import Str from 'expensify-common/lib/str'; -import Onyx from 'react-native-onyx'; import lodashGet from 'lodash/get'; import lodashMin from 'lodash/min'; import lodashSum from 'lodash/sum'; -import ONYXKEYS from '../ONYXKEYS'; -import CONST from '../CONST'; +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; +import * as Emojis from '@assets/emojis'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import emojisTrie from './EmojiTrie'; -import * as Emojis from '../../assets/emojis'; let frequentlyUsedEmojis = []; Onyx.connect({ diff --git a/src/libs/Environment/Environment.js b/src/libs/Environment/Environment.js index c039b49d33aa..e89c8d74a43a 100644 --- a/src/libs/Environment/Environment.js +++ b/src/libs/Environment/Environment.js @@ -1,8 +1,8 @@ -import Config from 'react-native-config'; import lodashGet from 'lodash/get'; -import CONST from '../../CONST'; +import Config from 'react-native-config'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; import getEnvironment from './getEnvironment'; -import CONFIG from '../../CONFIG'; const ENVIRONMENT_URLS = { [CONST.ENVIRONMENT.DEV]: CONST.DEV_NEW_EXPENSIFY_URL + CONFIG.DEV_PORT, diff --git a/src/libs/Environment/betaChecker/index.android.js b/src/libs/Environment/betaChecker/index.android.js index e74648973c34..18a4290cb634 100644 --- a/src/libs/Environment/betaChecker/index.android.js +++ b/src/libs/Environment/betaChecker/index.android.js @@ -1,9 +1,9 @@ -import semver from 'semver'; import Onyx from 'react-native-onyx'; -import CONST from '../../../CONST'; +import semver from 'semver'; +import * as AppUpdate from '@userActions/AppUpdate'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import pkg from '../../../../package.json'; -import ONYXKEYS from '../../../ONYXKEYS'; -import * as AppUpdate from '../../actions/AppUpdate'; let isLastSavedBeta = false; Onyx.connect({ diff --git a/src/libs/Environment/getEnvironment/index.js b/src/libs/Environment/getEnvironment/index.js index a987678d6a6e..bc1c31cf5076 100644 --- a/src/libs/Environment/getEnvironment/index.js +++ b/src/libs/Environment/getEnvironment/index.js @@ -1,6 +1,6 @@ import lodashGet from 'lodash/get'; import Config from 'react-native-config'; -import CONST from '../../../CONST'; +import CONST from '@src/CONST'; /** * Returns a promise that resolves with the current environment string value diff --git a/src/libs/Environment/getEnvironment/index.native.js b/src/libs/Environment/getEnvironment/index.native.js index 73014c4beffb..ca660f9117cb 100644 --- a/src/libs/Environment/getEnvironment/index.native.js +++ b/src/libs/Environment/getEnvironment/index.native.js @@ -1,7 +1,7 @@ import lodashGet from 'lodash/get'; import Config from 'react-native-config'; -import betaChecker from '../betaChecker'; -import CONST from '../../../CONST'; +import betaChecker from '@libs/Environment/betaChecker'; +import CONST from '@src/CONST'; let environment = null; diff --git a/src/libs/ErrorUtils.ts b/src/libs/ErrorUtils.ts index bf4fc0d810a4..99cd8f34b1e7 100644 --- a/src/libs/ErrorUtils.ts +++ b/src/libs/ErrorUtils.ts @@ -1,9 +1,9 @@ -import CONST from '../CONST'; +import CONST from '@src/CONST'; +import {TranslationFlatObject} from '@src/languages/types'; +import {ErrorFields, Errors} from '@src/types/onyx/OnyxCommon'; +import Response from '@src/types/onyx/Response'; import DateUtils from './DateUtils'; import * as Localize from './Localize'; -import Response from '../types/onyx/Response'; -import {ErrorFields, Errors} from '../types/onyx/OnyxCommon'; -import {TranslationFlatObject} from '../languages/types'; function getAuthenticateErrorMessage(response: Response): keyof TranslationFlatObject { switch (response.jsonCode) { diff --git a/src/libs/Firebase/index.native.ts b/src/libs/Firebase/index.native.ts index 2014e2b8bd3e..107b3f8905b3 100644 --- a/src/libs/Firebase/index.native.ts +++ b/src/libs/Firebase/index.native.ts @@ -1,6 +1,6 @@ /* eslint-disable no-unused-vars */ import perf from '@react-native-firebase/perf'; -import * as Environment from '../Environment/Environment'; +import * as Environment from '@libs/Environment/Environment'; import {StartTrace, StopTrace, TraceMap} from './types'; const traceMap: TraceMap = {}; diff --git a/src/libs/Growl.ts b/src/libs/Growl.ts index 33d7311973cb..55bcf88206e9 100644 --- a/src/libs/Growl.ts +++ b/src/libs/Growl.ts @@ -1,5 +1,5 @@ import React from 'react'; -import CONST from '../CONST'; +import CONST from '@src/CONST'; type GrowlRef = { show?: (bodyText: string, type: string, duration: number) => void; diff --git a/src/libs/HeaderUtils.js b/src/libs/HeaderUtils.js index 16d375ea1124..2edca95ecf74 100644 --- a/src/libs/HeaderUtils.js +++ b/src/libs/HeaderUtils.js @@ -1,7 +1,7 @@ -import * as Localize from './Localize'; -import * as Session from './actions/Session'; +import * as Expensicons from '@components/Icon/Expensicons'; import * as Report from './actions/Report'; -import * as Expensicons from '../components/Icon/Expensicons'; +import * as Session from './actions/Session'; +import * as Localize from './Localize'; /** * @param {Object} report diff --git a/src/libs/HttpUtils.js b/src/libs/HttpUtils.js index 5a8185a03038..2df7421ea91c 100644 --- a/src/libs/HttpUtils.js +++ b/src/libs/HttpUtils.js @@ -1,10 +1,10 @@ import Onyx from 'react-native-onyx'; import _ from 'underscore'; -import CONST from '../CONST'; -import ONYXKEYS from '../ONYXKEYS'; -import HttpsError from './Errors/HttpsError'; +import alert from '@components/Alert'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as ApiUtils from './ApiUtils'; -import alert from '../components/Alert'; +import HttpsError from './Errors/HttpsError'; let shouldFailAllRequests = false; let shouldForceOffline = false; diff --git a/src/libs/IOUUtils.ts b/src/libs/IOUUtils.ts index d8a916d0dfb0..ff4f2aafc8a8 100644 --- a/src/libs/IOUUtils.ts +++ b/src/libs/IOUUtils.ts @@ -1,7 +1,7 @@ -import CONST from '../CONST'; -import * as TransactionUtils from './TransactionUtils'; +import CONST from '@src/CONST'; +import {Report, Transaction} from '@src/types/onyx'; import * as CurrencyUtils from './CurrencyUtils'; -import {Report, Transaction} from '../types/onyx'; +import * as TransactionUtils from './TransactionUtils'; /** * Calculates the amount per user given a list of participants diff --git a/src/libs/IntlPolyfill/index.native.ts b/src/libs/IntlPolyfill/index.native.ts index 9e578558faed..a044b4c52f0d 100644 --- a/src/libs/IntlPolyfill/index.native.ts +++ b/src/libs/IntlPolyfill/index.native.ts @@ -1,5 +1,5 @@ -import polyfillNumberFormat from './polyfillNumberFormat'; import polyfillListFormat from './polyfillListFormat'; +import polyfillNumberFormat from './polyfillNumberFormat'; import IntlPolyfill from './types'; /** diff --git a/src/libs/IntlPolyfill/polyfillNumberFormat.ts b/src/libs/IntlPolyfill/polyfillNumberFormat.ts index e4fdfef16e2c..1fac01958f05 100644 --- a/src/libs/IntlPolyfill/polyfillNumberFormat.ts +++ b/src/libs/IntlPolyfill/polyfillNumberFormat.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; /** * Check if the locale data is as expected on the device. diff --git a/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/index.native.ts b/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/index.native.ts index d23d558fa1f8..72a4365b87e2 100644 --- a/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/index.native.ts +++ b/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/index.native.ts @@ -1,4 +1,4 @@ -import getKeyEventModifiers from '../getKeyEventModifiers'; +import getKeyEventModifiers from '@libs/KeyboardShortcut/getKeyEventModifiers'; import BindHandlerToKeydownEvent from './types'; /** diff --git a/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/index.ts b/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/index.ts index 8f06c2fe9c2f..8f2eaad25c5b 100644 --- a/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/index.ts +++ b/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/index.ts @@ -1,5 +1,5 @@ -import getKeyEventModifiers from '../getKeyEventModifiers'; -import isEnterWhileComposition from '../isEnterWhileComposition'; +import getKeyEventModifiers from '@libs/KeyboardShortcut/getKeyEventModifiers'; +import isEnterWhileComposition from '@libs/KeyboardShortcut/isEnterWhileComposition'; import BindHandlerToKeydownEvent from './types'; /** diff --git a/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/types.ts b/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/types.ts index 6a9aefb30676..2fe9521fa117 100644 --- a/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/types.ts +++ b/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/types.ts @@ -1,4 +1,4 @@ -import type {EventHandler} from '../index'; +import type {EventHandler} from '..'; type KeyCommandEvent = {input: string; modifierFlags?: string}; diff --git a/src/libs/KeyboardShortcut/index.ts b/src/libs/KeyboardShortcut/index.ts index 3109ccda8aaf..249311f92cd2 100644 --- a/src/libs/KeyboardShortcut/index.ts +++ b/src/libs/KeyboardShortcut/index.ts @@ -1,8 +1,8 @@ import Str from 'expensify-common/lib/str'; import * as KeyCommand from 'react-native-key-command'; +import getOperatingSystem from '@libs/getOperatingSystem'; +import CONST from '@src/CONST'; import bindHandlerToKeydownEvent from './bindHandlerToKeydownEvent'; -import getOperatingSystem from '../getOperatingSystem'; -import CONST from '../../CONST'; const operatingSystem = getOperatingSystem(); diff --git a/src/libs/KeyboardShortcut/isEnterWhileComposition.ts b/src/libs/KeyboardShortcut/isEnterWhileComposition.ts index 2a0a2fec110f..51e198f1c2d1 100644 --- a/src/libs/KeyboardShortcut/isEnterWhileComposition.ts +++ b/src/libs/KeyboardShortcut/isEnterWhileComposition.ts @@ -1,6 +1,6 @@ import {NativeSyntheticEvent} from 'react-native'; -import * as Browser from '../Browser'; -import CONST from '../../CONST'; +import * as Browser from '@libs/Browser'; +import CONST from '@src/CONST'; /** * Check if the Enter key was pressed during IME confirmation (i.e. while the text is being composed). diff --git a/src/libs/LocaleDigitUtils.ts b/src/libs/LocaleDigitUtils.ts index e17620aa5427..d9ba23ff4f9f 100644 --- a/src/libs/LocaleDigitUtils.ts +++ b/src/libs/LocaleDigitUtils.ts @@ -1,5 +1,4 @@ import _ from 'lodash'; - import * as NumberFormatUtils from './NumberFormatUtils'; const STANDARD_DIGITS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', '-', ',']; diff --git a/src/libs/LocalePhoneNumber.ts b/src/libs/LocalePhoneNumber.ts index 962040aee049..e50f3be87c84 100644 --- a/src/libs/LocalePhoneNumber.ts +++ b/src/libs/LocalePhoneNumber.ts @@ -1,7 +1,7 @@ -import Onyx from 'react-native-onyx'; -import Str from 'expensify-common/lib/str'; import {parsePhoneNumber} from 'awesome-phonenumber'; -import ONYXKEYS from '../ONYXKEYS'; +import Str from 'expensify-common/lib/str'; +import Onyx from 'react-native-onyx'; +import ONYXKEYS from '@src/ONYXKEYS'; let countryCodeByIP: number; Onyx.connect({ diff --git a/src/libs/Localize/LocaleListener/BaseLocaleListener.js b/src/libs/Localize/LocaleListener/BaseLocaleListener.js index 9d4e62c374b0..0f861b20040a 100644 --- a/src/libs/Localize/LocaleListener/BaseLocaleListener.js +++ b/src/libs/Localize/LocaleListener/BaseLocaleListener.js @@ -1,6 +1,6 @@ import Onyx from 'react-native-onyx'; -import CONST from '../../../CONST'; -import ONYXKEYS from '../../../ONYXKEYS'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; let preferredLocale = CONST.LOCALES.DEFAULT; diff --git a/src/libs/Localize/index.js b/src/libs/Localize/index.js index a26c7d4ebc10..f2f8cfa1f8b0 100644 --- a/src/libs/Localize/index.js +++ b/src/libs/Localize/index.js @@ -1,15 +1,15 @@ -import _ from 'underscore'; -import lodashGet from 'lodash/get'; import Str from 'expensify-common/lib/str'; +import lodashGet from 'lodash/get'; import * as RNLocalize from 'react-native-localize'; import Onyx from 'react-native-onyx'; -import Log from '../Log'; -import Config from '../../CONFIG'; -import translations from '../../languages/translations'; -import CONST from '../../CONST'; +import _ from 'underscore'; +import Log from '@libs/Log'; +import Config from '@src/CONFIG'; +import CONST from '@src/CONST'; +import translations from '@src/languages/translations'; +import ONYXKEYS from '@src/ONYXKEYS'; import LocaleListener from './LocaleListener'; import BaseLocaleListener from './LocaleListener/BaseLocaleListener'; -import ONYXKEYS from '../../ONYXKEYS'; // Current user mail is needed for handling missing translations let userEmail = ''; diff --git a/src/libs/Log.ts b/src/libs/Log.ts index cf139eec2682..e171e6338ffe 100644 --- a/src/libs/Log.ts +++ b/src/libs/Log.ts @@ -1,12 +1,13 @@ // Making an exception to this rule here since we don't need an "action" for Log and Log should just be used directly. Creating a Log // action would likely cause confusion about which one to use. But most other API methods should happen inside an action file. + /* eslint-disable rulesdir/no-api-in-views */ -import {Merge} from 'type-fest'; import Logger from 'expensify-common/lib/Logger'; -import getPlatform from './getPlatform'; +import {Merge} from 'type-fest'; import pkg from '../../package.json'; -import requireParameters from './requireParameters'; +import getPlatform from './getPlatform'; import * as Network from './Network'; +import requireParameters from './requireParameters'; let timeout: NodeJS.Timeout; diff --git a/src/libs/LoginUtils.ts b/src/libs/LoginUtils.ts index 32f6aece6f96..742f9bfe16ce 100644 --- a/src/libs/LoginUtils.ts +++ b/src/libs/LoginUtils.ts @@ -1,9 +1,9 @@ +import {parsePhoneNumber} from 'awesome-phonenumber'; +import {PUBLIC_DOMAINS} from 'expensify-common/lib/CONST'; import Str from 'expensify-common/lib/str'; import Onyx from 'react-native-onyx'; -import {PUBLIC_DOMAINS} from 'expensify-common/lib/CONST'; -import {parsePhoneNumber} from 'awesome-phonenumber'; -import CONST from '../CONST'; -import ONYXKEYS from '../ONYXKEYS'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; let countryCodeByIP: number; Onyx.connect({ diff --git a/src/libs/Metrics/index.native.ts b/src/libs/Metrics/index.native.ts index 526e5c57a269..373f826e9ca3 100644 --- a/src/libs/Metrics/index.native.ts +++ b/src/libs/Metrics/index.native.ts @@ -1,4 +1,4 @@ -import CONFIG from '../../CONFIG'; +import CONFIG from '@src/CONFIG'; import {CanCaptureOnyxMetrics, CanCapturePerformanceMetrics} from './types'; /** diff --git a/src/libs/Metrics/index.ts b/src/libs/Metrics/index.ts index 7c33f31cb19e..1097826aff24 100644 --- a/src/libs/Metrics/index.ts +++ b/src/libs/Metrics/index.ts @@ -1,4 +1,4 @@ -import CONFIG from '../../CONFIG'; +import CONFIG from '@src/CONFIG'; import {CanCaptureOnyxMetrics, CanCapturePerformanceMetrics} from './types'; // We don't capture performance metrics on web as there are enough tools available diff --git a/src/libs/Middleware/HandleUnusedOptimisticID.ts b/src/libs/Middleware/HandleUnusedOptimisticID.ts index 14f7d08d1fdb..abca86522d2b 100644 --- a/src/libs/Middleware/HandleUnusedOptimisticID.ts +++ b/src/libs/Middleware/HandleUnusedOptimisticID.ts @@ -1,9 +1,9 @@ import _ from 'lodash'; -import ONYXKEYS from '../../ONYXKEYS'; -import Report from '../../types/onyx/Report'; -import {Middleware} from '../Request'; -import * as PersistedRequests from '../actions/PersistedRequests'; -import deepReplaceKeysAndValues from '../deepReplaceKeysAndValues'; +import deepReplaceKeysAndValues from '@libs/deepReplaceKeysAndValues'; +import {Middleware} from '@libs/Request'; +import * as PersistedRequests from '@userActions/PersistedRequests'; +import ONYXKEYS from '@src/ONYXKEYS'; +import Report from '@src/types/onyx/Report'; const handleUnusedOptimisticID: Middleware = (requestResponse, request, isFromSequentialQueue) => requestResponse.then((response) => { diff --git a/src/libs/Middleware/Logging.ts b/src/libs/Middleware/Logging.ts index 171cb4b9ab4c..3ef819298f80 100644 --- a/src/libs/Middleware/Logging.ts +++ b/src/libs/Middleware/Logging.ts @@ -1,7 +1,7 @@ -import Log from '../Log'; -import CONST from '../../CONST'; -import Request from '../../types/onyx/Request'; -import Response from '../../types/onyx/Response'; +import Log from '@libs/Log'; +import CONST from '@src/CONST'; +import Request from '@src/types/onyx/Request'; +import Response from '@src/types/onyx/Response'; import Middleware from './types'; function logRequestDetails(message: string, request: Request, response?: Response | void) { diff --git a/src/libs/Middleware/Reauthentication.ts b/src/libs/Middleware/Reauthentication.ts index aec09227e441..f1f71a85b16c 100644 --- a/src/libs/Middleware/Reauthentication.ts +++ b/src/libs/Middleware/Reauthentication.ts @@ -1,10 +1,10 @@ -import CONST from '../../CONST'; -import * as NetworkStore from '../Network/NetworkStore'; -import * as MainQueue from '../Network/MainQueue'; -import * as Authentication from '../Authentication'; -import * as Request from '../Request'; -import Log from '../Log'; -import NetworkConnection from '../NetworkConnection'; +import * as Authentication from '@libs/Authentication'; +import Log from '@libs/Log'; +import * as MainQueue from '@libs/Network/MainQueue'; +import * as NetworkStore from '@libs/Network/NetworkStore'; +import NetworkConnection from '@libs/NetworkConnection'; +import * as Request from '@libs/Request'; +import CONST from '@src/CONST'; import Middleware from './types'; // We store a reference to the active authentication request so that we are only ever making one request to authenticate at a time. diff --git a/src/libs/Middleware/RecheckConnection.ts b/src/libs/Middleware/RecheckConnection.ts index 5a685d66fd02..1f43b0171800 100644 --- a/src/libs/Middleware/RecheckConnection.ts +++ b/src/libs/Middleware/RecheckConnection.ts @@ -1,5 +1,5 @@ -import CONST from '../../CONST'; -import NetworkConnection from '../NetworkConnection'; +import NetworkConnection from '@libs/NetworkConnection'; +import CONST from '@src/CONST'; import Middleware from './types'; /** diff --git a/src/libs/Middleware/SaveResponseInOnyx.ts b/src/libs/Middleware/SaveResponseInOnyx.ts index 0a279a7425b4..d73a10d98663 100644 --- a/src/libs/Middleware/SaveResponseInOnyx.ts +++ b/src/libs/Middleware/SaveResponseInOnyx.ts @@ -1,7 +1,7 @@ -import CONST from '../../CONST'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as MemoryOnlyKeys from '../actions/MemoryOnlyKeys/MemoryOnlyKeys'; -import * as OnyxUpdates from '../actions/OnyxUpdates'; +import * as MemoryOnlyKeys from '@userActions/MemoryOnlyKeys/MemoryOnlyKeys'; +import * as OnyxUpdates from '@userActions/OnyxUpdates'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import Middleware from './types'; // If we're executing any of these requests, we don't need to trigger our OnyxUpdates flow to update the current data even if our current value is out of diff --git a/src/libs/Middleware/types.ts b/src/libs/Middleware/types.ts index ece210ffe2af..c1d199539b15 100644 --- a/src/libs/Middleware/types.ts +++ b/src/libs/Middleware/types.ts @@ -1,5 +1,5 @@ -import Request from '../../types/onyx/Request'; -import Response from '../../types/onyx/Response'; +import Request from '@src/types/onyx/Request'; +import Response from '@src/types/onyx/Response'; type Middleware = (response: Promise, request: Request, isFromSequentialQueue: boolean) => Promise; diff --git a/src/libs/MoneyRequestUtils.ts b/src/libs/MoneyRequestUtils.ts index 420184973a34..83c66be429d2 100644 --- a/src/libs/MoneyRequestUtils.ts +++ b/src/libs/MoneyRequestUtils.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../CONST'; +import CONST from '@src/CONST'; /** * Strip comma from the amount diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js index 3ac6a8025eb9..fdc48aec2010 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.js +++ b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -1,40 +1,40 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {memo, useEffect, useRef} from 'react'; +import {View} from 'react-native'; import Onyx, {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import {View} from 'react-native'; -import CONST from '../../../CONST'; -import * as PersonalDetails from '../../actions/PersonalDetails'; -import * as Pusher from '../../Pusher/pusher'; -import PusherConnectionManager from '../../PusherConnectionManager'; -import ROUTES from '../../../ROUTES'; -import ONYXKEYS from '../../../ONYXKEYS'; -import Timing from '../../actions/Timing'; -import NetworkConnection from '../../NetworkConnection'; -import CONFIG from '../../../CONFIG'; -import KeyboardShortcut from '../../KeyboardShortcut'; -import Navigation from '../Navigation'; -import * as User from '../../actions/User'; -import * as Modal from '../../actions/Modal'; -import * as Report from '../../actions/Report'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import KeyboardShortcut from '@libs/KeyboardShortcut'; +import getCurrentUrl from '@libs/Navigation/currentUrl'; +import Navigation from '@libs/Navigation/Navigation'; +import NetworkConnection from '@libs/NetworkConnection'; +import * as Pusher from '@libs/Pusher/pusher'; +import PusherConnectionManager from '@libs/PusherConnectionManager'; +import * as SessionUtils from '@libs/SessionUtils'; +import DemoSetupPage from '@pages/DemoSetupPage'; +import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; +import DesktopSignInRedirectPage from '@pages/signin/DesktopSignInRedirectPage'; +import styles from '@styles/styles'; +import * as App from '@userActions/App'; +import * as Download from '@userActions/Download'; +import * as Modal from '@userActions/Modal'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import * as Report from '@userActions/Report'; +import * as Session from '@userActions/Session'; +import Timing from '@userActions/Timing'; +import * as User from '@userActions/User'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import NAVIGATORS from '@src/NAVIGATORS'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; import createCustomStackNavigator from './createCustomStackNavigator'; -import SCREENS from '../../../SCREENS'; import defaultScreenOptions from './defaultScreenOptions'; -import * as App from '../../actions/App'; -import * as Download from '../../actions/Download'; -import * as Session from '../../actions/Session'; -import RightModalNavigator from './Navigators/RightModalNavigator'; -import CentralPaneNavigator from './Navigators/CentralPaneNavigator'; -import NAVIGATORS from '../../../NAVIGATORS'; -import DesktopSignInRedirectPage from '../../../pages/signin/DesktopSignInRedirectPage'; -import styles from '../../../styles/styles'; -import * as SessionUtils from '../../SessionUtils'; -import NotFoundPage from '../../../pages/ErrorPage/NotFoundPage'; import getRootNavigatorScreenOptions from './getRootNavigatorScreenOptions'; -import DemoSetupPage from '../../../pages/DemoSetupPage'; -import getCurrentUrl from '../currentUrl'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; +import CentralPaneNavigator from './Navigators/CentralPaneNavigator'; +import RightModalNavigator from './Navigators/RightModalNavigator'; const loadReportAttachments = () => require('../../../pages/home/report/ReportAttachments').default; const loadSidebarScreen = () => require('../../../pages/home/sidebar/SidebarScreen').default; diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js index 088da657a693..2f0a75a02cc3 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js @@ -1,8 +1,8 @@ -import _ from 'underscore'; +import {CardStyleInterpolators, createStackNavigator} from '@react-navigation/stack'; import React from 'react'; -import {createStackNavigator, CardStyleInterpolators} from '@react-navigation/stack'; -import styles from '../../../styles/styles'; -import SCREENS from '../../../SCREENS'; +import _ from 'underscore'; +import styles from '@styles/styles'; +import SCREENS from '@src/SCREENS'; const defaultSubRouteOptions = { cardStyle: styles.navigationScreenCardStyle, diff --git a/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator.js b/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator.js index 64eadcbe06c3..fc75f3544346 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator.js +++ b/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator.js @@ -1,10 +1,10 @@ -import React from 'react'; import {createStackNavigator} from '@react-navigation/stack'; -import SCREENS from '../../../../SCREENS'; -import ReportScreenWrapper from '../ReportScreenWrapper'; -import getCurrentUrl from '../../currentUrl'; -import styles from '../../../../styles/styles'; -import FreezeWrapper from '../../FreezeWrapper'; +import React from 'react'; +import ReportScreenWrapper from '@libs/Navigation/AppNavigator/ReportScreenWrapper'; +import getCurrentUrl from '@libs/Navigation/currentUrl'; +import FreezeWrapper from '@libs/Navigation/FreezeWrapper'; +import styles from '@styles/styles'; +import SCREENS from '@src/SCREENS'; const Stack = createStackNavigator(); diff --git a/src/libs/Navigation/AppNavigator/Navigators/Overlay.js b/src/libs/Navigation/AppNavigator/Navigators/Overlay.js index 1b2faff8c5e3..a36f98076d22 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/Overlay.js +++ b/src/libs/Navigation/AppNavigator/Navigators/Overlay.js @@ -1,13 +1,11 @@ -import React from 'react'; -import {Animated, View} from 'react-native'; import {useCardAnimation} from '@react-navigation/stack'; - import PropTypes from 'prop-types'; -import styles from '../../../../styles/styles'; - -import PressableWithoutFeedback from '../../../../components/Pressable/PressableWithoutFeedback'; -import useLocalize from '../../../../hooks/useLocalize'; -import CONST from '../../../../CONST'; +import React from 'react'; +import {Animated, View} from 'react-native'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /* Callback to close the modal */ diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js index 76203763bb0e..de3fb9e79659 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js @@ -1,14 +1,13 @@ -import React from 'react'; -import {View} from 'react-native'; import {createStackNavigator} from '@react-navigation/stack'; import PropTypes from 'prop-types'; - -import * as ModalStackNavigators from '../ModalStackNavigators'; -import RHPScreenOptions from '../RHPScreenOptions'; -import useWindowDimensions from '../../../../hooks/useWindowDimensions'; -import styles from '../../../../styles/styles'; +import React from 'react'; +import {View} from 'react-native'; +import NoDropZone from '@components/DragAndDrop/NoDropZone'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as ModalStackNavigators from '@libs/Navigation/AppNavigator/ModalStackNavigators'; +import RHPScreenOptions from '@libs/Navigation/AppNavigator/RHPScreenOptions'; +import styles from '@styles/styles'; import Overlay from './Overlay'; -import NoDropZone from '../../../../components/DragAndDrop/NoDropZone'; const Stack = createStackNavigator(); diff --git a/src/libs/Navigation/AppNavigator/PublicScreens.js b/src/libs/Navigation/AppNavigator/PublicScreens.js index 7b0afb787278..b50769c7caed 100644 --- a/src/libs/Navigation/AppNavigator/PublicScreens.js +++ b/src/libs/Navigation/AppNavigator/PublicScreens.js @@ -1,14 +1,14 @@ -import React from 'react'; import {createStackNavigator} from '@react-navigation/stack'; -import SignInPage from '../../../pages/signin/SignInPage'; -import ValidateLoginPage from '../../../pages/ValidateLoginPage'; -import LogInWithShortLivedAuthTokenPage from '../../../pages/LogInWithShortLivedAuthTokenPage'; -import SCREENS from '../../../SCREENS'; +import React from 'react'; +import LogInWithShortLivedAuthTokenPage from '@pages/LogInWithShortLivedAuthTokenPage'; +import AppleSignInDesktopPage from '@pages/signin/AppleSignInDesktopPage'; +import GoogleSignInDesktopPage from '@pages/signin/GoogleSignInDesktopPage'; +import SAMLSignInPage from '@pages/signin/SAMLSignInPage'; +import SignInPage from '@pages/signin/SignInPage'; +import UnlinkLoginPage from '@pages/UnlinkLoginPage'; +import ValidateLoginPage from '@pages/ValidateLoginPage'; +import SCREENS from '@src/SCREENS'; import defaultScreenOptions from './defaultScreenOptions'; -import UnlinkLoginPage from '../../../pages/UnlinkLoginPage'; -import AppleSignInDesktopPage from '../../../pages/signin/AppleSignInDesktopPage'; -import GoogleSignInDesktopPage from '../../../pages/signin/GoogleSignInDesktopPage'; -import SAMLSignInPage from '../../../pages/signin/SAMLSignInPage'; const RootStack = createStackNavigator(); diff --git a/src/libs/Navigation/AppNavigator/RHPScreenOptions.js b/src/libs/Navigation/AppNavigator/RHPScreenOptions.js index d7448dcf2314..6adf5bd2b507 100644 --- a/src/libs/Navigation/AppNavigator/RHPScreenOptions.js +++ b/src/libs/Navigation/AppNavigator/RHPScreenOptions.js @@ -1,5 +1,5 @@ import {CardStyleInterpolators} from '@react-navigation/stack'; -import styles from '../../../styles/styles'; +import styles from '@styles/styles'; const RHPScreenOptions = { headerShown: false, diff --git a/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.js b/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.js index 8cfef2439adb..70a33ee34a67 100644 --- a/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.js +++ b/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.js @@ -1,13 +1,13 @@ -import {useEffect} from 'react'; -import PropTypes from 'prop-types'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import {useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import * as ReportUtils from '../../ReportUtils'; -import reportPropTypes from '../../../pages/reportPropTypes'; -import * as App from '../../actions/App'; -import usePermissions from '../../../hooks/usePermissions'; -import Navigation from '../Navigation'; +import usePermissions from '@hooks/usePermissions'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import * as App from '@userActions/App'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Available reports that would be displayed in this navigator */ diff --git a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.js b/src/libs/Navigation/AppNavigator/ReportScreenWrapper.js index 542be8ed859e..87a8a4abc687 100644 --- a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.js +++ b/src/libs/Navigation/AppNavigator/ReportScreenWrapper.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React from 'react'; -import ReportScreen from '../../../pages/home/ReportScreen'; +import ReportScreen from '@pages/home/ReportScreen'; import ReportScreenIDSetter from './ReportScreenIDSetter'; const propTypes = { diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/CustomRouter.js b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/CustomRouter.js index 42caad5b3969..5d3eb38d49dc 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/CustomRouter.js +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/CustomRouter.js @@ -1,8 +1,8 @@ -import _ from 'underscore'; import {StackRouter} from '@react-navigation/native'; import lodashFindLast from 'lodash/findLast'; -import NAVIGATORS from '../../../../NAVIGATORS'; -import SCREENS from '../../../../SCREENS'; +import _ from 'underscore'; +import NAVIGATORS from '@src/NAVIGATORS'; +import SCREENS from '@src/SCREENS'; /** * @param {Object} state - react-navigation state diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.js b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.js index 58be3d2af3da..ae36f4aff9ad 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.js +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.js @@ -1,9 +1,9 @@ -import React, {useRef} from 'react'; -import PropTypes from 'prop-types'; -import {useNavigationBuilder, createNavigatorFactory} from '@react-navigation/native'; +import {createNavigatorFactory, useNavigationBuilder} from '@react-navigation/native'; import {StackView} from '@react-navigation/stack'; +import PropTypes from 'prop-types'; +import React, {useRef} from 'react'; +import useWindowDimensions from '@hooks/useWindowDimensions'; import CustomRouter from './CustomRouter'; -import useWindowDimensions from '../../../../hooks/useWindowDimensions'; const propTypes = { /* Determines if the navigator should render the StackView (narrow) or ThreePaneView (wide) */ diff --git a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.js b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.js index a7456fb071b4..04784fb9d0e1 100644 --- a/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.js +++ b/src/libs/Navigation/AppNavigator/getRootNavigatorScreenOptions.js @@ -1,8 +1,8 @@ +import getNavigationModalCardStyle from '@styles/getNavigationModalCardStyles'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import CONFIG from '@src/CONFIG'; import modalCardStyleInterpolator from './modalCardStyleInterpolator'; -import styles from '../../../styles/styles'; -import variables from '../../../styles/variables'; -import getNavigationModalCardStyle from '../../../styles/getNavigationModalCardStyles'; -import CONFIG from '../../../CONFIG'; const commonScreenOptions = { headerShown: false, diff --git a/src/libs/Navigation/AppNavigator/index.js b/src/libs/Navigation/AppNavigator/index.js index dee8027b2f30..0d03badf37bc 100644 --- a/src/libs/Navigation/AppNavigator/index.js +++ b/src/libs/Navigation/AppNavigator/index.js @@ -1,5 +1,5 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; const propTypes = { /** If we have an authToken this is true */ diff --git a/src/libs/Navigation/AppNavigator/modalCardStyleInterpolator.js b/src/libs/Navigation/AppNavigator/modalCardStyleInterpolator.js index ec442efbba86..446d195fc466 100644 --- a/src/libs/Navigation/AppNavigator/modalCardStyleInterpolator.js +++ b/src/libs/Navigation/AppNavigator/modalCardStyleInterpolator.js @@ -1,6 +1,6 @@ import {Animated} from 'react-native'; -import variables from '../../../styles/variables'; -import getCardStyles from '../../../styles/cardStyles'; +import getCardStyles from '@styles/cardStyles'; +import variables from '@styles/variables'; export default (isSmallScreenWidth, isFullScreenModal, {current: {progress}, inverted, layouts: {screen}}) => { const translateX = Animated.multiply( diff --git a/src/libs/Navigation/FreezeWrapper.js b/src/libs/Navigation/FreezeWrapper.js index 07b05651a769..592d869dc0de 100644 --- a/src/libs/Navigation/FreezeWrapper.js +++ b/src/libs/Navigation/FreezeWrapper.js @@ -1,7 +1,7 @@ -import React, {useEffect, useState, useRef} from 'react'; +import {useIsFocused, useNavigation, useRoute} from '@react-navigation/native'; import lodashFindIndex from 'lodash/findIndex'; import PropTypes from 'prop-types'; -import {useIsFocused, useNavigation, useRoute} from '@react-navigation/native'; +import React, {useEffect, useRef, useState} from 'react'; import {Freeze} from 'react-freeze'; const propTypes = { diff --git a/src/libs/Navigation/Navigation.js b/src/libs/Navigation/Navigation.js index 6bbf53ffa6ea..ae13e2b07206 100644 --- a/src/libs/Navigation/Navigation.js +++ b/src/libs/Navigation/Navigation.js @@ -1,19 +1,19 @@ +import {getActionFromState} from '@react-navigation/core'; +import {CommonActions, getPathFromState, StackActions} from '@react-navigation/native'; import _ from 'lodash'; import lodashGet from 'lodash/get'; -import {CommonActions, getPathFromState, StackActions} from '@react-navigation/native'; -import {getActionFromState} from '@react-navigation/core'; -import Log from '../Log'; -import linkTo from './linkTo'; -import ROUTES from '../../ROUTES'; -import linkingConfig from './linkingConfig'; -import navigationRef from './navigationRef'; -import NAVIGATORS from '../../NAVIGATORS'; -import originalGetTopmostReportId from './getTopmostReportId'; +import Log from '@libs/Log'; +import CONST from '@src/CONST'; +import NAVIGATORS from '@src/NAVIGATORS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; +import getStateFromPath from './getStateFromPath'; import originalGetTopMostCentralPaneRouteName from './getTopMostCentralPaneRouteName'; import originalGetTopmostReportActionId from './getTopmostReportActionID'; -import getStateFromPath from './getStateFromPath'; -import SCREENS from '../../SCREENS'; -import CONST from '../../CONST'; +import originalGetTopmostReportId from './getTopmostReportId'; +import linkingConfig from './linkingConfig'; +import linkTo from './linkTo'; +import navigationRef from './navigationRef'; let resolveNavigationIsReadyPromise; const navigationIsReadyPromise = new Promise((resolve) => { diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index c7a3b14e4fb0..3478f7b8ed8d 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -1,17 +1,17 @@ -import React, {useRef, useEffect, useContext} from 'react'; +import {DefaultTheme, getPathFromState, NavigationContainer} from '@react-navigation/native'; import PropTypes from 'prop-types'; -import {NavigationContainer, DefaultTheme, getPathFromState} from '@react-navigation/native'; -import {useSharedValue, useAnimatedReaction, interpolateColor, withTiming, withDelay, Easing, runOnJS} from 'react-native-reanimated'; -import useFlipper from '../../hooks/useFlipper'; -import Navigation, {navigationRef} from './Navigation'; -import linkingConfig from './linkingConfig'; +import React, {useContext, useEffect, useRef} from 'react'; +import {Easing, interpolateColor, runOnJS, useAnimatedReaction, useSharedValue, withDelay, withTiming} from 'react-native-reanimated'; +import useCurrentReportID from '@hooks/useCurrentReportID'; +import useFlipper from '@hooks/useFlipper'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import Log from '@libs/Log'; +import StatusBar from '@libs/StatusBar'; +import {SidebarNavigationContext} from '@pages/home/sidebar/SidebarNavigationContext'; +import themeColors from '@styles/themes/default'; import AppNavigator from './AppNavigator'; -import themeColors from '../../styles/themes/default'; -import Log from '../Log'; -import StatusBar from '../StatusBar'; -import useCurrentReportID from '../../hooks/useCurrentReportID'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; -import {SidebarNavigationContext} from '../../pages/home/sidebar/SidebarNavigationContext'; +import linkingConfig from './linkingConfig'; +import Navigation, {navigationRef} from './Navigation'; // https://reactnavigation.org/docs/themes const navigationTheme = { diff --git a/src/libs/Navigation/OnyxTabNavigator.js b/src/libs/Navigation/OnyxTabNavigator.js index 158160e9aa13..eeed3e0cd270 100644 --- a/src/libs/Navigation/OnyxTabNavigator.js +++ b/src/libs/Navigation/OnyxTabNavigator.js @@ -1,9 +1,9 @@ -import React from 'react'; import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs'; -import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; -import Tab from '../actions/Tab'; -import ONYXKEYS from '../../ONYXKEYS'; +import React from 'react'; +import {withOnyx} from 'react-native-onyx'; +import Tab from '@userActions/Tab'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** ID of the tab component to be saved in onyx */ diff --git a/src/libs/Navigation/linkTo.js b/src/libs/Navigation/linkTo.js index fcb3bd5df9c5..e77d787ab4f8 100644 --- a/src/libs/Navigation/linkTo.js +++ b/src/libs/Navigation/linkTo.js @@ -1,11 +1,11 @@ import {getActionFromState} from '@react-navigation/core'; import _ from 'lodash'; -import NAVIGATORS from '../../NAVIGATORS'; -import linkingConfig from './linkingConfig'; -import getTopmostReportId from './getTopmostReportId'; +import CONST from '@src/CONST'; +import NAVIGATORS from '@src/NAVIGATORS'; import getStateFromPath from './getStateFromPath'; -import CONST from '../../CONST'; import getTopMostCentralPaneRouteName from './getTopMostCentralPaneRouteName'; +import getTopmostReportId from './getTopmostReportId'; +import linkingConfig from './linkingConfig'; /** * Motivation for this function is described in NAVIGATION.md diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index 79609f551ee4..fff86b684872 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -1,7 +1,7 @@ -import ROUTES from '../../ROUTES'; -import SCREENS from '../../SCREENS'; -import CONST from '../../CONST'; -import NAVIGATORS from '../../NAVIGATORS'; +import CONST from '@src/CONST'; +import NAVIGATORS from '@src/NAVIGATORS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; export default { prefixes: ['new-expensify://', 'https://www.expensify.cash', 'https://staging.expensify.cash', 'http://localhost', CONST.NEW_EXPENSIFY_URL, CONST.STAGING_NEW_EXPENSIFY_URL], diff --git a/src/libs/Navigation/shouldPreventDeeplinkPrompt/index.js b/src/libs/Navigation/shouldPreventDeeplinkPrompt/index.js index 861e40eaa24d..23f46cb9808f 100644 --- a/src/libs/Navigation/shouldPreventDeeplinkPrompt/index.js +++ b/src/libs/Navigation/shouldPreventDeeplinkPrompt/index.js @@ -1,4 +1,4 @@ -import CONST from '../../../CONST'; +import CONST from '@src/CONST'; /** * Determines if the deeplink prompt should be shown on the current screen diff --git a/src/libs/Network/MainQueue.ts b/src/libs/Network/MainQueue.ts index 5f069e2d0ed4..3ae0d44680a4 100644 --- a/src/libs/Network/MainQueue.ts +++ b/src/libs/Network/MainQueue.ts @@ -1,7 +1,7 @@ +import * as Request from '@libs/Request'; +import OnyxRequest from '@src/types/onyx/Request'; import * as NetworkStore from './NetworkStore'; import * as SequentialQueue from './SequentialQueue'; -import * as Request from '../Request'; -import OnyxRequest from '../../types/onyx/Request'; // Queue for network requests so we don't lose actions done by the user while offline let networkRequestQueue: OnyxRequest[] = []; diff --git a/src/libs/Network/NetworkStore.ts b/src/libs/Network/NetworkStore.ts index 0910031bdb63..52e4147f1b3c 100644 --- a/src/libs/Network/NetworkStore.ts +++ b/src/libs/Network/NetworkStore.ts @@ -1,6 +1,6 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; -import Credentials from '../../types/onyx/Credentials'; +import ONYXKEYS from '@src/ONYXKEYS'; +import Credentials from '@src/types/onyx/Credentials'; let credentials: Credentials | null = null; let authToken: string | null = null; diff --git a/src/libs/Network/SequentialQueue.ts b/src/libs/Network/SequentialQueue.ts index 980bbc0efc44..d4aee4a221e5 100644 --- a/src/libs/Network/SequentialQueue.ts +++ b/src/libs/Network/SequentialQueue.ts @@ -1,13 +1,13 @@ import Onyx from 'react-native-onyx'; -import * as PersistedRequests from '../actions/PersistedRequests'; +import * as ActiveClientManager from '@libs/ActiveClientManager'; +import * as Request from '@libs/Request'; +import * as RequestThrottle from '@libs/RequestThrottle'; +import * as PersistedRequests from '@userActions/PersistedRequests'; +import * as QueuedOnyxUpdates from '@userActions/QueuedOnyxUpdates'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import OnyxRequest from '@src/types/onyx/Request'; import * as NetworkStore from './NetworkStore'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as ActiveClientManager from '../ActiveClientManager'; -import * as Request from '../Request'; -import * as RequestThrottle from '../RequestThrottle'; -import CONST from '../../CONST'; -import * as QueuedOnyxUpdates from '../actions/QueuedOnyxUpdates'; -import OnyxRequest from '../../types/onyx/Request'; let resolveIsReadyPromise: ((args?: unknown[]) => void) | undefined; let isReadyPromise = new Promise((resolve) => { diff --git a/src/libs/Network/enhanceParameters.ts b/src/libs/Network/enhanceParameters.ts index 54d72a7c6c99..6ff54f94bc88 100644 --- a/src/libs/Network/enhanceParameters.ts +++ b/src/libs/Network/enhanceParameters.ts @@ -1,5 +1,5 @@ -import CONFIG from '../../CONFIG'; -import getPlatform from '../getPlatform'; +import getPlatform from '@libs/getPlatform'; +import CONFIG from '@src/CONFIG'; import * as NetworkStore from './NetworkStore'; /** diff --git a/src/libs/Network/index.ts b/src/libs/Network/index.ts index bf38bc33e95a..4ccb8df01163 100644 --- a/src/libs/Network/index.ts +++ b/src/libs/Network/index.ts @@ -1,10 +1,10 @@ -import * as ActiveClientManager from '../ActiveClientManager'; -import CONST from '../../CONST'; +import * as ActiveClientManager from '@libs/ActiveClientManager'; +import CONST from '@src/CONST'; +import {Request} from '@src/types/onyx'; +import Response from '@src/types/onyx/Response'; +import pkg from '../../../package.json'; import * as MainQueue from './MainQueue'; import * as SequentialQueue from './SequentialQueue'; -import pkg from '../../../package.json'; -import {Request} from '../../types/onyx'; -import Response from '../../types/onyx/Response'; // We must wait until the ActiveClientManager is ready so that we ensure only the "leader" tab processes any persisted requests ActiveClientManager.isReady().then(() => { diff --git a/src/libs/NetworkConnection.ts b/src/libs/NetworkConnection.ts index 663a9c1b37d5..e150b8b650c1 100644 --- a/src/libs/NetworkConnection.ts +++ b/src/libs/NetworkConnection.ts @@ -1,12 +1,12 @@ -import Onyx from 'react-native-onyx'; import NetInfo from '@react-native-community/netinfo'; import throttle from 'lodash/throttle'; +import Onyx from 'react-native-onyx'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import * as NetworkActions from './actions/Network'; import AppStateMonitor from './AppStateMonitor'; import Log from './Log'; -import * as NetworkActions from './actions/Network'; -import CONFIG from '../CONFIG'; -import CONST from '../CONST'; -import ONYXKEYS from '../ONYXKEYS'; let isOffline = false; let hasPendingNetworkCheck = false; diff --git a/src/libs/NextStepUtils.js b/src/libs/NextStepUtils.js index 78214bac7df9..303f9b2a9925 100644 --- a/src/libs/NextStepUtils.js +++ b/src/libs/NextStepUtils.js @@ -1,5 +1,5 @@ -import _ from 'underscore'; import Str from 'expensify-common/lib/str'; +import _ from 'underscore'; function parseMessage(messageToParse) { let nextStepHTML = ''; diff --git a/src/libs/Notification/LocalNotification/BrowserNotifications.js b/src/libs/Notification/LocalNotification/BrowserNotifications.js index 3199e4c6388d..20d9be48d915 100644 --- a/src/libs/Notification/LocalNotification/BrowserNotifications.js +++ b/src/libs/Notification/LocalNotification/BrowserNotifications.js @@ -1,9 +1,9 @@ // Web and desktop implementation only. Do not import for direct use. Use LocalNotification. import _ from 'underscore'; +import EXPENSIFY_ICON_URL from '@assets/images/expensify-logo-round-clearspace.png'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as AppUpdate from '@userActions/AppUpdate'; import focusApp from './focusApp'; -import * as AppUpdate from '../../actions/AppUpdate'; -import EXPENSIFY_ICON_URL from '../../../../assets/images/expensify-logo-round-clearspace.png'; -import * as ReportUtils from '../../ReportUtils'; const DEFAULT_DELAY = 4000; diff --git a/src/libs/Notification/PushNotification/ForegroundNotifications/index.android.js b/src/libs/Notification/PushNotification/ForegroundNotifications/index.android.js index 0afc8fe10490..b36c0d0c7d18 100644 --- a/src/libs/Notification/PushNotification/ForegroundNotifications/index.android.js +++ b/src/libs/Notification/PushNotification/ForegroundNotifications/index.android.js @@ -1,5 +1,5 @@ import Airship from '@ua/react-native-airship'; -import shouldShowPushNotification from '../shouldShowPushNotification'; +import shouldShowPushNotification from '@libs/Notification/PushNotification/shouldShowPushNotification'; function configureForegroundNotifications() { Airship.push.android.setForegroundDisplayPredicate((pushPayload) => Promise.resolve(shouldShowPushNotification(pushPayload))); diff --git a/src/libs/Notification/PushNotification/ForegroundNotifications/index.ios.js b/src/libs/Notification/PushNotification/ForegroundNotifications/index.ios.js index 17ad1baaebe3..0f0929951a90 100644 --- a/src/libs/Notification/PushNotification/ForegroundNotifications/index.ios.js +++ b/src/libs/Notification/PushNotification/ForegroundNotifications/index.ios.js @@ -1,5 +1,5 @@ import Airship, {iOS} from '@ua/react-native-airship'; -import shouldShowPushNotification from '../shouldShowPushNotification'; +import shouldShowPushNotification from '@libs/Notification/PushNotification/shouldShowPushNotification'; function configureForegroundNotifications() { // Set our default iOS foreground presentation to be loud with a banner diff --git a/src/libs/Notification/PushNotification/backgroundRefresh/index.android.js b/src/libs/Notification/PushNotification/backgroundRefresh/index.android.js index d86589e2f207..b672069727a5 100644 --- a/src/libs/Notification/PushNotification/backgroundRefresh/index.android.js +++ b/src/libs/Notification/PushNotification/backgroundRefresh/index.android.js @@ -1,7 +1,7 @@ import Onyx from 'react-native-onyx'; -import * as App from '../../../actions/App'; -import Visibility from '../../../Visibility'; -import ONYXKEYS from '../../../../ONYXKEYS'; +import Visibility from '@libs/Visibility'; +import * as App from '@userActions/App'; +import ONYXKEYS from '@src/ONYXKEYS'; function getLastOnyxUpdateID() { return new Promise((resolve) => { diff --git a/src/libs/Notification/PushNotification/index.native.js b/src/libs/Notification/PushNotification/index.native.js index 7192ee66a791..8513a88e46d3 100644 --- a/src/libs/Notification/PushNotification/index.native.js +++ b/src/libs/Notification/PushNotification/index.native.js @@ -1,12 +1,12 @@ -import _ from 'underscore'; -import Onyx from 'react-native-onyx'; import Airship, {EventType} from '@ua/react-native-airship'; import lodashGet from 'lodash/get'; -import Log from '../../Log'; -import NotificationType from './NotificationType'; -import * as PushNotification from '../../actions/PushNotification'; -import ONYXKEYS from '../../../ONYXKEYS'; +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; +import Log from '@libs/Log'; +import * as PushNotification from '@userActions/PushNotification'; +import ONYXKEYS from '@src/ONYXKEYS'; import ForegroundNotifications from './ForegroundNotifications'; +import NotificationType from './NotificationType'; let isUserOptedInToPushNotifications = false; Onyx.connect({ diff --git a/src/libs/Notification/PushNotification/shouldShowPushNotification.js b/src/libs/Notification/PushNotification/shouldShowPushNotification.js index b9b9d974374c..f25d452a77d5 100644 --- a/src/libs/Notification/PushNotification/shouldShowPushNotification.js +++ b/src/libs/Notification/PushNotification/shouldShowPushNotification.js @@ -1,7 +1,7 @@ import _ from 'underscore'; -import * as Report from '../../actions/Report'; -import Log from '../../Log'; -import * as ReportActionUtils from '../../ReportActionsUtils'; +import Log from '@libs/Log'; +import * as ReportActionUtils from '@libs/ReportActionsUtils'; +import * as Report from '@userActions/Report'; /** * Returns whether the given Airship notification should be shown depending on the current state of the app diff --git a/src/libs/Notification/PushNotification/subscribePushNotification/index.js b/src/libs/Notification/PushNotification/subscribePushNotification/index.js index 45dc8d8a7ae9..c5519b42dc09 100644 --- a/src/libs/Notification/PushNotification/subscribePushNotification/index.js +++ b/src/libs/Notification/PushNotification/subscribePushNotification/index.js @@ -1,7 +1,7 @@ import Onyx from 'react-native-onyx'; +import subscribeToReportCommentPushNotifications from '@libs/Notification/PushNotification/subscribeToReportCommentPushNotifications'; +import ONYXKEYS from '@src/ONYXKEYS'; import PushNotification from '..'; -import subscribeToReportCommentPushNotifications from '../subscribeToReportCommentPushNotifications'; -import ONYXKEYS from '../../../../ONYXKEYS'; /** * Manage push notification subscriptions on sign-in/sign-out. diff --git a/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js b/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js index 269d00404a9d..04fd34bf6075 100644 --- a/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js +++ b/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js @@ -1,10 +1,10 @@ import Onyx from 'react-native-onyx'; -import PushNotification from './index'; -import ROUTES from '../../../ROUTES'; -import Log from '../../Log'; -import Navigation from '../../Navigation/Navigation'; -import Visibility from '../../Visibility'; +import Log from '@libs/Log'; +import Navigation from '@libs/Navigation/Navigation'; +import Visibility from '@libs/Visibility'; +import ROUTES from '@src/ROUTES'; import backgroundRefresh from './backgroundRefresh'; +import PushNotification from './index'; /** * Setup reportComment push notification callbacks. diff --git a/src/libs/NumberUtils.ts b/src/libs/NumberUtils.ts index 6e8d0fa4362b..ddbd42243758 100644 --- a/src/libs/NumberUtils.ts +++ b/src/libs/NumberUtils.ts @@ -1,4 +1,4 @@ -import CONST from '../CONST'; +import CONST from '@src/CONST'; /** * Generates a random positive 64 bit numeric string by randomly generating the left, middle, and right parts and concatenating them. Used to generate client-side ids. diff --git a/src/libs/OnyxSelectors/reportWithoutHasDraftSelector.ts b/src/libs/OnyxSelectors/reportWithoutHasDraftSelector.ts index 8819cc8aa47c..9fd89cfdf146 100644 --- a/src/libs/OnyxSelectors/reportWithoutHasDraftSelector.ts +++ b/src/libs/OnyxSelectors/reportWithoutHasDraftSelector.ts @@ -1,4 +1,4 @@ -import {OnyxKeyValue} from '../../ONYXKEYS'; +import {OnyxKeyValue} from '@src/ONYXKEYS'; export default function reportWithoutHasDraftSelector(report: OnyxKeyValue<'report_'>) { if (!report) { diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 79c480711c4d..74382c8b9065 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -1,25 +1,25 @@ /* eslint-disable no-continue */ -import _ from 'underscore'; -import Onyx from 'react-native-onyx'; -import lodashOrderBy from 'lodash/orderBy'; +import {parsePhoneNumber} from 'awesome-phonenumber'; +import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; +import lodashOrderBy from 'lodash/orderBy'; import lodashSet from 'lodash/set'; -import Str from 'expensify-common/lib/str'; -import {parsePhoneNumber} from 'awesome-phonenumber'; -import ONYXKEYS from '../ONYXKEYS'; -import CONST from '../CONST'; -import * as ReportUtils from './ReportUtils'; -import * as Localize from './Localize'; -import Permissions from './Permissions'; +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as CollectionUtils from './CollectionUtils'; -import Navigation from './Navigation/Navigation'; -import * as LoginUtils from './LoginUtils'; +import * as ErrorUtils from './ErrorUtils'; import * as LocalePhoneNumber from './LocalePhoneNumber'; -import * as UserUtils from './UserUtils'; -import * as ReportActionUtils from './ReportActionsUtils'; +import * as Localize from './Localize'; +import * as LoginUtils from './LoginUtils'; +import Navigation from './Navigation/Navigation'; +import Permissions from './Permissions'; import * as PersonalDetailsUtils from './PersonalDetailsUtils'; -import * as ErrorUtils from './ErrorUtils'; +import * as ReportActionUtils from './ReportActionsUtils'; +import * as ReportUtils from './ReportUtils'; import * as TransactionUtils from './TransactionUtils'; +import * as UserUtils from './UserUtils'; /** * OptionsListUtils is used to build a list options passed to the OptionsList component. Several different UI views can diff --git a/src/libs/PaymentUtils.ts b/src/libs/PaymentUtils.ts index 380f10589b3f..b37db2584394 100644 --- a/src/libs/PaymentUtils.ts +++ b/src/libs/PaymentUtils.ts @@ -1,10 +1,10 @@ -import BankAccountModel from './models/BankAccount'; -import getBankIcon from '../components/Icon/BankIcons'; -import CONST from '../CONST'; +import getBankIcon from '@components/Icon/BankIcons'; +import CONST from '@src/CONST'; +import BankAccount from '@src/types/onyx/BankAccount'; +import Fund from '@src/types/onyx/Fund'; +import PaymentMethod from '@src/types/onyx/PaymentMethod'; import * as Localize from './Localize'; -import Fund from '../types/onyx/Fund'; -import BankAccount from '../types/onyx/BankAccount'; -import PaymentMethod from '../types/onyx/PaymentMethod'; +import BankAccountModel from './models/BankAccount'; type AccountType = BankAccount['accountType'] | Fund['accountType']; diff --git a/src/libs/Performance.tsx b/src/libs/Performance.tsx index cfb5e258c9f8..45ae0f5cc5f0 100644 --- a/src/libs/Performance.tsx +++ b/src/libs/Performance.tsx @@ -1,15 +1,14 @@ -import React, {Profiler, forwardRef} from 'react'; -import {Alert, InteractionManager} from 'react-native'; -import lodashTransform from 'lodash/transform'; -import isObject from 'lodash/isObject'; import isEqual from 'lodash/isEqual'; -import {Performance as RNPerformance, PerformanceEntry, PerformanceMark, PerformanceMeasure} from 'react-native-performance'; +import isObject from 'lodash/isObject'; +import lodashTransform from 'lodash/transform'; +import React, {forwardRef, Profiler} from 'react'; +import {Alert, InteractionManager} from 'react-native'; +import {PerformanceEntry, PerformanceMark, PerformanceMeasure, Performance as RNPerformance} from 'react-native-performance'; import {PerformanceObserverEntryList} from 'react-native-performance/lib/typescript/performance-observer'; - -import * as Metrics from './Metrics'; -import getComponentDisplayName from './getComponentDisplayName'; -import CONST from '../CONST'; +import CONST from '@src/CONST'; import isE2ETestSession from './E2E/isE2ETestSession'; +import getComponentDisplayName from './getComponentDisplayName'; +import * as Metrics from './Metrics'; type WrappedComponentConfig = {id: string}; diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts index 9703a4368abe..2eb1d3b02f25 100644 --- a/src/libs/Permissions.ts +++ b/src/libs/Permissions.ts @@ -1,5 +1,5 @@ -import CONST from '../CONST'; -import Beta from '../types/onyx/Beta'; +import CONST from '@src/CONST'; +import Beta from '@src/types/onyx/Beta'; function canUseAllBetas(betas: Beta[]): boolean { return betas?.includes(CONST.BETAS.ALL); diff --git a/src/libs/PersonalDetailsUtils.js b/src/libs/PersonalDetailsUtils.js index ddb24d62ef26..e346dcde4fc4 100644 --- a/src/libs/PersonalDetailsUtils.js +++ b/src/libs/PersonalDetailsUtils.js @@ -1,10 +1,10 @@ import lodashGet from 'lodash/get'; import Onyx from 'react-native-onyx'; import _ from 'underscore'; -import ONYXKEYS from '../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; +import * as LocalePhoneNumber from './LocalePhoneNumber'; import * as Localize from './Localize'; import * as UserUtils from './UserUtils'; -import * as LocalePhoneNumber from './LocalePhoneNumber'; let personalDetails = []; let allPersonalDetails = {}; diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index e33af862f63d..62640a11311a 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -1,8 +1,8 @@ -import {OnyxCollection, OnyxEntry} from 'react-native-onyx'; import Str from 'expensify-common/lib/str'; -import CONST from '../CONST'; -import ONYXKEYS from '../ONYXKEYS'; -import {PersonalDetails, Policy, PolicyMembers, PolicyTags} from '../types/onyx'; +import {OnyxCollection, OnyxEntry} from 'react-native-onyx'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {PersonalDetails, Policy, PolicyMembers, PolicyTags} from '@src/types/onyx'; type MemberEmailsToAccountIDs = Record; type PersonalDetailsList = Record; diff --git a/src/libs/Pusher/pusher.ts b/src/libs/Pusher/pusher.ts index dad963e933fe..dd8af08db229 100644 --- a/src/libs/Pusher/pusher.ts +++ b/src/libs/Pusher/pusher.ts @@ -1,15 +1,15 @@ -import Onyx from 'react-native-onyx'; -import {Channel, ChannelAuthorizerGenerator, Options} from 'pusher-js/with-encryption'; import isObject from 'lodash/isObject'; +import {Channel, ChannelAuthorizerGenerator, Options} from 'pusher-js/with-encryption'; +import Onyx from 'react-native-onyx'; import {LiteralUnion, ValueOf} from 'type-fest'; -import ONYXKEYS from '../../ONYXKEYS'; -import Pusher from './library'; +import Log from '@libs/Log'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {OnyxUpdateEvent, OnyxUpdatesFromServer} from '@src/types/onyx'; +import DeepValueOf from '@src/types/utils/DeepValueOf'; import TYPE from './EventType'; -import Log from '../Log'; -import DeepValueOf from '../../types/utils/DeepValueOf'; +import Pusher from './library'; import {SocketEventName} from './library/types'; -import CONST from '../../CONST'; -import {OnyxUpdateEvent, OnyxUpdatesFromServer} from '../../types/onyx'; type States = { previous: string; diff --git a/src/libs/PusherConnectionManager.ts b/src/libs/PusherConnectionManager.ts index 9b1f6ebe1b2a..a0c5673af729 100644 --- a/src/libs/PusherConnectionManager.ts +++ b/src/libs/PusherConnectionManager.ts @@ -1,9 +1,9 @@ import {ChannelAuthorizationCallback} from 'pusher-js/with-encryption'; -import * as Pusher from './Pusher/pusher'; +import CONST from '@src/CONST'; import * as Session from './actions/Session'; import Log from './Log'; -import CONST from '../CONST'; import {SocketEventName} from './Pusher/library/types'; +import * as Pusher from './Pusher/pusher'; import {EventCallbackError, States} from './Pusher/pusher'; function init() { diff --git a/src/libs/PusherUtils.ts b/src/libs/PusherUtils.ts index d47283f21bbf..e5782d12acd3 100644 --- a/src/libs/PusherUtils.ts +++ b/src/libs/PusherUtils.ts @@ -1,9 +1,9 @@ import {OnyxUpdate} from 'react-native-onyx'; -import CONFIG from '../CONFIG'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; import Log from './Log'; import NetworkConnection from './NetworkConnection'; import * as Pusher from './Pusher/pusher'; -import CONST from '../CONST'; import {PushJSON} from './Pusher/pusher'; type Callback = (data: OnyxUpdate[]) => Promise; diff --git a/src/libs/ReceiptUtils.ts b/src/libs/ReceiptUtils.ts index 13e8a195cccb..38b4823d54c6 100644 --- a/src/libs/ReceiptUtils.ts +++ b/src/libs/ReceiptUtils.ts @@ -1,13 +1,13 @@ import Str from 'expensify-common/lib/str'; import {ImageSourcePropType} from 'react-native'; +import ReceiptDoc from '@assets/images/receipt-doc.png'; +import ReceiptGeneric from '@assets/images/receipt-generic.png'; +import ReceiptHTML from '@assets/images/receipt-html.png'; +import ReceiptSVG from '@assets/images/receipt-svg.png'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; +import {Transaction} from '@src/types/onyx'; import * as FileUtils from './fileDownload/FileUtils'; -import CONST from '../CONST'; -import ReceiptHTML from '../../assets/images/receipt-html.png'; -import ReceiptDoc from '../../assets/images/receipt-doc.png'; -import ReceiptGeneric from '../../assets/images/receipt-generic.png'; -import ReceiptSVG from '../../assets/images/receipt-svg.png'; -import {Transaction} from '../types/onyx'; -import ROUTES from '../ROUTES'; type ThumbnailAndImageURI = { image: ImageSourcePropType | string; diff --git a/src/libs/ReportActionComposeFocusManager.ts b/src/libs/ReportActionComposeFocusManager.ts index 65466fa4a204..9d4039117989 100644 --- a/src/libs/ReportActionComposeFocusManager.ts +++ b/src/libs/ReportActionComposeFocusManager.ts @@ -1,6 +1,6 @@ import React from 'react'; import {TextInput} from 'react-native'; -import ROUTES from '../ROUTES'; +import ROUTES from '@src/ROUTES'; import Navigation from './Navigation/Navigation'; type FocusCallback = () => void; diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 5d9b4fbdc9cf..11e11f549682 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -2,15 +2,15 @@ import _ from 'lodash'; import lodashFindLast from 'lodash/findLast'; import Onyx, {OnyxCollection, OnyxEntry, OnyxUpdate} from 'react-native-onyx'; import {ValueOf} from 'type-fest'; -import CONST from '../CONST'; -import ONYXKEYS from '../ONYXKEYS'; -import ReportAction, {ReportActions} from '../types/onyx/ReportAction'; -import Report from '../types/onyx/Report'; -import {ActionName} from '../types/onyx/OriginalMessage'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {ActionName} from '@src/types/onyx/OriginalMessage'; +import Report from '@src/types/onyx/Report'; +import ReportAction, {ReportActions} from '@src/types/onyx/ReportAction'; import * as CollectionUtils from './CollectionUtils'; -import Log from './Log'; -import isReportMessageAttachment from './isReportMessageAttachment'; import * as Environment from './Environment/Environment'; +import isReportMessageAttachment from './isReportMessageAttachment'; +import Log from './Log'; type LastVisibleMessage = { lastMessageTranslationKey?: string; diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 2dccc68b74e0..0e9091fd6cb2 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1,27 +1,27 @@ /* eslint-disable rulesdir/prefer-underscore-method */ -import _ from 'underscore'; import {format} from 'date-fns'; +import ExpensiMark from 'expensify-common/lib/ExpensiMark'; import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; import lodashIntersection from 'lodash/intersection'; import Onyx from 'react-native-onyx'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import ONYXKEYS from '../ONYXKEYS'; -import CONST from '../CONST'; +import _ from 'underscore'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as defaultWorkspaceAvatars from '@components/Icon/WorkspaceDefaultAvatars'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import * as CurrencyUtils from './CurrencyUtils'; +import DateUtils from './DateUtils'; +import isReportMessageAttachment from './isReportMessageAttachment'; import * as Localize from './Localize'; -import * as Expensicons from '../components/Icon/Expensicons'; +import linkingConfig from './Navigation/linkingConfig'; import Navigation from './Navigation/Navigation'; -import ROUTES from '../ROUTES'; import * as NumberUtils from './NumberUtils'; +import Permissions from './Permissions'; import * as ReportActionsUtils from './ReportActionsUtils'; import * as TransactionUtils from './TransactionUtils'; import * as Url from './Url'; -import Permissions from './Permissions'; -import DateUtils from './DateUtils'; -import linkingConfig from './Navigation/linkingConfig'; -import isReportMessageAttachment from './isReportMessageAttachment'; -import * as defaultWorkspaceAvatars from '../components/Icon/WorkspaceDefaultAvatars'; -import * as CurrencyUtils from './CurrencyUtils'; import * as UserUtils from './UserUtils'; let currentUserEmail; diff --git a/src/libs/Request.ts b/src/libs/Request.ts index 9c4af4aa7e18..335731763ec9 100644 --- a/src/libs/Request.ts +++ b/src/libs/Request.ts @@ -1,9 +1,9 @@ +import Request from '@src/types/onyx/Request'; +import Response from '@src/types/onyx/Response'; import HttpUtils from './HttpUtils'; +import Middleware from './Middleware/types'; import enhanceParameters from './Network/enhanceParameters'; import * as NetworkStore from './Network/NetworkStore'; -import Request from '../types/onyx/Request'; -import Response from '../types/onyx/Response'; -import Middleware from './Middleware/types'; let middlewares: Middleware[] = []; diff --git a/src/libs/RequestThrottle.ts b/src/libs/RequestThrottle.ts index 00dca2ebf61e..36935982afbb 100644 --- a/src/libs/RequestThrottle.ts +++ b/src/libs/RequestThrottle.ts @@ -1,4 +1,4 @@ -import CONST from '../CONST'; +import CONST from '@src/CONST'; import {generateRandomInt} from './NumberUtils'; let requestWaitTime = 0; diff --git a/src/libs/RoomNameInputUtils.ts b/src/libs/RoomNameInputUtils.ts index 2777acee45dd..cff0bbc30274 100644 --- a/src/libs/RoomNameInputUtils.ts +++ b/src/libs/RoomNameInputUtils.ts @@ -1,4 +1,4 @@ -import CONST from '../CONST'; +import CONST from '@src/CONST'; /** * Replaces spaces with dashes diff --git a/src/libs/SelectionScraper/index.js b/src/libs/SelectionScraper/index.js index 44b87deba796..02b3ff8bf61b 100644 --- a/src/libs/SelectionScraper/index.js +++ b/src/libs/SelectionScraper/index.js @@ -1,8 +1,8 @@ import render from 'dom-serializer'; +import Str from 'expensify-common/lib/str'; import {parseDocument} from 'htmlparser2'; import _ from 'underscore'; -import Str from 'expensify-common/lib/str'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; const elementsWillBeSkipped = ['html', 'body']; const tagAttribute = 'data-testid'; diff --git a/src/libs/SessionUtils.ts b/src/libs/SessionUtils.ts index fcbc9a887fa9..6cd20e0b56b2 100644 --- a/src/libs/SessionUtils.ts +++ b/src/libs/SessionUtils.ts @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * Determine if the transitioning user is logging in as a new user. diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index bfe7d2281049..79d3280e859e 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -1,23 +1,23 @@ /* eslint-disable rulesdir/prefer-underscore-method */ -import Onyx from 'react-native-onyx'; import Str from 'expensify-common/lib/str'; +import Onyx from 'react-native-onyx'; import {ValueOf} from 'type-fest'; -import ONYXKEYS from '../ONYXKEYS'; -import * as ReportUtils from './ReportUtils'; -import * as ReportActionsUtils from './ReportActionsUtils'; -import * as Localize from './Localize'; -import CONST from '../CONST'; -import * as OptionsListUtils from './OptionsListUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {PersonalDetails} from '@src/types/onyx'; +import Beta from '@src/types/onyx/Beta'; +import * as OnyxCommon from '@src/types/onyx/OnyxCommon'; +import Policy from '@src/types/onyx/Policy'; +import Report from '@src/types/onyx/Report'; +import ReportAction, {ReportActions} from '@src/types/onyx/ReportAction'; import * as CollectionUtils from './CollectionUtils'; import * as LocalePhoneNumber from './LocalePhoneNumber'; -import * as UserUtils from './UserUtils'; +import * as Localize from './Localize'; +import * as OptionsListUtils from './OptionsListUtils'; import * as PersonalDetailsUtils from './PersonalDetailsUtils'; -import ReportAction, {ReportActions} from '../types/onyx/ReportAction'; -import Beta from '../types/onyx/Beta'; -import Policy from '../types/onyx/Policy'; -import Report from '../types/onyx/Report'; -import {PersonalDetails} from '../types/onyx'; -import * as OnyxCommon from '../types/onyx/OnyxCommon'; +import * as ReportActionsUtils from './ReportActionsUtils'; +import * as ReportUtils from './ReportUtils'; +import * as UserUtils from './UserUtils'; const visibleReportActionItems: ReportActions = {}; const lastReportActions: ReportActions = {}; diff --git a/src/libs/StartupTimer/index.ts b/src/libs/StartupTimer/index.ts index 421524a70fc8..1cc656b329f4 100644 --- a/src/libs/StartupTimer/index.ts +++ b/src/libs/StartupTimer/index.ts @@ -1,7 +1,6 @@ /** * Web noop as there is no "startup" to time from the native layer. */ - import StartupTimer from './types'; const startupTimer: StartupTimer = { diff --git a/src/libs/StringUtils.ts b/src/libs/StringUtils.ts index 8ef23bb0751b..290380ce2cff 100644 --- a/src/libs/StringUtils.ts +++ b/src/libs/StringUtils.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import CONST from '../CONST'; +import CONST from '@src/CONST'; /** * Removes diacritical marks and non-alphabetic and non-latin characters from a string. diff --git a/src/libs/SuggestionUtils.js b/src/libs/SuggestionUtils.js index 9c3e92799334..45641ebb5a0f 100644 --- a/src/libs/SuggestionUtils.js +++ b/src/libs/SuggestionUtils.js @@ -1,4 +1,4 @@ -import CONST from '../CONST'; +import CONST from '@src/CONST'; /** * Return the max available index for arrow manager. diff --git a/src/libs/TransactionUtils.ts b/src/libs/TransactionUtils.ts index abd646fc19f1..a30ba7fc2723 100644 --- a/src/libs/TransactionUtils.ts +++ b/src/libs/TransactionUtils.ts @@ -1,12 +1,12 @@ -import Onyx, {OnyxCollection} from 'react-native-onyx'; import {format, isValid} from 'date-fns'; -import CONST from '../CONST'; -import ONYXKEYS from '../ONYXKEYS'; -import DateUtils from './DateUtils'; +import Onyx, {OnyxCollection} from 'react-native-onyx'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {RecentWaypoint, ReportAction, Transaction} from '@src/types/onyx'; +import {Comment, Receipt, Waypoint, WaypointCollection} from '@src/types/onyx/Transaction'; import {isExpensifyCard} from './CardUtils'; +import DateUtils from './DateUtils'; import * as NumberUtils from './NumberUtils'; -import {RecentWaypoint, ReportAction, Transaction} from '../types/onyx'; -import {Receipt, Comment, WaypointCollection, Waypoint} from '../types/onyx/Transaction'; type AdditionalTransactionChanges = {comment?: string; waypoints?: WaypointCollection}; diff --git a/src/libs/UnreadIndicatorUpdater/index.js b/src/libs/UnreadIndicatorUpdater/index.js index 9acf1a17bbc6..9af74f8313c3 100644 --- a/src/libs/UnreadIndicatorUpdater/index.js +++ b/src/libs/UnreadIndicatorUpdater/index.js @@ -1,9 +1,9 @@ -import _ from 'underscore'; import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; +import _ from 'underscore'; +import * as ReportUtils from '@libs/ReportUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import updateUnread from './updateUnread/index'; -import * as ReportUtils from '../ReportUtils'; -import CONST from '../../CONST'; Onyx.connect({ key: ONYXKEYS.COLLECTION.REPORT, diff --git a/src/libs/UnreadIndicatorUpdater/updateUnread/index.website.js b/src/libs/UnreadIndicatorUpdater/updateUnread/index.website.js index 4c829239ef14..56aa7f02509d 100644 --- a/src/libs/UnreadIndicatorUpdater/updateUnread/index.website.js +++ b/src/libs/UnreadIndicatorUpdater/updateUnread/index.website.js @@ -1,7 +1,7 @@ /** * Web browsers have a tab title and favicon which can be updated to show there are unread comments */ -import CONFIG from '../../../CONFIG'; +import CONFIG from '@src/CONFIG'; let unreadTotalCount = 0; /** diff --git a/src/libs/UserUtils.ts b/src/libs/UserUtils.ts index 15bf3c0f1029..f7883609f625 100644 --- a/src/libs/UserUtils.ts +++ b/src/libs/UserUtils.ts @@ -1,10 +1,10 @@ import {SvgProps} from 'react-native-svg'; import {ValueOf} from 'type-fest'; -import CONST from '../CONST'; +import * as defaultAvatars from '@components/Icon/DefaultAvatars'; +import {ConciergeAvatar, FallbackAvatar} from '@components/Icon/Expensicons'; +import CONST from '@src/CONST'; +import Login from '@src/types/onyx/Login'; import hashCode from './hashCode'; -import {ConciergeAvatar, FallbackAvatar} from '../components/Icon/Expensicons'; -import * as defaultAvatars from '../components/Icon/DefaultAvatars'; -import Login from '../types/onyx/Login'; type AvatarRange = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24; diff --git a/src/libs/ValidationUtils.ts b/src/libs/ValidationUtils.ts index b94c240b6e92..5947d45a6f76 100644 --- a/src/libs/ValidationUtils.ts +++ b/src/libs/ValidationUtils.ts @@ -1,14 +1,14 @@ -import {subYears, addYears, startOfDay, endOfMonth, parse, isAfter, isBefore, isValid, isWithinInterval, isSameDay, format} from 'date-fns'; -import {URL_REGEX_WITH_REQUIRED_PROTOCOL} from 'expensify-common/lib/Url'; import {parsePhoneNumber} from 'awesome-phonenumber'; +import {addYears, endOfMonth, format, isAfter, isBefore, isSameDay, isValid, isWithinInterval, parse, startOfDay, subYears} from 'date-fns'; +import {URL_REGEX_WITH_REQUIRED_PROTOCOL} from 'expensify-common/lib/Url'; import isDate from 'lodash/isDate'; import isEmpty from 'lodash/isEmpty'; import isObject from 'lodash/isObject'; -import CONST from '../CONST'; +import CONST from '@src/CONST'; +import {Report} from '@src/types/onyx'; +import * as OnyxCommon from '@src/types/onyx/OnyxCommon'; import * as CardUtils from './CardUtils'; import * as LoginUtils from './LoginUtils'; -import {Report} from '../types/onyx'; -import * as OnyxCommon from '../types/onyx/OnyxCommon'; /** * Implements the Luhn Algorithm, a checksum formula used to validate credit card diff --git a/src/libs/Visibility/index.native.ts b/src/libs/Visibility/index.native.ts index 695df3651da7..42bd56531207 100644 --- a/src/libs/Visibility/index.native.ts +++ b/src/libs/Visibility/index.native.ts @@ -1,6 +1,5 @@ // Mobile apps do not require this check for visibility as // they do not use the Notification lib. - import {AppState} from 'react-native'; import {HasFocus, IsVisible, OnVisibilityChange} from './types'; diff --git a/src/libs/__mocks__/Permissions.ts b/src/libs/__mocks__/Permissions.ts index 66ef64bbb994..e95d13f52803 100644 --- a/src/libs/__mocks__/Permissions.ts +++ b/src/libs/__mocks__/Permissions.ts @@ -1,5 +1,5 @@ -import CONST from '../../CONST'; -import Beta from '../../types/onyx/Beta'; +import CONST from '@src/CONST'; +import Beta from '@src/types/onyx/Beta'; /** * This module is mocked in tests because all the permission methods call canUseAllBetas() and that will diff --git a/src/libs/actions/ActiveClients.ts b/src/libs/actions/ActiveClients.ts index 45fcff402f49..e59fdc14410e 100644 --- a/src/libs/actions/ActiveClients.ts +++ b/src/libs/actions/ActiveClients.ts @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; function setActiveClients(activeClients: string[]): Promise { return Onyx.set(ONYXKEYS.ACTIVE_CLIENTS, activeClients); diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 75520d483f98..7ffac85650f3 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -1,25 +1,25 @@ // Do not remove this import until moment package is fully removed. // Issue - https://github.com/Expensify/App/issues/26719 +import Str from 'expensify-common/lib/str'; +import lodashGet from 'lodash/get'; import 'moment/locale/es'; import {AppState} from 'react-native'; import Onyx from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import Str from 'expensify-common/lib/str'; import _ from 'underscore'; -import * as API from '../API'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import Log from '../Log'; -import Performance from '../Performance'; +import * as API from '@libs/API'; +import * as Browser from '@libs/Browser'; +import Log from '@libs/Log'; +import getCurrentUrl from '@libs/Navigation/currentUrl'; +import Navigation from '@libs/Navigation/Navigation'; +import Performance from '@libs/Performance'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as SessionUtils from '@libs/SessionUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import * as Policy from './Policy'; -import Navigation from '../Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import * as SessionUtils from '../SessionUtils'; -import getCurrentUrl from '../Navigation/currentUrl'; import * as Session from './Session'; -import * as ReportActionsUtils from '../ReportActionsUtils'; import Timing from './Timing'; -import * as Browser from '../Browser'; let currentUserAccountID; let currentUserEmail; diff --git a/src/libs/actions/AppUpdate.ts b/src/libs/actions/AppUpdate.ts index f0e3c1c3da20..29ee2a4547ab 100644 --- a/src/libs/actions/AppUpdate.ts +++ b/src/libs/actions/AppUpdate.ts @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; function triggerUpdateAvailable() { Onyx.set(ONYXKEYS.UPDATE_AVAILABLE, true); diff --git a/src/libs/actions/BankAccounts.ts b/src/libs/actions/BankAccounts.ts index b957633421b9..8d0c59ab8d60 100644 --- a/src/libs/actions/BankAccounts.ts +++ b/src/libs/actions/BankAccounts.ts @@ -1,16 +1,16 @@ import Onyx from 'react-native-onyx'; -import CONST from '../../CONST'; -import * as API from '../API'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as ErrorUtils from '../ErrorUtils'; -import * as PlaidDataProps from '../../pages/ReimbursementAccount/plaidDataPropTypes'; -import Navigation from '../Navigation/Navigation'; -import ROUTES from '../../ROUTES'; +import * as API from '@libs/API'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PlaidDataProps from '@pages/ReimbursementAccount/plaidDataPropTypes'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import type PlaidBankAccount from '@src/types/onyx/PlaidBankAccount'; +import type {BankAccountStep, BankAccountSubStep} from '@src/types/onyx/ReimbursementAccount'; +import type {ACHContractStepProps, BankAccountStepProps, CompanyStepProps, OnfidoData, ReimbursementAccountProps, RequestorStepProps} from '@src/types/onyx/ReimbursementAccountDraft'; +import type {OnyxData} from '@src/types/onyx/Request'; import * as ReimbursementAccount from './ReimbursementAccount'; -import type PlaidBankAccount from '../../types/onyx/PlaidBankAccount'; -import type {ACHContractStepProps, BankAccountStepProps, CompanyStepProps, OnfidoData, ReimbursementAccountProps, RequestorStepProps} from '../../types/onyx/ReimbursementAccountDraft'; -import type {OnyxData} from '../../types/onyx/Request'; -import type {BankAccountStep, BankAccountSubStep} from '../../types/onyx/ReimbursementAccount'; export { goToWithdrawalAccountSetupStep, diff --git a/src/libs/actions/CanvasSize.js b/src/libs/actions/CanvasSize.js index 0c4cd88fea70..b313763131b9 100644 --- a/src/libs/actions/CanvasSize.js +++ b/src/libs/actions/CanvasSize.js @@ -1,7 +1,7 @@ -import Onyx from 'react-native-onyx'; import canvasSize from 'canvas-size'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as Browser from '../Browser'; +import Onyx from 'react-native-onyx'; +import * as Browser from '@libs/Browser'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * Calculate the max area of canvas on this specific platform and save it in onyx diff --git a/src/libs/actions/Card.js b/src/libs/actions/Card.js index 97c902876a3a..126608cf1b47 100644 --- a/src/libs/actions/Card.js +++ b/src/libs/actions/Card.js @@ -1,7 +1,8 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as API from '../API'; -import CONST from '../../CONST'; +import * as API from '@libs/API'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; + /** * @param {Number} cardID */ diff --git a/src/libs/actions/Chronos.ts b/src/libs/actions/Chronos.ts index ce821e524722..76308f225fe4 100644 --- a/src/libs/actions/Chronos.ts +++ b/src/libs/actions/Chronos.ts @@ -1,8 +1,8 @@ import Onyx, {OnyxUpdate} from 'react-native-onyx'; -import CONST from '../../CONST'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as API from '../API'; -import {ChronosOOOEvent} from '../../types/onyx/OriginalMessage'; +import * as API from '@libs/API'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {ChronosOOOEvent} from '@src/types/onyx/OriginalMessage'; const removeEvent = (reportID: string, reportActionID: string, eventID: string, events: ChronosOOOEvent[]) => { const optimisticData: OnyxUpdate[] = [ diff --git a/src/libs/actions/CloseAccount.ts b/src/libs/actions/CloseAccount.ts index 8a8f395277e1..01b115a23518 100644 --- a/src/libs/actions/CloseAccount.ts +++ b/src/libs/actions/CloseAccount.ts @@ -1,6 +1,6 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * Clear CloseAccount error message to hide modal diff --git a/src/libs/actions/Composer.ts b/src/libs/actions/Composer.ts index d3f9ef9814a5..edd42fb801f2 100644 --- a/src/libs/actions/Composer.ts +++ b/src/libs/actions/Composer.ts @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; function setShouldShowComposeInput(shouldShowComposeInput: boolean) { Onyx.set(ONYXKEYS.SHOULD_SHOW_COMPOSE_INPUT, shouldShowComposeInput); diff --git a/src/libs/actions/CurrentDate.ts b/src/libs/actions/CurrentDate.ts index b19a3430e96f..4a382156012b 100644 --- a/src/libs/actions/CurrentDate.ts +++ b/src/libs/actions/CurrentDate.ts @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; function setCurrentDate(currentDate: string) { Onyx.set(ONYXKEYS.CURRENT_DATE, currentDate); diff --git a/src/libs/actions/DemoActions.js b/src/libs/actions/DemoActions.js index e7ce02d2796b..245e475e7ca9 100644 --- a/src/libs/actions/DemoActions.js +++ b/src/libs/actions/DemoActions.js @@ -1,11 +1,11 @@ +import lodashGet from 'lodash/get'; import Config from 'react-native-config'; import Onyx from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import * as API from '../API'; -import * as ReportUtils from '../ReportUtils'; -import Navigation from '../Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import ONYXKEYS from '../../ONYXKEYS'; +import * as API from '@libs/API'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; let currentUserEmail; Onyx.connect({ diff --git a/src/libs/actions/Device/generateDeviceID/index.android.js b/src/libs/actions/Device/generateDeviceID/index.android.js index f61b860bda7d..41fc946839b7 100644 --- a/src/libs/actions/Device/generateDeviceID/index.android.js +++ b/src/libs/actions/Device/generateDeviceID/index.android.js @@ -1,5 +1,5 @@ -import DeviceInfo from 'react-native-device-info'; import Str from 'expensify-common/lib/str'; +import DeviceInfo from 'react-native-device-info'; const deviceID = DeviceInfo.getDeviceId(); const uniqueID = Str.guid(deviceID); diff --git a/src/libs/actions/Device/index.js b/src/libs/actions/Device/index.js index 8f548b75bd93..8394bf226b12 100644 --- a/src/libs/actions/Device/index.js +++ b/src/libs/actions/Device/index.js @@ -1,6 +1,6 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import Log from '../../Log'; +import Log from '@libs/Log'; +import ONYXKEYS from '@src/ONYXKEYS'; import generateDeviceID from './generateDeviceID'; import getDeviceInfo from './getDeviceInfo'; diff --git a/src/libs/actions/Download.ts b/src/libs/actions/Download.ts index 06b97d735d39..6eb3b1f05b4b 100644 --- a/src/libs/actions/Download.ts +++ b/src/libs/actions/Download.ts @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * Set whether an attachment is being downloaded so that a spinner can be shown. diff --git a/src/libs/actions/EmojiPickerAction.ts b/src/libs/actions/EmojiPickerAction.ts index edf82eb46da3..07b00a508dad 100644 --- a/src/libs/actions/EmojiPickerAction.ts +++ b/src/libs/actions/EmojiPickerAction.ts @@ -1,7 +1,7 @@ -import {ValueOf} from 'type-fest'; import React from 'react'; import {View} from 'react-native'; -import CONST from '../../CONST'; +import {ValueOf} from 'type-fest'; +import CONST from '@src/CONST'; type AnchorOrigin = { horizontal: ValueOf; diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index 150e210c727c..77ab246506ce 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -1,29 +1,29 @@ -import Onyx from 'react-native-onyx'; -import _ from 'underscore'; +import {format} from 'date-fns'; +import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; import lodashHas from 'lodash/has'; -import Str from 'expensify-common/lib/str'; -import {format} from 'date-fns'; -import CONST from '../../CONST'; -import ROUTES from '../../ROUTES'; -import ONYXKEYS from '../../ONYXKEYS'; -import Navigation from '../Navigation/Navigation'; -import * as Localize from '../Localize'; -import * as API from '../API'; -import * as ReportUtils from '../ReportUtils'; -import * as CurrencyUtils from '../CurrencyUtils'; -import * as ReportActionsUtils from '../ReportActionsUtils'; -import * as IOUUtils from '../IOUUtils'; -import * as OptionsListUtils from '../OptionsListUtils'; -import DateUtils from '../DateUtils'; -import * as TransactionUtils from '../TransactionUtils'; -import * as ErrorUtils from '../ErrorUtils'; -import * as UserUtils from '../UserUtils'; -import * as Report from './Report'; -import * as NumberUtils from '../NumberUtils'; -import ReceiptGeneric from '../../../assets/images/receipt-generic.png'; -import * as LocalePhoneNumber from '../LocalePhoneNumber'; +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; +import ReceiptGeneric from '@assets/images/receipt-generic.png'; +import * as API from '@libs/API'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import DateUtils from '@libs/DateUtils'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import * as IOUUtils from '@libs/IOUUtils'; +import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; +import * as Localize from '@libs/Localize'; +import Navigation from '@libs/Navigation/Navigation'; +import * as NumberUtils from '@libs/NumberUtils'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import * as UserUtils from '@libs/UserUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import * as Policy from './Policy'; +import * as Report from './Report'; let allPersonalDetails; Onyx.connect({ diff --git a/src/libs/actions/InputFocus/index.desktop.ts b/src/libs/actions/InputFocus/index.desktop.ts index b6cf1aba6138..86a562f0531e 100644 --- a/src/libs/actions/InputFocus/index.desktop.ts +++ b/src/libs/actions/InputFocus/index.desktop.ts @@ -1,6 +1,6 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import ReportActionComposeFocusManager from '../../ReportActionComposeFocusManager'; +import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager'; +import ONYXKEYS from '@src/ONYXKEYS'; function inputFocusChange(focus: boolean) { Onyx.set(ONYXKEYS.INPUT_FOCUSED, focus); diff --git a/src/libs/actions/InputFocus/index.website.ts b/src/libs/actions/InputFocus/index.website.ts index 7c044b169a03..8e41e06d7401 100644 --- a/src/libs/actions/InputFocus/index.website.ts +++ b/src/libs/actions/InputFocus/index.website.ts @@ -1,7 +1,7 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import * as Browser from '../../Browser'; -import ReportActionComposeFocusManager from '../../ReportActionComposeFocusManager'; +import * as Browser from '@libs/Browser'; +import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager'; +import ONYXKEYS from '@src/ONYXKEYS'; function inputFocusChange(focus: boolean) { Onyx.set(ONYXKEYS.INPUT_FOCUSED, focus); diff --git a/src/libs/actions/Link.js b/src/libs/actions/Link.js index 06705182a626..0a50bb62ddc8 100644 --- a/src/libs/actions/Link.js +++ b/src/libs/actions/Link.js @@ -1,11 +1,11 @@ -import Onyx from 'react-native-onyx'; import lodashGet from 'lodash/get'; +import Onyx from 'react-native-onyx'; import _ from 'underscore'; -import ONYXKEYS from '../../ONYXKEYS'; -import asyncOpenURL from '../asyncOpenURL'; -import * as API from '../API'; -import * as Environment from '../Environment/Environment'; -import * as Url from '../Url'; +import * as API from '@libs/API'; +import asyncOpenURL from '@libs/asyncOpenURL'; +import * as Environment from '@libs/Environment/Environment'; +import * as Url from '@libs/Url'; +import ONYXKEYS from '@src/ONYXKEYS'; let isNetworkOffline = false; Onyx.connect({ diff --git a/src/libs/actions/MapboxToken.ts b/src/libs/actions/MapboxToken.ts index f795adf0df2b..4596e82a9354 100644 --- a/src/libs/actions/MapboxToken.ts +++ b/src/libs/actions/MapboxToken.ts @@ -1,11 +1,11 @@ import {isAfter} from 'date-fns'; -import Onyx from 'react-native-onyx'; import {AppState, NativeEventSubscription} from 'react-native'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as API from '../API'; -import CONST from '../../CONST'; -import * as ActiveClientManager from '../ActiveClientManager'; -import {MapboxAccessToken, Network} from '../../types/onyx'; +import Onyx from 'react-native-onyx'; +import * as ActiveClientManager from '@libs/ActiveClientManager'; +import * as API from '@libs/API'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {MapboxAccessToken, Network} from '@src/types/onyx'; let authToken: string | null; Onyx.connect({ diff --git a/src/libs/actions/MemoryOnlyKeys/MemoryOnlyKeys.js b/src/libs/actions/MemoryOnlyKeys/MemoryOnlyKeys.js index d46222189804..028bce225909 100644 --- a/src/libs/actions/MemoryOnlyKeys/MemoryOnlyKeys.js +++ b/src/libs/actions/MemoryOnlyKeys/MemoryOnlyKeys.js @@ -1,6 +1,6 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import Log from '../../Log'; +import Log from '@libs/Log'; +import ONYXKEYS from '@src/ONYXKEYS'; const memoryOnlyKeys = [ONYXKEYS.COLLECTION.REPORT, ONYXKEYS.COLLECTION.POLICY, ONYXKEYS.PERSONAL_DETAILS_LIST]; diff --git a/src/libs/actions/MemoryOnlyKeys/exposeGlobalMemoryOnlyKeysMethods/index.js b/src/libs/actions/MemoryOnlyKeys/exposeGlobalMemoryOnlyKeysMethods/index.js index fa62268753db..1d039c8980a9 100644 --- a/src/libs/actions/MemoryOnlyKeys/exposeGlobalMemoryOnlyKeysMethods/index.js +++ b/src/libs/actions/MemoryOnlyKeys/exposeGlobalMemoryOnlyKeysMethods/index.js @@ -1,4 +1,4 @@ -import * as MemoryOnlyKeys from '../MemoryOnlyKeys'; +import * as MemoryOnlyKeys from '@userActions/MemoryOnlyKeys/MemoryOnlyKeys'; const exposeGlobalMemoryOnlyKeysMethods = () => { window.enableMemoryOnlyKeys = () => { diff --git a/src/libs/actions/Modal.ts b/src/libs/actions/Modal.ts index ff09731f59a7..5114d5c1f42f 100644 --- a/src/libs/actions/Modal.ts +++ b/src/libs/actions/Modal.ts @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; let closeModal: (isNavigating: boolean) => void; let onModalClose: null | (() => void); diff --git a/src/libs/actions/Network.ts b/src/libs/actions/Network.ts index 212e44f6782d..17580c214376 100644 --- a/src/libs/actions/Network.ts +++ b/src/libs/actions/Network.ts @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; function setIsOffline(isOffline: boolean) { Onyx.merge(ONYXKEYS.NETWORK, {isOffline}); diff --git a/src/libs/actions/OnyxUpdateManager.js b/src/libs/actions/OnyxUpdateManager.js index b6318b784439..21cea452295b 100644 --- a/src/libs/actions/OnyxUpdateManager.js +++ b/src/libs/actions/OnyxUpdateManager.js @@ -1,11 +1,11 @@ import Onyx from 'react-native-onyx'; import _ from 'underscore'; -import ONYXKEYS from '../../ONYXKEYS'; -import Log from '../Log'; -import * as SequentialQueue from '../Network/SequentialQueue'; +import Log from '@libs/Log'; +import * as SequentialQueue from '@libs/Network/SequentialQueue'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as App from './App'; import * as OnyxUpdates from './OnyxUpdates'; -import CONST from '../../CONST'; // This file is in charge of looking at the updateIDs coming from the server and comparing them to the last updateID that the client has. // If the client is behind the server, then we need to diff --git a/src/libs/actions/OnyxUpdates.ts b/src/libs/actions/OnyxUpdates.ts index 39a20ae9362a..b44b485ac60f 100644 --- a/src/libs/actions/OnyxUpdates.ts +++ b/src/libs/actions/OnyxUpdates.ts @@ -1,11 +1,11 @@ import Onyx, {OnyxEntry} from 'react-native-onyx'; import {Merge} from 'type-fest'; -import PusherUtils from '../PusherUtils'; -import ONYXKEYS from '../../ONYXKEYS'; +import PusherUtils from '@libs/PusherUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {OnyxUpdateEvent, OnyxUpdatesFromServer, Request} from '@src/types/onyx'; +import Response from '@src/types/onyx/Response'; import * as QueuedOnyxUpdates from './QueuedOnyxUpdates'; -import CONST from '../../CONST'; -import {OnyxUpdatesFromServer, OnyxUpdateEvent, Request} from '../../types/onyx'; -import Response from '../../types/onyx/Response'; // This key needs to be separate from ONYXKEYS.ONYX_UPDATES_FROM_SERVER so that it can be updated without triggering the callback when the server IDs are updated. If that // callback were triggered it would lead to duplicate processing of server updates. diff --git a/src/libs/actions/PaymentMethods.ts b/src/libs/actions/PaymentMethods.ts index fe1b5ebe10e9..dc5b7b83aa8e 100644 --- a/src/libs/actions/PaymentMethods.ts +++ b/src/libs/actions/PaymentMethods.ts @@ -1,14 +1,14 @@ import {createRef} from 'react'; import Onyx, {OnyxUpdate} from 'react-native-onyx'; import {ValueOf} from 'type-fest'; -import ONYXKEYS, {OnyxValues} from '../../ONYXKEYS'; -import * as API from '../API'; -import CONST from '../../CONST'; -import Navigation from '../Navigation/Navigation'; -import * as CardUtils from '../CardUtils'; -import ROUTES from '../../ROUTES'; -import {FilterMethodPaymentType} from '../../types/onyx/WalletTransfer'; -import PaymentMethod from '../../types/onyx/PaymentMethod'; +import * as API from '@libs/API'; +import * as CardUtils from '@libs/CardUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import CONST from '@src/CONST'; +import ONYXKEYS, {OnyxValues} from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import PaymentMethod from '@src/types/onyx/PaymentMethod'; +import {FilterMethodPaymentType} from '@src/types/onyx/WalletTransfer'; type KYCWallRef = { continue?: () => void; diff --git a/src/libs/actions/PersistedRequests.ts b/src/libs/actions/PersistedRequests.ts index d9f4ed020109..c35de9ee94c4 100644 --- a/src/libs/actions/PersistedRequests.ts +++ b/src/libs/actions/PersistedRequests.ts @@ -1,7 +1,7 @@ -import Onyx from 'react-native-onyx'; import isEqual from 'lodash/isEqual'; -import ONYXKEYS from '../../ONYXKEYS'; -import {Request} from '../../types/onyx'; +import Onyx from 'react-native-onyx'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {Request} from '@src/types/onyx'; let persistedRequests: Request[] = []; diff --git a/src/libs/actions/PersonalDetails.js b/src/libs/actions/PersonalDetails.js index 69cf05b89b34..351943ca1f29 100644 --- a/src/libs/actions/PersonalDetails.js +++ b/src/libs/actions/PersonalDetails.js @@ -1,14 +1,14 @@ +import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; import Onyx from 'react-native-onyx'; -import Str from 'expensify-common/lib/str'; import _ from 'underscore'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import * as API from '../API'; -import * as UserUtils from '../UserUtils'; -import * as LocalePhoneNumber from '../LocalePhoneNumber'; -import ROUTES from '../../ROUTES'; -import Navigation from '../Navigation/Navigation'; +import * as API from '@libs/API'; +import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; +import Navigation from '@libs/Navigation/Navigation'; +import * as UserUtils from '@libs/UserUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; let currentUserEmail = ''; let currentUserAccountID; diff --git a/src/libs/actions/Plaid.ts b/src/libs/actions/Plaid.ts index 410a8c57d176..ab828eefeece 100644 --- a/src/libs/actions/Plaid.ts +++ b/src/libs/actions/Plaid.ts @@ -1,8 +1,8 @@ import Onyx from 'react-native-onyx'; -import getPlaidLinkTokenParameters from '../getPlaidLinkTokenParameters'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as API from '../API'; -import * as PlaidDataProps from '../../pages/ReimbursementAccount/plaidDataPropTypes'; +import * as API from '@libs/API'; +import getPlaidLinkTokenParameters from '@libs/getPlaidLinkTokenParameters'; +import * as PlaidDataProps from '@pages/ReimbursementAccount/plaidDataPropTypes'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * Gets the Plaid Link token used to initialize the Plaid SDK diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index 3ce0bc0df6ff..67352526baad 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -1,19 +1,19 @@ -import _ from 'underscore'; -import Onyx from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import lodashUnion from 'lodash/union'; import {PUBLIC_DOMAINS} from 'expensify-common/lib/CONST'; import Str from 'expensify-common/lib/str'; import {escapeRegExp} from 'lodash'; -import * as API from '../API'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import * as NumberUtils from '../NumberUtils'; -import * as OptionsListUtils from '../OptionsListUtils'; -import * as ErrorUtils from '../ErrorUtils'; -import * as ReportUtils from '../ReportUtils'; -import * as PersonalDetailsUtils from '../PersonalDetailsUtils'; -import Log from '../Log'; +import lodashGet from 'lodash/get'; +import lodashUnion from 'lodash/union'; +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; +import * as API from '@libs/API'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Log from '@libs/Log'; +import * as NumberUtils from '@libs/NumberUtils'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const allPolicies = {}; Onyx.connect({ diff --git a/src/libs/actions/PushNotification.js b/src/libs/actions/PushNotification.js index b9a75767d8f6..7abbd7b94ba0 100644 --- a/src/libs/actions/PushNotification.js +++ b/src/libs/actions/PushNotification.js @@ -1,6 +1,6 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as API from '../API'; +import * as API from '@libs/API'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as Device from './Device'; let isUserOptedInToPushNotifications = false; diff --git a/src/libs/actions/ReimbursementAccount/deleteFromBankAccountList.js b/src/libs/actions/ReimbursementAccount/deleteFromBankAccountList.js index b640d45683ec..6161066c1c69 100644 --- a/src/libs/actions/ReimbursementAccount/deleteFromBankAccountList.js +++ b/src/libs/actions/ReimbursementAccount/deleteFromBankAccountList.js @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as store from './store'; /** diff --git a/src/libs/actions/ReimbursementAccount/errors.js b/src/libs/actions/ReimbursementAccount/errors.js index 54d881cc4516..fd2eaf852bce 100644 --- a/src/libs/actions/ReimbursementAccount/errors.js +++ b/src/libs/actions/ReimbursementAccount/errors.js @@ -1,6 +1,6 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import * as ErrorUtils from '../../ErrorUtils'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * Set the current fields with errors. diff --git a/src/libs/actions/ReimbursementAccount/index.js b/src/libs/actions/ReimbursementAccount/index.js index 68774d0ba8b0..0404115f086b 100644 --- a/src/libs/actions/ReimbursementAccount/index.js +++ b/src/libs/actions/ReimbursementAccount/index.js @@ -1,7 +1,7 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import resetFreePlanBankAccount from './resetFreePlanBankAccount'; +import ONYXKEYS from '@src/ONYXKEYS'; import deleteFromBankAccountList from './deleteFromBankAccountList'; +import resetFreePlanBankAccount from './resetFreePlanBankAccount'; export {goToWithdrawalAccountSetupStep, navigateToBankAccountRoute} from './navigation'; export {setBankAccountFormValidationErrors, setPersonalBankAccountFormValidationErrorFields, resetReimbursementAccount, showBankAccountFormValidationError} from './errors'; diff --git a/src/libs/actions/ReimbursementAccount/navigation.js b/src/libs/actions/ReimbursementAccount/navigation.js index 1b75e6f16a58..ebc1862e9c74 100644 --- a/src/libs/actions/ReimbursementAccount/navigation.js +++ b/src/libs/actions/ReimbursementAccount/navigation.js @@ -1,7 +1,7 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import ROUTES from '../../../ROUTES'; -import Navigation from '../../Navigation/Navigation'; +import Navigation from '@libs/Navigation/Navigation'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; /** * Navigate to a specific step in the VBA flow diff --git a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js index 388010e99569..37122c107359 100644 --- a/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js +++ b/src/libs/actions/ReimbursementAccount/resetFreePlanBankAccount.js @@ -1,9 +1,9 @@ import Onyx from 'react-native-onyx'; -import CONST from '../../../CONST'; -import ONYXKEYS from '../../../ONYXKEYS'; -import * as API from '../../API'; -import * as PlaidDataProps from '../../../pages/ReimbursementAccount/plaidDataPropTypes'; -import * as ReimbursementAccountProps from '../../../pages/ReimbursementAccount/reimbursementAccountPropTypes'; +import * as API from '@libs/API'; +import * as PlaidDataProps from '@pages/ReimbursementAccount/plaidDataPropTypes'; +import * as ReimbursementAccountProps from '@pages/ReimbursementAccount/reimbursementAccountPropTypes'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * Reset user's reimbursement account. This will delete the bank account. diff --git a/src/libs/actions/ReimbursementAccount/store.js b/src/libs/actions/ReimbursementAccount/store.js index 422c0ffc43dd..4b8549b60b2e 100644 --- a/src/libs/actions/ReimbursementAccount/store.js +++ b/src/libs/actions/ReimbursementAccount/store.js @@ -1,8 +1,8 @@ -import Onyx from 'react-native-onyx'; import lodashGet from 'lodash/get'; +import Onyx from 'react-native-onyx'; import _ from 'underscore'; -import ONYXKEYS from '../../../ONYXKEYS'; -import BankAccount from '../../models/BankAccount'; +import BankAccount from '@libs/models/BankAccount'; +import ONYXKEYS from '@src/ONYXKEYS'; /** Reimbursement account actively being set up */ let reimbursementAccountInSetup = {}; diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 46994079d605..d7c02a8a1388 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1,33 +1,33 @@ -import {InteractionManager} from 'react-native'; -import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import lodashDebounce from 'lodash/debounce'; +import {format as timezoneFormat, utcToZonedTime} from 'date-fns-tz'; import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import Onyx from 'react-native-onyx'; import Str from 'expensify-common/lib/str'; -import {format as timezoneFormat, utcToZonedTime} from 'date-fns-tz'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as Pusher from '../Pusher/pusher'; -import LocalNotification from '../Notification/LocalNotification'; -import Navigation from '../Navigation/Navigation'; -import * as ActiveClientManager from '../ActiveClientManager'; -import Visibility from '../Visibility'; -import ROUTES from '../../ROUTES'; -import * as API from '../API'; -import CONFIG from '../../CONFIG'; -import CONST from '../../CONST'; -import Log from '../Log'; -import * as ReportUtils from '../ReportUtils'; -import DateUtils from '../DateUtils'; -import * as ReportActionsUtils from '../ReportActionsUtils'; -import * as CollectionUtils from '../CollectionUtils'; -import * as EmojiUtils from '../EmojiUtils'; -import * as ErrorUtils from '../ErrorUtils'; -import * as UserUtils from '../UserUtils'; -import * as Welcome from './Welcome'; -import * as PersonalDetailsUtils from '../PersonalDetailsUtils'; -import * as Environment from '../Environment/Environment'; +import lodashDebounce from 'lodash/debounce'; +import lodashGet from 'lodash/get'; +import {InteractionManager} from 'react-native'; +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; +import * as ActiveClientManager from '@libs/ActiveClientManager'; +import * as API from '@libs/API'; +import * as CollectionUtils from '@libs/CollectionUtils'; +import DateUtils from '@libs/DateUtils'; +import * as EmojiUtils from '@libs/EmojiUtils'; +import * as Environment from '@libs/Environment/Environment'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Log from '@libs/Log'; +import Navigation from '@libs/Navigation/Navigation'; +import LocalNotification from '@libs/Notification/LocalNotification'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; +import * as Pusher from '@libs/Pusher/pusher'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as UserUtils from '@libs/UserUtils'; +import Visibility from '@libs/Visibility'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import * as Session from './Session'; +import * as Welcome from './Welcome'; let currentUserAccountID; Onyx.connect({ diff --git a/src/libs/actions/ReportActions.ts b/src/libs/actions/ReportActions.ts index 3faa1dbe3574..b9cea498a3fa 100644 --- a/src/libs/actions/ReportActions.ts +++ b/src/libs/actions/ReportActions.ts @@ -1,9 +1,9 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import * as ReportActionUtils from '../ReportActionsUtils'; -import * as ReportUtils from '../ReportUtils'; -import ReportAction from '../../types/onyx/ReportAction'; +import * as ReportActionUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ReportAction from '@src/types/onyx/ReportAction'; function clearReportActionErrors(reportID: string, reportAction: ReportAction) { const originalReportID = ReportUtils.getOriginalReportID(reportID, reportAction); diff --git a/src/libs/actions/Session/index.ts b/src/libs/actions/Session/index.ts index 7015fa44da3a..74d2f609ab9b 100644 --- a/src/libs/actions/Session/index.ts +++ b/src/libs/actions/Session/index.ts @@ -1,30 +1,30 @@ -import Onyx, {OnyxUpdate} from 'react-native-onyx'; -import {Linking} from 'react-native'; -import {ValueOf} from 'type-fest'; import throttle from 'lodash/throttle'; -import {ChannelAuthorizationCallback} from 'pusher-js/with-encryption'; import {ChannelAuthorizationData} from 'pusher-js/types/src/core/auth/options'; +import {ChannelAuthorizationCallback} from 'pusher-js/with-encryption'; +import {Linking} from 'react-native'; +import Onyx, {OnyxUpdate} from 'react-native-onyx'; +import {ValueOf} from 'type-fest'; +import * as API from '@libs/API'; +import * as Authentication from '@libs/Authentication'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Log from '@libs/Log'; +import Navigation from '@libs/Navigation/Navigation'; +import * as NetworkStore from '@libs/Network/NetworkStore'; +import * as Pusher from '@libs/Pusher/pusher'; +import * as ReportUtils from '@libs/ReportUtils'; +import Timers from '@libs/Timers'; +import {hideContextMenu} from '@pages/home/report/ContextMenu/ReportActionContextMenu'; +import * as Device from '@userActions/Device'; +import redirectToSignIn from '@userActions/SignInRedirect'; +import Timing from '@userActions/Timing'; +import * as Welcome from '@userActions/Welcome'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import Credentials from '@src/types/onyx/Credentials'; +import {AutoAuthState} from '@src/types/onyx/Session'; import clearCache from './clearCache'; -import ONYXKEYS from '../../../ONYXKEYS'; -import redirectToSignIn from '../SignInRedirect'; -import CONFIG from '../../../CONFIG'; -import Log from '../../Log'; -import Timing from '../Timing'; -import CONST from '../../../CONST'; -import Timers from '../../Timers'; -import * as Pusher from '../../Pusher/pusher'; -import * as Authentication from '../../Authentication'; -import * as Welcome from '../Welcome'; -import * as API from '../../API'; -import * as NetworkStore from '../../Network/NetworkStore'; -import Navigation from '../../Navigation/Navigation'; -import * as Device from '../Device'; -import ROUTES from '../../../ROUTES'; -import * as ErrorUtils from '../../ErrorUtils'; -import * as ReportUtils from '../../ReportUtils'; -import {hideContextMenu} from '../../../pages/home/report/ContextMenu/ReportActionContextMenu'; -import Credentials from '../../../types/onyx/Credentials'; -import {AutoAuthState} from '../../../types/onyx/Session'; let sessionAuthTokenType: string | null = ''; let sessionAuthToken: string | null = null; diff --git a/src/libs/actions/Session/updateSessionAuthTokens.ts b/src/libs/actions/Session/updateSessionAuthTokens.ts index 9614face2070..6f90b60ef06d 100644 --- a/src/libs/actions/Session/updateSessionAuthTokens.ts +++ b/src/libs/actions/Session/updateSessionAuthTokens.ts @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; export default function updateSessionAuthTokens(authToken?: string, encryptedAuthToken?: string) { Onyx.merge(ONYXKEYS.SESSION, {authToken, encryptedAuthToken}); diff --git a/src/libs/actions/SignInRedirect.ts b/src/libs/actions/SignInRedirect.ts index 67f5f2d8586f..9ca4e6813567 100644 --- a/src/libs/actions/SignInRedirect.ts +++ b/src/libs/actions/SignInRedirect.ts @@ -1,14 +1,14 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS, {OnyxKey} from '../../ONYXKEYS'; -import * as MainQueue from '../Network/MainQueue'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import HttpUtils from '@libs/HttpUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import navigationRef from '@libs/Navigation/navigationRef'; +import * as MainQueue from '@libs/Network/MainQueue'; +import NetworkConnection from '@libs/NetworkConnection'; +import * as SessionUtils from '@libs/SessionUtils'; +import ONYXKEYS, {OnyxKey} from '@src/ONYXKEYS'; +import SCREENS from '@src/SCREENS'; import * as PersistedRequests from './PersistedRequests'; -import NetworkConnection from '../NetworkConnection'; -import HttpUtils from '../HttpUtils'; -import navigationRef from '../Navigation/navigationRef'; -import SCREENS from '../../SCREENS'; -import Navigation from '../Navigation/Navigation'; -import * as ErrorUtils from '../ErrorUtils'; -import * as SessionUtils from '../SessionUtils'; let currentIsOffline: boolean | undefined; let currentShouldForceOffline: boolean | undefined; diff --git a/src/libs/actions/Tab.ts b/src/libs/actions/Tab.ts index 7acd978d6b1a..a210cef36c73 100644 --- a/src/libs/actions/Tab.ts +++ b/src/libs/actions/Tab.ts @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * Sets the selected tab for a given tab ID diff --git a/src/libs/actions/Task.js b/src/libs/actions/Task.js index cc2b58f78b75..76396b1f31b8 100644 --- a/src/libs/actions/Task.js +++ b/src/libs/actions/Task.js @@ -1,20 +1,20 @@ -import Onyx from 'react-native-onyx'; import lodashGet from 'lodash/get'; +import Onyx from 'react-native-onyx'; import _ from 'underscore'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as API from '../API'; -import * as ReportUtils from '../ReportUtils'; -import Navigation from '../Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import CONST from '../../CONST'; -import DateUtils from '../DateUtils'; -import * as OptionsListUtils from '../OptionsListUtils'; -import * as UserUtils from '../UserUtils'; -import * as ErrorUtils from '../ErrorUtils'; -import * as ReportActionsUtils from '../ReportActionsUtils'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import * as LocalePhoneNumber from '../LocalePhoneNumber'; -import * as Localize from '../Localize'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as API from '@libs/API'; +import DateUtils from '@libs/DateUtils'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; +import * as Localize from '@libs/Localize'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as UserUtils from '@libs/UserUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; let currentUserEmail; let currentUserAccountID; diff --git a/src/libs/actions/TeachersUnite.js b/src/libs/actions/TeachersUnite.js index 39b9de8c6478..98b1f82629a4 100644 --- a/src/libs/actions/TeachersUnite.js +++ b/src/libs/actions/TeachersUnite.js @@ -1,12 +1,12 @@ -import _ from 'underscore'; -import Onyx from 'react-native-onyx'; import lodashGet from 'lodash/get'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as API from '../API'; -import Navigation from '../Navigation/Navigation'; -import CONST from '../../CONST'; -import * as ReportUtils from '../ReportUtils'; -import * as OptionsListUtils from '../OptionsListUtils'; +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; +import * as API from '@libs/API'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; let sessionEmail = ''; let sessionAccountID = 0; diff --git a/src/libs/actions/TestTool.ts b/src/libs/actions/TestTool.ts index 11de9498b7b0..dc7b371bfe12 100644 --- a/src/libs/actions/TestTool.ts +++ b/src/libs/actions/TestTool.ts @@ -1,7 +1,7 @@ import throttle from 'lodash/throttle'; import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; let isTestToolsModalOpen = false; Onyx.connect({ diff --git a/src/libs/actions/Timing.ts b/src/libs/actions/Timing.ts index 13f40bab87c9..0cef2fe4d2b8 100644 --- a/src/libs/actions/Timing.ts +++ b/src/libs/actions/Timing.ts @@ -1,8 +1,8 @@ -import getPlatform from '../getPlatform'; -import * as Environment from '../Environment/Environment'; -import Firebase from '../Firebase'; -import * as API from '../API'; -import Log from '../Log'; +import * as API from '@libs/API'; +import * as Environment from '@libs/Environment/Environment'; +import Firebase from '@libs/Firebase'; +import getPlatform from '@libs/getPlatform'; +import Log from '@libs/Log'; type TimestampData = { startTime: number; diff --git a/src/libs/actions/Transaction.ts b/src/libs/actions/Transaction.ts index 8a7f0f7bd533..a649267c0ae9 100644 --- a/src/libs/actions/Transaction.ts +++ b/src/libs/actions/Transaction.ts @@ -1,14 +1,14 @@ -import Onyx from 'react-native-onyx'; -import lodashHas from 'lodash/has'; -import lodashClone from 'lodash/clone'; import {isEqual} from 'lodash'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as CollectionUtils from '../CollectionUtils'; -import * as API from '../API'; -import CONST from '../../CONST'; -import {RecentWaypoint, Transaction} from '../../types/onyx'; -import {WaypointCollection} from '../../types/onyx/Transaction'; -import * as TransactionUtils from '../TransactionUtils'; +import lodashClone from 'lodash/clone'; +import lodashHas from 'lodash/has'; +import Onyx from 'react-native-onyx'; +import * as API from '@libs/API'; +import * as CollectionUtils from '@libs/CollectionUtils'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {RecentWaypoint, Transaction} from '@src/types/onyx'; +import {WaypointCollection} from '@src/types/onyx/Transaction'; let recentWaypoints: RecentWaypoint[] = []; Onyx.connect({ diff --git a/src/libs/actions/TransactionEdit.js b/src/libs/actions/TransactionEdit.js index 44b489b72c43..78a271f0f8cd 100644 --- a/src/libs/actions/TransactionEdit.js +++ b/src/libs/actions/TransactionEdit.js @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * Makes a backup copy of a transaction object that can be restored when the user cancels editing a transaction. diff --git a/src/libs/actions/TwoFactorAuthActions.ts b/src/libs/actions/TwoFactorAuthActions.ts index 0cec7d3c16c8..ccd4e2baf662 100644 --- a/src/libs/actions/TwoFactorAuthActions.ts +++ b/src/libs/actions/TwoFactorAuthActions.ts @@ -1,8 +1,8 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; -import Navigation from '../Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import {TwoFactorAuthStep} from '../../types/onyx/Account'; +import Navigation from '@libs/Navigation/Navigation'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {TwoFactorAuthStep} from '@src/types/onyx/Account'; /** * Clear 2FA data if the flow is interrupted without finishing diff --git a/src/libs/actions/User.js b/src/libs/actions/User.js index f65c20cd7e5b..f7375a5583a6 100644 --- a/src/libs/actions/User.js +++ b/src/libs/actions/User.js @@ -1,22 +1,22 @@ -import _ from 'underscore'; +import {isBefore} from 'date-fns'; import lodashGet from 'lodash/get'; import Onyx from 'react-native-onyx'; -import {isBefore} from 'date-fns'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as API from '../API'; -import CONST from '../../CONST'; -import Navigation from '../Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import * as Pusher from '../Pusher/pusher'; +import _ from 'underscore'; +import * as API from '@libs/API'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as SequentialQueue from '@libs/Network/SequentialQueue'; +import * as Pusher from '@libs/Pusher/pusher'; +import PusherUtils from '@libs/PusherUtils'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import * as Link from './Link'; -import * as SequentialQueue from '../Network/SequentialQueue'; -import PusherUtils from '../PusherUtils'; +import * as OnyxUpdates from './OnyxUpdates'; +import * as PersonalDetails from './PersonalDetails'; import * as Report from './Report'; -import * as ReportActionsUtils from '../ReportActionsUtils'; -import * as ErrorUtils from '../ErrorUtils'; import * as Session from './Session'; -import * as PersonalDetails from './PersonalDetails'; -import * as OnyxUpdates from './OnyxUpdates'; import redirectToSignIn from './SignInRedirect'; let currentUserAccountID = ''; diff --git a/src/libs/actions/Wallet.js b/src/libs/actions/Wallet.js index 9ef4b547d4b4..bfc2a7306434 100644 --- a/src/libs/actions/Wallet.js +++ b/src/libs/actions/Wallet.js @@ -1,6 +1,6 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as API from '../API'; +import * as API from '@libs/API'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * Fetch and save locally the Onfido SDK token and applicantID diff --git a/src/libs/actions/Welcome.ts b/src/libs/actions/Welcome.ts index 29e0088ed689..7fd7adeafa96 100644 --- a/src/libs/actions/Welcome.ts +++ b/src/libs/actions/Welcome.ts @@ -1,13 +1,13 @@ import Onyx, {OnyxCollection} from 'react-native-onyx'; -import Navigation from '../Navigation/Navigation'; -import * as ReportUtils from '../ReportUtils'; -import ROUTES from '../../ROUTES'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; +import OnyxPolicy from '@src/types/onyx/Policy'; +import Report from '@src/types/onyx/Report'; import * as Policy from './Policy'; -import ONYXKEYS from '../../ONYXKEYS'; -import SCREENS from '../../SCREENS'; -import CONST from '../../CONST'; -import Report from '../../types/onyx/Report'; -import OnyxPolicy from '../../types/onyx/Policy'; let resolveIsReadyPromise: (value?: Promise) => void | undefined; let isReadyPromise = new Promise((resolve) => { diff --git a/src/libs/addEncryptedAuthTokenToURL.ts b/src/libs/addEncryptedAuthTokenToURL.ts index 9bdb83c284ce..ea6f0bc6d34d 100644 --- a/src/libs/addEncryptedAuthTokenToURL.ts +++ b/src/libs/addEncryptedAuthTokenToURL.ts @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; let encryptedAuthToken = ''; Onyx.connect({ diff --git a/src/libs/calculateAnchorPosition.ts b/src/libs/calculateAnchorPosition.ts index 39fb3032ee09..8db4c053aba6 100644 --- a/src/libs/calculateAnchorPosition.ts +++ b/src/libs/calculateAnchorPosition.ts @@ -1,7 +1,7 @@ /* eslint-disable no-console */ -import {ValueOf} from 'type-fest'; import {View} from 'react-native'; -import CONST from '../CONST'; +import {ValueOf} from 'type-fest'; +import CONST from '@src/CONST'; type AnchorOrigin = { horizontal: ValueOf; diff --git a/src/libs/canFocusInputOnScreenFocus/index.ts b/src/libs/canFocusInputOnScreenFocus/index.ts index be500074d7e3..57baac02245d 100644 --- a/src/libs/canFocusInputOnScreenFocus/index.ts +++ b/src/libs/canFocusInputOnScreenFocus/index.ts @@ -1,4 +1,4 @@ -import * as DeviceCapabilities from '../DeviceCapabilities'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; import CanFocusInputOnScreenFocus from './types'; const canFocusInputOnScreenFocus: CanFocusInputOnScreenFocus = () => !DeviceCapabilities.canUseTouchScreen(); diff --git a/src/libs/convertToLTR/index.android.ts b/src/libs/convertToLTR/index.android.ts index 3a4755b1710f..d73fd3de7a21 100644 --- a/src/libs/convertToLTR/index.android.ts +++ b/src/libs/convertToLTR/index.android.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import ConvertToLTR from './types'; /** diff --git a/src/libs/convertToLTRForComposer/index.ts b/src/libs/convertToLTRForComposer/index.ts index 79c1eaed59a5..37015a755869 100644 --- a/src/libs/convertToLTRForComposer/index.ts +++ b/src/libs/convertToLTRForComposer/index.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import ConvertToLTRForComposer from './types'; function hasRTLCharacters(text: string): boolean { diff --git a/src/libs/fileDownload/FileUtils.js b/src/libs/fileDownload/FileUtils.js index ba06b80f7c43..fab014de302f 100644 --- a/src/libs/fileDownload/FileUtils.js +++ b/src/libs/fileDownload/FileUtils.js @@ -1,7 +1,7 @@ import {Alert, Linking, Platform} from 'react-native'; -import CONST from '../../CONST'; -import * as Localize from '../Localize'; -import DateUtils from '../DateUtils'; +import DateUtils from '@libs/DateUtils'; +import * as Localize from '@libs/Localize'; +import CONST from '@src/CONST'; /** * Show alert on successful attachment download diff --git a/src/libs/fileDownload/getAttachmentDetails.js b/src/libs/fileDownload/getAttachmentDetails.js index 72cbad115681..28b678ffb651 100644 --- a/src/libs/fileDownload/getAttachmentDetails.js +++ b/src/libs/fileDownload/getAttachmentDetails.js @@ -1,5 +1,5 @@ -import CONST from '../../CONST'; -import tryResolveUrlFromApiRoot from '../tryResolveUrlFromApiRoot'; +import tryResolveUrlFromApiRoot from '@libs/tryResolveUrlFromApiRoot'; +import CONST from '@src/CONST'; /** * Extract the thumbnail URL, source URL and the original filename from the HTML. diff --git a/src/libs/fileDownload/index.ios.js b/src/libs/fileDownload/index.ios.js index 95d92f1e3103..1599e919d28a 100644 --- a/src/libs/fileDownload/index.ios.js +++ b/src/libs/fileDownload/index.ios.js @@ -1,8 +1,8 @@ -import RNFetchBlob from 'react-native-blob-util'; import {CameraRoll} from '@react-native-camera-roll/camera-roll'; import lodashGet from 'lodash/get'; +import RNFetchBlob from 'react-native-blob-util'; +import CONST from '@src/CONST'; import * as FileUtils from './FileUtils'; -import CONST from '../../CONST'; /** * Downloads the file to Documents section in iOS diff --git a/src/libs/fileDownload/index.js b/src/libs/fileDownload/index.js index a775576eb365..0b86daf7141f 100644 --- a/src/libs/fileDownload/index.js +++ b/src/libs/fileDownload/index.js @@ -1,5 +1,5 @@ +import * as Link from '@userActions/Link'; import * as FileUtils from './FileUtils'; -import * as Link from '../actions/Link'; /** * Downloading attachment in web, desktop diff --git a/src/libs/focusAndUpdateMultilineInputRange.ts b/src/libs/focusAndUpdateMultilineInputRange.ts index 50c3703239df..92da790e383f 100644 --- a/src/libs/focusAndUpdateMultilineInputRange.ts +++ b/src/libs/focusAndUpdateMultilineInputRange.ts @@ -1,4 +1,5 @@ import {TextInput} from 'react-native'; + /** * Focus a multiline text input and place the cursor at the end of the value (if there is a value in the input). * diff --git a/src/libs/getButtonState.ts b/src/libs/getButtonState.ts index af7c4db6b4ec..6b89e1b7d383 100644 --- a/src/libs/getButtonState.ts +++ b/src/libs/getButtonState.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../CONST'; +import CONST from '@src/CONST'; type GetButtonState = (isActive: boolean, isPressed: boolean, isComplete: boolean, isDisabled: boolean, isInteractive: boolean) => ValueOf; diff --git a/src/libs/getModalState.js b/src/libs/getModalState.js index 12023a5bdc42..30ff8499809a 100644 --- a/src/libs/getModalState.js +++ b/src/libs/getModalState.js @@ -1,5 +1,5 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../ONYXKEYS'; +import ONYXKEYS from '@src/ONYXKEYS'; let modalState = {}; diff --git a/src/libs/getOperatingSystem/index.native.ts b/src/libs/getOperatingSystem/index.native.ts index 38b87f4983b7..f3e856cb14c9 100644 --- a/src/libs/getOperatingSystem/index.native.ts +++ b/src/libs/getOperatingSystem/index.native.ts @@ -1,5 +1,5 @@ import {Platform} from 'react-native'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import GetOperatingSystem from './types'; /** diff --git a/src/libs/getOperatingSystem/index.ts b/src/libs/getOperatingSystem/index.ts index 7adfa27c45fc..630595d97471 100644 --- a/src/libs/getOperatingSystem/index.ts +++ b/src/libs/getOperatingSystem/index.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import GetOperatingSystem from './types'; /** diff --git a/src/libs/getOperatingSystem/types.ts b/src/libs/getOperatingSystem/types.ts index 64bb103db083..a4b3046b4cd9 100644 --- a/src/libs/getOperatingSystem/types.ts +++ b/src/libs/getOperatingSystem/types.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; type OS = ValueOf | null; type GetOperatingSystem = () => OS; diff --git a/src/libs/getPermittedDecimalSeparator/index.js b/src/libs/getPermittedDecimalSeparator/index.js index 9ac4156bc3ff..03fa644fc327 100644 --- a/src/libs/getPermittedDecimalSeparator/index.js +++ b/src/libs/getPermittedDecimalSeparator/index.js @@ -1,6 +1,6 @@ -import getOperatingSystem from '../getOperatingSystem'; +import getOperatingSystem from '@libs/getOperatingSystem'; +import CONST from '@src/CONST'; import getPermittedDecimalSeparatorIOS from './index.ios'; -import CONST from '../../CONST'; export default (localizedSeparator) => { if (getOperatingSystem() === CONST.OS.IOS) { diff --git a/src/libs/getPlaidLinkTokenParameters/index.android.ts b/src/libs/getPlaidLinkTokenParameters/index.android.ts index 39d444abdba2..c7e2aa8efd1e 100644 --- a/src/libs/getPlaidLinkTokenParameters/index.android.ts +++ b/src/libs/getPlaidLinkTokenParameters/index.android.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import GetPlaidLinkTokenParameters from './types'; const getPlaidLinkTokenParameters: GetPlaidLinkTokenParameters = () => ({ diff --git a/src/libs/getPlaidLinkTokenParameters/index.ios.ts b/src/libs/getPlaidLinkTokenParameters/index.ios.ts index 330efad4839a..8c69ddc71bb2 100644 --- a/src/libs/getPlaidLinkTokenParameters/index.ios.ts +++ b/src/libs/getPlaidLinkTokenParameters/index.ios.ts @@ -1,4 +1,4 @@ -import CONFIG from '../../CONFIG'; +import CONFIG from '@src/CONFIG'; import GetPlaidLinkTokenParameters from './types'; const getPlaidLinkTokenParameters: GetPlaidLinkTokenParameters = () => ({ diff --git a/src/libs/getPlaidLinkTokenParameters/index.ts b/src/libs/getPlaidLinkTokenParameters/index.ts index e47629e85d09..570951e3d683 100644 --- a/src/libs/getPlaidLinkTokenParameters/index.ts +++ b/src/libs/getPlaidLinkTokenParameters/index.ts @@ -1,5 +1,5 @@ -import ROUTES from '../../ROUTES'; -import CONFIG from '../../CONFIG'; +import CONFIG from '@src/CONFIG'; +import ROUTES from '@src/ROUTES'; import GetPlaidLinkTokenParameters from './types'; const getPlaidLinkTokenParameters: GetPlaidLinkTokenParameters = () => { diff --git a/src/libs/getPlatform/index.android.ts b/src/libs/getPlatform/index.android.ts index 14ed65ace19d..a0f4edb055af 100644 --- a/src/libs/getPlatform/index.android.ts +++ b/src/libs/getPlatform/index.android.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import Platform from './types'; export default function getPlatform(): Platform { diff --git a/src/libs/getPlatform/index.desktop.ts b/src/libs/getPlatform/index.desktop.ts index c9f5720c541d..0b90b5f121bb 100644 --- a/src/libs/getPlatform/index.desktop.ts +++ b/src/libs/getPlatform/index.desktop.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import Platform from './types'; export default function getPlatform(): Platform { diff --git a/src/libs/getPlatform/index.ios.ts b/src/libs/getPlatform/index.ios.ts index 8c21189b92e7..ee35c8b610bc 100644 --- a/src/libs/getPlatform/index.ios.ts +++ b/src/libs/getPlatform/index.ios.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import Platform from './types'; export default function getPlatform(): Platform { diff --git a/src/libs/getPlatform/index.ts b/src/libs/getPlatform/index.ts index c53963f5b80f..ca87e79170f5 100644 --- a/src/libs/getPlatform/index.ts +++ b/src/libs/getPlatform/index.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import Platform from './types'; export default function getPlatform(): Platform { diff --git a/src/libs/getPlatform/types.ts b/src/libs/getPlatform/types.ts index ceddb4e17224..9c43c696a6f8 100644 --- a/src/libs/getPlatform/types.ts +++ b/src/libs/getPlatform/types.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; type Platform = ValueOf; diff --git a/src/libs/getSecureEntryKeyboardType/index.android.ts b/src/libs/getSecureEntryKeyboardType/index.android.ts index afd808f35b10..bc50e202381b 100644 --- a/src/libs/getSecureEntryKeyboardType/index.android.ts +++ b/src/libs/getSecureEntryKeyboardType/index.android.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import GetSecureEntryKeyboardType from './types'; /** diff --git a/src/libs/isReportMessageAttachment.ts b/src/libs/isReportMessageAttachment.ts index 8d1112261d1f..097f46465dc9 100644 --- a/src/libs/isReportMessageAttachment.ts +++ b/src/libs/isReportMessageAttachment.ts @@ -1,5 +1,5 @@ -import CONST from '../CONST'; -import {Message} from '../types/onyx/ReportAction'; +import CONST from '@src/CONST'; +import {Message} from '@src/types/onyx/ReportAction'; /** * Check whether a report action is Attachment or not. diff --git a/src/libs/localFileDownload/index.android.ts b/src/libs/localFileDownload/index.android.ts index ad13b5c5cfa7..4de6cbd0e940 100644 --- a/src/libs/localFileDownload/index.android.ts +++ b/src/libs/localFileDownload/index.android.ts @@ -1,5 +1,5 @@ import RNFetchBlob from 'react-native-blob-util'; -import * as FileUtils from '../fileDownload/FileUtils'; +import * as FileUtils from '@libs/fileDownload/FileUtils'; import LocalFileDownload from './types'; /** diff --git a/src/libs/localFileDownload/index.ios.ts b/src/libs/localFileDownload/index.ios.ts index 3597ea5f6d3c..5461c6ffc4c4 100644 --- a/src/libs/localFileDownload/index.ios.ts +++ b/src/libs/localFileDownload/index.ios.ts @@ -1,6 +1,6 @@ import {Share} from 'react-native'; import RNFetchBlob from 'react-native-blob-util'; -import * as FileUtils from '../fileDownload/FileUtils'; +import * as FileUtils from '@libs/fileDownload/FileUtils'; import LocalFileDownload from './types'; /** diff --git a/src/libs/localFileDownload/index.ts b/src/libs/localFileDownload/index.ts index 7b9b4973d5c1..2a70a01f88c0 100644 --- a/src/libs/localFileDownload/index.ts +++ b/src/libs/localFileDownload/index.ts @@ -1,4 +1,4 @@ -import * as FileUtils from '../fileDownload/FileUtils'; +import * as FileUtils from '@libs/fileDownload/FileUtils'; import LocalFileDownload from './types'; /** diff --git a/src/libs/migrateOnyx.js b/src/libs/migrateOnyx.js index 2ac9f0d92d91..b65670819418 100644 --- a/src/libs/migrateOnyx.js +++ b/src/libs/migrateOnyx.js @@ -1,8 +1,8 @@ import _ from 'underscore'; import Log from './Log'; +import KeyReportActionsDraftByReportActionID from './migrations/KeyReportActionsDraftByReportActionID'; import PersonalDetailsByAccountID from './migrations/PersonalDetailsByAccountID'; import RenameReceiptFilename from './migrations/RenameReceiptFilename'; -import KeyReportActionsDraftByReportActionID from './migrations/KeyReportActionsDraftByReportActionID'; export default function () { const startTime = Date.now(); diff --git a/src/libs/migrations/CheckForPreviousReportActionID.js b/src/libs/migrations/CheckForPreviousReportActionID.js index a61d9bfb08ec..35f862fd5b3a 100644 --- a/src/libs/migrations/CheckForPreviousReportActionID.js +++ b/src/libs/migrations/CheckForPreviousReportActionID.js @@ -1,7 +1,7 @@ -import _ from 'underscore'; import Onyx from 'react-native-onyx'; -import Log from '../Log'; -import ONYXKEYS from '../../ONYXKEYS'; +import _ from 'underscore'; +import Log from '@libs/Log'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * @returns {Promise} diff --git a/src/libs/migrations/KeyReportActionsDraftByReportActionID.js b/src/libs/migrations/KeyReportActionsDraftByReportActionID.js index 63282b8743dc..e4b3ebd060f3 100644 --- a/src/libs/migrations/KeyReportActionsDraftByReportActionID.js +++ b/src/libs/migrations/KeyReportActionsDraftByReportActionID.js @@ -1,7 +1,7 @@ -import _ from 'underscore'; import Onyx from 'react-native-onyx'; -import Log from '../Log'; -import ONYXKEYS from '../../ONYXKEYS'; +import _ from 'underscore'; +import Log from '@libs/Log'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * This migration updates reportActionsDrafts data to be keyed by reportActionID. diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index cf421702fd7a..38c992a6a375 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -1,8 +1,8 @@ -import _ from 'underscore'; import lodashHas from 'lodash/has'; import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; -import Log from '../Log'; +import _ from 'underscore'; +import Log from '@libs/Log'; +import ONYXKEYS from '@src/ONYXKEYS'; const DEPRECATED_ONYX_KEYS = { // Deprecated personal details object which was keyed by login instead of accountID. diff --git a/src/libs/migrations/RenameReceiptFilename.js b/src/libs/migrations/RenameReceiptFilename.js index b8df705fd7d1..2fcd9662a993 100644 --- a/src/libs/migrations/RenameReceiptFilename.js +++ b/src/libs/migrations/RenameReceiptFilename.js @@ -1,8 +1,8 @@ +import lodashHas from 'lodash/has'; import Onyx from 'react-native-onyx'; import _ from 'underscore'; -import lodashHas from 'lodash/has'; -import ONYXKEYS from '../../ONYXKEYS'; -import Log from '../Log'; +import Log from '@libs/Log'; +import ONYXKEYS from '@src/ONYXKEYS'; // This migration changes the property name on a transaction from receiptFilename to filename so that it matches what is stored in the database export default function () { diff --git a/src/libs/models/BankAccount.js b/src/libs/models/BankAccount.js index faf4cbad34e5..c4366a48aa6a 100644 --- a/src/libs/models/BankAccount.js +++ b/src/libs/models/BankAccount.js @@ -1,8 +1,8 @@ -import _ from 'underscore'; import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; import lodashHas from 'lodash/has'; -import CONST from '../../CONST'; +import _ from 'underscore'; +import CONST from '@src/CONST'; class BankAccount { static STATE = { diff --git a/src/libs/onyxSubscribe.ts b/src/libs/onyxSubscribe.ts index 469a7b810b1f..5e3213cdcf95 100644 --- a/src/libs/onyxSubscribe.ts +++ b/src/libs/onyxSubscribe.ts @@ -1,5 +1,5 @@ import Onyx, {ConnectOptions} from 'react-native-onyx'; -import {OnyxKey} from '../ONYXKEYS'; +import {OnyxKey} from '@src/ONYXKEYS'; /** * Connect to onyx data. Same params as Onyx.connect(), but returns a function to unsubscribe. diff --git a/src/libs/setShouldShowComposeInputKeyboardAware/index.native.ts b/src/libs/setShouldShowComposeInputKeyboardAware/index.native.ts index f5d690db644d..dbfa0c6977b3 100644 --- a/src/libs/setShouldShowComposeInputKeyboardAware/index.native.ts +++ b/src/libs/setShouldShowComposeInputKeyboardAware/index.native.ts @@ -1,5 +1,5 @@ import {EmitterSubscription, Keyboard} from 'react-native'; -import * as Composer from '../actions/Composer'; +import * as Composer from '@userActions/Composer'; import SetShouldShowComposeInputKeyboardAware from './types'; let keyboardDidHideListener: EmitterSubscription | null = null; diff --git a/src/libs/setShouldShowComposeInputKeyboardAware/index.ts b/src/libs/setShouldShowComposeInputKeyboardAware/index.ts index 5ee36834ad5c..a6217fcd761b 100644 --- a/src/libs/setShouldShowComposeInputKeyboardAware/index.ts +++ b/src/libs/setShouldShowComposeInputKeyboardAware/index.ts @@ -1,4 +1,4 @@ -import * as Composer from '../actions/Composer'; +import * as Composer from '@userActions/Composer'; import SetShouldShowComposeInputKeyboardAware from './types'; const setShouldShowComposeInputKeyboardAware: SetShouldShowComposeInputKeyboardAware = (shouldShow) => { diff --git a/src/libs/tryResolveUrlFromApiRoot.ts b/src/libs/tryResolveUrlFromApiRoot.ts index 6bfb5473271e..1aa102323a06 100644 --- a/src/libs/tryResolveUrlFromApiRoot.ts +++ b/src/libs/tryResolveUrlFromApiRoot.ts @@ -1,5 +1,5 @@ -import Config from '../CONFIG'; -import {Request} from '../types/onyx'; +import Config from '@src/CONFIG'; +import {Request} from '@src/types/onyx'; import * as ApiUtils from './ApiUtils'; // Absolute URLs (`/` or `//`) should be resolved from API ROOT diff --git a/src/pages/AddPersonalBankAccountPage.js b/src/pages/AddPersonalBankAccountPage.js index 3e7b2ef214e0..3b802459c98a 100644 --- a/src/pages/AddPersonalBankAccountPage.js +++ b/src/pages/AddPersonalBankAccountPage.js @@ -1,22 +1,22 @@ -import _ from 'underscore'; -import React, {useCallback, useEffect, useState} from 'react'; -import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import ScreenWrapper from '../components/ScreenWrapper'; -import Navigation from '../libs/Navigation/Navigation'; -import * as BankAccounts from '../libs/actions/BankAccounts'; -import AddPlaidBankAccount from '../components/AddPlaidBankAccount'; -import getPlaidOAuthReceivedRedirectURI from '../libs/getPlaidOAuthReceivedRedirectURI'; -import ONYXKEYS from '../ONYXKEYS'; -import styles from '../styles/styles'; -import Form from '../components/Form'; -import ROUTES from '../ROUTES'; +import React, {useCallback, useEffect, useState} from 'react'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import AddPlaidBankAccount from '@components/AddPlaidBankAccount'; +import ConfirmationPage from '@components/ConfirmationPage'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useLocalize from '@hooks/useLocalize'; +import getPlaidOAuthReceivedRedirectURI from '@libs/getPlaidOAuthReceivedRedirectURI'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import * as PlaidDataProps from './ReimbursementAccount/plaidDataPropTypes'; -import ConfirmationPage from '../components/ConfirmationPage'; -import * as PaymentMethods from '../libs/actions/PaymentMethods'; -import useLocalize from '../hooks/useLocalize'; const propTypes = { /** Contains plaid data */ diff --git a/src/pages/ConciergePage.js b/src/pages/ConciergePage.js index cfd452f0c952..841ce524b2cb 100644 --- a/src/pages/ConciergePage.js +++ b/src/pages/ConciergePage.js @@ -1,13 +1,13 @@ -import _ from 'underscore'; -import React from 'react'; +import {useFocusEffect} from '@react-navigation/native'; import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import {useFocusEffect} from '@react-navigation/native'; -import ONYXKEYS from '../ONYXKEYS'; -import FullScreenLoadingIndicator from '../components/FullscreenLoadingIndicator'; -import Navigation from '../libs/Navigation/Navigation'; -import * as Report from '../libs/actions/Report'; -import ROUTES from '../ROUTES'; +import _ from 'underscore'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import Navigation from '@libs/Navigation/Navigation'; +import * as Report from '@userActions/Report'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Session info for the currently logged in user. */ diff --git a/src/pages/DemoSetupPage.js b/src/pages/DemoSetupPage.js index 5432bea0c806..9cf0f91906c9 100644 --- a/src/pages/DemoSetupPage.js +++ b/src/pages/DemoSetupPage.js @@ -1,11 +1,11 @@ -import React, {useCallback} from 'react'; -import PropTypes from 'prop-types'; import {useFocusEffect} from '@react-navigation/native'; -import FullScreenLoadingIndicator from '../components/FullscreenLoadingIndicator'; -import Navigation from '../libs/Navigation/Navigation'; -import ROUTES from '../ROUTES'; -import CONST from '../CONST'; -import * as DemoActions from '../libs/actions/DemoActions'; +import PropTypes from 'prop-types'; +import React, {useCallback} from 'react'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import Navigation from '@libs/Navigation/Navigation'; +import * as DemoActions from '@userActions/DemoActions'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Navigation route context info provided by react navigation */ diff --git a/src/pages/DetailsPage.js b/src/pages/DetailsPage.js index 090e6205e925..7f01256cc024 100755 --- a/src/pages/DetailsPage.js +++ b/src/pages/DetailsPage.js @@ -1,33 +1,33 @@ -import React from 'react'; -import {View, ScrollView} from 'react-native'; -import PropTypes from 'prop-types'; -import _ from 'underscore'; -import {withOnyx} from 'react-native-onyx'; +import {parsePhoneNumber} from 'awesome-phonenumber'; import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; -import {parsePhoneNumber} from 'awesome-phonenumber'; -import styles from '../styles/styles'; -import Text from '../components/Text'; -import ONYXKEYS from '../ONYXKEYS'; -import Avatar from '../components/Avatar'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import ScreenWrapper from '../components/ScreenWrapper'; +import PropTypes from 'prop-types'; +import React from 'react'; +import {ScrollView, View} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import AttachmentModal from '@components/AttachmentModal'; +import AutoUpdateTime from '@components/AutoUpdateTime'; +import Avatar from '@components/Avatar'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import CommunicationsLink from '@components/CommunicationsLink'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import PressableWithoutFocus from '@components/Pressable/PressableWithoutFocus'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import UserDetailsTooltip from '@components/UserDetailsTooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as UserUtils from '@libs/UserUtils'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import personalDetailsPropType from './personalDetailsPropType'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; -import compose from '../libs/compose'; -import CommunicationsLink from '../components/CommunicationsLink'; -import UserDetailsTooltip from '../components/UserDetailsTooltip'; -import CONST from '../CONST'; -import * as ReportUtils from '../libs/ReportUtils'; -import * as Expensicons from '../components/Icon/Expensicons'; -import MenuItem from '../components/MenuItem'; -import AttachmentModal from '../components/AttachmentModal'; -import PressableWithoutFocus from '../components/Pressable/PressableWithoutFocus'; -import * as Report from '../libs/actions/Report'; -import OfflineWithFeedback from '../components/OfflineWithFeedback'; -import AutoUpdateTime from '../components/AutoUpdateTime'; -import FullPageNotFoundView from '../components/BlockingViews/FullPageNotFoundView'; -import * as UserUtils from '../libs/UserUtils'; const matchType = PropTypes.shape({ params: PropTypes.shape({ diff --git a/src/pages/EditRequestAmountPage.js b/src/pages/EditRequestAmountPage.js index d65fdafb3b59..b986989a81dc 100644 --- a/src/pages/EditRequestAmountPage.js +++ b/src/pages/EditRequestAmountPage.js @@ -1,10 +1,10 @@ -import React, {useCallback, useRef} from 'react'; import {useFocusEffect} from '@react-navigation/native'; import PropTypes from 'prop-types'; -import CONST from '../CONST'; -import useLocalize from '../hooks/useLocalize'; -import ScreenWrapper from '../components/ScreenWrapper'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; +import React, {useCallback, useRef} from 'react'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useLocalize from '@hooks/useLocalize'; +import CONST from '@src/CONST'; import MoneyRequestAmountForm from './iou/steps/MoneyRequestAmountForm'; const propTypes = { diff --git a/src/pages/EditRequestCategoryPage.js b/src/pages/EditRequestCategoryPage.js index c0db5a16b140..b3eacbe1abad 100644 --- a/src/pages/EditRequestCategoryPage.js +++ b/src/pages/EditRequestCategoryPage.js @@ -1,12 +1,12 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import ScreenWrapper from '../components/ScreenWrapper'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import Navigation from '../libs/Navigation/Navigation'; -import useLocalize from '../hooks/useLocalize'; -import styles from '../styles/styles'; -import Text from '../components/Text'; -import CategoryPicker from '../components/CategoryPicker'; +import React from 'react'; +import CategoryPicker from '@components/CategoryPicker'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; const propTypes = { /** Transaction default category value */ diff --git a/src/pages/EditRequestCreatedPage.js b/src/pages/EditRequestCreatedPage.js index d326e9115afc..5bf421f1d6b0 100644 --- a/src/pages/EditRequestCreatedPage.js +++ b/src/pages/EditRequestCreatedPage.js @@ -1,12 +1,12 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import ScreenWrapper from '../components/ScreenWrapper'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import ONYXKEYS from '../ONYXKEYS'; -import styles from '../styles/styles'; -import useLocalize from '../hooks/useLocalize'; -import NewDatePicker from '../components/NewDatePicker'; -import FormProvider from '../components/Form/FormProvider'; +import React from 'react'; +import FormProvider from '@components/Form/FormProvider'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import NewDatePicker from '@components/NewDatePicker'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Transaction defailt created value */ diff --git a/src/pages/EditRequestDescriptionPage.js b/src/pages/EditRequestDescriptionPage.js index 0c0fcad7f60b..6bbe1aa3a4e8 100644 --- a/src/pages/EditRequestDescriptionPage.js +++ b/src/pages/EditRequestDescriptionPage.js @@ -1,17 +1,17 @@ -import React, {useRef, useCallback} from 'react'; -import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {useFocusEffect} from '@react-navigation/native'; -import TextInput from '../components/TextInput'; -import ScreenWrapper from '../components/ScreenWrapper'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import Form from '../components/Form'; -import ONYXKEYS from '../ONYXKEYS'; -import styles from '../styles/styles'; -import CONST from '../CONST'; -import useLocalize from '../hooks/useLocalize'; -import * as Browser from '../libs/Browser'; -import updateMultilineInputRange from '../libs/UpdateMultilineInputRange'; +import PropTypes from 'prop-types'; +import React, {useCallback, useRef} from 'react'; +import {View} from 'react-native'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TextInput from '@components/TextInput'; +import useLocalize from '@hooks/useLocalize'; +import * as Browser from '@libs/Browser'; +import updateMultilineInputRange from '@libs/UpdateMultilineInputRange'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Transaction default description value */ diff --git a/src/pages/EditRequestDistancePage.js b/src/pages/EditRequestDistancePage.js index 4eb7340dd410..0fca8aee4be9 100644 --- a/src/pages/EditRequestDistancePage.js +++ b/src/pages/EditRequestDistancePage.js @@ -1,21 +1,21 @@ -import React, {useEffect, useRef} from 'react'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; -import _ from 'underscore'; +import React, {useEffect, useRef} from 'react'; import {withOnyx} from 'react-native-onyx'; -import ONYXKEYS from '../ONYXKEYS'; -import CONST from '../CONST'; -import ScreenWrapper from '../components/ScreenWrapper'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import Navigation from '../libs/Navigation/Navigation'; -import useLocalize from '../hooks/useLocalize'; -import DistanceRequest from '../components/DistanceRequest'; +import _ from 'underscore'; +import DistanceRequest from '@components/DistanceRequest'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import transactionPropTypes from '@components/transactionPropTypes'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import usePrevious from '@hooks/usePrevious'; +import Navigation from '@libs/Navigation/Navigation'; +import * as IOU from '@userActions/IOU'; +import * as TransactionEdit from '@userActions/TransactionEdit'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import reportPropTypes from './reportPropTypes'; -import * as IOU from '../libs/actions/IOU'; -import transactionPropTypes from '../components/transactionPropTypes'; -import * as TransactionEdit from '../libs/actions/TransactionEdit'; -import useNetwork from '../hooks/useNetwork'; -import usePrevious from '../hooks/usePrevious'; const propTypes = { /** The transactionID we're currently editing */ diff --git a/src/pages/EditRequestMerchantPage.js b/src/pages/EditRequestMerchantPage.js index 7e15a88a3ab4..e64fd121b4ff 100644 --- a/src/pages/EditRequestMerchantPage.js +++ b/src/pages/EditRequestMerchantPage.js @@ -1,15 +1,15 @@ +import PropTypes from 'prop-types'; import React, {useCallback, useRef} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import TextInput from '../components/TextInput'; -import ScreenWrapper from '../components/ScreenWrapper'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import Form from '../components/Form'; -import ONYXKEYS from '../ONYXKEYS'; -import styles from '../styles/styles'; -import CONST from '../CONST'; -import useLocalize from '../hooks/useLocalize'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TextInput from '@components/TextInput'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Transaction default merchant value */ diff --git a/src/pages/EditRequestPage.js b/src/pages/EditRequestPage.js index eedd5bcd10d4..302b7d35a1c9 100644 --- a/src/pages/EditRequestPage.js +++ b/src/pages/EditRequestPage.js @@ -1,35 +1,35 @@ -import React, {useEffect, useMemo} from 'react'; -import PropTypes from 'prop-types'; import lodashGet from 'lodash/get'; import lodashValues from 'lodash/values'; +import PropTypes from 'prop-types'; +import React, {useEffect, useMemo} from 'react'; import {withOnyx} from 'react-native-onyx'; -import CONST from '../CONST'; -import ONYXKEYS from '../ONYXKEYS'; -import ROUTES from '../ROUTES'; -import compose from '../libs/compose'; -import Navigation from '../libs/Navigation/Navigation'; -import * as ReportUtils from '../libs/ReportUtils'; -import * as PolicyUtils from '../libs/PolicyUtils'; -import * as TransactionUtils from '../libs/TransactionUtils'; -import * as IOU from '../libs/actions/IOU'; -import * as CurrencyUtils from '../libs/CurrencyUtils'; -import * as OptionsListUtils from '../libs/OptionsListUtils'; -import Permissions from '../libs/Permissions'; -import tagPropTypes from '../components/tagPropTypes'; -import FullPageNotFoundView from '../components/BlockingViews/FullPageNotFoundView'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import categoryPropTypes from '@components/categoryPropTypes'; +import ScreenWrapper from '@components/ScreenWrapper'; +import tagPropTypes from '@components/tagPropTypes'; +import transactionPropTypes from '@components/transactionPropTypes'; +import compose from '@libs/compose'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import Permissions from '@libs/Permissions'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import EditRequestAmountPage from './EditRequestAmountPage'; +import EditRequestCategoryPage from './EditRequestCategoryPage'; +import EditRequestCreatedPage from './EditRequestCreatedPage'; import EditRequestDescriptionPage from './EditRequestDescriptionPage'; +import EditRequestDistancePage from './EditRequestDistancePage'; import EditRequestMerchantPage from './EditRequestMerchantPage'; -import EditRequestCreatedPage from './EditRequestCreatedPage'; -import EditRequestAmountPage from './EditRequestAmountPage'; import EditRequestReceiptPage from './EditRequestReceiptPage'; -import reportPropTypes from './reportPropTypes'; -import EditRequestDistancePage from './EditRequestDistancePage'; -import EditRequestCategoryPage from './EditRequestCategoryPage'; import EditRequestTagPage from './EditRequestTagPage'; -import categoryPropTypes from '../components/categoryPropTypes'; -import ScreenWrapper from '../components/ScreenWrapper'; import reportActionPropTypes from './home/report/reportActionPropTypes'; -import transactionPropTypes from '../components/transactionPropTypes'; +import reportPropTypes from './reportPropTypes'; const propTypes = { /** Route from navigation */ diff --git a/src/pages/EditRequestReceiptPage.js b/src/pages/EditRequestReceiptPage.js index 54ed5a8897a4..9c9daf7c899a 100644 --- a/src/pages/EditRequestReceiptPage.js +++ b/src/pages/EditRequestReceiptPage.js @@ -1,13 +1,13 @@ -import React, {useState} from 'react'; import PropTypes from 'prop-types'; +import React, {useState} from 'react'; import {View} from 'react-native'; -import ScreenWrapper from '../components/ScreenWrapper'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import Navigation from '../libs/Navigation/Navigation'; -import useLocalize from '../hooks/useLocalize'; +import DragAndDropProvider from '@components/DragAndDrop/Provider'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; import ReceiptSelector from './iou/ReceiptSelector'; -import DragAndDropProvider from '../components/DragAndDrop/Provider'; -import styles from '../styles/styles'; const propTypes = { /** React Navigation route */ diff --git a/src/pages/EditRequestTagPage.js b/src/pages/EditRequestTagPage.js index c5ae18f1376c..819a026dc9aa 100644 --- a/src/pages/EditRequestTagPage.js +++ b/src/pages/EditRequestTagPage.js @@ -1,12 +1,12 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import Navigation from '../libs/Navigation/Navigation'; -import useLocalize from '../hooks/useLocalize'; -import ScreenWrapper from '../components/ScreenWrapper'; -import Text from '../components/Text'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import styles from '../styles/styles'; -import TagPicker from '../components/TagPicker'; +import React from 'react'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TagPicker from '@components/TagPicker'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; const propTypes = { /** Transaction default tag value */ diff --git a/src/pages/EditSplitBillPage.js b/src/pages/EditSplitBillPage.js index d10803cd40ea..1342d9297d3e 100644 --- a/src/pages/EditSplitBillPage.js +++ b/src/pages/EditSplitBillPage.js @@ -1,21 +1,21 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import CONST from '../CONST'; -import ROUTES from '../ROUTES'; -import ONYXKEYS from '../ONYXKEYS'; -import compose from '../libs/compose'; -import transactionPropTypes from '../components/transactionPropTypes'; -import * as ReportUtils from '../libs/ReportUtils'; -import * as IOU from '../libs/actions/IOU'; -import * as CurrencyUtils from '../libs/CurrencyUtils'; -import Navigation from '../libs/Navigation/Navigation'; -import FullPageNotFoundView from '../components/BlockingViews/FullPageNotFoundView'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import transactionPropTypes from '@components/transactionPropTypes'; +import compose from '@libs/compose'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import EditRequestAmountPage from './EditRequestAmountPage'; +import EditRequestCreatedPage from './EditRequestCreatedPage'; import EditRequestDescriptionPage from './EditRequestDescriptionPage'; import EditRequestMerchantPage from './EditRequestMerchantPage'; -import EditRequestCreatedPage from './EditRequestCreatedPage'; -import EditRequestAmountPage from './EditRequestAmountPage'; const propTypes = { /** Route from navigation */ diff --git a/src/pages/EnablePayments/ActivateStep.js b/src/pages/EnablePayments/ActivateStep.js index 2badb5595f3b..30e775a0f932 100644 --- a/src/pages/EnablePayments/ActivateStep.js +++ b/src/pages/EnablePayments/ActivateStep.js @@ -1,16 +1,16 @@ -import _ from 'underscore'; import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import * as LottieAnimations from '../../components/LottieAnimations'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; +import _ from 'underscore'; +import ConfirmationPage from '@components/ConfirmationPage'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as LottieAnimations from '@components/LottieAnimations'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import userWalletPropTypes from './userWalletPropTypes'; -import CONST from '../../CONST'; -import * as PaymentMethods from '../../libs/actions/PaymentMethods'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; import walletTermsPropTypes from './walletTermsPropTypes'; -import ConfirmationPage from '../../components/ConfirmationPage'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/EnablePayments/AdditionalDetailsStep.js b/src/pages/EnablePayments/AdditionalDetailsStep.js index 13091ab3f845..f1813062d0d7 100644 --- a/src/pages/EnablePayments/AdditionalDetailsStep.js +++ b/src/pages/EnablePayments/AdditionalDetailsStep.js @@ -1,28 +1,28 @@ -import _ from 'underscore'; -import React from 'react'; +import {parsePhoneNumber} from 'awesome-phonenumber'; +import {subYears} from 'date-fns'; import PropTypes from 'prop-types'; -import {withOnyx} from 'react-native-onyx'; +import React from 'react'; import {View} from 'react-native'; -import {subYears} from 'date-fns'; -import {parsePhoneNumber} from 'awesome-phonenumber'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import DatePicker from '@components/DatePicker'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import TextLink from '@components/TextLink'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import AddressForm from '@pages/ReimbursementAccount/AddressForm'; +import styles from '@styles/styles'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import * as Wallet from '@userActions/Wallet'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import IdologyQuestions from './IdologyQuestions'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import styles from '../../styles/styles'; -import Text from '../../components/Text'; -import CONST from '../../CONST'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import TextLink from '../../components/TextLink'; -import TextInput from '../../components/TextInput'; -import * as Wallet from '../../libs/actions/Wallet'; -import * as ValidationUtils from '../../libs/ValidationUtils'; -import AddressForm from '../ReimbursementAccount/AddressForm'; -import DatePicker from '../../components/DatePicker'; -import Form from '../../components/Form'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes, withCurrentUserPersonalDetailsDefaultProps} from '../../components/withCurrentUserPersonalDetails'; -import * as PersonalDetails from '../../libs/actions/PersonalDetails'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/EnablePayments/EnablePaymentsPage.js b/src/pages/EnablePayments/EnablePaymentsPage.js index 5f1577c3b31b..257eab1d38d3 100644 --- a/src/pages/EnablePayments/EnablePaymentsPage.js +++ b/src/pages/EnablePayments/EnablePaymentsPage.js @@ -1,24 +1,23 @@ -import _ from 'underscore'; import React, {useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import * as Wallet from '../../libs/actions/Wallet'; -import ONYXKEYS from '../../ONYXKEYS'; -import FullScreenLoadingIndicator from '../../components/FullscreenLoadingIndicator'; -import CONST from '../../CONST'; -import userWalletPropTypes from './userWalletPropTypes'; - +import _ from 'underscore'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import Navigation from '@libs/Navigation/Navigation'; +import * as Wallet from '@userActions/Wallet'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import ActivateStep from './ActivateStep'; +import AdditionalDetailsStep from './AdditionalDetailsStep'; +import FailedKYC from './FailedKYC'; // Steps import OnfidoStep from './OnfidoStep'; -import AdditionalDetailsStep from './AdditionalDetailsStep'; import TermsStep from './TermsStep'; -import ActivateStep from './ActivateStep'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import FailedKYC from './FailedKYC'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import useLocalize from '../../hooks/useLocalize'; -import useNetwork from '../../hooks/useNetwork'; +import userWalletPropTypes from './userWalletPropTypes'; const propTypes = { /** The user's wallet */ diff --git a/src/pages/EnablePayments/FailedKYC.js b/src/pages/EnablePayments/FailedKYC.js index 26b0625a780a..398537cf7645 100644 --- a/src/pages/EnablePayments/FailedKYC.js +++ b/src/pages/EnablePayments/FailedKYC.js @@ -1,10 +1,10 @@ import React from 'react'; import {View} from 'react-native'; -import CONST from '../../CONST'; -import Text from '../../components/Text'; -import TextLink from '../../components/TextLink'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import styles from '../../styles/styles'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/EnablePayments/IdologyQuestions.js b/src/pages/EnablePayments/IdologyQuestions.js index b5f30f93361b..a46e6d54a5ed 100644 --- a/src/pages/EnablePayments/IdologyQuestions.js +++ b/src/pages/EnablePayments/IdologyQuestions.js @@ -1,20 +1,20 @@ -import _ from 'underscore'; -import React, {useRef, useState} from 'react'; import PropTypes from 'prop-types'; +import React, {useRef, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import styles from '../../styles/styles'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as ErrorUtils from '../../libs/ErrorUtils'; -import useLocalize from '../../hooks/useLocalize'; -import RadioButtons from '../../components/RadioButtons'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import Text from '../../components/Text'; -import TextLink from '../../components/TextLink'; -import FormScrollView from '../../components/FormScrollView'; -import FormAlertWithSubmitButton from '../../components/FormAlertWithSubmitButton'; -import OfflineIndicator from '../../components/OfflineIndicator'; -import FixedFooter from '../../components/FixedFooter'; +import _ from 'underscore'; +import FixedFooter from '@components/FixedFooter'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import FormScrollView from '@components/FormScrollView'; +import OfflineIndicator from '@components/OfflineIndicator'; +import RadioButtons from '@components/RadioButtons'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import useLocalize from '@hooks/useLocalize'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import ONYXKEYS from '@src/ONYXKEYS'; const MAX_SKIP = 1; const SKIP_QUESTION_TEXT = 'Skip Question'; diff --git a/src/pages/EnablePayments/OnfidoPrivacy.js b/src/pages/EnablePayments/OnfidoPrivacy.js index 85ceb03b01d5..c195e0237034 100644 --- a/src/pages/EnablePayments/OnfidoPrivacy.js +++ b/src/pages/EnablePayments/OnfidoPrivacy.js @@ -1,21 +1,21 @@ +import lodashGet from 'lodash/get'; import React, {useRef} from 'react'; import {View} from 'react-native'; -import lodashGet from 'lodash/get'; -import _ from 'underscore'; import {withOnyx} from 'react-native-onyx'; -import FullscreenLoadingIndicator from '../../components/FullscreenLoadingIndicator'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import styles from '../../styles/styles'; -import TextLink from '../../components/TextLink'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import Text from '../../components/Text'; -import FormAlertWithSubmitButton from '../../components/FormAlertWithSubmitButton'; -import FormScrollView from '../../components/FormScrollView'; +import _ from 'underscore'; +import FixedFooter from '@components/FixedFooter'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import FormScrollView from '@components/FormScrollView'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import ONYXKEYS from '@src/ONYXKEYS'; import walletOnfidoDataPropTypes from './walletOnfidoDataPropTypes'; -import * as ErrorUtils from '../../libs/ErrorUtils'; -import FixedFooter from '../../components/FixedFooter'; const propTypes = { /** Stores various information used to build the UI and call any APIs */ diff --git a/src/pages/EnablePayments/OnfidoStep.js b/src/pages/EnablePayments/OnfidoStep.js index fc856d813683..8b40c88f62fb 100644 --- a/src/pages/EnablePayments/OnfidoStep.js +++ b/src/pages/EnablePayments/OnfidoStep.js @@ -1,18 +1,18 @@ import React, {useCallback} from 'react'; import {withOnyx} from 'react-native-onyx'; -import Onfido from '../../components/Onfido'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import Navigation from '../../libs/Navigation/Navigation'; -import CONST from '../../CONST'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import * as Wallet from '../../libs/actions/Wallet'; -import useLocalize from '../../hooks/useLocalize'; -import Growl from '../../libs/Growl'; +import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import Onfido from '@components/Onfido'; +import useLocalize from '@hooks/useLocalize'; +import Growl from '@libs/Growl'; +import Navigation from '@libs/Navigation/Navigation'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as Wallet from '@userActions/Wallet'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import OnfidoPrivacy from './OnfidoPrivacy'; import walletOnfidoDataPropTypes from './walletOnfidoDataPropTypes'; -import FullPageOfflineBlockingView from '../../components/BlockingViews/FullPageOfflineBlockingView'; -import ROUTES from '../../ROUTES'; const propTypes = { /** Stores various information used to build the UI and call any APIs */ diff --git a/src/pages/EnablePayments/TermsPage/LongTermsForm.js b/src/pages/EnablePayments/TermsPage/LongTermsForm.js index 4b68635d8ec8..5a925ad4e7c3 100644 --- a/src/pages/EnablePayments/TermsPage/LongTermsForm.js +++ b/src/pages/EnablePayments/TermsPage/LongTermsForm.js @@ -1,14 +1,14 @@ -import _ from 'underscore'; import React from 'react'; import {View} from 'react-native'; -import styles from '../../../styles/styles'; -import Text from '../../../components/Text'; -import CollapsibleSection from '../../../components/CollapsibleSection'; -import * as Localize from '../../../libs/Localize'; -import CONST from '../../../CONST'; -import Icon from '../../../components/Icon'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import TextLink from '../../../components/TextLink'; +import _ from 'underscore'; +import CollapsibleSection from '@components/CollapsibleSection'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import * as Localize from '@libs/Localize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const termsData = [ { diff --git a/src/pages/EnablePayments/TermsPage/ShortTermsForm.js b/src/pages/EnablePayments/TermsPage/ShortTermsForm.js index 1b693add95b7..46a1867a2606 100644 --- a/src/pages/EnablePayments/TermsPage/ShortTermsForm.js +++ b/src/pages/EnablePayments/TermsPage/ShortTermsForm.js @@ -1,11 +1,11 @@ import React from 'react'; import {View} from 'react-native'; -import styles from '../../../styles/styles'; -import Text from '../../../components/Text'; -import * as Localize from '../../../libs/Localize'; -import CONST from '../../../CONST'; -import TextLink from '../../../components/TextLink'; -import userWalletPropTypes from '../userWalletPropTypes'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import * as Localize from '@libs/Localize'; +import userWalletPropTypes from '@pages/EnablePayments/userWalletPropTypes'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /** The user's wallet */ diff --git a/src/pages/EnablePayments/TermsStep.js b/src/pages/EnablePayments/TermsStep.js index c11d8c39bda6..6dff94b7202b 100644 --- a/src/pages/EnablePayments/TermsStep.js +++ b/src/pages/EnablePayments/TermsStep.js @@ -1,21 +1,21 @@ import React, {useEffect, useState} from 'react'; import {ScrollView} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import styles from '../../styles/styles'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import TextLink from '../../components/TextLink'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import CheckboxWithLabel from '../../components/CheckboxWithLabel'; -import Text from '../../components/Text'; -import ShortTermsForm from './TermsPage/ShortTermsForm'; +import CheckboxWithLabel from '@components/CheckboxWithLabel'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import ONYXKEYS from '@src/ONYXKEYS'; import LongTermsForm from './TermsPage/LongTermsForm'; -import FormAlertWithSubmitButton from '../../components/FormAlertWithSubmitButton'; -import walletTermsPropTypes from './walletTermsPropTypes'; -import * as ErrorUtils from '../../libs/ErrorUtils'; +import ShortTermsForm from './TermsPage/ShortTermsForm'; import userWalletPropTypes from './userWalletPropTypes'; +import walletTermsPropTypes from './walletTermsPropTypes'; const propTypes = { /** The user's wallet */ diff --git a/src/pages/EnablePayments/walletTermsPropTypes.js b/src/pages/EnablePayments/walletTermsPropTypes.js index 44d153f3b6ff..4420a2dd0861 100644 --- a/src/pages/EnablePayments/walletTermsPropTypes.js +++ b/src/pages/EnablePayments/walletTermsPropTypes.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import _ from 'underscore'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; /** Prop types related to the Terms step of KYC flow */ export default PropTypes.shape({ diff --git a/src/pages/ErrorPage/ErrorBodyText/index.js b/src/pages/ErrorPage/ErrorBodyText/index.js index 9410d5fe5c1d..d50d15c15cd0 100644 --- a/src/pages/ErrorPage/ErrorBodyText/index.js +++ b/src/pages/ErrorPage/ErrorBodyText/index.js @@ -1,9 +1,9 @@ import React from 'react'; -import Text from '../../../components/Text'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import TextLink from '../../../components/TextLink'; -import CONST from '../../../CONST'; -import styles from '../../../styles/styles'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/ErrorPage/GenericErrorPage.js b/src/pages/ErrorPage/GenericErrorPage.js index 02ab38a1ef20..af551fe5743a 100644 --- a/src/pages/ErrorPage/GenericErrorPage.js +++ b/src/pages/ErrorPage/GenericErrorPage.js @@ -1,21 +1,21 @@ import React from 'react'; -import {View} from 'react-native'; import {useErrorBoundary} from 'react-error-boundary'; -import Icon from '../../components/Icon'; -import defaultTheme from '../../styles/themes/default'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import Text from '../../components/Text'; -import Button from '../../components/Button'; -import LogoWordmark from '../../../assets/images/expensify-wordmark.svg'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import * as Session from '../../libs/actions/Session'; -import variables from '../../styles/variables'; -import styles from '../../styles/styles'; +import {View} from 'react-native'; +import LogoWordmark from '@assets/images/expensify-wordmark.svg'; +import Button from '@components/Button'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import SafeAreaConsumer from '@components/SafeAreaConsumer'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import defaultTheme from '@styles/themes/default'; +import variables from '@styles/variables'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; import ErrorBodyText from './ErrorBodyText'; -import TextLink from '../../components/TextLink'; -import CONST from '../../CONST'; -import SafeAreaConsumer from '../../components/SafeAreaConsumer'; -import * as StyleUtils from '../../styles/StyleUtils'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/ErrorPage/NotFoundPage.js b/src/pages/ErrorPage/NotFoundPage.js index 445e81296566..9ada6b820e8e 100644 --- a/src/pages/ErrorPage/NotFoundPage.js +++ b/src/pages/ErrorPage/NotFoundPage.js @@ -1,6 +1,6 @@ import React from 'react'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import ScreenWrapper from '@components/ScreenWrapper'; // eslint-disable-next-line rulesdir/no-negated-variables function NotFoundPage() { diff --git a/src/pages/FlagCommentPage.js b/src/pages/FlagCommentPage.js index 53da810007ea..ee7b2d8af3c1 100644 --- a/src/pages/FlagCommentPage.js +++ b/src/pages/FlagCommentPage.js @@ -1,27 +1,27 @@ -import React, {useCallback} from 'react'; -import _ from 'underscore'; -import {View, ScrollView} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useCallback} from 'react'; +import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import reportPropTypes from './reportPropTypes'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import reportActionPropTypes from './home/report/reportActionPropTypes'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; -import compose from '../libs/compose'; -import ScreenWrapper from '../components/ScreenWrapper'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import styles from '../styles/styles'; -import Navigation from '../libs/Navigation/Navigation'; -import Text from '../components/Text'; -import * as Expensicons from '../components/Icon/Expensicons'; -import MenuItem from '../components/MenuItem'; -import * as Report from '../libs/actions/Report'; -import CONST from '../CONST'; -import * as ReportUtils from '../libs/ReportUtils'; -import * as ReportActionsUtils from '../libs/ReportActionsUtils'; -import * as Session from '../libs/actions/Session'; -import FullPageNotFoundView from '../components/BlockingViews/FullPageNotFoundView'; import withReportAndReportActionOrNotFound from './home/report/withReportAndReportActionOrNotFound'; -import ONYXKEYS from '../ONYXKEYS'; +import reportPropTypes from './reportPropTypes'; const propTypes = { /** Array of report actions for this report */ diff --git a/src/pages/GetAssistancePage.js b/src/pages/GetAssistancePage.js index 97b498d758b7..647734a0cde1 100644 --- a/src/pages/GetAssistancePage.js +++ b/src/pages/GetAssistancePage.js @@ -1,23 +1,23 @@ -import React from 'react'; -import {View, ScrollView} from 'react-native'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React from 'react'; +import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import ScreenWrapper from '../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import Section from '../components/Section'; -import styles from '../styles/styles'; -import Text from '../components/Text'; -import * as Expensicons from '../components/Icon/Expensicons'; -import * as Illustrations from '../components/Icon/Illustrations'; -import * as Report from '../libs/actions/Report'; -import * as Link from '../libs/actions/Link'; -import CONST from '../CONST'; -import compose from '../libs/compose'; -import ONYXKEYS from '../ONYXKEYS'; -import Navigation from '../libs/Navigation/Navigation'; -import ROUTES from '../ROUTES'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Route object from navigation */ diff --git a/src/pages/KeyboardShortcutsPage.js b/src/pages/KeyboardShortcutsPage.js index 8ac26301e9fb..4caade5b9ec1 100644 --- a/src/pages/KeyboardShortcutsPage.js +++ b/src/pages/KeyboardShortcutsPage.js @@ -1,14 +1,14 @@ import React from 'react'; -import {View, ScrollView} from 'react-native'; +import {ScrollView, View} from 'react-native'; import _ from 'underscore'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import ScreenWrapper from '../components/ScreenWrapper'; -import Text from '../components/Text'; -import styles from '../styles/styles'; -import CONST from '../CONST'; -import useLocalize from '../hooks/useLocalize'; -import KeyboardShortcut from '../libs/KeyboardShortcut'; -import MenuItem from '../components/MenuItem'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import MenuItem from '@components/MenuItem'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import KeyboardShortcut from '@libs/KeyboardShortcut'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; function KeyboardShortcutsPage() { const {translate} = useLocalize(); diff --git a/src/pages/LogInWithShortLivedAuthTokenPage.js b/src/pages/LogInWithShortLivedAuthTokenPage.js index 875cdf7e8072..84de67e496b5 100644 --- a/src/pages/LogInWithShortLivedAuthTokenPage.js +++ b/src/pages/LogInWithShortLivedAuthTokenPage.js @@ -1,20 +1,20 @@ -import React, {useEffect} from 'react'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; -import {withOnyx} from 'react-native-onyx'; +import React, {useEffect} from 'react'; import {View} from 'react-native'; -import Text from '../components/Text'; -import * as Session from '../libs/actions/Session'; -import FullScreenLoadingIndicator from '../components/FullscreenLoadingIndicator'; -import Navigation from '../libs/Navigation/Navigation'; -import styles from '../styles/styles'; -import themeColors from '../styles/themes/default'; -import Icon from '../components/Icon'; -import * as Expensicons from '../components/Icon/Expensicons'; -import * as Illustrations from '../components/Icon/Illustrations'; -import useLocalize from '../hooks/useLocalize'; -import TextLink from '../components/TextLink'; -import ONYXKEYS from '../ONYXKEYS'; +import {withOnyx} from 'react-native-onyx'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as Session from '@userActions/Session'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** The parameters needed to authenticate with a short-lived token are in the URL */ diff --git a/src/pages/LogOutPreviousUserPage.js b/src/pages/LogOutPreviousUserPage.js index 9055187def16..8fd0ec144a1f 100644 --- a/src/pages/LogOutPreviousUserPage.js +++ b/src/pages/LogOutPreviousUserPage.js @@ -1,12 +1,12 @@ -import React, {useEffect} from 'react'; -import {Linking} from 'react-native'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; +import {Linking} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import ONYXKEYS from '../ONYXKEYS'; -import * as Session from '../libs/actions/Session'; -import FullScreenLoadingIndicator from '../components/FullscreenLoadingIndicator'; -import * as SessionUtils from '../libs/SessionUtils'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import * as SessionUtils from '@libs/SessionUtils'; +import * as Session from '@userActions/Session'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** The data about the current session which will be set once the user is authenticated and we return to this component as an AuthScreen */ diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index 381564b82600..25a1bed4f11a 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -1,27 +1,27 @@ -import _ from 'underscore'; -import React, {useState, useEffect, useMemo, useCallback} from 'react'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useState} from 'react'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import OptionsSelector from '../components/OptionsSelector'; -import * as OptionsListUtils from '../libs/OptionsListUtils'; -import Permissions from '../libs/Permissions'; -import * as ReportUtils from '../libs/ReportUtils'; -import ONYXKEYS from '../ONYXKEYS'; -import styles from '../styles/styles'; -import * as Report from '../libs/actions/Report'; -import CONST from '../CONST'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../components/withWindowDimensions'; -import ScreenWrapper from '../components/ScreenWrapper'; -import KeyboardAvoidingView from '../components/KeyboardAvoidingView'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; -import * as Browser from '../libs/Browser'; -import compose from '../libs/compose'; +import _ from 'underscore'; +import KeyboardAvoidingView from '@components/KeyboardAvoidingView'; +import OptionsSelector from '@components/OptionsSelector'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import useDelayedInputFocus from '@hooks/useDelayedInputFocus'; +import useNetwork from '@hooks/useNetwork'; +import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import Permissions from '@libs/Permissions'; +import * as ReportUtils from '@libs/ReportUtils'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import personalDetailsPropType from './personalDetailsPropType'; import reportPropTypes from './reportPropTypes'; -import variables from '../styles/variables'; -import useNetwork from '../hooks/useNetwork'; -import useDelayedInputFocus from '../hooks/useDelayedInputFocus'; const propTypes = { /** Beta features list */ diff --git a/src/pages/NewChatSelectorPage.js b/src/pages/NewChatSelectorPage.js index 2ac2ed8177a1..6e970c80b1cb 100755 --- a/src/pages/NewChatSelectorPage.js +++ b/src/pages/NewChatSelectorPage.js @@ -1,17 +1,17 @@ import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import OnyxTabNavigator, {TopTab} from '../libs/Navigation/OnyxTabNavigator'; -import TabSelector from '../components/TabSelector/TabSelector'; -import Permissions from '../libs/Permissions'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TabSelector from '@components/TabSelector/TabSelector'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import OnyxTabNavigator, {TopTab} from '@libs/Navigation/OnyxTabNavigator'; +import Permissions from '@libs/Permissions'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import NewChatPage from './NewChatPage'; import WorkspaceNewRoomPage from './workspace/WorkspaceNewRoomPage'; -import CONST from '../CONST'; -import ONYXKEYS from '../ONYXKEYS'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../components/withWindowDimensions'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import ScreenWrapper from '../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; -import compose from '../libs/compose'; const propTypes = { ...windowDimensionsPropTypes, diff --git a/src/pages/PrivateNotes/PrivateNotesEditPage.js b/src/pages/PrivateNotes/PrivateNotesEditPage.js index 962163d3e379..44cba7682719 100644 --- a/src/pages/PrivateNotes/PrivateNotesEditPage.js +++ b/src/pages/PrivateNotes/PrivateNotesEditPage.js @@ -1,33 +1,33 @@ -import React, {useState, useRef, useCallback, useMemo} from 'react'; +import {useFocusEffect} from '@react-navigation/native'; +import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import Str from 'expensify-common/lib/str'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useMemo, useRef, useState} from 'react'; import {Keyboard} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import {useFocusEffect} from '@react-navigation/native'; -import lodashGet from 'lodash/get'; -import Str from 'expensify-common/lib/str'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; import _ from 'underscore'; -import withLocalize from '../../components/withLocalize'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import styles from '../../styles/styles'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import TextInput from '../../components/TextInput'; -import CONST from '../../CONST'; -import Text from '../../components/Text'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import reportPropTypes from '../reportPropTypes'; -import personalDetailsPropType from '../personalDetailsPropType'; -import * as Report from '../../libs/actions/Report'; -import useLocalize from '../../hooks/useLocalize'; -import OfflineWithFeedback from '../../components/OfflineWithFeedback'; -import updateMultilineInputRange from '../../libs/UpdateMultilineInputRange'; -import ROUTES from '../../ROUTES'; -import * as ReportUtils from '../../libs/ReportUtils'; -import InputWrapper from '../../components/Form/InputWrapper'; -import FormProvider from '../../components/Form/FormProvider'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import FormProvider from '@components/Form/FormProvider'; +import InputWrapper from '@components/Form/InputWrapper'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import withLocalize from '@components/withLocalize'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import updateMultilineInputRange from '@libs/UpdateMultilineInputRange'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** All of the personal details for everyone */ diff --git a/src/pages/PrivateNotes/PrivateNotesListPage.js b/src/pages/PrivateNotes/PrivateNotesListPage.js index bd49e74d5f69..ec3905db349e 100644 --- a/src/pages/PrivateNotes/PrivateNotesListPage.js +++ b/src/pages/PrivateNotes/PrivateNotesListPage.js @@ -1,30 +1,30 @@ -import React, {useMemo, useEffect} from 'react'; -import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import _ from 'underscore'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useEffect, useMemo} from 'react'; import {ScrollView} from 'react-native'; -import Navigation from '../../libs/Navigation/Navigation'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import styles from '../../styles/styles'; -import compose from '../../libs/compose'; -import OfflineWithFeedback from '../../components/OfflineWithFeedback'; -import MenuItem from '../../components/MenuItem'; -import useLocalize from '../../hooks/useLocalize'; -import FullScreenLoadingIndicator from '../../components/FullscreenLoadingIndicator'; -import * as Report from '../../libs/actions/Report'; -import personalDetailsPropType from '../personalDetailsPropType'; -import * as UserUtils from '../../libs/UserUtils'; -import reportPropTypes from '../reportPropTypes'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import {withNetwork} from '../../components/OnyxProvider'; -import networkPropTypes from '../../components/networkPropTypes'; -import ROUTES from '../../ROUTES'; -import * as ReportUtils from '../../libs/ReportUtils'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import MenuItem from '@components/MenuItem'; +import networkPropTypes from '@components/networkPropTypes'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import {withNetwork} from '@components/OnyxProvider'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as UserUtils from '@libs/UserUtils'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** The report currently being looked at */ diff --git a/src/pages/PrivateNotes/PrivateNotesViewPage.js b/src/pages/PrivateNotes/PrivateNotesViewPage.js index 6550c9d7d3c3..bb9d96516437 100644 --- a/src/pages/PrivateNotes/PrivateNotesViewPage.js +++ b/src/pages/PrivateNotes/PrivateNotesViewPage.js @@ -1,25 +1,25 @@ -import React from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React from 'react'; import {ScrollView} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; import _ from 'underscore'; -import withLocalize from '../../components/withLocalize'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import styles from '../../styles/styles'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import ROUTES from '../../ROUTES'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import reportPropTypes from '../reportPropTypes'; -import personalDetailsPropType from '../personalDetailsPropType'; -import useLocalize from '../../hooks/useLocalize'; -import OfflineWithFeedback from '../../components/OfflineWithFeedback'; -import MenuItemWithTopDescription from '../../components/MenuItemWithTopDescription'; -import CONST from '../../CONST'; -import * as ReportUtils from '../../libs/ReportUtils'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withLocalize from '@components/withLocalize'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** All of the personal details for everyone */ diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index 8e0ed04ab94a..ccc5cd14359a 100755 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -1,43 +1,43 @@ -import {View, ScrollView} from 'react-native'; -import React, {useEffect} from 'react'; -import PropTypes from 'prop-types'; -import _ from 'underscore'; -import {withOnyx} from 'react-native-onyx'; +import {parsePhoneNumber} from 'awesome-phonenumber'; import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; -import {parsePhoneNumber} from 'awesome-phonenumber'; -import * as Session from '../libs/actions/Session'; -import styles from '../styles/styles'; -import Text from '../components/Text'; -import ONYXKEYS from '../ONYXKEYS'; -import Avatar from '../components/Avatar'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import Navigation from '../libs/Navigation/Navigation'; -import ScreenWrapper from '../components/ScreenWrapper'; +import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; +import {ScrollView, View} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import AttachmentModal from '@components/AttachmentModal'; +import AutoUpdateTime from '@components/AutoUpdateTime'; +import Avatar from '@components/Avatar'; +import BlockingView from '@components/BlockingViews/BlockingView'; +import CommunicationsLink from '@components/CommunicationsLink'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import MenuItem from '@components/MenuItem'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import PressableWithoutFocus from '@components/Pressable/PressableWithoutFocus'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import UserDetailsTooltip from '@components/UserDetailsTooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import Permissions from '@libs/Permissions'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as UserUtils from '@libs/UserUtils'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import * as Report from '@userActions/Report'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import personalDetailsPropType from './personalDetailsPropType'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; -import compose from '../libs/compose'; -import CommunicationsLink from '../components/CommunicationsLink'; -import UserDetailsTooltip from '../components/UserDetailsTooltip'; -import CONST from '../CONST'; -import * as ReportUtils from '../libs/ReportUtils'; -import * as Expensicons from '../components/Icon/Expensicons'; -import MenuItem from '../components/MenuItem'; -import AttachmentModal from '../components/AttachmentModal'; -import PressableWithoutFocus from '../components/Pressable/PressableWithoutFocus'; -import * as Report from '../libs/actions/Report'; -import OfflineWithFeedback from '../components/OfflineWithFeedback'; -import AutoUpdateTime from '../components/AutoUpdateTime'; -import * as UserUtils from '../libs/UserUtils'; -import * as PersonalDetails from '../libs/actions/PersonalDetails'; -import FullScreenLoadingIndicator from '../components/FullscreenLoadingIndicator'; -import BlockingView from '../components/BlockingViews/BlockingView'; -import * as Illustrations from '../components/Icon/Illustrations'; -import variables from '../styles/variables'; -import * as ValidationUtils from '../libs/ValidationUtils'; -import Permissions from '../libs/Permissions'; -import ROUTES from '../ROUTES'; -import MenuItemWithTopDescription from '../components/MenuItemWithTopDescription'; const matchType = PropTypes.shape({ params: PropTypes.shape({ diff --git a/src/pages/ReimbursementAccount/ACHContractStep.js b/src/pages/ReimbursementAccount/ACHContractStep.js index 5f7fce851c85..8f2d2e07998e 100644 --- a/src/pages/ReimbursementAccount/ACHContractStep.js +++ b/src/pages/ReimbursementAccount/ACHContractStep.js @@ -1,23 +1,23 @@ -import _ from 'underscore'; +import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; -import React, {useState} from 'react'; import PropTypes from 'prop-types'; +import React, {useState} from 'react'; import {View} from 'react-native'; -import Str from 'expensify-common/lib/str'; -import Text from '../../components/Text'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import styles from '../../styles/styles'; -import CheckboxWithLabel from '../../components/CheckboxWithLabel'; -import TextLink from '../../components/TextLink'; +import _ from 'underscore'; +import CheckboxWithLabel from '@components/CheckboxWithLabel'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize from '@components/withLocalize'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as FormActions from '@userActions/FormActions'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import IdentityForm from './IdentityForm'; -import withLocalize from '../../components/withLocalize'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import CONST from '../../CONST'; -import * as ValidationUtils from '../../libs/ValidationUtils'; -import ONYXKEYS from '../../ONYXKEYS'; -import Form from '../../components/Form'; -import * as FormActions from '../../libs/actions/FormActions'; -import ScreenWrapper from '../../components/ScreenWrapper'; import StepPropTypes from './StepPropTypes'; const propTypes = { diff --git a/src/pages/ReimbursementAccount/AddressForm.js b/src/pages/ReimbursementAccount/AddressForm.js index 5ddea09c6f4e..36fbc6e4c59d 100644 --- a/src/pages/ReimbursementAccount/AddressForm.js +++ b/src/pages/ReimbursementAccount/AddressForm.js @@ -1,11 +1,11 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import TextInput from '../../components/TextInput'; -import AddressSearch from '../../components/AddressSearch'; -import styles from '../../styles/styles'; -import CONST from '../../CONST'; -import StatePicker from '../../components/StatePicker'; +import AddressSearch from '@components/AddressSearch'; +import StatePicker from '@components/StatePicker'; +import TextInput from '@components/TextInput'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /** Translate key for Street name */ diff --git a/src/pages/ReimbursementAccount/BankAccountManualStep.js b/src/pages/ReimbursementAccount/BankAccountManualStep.js index 9d0b0c1f5bed..13155d286a5e 100644 --- a/src/pages/ReimbursementAccount/BankAccountManualStep.js +++ b/src/pages/ReimbursementAccount/BankAccountManualStep.js @@ -1,23 +1,23 @@ +import lodashGet from 'lodash/get'; import React, {useCallback} from 'react'; -import _ from 'underscore'; import {Image} from 'react-native'; -import lodashGet from 'lodash/get'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import CONST from '../../CONST'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import Text from '../../components/Text'; -import TextInput from '../../components/TextInput'; -import styles from '../../styles/styles'; -import CheckboxWithLabel from '../../components/CheckboxWithLabel'; -import TextLink from '../../components/TextLink'; -import useLocalize from '../../hooks/useLocalize'; -import {withLocalizePropTypes} from '../../components/withLocalize'; -import * as ValidationUtils from '../../libs/ValidationUtils'; -import ONYXKEYS from '../../ONYXKEYS'; +import _ from 'underscore'; +import CheckboxWithLabel from '@components/CheckboxWithLabel'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import TextLink from '@components/TextLink'; +import {withLocalizePropTypes} from '@components/withLocalize'; +import useLocalize from '@hooks/useLocalize'; +import shouldDelayFocus from '@libs/shouldDelayFocus'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import exampleCheckImage from './exampleCheckImage'; -import Form from '../../components/Form'; -import shouldDelayFocus from '../../libs/shouldDelayFocus'; -import ScreenWrapper from '../../components/ScreenWrapper'; import StepPropTypes from './StepPropTypes'; const propTypes = { diff --git a/src/pages/ReimbursementAccount/BankAccountPlaidStep.js b/src/pages/ReimbursementAccount/BankAccountPlaidStep.js index 3fbf2a138384..06e8c0531e3b 100644 --- a/src/pages/ReimbursementAccount/BankAccountPlaidStep.js +++ b/src/pages/ReimbursementAccount/BankAccountPlaidStep.js @@ -1,23 +1,23 @@ -import React, {useCallback, useEffect} from 'react'; import {useIsFocused} from '@react-navigation/native'; -import PropTypes from 'prop-types'; -import _ from 'underscore'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useCallback, useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import CONST from '../../CONST'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import withLocalize from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import AddPlaidBankAccount from '../../components/AddPlaidBankAccount'; -import CheckboxWithLabel from '../../components/CheckboxWithLabel'; -import TextLink from '../../components/TextLink'; -import Text from '../../components/Text'; -import * as ReimbursementAccount from '../../libs/actions/ReimbursementAccount'; -import Form from '../../components/Form'; -import styles from '../../styles/styles'; -import ScreenWrapper from '../../components/ScreenWrapper'; +import _ from 'underscore'; +import AddPlaidBankAccount from '@components/AddPlaidBankAccount'; +import CheckboxWithLabel from '@components/CheckboxWithLabel'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize from '@components/withLocalize'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as ReimbursementAccount from '@userActions/ReimbursementAccount'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as PlaidDataProps from './plaidDataPropTypes'; import StepPropTypes from './StepPropTypes'; diff --git a/src/pages/ReimbursementAccount/BankAccountStep.js b/src/pages/ReimbursementAccount/BankAccountStep.js index b01b46f69350..f1bc41d44ed5 100644 --- a/src/pages/ReimbursementAccount/BankAccountStep.js +++ b/src/pages/ReimbursementAccount/BankAccountStep.js @@ -1,33 +1,33 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; -import {View, ScrollView} from 'react-native'; +import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; +import Button from '@components/Button'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import MenuItem from '@components/MenuItem'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize from '@components/withLocalize'; +import compose from '@libs/compose'; +import getPlaidDesktopMessage from '@libs/getPlaidDesktopMessage'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as Link from '@userActions/Link'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import BankAccountManualStep from './BankAccountManualStep'; import BankAccountPlaidStep from './BankAccountPlaidStep'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import MenuItem from '../../components/MenuItem'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import styles from '../../styles/styles'; -import TextLink from '../../components/TextLink'; -import Icon from '../../components/Icon'; -import themeColors from '../../styles/themes/default'; -import CONST from '../../CONST'; -import withLocalize from '../../components/withLocalize'; -import Text from '../../components/Text'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import ONYXKEYS from '../../ONYXKEYS'; -import compose from '../../libs/compose'; -import Section from '../../components/Section'; -import * as Illustrations from '../../components/Icon/Illustrations'; -import getPlaidDesktopMessage from '../../libs/getPlaidDesktopMessage'; -import CONFIG from '../../CONFIG'; -import ROUTES from '../../ROUTES'; -import Button from '../../components/Button'; -import ScreenWrapper from '../../components/ScreenWrapper'; import StepPropTypes from './StepPropTypes'; -import PressableWithoutFeedback from '../../components/Pressable/PressableWithoutFeedback'; -import * as Link from '../../libs/actions/Link'; const propTypes = { ...StepPropTypes, diff --git a/src/pages/ReimbursementAccount/CompanyStep.js b/src/pages/ReimbursementAccount/CompanyStep.js index 0ca9b1b7ea92..24cfbf5ae4c6 100644 --- a/src/pages/ReimbursementAccount/CompanyStep.js +++ b/src/pages/ReimbursementAccount/CompanyStep.js @@ -1,29 +1,29 @@ -import _ from 'underscore'; +import {parsePhoneNumber} from 'awesome-phonenumber'; +import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useMemo} from 'react'; import {View} from 'react-native'; -import Str from 'expensify-common/lib/str'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import {parsePhoneNumber} from 'awesome-phonenumber'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import StatePicker from '../../components/StatePicker'; -import CONST from '../../CONST'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import Text from '../../components/Text'; -import DatePicker from '../../components/DatePicker'; -import TextInput from '../../components/TextInput'; -import styles from '../../styles/styles'; -import CheckboxWithLabel from '../../components/CheckboxWithLabel'; -import TextLink from '../../components/TextLink'; -import withLocalize from '../../components/withLocalize'; -import * as ValidationUtils from '../../libs/ValidationUtils'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import Picker from '../../components/Picker'; +import _ from 'underscore'; +import CheckboxWithLabel from '@components/CheckboxWithLabel'; +import DatePicker from '@components/DatePicker'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import Picker from '@components/Picker'; +import ScreenWrapper from '@components/ScreenWrapper'; +import StatePicker from '@components/StatePicker'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import TextLink from '@components/TextLink'; +import withLocalize from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import AddressForm from './AddressForm'; -import Form from '../../components/Form'; -import ScreenWrapper from '../../components/ScreenWrapper'; import StepPropTypes from './StepPropTypes'; const propTypes = { diff --git a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js index 5bde2884be51..52ccc3b87835 100644 --- a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js +++ b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js @@ -1,23 +1,23 @@ +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; import React from 'react'; import {ScrollView} from 'react-native'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import * as Illustrations from '../../components/Icon/Illustrations'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import Button from '../../components/Button'; -import CONST from '../../CONST'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import MenuItem from '../../components/MenuItem'; -import styles from '../../styles/styles'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import Section from '../../components/Section'; -import Text from '../../components/Text'; +import Button from '@components/Button'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import MenuItem from '@components/MenuItem'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import WorkspaceResetBankAccountModal from '@pages/workspace/WorkspaceResetBankAccountModal'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import CONST from '@src/CONST'; import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; -import WorkspaceResetBankAccountModal from '../workspace/WorkspaceResetBankAccountModal'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import OfflineWithFeedback from '../../components/OfflineWithFeedback'; const propTypes = { /** Bank account currently in setup */ diff --git a/src/pages/ReimbursementAccount/Enable2FAPrompt.js b/src/pages/ReimbursementAccount/Enable2FAPrompt.js index 33424669903f..c768f901508e 100644 --- a/src/pages/ReimbursementAccount/Enable2FAPrompt.js +++ b/src/pages/ReimbursementAccount/Enable2FAPrompt.js @@ -1,13 +1,13 @@ import React from 'react'; import {View} from 'react-native'; -import Text from '../../components/Text'; -import styles from '../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import * as Illustrations from '../../components/Icon/Illustrations'; -import Section from '../../components/Section'; -import * as Link from '../../libs/actions/Link'; -import ROUTES from '../../ROUTES'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; +import ROUTES from '@src/ROUTES'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/ReimbursementAccount/EnableStep.js b/src/pages/ReimbursementAccount/EnableStep.js index 6612a0b6ad2f..cb59a4bc97f5 100644 --- a/src/pages/ReimbursementAccount/EnableStep.js +++ b/src/pages/ReimbursementAccount/EnableStep.js @@ -1,29 +1,29 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; -import _ from 'underscore'; import {ScrollView} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; -import styles from '../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Text from '../../components/Text'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import Button from '../../components/Button'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import MenuItem from '../../components/MenuItem'; -import OfflineWithFeedback from '../../components/OfflineWithFeedback'; -import getBankIcon from '../../components/Icon/BankIcons'; +import _ from 'underscore'; +import Button from '@components/Button'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import getBankIcon from '@components/Icon/BankIcons'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import MenuItem from '@components/MenuItem'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import userPropTypes from '@pages/settings/userPropTypes'; +import WorkspaceResetBankAccountModal from '@pages/workspace/WorkspaceResetBankAccountModal'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; +import * as BankAccounts from '@userActions/ReimbursementAccount'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; -import userPropTypes from '../settings/userPropTypes'; -import Section from '../../components/Section'; -import * as Illustrations from '../../components/Icon/Illustrations'; -import * as Link from '../../libs/actions/Link'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import * as BankAccounts from '../../libs/actions/ReimbursementAccount'; -import WorkspaceResetBankAccountModal from '../workspace/WorkspaceResetBankAccountModal'; const propTypes = { /** Bank account currently in setup */ diff --git a/src/pages/ReimbursementAccount/IdentityForm.js b/src/pages/ReimbursementAccount/IdentityForm.js index 20c6e10ec64d..7cd66f3ba086 100644 --- a/src/pages/ReimbursementAccount/IdentityForm.js +++ b/src/pages/ReimbursementAccount/IdentityForm.js @@ -1,12 +1,12 @@ +import {subYears} from 'date-fns'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import {subYears} from 'date-fns'; import _ from 'underscore'; -import TextInput from '../../components/TextInput'; -import styles from '../../styles/styles'; -import CONST from '../../CONST'; -import DatePicker from '../../components/DatePicker'; +import DatePicker from '@components/DatePicker'; +import TextInput from '@components/TextInput'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; import AddressForm from './AddressForm'; const propTypes = { diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index 22c5a45a21dc..35fa1261f9dc 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -1,39 +1,39 @@ -import _ from 'underscore'; +import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; -import {withOnyx} from 'react-native-onyx'; -import Str from 'expensify-common/lib/str'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import ONYXKEYS from '../../ONYXKEYS'; -import ReimbursementAccountLoadingIndicator from '../../components/ReimbursementAccountLoadingIndicator'; -import Navigation from '../../libs/Navigation/Navigation'; -import CONST from '../../CONST'; -import BankAccount from '../../libs/models/BankAccount'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import styles from '../../styles/styles'; -import getPlaidOAuthReceivedRedirectURI from '../../libs/getPlaidOAuthReceivedRedirectURI'; -import Text from '../../components/Text'; -import {withNetwork} from '../../components/OnyxProvider'; -import networkPropTypes from '../../components/networkPropTypes'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import ReimbursementAccountLoadingIndicator from '@components/ReimbursementAccountLoadingIndicator'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import getPlaidOAuthReceivedRedirectURI from '@libs/getPlaidOAuthReceivedRedirectURI'; +import BankAccount from '@libs/models/BankAccount'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import shouldReopenOnfido from '@libs/shouldReopenOnfido'; +import withPolicy from '@pages/workspace/withPolicy'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import ACHContractStep from './ACHContractStep'; import BankAccountStep from './BankAccountStep'; import CompanyStep from './CompanyStep'; import ContinueBankAccountSetup from './ContinueBankAccountSetup'; -import RequestorStep from './RequestorStep'; -import ValidationStep from './ValidationStep'; -import ACHContractStep from './ACHContractStep'; import EnableStep from './EnableStep'; -import ROUTES from '../../ROUTES'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; import reimbursementAccountDraftPropTypes from './ReimbursementAccountDraftPropTypes'; -import withPolicy from '../workspace/withPolicy'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import shouldReopenOnfido from '../../libs/shouldReopenOnfido'; +import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; +import RequestorStep from './RequestorStep'; +import ValidationStep from './ValidationStep'; const propTypes = { /** Plaid SDK token to use to initialize the widget */ diff --git a/src/pages/ReimbursementAccount/RequestorOnfidoStep.js b/src/pages/ReimbursementAccount/RequestorOnfidoStep.js index 86cf7ae71aa8..851869f9128d 100644 --- a/src/pages/ReimbursementAccount/RequestorOnfidoStep.js +++ b/src/pages/ReimbursementAccount/RequestorOnfidoStep.js @@ -1,18 +1,18 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; import {ScrollView} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; -import styles from '../../styles/styles'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import Onfido from '../../components/Onfido'; -import ONYXKEYS from '../../ONYXKEYS'; -import Growl from '../../libs/Growl'; -import CONST from '../../CONST'; -import FullPageOfflineBlockingView from '../../components/BlockingViews/FullPageOfflineBlockingView'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import useLocalize from '../../hooks/useLocalize'; +import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import Onfido from '@components/Onfido'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useLocalize from '@hooks/useLocalize'; +import Growl from '@libs/Growl'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; const propTypes = { diff --git a/src/pages/ReimbursementAccount/RequestorStep.js b/src/pages/ReimbursementAccount/RequestorStep.js index 86f1d5077eca..0eddb727d56d 100644 --- a/src/pages/ReimbursementAccount/RequestorStep.js +++ b/src/pages/ReimbursementAccount/RequestorStep.js @@ -1,22 +1,22 @@ +import _ from 'lodash'; +import PropTypes from 'prop-types'; import React, {useCallback, useMemo} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import _ from 'lodash'; -import styles from '../../styles/styles'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import CONST from '../../CONST'; -import TextLink from '../../components/TextLink'; -import CheckboxWithLabel from '../../components/CheckboxWithLabel'; -import Text from '../../components/Text'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; +import CheckboxWithLabel from '@components/CheckboxWithLabel'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import useLocalize from '@hooks/useLocalize'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import IdentityForm from './IdentityForm'; -import * as ValidationUtils from '../../libs/ValidationUtils'; -import ONYXKEYS from '../../ONYXKEYS'; -import RequestorOnfidoStep from './RequestorOnfidoStep'; -import Form from '../../components/Form'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import useLocalize from '../../hooks/useLocalize'; import {reimbursementAccountPropTypes} from './reimbursementAccountPropTypes'; +import RequestorOnfidoStep from './RequestorOnfidoStep'; const propTypes = { onBackButtonPress: PropTypes.func.isRequired, diff --git a/src/pages/ReimbursementAccount/StepPropTypes.js b/src/pages/ReimbursementAccount/StepPropTypes.js index dc9734c6ecf7..04399230a1ab 100644 --- a/src/pages/ReimbursementAccount/StepPropTypes.js +++ b/src/pages/ReimbursementAccount/StepPropTypes.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; -import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; +import {withLocalizePropTypes} from '@components/withLocalize'; import reimbursementAccountDraftPropTypes from './ReimbursementAccountDraftPropTypes'; -import {withLocalizePropTypes} from '../../components/withLocalize'; +import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; export default { /** The bank account currently in setup */ diff --git a/src/pages/ReimbursementAccount/ValidationStep.js b/src/pages/ReimbursementAccount/ValidationStep.js index a63916db0784..5a0149aa3ba4 100644 --- a/src/pages/ReimbursementAccount/ValidationStep.js +++ b/src/pages/ReimbursementAccount/ValidationStep.js @@ -1,34 +1,34 @@ +import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import Str from 'expensify-common/lib/str'; import _ from 'underscore'; -import PropTypes from 'prop-types'; -import styles from '../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import * as Report from '../../libs/actions/Report'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import TextInput from '../../components/TextInput'; -import Text from '../../components/Text'; -import BankAccount from '../../libs/models/BankAccount'; -import TextLink from '../../components/TextLink'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as ValidationUtils from '../../libs/ValidationUtils'; +import Button from '@components/Button'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import MenuItem from '@components/MenuItem'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import BankAccount from '@libs/models/BankAccount'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import WorkspaceResetBankAccountModal from '@pages/workspace/WorkspaceResetBankAccountModal'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import Enable2FAPrompt from './Enable2FAPrompt'; import EnableStep from './EnableStep'; import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; -import Form from '../../components/Form'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import * as Illustrations from '../../components/Icon/Illustrations'; -import Section from '../../components/Section'; -import CONST from '../../CONST'; -import Button from '../../components/Button'; -import MenuItem from '../../components/MenuItem'; -import WorkspaceResetBankAccountModal from '../workspace/WorkspaceResetBankAccountModal'; -import Enable2FAPrompt from './Enable2FAPrompt'; -import ScreenWrapper from '../../components/ScreenWrapper'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/ReimbursementAccount/exampleCheckImage.js b/src/pages/ReimbursementAccount/exampleCheckImage.js index 071a2eb08289..c3fdbdd3984c 100644 --- a/src/pages/ReimbursementAccount/exampleCheckImage.js +++ b/src/pages/ReimbursementAccount/exampleCheckImage.js @@ -1,6 +1,6 @@ -import exampleCheckImageEn from '../../../assets/images/example-check-image-en.png'; -import exampleCheckImageEs from '../../../assets/images/example-check-image-es.png'; -import CONST from '../../CONST'; +import exampleCheckImageEn from '@assets/images/example-check-image-en.png'; +import exampleCheckImageEs from '@assets/images/example-check-image-es.png'; +import CONST from '@src/CONST'; const images = { [CONST.LOCALES.EN]: exampleCheckImageEn, diff --git a/src/pages/ReimbursementAccount/reimbursementAccountPropTypes.js b/src/pages/ReimbursementAccount/reimbursementAccountPropTypes.js index b1b5f30f7a76..8e94e2ad8f30 100644 --- a/src/pages/ReimbursementAccount/reimbursementAccountPropTypes.js +++ b/src/pages/ReimbursementAccount/reimbursementAccountPropTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import BankAccount from '../../libs/models/BankAccount'; +import BankAccount from '@libs/models/BankAccount'; const reimbursementAccountPropTypes = PropTypes.shape({ /** Whether we are loading the data via the API */ diff --git a/src/pages/ReportDetailsPage.js b/src/pages/ReportDetailsPage.js index 71eff57a246d..ef28102cc144 100644 --- a/src/pages/ReportDetailsPage.js +++ b/src/pages/ReportDetailsPage.js @@ -1,34 +1,34 @@ -import React, {useMemo} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useMemo} from 'react'; +import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import {View, ScrollView} from 'react-native'; -import RoomHeaderAvatars from '../components/RoomHeaderAvatars'; -import compose from '../libs/compose'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; -import ONYXKEYS from '../ONYXKEYS'; -import ScreenWrapper from '../components/ScreenWrapper'; -import Navigation from '../libs/Navigation/Navigation'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import styles from '../styles/styles'; -import DisplayNames from '../components/DisplayNames'; -import * as OptionsListUtils from '../libs/OptionsListUtils'; -import * as ReportUtils from '../libs/ReportUtils'; -import * as PolicyUtils from '../libs/PolicyUtils'; -import * as Report from '../libs/actions/Report'; -import participantPropTypes from '../components/participantPropTypes'; -import * as Expensicons from '../components/Icon/Expensicons'; -import ROUTES from '../ROUTES'; -import MenuItem from '../components/MenuItem'; -import Text from '../components/Text'; -import CONST from '../CONST'; -import reportPropTypes from './reportPropTypes'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import DisplayNames from '@components/DisplayNames'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import MultipleAvatars from '@components/MultipleAvatars'; +import ParentNavigationSubtitle from '@components/ParentNavigationSubtitle'; +import participantPropTypes from '@components/participantPropTypes'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import RoomHeaderAvatars from '@components/RoomHeaderAvatars'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import withReportOrNotFound from './home/report/withReportOrNotFound'; -import FullPageNotFoundView from '../components/BlockingViews/FullPageNotFoundView'; -import PressableWithoutFeedback from '../components/Pressable/PressableWithoutFeedback'; -import ParentNavigationSubtitle from '../components/ParentNavigationSubtitle'; -import MultipleAvatars from '../components/MultipleAvatars'; +import reportPropTypes from './reportPropTypes'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/ReportParticipantsPage.js b/src/pages/ReportParticipantsPage.js index db56a8006e76..c2179c53126b 100755 --- a/src/pages/ReportParticipantsPage.js +++ b/src/pages/ReportParticipantsPage.js @@ -1,26 +1,26 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; -import _ from 'underscore'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import styles from '../styles/styles'; -import ONYXKEYS from '../ONYXKEYS'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import Navigation from '../libs/Navigation/Navigation'; -import ScreenWrapper from '../components/ScreenWrapper'; -import OptionsList from '../components/OptionsList'; -import ROUTES from '../ROUTES'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import OptionsList from '@components/OptionsList'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as UserUtils from '@libs/UserUtils'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import withReportOrNotFound from './home/report/withReportOrNotFound'; import personalDetailsPropType from './personalDetailsPropType'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; -import compose from '../libs/compose'; -import * as ReportUtils from '../libs/ReportUtils'; import reportPropTypes from './reportPropTypes'; -import withReportOrNotFound from './home/report/withReportOrNotFound'; -import FullPageNotFoundView from '../components/BlockingViews/FullPageNotFoundView'; -import CONST from '../CONST'; -import * as UserUtils from '../libs/UserUtils'; -import * as LocalePhoneNumber from '../libs/LocalePhoneNumber'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/ReportWelcomeMessagePage.js b/src/pages/ReportWelcomeMessagePage.js index 11a9c7784c1d..c4d91088eff0 100644 --- a/src/pages/ReportWelcomeMessagePage.js +++ b/src/pages/ReportWelcomeMessagePage.js @@ -1,28 +1,28 @@ -import React, {useCallback, useRef, useState} from 'react'; +import {useFocusEffect} from '@react-navigation/native'; +import ExpensiMark from 'expensify-common/lib/ExpensiMark'; import PropTypes from 'prop-types'; -import {withOnyx} from 'react-native-onyx'; +import React, {useCallback, useRef, useState} from 'react'; import {View} from 'react-native'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import {useFocusEffect} from '@react-navigation/native'; -import compose from '../libs/compose'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; -import ScreenWrapper from '../components/ScreenWrapper'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import styles from '../styles/styles'; -import reportPropTypes from './reportPropTypes'; +import {withOnyx} from 'react-native-onyx'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import updateMultilineInputRange from '@libs/UpdateMultilineInputRange'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import withReportOrNotFound from './home/report/withReportOrNotFound'; -import Text from '../components/Text'; -import TextInput from '../components/TextInput'; -import * as Report from '../libs/actions/Report'; -import ONYXKEYS from '../ONYXKEYS'; -import CONST from '../CONST'; -import FullPageNotFoundView from '../components/BlockingViews/FullPageNotFoundView'; -import Form from '../components/Form'; -import * as PolicyUtils from '../libs/PolicyUtils'; -import {policyPropTypes, policyDefaultProps} from './workspace/withPolicy'; -import ROUTES from '../ROUTES'; -import Navigation from '../libs/Navigation/Navigation'; -import updateMultilineInputRange from '../libs/UpdateMultilineInputRange'; +import reportPropTypes from './reportPropTypes'; +import {policyDefaultProps, policyPropTypes} from './workspace/withPolicy'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/RoomInvitePage.js b/src/pages/RoomInvitePage.js index 5021ccdc42d7..71585fefbcd3 100644 --- a/src/pages/RoomInvitePage.js +++ b/src/pages/RoomInvitePage.js @@ -1,31 +1,31 @@ -import React, {useEffect, useMemo, useState, useCallback} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import ScreenWrapper from '../components/ScreenWrapper'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import Navigation from '../libs/Navigation/Navigation'; -import styles from '../styles/styles'; -import compose from '../libs/compose'; -import ONYXKEYS from '../ONYXKEYS'; -import FormAlertWithSubmitButton from '../components/FormAlertWithSubmitButton'; -import * as OptionsListUtils from '../libs/OptionsListUtils'; -import CONST from '../CONST'; -import {policyDefaultProps, policyPropTypes} from './workspace/withPolicy'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import useLocalize from '@hooks/useLocalize'; +import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import Permissions from '@libs/Permissions'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import withReportOrNotFound from './home/report/withReportOrNotFound'; -import reportPropTypes from './reportPropTypes'; -import FullPageNotFoundView from '../components/BlockingViews/FullPageNotFoundView'; -import ROUTES from '../ROUTES'; -import * as PolicyUtils from '../libs/PolicyUtils'; -import useLocalize from '../hooks/useLocalize'; -import SelectionList from '../components/SelectionList'; -import * as Report from '../libs/actions/Report'; -import * as ReportUtils from '../libs/ReportUtils'; -import Permissions from '../libs/Permissions'; import personalDetailsPropType from './personalDetailsPropType'; -import * as Browser from '../libs/Browser'; +import reportPropTypes from './reportPropTypes'; +import {policyDefaultProps, policyPropTypes} from './workspace/withPolicy'; const propTypes = { /** Beta features list */ diff --git a/src/pages/RoomMembersPage.js b/src/pages/RoomMembersPage.js index 3a6e3b6fd90f..a2599b3382d7 100644 --- a/src/pages/RoomMembersPage.js +++ b/src/pages/RoomMembersPage.js @@ -1,34 +1,34 @@ -import React, {useMemo, useState, useCallback, useEffect} from 'react'; -import _ from 'underscore'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import styles from '../styles/styles'; -import compose from '../libs/compose'; -import CONST from '../CONST'; -import ONYXKEYS from '../ONYXKEYS'; -import ROUTES from '../ROUTES'; -import Navigation from '../libs/Navigation/Navigation'; -import ScreenWrapper from '../components/ScreenWrapper'; -import FullPageNotFoundView from '../components/BlockingViews/FullPageNotFoundView'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import ConfirmModal from '../components/ConfirmModal'; -import Button from '../components/Button'; -import SelectionList from '../components/SelectionList'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../components/withWindowDimensions'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import Button from '@components/Button'; +import ConfirmModal from '@components/ConfirmModal'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; +import Log from '@libs/Log'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import Permissions from '@libs/Permissions'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as UserUtils from '@libs/UserUtils'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import withReportOrNotFound from './home/report/withReportOrNotFound'; import personalDetailsPropType from './personalDetailsPropType'; import reportPropTypes from './reportPropTypes'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '../components/withCurrentUserPersonalDetails'; -import * as PolicyUtils from '../libs/PolicyUtils'; -import * as OptionsListUtils from '../libs/OptionsListUtils'; -import * as UserUtils from '../libs/UserUtils'; -import * as Report from '../libs/actions/Report'; -import * as ReportUtils from '../libs/ReportUtils'; -import Permissions from '../libs/Permissions'; -import Log from '../libs/Log'; -import * as Browser from '../libs/Browser'; const propTypes = { /** All personal details asssociated with user */ diff --git a/src/pages/SearchPage.js b/src/pages/SearchPage.js index c671e7b1a096..f312ef2aa307 100755 --- a/src/pages/SearchPage.js +++ b/src/pages/SearchPage.js @@ -1,27 +1,27 @@ -import _ from 'underscore'; +import PropTypes from 'prop-types'; import React, {Component} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; -import OptionsSelector from '../components/OptionsSelector'; -import * as OptionsListUtils from '../libs/OptionsListUtils'; -import * as ReportUtils from '../libs/ReportUtils'; -import ONYXKEYS from '../ONYXKEYS'; -import styles from '../styles/styles'; -import Navigation from '../libs/Navigation/Navigation'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../components/withWindowDimensions'; -import * as Report from '../libs/actions/Report'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import ScreenWrapper from '../components/ScreenWrapper'; -import Timing from '../libs/actions/Timing'; -import CONST from '../CONST'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; -import compose from '../libs/compose'; +import _ from 'underscore'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import OptionsSelector from '@components/OptionsSelector'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import Performance from '@libs/Performance'; +import * as ReportUtils from '@libs/ReportUtils'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import Timing from '@userActions/Timing'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import personalDetailsPropType from './personalDetailsPropType'; import reportPropTypes from './reportPropTypes'; -import Performance from '../libs/Performance'; -import networkPropTypes from '../components/networkPropTypes'; -import {withNetwork} from '../components/OnyxProvider'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/ShareCodePage.js b/src/pages/ShareCodePage.js index d6a6b79d3273..b2bc32b381ce 100644 --- a/src/pages/ShareCodePage.js +++ b/src/pages/ShareCodePage.js @@ -1,28 +1,28 @@ +import PropTypes from 'prop-types'; import React from 'react'; -import {View, ScrollView} from 'react-native'; +import {ScrollView, View} from 'react-native'; import _ from 'underscore'; -import PropTypes from 'prop-types'; -import ScreenWrapper from '../components/ScreenWrapper'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; -import Navigation from '../libs/Navigation/Navigation'; -import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; -import QRShareWithDownload from '../components/QRShare/QRShareWithDownload'; -import compose from '../libs/compose'; +import expensifyLogo from '@assets/images/expensify-logo-round-transparent.png'; +import ContextMenuItem from '@components/ContextMenuItem'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import QRShareWithDownload from '@components/QRShare/QRShareWithDownload'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import withEnvironment from '@components/withEnvironment'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import Clipboard from '@libs/Clipboard'; +import compose from '@libs/compose'; +import getPlatform from '@libs/getPlatform'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as Url from '@libs/Url'; +import * as UserUtils from '@libs/UserUtils'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; import reportPropTypes from './reportPropTypes'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '../components/withCurrentUserPersonalDetails'; -import styles from '../styles/styles'; -import expensifyLogo from '../../assets/images/expensify-logo-round-transparent.png'; -import * as ReportUtils from '../libs/ReportUtils'; -import MenuItem from '../components/MenuItem'; -import Clipboard from '../libs/Clipboard'; -import * as Expensicons from '../components/Icon/Expensicons'; -import getPlatform from '../libs/getPlatform'; -import CONST from '../CONST'; -import ContextMenuItem from '../components/ContextMenuItem'; -import * as UserUtils from '../libs/UserUtils'; -import ROUTES from '../ROUTES'; -import withEnvironment from '../components/withEnvironment'; -import * as Url from '../libs/Url'; const propTypes = { /** The report currently being looked at */ diff --git a/src/pages/TeachersUnite/ImTeacherPage.js b/src/pages/TeachersUnite/ImTeacherPage.js index a938abf81b79..62cd4529611b 100644 --- a/src/pages/TeachersUnite/ImTeacherPage.js +++ b/src/pages/TeachersUnite/ImTeacherPage.js @@ -1,8 +1,8 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as LoginUtils from '../../libs/LoginUtils'; +import * as LoginUtils from '@libs/LoginUtils'; +import ONYXKEYS from '@src/ONYXKEYS'; import ImTeacherUpdateEmailPage from './ImTeacherUpdateEmailPage'; import IntroSchoolPrincipalPage from './IntroSchoolPrincipalPage'; diff --git a/src/pages/TeachersUnite/ImTeacherUpdateEmailPage.js b/src/pages/TeachersUnite/ImTeacherUpdateEmailPage.js index de83c71a01c7..5d7c1d960e3a 100644 --- a/src/pages/TeachersUnite/ImTeacherUpdateEmailPage.js +++ b/src/pages/TeachersUnite/ImTeacherUpdateEmailPage.js @@ -1,15 +1,15 @@ import React from 'react'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import ROUTES from '../../ROUTES'; -import Navigation from '../../libs/Navigation/Navigation'; -import FixedFooter from '../../components/FixedFooter'; -import styles from '../../styles/styles'; -import Button from '../../components/Button'; -import * as Illustrations from '../../components/Icon/Illustrations'; -import variables from '../../styles/variables'; -import useLocalize from '../../hooks/useLocalize'; -import BlockingView from '../../components/BlockingViews/BlockingView'; +import BlockingView from '@components/BlockingViews/BlockingView'; +import Button from '@components/Button'; +import FixedFooter from '@components/FixedFooter'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Illustrations from '@components/Icon/Illustrations'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import ROUTES from '@src/ROUTES'; const propTypes = {}; diff --git a/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js b/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js index 207ff0664053..25997fa9b307 100644 --- a/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js +++ b/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js @@ -1,24 +1,24 @@ +import Str from 'expensify-common/lib/str'; +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useCallback} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import Str from 'expensify-common/lib/str'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Form from '../../components/Form'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import TextInput from '../../components/TextInput'; -import Text from '../../components/Text'; -import styles from '../../styles/styles'; -import * as ErrorUtils from '../../libs/ErrorUtils'; -import ROUTES from '../../ROUTES'; -import Navigation from '../../libs/Navigation/Navigation'; -import TeachersUnite from '../../libs/actions/TeachersUnite'; -import useLocalize from '../../hooks/useLocalize'; -import * as ValidationUtils from '../../libs/ValidationUtils'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import useLocalize from '@hooks/useLocalize'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import TeachersUnite from '@userActions/TeachersUnite'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Login list for the user that is signed in */ diff --git a/src/pages/TeachersUnite/KnowATeacherPage.js b/src/pages/TeachersUnite/KnowATeacherPage.js index f6506b96d3f2..d8dcc74faac0 100644 --- a/src/pages/TeachersUnite/KnowATeacherPage.js +++ b/src/pages/TeachersUnite/KnowATeacherPage.js @@ -1,25 +1,25 @@ -import React, {useCallback} from 'react'; +import Str from 'expensify-common/lib/str'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import Str from 'expensify-common/lib/str'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Form from '../../components/Form'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import * as LoginUtils from '../../libs/LoginUtils'; -import TextInput from '../../components/TextInput'; -import Text from '../../components/Text'; -import styles from '../../styles/styles'; -import * as ErrorUtils from '../../libs/ErrorUtils'; -import ROUTES from '../../ROUTES'; -import Navigation from '../../libs/Navigation/Navigation'; -import TeachersUnite from '../../libs/actions/TeachersUnite'; -import useLocalize from '../../hooks/useLocalize'; -import * as ValidationUtils from '../../libs/ValidationUtils'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import useLocalize from '@hooks/useLocalize'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import * as LoginUtils from '@libs/LoginUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import TeachersUnite from '@userActions/TeachersUnite'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Login list for the user that is signed in */ diff --git a/src/pages/TeachersUnite/SaveTheWorldPage.js b/src/pages/TeachersUnite/SaveTheWorldPage.js index 5f252c960f8c..76e4c42294c1 100644 --- a/src/pages/TeachersUnite/SaveTheWorldPage.js +++ b/src/pages/TeachersUnite/SaveTheWorldPage.js @@ -1,20 +1,20 @@ +import _ from 'lodash'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import _ from 'lodash'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import SCREENS from '../../SCREENS'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import styles from '../../styles/styles'; -import themeColors from '../../styles/themes/default'; -import Text from '../../components/Text'; -import MenuItem from '../../components/MenuItem'; -import IllustratedHeaderPageLayout from '../../components/IllustratedHeaderPageLayout'; -import * as LottieAnimations from '../../components/LottieAnimations'; -import useLocalize from '../../hooks/useLocalize'; +import IllustratedHeaderPageLayout from '@components/IllustratedHeaderPageLayout'; +import * as LottieAnimations from '@components/LottieAnimations'; +import MenuItem from '@components/MenuItem'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; const propTypes = { /** The list of this user's policies */ diff --git a/src/pages/UnlinkLoginPage.js b/src/pages/UnlinkLoginPage.js index 67c073820bc0..ecaae0a84482 100644 --- a/src/pages/UnlinkLoginPage.js +++ b/src/pages/UnlinkLoginPage.js @@ -1,14 +1,14 @@ -import React, {useEffect} from 'react'; -import PropTypes from 'prop-types'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; -import {propTypes as validateLinkPropTypes, defaultProps as validateLinkDefaultProps} from './ValidateLoginPage/validateLinkPropTypes'; -import FullScreenLoadingIndicator from '../components/FullscreenLoadingIndicator'; -import Navigation from '../libs/Navigation/Navigation'; -import * as Session from '../libs/actions/Session'; -import ROUTES from '../ROUTES'; -import usePrevious from '../hooks/usePrevious'; -import ONYXKEYS from '../ONYXKEYS'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import usePrevious from '@hooks/usePrevious'; +import Navigation from '@libs/Navigation/Navigation'; +import * as Session from '@userActions/Session'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {defaultProps as validateLinkDefaultProps, propTypes as validateLinkPropTypes} from './ValidateLoginPage/validateLinkPropTypes'; const propTypes = { /** The accountID and validateCode are passed via the URL */ diff --git a/src/pages/ValidateLoginPage/index.js b/src/pages/ValidateLoginPage/index.js index 0af978172822..6939ee07f665 100644 --- a/src/pages/ValidateLoginPage/index.js +++ b/src/pages/ValidateLoginPage/index.js @@ -1,12 +1,12 @@ -import React, {useEffect} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import {propTypes as validateLinkPropTypes, defaultProps as validateLinkDefaultProps} from './validateLinkPropTypes'; -import FullScreenLoadingIndicator from '../../components/FullscreenLoadingIndicator'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as Session from '../../libs/actions/Session'; -import Navigation from '../../libs/Navigation/Navigation'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import Navigation from '@libs/Navigation/Navigation'; +import * as Session from '@userActions/Session'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {defaultProps as validateLinkDefaultProps, propTypes as validateLinkPropTypes} from './validateLinkPropTypes'; const propTypes = { /** The accountID and validateCode are passed via the URL */ diff --git a/src/pages/ValidateLoginPage/index.website.js b/src/pages/ValidateLoginPage/index.website.js index 4ac12b3193f3..677abd70f6db 100644 --- a/src/pages/ValidateLoginPage/index.website.js +++ b/src/pages/ValidateLoginPage/index.website.js @@ -1,16 +1,16 @@ -import React, {useEffect} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import {propTypes as validateLinkPropTypes, defaultProps as validateLinkDefaultProps} from './validateLinkPropTypes'; -import FullScreenLoadingIndicator from '../../components/FullscreenLoadingIndicator'; -import ValidateCodeModal from '../../components/ValidateCode/ValidateCodeModal'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as Session from '../../libs/actions/Session'; -import ExpiredValidateCodeModal from '../../components/ValidateCode/ExpiredValidateCodeModal'; -import Navigation from '../../libs/Navigation/Navigation'; -import CONST from '../../CONST'; -import JustSignedInModal from '../../components/ValidateCode/JustSignedInModal'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import ExpiredValidateCodeModal from '@components/ValidateCode/ExpiredValidateCodeModal'; +import JustSignedInModal from '@components/ValidateCode/JustSignedInModal'; +import ValidateCodeModal from '@components/ValidateCode/ValidateCodeModal'; +import Navigation from '@libs/Navigation/Navigation'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {defaultProps as validateLinkDefaultProps, propTypes as validateLinkPropTypes} from './validateLinkPropTypes'; const propTypes = { /** The accountID and validateCode are passed via the URL */ diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 5b1a7f897c3e..36c48bd48fd2 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -4,37 +4,37 @@ import React, {memo} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import GoogleMeetIcon from '../../../assets/images/google-meet.svg'; -import ZoomIcon from '../../../assets/images/zoom-icon.svg'; -import CONST from '../../CONST'; -import ONYXKEYS from '../../ONYXKEYS'; -import DisplayNames from '../../components/DisplayNames'; -import Icon from '../../components/Icon'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import MultipleAvatars from '../../components/MultipleAvatars'; -import ParentNavigationSubtitle from '../../components/ParentNavigationSubtitle'; -import PressableWithoutFeedback from '../../components/Pressable/PressableWithoutFeedback'; -import SubscriptAvatar from '../../components/SubscriptAvatar'; -import TaskHeaderActionButton from '../../components/TaskHeaderActionButton'; -import Text from '../../components/Text'; -import ThreeDotsMenu from '../../components/ThreeDotsMenu'; -import Tooltip from '../../components/Tooltip'; -import participantPropTypes from '../../components/participantPropTypes'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; -import * as HeaderUtils from '../../libs/HeaderUtils'; -import * as ReportActionsUtils from '../../libs/ReportActionsUtils'; -import * as ReportUtils from '../../libs/ReportUtils'; -import * as Link from '../../libs/actions/Link'; -import * as Report from '../../libs/actions/Report'; -import * as Task from '../../libs/actions/Task'; -import compose from '../../libs/compose'; -import * as Session from '../../libs/actions/Session'; -import styles from '../../styles/styles'; -import themeColors from '../../styles/themes/default'; -import reportPropTypes from '../reportPropTypes'; -import reportWithoutHasDraftSelector from '../../libs/OnyxSelectors/reportWithoutHasDraftSelector'; +import GoogleMeetIcon from '@assets/images/google-meet.svg'; +import ZoomIcon from '@assets/images/zoom-icon.svg'; +import DisplayNames from '@components/DisplayNames'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MultipleAvatars from '@components/MultipleAvatars'; +import ParentNavigationSubtitle from '@components/ParentNavigationSubtitle'; +import participantPropTypes from '@components/participantPropTypes'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import SubscriptAvatar from '@components/SubscriptAvatar'; +import TaskHeaderActionButton from '@components/TaskHeaderActionButton'; +import Text from '@components/Text'; +import ThreeDotsMenu from '@components/ThreeDotsMenu'; +import Tooltip from '@components/Tooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import * as HeaderUtils from '@libs/HeaderUtils'; +import reportWithoutHasDraftSelector from '@libs/OnyxSelectors/reportWithoutHasDraftSelector'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as Link from '@userActions/Link'; +import * as Report from '@userActions/Report'; +import * as Session from '@userActions/Session'; +import * as Task from '@userActions/Task'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Toggles the navigationMenu open and closed */ diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index f7ab1767aade..2ccc5246da81 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -1,45 +1,45 @@ -import React, {useRef, useState, useEffect, useMemo, useCallback} from 'react'; -import {withOnyx} from 'react-native-onyx'; import {useFocusEffect} from '@react-navigation/native'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {View} from 'react-native'; -import lodashGet from 'lodash/get'; +import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import styles from '../../styles/styles'; -import ScreenWrapper from '../../components/ScreenWrapper'; +import Banner from '@components/Banner'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import DragAndDropProvider from '@components/DragAndDrop/Provider'; +import MoneyReportHeader from '@components/MoneyReportHeader'; +import MoneyRequestHeader from '@components/MoneyRequestHeader'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import ReportActionsSkeletonView from '@components/ReportActionsSkeletonView'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TaskHeaderActionButton from '@components/TaskHeaderActionButton'; +import withCurrentReportID, {withCurrentReportIDDefaultProps, withCurrentReportIDPropTypes} from '@components/withCurrentReportID'; +import withViewportOffsetTop from '@components/withViewportOffsetTop'; +import useLocalize from '@hooks/useLocalize'; +import usePrevious from '@hooks/usePrevious'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import compose from '@libs/compose'; +import getIsReportFullyVisible from '@libs/getIsReportFullyVisible'; +import Navigation from '@libs/Navigation/Navigation'; +import reportWithoutHasDraftSelector from '@libs/OnyxSelectors/reportWithoutHasDraftSelector'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import Visibility from '@libs/Visibility'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import reportMetadataPropTypes from '@pages/reportMetadataPropTypes'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as ComposerActions from '@userActions/Composer'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import HeaderView from './HeaderView'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import * as Report from '../../libs/actions/Report'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as ReportUtils from '../../libs/ReportUtils'; -import ReportActionsView from './report/ReportActionsView'; -import ReportActionsSkeletonView from '../../components/ReportActionsSkeletonView'; import reportActionPropTypes from './report/reportActionPropTypes'; -import compose from '../../libs/compose'; -import Visibility from '../../libs/Visibility'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; -import useLocalize from '../../hooks/useLocalize'; -import OfflineWithFeedback from '../../components/OfflineWithFeedback'; +import ReportActionsView from './report/ReportActionsView'; import ReportFooter from './report/ReportFooter'; -import Banner from '../../components/Banner'; -import reportPropTypes from '../reportPropTypes'; -import reportMetadataPropTypes from '../reportMetadataPropTypes'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import withViewportOffsetTop from '../../components/withViewportOffsetTop'; -import * as ReportActionsUtils from '../../libs/ReportActionsUtils'; -import personalDetailsPropType from '../personalDetailsPropType'; -import getIsReportFullyVisible from '../../libs/getIsReportFullyVisible'; -import MoneyRequestHeader from '../../components/MoneyRequestHeader'; -import MoneyReportHeader from '../../components/MoneyReportHeader'; -import * as ComposerActions from '../../libs/actions/Composer'; import {ActionListContext, ReactionListContext} from './ReportScreenContext'; -import TaskHeaderActionButton from '../../components/TaskHeaderActionButton'; -import DragAndDropProvider from '../../components/DragAndDrop/Provider'; -import usePrevious from '../../hooks/usePrevious'; -import CONST from '../../CONST'; -import withCurrentReportID, {withCurrentReportIDPropTypes, withCurrentReportIDDefaultProps} from '../../components/withCurrentReportID'; -import reportWithoutHasDraftSelector from '../../libs/OnyxSelectors/reportWithoutHasDraftSelector'; const propTypes = { /** Navigation route context info provided by react navigation */ diff --git a/src/pages/home/ReportScreenContext.ts b/src/pages/home/ReportScreenContext.ts index 83f76d8d8e2f..ab85c9e3afb9 100644 --- a/src/pages/home/ReportScreenContext.ts +++ b/src/pages/home/ReportScreenContext.ts @@ -1,4 +1,4 @@ -import {RefObject, createContext} from 'react'; +import {createContext, RefObject} from 'react'; import {FlatList, GestureResponderEvent} from 'react-native'; type ReactionListRef = { diff --git a/src/pages/home/report/AnimatedEmptyStateBackground.js b/src/pages/home/report/AnimatedEmptyStateBackground.js index 6d85e4d7fc85..6091347a24a2 100644 --- a/src/pages/home/report/AnimatedEmptyStateBackground.js +++ b/src/pages/home/report/AnimatedEmptyStateBackground.js @@ -1,11 +1,11 @@ import React from 'react'; import Animated, {SensorType, useAnimatedSensor, useAnimatedStyle, useSharedValue, withSpring} from 'react-native-reanimated'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; -import * as NumberUtils from '../../../libs/NumberUtils'; -import EmptyStateBackgroundImage from '../../../../assets/images/empty-state_background-fade.png'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import variables from '../../../styles/variables'; -import CONST from '../../../CONST'; +import EmptyStateBackgroundImage from '@assets/images/empty-state_background-fade.png'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as NumberUtils from '@libs/NumberUtils'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; const IMAGE_OFFSET_Y = 75; diff --git a/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js b/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js index 91fe38784e9c..18351f86a400 100755 --- a/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js +++ b/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js @@ -1,24 +1,24 @@ -import React, {useRef, useMemo, useState, memo} from 'react'; -import {InteractionManager, View} from 'react-native'; import lodashGet from 'lodash/get'; -import _ from 'underscore'; import PropTypes from 'prop-types'; +import React, {memo, useMemo, useRef, useState} from 'react'; +import {InteractionManager, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import getReportActionContextMenuStyles from '../../../../styles/getReportActionContextMenuStyles'; -import ContextMenuItem from '../../../../components/ContextMenuItem'; -import {propTypes as genericReportActionContextMenuPropTypes, defaultProps as GenericReportActionContextMenuDefaultProps} from './genericReportActionContextMenuPropTypes'; -import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize'; +import _ from 'underscore'; +import ContextMenuItem from '@components/ContextMenuItem'; +import {withBetas} from '@components/OnyxProvider'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import useArrowKeyFocusManager from '@hooks/useArrowKeyFocusManager'; +import useKeyboardShortcut from '@hooks/useKeyboardShortcut'; +import useNetwork from '@hooks/useNetwork'; +import compose from '@libs/compose'; +import getReportActionContextMenuStyles from '@styles/getReportActionContextMenuStyles'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import ContextMenuActions, {CONTEXT_MENU_TYPES} from './ContextMenuActions'; -import compose from '../../../../libs/compose'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../../components/withWindowDimensions'; -import {withBetas} from '../../../../components/OnyxProvider'; -import * as Session from '../../../../libs/actions/Session'; +import {defaultProps as GenericReportActionContextMenuDefaultProps, propTypes as genericReportActionContextMenuPropTypes} from './genericReportActionContextMenuPropTypes'; import {hideContextMenu} from './ReportActionContextMenu'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import CONST from '../../../../CONST'; -import useArrowKeyFocusManager from '../../../../hooks/useArrowKeyFocusManager'; -import useKeyboardShortcut from '../../../../hooks/useKeyboardShortcut'; -import useNetwork from '../../../../hooks/useNetwork'; const propTypes = { /** String representing the context menu type [LINK, REPORT_ACTION] which controls context menu choices */ diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 4e7118212b49..5a1266d15a42 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -1,27 +1,27 @@ -import React from 'react'; -import _ from 'underscore'; import ExpensiMark from 'expensify-common/lib/ExpensiMark'; import lodashGet from 'lodash/get'; -import * as Expensicons from '../../../../components/Icon/Expensicons'; -import * as Report from '../../../../libs/actions/Report'; -import * as Download from '../../../../libs/actions/Download'; -import Clipboard from '../../../../libs/Clipboard'; -import * as ReportUtils from '../../../../libs/ReportUtils'; -import * as ReportActionsUtils from '../../../../libs/ReportActionsUtils'; -import * as PersonalDetailsUtils from '../../../../libs/PersonalDetailsUtils'; -import ReportActionComposeFocusManager from '../../../../libs/ReportActionComposeFocusManager'; -import {hideContextMenu, showDeleteModal, clearActiveReportAction} from './ReportActionContextMenu'; -import CONST from '../../../../CONST'; -import getAttachmentDetails from '../../../../libs/fileDownload/getAttachmentDetails'; -import fileDownload from '../../../../libs/fileDownload'; -import addEncryptedAuthTokenToURL from '../../../../libs/addEncryptedAuthTokenToURL'; -import * as Environment from '../../../../libs/Environment/Environment'; -import Permissions from '../../../../libs/Permissions'; -import QuickEmojiReactions from '../../../../components/Reactions/QuickEmojiReactions'; -import MiniQuickEmojiReactions from '../../../../components/Reactions/MiniQuickEmojiReactions'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import ROUTES from '../../../../ROUTES'; -import * as Task from '../../../../libs/actions/Task'; +import React from 'react'; +import _ from 'underscore'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MiniQuickEmojiReactions from '@components/Reactions/MiniQuickEmojiReactions'; +import QuickEmojiReactions from '@components/Reactions/QuickEmojiReactions'; +import addEncryptedAuthTokenToURL from '@libs/addEncryptedAuthTokenToURL'; +import Clipboard from '@libs/Clipboard'; +import * as Environment from '@libs/Environment/Environment'; +import fileDownload from '@libs/fileDownload'; +import getAttachmentDetails from '@libs/fileDownload/getAttachmentDetails'; +import Navigation from '@libs/Navigation/Navigation'; +import Permissions from '@libs/Permissions'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; +import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as Download from '@userActions/Download'; +import * as Report from '@userActions/Report'; +import * as Task from '@userActions/Task'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; +import {clearActiveReportAction, hideContextMenu, showDeleteModal} from './ReportActionContextMenu'; /** * Gets the HTML version of the message in an action. diff --git a/src/pages/home/report/ContextMenu/MiniReportActionContextMenu/index.js b/src/pages/home/report/ContextMenu/MiniReportActionContextMenu/index.js index 60ed7ed989b0..ef28a2690af4 100644 --- a/src/pages/home/report/ContextMenu/MiniReportActionContextMenu/index.js +++ b/src/pages/home/report/ContextMenu/MiniReportActionContextMenu/index.js @@ -1,11 +1,14 @@ -import _ from 'underscore'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import {propTypes as genericReportActionContextMenuPropTypes, defaultProps as GenericReportActionContextMenuDefaultProps} from '../genericReportActionContextMenuPropTypes'; -import * as StyleUtils from '../../../../../styles/StyleUtils'; -import BaseReportActionContextMenu from '../BaseReportActionContextMenu'; -import CONST from '../../../../../CONST'; +import _ from 'underscore'; +import BaseReportActionContextMenu from '@pages/home/report/ContextMenu/BaseReportActionContextMenu'; +import { + defaultProps as GenericReportActionContextMenuDefaultProps, + propTypes as genericReportActionContextMenuPropTypes, +} from '@pages/home/report/ContextMenu/genericReportActionContextMenuPropTypes'; +import * as StyleUtils from '@styles/StyleUtils'; +import CONST from '@src/CONST'; const propTypes = { ..._.omit(genericReportActionContextMenuPropTypes, ['isMini']), diff --git a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js index d342fc225d63..7f60b9d9b4d5 100644 --- a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js +++ b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js @@ -1,13 +1,13 @@ -import React, {forwardRef, useEffect, useState, useRef, useImperativeHandle, useCallback} from 'react'; +import React, {forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState} from 'react'; import {Dimensions} from 'react-native'; import _ from 'underscore'; -import * as Report from '../../../../libs/actions/Report'; -import PopoverWithMeasuredContent from '../../../../components/PopoverWithMeasuredContent'; +import ConfirmModal from '@components/ConfirmModal'; +import PopoverWithMeasuredContent from '@components/PopoverWithMeasuredContent'; +import useLocalize from '@hooks/useLocalize'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as IOU from '@userActions/IOU'; +import * as Report from '@userActions/Report'; import BaseReportActionContextMenu from './BaseReportActionContextMenu'; -import ConfirmModal from '../../../../components/ConfirmModal'; -import * as ReportActionsUtils from '../../../../libs/ReportActionsUtils'; -import * as IOU from '../../../../libs/actions/IOU'; -import useLocalize from '../../../../hooks/useLocalize'; function PopoverReportActionContextMenu(_props, ref) { const {translate} = useLocalize(); diff --git a/src/pages/home/report/FloatingMessageCounter/FloatingMessageCounterContainer/index.android.js b/src/pages/home/report/FloatingMessageCounter/FloatingMessageCounterContainer/index.android.js index c533a9ca1e3b..93437393a5c5 100644 --- a/src/pages/home/report/FloatingMessageCounter/FloatingMessageCounterContainer/index.android.js +++ b/src/pages/home/report/FloatingMessageCounter/FloatingMessageCounterContainer/index.android.js @@ -1,6 +1,6 @@ import React from 'react'; -import {View, Animated} from 'react-native'; -import styles from '../../../../../styles/styles'; +import {Animated, View} from 'react-native'; +import styles from '@styles/styles'; import floatingMessageCounterContainerPropTypes from './floatingMessageCounterContainerPropTypes'; function FloatingMessageCounterContainer(props) { diff --git a/src/pages/home/report/FloatingMessageCounter/FloatingMessageCounterContainer/index.js b/src/pages/home/report/FloatingMessageCounter/FloatingMessageCounterContainer/index.js index 134312aa7af5..2137fa07b573 100644 --- a/src/pages/home/report/FloatingMessageCounter/FloatingMessageCounterContainer/index.js +++ b/src/pages/home/report/FloatingMessageCounter/FloatingMessageCounterContainer/index.js @@ -1,6 +1,6 @@ import React from 'react'; import {Animated} from 'react-native'; -import styles from '../../../../../styles/styles'; +import styles from '@styles/styles'; import floatingMessageCounterContainerPropTypes from './floatingMessageCounterContainerPropTypes'; function FloatingMessageCounterContainer(props) { diff --git a/src/pages/home/report/FloatingMessageCounter/index.js b/src/pages/home/report/FloatingMessageCounter/index.js index a4e2d25d9490..a2a0e9a3b21b 100644 --- a/src/pages/home/report/FloatingMessageCounter/index.js +++ b/src/pages/home/report/FloatingMessageCounter/index.js @@ -1,16 +1,16 @@ -import React, {useEffect, useMemo, useCallback} from 'react'; -import {Animated, View} from 'react-native'; import PropTypes from 'prop-types'; -import CONST from '../../../../CONST'; -import styles from '../../../../styles/styles'; -import Button from '../../../../components/Button'; -import Text from '../../../../components/Text'; -import Icon from '../../../../components/Icon'; -import * as Expensicons from '../../../../components/Icon/Expensicons'; -import themeColors from '../../../../styles/themes/default'; -import useLocalize from '../../../../hooks/useLocalize'; +import React, {useCallback, useEffect, useMemo} from 'react'; +import {Animated, View} from 'react-native'; +import Button from '@components/Button'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import useNativeDriver from '@libs/useNativeDriver'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; import FloatingMessageCounterContainer from './FloatingMessageCounterContainer'; -import useNativeDriver from '../../../../libs/useNativeDriver'; const propTypes = { /** Whether the New Messages indicator is active */ diff --git a/src/pages/home/report/LinkPreviewer.js b/src/pages/home/report/LinkPreviewer.js index 4fcbb0dc0569..ebdab22a1c1e 100644 --- a/src/pages/home/report/LinkPreviewer.js +++ b/src/pages/home/report/LinkPreviewer.js @@ -1,14 +1,14 @@ -import React from 'react'; -import {View, Image} from 'react-native'; +import {uniqBy} from 'lodash'; import PropTypes from 'prop-types'; +import React from 'react'; +import {Image, View} from 'react-native'; import _ from 'underscore'; -import {uniqBy} from 'lodash'; -import Text from '../../../components/Text'; -import TextLink from '../../../components/TextLink'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import styles from '../../../styles/styles'; -import variables from '../../../styles/variables'; -import themeColors from '../../../styles/themes/default'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; const IMAGE_TYPES = ['jpg', 'jpeg', 'png']; const MAX_IMAGE_HEIGHT = 180; diff --git a/src/pages/home/report/ListBoundaryLoader/ListBoundaryLoader.js b/src/pages/home/report/ListBoundaryLoader/ListBoundaryLoader.js index 97e79e96dac7..861f6201a53f 100644 --- a/src/pages/home/report/ListBoundaryLoader/ListBoundaryLoader.js +++ b/src/pages/home/report/ListBoundaryLoader/ListBoundaryLoader.js @@ -1,11 +1,11 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {ActivityIndicator, View} from 'react-native'; -import PropTypes from 'prop-types'; -import ReportActionsSkeletonView from '../../../../components/ReportActionsSkeletonView'; -import CONST from '../../../../CONST'; -import useNetwork from '../../../../hooks/useNetwork'; -import styles, {stylesGenerator} from '../../../../styles/styles'; -import themeColors from '../../../../styles/themes/default'; +import ReportActionsSkeletonView from '@components/ReportActionsSkeletonView'; +import useNetwork from '@hooks/useNetwork'; +import styles, {stylesGenerator} from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; const propTypes = { /** type of rendered loader. Can be 'header' or 'footer' */ diff --git a/src/pages/home/report/ParticipantLocalTime.js b/src/pages/home/report/ParticipantLocalTime.js index 058346287b11..17f87f0391ea 100644 --- a/src/pages/home/report/ParticipantLocalTime.js +++ b/src/pages/home/report/ParticipantLocalTime.js @@ -1,13 +1,13 @@ -import React, {useState, useEffect} from 'react'; -import {View} from 'react-native'; import lodashGet from 'lodash/get'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import participantPropTypes from '../../../components/participantPropTypes'; -import Text from '../../../components/Text'; -import Timers from '../../../libs/Timers'; -import CONST from '../../../CONST'; -import DateUtils from '../../../libs/DateUtils'; +import React, {useEffect, useState} from 'react'; +import {View} from 'react-native'; +import participantPropTypes from '@components/participantPropTypes'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import DateUtils from '@libs/DateUtils'; +import Timers from '@libs/Timers'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /** Personal details of the participant */ diff --git a/src/pages/home/report/ReactionList/BaseReactionList.js b/src/pages/home/report/ReactionList/BaseReactionList.js index b082ca510edd..bd1ed436ceaa 100755 --- a/src/pages/home/report/ReactionList/BaseReactionList.js +++ b/src/pages/home/report/ReactionList/BaseReactionList.js @@ -1,19 +1,19 @@ /* eslint-disable rulesdir/onyx-props-must-have-default */ +import Str from 'expensify-common/lib/str'; +import PropTypes from 'prop-types'; import React from 'react'; import {FlatList} from 'react-native'; -import PropTypes from 'prop-types'; -import Str from 'expensify-common/lib/str'; -import styles from '../../../../styles/styles'; +import OptionRow from '@components/OptionRow'; +import participantPropTypes from '@components/participantPropTypes'; +import withWindowDimensions from '@components/withWindowDimensions'; +import Navigation from '@libs/Navigation/Navigation'; +import * as UserUtils from '@libs/UserUtils'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; import HeaderReactionList from './HeaderReactionList'; -import * as UserUtils from '../../../../libs/UserUtils'; -import CONST from '../../../../CONST'; -import participantPropTypes from '../../../../components/participantPropTypes'; import reactionPropTypes from './reactionPropTypes'; -import OptionRow from '../../../../components/OptionRow'; -import variables from '../../../../styles/variables'; -import withWindowDimensions from '../../../../components/withWindowDimensions'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import ROUTES from '../../../../ROUTES'; const propTypes = { /** diff --git a/src/pages/home/report/ReactionList/HeaderReactionList.js b/src/pages/home/report/ReactionList/HeaderReactionList.js index 00611ca12409..49d61f05b191 100644 --- a/src/pages/home/report/ReactionList/HeaderReactionList.js +++ b/src/pages/home/report/ReactionList/HeaderReactionList.js @@ -1,13 +1,13 @@ import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import Text from '../../../../components/Text'; -import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../../components/withWindowDimensions'; -import compose from '../../../../libs/compose'; -import * as EmojiUtils from '../../../../libs/EmojiUtils'; -import * as StyleUtils from '../../../../styles/StyleUtils'; -import styles from '../../../../styles/styles'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import * as EmojiUtils from '@libs/EmojiUtils'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; import reactionPropTypes from './reactionPropTypes'; const propTypes = { diff --git a/src/pages/home/report/ReactionList/PopoverReactionList/BasePopoverReactionList.js b/src/pages/home/report/ReactionList/PopoverReactionList/BasePopoverReactionList.js index 32433cc80ca5..a06ed18de957 100644 --- a/src/pages/home/report/ReactionList/PopoverReactionList/BasePopoverReactionList.js +++ b/src/pages/home/report/ReactionList/PopoverReactionList/BasePopoverReactionList.js @@ -1,19 +1,19 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; import {Dimensions} from 'react-native'; -import lodashGet from 'lodash/get'; -import _ from 'underscore'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import withLocalize, {withLocalizePropTypes} from '../../../../../components/withLocalize'; -import PopoverWithMeasuredContent from '../../../../../components/PopoverWithMeasuredContent'; -import BaseReactionList from '../BaseReactionList'; -import compose from '../../../../../libs/compose'; -import withCurrentUserPersonalDetails from '../../../../../components/withCurrentUserPersonalDetails'; -import * as PersonalDetailsUtils from '../../../../../libs/PersonalDetailsUtils'; -import * as EmojiUtils from '../../../../../libs/EmojiUtils'; -import CONST from '../../../../../CONST'; -import ONYXKEYS from '../../../../../ONYXKEYS'; -import EmojiReactionsPropTypes from '../../../../../components/Reactions/EmojiReactionsPropTypes'; +import _ from 'underscore'; +import PopoverWithMeasuredContent from '@components/PopoverWithMeasuredContent'; +import EmojiReactionsPropTypes from '@components/Reactions/EmojiReactionsPropTypes'; +import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as EmojiUtils from '@libs/EmojiUtils'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; +import BaseReactionList from '@pages/home/report/ReactionList/BaseReactionList'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { reportActionID: PropTypes.string, diff --git a/src/pages/home/report/ReactionList/PopoverReactionList/index.js b/src/pages/home/report/ReactionList/PopoverReactionList/index.js index 327885249843..9f1e7b3113fc 100644 --- a/src/pages/home/report/ReactionList/PopoverReactionList/index.js +++ b/src/pages/home/report/ReactionList/PopoverReactionList/index.js @@ -1,5 +1,5 @@ -import React, {forwardRef, useImperativeHandle, useRef, useState} from 'react'; import PropTypes from 'prop-types'; +import React, {forwardRef, useImperativeHandle, useRef, useState} from 'react'; import BasePopoverReactionList from './BasePopoverReactionList'; const propTypes = { diff --git a/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js b/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js index 36cd9428b738..b4845e943a74 100644 --- a/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js +++ b/src/pages/home/report/ReportActionCompose/AttachmentPickerWithMenuItems.js @@ -1,25 +1,25 @@ +import PropTypes from 'prop-types'; import React, {useMemo} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import styles from '../../../../styles/styles'; -import Icon from '../../../../components/Icon'; -import * as Expensicons from '../../../../components/Icon/Expensicons'; -import AttachmentPicker from '../../../../components/AttachmentPicker'; -import * as Report from '../../../../libs/actions/Report'; -import PopoverMenu from '../../../../components/PopoverMenu'; -import CONST from '../../../../CONST'; -import Tooltip from '../../../../components/Tooltip/PopoverAnchorTooltip'; -import * as Browser from '../../../../libs/Browser'; -import PressableWithFeedback from '../../../../components/Pressable/PressableWithFeedback'; -import useLocalize from '../../../../hooks/useLocalize'; -import useWindowDimensions from '../../../../hooks/useWindowDimensions'; -import * as ReportUtils from '../../../../libs/ReportUtils'; -import * as IOU from '../../../../libs/actions/IOU'; -import * as Task from '../../../../libs/actions/Task'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import Permissions from '../../../../libs/Permissions'; +import AttachmentPicker from '@components/AttachmentPicker'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PopoverMenu from '@components/PopoverMenu'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import Tooltip from '@components/Tooltip/PopoverAnchorTooltip'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as Browser from '@libs/Browser'; +import Permissions from '@libs/Permissions'; +import * as ReportUtils from '@libs/ReportUtils'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import * as Report from '@userActions/Report'; +import * as Task from '@userActions/Task'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Beta features list */ diff --git a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js index 3972b21b91a7..b7013fe4ff2f 100644 --- a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js +++ b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js @@ -1,42 +1,42 @@ -import React, {useEffect, useCallback, useState, useRef, useMemo, useImperativeHandle} from 'react'; -import {View, NativeModules, findNodeHandle} from 'react-native'; +import {useIsFocused, useNavigation} from '@react-navigation/native'; +import lodashGet from 'lodash/get'; +import React, {useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react'; +import {findNodeHandle, NativeModules, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import {useIsFocused, useNavigation} from '@react-navigation/native'; -import styles from '../../../../styles/styles'; -import themeColors from '../../../../styles/themes/default'; -import Composer from '../../../../components/Composer'; -import containerComposeStyles from '../../../../styles/containerComposeStyles'; -import useWindowDimensions from '../../../../hooks/useWindowDimensions'; -import CONST from '../../../../CONST'; -import * as Browser from '../../../../libs/Browser'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import * as KeyDownListener from '../../../../libs/KeyboardShortcut/KeyDownPressListener'; -import * as EmojiPickerActions from '../../../../libs/actions/EmojiPickerAction'; -import willBlurTextInputOnTapOutsideFunc from '../../../../libs/willBlurTextInputOnTapOutside'; -import ReportActionComposeFocusManager from '../../../../libs/ReportActionComposeFocusManager'; -import * as ComposerUtils from '../../../../libs/ComposerUtils'; -import * as Report from '../../../../libs/actions/Report'; -import usePrevious from '../../../../hooks/usePrevious'; -import * as EmojiUtils from '../../../../libs/EmojiUtils'; -import * as User from '../../../../libs/actions/User'; -import * as ReportUtils from '../../../../libs/ReportUtils'; -import * as SuggestionUtils from '../../../../libs/SuggestionUtils'; -import * as ReportActionsUtils from '../../../../libs/ReportActionsUtils'; -import canFocusInputOnScreenFocus from '../../../../libs/canFocusInputOnScreenFocus'; +import Composer from '@components/Composer'; +import withKeyboardState from '@components/withKeyboardState'; +import useDebounce from '@hooks/useDebounce'; +import useLocalize from '@hooks/useLocalize'; +import usePrevious from '@hooks/usePrevious'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as Browser from '@libs/Browser'; +import canFocusInputOnScreenFocus from '@libs/canFocusInputOnScreenFocus'; +import compose from '@libs/compose'; +import * as ComposerUtils from '@libs/ComposerUtils'; +import getDraftComment from '@libs/ComposerUtils/getDraftComment'; +import convertToLTRForComposer from '@libs/convertToLTRForComposer'; +import * as EmojiUtils from '@libs/EmojiUtils'; +import focusWithDelay from '@libs/focusWithDelay'; +import * as KeyDownListener from '@libs/KeyboardShortcut/KeyDownPressListener'; +import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as SuggestionUtils from '@libs/SuggestionUtils'; +import updateMultilineInputRange from '@libs/UpdateMultilineInputRange'; +import willBlurTextInputOnTapOutsideFunc from '@libs/willBlurTextInputOnTapOutside'; +import containerComposeStyles from '@styles/containerComposeStyles'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as EmojiPickerActions from '@userActions/EmojiPickerAction'; +import * as InputFocus from '@userActions/InputFocus'; +import * as Report from '@userActions/Report'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import {defaultProps, propTypes} from './composerWithSuggestionsProps'; import SilentCommentUpdater from './SilentCommentUpdater'; import Suggestions from './Suggestions'; -import getDraftComment from '../../../../libs/ComposerUtils/getDraftComment'; -import useLocalize from '../../../../hooks/useLocalize'; -import compose from '../../../../libs/compose'; -import withKeyboardState from '../../../../components/withKeyboardState'; -import {propTypes, defaultProps} from './composerWithSuggestionsProps'; -import focusWithDelay from '../../../../libs/focusWithDelay'; -import useDebounce from '../../../../hooks/useDebounce'; -import updateMultilineInputRange from '../../../../libs/UpdateMultilineInputRange'; -import * as InputFocus from '../../../../libs/actions/InputFocus'; -import convertToLTRForComposer from '../../../../libs/convertToLTRForComposer'; const {RNTextInputReset} = NativeModules; diff --git a/src/pages/home/report/ReportActionCompose/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose/ReportActionCompose.js index 891f7fbc903b..f090a942e097 100644 --- a/src/pages/home/report/ReportActionCompose/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose/ReportActionCompose.js @@ -1,43 +1,43 @@ -import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {PortalHost} from '@gorhom/portal'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {View} from 'react-native'; -import _ from 'underscore'; -import lodashGet from 'lodash/get'; import {withOnyx} from 'react-native-onyx'; import {runOnJS, useAnimatedRef} from 'react-native-reanimated'; -import {PortalHost} from '@gorhom/portal'; -import styles from '../../../../styles/styles'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import * as Report from '../../../../libs/actions/Report'; -import ReportTypingIndicator from '../ReportTypingIndicator'; -import AttachmentModal from '../../../../components/AttachmentModal'; -import compose from '../../../../libs/compose'; -import willBlurTextInputOnTapOutsideFunc from '../../../../libs/willBlurTextInputOnTapOutside'; -import canFocusInputOnScreenFocus from '../../../../libs/canFocusInputOnScreenFocus'; -import CONST from '../../../../CONST'; -import * as ReportUtils from '../../../../libs/ReportUtils'; -import participantPropTypes from '../../../../components/participantPropTypes'; -import ParticipantLocalTime from '../ParticipantLocalTime'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes, withCurrentUserPersonalDetailsDefaultProps} from '../../../../components/withCurrentUserPersonalDetails'; -import {withNetwork} from '../../../../components/OnyxProvider'; -import * as User from '../../../../libs/actions/User'; -import EmojiPickerButton from '../../../../components/EmojiPicker/EmojiPickerButton'; -import * as DeviceCapabilities from '../../../../libs/DeviceCapabilities'; -import OfflineIndicator from '../../../../components/OfflineIndicator'; -import ExceededCommentLength from '../../../../components/ExceededCommentLength'; -import ReportDropUI from '../ReportDropUI'; -import reportPropTypes from '../../../reportPropTypes'; -import OfflineWithFeedback from '../../../../components/OfflineWithFeedback'; -import SendButton from './SendButton'; +import _ from 'underscore'; +import AttachmentModal from '@components/AttachmentModal'; +import EmojiPickerButton from '@components/EmojiPicker/EmojiPickerButton'; +import ExceededCommentLength from '@components/ExceededCommentLength'; +import OfflineIndicator from '@components/OfflineIndicator'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import {withNetwork} from '@components/OnyxProvider'; +import participantPropTypes from '@components/participantPropTypes'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import canFocusInputOnScreenFocus from '@libs/canFocusInputOnScreenFocus'; +import compose from '@libs/compose'; +import getDraftComment from '@libs/ComposerUtils/getDraftComment'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import getModalState from '@libs/getModalState'; +import * as ReportUtils from '@libs/ReportUtils'; +import updatePropsPaperWorklet from '@libs/updatePropsPaperWorklet'; +import willBlurTextInputOnTapOutsideFunc from '@libs/willBlurTextInputOnTapOutside'; +import ParticipantLocalTime from '@pages/home/report/ParticipantLocalTime'; +import reportActionPropTypes from '@pages/home/report/reportActionPropTypes'; +import ReportDropUI from '@pages/home/report/ReportDropUI'; +import ReportTypingIndicator from '@pages/home/report/ReportTypingIndicator'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as EmojiPickerActions from '@userActions/EmojiPickerAction'; +import * as Report from '@userActions/Report'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import AttachmentPickerWithMenuItems from './AttachmentPickerWithMenuItems'; import ComposerWithSuggestions from './ComposerWithSuggestions'; -import reportActionPropTypes from '../reportActionPropTypes'; -import useLocalize from '../../../../hooks/useLocalize'; -import getModalState from '../../../../libs/getModalState'; -import useWindowDimensions from '../../../../hooks/useWindowDimensions'; -import * as EmojiPickerActions from '../../../../libs/actions/EmojiPickerAction'; -import getDraftComment from '../../../../libs/ComposerUtils/getDraftComment'; -import updatePropsPaperWorklet from '../../../../libs/updatePropsPaperWorklet'; +import SendButton from './SendButton'; const propTypes = { /** A method to call when the form is submitted */ diff --git a/src/pages/home/report/ReportActionCompose/SendButton.js b/src/pages/home/report/ReportActionCompose/SendButton.js index a97dd420e181..061251d13c01 100644 --- a/src/pages/home/report/ReportActionCompose/SendButton.js +++ b/src/pages/home/report/ReportActionCompose/SendButton.js @@ -1,15 +1,15 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import {Gesture, GestureDetector} from 'react-native-gesture-handler'; -import PropTypes from 'prop-types'; -import styles from '../../../../styles/styles'; -import themeColors from '../../../../styles/themes/default'; -import Icon from '../../../../components/Icon'; -import * as Expensicons from '../../../../components/Icon/Expensicons'; -import CONST from '../../../../CONST'; -import Tooltip from '../../../../components/Tooltip'; -import PressableWithFeedback from '../../../../components/Pressable/PressableWithFeedback'; -import useLocalize from '../../../../hooks/useLocalize'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import Tooltip from '@components/Tooltip'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; const propTypes = { /** Whether the button is disabled */ diff --git a/src/pages/home/report/ReportActionCompose/SilentCommentUpdater.js b/src/pages/home/report/ReportActionCompose/SilentCommentUpdater.js index 4347d6bde8b3..9aa997a892f4 100644 --- a/src/pages/home/report/ReportActionCompose/SilentCommentUpdater.js +++ b/src/pages/home/report/ReportActionCompose/SilentCommentUpdater.js @@ -1,9 +1,9 @@ +import PropTypes from 'prop-types'; import {useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import usePrevious from '../../../../hooks/usePrevious'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import useLocalize from '../../../../hooks/useLocalize'; +import useLocalize from '@hooks/useLocalize'; +import usePrevious from '@hooks/usePrevious'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** The comment of the report */ diff --git a/src/pages/home/report/ReportActionCompose/SuggestionEmoji.js b/src/pages/home/report/ReportActionCompose/SuggestionEmoji.js index d18b6fc2892d..dc84f77b6311 100644 --- a/src/pages/home/report/ReportActionCompose/SuggestionEmoji.js +++ b/src/pages/home/report/ReportActionCompose/SuggestionEmoji.js @@ -1,14 +1,14 @@ -import React, {useState, useCallback, useRef, useImperativeHandle} from 'react'; import PropTypes from 'prop-types'; -import _ from 'underscore'; +import React, {useCallback, useImperativeHandle, useRef, useState} from 'react'; import {withOnyx} from 'react-native-onyx'; -import CONST from '../../../../CONST'; -import useArrowKeyFocusManager from '../../../../hooks/useArrowKeyFocusManager'; -import * as SuggestionsUtils from '../../../../libs/SuggestionUtils'; -import * as EmojiUtils from '../../../../libs/EmojiUtils'; -import EmojiSuggestions from '../../../../components/EmojiSuggestions'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import useLocalize from '../../../../hooks/useLocalize'; +import _ from 'underscore'; +import EmojiSuggestions from '@components/EmojiSuggestions'; +import useArrowKeyFocusManager from '@hooks/useArrowKeyFocusManager'; +import useLocalize from '@hooks/useLocalize'; +import * as EmojiUtils from '@libs/EmojiUtils'; +import * as SuggestionsUtils from '@libs/SuggestionUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as SuggestionProps from './suggestionProps'; /** diff --git a/src/pages/home/report/ReportActionCompose/SuggestionMention.js b/src/pages/home/report/ReportActionCompose/SuggestionMention.js index 67d6ac0632eb..baf93da6ccc4 100644 --- a/src/pages/home/report/ReportActionCompose/SuggestionMention.js +++ b/src/pages/home/report/ReportActionCompose/SuggestionMention.js @@ -1,17 +1,17 @@ -import React, {useState, useCallback, useRef, useImperativeHandle, useEffect} from 'react'; import PropTypes from 'prop-types'; -import _ from 'underscore'; +import React, {useCallback, useEffect, useImperativeHandle, useRef, useState} from 'react'; import {withOnyx} from 'react-native-onyx'; -import CONST from '../../../../CONST'; -import useArrowKeyFocusManager from '../../../../hooks/useArrowKeyFocusManager'; -import MentionSuggestions from '../../../../components/MentionSuggestions'; -import * as UserUtils from '../../../../libs/UserUtils'; -import * as Expensicons from '../../../../components/Icon/Expensicons'; -import * as SuggestionsUtils from '../../../../libs/SuggestionUtils'; -import useLocalize from '../../../../hooks/useLocalize'; -import usePrevious from '../../../../hooks/usePrevious'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import personalDetailsPropType from '../../../personalDetailsPropType'; +import _ from 'underscore'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MentionSuggestions from '@components/MentionSuggestions'; +import useArrowKeyFocusManager from '@hooks/useArrowKeyFocusManager'; +import useLocalize from '@hooks/useLocalize'; +import usePrevious from '@hooks/usePrevious'; +import * as SuggestionsUtils from '@libs/SuggestionUtils'; +import * as UserUtils from '@libs/UserUtils'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as SuggestionProps from './suggestionProps'; /** diff --git a/src/pages/home/report/ReportActionCompose/Suggestions.js b/src/pages/home/report/ReportActionCompose/Suggestions.js index 5365aefe13e6..f39a70a960cf 100644 --- a/src/pages/home/report/ReportActionCompose/Suggestions.js +++ b/src/pages/home/report/ReportActionCompose/Suggestions.js @@ -1,7 +1,7 @@ -import React, {useRef, useCallback, useImperativeHandle} from 'react'; import PropTypes from 'prop-types'; -import SuggestionMention from './SuggestionMention'; +import React, {useCallback, useImperativeHandle, useRef} from 'react'; import SuggestionEmoji from './SuggestionEmoji'; +import SuggestionMention from './SuggestionMention'; import * as SuggestionProps from './suggestionProps'; const propTypes = { diff --git a/src/pages/home/report/ReportActionCompose/composerWithSuggestionsProps.js b/src/pages/home/report/ReportActionCompose/composerWithSuggestionsProps.js index 017b5aecb4ae..46d34d407b1c 100644 --- a/src/pages/home/report/ReportActionCompose/composerWithSuggestionsProps.js +++ b/src/pages/home/report/ReportActionCompose/composerWithSuggestionsProps.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; -import reportActionPropTypes from '../reportActionPropTypes'; -import CONST from '../../../../CONST'; +import reportActionPropTypes from '@pages/home/report/reportActionPropTypes'; +import CONST from '@src/CONST'; const propTypes = { /** Details about any modals being used */ diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index d44c7b8ee4d1..a7a3bc0739f3 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -1,78 +1,78 @@ -import _ from 'underscore'; import lodashGet from 'lodash/get'; -import React, {useState, useRef, useEffect, memo, useCallback, useContext, useMemo} from 'react'; -import {InteractionManager, View} from 'react-native'; import PropTypes from 'prop-types'; +import React, {memo, useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react'; +import {InteractionManager, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import CONST from '../../../CONST'; -import ONYXKEYS from '../../../ONYXKEYS'; -import reportActionPropTypes from './reportActionPropTypes'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import PressableWithSecondaryInteraction from '../../../components/PressableWithSecondaryInteraction'; -import Hoverable from '../../../components/Hoverable'; -import Button from '../../../components/Button'; -import ReportActionItemSingle from './ReportActionItemSingle'; -import ReportActionItemGrouped from './ReportActionItemGrouped'; -import MoneyRequestAction from '../../../components/ReportActionItem/MoneyRequestAction'; -import ReportActionItemMessage from './ReportActionItemMessage'; -import UnreadActionIndicator from '../../../components/UnreadActionIndicator'; -import ReportActionItemMessageEdit from './ReportActionItemMessageEdit'; -import ReportActionItemCreated from './ReportActionItemCreated'; -import ReportActionItemThread from './ReportActionItemThread'; -import LinkPreviewer from './LinkPreviewer'; -import compose from '../../../libs/compose'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import ControlSelection from '../../../libs/ControlSelection'; -import * as DeviceCapabilities from '../../../libs/DeviceCapabilities'; +import _ from 'underscore'; +import Button from '@components/Button'; +import DisplayNames from '@components/DisplayNames'; +import Hoverable from '@components/Hoverable'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import InlineSystemMessage from '@components/InlineSystemMessage'; +import KYCWall from '@components/KYCWall'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import {usePersonalDetails, withBlockedFromConcierge, withNetwork, withReportActionsDrafts} from '@components/OnyxProvider'; +import PressableWithSecondaryInteraction from '@components/PressableWithSecondaryInteraction'; +import EmojiReactionsPropTypes from '@components/Reactions/EmojiReactionsPropTypes'; +import ReportActionItemEmojiReactions from '@components/Reactions/ReportActionItemEmojiReactions'; +import RenderHTML from '@components/RenderHTML'; +import ChronosOOOListActions from '@components/ReportActionItem/ChronosOOOListActions'; +import MoneyReportView from '@components/ReportActionItem/MoneyReportView'; +import MoneyRequestAction from '@components/ReportActionItem/MoneyRequestAction'; +import MoneyRequestView from '@components/ReportActionItem/MoneyRequestView'; +import RenameAction from '@components/ReportActionItem/RenameAction'; +import ReportPreview from '@components/ReportActionItem/ReportPreview'; +import TaskAction from '@components/ReportActionItem/TaskAction'; +import TaskPreview from '@components/ReportActionItem/TaskPreview'; +import TaskView from '@components/ReportActionItem/TaskView'; +import {ShowContextMenuContext} from '@components/ShowContextMenuContext'; +import Text from '@components/Text'; +import UnreadActionIndicator from '@components/UnreadActionIndicator'; +import withLocalize from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import usePrevious from '@hooks/usePrevious'; +import compose from '@libs/compose'; +import ControlSelection from '@libs/ControlSelection'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import focusTextInputAfterAnimation from '@libs/focusTextInputAfterAnimation'; +import Navigation from '@libs/Navigation/Navigation'; +import Permissions from '@libs/Permissions'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import SelectionScraper from '@libs/SelectionScraper'; +import userWalletPropTypes from '@pages/EnablePayments/userWalletPropTypes'; +import {ReactionListContext} from '@pages/home/ReportScreenContext'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as EmojiPickerAction from '@userActions/EmojiPickerAction'; +import * as store from '@userActions/ReimbursementAccount/store'; +import * as Report from '@userActions/Report'; +import * as ReportActions from '@userActions/ReportActions'; +import * as Session from '@userActions/Session'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import * as ContextMenuActions from './ContextMenu/ContextMenuActions'; import MiniReportActionContextMenu from './ContextMenu/MiniReportActionContextMenu'; import * as ReportActionContextMenu from './ContextMenu/ReportActionContextMenu'; -import * as ContextMenuActions from './ContextMenu/ContextMenuActions'; -import * as EmojiPickerAction from '../../../libs/actions/EmojiPickerAction'; -import {usePersonalDetails, withBlockedFromConcierge, withNetwork, withReportActionsDrafts} from '../../../components/OnyxProvider'; -import RenameAction from '../../../components/ReportActionItem/RenameAction'; -import InlineSystemMessage from '../../../components/InlineSystemMessage'; -import styles from '../../../styles/styles'; -import SelectionScraper from '../../../libs/SelectionScraper'; -import focusTextInputAfterAnimation from '../../../libs/focusTextInputAfterAnimation'; -import * as User from '../../../libs/actions/User'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; -import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; -import * as ReportActions from '../../../libs/actions/ReportActions'; -import reportPropTypes from '../../reportPropTypes'; -import {ShowContextMenuContext} from '../../../components/ShowContextMenuContext'; -import ChronosOOOListActions from '../../../components/ReportActionItem/ChronosOOOListActions'; -import ReportActionItemEmojiReactions from '../../../components/Reactions/ReportActionItemEmojiReactions'; -import * as Report from '../../../libs/actions/Report'; -import withLocalize from '../../../components/withLocalize'; -import Icon from '../../../components/Icon'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import Text from '../../../components/Text'; -import DisplayNames from '../../../components/DisplayNames'; -import ReportPreview from '../../../components/ReportActionItem/ReportPreview'; -import ReportActionItemDraft from './ReportActionItemDraft'; -import TaskPreview from '../../../components/ReportActionItem/TaskPreview'; -import TaskAction from '../../../components/ReportActionItem/TaskAction'; -import EmojiReactionsPropTypes from '../../../components/Reactions/EmojiReactionsPropTypes'; -import TaskView from '../../../components/ReportActionItem/TaskView'; -import MoneyReportView from '../../../components/ReportActionItem/MoneyReportView'; -import * as Session from '../../../libs/actions/Session'; -import MoneyRequestView from '../../../components/ReportActionItem/MoneyRequestView'; import {hideContextMenu} from './ContextMenu/ReportActionContextMenu'; -import * as PersonalDetailsUtils from '../../../libs/PersonalDetailsUtils'; -import * as store from '../../../libs/actions/ReimbursementAccount/store'; -import * as BankAccounts from '../../../libs/actions/BankAccounts'; -import {ReactionListContext} from '../ReportScreenContext'; -import usePrevious from '../../../hooks/usePrevious'; -import Permissions from '../../../libs/Permissions'; -import themeColors from '../../../styles/themes/default'; +import LinkPreviewer from './LinkPreviewer'; import ReportActionItemBasicMessage from './ReportActionItemBasicMessage'; -import RenderHTML from '../../../components/RenderHTML'; +import ReportActionItemCreated from './ReportActionItemCreated'; +import ReportActionItemDraft from './ReportActionItemDraft'; +import ReportActionItemGrouped from './ReportActionItemGrouped'; +import ReportActionItemMessage from './ReportActionItemMessage'; +import ReportActionItemMessageEdit from './ReportActionItemMessageEdit'; +import ReportActionItemSingle from './ReportActionItemSingle'; +import ReportActionItemThread from './ReportActionItemThread'; +import reportActionPropTypes from './reportActionPropTypes'; import ReportAttachmentsContext from './ReportAttachmentsContext'; -import ROUTES from '../../../ROUTES'; -import Navigation from '../../../libs/Navigation/Navigation'; -import KYCWall from '../../../components/KYCWall'; -import userWalletPropTypes from '../../EnablePayments/userWalletPropTypes'; const propTypes = { ...windowDimensionsPropTypes, diff --git a/src/pages/home/report/ReportActionItemBasicMessage.js b/src/pages/home/report/ReportActionItemBasicMessage.js index fa33826d39a4..87997b29b833 100644 --- a/src/pages/home/report/ReportActionItemBasicMessage.js +++ b/src/pages/home/report/ReportActionItemBasicMessage.js @@ -1,8 +1,8 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {View} from 'react-native'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; +import Text from '@components/Text'; +import styles from '@styles/styles'; const propTypes = { message: PropTypes.string.isRequired, diff --git a/src/pages/home/report/ReportActionItemCreated.js b/src/pages/home/report/ReportActionItemCreated.js index 50b4a3eb6148..10ebb13302b2 100644 --- a/src/pages/home/report/ReportActionItemCreated.js +++ b/src/pages/home/report/ReportActionItemCreated.js @@ -1,25 +1,25 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {memo} from 'react'; import {View} from 'react-native'; -import lodashGet from 'lodash/get'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import ONYXKEYS from '../../../ONYXKEYS'; -import ReportWelcomeText from '../../../components/ReportWelcomeText'; -import participantPropTypes from '../../../components/participantPropTypes'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import styles from '../../../styles/styles'; -import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; -import * as Report from '../../../libs/actions/Report'; -import reportPropTypes from '../../reportPropTypes'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import compose from '../../../libs/compose'; -import withLocalize from '../../../components/withLocalize'; -import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback'; -import MultipleAvatars from '../../../components/MultipleAvatars'; -import CONST from '../../../CONST'; +import MultipleAvatars from '@components/MultipleAvatars'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import participantPropTypes from '@components/participantPropTypes'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import ReportWelcomeText from '@components/ReportWelcomeText'; +import withLocalize from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import reportWithoutHasDraftSelector from '@libs/OnyxSelectors/reportWithoutHasDraftSelector'; +import * as ReportUtils from '@libs/ReportUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import AnimatedEmptyStateBackground from './AnimatedEmptyStateBackground'; -import reportWithoutHasDraftSelector from '../../../libs/OnyxSelectors/reportWithoutHasDraftSelector'; const propTypes = { /** The id of the report */ diff --git a/src/pages/home/report/ReportActionItemDate.js b/src/pages/home/report/ReportActionItemDate.js index 0e6af2e95636..346a1c2683f0 100644 --- a/src/pages/home/report/ReportActionItemDate.js +++ b/src/pages/home/report/ReportActionItemDate.js @@ -1,10 +1,10 @@ -import React, {memo} from 'react'; import PropTypes from 'prop-types'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import compose from '../../../libs/compose'; -import Text from '../../../components/Text'; -import {withCurrentDate} from '../../../components/OnyxProvider'; +import React, {memo} from 'react'; +import {withCurrentDate} from '@components/OnyxProvider'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; const propTypes = { /** UTC timestamp for when the action was created */ diff --git a/src/pages/home/report/ReportActionItemDraft.js b/src/pages/home/report/ReportActionItemDraft.js index b3b66994fb9c..500c4146e608 100644 --- a/src/pages/home/report/ReportActionItemDraft.js +++ b/src/pages/home/report/ReportActionItemDraft.js @@ -1,7 +1,7 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../../../styles/styles'; +import styles from '@styles/styles'; const propTypes = { /** Children view component for this action item */ diff --git a/src/pages/home/report/ReportActionItemFragment.js b/src/pages/home/report/ReportActionItemFragment.js index 57b51ef50519..24e1c6bc1ef6 100644 --- a/src/pages/home/report/ReportActionItemFragment.js +++ b/src/pages/home/report/ReportActionItemFragment.js @@ -1,24 +1,24 @@ -import React, {memo} from 'react'; -import PropTypes from 'prop-types'; import Str from 'expensify-common/lib/str'; +import PropTypes from 'prop-types'; +import React, {memo} from 'react'; +import avatarPropTypes from '@components/avatarPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import RenderHTML from '@components/RenderHTML'; +import Text from '@components/Text'; +import UserDetailsTooltip from '@components/UserDetailsTooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import ZeroWidthView from '@components/ZeroWidthView'; +import compose from '@libs/compose'; +import convertToLTR from '@libs/convertToLTR'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import * as EmojiUtils from '@libs/EmojiUtils'; +import editedLabelStyles from '@styles/editedLabelStyles'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; import reportActionFragmentPropTypes from './reportActionFragmentPropTypes'; -import styles from '../../../styles/styles'; -import variables from '../../../styles/variables'; -import themeColors from '../../../styles/themes/default'; -import RenderHTML from '../../../components/RenderHTML'; -import Text from '../../../components/Text'; -import * as EmojiUtils from '../../../libs/EmojiUtils'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as DeviceCapabilities from '../../../libs/DeviceCapabilities'; -import compose from '../../../libs/compose'; -import convertToLTR from '../../../libs/convertToLTR'; -import {withNetwork} from '../../../components/OnyxProvider'; -import CONST from '../../../CONST'; -import editedLabelStyles from '../../../styles/editedLabelStyles'; -import UserDetailsTooltip from '../../../components/UserDetailsTooltip'; -import avatarPropTypes from '../../../components/avatarPropTypes'; -import ZeroWidthView from '../../../components/ZeroWidthView'; const propTypes = { /** Users accountID */ diff --git a/src/pages/home/report/ReportActionItemGrouped.js b/src/pages/home/report/ReportActionItemGrouped.js index e60bf01835f8..2d55ecbbe037 100644 --- a/src/pages/home/report/ReportActionItemGrouped.js +++ b/src/pages/home/report/ReportActionItemGrouped.js @@ -1,7 +1,7 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../../../styles/styles'; +import styles from '@styles/styles'; const propTypes = { /** Children view component for this action item */ diff --git a/src/pages/home/report/ReportActionItemMessage.js b/src/pages/home/report/ReportActionItemMessage.js index 88223e6480ff..37aaa5adf287 100644 --- a/src/pages/home/report/ReportActionItemMessage.js +++ b/src/pages/home/report/ReportActionItemMessage.js @@ -1,14 +1,14 @@ -import React from 'react'; -import {View, Text} from 'react-native'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React from 'react'; +import {Text, View} from 'react-native'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import styles from '../../../styles/styles'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import styles from '@styles/styles'; import ReportActionItemFragment from './ReportActionItemFragment'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; import reportActionPropTypes from './reportActionPropTypes'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; const propTypes = { /** The report action */ diff --git a/src/pages/home/report/ReportActionItemMessageEdit.js b/src/pages/home/report/ReportActionItemMessageEdit.js index be2f10f2f053..589b4c367c25 100644 --- a/src/pages/home/report/ReportActionItemMessageEdit.js +++ b/src/pages/home/report/ReportActionItemMessageEdit.js @@ -1,43 +1,43 @@ +import ExpensiMark from 'expensify-common/lib/ExpensiMark'; +import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; -import React, {useState, useRef, useMemo, useEffect, useCallback} from 'react'; -import {InteractionManager, Keyboard, View} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {InteractionManager, Keyboard, View} from 'react-native'; import _ from 'underscore'; -import ExpensiMark from 'expensify-common/lib/ExpensiMark'; -import Str from 'expensify-common/lib/str'; -import reportActionPropTypes from './reportActionPropTypes'; -import styles from '../../../styles/styles'; -import themeColors from '../../../styles/themes/default'; -import containerComposeStyles from '../../../styles/containerComposeStyles'; -import Composer from '../../../components/Composer'; -import * as Report from '../../../libs/actions/Report'; -import setShouldShowComposeInputKeyboardAware from '../../../libs/setShouldShowComposeInputKeyboardAware'; -import ReportActionComposeFocusManager from '../../../libs/ReportActionComposeFocusManager'; -import EmojiPickerButton from '../../../components/EmojiPicker/EmojiPickerButton'; -import Icon from '../../../components/Icon'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import Tooltip from '../../../components/Tooltip'; +import Composer from '@components/Composer'; +import EmojiPickerButton from '@components/EmojiPicker/EmojiPickerButton'; +import ExceededCommentLength from '@components/ExceededCommentLength'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import refPropTypes from '@components/refPropTypes'; +import Tooltip from '@components/Tooltip'; +import useKeyboardState from '@hooks/useKeyboardState'; +import useLocalize from '@hooks/useLocalize'; +import useReportScrollManager from '@hooks/useReportScrollManager'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as Browser from '@libs/Browser'; +import * as ComposerUtils from '@libs/ComposerUtils'; +import * as EmojiUtils from '@libs/EmojiUtils'; +import focusWithDelay from '@libs/focusWithDelay'; +import onyxSubscribe from '@libs/onyxSubscribe'; +import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import setShouldShowComposeInputKeyboardAware from '@libs/setShouldShowComposeInputKeyboardAware'; +import reportPropTypes from '@pages/reportPropTypes'; +import containerComposeStyles from '@styles/containerComposeStyles'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as EmojiPickerAction from '@userActions/EmojiPickerAction'; +import * as InputFocus from '@userActions/InputFocus'; +import * as Report from '@userActions/Report'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as ReportActionContextMenu from './ContextMenu/ReportActionContextMenu'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; -import * as EmojiUtils from '../../../libs/EmojiUtils'; -import reportPropTypes from '../../reportPropTypes'; -import ExceededCommentLength from '../../../components/ExceededCommentLength'; -import CONST from '../../../CONST'; -import refPropTypes from '../../../components/refPropTypes'; -import * as ComposerUtils from '../../../libs/ComposerUtils'; -import * as User from '../../../libs/actions/User'; -import PressableWithFeedback from '../../../components/Pressable/PressableWithFeedback'; -import useLocalize from '../../../hooks/useLocalize'; -import useKeyboardState from '../../../hooks/useKeyboardState'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; -import useReportScrollManager from '../../../hooks/useReportScrollManager'; -import * as EmojiPickerAction from '../../../libs/actions/EmojiPickerAction'; -import focusWithDelay from '../../../libs/focusWithDelay'; -import * as Browser from '../../../libs/Browser'; -import * as InputFocus from '../../../libs/actions/InputFocus'; -import onyxSubscribe from '../../../libs/onyxSubscribe'; -import ONYXKEYS from '../../../ONYXKEYS'; +import reportActionPropTypes from './reportActionPropTypes'; const propTypes = { /** All the data of the action */ diff --git a/src/pages/home/report/ReportActionItemParentAction.js b/src/pages/home/report/ReportActionItemParentAction.js index b67707031372..e2274ce41ae0 100644 --- a/src/pages/home/report/ReportActionItemParentAction.js +++ b/src/pages/home/report/ReportActionItemParentAction.js @@ -1,21 +1,21 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import lodashGet from 'lodash/get'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import ONYXKEYS from '../../../ONYXKEYS'; -import styles from '../../../styles/styles'; -import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; -import * as Report from '../../../libs/actions/Report'; -import reportPropTypes from '../../reportPropTypes'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import compose from '../../../libs/compose'; -import withLocalize from '../../../components/withLocalize'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import withLocalize from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import * as Report from '@userActions/Report'; +import ONYXKEYS from '@src/ONYXKEYS'; +import AnimatedEmptyStateBackground from './AnimatedEmptyStateBackground'; import ReportActionItem from './ReportActionItem'; import reportActionPropTypes from './reportActionPropTypes'; -import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; -import AnimatedEmptyStateBackground from './AnimatedEmptyStateBackground'; const propTypes = { /** Flag to show, hide the thread divider line */ diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index fc38b102b8e8..329952769a4f 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -1,36 +1,36 @@ import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useCallback, useMemo} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import _ from 'underscore'; import {withOnyx} from 'react-native-onyx'; -import reportActionPropTypes from './reportActionPropTypes'; -import ReportActionItemFragment from './ReportActionItemFragment'; -import styles from '../../../styles/styles'; +import _ from 'underscore'; +import Avatar from '@components/Avatar'; +import MultipleAvatars from '@components/MultipleAvatars'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import {usePersonalDetails} from '@components/OnyxProvider'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import SubscriptAvatar from '@components/SubscriptAvatar'; +import Text from '@components/Text'; +import Tooltip from '@components/Tooltip'; +import UserDetailsTooltip from '@components/UserDetailsTooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import ControlSelection from '@libs/ControlSelection'; +import DateUtils from '@libs/DateUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import Permissions from '@libs/Permissions'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as UserUtils from '@libs/UserUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import ReportActionItemDate from './ReportActionItemDate'; -import Avatar from '../../../components/Avatar'; -import compose from '../../../libs/compose'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import {usePersonalDetails} from '../../../components/OnyxProvider'; -import ControlSelection from '../../../libs/ControlSelection'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; -import CONST from '../../../CONST'; -import SubscriptAvatar from '../../../components/SubscriptAvatar'; -import reportPropTypes from '../../reportPropTypes'; -import * as UserUtils from '../../../libs/UserUtils'; -import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback'; -import UserDetailsTooltip from '../../../components/UserDetailsTooltip'; -import MultipleAvatars from '../../../components/MultipleAvatars'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import themeColors from '../../../styles/themes/default'; -import Permissions from '../../../libs/Permissions'; -import ONYXKEYS from '../../../ONYXKEYS'; -import Text from '../../../components/Text'; -import Tooltip from '../../../components/Tooltip'; -import DateUtils from '../../../libs/DateUtils'; +import ReportActionItemFragment from './ReportActionItemFragment'; +import reportActionPropTypes from './reportActionPropTypes'; const propTypes = { /** All the data of the action */ diff --git a/src/pages/home/report/ReportActionItemThread.js b/src/pages/home/report/ReportActionItemThread.js index 9c688911759e..8d4b76a3c508 100644 --- a/src/pages/home/report/ReportActionItemThread.js +++ b/src/pages/home/report/ReportActionItemThread.js @@ -1,15 +1,15 @@ -import React from 'react'; -import {View, Text} from 'react-native'; import PropTypes from 'prop-types'; -import styles from '../../../styles/styles'; -import * as Report from '../../../libs/actions/Report'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import CONST from '../../../CONST'; -import avatarPropTypes from '../../../components/avatarPropTypes'; -import MultipleAvatars from '../../../components/MultipleAvatars'; -import compose from '../../../libs/compose'; -import PressableWithSecondaryInteraction from '../../../components/PressableWithSecondaryInteraction'; +import React from 'react'; +import {Text, View} from 'react-native'; +import avatarPropTypes from '@components/avatarPropTypes'; +import MultipleAvatars from '@components/MultipleAvatars'; +import PressableWithSecondaryInteraction from '@components/PressableWithSecondaryInteraction'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; const propTypes = { /** List of participant icons for the thread */ diff --git a/src/pages/home/report/ReportActionsList.js b/src/pages/home/report/ReportActionsList.js index 300b1921545d..9549513ed368 100644 --- a/src/pages/home/report/ReportActionsList.js +++ b/src/pages/home/report/ReportActionsList.js @@ -1,29 +1,29 @@ +import {useRoute} from '@react-navigation/native'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import Animated, {useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; import _ from 'underscore'; -import {useRoute} from '@react-navigation/native'; -import lodashGet from 'lodash/get'; -import CONST from '../../../CONST'; -import InvertedFlatList from '../../../components/InvertedFlatList'; -import {withPersonalDetails} from '../../../components/OnyxProvider'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '../../../components/withCurrentUserPersonalDetails'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import useNetwork from '../../../hooks/useNetwork'; -import useLocalize from '../../../hooks/useLocalize'; -import useReportScrollManager from '../../../hooks/useReportScrollManager'; -import DateUtils from '../../../libs/DateUtils'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import * as Report from '../../../libs/actions/Report'; -import compose from '../../../libs/compose'; -import styles from '../../../styles/styles'; -import variables from '../../../styles/variables'; -import reportPropTypes from '../../reportPropTypes'; +import InvertedFlatList from '@components/InvertedFlatList'; +import {withPersonalDetails} from '@components/OnyxProvider'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import useReportScrollManager from '@hooks/useReportScrollManager'; +import compose from '@libs/compose'; +import DateUtils from '@libs/DateUtils'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; import FloatingMessageCounter from './FloatingMessageCounter'; -import ReportActionsListItemRenderer from './ReportActionsListItemRenderer'; -import reportActionPropTypes from './reportActionPropTypes'; import ListBoundaryLoader from './ListBoundaryLoader/ListBoundaryLoader'; -import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; +import reportActionPropTypes from './reportActionPropTypes'; +import ReportActionsListItemRenderer from './ReportActionsListItemRenderer'; const propTypes = { /** The report currently being looked at */ diff --git a/src/pages/home/report/ReportActionsListItemRenderer.js b/src/pages/home/report/ReportActionsListItemRenderer.js index 40b9ee9142b7..0273a3f31805 100644 --- a/src/pages/home/report/ReportActionsListItemRenderer.js +++ b/src/pages/home/report/ReportActionsListItemRenderer.js @@ -1,10 +1,10 @@ import PropTypes from 'prop-types'; import React, {memo} from 'react'; import _ from 'underscore'; -import CONST from '../../../CONST'; -import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import reportPropTypes from '../../reportPropTypes'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import CONST from '@src/CONST'; import ReportActionItem from './ReportActionItem'; import ReportActionItemParentAction from './ReportActionItemParentAction'; import reportActionPropTypes from './reportActionPropTypes'; diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index 108e75051696..f9f029881eef 100755 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -1,26 +1,26 @@ -import React, {useRef, useEffect, useContext, useMemo} from 'react'; +import {useIsFocused} from '@react-navigation/native'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useContext, useEffect, useMemo, useRef} from 'react'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import {useIsFocused} from '@react-navigation/native'; -import * as Report from '../../../libs/actions/Report'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import useCopySelectionHelper from '@hooks/useCopySelectionHelper'; +import useInitialValue from '@hooks/useInitialValue'; +import compose from '@libs/compose'; +import getIsReportFullyVisible from '@libs/getIsReportFullyVisible'; +import Performance from '@libs/Performance'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import {ReactionListContext} from '@pages/home/ReportScreenContext'; +import reportPropTypes from '@pages/reportPropTypes'; +import * as Report from '@userActions/Report'; +import Timing from '@userActions/Timing'; +import CONST from '@src/CONST'; +import PopoverReactionList from './ReactionList/PopoverReactionList'; import reportActionPropTypes from './reportActionPropTypes'; -import Timing from '../../../libs/actions/Timing'; -import CONST from '../../../CONST'; -import compose from '../../../libs/compose'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import useCopySelectionHelper from '../../../hooks/useCopySelectionHelper'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import Performance from '../../../libs/Performance'; -import {withNetwork} from '../../../components/OnyxProvider'; -import networkPropTypes from '../../../components/networkPropTypes'; import ReportActionsList from './ReportActionsList'; -import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; -import reportPropTypes from '../../reportPropTypes'; -import PopoverReactionList from './ReactionList/PopoverReactionList'; -import getIsReportFullyVisible from '../../../libs/getIsReportFullyVisible'; -import {ReactionListContext} from '../ReportScreenContext'; -import useInitialValue from '../../../hooks/useInitialValue'; const propTypes = { /** The report currently being looked at */ diff --git a/src/pages/home/report/ReportAttachments.js b/src/pages/home/report/ReportAttachments.js index 23da908fed17..173a4b5637be 100644 --- a/src/pages/home/report/ReportAttachments.js +++ b/src/pages/home/report/ReportAttachments.js @@ -1,10 +1,10 @@ +import PropTypes from 'prop-types'; import React, {useCallback} from 'react'; import _ from 'underscore'; -import PropTypes from 'prop-types'; -import AttachmentModal from '../../../components/AttachmentModal'; -import Navigation from '../../../libs/Navigation/Navigation'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import ROUTES from '../../../ROUTES'; +import AttachmentModal from '@components/AttachmentModal'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Navigation route context info provided by react navigation */ diff --git a/src/pages/home/report/ReportAttachmentsContext.js b/src/pages/home/report/ReportAttachmentsContext.js index a51df01313e5..5602612a6cd6 100644 --- a/src/pages/home/report/ReportAttachmentsContext.js +++ b/src/pages/home/report/ReportAttachmentsContext.js @@ -1,6 +1,6 @@ -import React, {useEffect, useMemo, useRef} from 'react'; import PropTypes from 'prop-types'; -import useCurrentReportID from '../../../hooks/useCurrentReportID'; +import React, {useEffect, useMemo, useRef} from 'react'; +import useCurrentReportID from '@hooks/useCurrentReportID'; const ReportAttachmentsContext = React.createContext(); diff --git a/src/pages/home/report/ReportDetailsShareCodePage.js b/src/pages/home/report/ReportDetailsShareCodePage.js index 7c22726ac82b..0ef2d46029ea 100644 --- a/src/pages/home/report/ReportDetailsShareCodePage.js +++ b/src/pages/home/report/ReportDetailsShareCodePage.js @@ -1,7 +1,7 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import reportPropTypes from '../../reportPropTypes'; -import ShareCodePage from '../../ShareCodePage'; +import React from 'react'; +import reportPropTypes from '@pages/reportPropTypes'; +import ShareCodePage from '@pages/ShareCodePage'; import withReportOrNotFound from './withReportOrNotFound'; const propTypes = { diff --git a/src/pages/home/report/ReportDropUI.js b/src/pages/home/report/ReportDropUI.js index d742346cd769..ae0c941b37e7 100644 --- a/src/pages/home/report/ReportDropUI.js +++ b/src/pages/home/report/ReportDropUI.js @@ -1,12 +1,12 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../../../styles/styles'; -import Text from '../../../components/Text'; -import DragAndDropConsumer from '../../../components/DragAndDrop/Consumer'; -import Icon from '../../../components/Icon'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import useLocalize from '../../../hooks/useLocalize'; +import DragAndDropConsumer from '@components/DragAndDrop/Consumer'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; const propTypes = { /** Callback to execute when a file is dropped. */ diff --git a/src/pages/home/report/ReportFooter.js b/src/pages/home/report/ReportFooter.js index 2237e6448504..f3598a92a9eb 100644 --- a/src/pages/home/report/ReportFooter.js +++ b/src/pages/home/report/ReportFooter.js @@ -1,24 +1,24 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; +import {Keyboard, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import {View, Keyboard} from 'react-native'; -import CONST from '../../../CONST'; +import AnonymousReportFooter from '@components/AnonymousReportFooter'; +import ArchivedReportFooter from '@components/ArchivedReportFooter'; +import OfflineIndicator from '@components/OfflineIndicator'; +import participantPropTypes from '@components/participantPropTypes'; +import SwipeableView from '@components/SwipeableView'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import useNetwork from '@hooks/useNetwork'; +import compose from '@libs/compose'; +import * as ReportUtils from '@libs/ReportUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import ReportActionCompose from './ReportActionCompose/ReportActionCompose'; -import AnonymousReportFooter from '../../../components/AnonymousReportFooter'; -import SwipeableView from '../../../components/SwipeableView'; -import OfflineIndicator from '../../../components/OfflineIndicator'; -import ArchivedReportFooter from '../../../components/ArchivedReportFooter'; -import compose from '../../../libs/compose'; -import ONYXKEYS from '../../../ONYXKEYS'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import useNetwork from '../../../hooks/useNetwork'; -import styles from '../../../styles/styles'; -import variables from '../../../styles/variables'; import reportActionPropTypes from './reportActionPropTypes'; -import reportPropTypes from '../../reportPropTypes'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import * as Session from '../../../libs/actions/Session'; -import participantPropTypes from '../../../components/participantPropTypes'; const propTypes = { /** Report object for the current report */ diff --git a/src/pages/home/report/ReportTypingIndicator.js b/src/pages/home/report/ReportTypingIndicator.js index db97f712d65f..7b2b46b7d097 100755 --- a/src/pages/home/report/ReportTypingIndicator.js +++ b/src/pages/home/report/ReportTypingIndicator.js @@ -1,16 +1,16 @@ -import React, {useMemo} from 'react'; import PropTypes from 'prop-types'; -import _ from 'underscore'; +import React, {useMemo} from 'react'; import {withOnyx} from 'react-native-onyx'; -import {withNetwork} from '../../../components/OnyxProvider'; -import networkPropTypes from '../../../components/networkPropTypes'; -import compose from '../../../libs/compose'; -import ONYXKEYS from '../../../ONYXKEYS'; -import styles from '../../../styles/styles'; -import * as PersonalDetails from '../../../libs/actions/PersonalDetails'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import Text from '../../../components/Text'; -import TextWithEllipsis from '../../../components/TextWithEllipsis'; +import _ from 'underscore'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import Text from '@components/Text'; +import TextWithEllipsis from '@components/TextWithEllipsis'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Key-value pairs of user accountIDs/logins and whether or not they are typing. Keys are accountIDs or logins. */ diff --git a/src/pages/home/report/withReportAndReportActionOrNotFound.js b/src/pages/home/report/withReportAndReportActionOrNotFound.js index a14293e71c67..1450ab3fd10a 100644 --- a/src/pages/home/report/withReportAndReportActionOrNotFound.js +++ b/src/pages/home/report/withReportAndReportActionOrNotFound.js @@ -1,19 +1,19 @@ import PropTypes from 'prop-types'; -import React, {useEffect, useCallback} from 'react'; +import React, {useCallback, useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import getComponentDisplayName from '../../../libs/getComponentDisplayName'; -import NotFoundPage from '../../ErrorPage/NotFoundPage'; -import ONYXKEYS from '../../../ONYXKEYS'; -import reportPropTypes from '../../reportPropTypes'; -import reportMetadataPropTypes from '../../reportMetadataPropTypes'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import withWindowDimensions from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; +import reportMetadataPropTypes from '@pages/reportMetadataPropTypes'; +import reportPropTypes from '@pages/reportPropTypes'; +import * as Report from '@userActions/Report'; +import ONYXKEYS from '@src/ONYXKEYS'; import reportActionPropTypes from './reportActionPropTypes'; -import FullscreenLoadingIndicator from '../../../components/FullscreenLoadingIndicator'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import * as ReportActionsUtils from '../../../libs/ReportActionsUtils'; -import * as Report from '../../../libs/actions/Report'; -import compose from '../../../libs/compose'; -import withWindowDimensions from '../../../components/withWindowDimensions'; export default function (WrappedComponent) { const propTypes = { diff --git a/src/pages/home/report/withReportOrNotFound.tsx b/src/pages/home/report/withReportOrNotFound.tsx index 28d6707b085f..81d1376abd37 100644 --- a/src/pages/home/report/withReportOrNotFound.tsx +++ b/src/pages/home/report/withReportOrNotFound.tsx @@ -1,13 +1,13 @@ /* eslint-disable rulesdir/no-negated-variables */ +import {RouteProp} from '@react-navigation/native'; import React, {ComponentType, ForwardedRef, RefAttributes} from 'react'; import {OnyxEntry, withOnyx} from 'react-native-onyx'; -import {RouteProp} from '@react-navigation/native'; -import getComponentDisplayName from '../../../libs/getComponentDisplayName'; -import NotFoundPage from '../../ErrorPage/NotFoundPage'; -import ONYXKEYS from '../../../ONYXKEYS'; -import FullscreenLoadingIndicator from '../../../components/FullscreenLoadingIndicator'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import * as OnyxTypes from '../../../types/onyx'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import * as ReportUtils from '@libs/ReportUtils'; +import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; +import ONYXKEYS from '@src/ONYXKEYS'; +import * as OnyxTypes from '@src/types/onyx'; type OnyxProps = { /** The report currently being looked at */ diff --git a/src/pages/home/sidebar/AvatarWithOptionalStatus.js b/src/pages/home/sidebar/AvatarWithOptionalStatus.js index adf9cdda5cd0..b456788224fb 100644 --- a/src/pages/home/sidebar/AvatarWithOptionalStatus.js +++ b/src/pages/home/sidebar/AvatarWithOptionalStatus.js @@ -1,15 +1,15 @@ /* eslint-disable rulesdir/onyx-props-must-have-default */ +import PropTypes from 'prop-types'; import React, {useCallback} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback'; -import Text from '../../../components/Text'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; import PressableAvatarWithIndicator from './PressableAvatarWithIndicator'; -import Navigation from '../../../libs/Navigation/Navigation'; -import useLocalize from '../../../hooks/useLocalize'; -import styles from '../../../styles/styles'; -import ROUTES from '../../../ROUTES'; -import CONST from '../../../CONST'; const propTypes = { /** Whether the create menu is open or not */ diff --git a/src/pages/home/sidebar/GlobalNavigation/GlobalNavigationMenuItem.js b/src/pages/home/sidebar/GlobalNavigation/GlobalNavigationMenuItem.js index d24960e80ff2..93355fcfd530 100644 --- a/src/pages/home/sidebar/GlobalNavigation/GlobalNavigationMenuItem.js +++ b/src/pages/home/sidebar/GlobalNavigation/GlobalNavigationMenuItem.js @@ -1,13 +1,13 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import Text from '../../../../components/Text'; -import styles from '../../../../styles/styles'; -import * as StyleUtils from '../../../../styles/StyleUtils'; -import Icon from '../../../../components/Icon'; -import CONST from '../../../../CONST'; -import variables from '../../../../styles/variables'; -import PressableWithFeedback from '../../../../components/Pressable/PressableWithFeedback'; +import Icon from '@components/Icon'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import Text from '@components/Text'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; +import CONST from '@src/CONST'; const propTypes = { /** Icon to display */ diff --git a/src/pages/home/sidebar/GlobalNavigation/index.js b/src/pages/home/sidebar/GlobalNavigation/index.js index 1a8e923d1ff6..569ebf6fd0a8 100644 --- a/src/pages/home/sidebar/GlobalNavigation/index.js +++ b/src/pages/home/sidebar/GlobalNavigation/index.js @@ -1,15 +1,15 @@ -import React, {useMemo, useContext} from 'react'; +import React, {useContext, useMemo} from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import styles from '../../../../styles/styles'; -import * as Expensicons from '../../../../components/Icon/Expensicons'; -import CONST from '../../../../CONST'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import ROUTES from '../../../../ROUTES'; -import useLocalize from '../../../../hooks/useLocalize'; +import * as Expensicons from '@components/Icon/Expensicons'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import {SidebarNavigationContext} from '@pages/home/sidebar/SidebarNavigationContext'; +import SignInOrAvatarWithOptionalStatus from '@pages/home/sidebar/SignInOrAvatarWithOptionalStatus'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; import GlobalNavigationMenuItem from './GlobalNavigationMenuItem'; -import {SidebarNavigationContext} from '../SidebarNavigationContext'; -import SignInOrAvatarWithOptionalStatus from '../SignInOrAvatarWithOptionalStatus'; function GlobalNavigation() { const sidebarNavigation = useContext(SidebarNavigationContext); diff --git a/src/pages/home/sidebar/PressableAvatarWithIndicator.js b/src/pages/home/sidebar/PressableAvatarWithIndicator.js index 7b240c108e4e..e798bece339f 100644 --- a/src/pages/home/sidebar/PressableAvatarWithIndicator.js +++ b/src/pages/home/sidebar/PressableAvatarWithIndicator.js @@ -1,17 +1,17 @@ /* eslint-disable rulesdir/onyx-props-must-have-default */ import lodashGet from 'lodash/get'; -import React, {useCallback} from 'react'; import PropTypes from 'prop-types'; -import withCurrentUserPersonalDetails from '../../../components/withCurrentUserPersonalDetails'; -import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback'; -import AvatarWithIndicator from '../../../components/AvatarWithIndicator'; -import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; -import Navigation from '../../../libs/Navigation/Navigation'; -import * as UserUtils from '../../../libs/UserUtils'; -import useLocalize from '../../../hooks/useLocalize'; -import ROUTES from '../../../ROUTES'; -import CONST from '../../../CONST'; -import personalDetailsPropType from '../../personalDetailsPropType'; +import React, {useCallback} from 'react'; +import AvatarWithIndicator from '@components/AvatarWithIndicator'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import * as UserUtils from '@libs/UserUtils'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Whether the create menu is open or not */ diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index d3ff3070466f..0e7d6aa38545 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -1,31 +1,31 @@ /* eslint-disable rulesdir/onyx-props-must-have-default */ -import React, {useEffect, useRef, useCallback} from 'react'; -import {View, InteractionManager} from 'react-native'; -import _ from 'underscore'; import PropTypes from 'prop-types'; -import styles from '../../../styles/styles'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import ONYXKEYS from '../../../ONYXKEYS'; -import safeAreaInsetPropTypes from '../../safeAreaInsetPropTypes'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import Icon from '../../../components/Icon'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import Tooltip from '../../../components/Tooltip'; -import CONST from '../../../CONST'; -import * as App from '../../../libs/actions/App'; -import LHNOptionsList from '../../../components/LHNOptionsList/LHNOptionsList'; -import SidebarUtils from '../../../libs/SidebarUtils'; -import Header from '../../../components/Header'; -import OptionsListSkeletonView from '../../../components/OptionsListSkeletonView'; -import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback'; -import * as Session from '../../../libs/actions/Session'; -import KeyboardShortcut from '../../../libs/KeyboardShortcut'; -import onyxSubscribe from '../../../libs/onyxSubscribe'; -import * as ReportActionContextMenu from '../report/ContextMenu/ReportActionContextMenu'; -import Text from '../../../components/Text'; -import useLocalize from '../../../hooks/useLocalize'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; +import React, {useCallback, useEffect, useRef} from 'react'; +import {InteractionManager, View} from 'react-native'; +import _ from 'underscore'; +import Header from '@components/Header'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import LHNOptionsList from '@components/LHNOptionsList/LHNOptionsList'; +import OptionsListSkeletonView from '@components/OptionsListSkeletonView'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Text from '@components/Text'; +import Tooltip from '@components/Tooltip'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import KeyboardShortcut from '@libs/KeyboardShortcut'; +import Navigation from '@libs/Navigation/Navigation'; +import onyxSubscribe from '@libs/onyxSubscribe'; +import SidebarUtils from '@libs/SidebarUtils'; +import * as ReportActionContextMenu from '@pages/home/report/ContextMenu/ReportActionContextMenu'; +import safeAreaInsetPropTypes from '@pages/safeAreaInsetPropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import * as App from '@userActions/App'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const basePropTypes = { /** Safe area insets required for mobile devices margins */ diff --git a/src/pages/home/sidebar/SidebarLinksData.js b/src/pages/home/sidebar/SidebarLinksData.js index 394f6c5ddc5a..a5d58768a95d 100644 --- a/src/pages/home/sidebar/SidebarLinksData.js +++ b/src/pages/home/sidebar/SidebarLinksData.js @@ -1,21 +1,21 @@ -import React, {useCallback, useMemo, useRef} from 'react'; -import _ from 'underscore'; import {deepEqual} from 'fast-equals'; -import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useCallback, useMemo, useRef} from 'react'; import {View} from 'react-native'; -import SidebarUtils from '../../../libs/SidebarUtils'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import withCurrentReportID from '@components/withCurrentReportID'; +import withNavigationFocus from '@components/withNavigationFocus'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import * as SessionUtils from '@libs/SessionUtils'; +import SidebarUtils from '@libs/SidebarUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import SidebarLinks, {basePropTypes} from './SidebarLinks'; -import withCurrentReportID from '../../../components/withCurrentReportID'; -import compose from '../../../libs/compose'; -import ONYXKEYS from '../../../ONYXKEYS'; -import reportPropTypes from '../../reportPropTypes'; -import CONST from '../../../CONST'; -import useLocalize from '../../../hooks/useLocalize'; -import styles from '../../../styles/styles'; -import withNavigationFocus from '../../../components/withNavigationFocus'; -import * as SessionUtils from '../../../libs/SessionUtils'; const propTypes = { ...basePropTypes, diff --git a/src/pages/home/sidebar/SidebarNavigationContext.js b/src/pages/home/sidebar/SidebarNavigationContext.js index 47bda74e052d..d39c24178f8d 100644 --- a/src/pages/home/sidebar/SidebarNavigationContext.js +++ b/src/pages/home/sidebar/SidebarNavigationContext.js @@ -1,9 +1,9 @@ -import React, {useMemo, useCallback, useState} from 'react'; import PropTypes from 'prop-types'; +import React, {useCallback, useMemo, useState} from 'react'; import _ from 'underscore'; -import CONST from '../../../CONST'; -import Navigation from '../../../libs/Navigation/Navigation'; -import GLOBAL_NAVIGATION_MAPPING from '../../../GLOBAL_NAVIGATION_MAPPING'; +import Navigation from '@libs/Navigation/Navigation'; +import CONST from '@src/CONST'; +import GLOBAL_NAVIGATION_MAPPING from '@src/GLOBAL_NAVIGATION_MAPPING'; const propTypes = { /** Children to wrap. The part of app that should have acces to this context */ diff --git a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js index 97f1f7eaee20..cd8bff2e5945 100644 --- a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js +++ b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js @@ -1,14 +1,14 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../../../../styles/styles'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import Timing from '../../../../libs/actions/Timing'; -import CONST from '../../../../CONST'; -import Performance from '../../../../libs/Performance'; -import * as Browser from '../../../../libs/Browser'; -import GlobalNavigation from '../GlobalNavigation'; -import SubNavigation from '../SubNavigation/SubNavigation'; +import ScreenWrapper from '@components/ScreenWrapper'; +import * as Browser from '@libs/Browser'; +import Performance from '@libs/Performance'; +import GlobalNavigation from '@pages/home/sidebar/GlobalNavigation'; +import SubNavigation from '@pages/home/sidebar/SubNavigation/SubNavigation'; +import styles from '@styles/styles'; +import Timing from '@userActions/Timing'; +import CONST from '@src/CONST'; const propTypes = { /** Children to wrap (floating button). */ diff --git a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js index 340e7a0ed6a8..63c2cc2436d7 100644 --- a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js +++ b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js @@ -1,31 +1,31 @@ -import React, {useState, useEffect, useRef, useCallback, useImperativeHandle, forwardRef} from 'react'; -import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState} from 'react'; import {View} from 'react-native'; -import styles from '../../../../styles/styles'; -import * as Expensicons from '../../../../components/Icon/Expensicons'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import ROUTES from '../../../../ROUTES'; -import NAVIGATORS from '../../../../NAVIGATORS'; -import SCREENS from '../../../../SCREENS'; -import Permissions from '../../../../libs/Permissions'; -import * as Policy from '../../../../libs/actions/Policy'; -import PopoverMenu from '../../../../components/PopoverMenu'; -import CONST from '../../../../CONST'; -import FloatingActionButton from '../../../../components/FloatingActionButton'; -import compose from '../../../../libs/compose'; -import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize'; -import withWindowDimensions from '../../../../components/withWindowDimensions'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import withNavigation from '../../../../components/withNavigation'; -import * as Welcome from '../../../../libs/actions/Welcome'; -import withNavigationFocus from '../../../../components/withNavigationFocus'; -import * as Task from '../../../../libs/actions/Task'; -import * as Session from '../../../../libs/actions/Session'; -import * as IOU from '../../../../libs/actions/IOU'; -import usePrevious from '../../../../hooks/usePrevious'; -import * as App from '../../../../libs/actions/App'; +import {withOnyx} from 'react-native-onyx'; +import FloatingActionButton from '@components/FloatingActionButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PopoverMenu from '@components/PopoverMenu'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withNavigation from '@components/withNavigation'; +import withNavigationFocus from '@components/withNavigationFocus'; +import withWindowDimensions from '@components/withWindowDimensions'; +import usePrevious from '@hooks/usePrevious'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import Permissions from '@libs/Permissions'; +import styles from '@styles/styles'; +import * as App from '@userActions/App'; +import * as IOU from '@userActions/IOU'; +import * as Policy from '@userActions/Policy'; +import * as Session from '@userActions/Session'; +import * as Task from '@userActions/Task'; +import * as Welcome from '@userActions/Welcome'; +import CONST from '@src/CONST'; +import NAVIGATORS from '@src/NAVIGATORS'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; /** * @param {Object} [policy] diff --git a/src/pages/home/sidebar/SidebarScreen/index.js b/src/pages/home/sidebar/SidebarScreen/index.js index 53640fffe559..6f2fa1f9944a 100755 --- a/src/pages/home/sidebar/SidebarScreen/index.js +++ b/src/pages/home/sidebar/SidebarScreen/index.js @@ -1,8 +1,8 @@ import React, {useCallback, useRef} from 'react'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import FreezeWrapper from '@libs/Navigation/FreezeWrapper'; import BaseSidebarScreen from './BaseSidebarScreen'; import FloatingActionButtonAndPopover from './FloatingActionButtonAndPopover'; -import FreezeWrapper from '../../../../libs/Navigation/FreezeWrapper'; -import useWindowDimensions from '../../../../hooks/useWindowDimensions'; function SidebarScreen(props) { const popoverModal = useRef(null); diff --git a/src/pages/home/sidebar/SidebarScreen/index.native.js b/src/pages/home/sidebar/SidebarScreen/index.native.js index 35c8b876338f..bb4d08d33ea7 100755 --- a/src/pages/home/sidebar/SidebarScreen/index.native.js +++ b/src/pages/home/sidebar/SidebarScreen/index.native.js @@ -1,8 +1,8 @@ import React from 'react'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import FreezeWrapper from '@libs/Navigation/FreezeWrapper'; import BaseSidebarScreen from './BaseSidebarScreen'; import FloatingActionButtonAndPopover from './FloatingActionButtonAndPopover'; -import FreezeWrapper from '../../../../libs/Navigation/FreezeWrapper'; -import useWindowDimensions from '../../../../hooks/useWindowDimensions'; function SidebarScreen(props) { const {isSmallScreenWidth} = useWindowDimensions(); diff --git a/src/pages/home/sidebar/SignInButton.js b/src/pages/home/sidebar/SignInButton.js index 24b90d778445..9e8722e2e083 100644 --- a/src/pages/home/sidebar/SignInButton.js +++ b/src/pages/home/sidebar/SignInButton.js @@ -1,12 +1,12 @@ /* eslint-disable rulesdir/onyx-props-must-have-default */ import React from 'react'; import {View} from 'react-native'; -import PressableWithoutFeedback from '../../../components/Pressable/PressableWithoutFeedback'; -import Button from '../../../components/Button'; -import styles from '../../../styles/styles'; -import * as Session from '../../../libs/actions/Session'; -import useLocalize from '../../../hooks/useLocalize'; -import CONST from '../../../CONST'; +import Button from '@components/Button'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; function SignInButton() { const {translate} = useLocalize(); diff --git a/src/pages/home/sidebar/SignInOrAvatarWithOptionalStatus.js b/src/pages/home/sidebar/SignInOrAvatarWithOptionalStatus.js index 2599ac6b6942..8e41e1c6af6a 100644 --- a/src/pages/home/sidebar/SignInOrAvatarWithOptionalStatus.js +++ b/src/pages/home/sidebar/SignInOrAvatarWithOptionalStatus.js @@ -1,17 +1,17 @@ /* eslint-disable rulesdir/onyx-props-must-have-default */ -import React from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import withCurrentUserPersonalDetails from '../../../components/withCurrentUserPersonalDetails'; -import personalDetailsPropType from '../../personalDetailsPropType'; -import PressableAvatarWithIndicator from './PressableAvatarWithIndicator'; +import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; +import compose from '@libs/compose'; +import Permissions from '@libs/Permissions'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import * as Session from '@userActions/Session'; +import ONYXKEYS from '@src/ONYXKEYS'; import AvatarWithOptionalStatus from './AvatarWithOptionalStatus'; +import PressableAvatarWithIndicator from './PressableAvatarWithIndicator'; import SignInButton from './SignInButton'; -import * as Session from '../../../libs/actions/Session'; -import Permissions from '../../../libs/Permissions'; -import compose from '../../../libs/compose'; -import ONYXKEYS from '../../../ONYXKEYS'; const propTypes = { /** The personal details of the person who is logged in */ diff --git a/src/pages/home/sidebar/SubNavigation/SubNavigation.js b/src/pages/home/sidebar/SubNavigation/SubNavigation.js index 0c893b356099..ceb1d40dca50 100644 --- a/src/pages/home/sidebar/SubNavigation/SubNavigation.js +++ b/src/pages/home/sidebar/SubNavigation/SubNavigation.js @@ -1,12 +1,12 @@ -import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; import {View} from 'react-native'; -import styles from '../../../../styles/styles'; -import SidebarLinksData from '../SidebarLinksData'; -import Timing from '../../../../libs/actions/Timing'; -import CONST from '../../../../CONST'; -import Performance from '../../../../libs/Performance'; -import safeAreaInsetPropTypes from '../../../safeAreaInsetPropTypes'; +import Performance from '@libs/Performance'; +import SidebarLinksData from '@pages/home/sidebar/SidebarLinksData'; +import safeAreaInsetPropTypes from '@pages/safeAreaInsetPropTypes'; +import styles from '@styles/styles'; +import Timing from '@userActions/Timing'; +import CONST from '@src/CONST'; const propTypes = { /** Function called when a pinned chat is selected. */ diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index b8154ac4ceda..c7b5885865df 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -1,24 +1,24 @@ -import React, {useState, useMemo, useCallback, useRef, useEffect} from 'react'; -import {Keyboard} from 'react-native'; +import Str from 'expensify-common/lib/str'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {Keyboard} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import Str from 'expensify-common/lib/str'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import Navigation from '../../libs/Navigation/Navigation'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import compose from '../../libs/compose'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import {withNetwork} from '../../components/OnyxProvider'; -import * as CurrencyUtils from '../../libs/CurrencyUtils'; -import * as ReportActionsUtils from '../../libs/ReportActionsUtils'; -import * as ReportUtils from '../../libs/ReportUtils'; -import ROUTES from '../../ROUTES'; -import {iouPropTypes, iouDefaultProps} from './propTypes'; -import SelectionList from '../../components/SelectionList'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import {withNetwork} from '@components/OnyxProvider'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportActionsUtils from '@libs/ReportActionsUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {iouDefaultProps, iouPropTypes} from './propTypes'; /** * IOU Currency selection for selecting currency diff --git a/src/pages/iou/MoneyRequestCategoryPage.js b/src/pages/iou/MoneyRequestCategoryPage.js index 7431a5deed77..9551004eb1ab 100644 --- a/src/pages/iou/MoneyRequestCategoryPage.js +++ b/src/pages/iou/MoneyRequestCategoryPage.js @@ -1,20 +1,20 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import compose from '../../libs/compose'; -import ROUTES from '../../ROUTES'; -import Navigation from '../../libs/Navigation/Navigation'; -import useLocalize from '../../hooks/useLocalize'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import CategoryPicker from '../../components/CategoryPicker'; -import ONYXKEYS from '../../ONYXKEYS'; -import reportPropTypes from '../reportPropTypes'; -import * as IOU from '../../libs/actions/IOU'; -import styles from '../../styles/styles'; -import Text from '../../components/Text'; -import {iouPropTypes, iouDefaultProps} from './propTypes'; +import CategoryPicker from '@components/CategoryPicker'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {iouDefaultProps, iouPropTypes} from './propTypes'; const propTypes = { /** Navigation route context info provided by react navigation */ diff --git a/src/pages/iou/MoneyRequestDatePage.js b/src/pages/iou/MoneyRequestDatePage.js index fdf7b3a0fb30..430af5d9de94 100644 --- a/src/pages/iou/MoneyRequestDatePage.js +++ b/src/pages/iou/MoneyRequestDatePage.js @@ -1,21 +1,21 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import ONYXKEYS from '../../ONYXKEYS'; -import styles from '../../styles/styles'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import * as IOU from '../../libs/actions/IOU'; -import * as MoneyRequestUtils from '../../libs/MoneyRequestUtils'; -import NewDatePicker from '../../components/NewDatePicker'; -import useLocalize from '../../hooks/useLocalize'; -import CONST from '../../CONST'; -import {iouPropTypes, iouDefaultProps} from './propTypes'; -import FormProvider from '../../components/Form/FormProvider'; +import FormProvider from '@components/Form/FormProvider'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import NewDatePicker from '@components/NewDatePicker'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useLocalize from '@hooks/useLocalize'; +import * as MoneyRequestUtils from '@libs/MoneyRequestUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {iouDefaultProps, iouPropTypes} from './propTypes'; const propTypes = { /** Onyx Props */ diff --git a/src/pages/iou/MoneyRequestDescriptionPage.js b/src/pages/iou/MoneyRequestDescriptionPage.js index cfdbb60b4f0d..c0ed2da2eb7d 100644 --- a/src/pages/iou/MoneyRequestDescriptionPage.js +++ b/src/pages/iou/MoneyRequestDescriptionPage.js @@ -1,25 +1,25 @@ -import React, {useEffect, useRef, useCallback} from 'react'; -import {View} from 'react-native'; -import {withOnyx} from 'react-native-onyx'; import {useFocusEffect} from '@react-navigation/native'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useRef} from 'react'; +import {View} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import {iouPropTypes, iouDefaultProps} from './propTypes'; -import TextInput from '../../components/TextInput'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Form from '../../components/Form'; -import ONYXKEYS from '../../ONYXKEYS'; -import styles from '../../styles/styles'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import * as IOU from '../../libs/actions/IOU'; -import * as MoneyRequestUtils from '../../libs/MoneyRequestUtils'; -import CONST from '../../CONST'; -import useLocalize from '../../hooks/useLocalize'; -import updateMultilineInputRange from '../../libs/UpdateMultilineInputRange'; -import * as Browser from '../../libs/Browser'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TextInput from '@components/TextInput'; +import useLocalize from '@hooks/useLocalize'; +import * as Browser from '@libs/Browser'; +import * as MoneyRequestUtils from '@libs/MoneyRequestUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import updateMultilineInputRange from '@libs/UpdateMultilineInputRange'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {iouDefaultProps, iouPropTypes} from './propTypes'; const propTypes = { /** Onyx Props */ diff --git a/src/pages/iou/MoneyRequestEditWaypointPage.js b/src/pages/iou/MoneyRequestEditWaypointPage.js index 68f85848a69e..fc777891109e 100644 --- a/src/pages/iou/MoneyRequestEditWaypointPage.js +++ b/src/pages/iou/MoneyRequestEditWaypointPage.js @@ -1,5 +1,5 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import WaypointEditor from './WaypointEditor'; const propTypes = { diff --git a/src/pages/iou/MoneyRequestMerchantPage.js b/src/pages/iou/MoneyRequestMerchantPage.js index af20930ffe8d..5c01484310ff 100644 --- a/src/pages/iou/MoneyRequestMerchantPage.js +++ b/src/pages/iou/MoneyRequestMerchantPage.js @@ -1,21 +1,21 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useCallback, useEffect, useRef} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import TextInput from '../../components/TextInput'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Form from '../../components/Form'; -import ONYXKEYS from '../../ONYXKEYS'; -import styles from '../../styles/styles'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import * as IOU from '../../libs/actions/IOU'; -import CONST from '../../CONST'; -import useLocalize from '../../hooks/useLocalize'; -import {iouPropTypes, iouDefaultProps} from './propTypes'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TextInput from '@components/TextInput'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {iouDefaultProps, iouPropTypes} from './propTypes'; const propTypes = { /** Onyx Props */ diff --git a/src/pages/iou/MoneyRequestSelectorPage.js b/src/pages/iou/MoneyRequestSelectorPage.js index 979be64f68e9..17893ce98f0b 100644 --- a/src/pages/iou/MoneyRequestSelectorPage.js +++ b/src/pages/iou/MoneyRequestSelectorPage.js @@ -1,30 +1,30 @@ -import {withOnyx} from 'react-native-onyx'; -import {View} from 'react-native'; -import React, {useEffect, useState} from 'react'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useEffect, useState} from 'react'; +import {View} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import ONYXKEYS from '../../ONYXKEYS'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import TabSelector from '../../components/TabSelector/TabSelector'; -import CONST from '../../CONST'; -import useLocalize from '../../hooks/useLocalize'; -import * as IOUUtils from '../../libs/IOUUtils'; -import Navigation from '../../libs/Navigation/Navigation'; -import styles from '../../styles/styles'; -import ReceiptSelector from './ReceiptSelector'; -import * as IOU from '../../libs/actions/IOU'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import DragAndDropProvider from '@components/DragAndDrop/Provider'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TabSelector from '@components/TabSelector/TabSelector'; +import useLocalize from '@hooks/useLocalize'; +import usePrevious from '@hooks/usePrevious'; +import compose from '@libs/compose'; +import * as IOUUtils from '@libs/IOUUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import OnyxTabNavigator, {TopTab} from '@libs/Navigation/OnyxTabNavigator'; +import * as ReportUtils from '@libs/ReportUtils'; +import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import NewDistanceRequestPage from './NewDistanceRequestPage'; -import DragAndDropProvider from '../../components/DragAndDrop/Provider'; -import OnyxTabNavigator, {TopTab} from '../../libs/Navigation/OnyxTabNavigator'; +import ReceiptSelector from './ReceiptSelector'; import NewRequestAmountPage from './steps/NewRequestAmountPage'; -import withReportOrNotFound from '../home/report/withReportOrNotFound'; -import compose from '../../libs/compose'; -import reportPropTypes from '../reportPropTypes'; -import * as ReportUtils from '../../libs/ReportUtils'; -import usePrevious from '../../hooks/usePrevious'; const propTypes = { /** React Navigation route */ diff --git a/src/pages/iou/MoneyRequestTagPage.js b/src/pages/iou/MoneyRequestTagPage.js index 2fc37d2c4271..43f2ebde10ba 100644 --- a/src/pages/iou/MoneyRequestTagPage.js +++ b/src/pages/iou/MoneyRequestTagPage.js @@ -1,23 +1,23 @@ -import React from 'react'; -import _ from 'underscore'; -import PropTypes from 'prop-types'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import compose from '../../libs/compose'; -import ROUTES from '../../ROUTES'; -import * as IOU from '../../libs/actions/IOU'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import Navigation from '../../libs/Navigation/Navigation'; -import useLocalize from '../../hooks/useLocalize'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import TagPicker from '../../components/TagPicker'; -import Text from '../../components/Text'; -import tagPropTypes from '../../components/tagPropTypes'; -import ONYXKEYS from '../../ONYXKEYS'; -import reportPropTypes from '../reportPropTypes'; -import styles from '../../styles/styles'; -import {iouPropTypes, iouDefaultProps} from './propTypes'; +import _ from 'underscore'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TagPicker from '@components/TagPicker'; +import tagPropTypes from '@components/tagPropTypes'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {iouDefaultProps, iouPropTypes} from './propTypes'; const propTypes = { /** Navigation route context info provided by react navigation */ diff --git a/src/pages/iou/NewDistanceRequestPage.js b/src/pages/iou/NewDistanceRequestPage.js index 726350bfca07..fc4549be3b33 100644 --- a/src/pages/iou/NewDistanceRequestPage.js +++ b/src/pages/iou/NewDistanceRequestPage.js @@ -1,13 +1,13 @@ -import React, {useEffect} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; import _ from 'underscore'; -import * as IOU from '../../libs/actions/IOU'; -import ONYXKEYS from '../../ONYXKEYS'; -import DistanceRequest from '../../components/DistanceRequest'; -import reportPropTypes from '../reportPropTypes'; -import CONST from '../../CONST'; +import DistanceRequest from '@components/DistanceRequest'; +import reportPropTypes from '@pages/reportPropTypes'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import {iouPropTypes} from './propTypes'; const propTypes = { diff --git a/src/pages/iou/NewDistanceRequestWaypointEditorPage.js b/src/pages/iou/NewDistanceRequestWaypointEditorPage.js index 47dcbc8e4139..269cde577040 100644 --- a/src/pages/iou/NewDistanceRequestWaypointEditorPage.js +++ b/src/pages/iou/NewDistanceRequestWaypointEditorPage.js @@ -1,8 +1,8 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; +import ONYXKEYS from '@src/ONYXKEYS'; import WaypointEditor from './WaypointEditor'; -import ONYXKEYS from '../../ONYXKEYS'; const propTypes = { /** The transactionID of this request */ diff --git a/src/pages/iou/ReceiptDropUI.js b/src/pages/iou/ReceiptDropUI.js index e38e88b4490a..9c1483663d4b 100644 --- a/src/pages/iou/ReceiptDropUI.js +++ b/src/pages/iou/ReceiptDropUI.js @@ -1,11 +1,11 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {Text, View} from 'react-native'; -import PropTypes from 'prop-types'; -import CONST from '../../CONST'; -import styles from '../../styles/styles'; -import ReceiptUpload from '../../../assets/images/receipt-upload.svg'; -import useLocalize from '../../hooks/useLocalize'; -import DragAndDropConsumer from '../../components/DragAndDrop/Consumer'; +import ReceiptUpload from '@assets/images/receipt-upload.svg'; +import DragAndDropConsumer from '@components/DragAndDrop/Consumer'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /** Callback to execute when a file is dropped. */ diff --git a/src/pages/iou/ReceiptSelector/NavigationAwareCamera.js b/src/pages/iou/ReceiptSelector/NavigationAwareCamera.js index e9cb81003979..e4b24f8a0ad8 100644 --- a/src/pages/iou/ReceiptSelector/NavigationAwareCamera.js +++ b/src/pages/iou/ReceiptSelector/NavigationAwareCamera.js @@ -1,8 +1,8 @@ -import React, {useEffect, useRef} from 'react'; -import Webcam from 'react-webcam'; import {useIsFocused} from '@react-navigation/native'; import PropTypes from 'prop-types'; +import React, {useEffect, useRef} from 'react'; import {View} from 'react-native'; +import Webcam from 'react-webcam'; const propTypes = { /* Flag to turn on/off the torch/flashlight - if available */ diff --git a/src/pages/iou/ReceiptSelector/NavigationAwareCamera.native.js b/src/pages/iou/ReceiptSelector/NavigationAwareCamera.native.js index 69678622aae5..9d1b1723e882 100644 --- a/src/pages/iou/ReceiptSelector/NavigationAwareCamera.native.js +++ b/src/pages/iou/ReceiptSelector/NavigationAwareCamera.native.js @@ -1,9 +1,9 @@ -import React, {useEffect, useState} from 'react'; -import {Camera} from 'react-native-vision-camera'; import {useTabAnimation} from '@react-navigation/material-top-tabs'; import {useNavigation} from '@react-navigation/native'; import PropTypes from 'prop-types'; -import CONST from '../../../CONST'; +import React, {useEffect, useState} from 'react'; +import {Camera} from 'react-native-vision-camera'; +import CONST from '@src/CONST'; const propTypes = { /* The index of the tab that contains this camera */ diff --git a/src/pages/iou/ReceiptSelector/index.js b/src/pages/iou/ReceiptSelector/index.js index ca9fe90575e7..672b1458bf8e 100644 --- a/src/pages/iou/ReceiptSelector/index.js +++ b/src/pages/iou/ReceiptSelector/index.js @@ -1,34 +1,34 @@ -import {View, Text, PixelRatio, ActivityIndicator, PanResponder} from 'react-native'; -import React, {useCallback, useContext, useReducer, useRef, useState} from 'react'; import lodashGet from 'lodash/get'; -import _ from 'underscore'; import PropTypes from 'prop-types'; +import React, {useCallback, useContext, useReducer, useRef, useState} from 'react'; +import {ActivityIndicator, PanResponder, PixelRatio, Text, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import * as IOU from '../../../libs/actions/IOU'; -import reportPropTypes from '../../reportPropTypes'; -import CONST from '../../../CONST'; -import ReceiptUpload from '../../../../assets/images/receipt-upload.svg'; -import Button from '../../../components/Button'; -import styles from '../../../styles/styles'; -import CopyTextToClipboard from '../../../components/CopyTextToClipboard'; -import ReceiptDropUI from '../ReceiptDropUI'; -import AttachmentPicker from '../../../components/AttachmentPicker'; -import ConfirmModal from '../../../components/ConfirmModal'; -import ONYXKEYS from '../../../ONYXKEYS'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; -import useLocalize from '../../../hooks/useLocalize'; -import {DragAndDropContext} from '../../../components/DragAndDrop/Provider'; -import {iouPropTypes, iouDefaultProps} from '../propTypes'; -import * as FileUtils from '../../../libs/fileDownload/FileUtils'; -import Navigation from '../../../libs/Navigation/Navigation'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import Icon from '../../../components/Icon'; -import themeColors from '../../../styles/themes/default'; -import Shutter from '../../../../assets/images/shutter.svg'; +import _ from 'underscore'; +import Hand from '@assets/images/hand.svg'; +import ReceiptUpload from '@assets/images/receipt-upload.svg'; +import Shutter from '@assets/images/shutter.svg'; +import AttachmentPicker from '@components/AttachmentPicker'; +import Button from '@components/Button'; +import ConfirmModal from '@components/ConfirmModal'; +import CopyTextToClipboard from '@components/CopyTextToClipboard'; +import {DragAndDropContext} from '@components/DragAndDrop/Provider'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as Browser from '@libs/Browser'; +import * as FileUtils from '@libs/fileDownload/FileUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import {iouDefaultProps, iouPropTypes} from '@pages/iou/propTypes'; +import ReceiptDropUI from '@pages/iou/ReceiptDropUI'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import NavigationAwareCamera from './NavigationAwareCamera'; -import * as Browser from '../../../libs/Browser'; -import Hand from '../../../../assets/images/hand.svg'; -import PressableWithFeedback from '../../../components/Pressable/PressableWithFeedback'; const propTypes = { /** The report on which the request is initiated on */ diff --git a/src/pages/iou/ReceiptSelector/index.native.js b/src/pages/iou/ReceiptSelector/index.native.js index 649b6ea521f3..d47a2c7739a2 100644 --- a/src/pages/iou/ReceiptSelector/index.native.js +++ b/src/pages/iou/ReceiptSelector/index.native.js @@ -1,30 +1,30 @@ -import {ActivityIndicator, Alert, AppState, Text, View} from 'react-native'; -import React, {useCallback, useEffect, useRef, useState} from 'react'; -import {useCameraDevices} from 'react-native-vision-camera'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useRef, useState} from 'react'; +import {ActivityIndicator, Alert, AppState, Text, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import {RESULTS} from 'react-native-permissions'; -import PressableWithFeedback from '../../../components/Pressable/PressableWithFeedback'; -import Icon from '../../../components/Icon'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import AttachmentPicker from '../../../components/AttachmentPicker'; -import styles from '../../../styles/styles'; -import Shutter from '../../../../assets/images/shutter.svg'; -import Hand from '../../../../assets/images/hand.svg'; -import * as IOU from '../../../libs/actions/IOU'; -import themeColors from '../../../styles/themes/default'; -import reportPropTypes from '../../reportPropTypes'; -import CONST from '../../../CONST'; -import Button from '../../../components/Button'; -import useLocalize from '../../../hooks/useLocalize'; -import ONYXKEYS from '../../../ONYXKEYS'; -import Log from '../../../libs/Log'; +import {useCameraDevices} from 'react-native-vision-camera'; +import Hand from '@assets/images/hand.svg'; +import Shutter from '@assets/images/shutter.svg'; +import AttachmentPicker from '@components/AttachmentPicker'; +import Button from '@components/Button'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import useLocalize from '@hooks/useLocalize'; +import * as FileUtils from '@libs/fileDownload/FileUtils'; +import Log from '@libs/Log'; +import Navigation from '@libs/Navigation/Navigation'; +import {iouDefaultProps, iouPropTypes} from '@pages/iou/propTypes'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import * as CameraPermission from './CameraPermission'; -import {iouPropTypes, iouDefaultProps} from '../propTypes'; import NavigationAwareCamera from './NavigationAwareCamera'; -import Navigation from '../../../libs/Navigation/Navigation'; -import * as FileUtils from '../../../libs/fileDownload/FileUtils'; const propTypes = { /** React Navigation route */ diff --git a/src/pages/iou/SplitBillDetailsPage.js b/src/pages/iou/SplitBillDetailsPage.js index 1c48a4f1a44a..1834907c78ea 100644 --- a/src/pages/iou/SplitBillDetailsPage.js +++ b/src/pages/iou/SplitBillDetailsPage.js @@ -1,28 +1,28 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useCallback} from 'react'; -import _ from 'underscore'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; import {withOnyx} from 'react-native-onyx'; -import styles from '../../styles/styles'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; -import personalDetailsPropType from '../personalDetailsPropType'; -import compose from '../../libs/compose'; -import reportActionPropTypes from '../home/report/reportActionPropTypes'; -import reportPropTypes from '../reportPropTypes'; -import transactionPropTypes from '../../components/transactionPropTypes'; -import withReportAndReportActionOrNotFound from '../home/report/withReportAndReportActionOrNotFound'; -import * as TransactionUtils from '../../libs/TransactionUtils'; -import * as ReportUtils from '../../libs/ReportUtils'; -import * as IOU from '../../libs/actions/IOU'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import MoneyRequestConfirmationList from '../../components/MoneyRequestConfirmationList'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import MoneyRequestHeaderStatusBar from '../../components/MoneyRequestHeaderStatusBar'; -import useLocalize from '../../hooks/useLocalize'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import MoneyRequestConfirmationList from '@components/MoneyRequestConfirmationList'; +import MoneyRequestHeaderStatusBar from '@components/MoneyRequestHeaderStatusBar'; +import ScreenWrapper from '@components/ScreenWrapper'; +import transactionPropTypes from '@components/transactionPropTypes'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as TransactionUtils from '@libs/TransactionUtils'; +import reportActionPropTypes from '@pages/home/report/reportActionPropTypes'; +import withReportAndReportActionOrNotFound from '@pages/home/report/withReportAndReportActionOrNotFound'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/iou/WaypointEditor.js b/src/pages/iou/WaypointEditor.js index 03ce3cba28bd..944f7e879cb6 100644 --- a/src/pages/iou/WaypointEditor.js +++ b/src/pages/iou/WaypointEditor.js @@ -1,29 +1,29 @@ -import React, {useMemo, useRef, useState} from 'react'; -import _ from 'underscore'; +import {useNavigation} from '@react-navigation/native'; import lodashGet from 'lodash/get'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useMemo, useRef, useState} from 'react'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import {useNavigation} from '@react-navigation/native'; -import AddressSearch from '../../components/AddressSearch'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import ONYXKEYS from '../../ONYXKEYS'; -import Form from '../../components/Form'; -import styles from '../../styles/styles'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; -import useLocalize from '../../hooks/useLocalize'; -import useNetwork from '../../hooks/useNetwork'; -import CONST from '../../CONST'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import ConfirmModal from '../../components/ConfirmModal'; -import * as Transaction from '../../libs/actions/Transaction'; -import * as ValidationUtils from '../../libs/ValidationUtils'; -import ROUTES from '../../ROUTES'; -import transactionPropTypes from '../../components/transactionPropTypes'; -import * as ErrorUtils from '../../libs/ErrorUtils'; +import _ from 'underscore'; +import AddressSearch from '@components/AddressSearch'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import ConfirmModal from '@components/ConfirmModal'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import ScreenWrapper from '@components/ScreenWrapper'; +import transactionPropTypes from '@components/transactionPropTypes'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as Transaction from '@userActions/Transaction'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Route params */ diff --git a/src/pages/iou/propTypes/index.js b/src/pages/iou/propTypes/index.js index d41b4cbf1724..a03ed65dda9c 100644 --- a/src/pages/iou/propTypes/index.js +++ b/src/pages/iou/propTypes/index.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; -import CONST from '../../../CONST'; -import participantPropTypes from '../../../components/participantPropTypes'; +import participantPropTypes from '@components/participantPropTypes'; +import CONST from '@src/CONST'; const iouPropTypes = PropTypes.shape({ /** ID (iouType + reportID) of the request */ diff --git a/src/pages/iou/steps/MoneyRequestAmountForm.js b/src/pages/iou/steps/MoneyRequestAmountForm.js index a184294aac11..1ee8c607710a 100644 --- a/src/pages/iou/steps/MoneyRequestAmountForm.js +++ b/src/pages/iou/steps/MoneyRequestAmountForm.js @@ -1,22 +1,22 @@ -import React, {useEffect, useState, useCallback, useRef} from 'react'; -import {ScrollView, View} from 'react-native'; -import PropTypes from 'prop-types'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useRef, useState} from 'react'; +import {ScrollView, View} from 'react-native'; import _ from 'underscore'; -import styles from '../../../styles/styles'; -import BigNumberPad from '../../../components/BigNumberPad'; -import * as CurrencyUtils from '../../../libs/CurrencyUtils'; -import * as MoneyRequestUtils from '../../../libs/MoneyRequestUtils'; -import Button from '../../../components/Button'; -import * as DeviceCapabilities from '../../../libs/DeviceCapabilities'; -import TextInputWithCurrencySymbol from '../../../components/TextInputWithCurrencySymbol'; -import useLocalize from '../../../hooks/useLocalize'; -import CONST from '../../../CONST'; -import FormHelpMessage from '../../../components/FormHelpMessage'; -import refPropTypes from '../../../components/refPropTypes'; -import getOperatingSystem from '../../../libs/getOperatingSystem'; -import * as Browser from '../../../libs/Browser'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; +import BigNumberPad from '@components/BigNumberPad'; +import Button from '@components/Button'; +import FormHelpMessage from '@components/FormHelpMessage'; +import refPropTypes from '@components/refPropTypes'; +import TextInputWithCurrencySymbol from '@components/TextInputWithCurrencySymbol'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as Browser from '@libs/Browser'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import getOperatingSystem from '@libs/getOperatingSystem'; +import * as MoneyRequestUtils from '@libs/MoneyRequestUtils'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const propTypes = { /** IOU amount saved in Onyx */ diff --git a/src/pages/iou/steps/MoneyRequestConfirmPage.js b/src/pages/iou/steps/MoneyRequestConfirmPage.js index 06f4dda04c18..79cf48ce634d 100644 --- a/src/pages/iou/steps/MoneyRequestConfirmPage.js +++ b/src/pages/iou/steps/MoneyRequestConfirmPage.js @@ -1,33 +1,33 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import MoneyRequestConfirmationList from '../../../components/MoneyRequestConfirmationList'; -import CONST from '../../../CONST'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import styles from '../../../styles/styles'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import * as IOU from '../../../libs/actions/IOU'; -import compose from '../../../libs/compose'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import * as OptionsListUtils from '../../../libs/OptionsListUtils'; -import * as MoneyRequestUtils from '../../../libs/MoneyRequestUtils'; -import withLocalize from '../../../components/withLocalize'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import ONYXKEYS from '../../../ONYXKEYS'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '../../../components/withCurrentUserPersonalDetails'; -import reportPropTypes from '../../reportPropTypes'; -import personalDetailsPropType from '../../personalDetailsPropType'; -import * as FileUtils from '../../../libs/fileDownload/FileUtils'; -import * as Policy from '../../../libs/actions/Policy'; -import useNetwork from '../../../hooks/useNetwork'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; -import {iouPropTypes, iouDefaultProps} from '../propTypes'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import useInitialValue from '../../../hooks/useInitialValue'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MoneyRequestConfirmationList from '@components/MoneyRequestConfirmationList'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import withLocalize from '@components/withLocalize'; +import useInitialValue from '@hooks/useInitialValue'; +import useNetwork from '@hooks/useNetwork'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import compose from '@libs/compose'; +import * as FileUtils from '@libs/fileDownload/FileUtils'; +import * as MoneyRequestUtils from '@libs/MoneyRequestUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import {iouDefaultProps, iouPropTypes} from '@pages/iou/propTypes'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import * as Policy from '@userActions/Policy'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** React Navigation route */ diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js index b3047588a217..ec5ab3a678bd 100644 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js @@ -1,22 +1,22 @@ -import React, {useEffect, useRef, useState, useCallback} from 'react'; -import {View} from 'react-native'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useRef, useState} from 'react'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import CONST from '../../../../CONST'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import ROUTES from '../../../../ROUTES'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useInitialValue from '@hooks/useInitialValue'; +import useLocalize from '@hooks/useLocalize'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import * as MoneyRequestUtils from '@libs/MoneyRequestUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import {iouDefaultProps, iouPropTypes} from '@pages/iou/propTypes'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import MoneyRequestParticipantsSelector from './MoneyRequestParticipantsSelector'; -import styles from '../../../../styles/styles'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import * as DeviceCapabilities from '../../../../libs/DeviceCapabilities'; -import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; -import * as IOU from '../../../../libs/actions/IOU'; -import * as MoneyRequestUtils from '../../../../libs/MoneyRequestUtils'; -import {iouPropTypes, iouDefaultProps} from '../../propTypes'; -import useLocalize from '../../../../hooks/useLocalize'; -import useInitialValue from '../../../../hooks/useInitialValue'; const propTypes = { /** React Navigation route */ diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js index 27da03b12e98..5d47a51fb73c 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js @@ -1,21 +1,21 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import styles from '../../../../styles/styles'; -import OptionsSelector from '../../../../components/OptionsSelector'; -import * as OptionsListUtils from '../../../../libs/OptionsListUtils'; -import * as ReportUtils from '../../../../libs/ReportUtils'; -import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize'; -import * as Browser from '../../../../libs/Browser'; -import compose from '../../../../libs/compose'; -import CONST from '../../../../CONST'; -import personalDetailsPropType from '../../../personalDetailsPropType'; -import reportPropTypes from '../../../reportPropTypes'; -import refPropTypes from '../../../../components/refPropTypes'; +import OptionsSelector from '@components/OptionsSelector'; +import refPropTypes from '@components/refPropTypes'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Beta features list */ diff --git a/src/pages/iou/steps/NewRequestAmountPage.js b/src/pages/iou/steps/NewRequestAmountPage.js index 15a2c74d8a95..e531e6706f55 100644 --- a/src/pages/iou/steps/NewRequestAmountPage.js +++ b/src/pages/iou/steps/NewRequestAmountPage.js @@ -1,26 +1,26 @@ +import {useFocusEffect} from '@react-navigation/native'; +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useCallback, useEffect, useRef} from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; -import {useFocusEffect} from '@react-navigation/native'; -import lodashGet from 'lodash/get'; import _ from 'underscore'; -import ONYXKEYS from '../../../ONYXKEYS'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import * as CurrencyUtils from '../../../libs/CurrencyUtils'; -import reportPropTypes from '../../reportPropTypes'; -import * as IOU from '../../../libs/actions/IOU'; -import useLocalize from '../../../hooks/useLocalize'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useLocalize from '@hooks/useLocalize'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import * as IOUUtils from '@libs/IOUUtils'; +import * as MoneyRequestUtils from '@libs/MoneyRequestUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import {iouDefaultProps, iouPropTypes} from '@pages/iou/propTypes'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as IOU from '@userActions/IOU'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import MoneyRequestAmountForm from './MoneyRequestAmountForm'; -import * as IOUUtils from '../../../libs/IOUUtils'; -import * as MoneyRequestUtils from '../../../libs/MoneyRequestUtils'; -import FullPageNotFoundView from '../../../components/BlockingViews/FullPageNotFoundView'; -import styles from '../../../styles/styles'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import {iouPropTypes, iouDefaultProps} from '../propTypes'; -import CONST from '../../../CONST'; const propTypes = { /** React Navigation route */ diff --git a/src/pages/reportPropTypes.js b/src/pages/reportPropTypes.js index b70438171a73..a3bbbda5c0bf 100644 --- a/src/pages/reportPropTypes.js +++ b/src/pages/reportPropTypes.js @@ -1,7 +1,7 @@ -import _ from 'underscore'; import PropTypes from 'prop-types'; -import CONST from '../CONST'; -import avatarPropTypes from '../components/avatarPropTypes'; +import _ from 'underscore'; +import avatarPropTypes from '@components/avatarPropTypes'; +import CONST from '@src/CONST'; export default PropTypes.shape({ /** The specific type of chat */ diff --git a/src/pages/settings/AboutPage/AboutPage.js b/src/pages/settings/AboutPage/AboutPage.js index 36f088487469..8e9618036861 100644 --- a/src/pages/settings/AboutPage/AboutPage.js +++ b/src/pages/settings/AboutPage/AboutPage.js @@ -1,28 +1,28 @@ -import _ from 'underscore'; -import React, {useRef, useMemo} from 'react'; +import React, {useMemo, useRef} from 'react'; import {ScrollView, View} from 'react-native'; import DeviceInfo from 'react-native-device-info'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import styles from '../../../styles/styles'; -import Text from '../../../components/Text'; -import TextLink from '../../../components/TextLink'; -import CONST from '../../../CONST'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import Logo from '../../../../assets/images/new-expensify.svg'; +import _ from 'underscore'; +import Logo from '@assets/images/new-expensify.svg'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItemList from '@components/MenuItemList'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import useWaitForNavigation from '@hooks/useWaitForNavigation'; +import compose from '@libs/compose'; +import * as Environment from '@libs/Environment/Environment'; +import Navigation from '@libs/Navigation/Navigation'; +import {CONTEXT_MENU_TYPES} from '@pages/home/report/ContextMenu/ContextMenuActions'; +import * as ReportActionContextMenu from '@pages/home/report/ContextMenu/ReportActionContextMenu'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; import pkg from '../../../../package.json'; -import * as Report from '../../../libs/actions/Report'; -import * as Link from '../../../libs/actions/Link'; -import compose from '../../../libs/compose'; -import * as ReportActionContextMenu from '../../home/report/ContextMenu/ReportActionContextMenu'; -import {CONTEXT_MENU_TYPES} from '../../home/report/ContextMenu/ContextMenuActions'; -import * as Environment from '../../../libs/Environment/Environment'; -import MenuItemList from '../../../components/MenuItemList'; -import useWaitForNavigation from '../../../hooks/useWaitForNavigation'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/AppDownloadLinks.js b/src/pages/settings/AppDownloadLinks.js index 957120846f3b..db86b23fa048 100644 --- a/src/pages/settings/AppDownloadLinks.js +++ b/src/pages/settings/AppDownloadLinks.js @@ -1,20 +1,20 @@ -import _ from 'underscore'; import React from 'react'; import {ScrollView} from 'react-native'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import CONST from '../../CONST'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import MenuItem from '../../components/MenuItem'; -import styles from '../../styles/styles'; -import * as Link from '../../libs/actions/Link'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; -import * as ReportActionContextMenu from '../home/report/ContextMenu/ReportActionContextMenu'; -import {CONTEXT_MENU_TYPES} from '../home/report/ContextMenu/ContextMenuActions'; -import ROUTES from '../../ROUTES'; -import Navigation from '../../libs/Navigation/Navigation'; +import _ from 'underscore'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import {CONTEXT_MENU_TYPES} from '@pages/home/report/ContextMenu/ContextMenuActions'; +import * as ReportActionContextMenu from '@pages/home/report/ContextMenu/ReportActionContextMenu'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index 5ed498fcb3d0..bc395b47bffb 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -1,49 +1,49 @@ import lodashGet from 'lodash/get'; -import React, {useState, useEffect, useRef, useMemo, useCallback} from 'react'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; -import _ from 'underscore'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import CurrentUserPersonalDetailsSkeletonView from '../../components/CurrentUserPersonalDetailsSkeletonView'; -import {withNetwork} from '../../components/OnyxProvider'; -import styles from '../../styles/styles'; -import Text from '../../components/Text'; -import * as Session from '../../libs/actions/Session'; -import ONYXKEYS from '../../ONYXKEYS'; -import Tooltip from '../../components/Tooltip'; -import Avatar from '../../components/Avatar'; -import Navigation from '../../libs/Navigation/Navigation'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import MenuItem from '../../components/MenuItem'; -import themeColors from '../../styles/themes/default'; -import SCREENS from '../../SCREENS'; -import ROUTES from '../../ROUTES'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import CONST from '../../CONST'; -import Permissions from '../../libs/Permissions'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '../../components/withCurrentUserPersonalDetails'; -import * as PaymentMethods from '../../libs/actions/PaymentMethods'; -import bankAccountPropTypes from '../../components/bankAccountPropTypes'; -import cardPropTypes from '../../components/cardPropTypes'; -import * as Wallet from '../../libs/actions/Wallet'; -import walletTermsPropTypes from '../EnablePayments/walletTermsPropTypes'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import ConfirmModal from '../../components/ConfirmModal'; -import * as ReportUtils from '../../libs/ReportUtils'; -import * as Link from '../../libs/actions/Link'; -import OfflineWithFeedback from '../../components/OfflineWithFeedback'; -import * as ReimbursementAccountProps from '../ReimbursementAccount/reimbursementAccountPropTypes'; -import * as UserUtils from '../../libs/UserUtils'; -import policyMemberPropType from '../policyMemberPropType'; -import * as ReportActionContextMenu from '../home/report/ContextMenu/ReportActionContextMenu'; -import {CONTEXT_MENU_TYPES} from '../home/report/ContextMenu/ContextMenuActions'; -import * as CurrencyUtils from '../../libs/CurrencyUtils'; -import PressableWithoutFeedback from '../../components/Pressable/PressableWithoutFeedback'; -import useLocalize from '../../hooks/useLocalize'; -import useSingleExecution from '../../hooks/useSingleExecution'; -import useWaitForNavigation from '../../hooks/useWaitForNavigation'; -import HeaderPageLayout from '../../components/HeaderPageLayout'; +import _ from 'underscore'; +import Avatar from '@components/Avatar'; +import bankAccountPropTypes from '@components/bankAccountPropTypes'; +import cardPropTypes from '@components/cardPropTypes'; +import ConfirmModal from '@components/ConfirmModal'; +import CurrentUserPersonalDetailsSkeletonView from '@components/CurrentUserPersonalDetailsSkeletonView'; +import HeaderPageLayout from '@components/HeaderPageLayout'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import {withNetwork} from '@components/OnyxProvider'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import Text from '@components/Text'; +import Tooltip from '@components/Tooltip'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import useLocalize from '@hooks/useLocalize'; +import useSingleExecution from '@hooks/useSingleExecution'; +import useWaitForNavigation from '@hooks/useWaitForNavigation'; +import compose from '@libs/compose'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import Permissions from '@libs/Permissions'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as UserUtils from '@libs/UserUtils'; +import walletTermsPropTypes from '@pages/EnablePayments/walletTermsPropTypes'; +import {CONTEXT_MENU_TYPES} from '@pages/home/report/ContextMenu/ContextMenuActions'; +import * as ReportActionContextMenu from '@pages/home/report/ContextMenu/ReportActionContextMenu'; +import policyMemberPropType from '@pages/policyMemberPropType'; +import * as ReimbursementAccountProps from '@pages/ReimbursementAccount/reimbursementAccountPropTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as Link from '@userActions/Link'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import * as Session from '@userActions/Session'; +import * as Wallet from '@userActions/Wallet'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Preferences/LanguagePage.js b/src/pages/settings/Preferences/LanguagePage.js index f55e49eb561e..9ef95d599e97 100644 --- a/src/pages/settings/Preferences/LanguagePage.js +++ b/src/pages/settings/Preferences/LanguagePage.js @@ -1,14 +1,14 @@ -import _ from 'underscore'; -import React from 'react'; import PropTypes from 'prop-types'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as App from '../../../libs/actions/App'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import CONST from '../../../CONST'; -import SelectionList from '../../../components/SelectionList'; +import React from 'react'; +import _ from 'underscore'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import * as App from '@userActions/App'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/Preferences/PreferencesPage.js b/src/pages/settings/Preferences/PreferencesPage.js index 9e30e99ff38f..c86eed258151 100755 --- a/src/pages/settings/Preferences/PreferencesPage.js +++ b/src/pages/settings/Preferences/PreferencesPage.js @@ -1,24 +1,24 @@ import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import ONYXKEYS from '../../../ONYXKEYS'; -import styles from '../../../styles/styles'; -import themeColors from '../../../styles/themes/default'; -import Text from '../../../components/Text'; -import CONST from '../../../CONST'; -import * as User from '../../../libs/actions/User'; -import Switch from '../../../components/Switch'; -import TestToolMenu from '../../../components/TestToolMenu'; -import MenuItemWithTopDescription from '../../../components/MenuItemWithTopDescription'; -import IllustratedHeaderPageLayout from '../../../components/IllustratedHeaderPageLayout'; -import * as LottieAnimations from '../../../components/LottieAnimations'; -import SCREENS from '../../../SCREENS'; -import useEnvironment from '../../../hooks/useEnvironment'; -import useLocalize from '../../../hooks/useLocalize'; +import IllustratedHeaderPageLayout from '@components/IllustratedHeaderPageLayout'; +import * as LottieAnimations from '@components/LottieAnimations'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import Switch from '@components/Switch'; +import TestToolMenu from '@components/TestToolMenu'; +import Text from '@components/Text'; +import useEnvironment from '@hooks/useEnvironment'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; const propTypes = { /** The chat priority mode */ diff --git a/src/pages/settings/Preferences/PriorityModePage.js b/src/pages/settings/Preferences/PriorityModePage.js index 38f856825dcc..73c6932b6218 100644 --- a/src/pages/settings/Preferences/PriorityModePage.js +++ b/src/pages/settings/Preferences/PriorityModePage.js @@ -1,18 +1,18 @@ -import _, {compose} from 'underscore'; +import PropTypes from 'prop-types'; import React, {useCallback} from 'react'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import styles from '../../../styles/styles'; -import Text from '../../../components/Text'; -import ONYXKEYS from '../../../ONYXKEYS'; -import * as User from '../../../libs/actions/User'; -import CONST from '../../../CONST'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import SelectionList from '../../../components/SelectionList'; +import _, {compose} from 'underscore'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** The chat priority mode */ diff --git a/src/pages/settings/Preferences/ThemePage.js b/src/pages/settings/Preferences/ThemePage.js index 0dd6115e74e8..7802faecce14 100644 --- a/src/pages/settings/Preferences/ThemePage.js +++ b/src/pages/settings/Preferences/ThemePage.js @@ -1,19 +1,19 @@ -import _ from 'underscore'; +import PropTypes from 'prop-types'; import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import SelectionList from '../../../components/SelectionList'; -import styles from '../../../styles/styles'; -import ONYXKEYS from '../../../ONYXKEYS'; -import CONST from '../../../CONST'; -import compose from '../../../libs/compose'; -import Text from '../../../components/Text'; -import * as User from '../../../libs/actions/User'; +import _ from 'underscore'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js index 1c9abcf535f6..c48191957999 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js +++ b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js @@ -1,31 +1,31 @@ import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; -import _ from 'underscore'; -import React, {Component} from 'react'; -import {View, ScrollView, Keyboard} from 'react-native'; import PropTypes from 'prop-types'; +import React, {Component} from 'react'; +import {Keyboard, ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; -import compose from '../../../../libs/compose'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize'; -import MenuItem from '../../../../components/MenuItem'; -import styles from '../../../../styles/styles'; -import * as Expensicons from '../../../../components/Icon/Expensicons'; -import Text from '../../../../components/Text'; -import OfflineWithFeedback from '../../../../components/OfflineWithFeedback'; -import DotIndicatorMessage from '../../../../components/DotIndicatorMessage'; -import ConfirmModal from '../../../../components/ConfirmModal'; -import * as User from '../../../../libs/actions/User'; -import * as ErrorUtils from '../../../../libs/ErrorUtils'; -import themeColors from '../../../../styles/themes/default'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import ConfirmModal from '@components/ConfirmModal'; +import DotIndicatorMessage from '@components/DotIndicatorMessage'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import ValidateCodeForm from './ValidateCodeForm'; -import ROUTES from '../../../../ROUTES'; -import FullscreenLoadingIndicator from '../../../../components/FullscreenLoadingIndicator'; -import FullPageNotFoundView from '../../../../components/BlockingViews/FullPageNotFoundView'; -import CONST from '../../../../CONST'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Profile/Contacts/ContactMethodsPage.js b/src/pages/settings/Profile/Contacts/ContactMethodsPage.js index c710013f9a68..fbd7b4340cec 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodsPage.js +++ b/src/pages/settings/Profile/Contacts/ContactMethodsPage.js @@ -2,24 +2,24 @@ import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; import React from 'react'; -import {View, ScrollView} from 'react-native'; +import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import Button from '../../../../components/Button'; -import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize'; -import CONST from '../../../../CONST'; -import compose from '../../../../libs/compose'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import ROUTES from '../../../../ROUTES'; -import styles from '../../../../styles/styles'; -import MenuItem from '../../../../components/MenuItem'; -import Text from '../../../../components/Text'; -import CopyTextToClipboard from '../../../../components/CopyTextToClipboard'; -import OfflineWithFeedback from '../../../../components/OfflineWithFeedback'; -import FixedFooter from '../../../../components/FixedFooter'; +import Button from '@components/Button'; +import CopyTextToClipboard from '@components/CopyTextToClipboard'; +import FixedFooter from '@components/FixedFooter'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import MenuItem from '@components/MenuItem'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js index e6f55b7cd6cb..9e40ef65dfd6 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js @@ -1,26 +1,26 @@ -import React, {useRef} from 'react'; +import Str from 'expensify-common/lib/str'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useRef} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import Str from 'expensify-common/lib/str'; -import compose from '../../../../libs/compose'; -import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import Text from '../../../../components/Text'; -import TextInput from '../../../../components/TextInput'; -import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import ROUTES from '../../../../ROUTES'; -import styles from '../../../../styles/styles'; -import * as User from '../../../../libs/actions/User'; -import * as LoginUtils from '../../../../libs/LoginUtils'; -import * as ErrorUtils from '../../../../libs/ErrorUtils'; -import CONST from '../../../../CONST'; -import FormProvider from '../../../../components/Form/FormProvider'; -import InputWrapper from '../../../../components/Form/InputWrapper'; +import FormProvider from '@components/Form/FormProvider'; +import InputWrapper from '@components/Form/InputWrapper'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import * as LoginUtils from '@libs/LoginUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js index 73231cd315ad..3cdbb815f66f 100644 --- a/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js @@ -1,28 +1,28 @@ -import React, {useCallback, useState, useEffect, useRef, useImperativeHandle} from 'react'; -import {View} from 'react-native'; +import {useFocusEffect} from '@react-navigation/native'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; -import _ from 'underscore'; +import React, {useCallback, useEffect, useImperativeHandle, useRef, useState} from 'react'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import {useFocusEffect} from '@react-navigation/native'; -import MagicCodeInput from '../../../../../components/MagicCodeInput'; -import * as ErrorUtils from '../../../../../libs/ErrorUtils'; -import withLocalize, {withLocalizePropTypes} from '../../../../../components/withLocalize'; -import ONYXKEYS from '../../../../../ONYXKEYS'; -import compose from '../../../../../libs/compose'; -import styles from '../../../../../styles/styles'; -import OfflineWithFeedback from '../../../../../components/OfflineWithFeedback'; -import * as ValidationUtils from '../../../../../libs/ValidationUtils'; -import * as User from '../../../../../libs/actions/User'; -import Button from '../../../../../components/Button'; -import DotIndicatorMessage from '../../../../../components/DotIndicatorMessage'; -import * as Session from '../../../../../libs/actions/Session'; -import Text from '../../../../../components/Text'; -import {withNetwork} from '../../../../../components/OnyxProvider'; -import PressableWithFeedback from '../../../../../components/Pressable/PressableWithFeedback'; -import themeColors from '../../../../../styles/themes/default'; -import * as StyleUtils from '../../../../../styles/StyleUtils'; -import CONST from '../../../../../CONST'; +import _ from 'underscore'; +import Button from '@components/Button'; +import DotIndicatorMessage from '@components/DotIndicatorMessage'; +import MagicCodeInput from '@components/MagicCodeInput'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import {withNetwork} from '@components/OnyxProvider'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import * as Session from '@userActions/Session'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/Profile/CustomStatus/StatusPage.js b/src/pages/settings/Profile/CustomStatus/StatusPage.js index 0fa231aec6f1..5d7bb11f4537 100644 --- a/src/pages/settings/Profile/CustomStatus/StatusPage.js +++ b/src/pages/settings/Profile/CustomStatus/StatusPage.js @@ -1,25 +1,25 @@ -import React, {useMemo, useCallback, useEffect} from 'react'; +import lodashGet from 'lodash/get'; +import React, {useCallback, useEffect, useMemo} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes} from '../../../../components/withCurrentUserPersonalDetails'; -import MenuItemWithTopDescription from '../../../../components/MenuItemWithTopDescription'; -import HeaderPageLayout from '../../../../components/HeaderPageLayout'; -import * as Expensicons from '../../../../components/Icon/Expensicons'; -import withLocalize from '../../../../components/withLocalize'; -import Button from '../../../../components/Button'; -import Text from '../../../../components/Text'; -import MenuItem from '../../../../components/MenuItem'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import * as User from '../../../../libs/actions/User'; -import MobileBackgroundImage from '../../../../../assets/images/money-stack.svg'; -import themeColors from '../../../../styles/themes/default'; -import useLocalize from '../../../../hooks/useLocalize'; -import styles from '../../../../styles/styles'; -import compose from '../../../../libs/compose'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import ROUTES from '../../../../ROUTES'; -import SCREENS from '../../../../SCREENS'; +import MobileBackgroundImage from '@assets/images/money-stack.svg'; +import Button from '@components/Button'; +import HeaderPageLayout from '@components/HeaderPageLayout'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import Text from '@components/Text'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import withLocalize from '@components/withLocalize'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as User from '@userActions/User'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; const propTypes = { ...withCurrentUserPersonalDetailsPropTypes, diff --git a/src/pages/settings/Profile/CustomStatus/StatusSetPage.js b/src/pages/settings/Profile/CustomStatus/StatusSetPage.js index ac04c3ee5d4f..1d26c0e6dec4 100644 --- a/src/pages/settings/Profile/CustomStatus/StatusSetPage.js +++ b/src/pages/settings/Profile/CustomStatus/StatusSetPage.js @@ -1,23 +1,23 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; import {withOnyx} from 'react-native-onyx'; -import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; -import ROUTES from '../../../../ROUTES'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import compose from '../../../../libs/compose'; -import styles from '../../../../styles/styles'; -import useLocalize from '../../../../hooks/useLocalize'; -import CONST from '../../../../CONST'; -import EmojiPickerButtonDropdown from '../../../../components/EmojiPicker/EmojiPickerButtonDropdown'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import * as User from '../../../../libs/actions/User'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes} from '../../../../components/withCurrentUserPersonalDetails'; -import TextInput from '../../../../components/TextInput'; -import FormProvider from '../../../../components/Form/FormProvider'; -import InputWrapper from '../../../../components/Form/InputWrapper'; +import EmojiPickerButtonDropdown from '@components/EmojiPicker/EmojiPickerButtonDropdown'; +import FormProvider from '@components/Form/FormProvider'; +import InputWrapper from '@components/Form/InputWrapper'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TextInput from '@components/TextInput'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** The draft status of the user */ diff --git a/src/pages/settings/Profile/DisplayNamePage.js b/src/pages/settings/Profile/DisplayNamePage.js index 0fe7fa20ce0a..379b5f225310 100644 --- a/src/pages/settings/Profile/DisplayNamePage.js +++ b/src/pages/settings/Profile/DisplayNamePage.js @@ -1,26 +1,26 @@ import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '../../../components/withCurrentUserPersonalDetails'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import ONYXKEYS from '../../../ONYXKEYS'; -import CONST from '../../../CONST'; -import * as ValidationUtils from '../../../libs/ValidationUtils'; -import TextInput from '../../../components/TextInput'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import * as PersonalDetails from '../../../libs/actions/PersonalDetails'; -import compose from '../../../libs/compose'; -import * as ErrorUtils from '../../../libs/ErrorUtils'; -import ROUTES from '../../../ROUTES'; -import Navigation from '../../../libs/Navigation/Navigation'; -import FormProvider from '../../../components/Form/FormProvider'; -import InputWrapper from '../../../components/Form/InputWrapper'; -import FullScreenLoadingIndicator from '../../../components/FullscreenLoadingIndicator'; +import FormProvider from '@components/Form/FormProvider'; +import InputWrapper from '@components/Form/InputWrapper'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/Profile/LoungeAccessPage.js b/src/pages/settings/Profile/LoungeAccessPage.js index 81d63592211b..9c5c43463944 100644 --- a/src/pages/settings/Profile/LoungeAccessPage.js +++ b/src/pages/settings/Profile/LoungeAccessPage.js @@ -1,27 +1,27 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import ONYXKEYS from '../../../ONYXKEYS'; -import userPropTypes from '../userPropTypes'; -import NotFoundPage from '../../ErrorPage/NotFoundPage'; -import useLocalize from '../../../hooks/useLocalize'; -import FeatureList from '../../../components/FeatureList'; -import IllustratedHeaderPageLayout from '../../../components/IllustratedHeaderPageLayout'; -import * as LottieAnimations from '../../../components/LottieAnimations'; -import compose from '../../../libs/compose'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '../../../components/withCurrentUserPersonalDetails'; -import LinearGradient from '../../../components/LinearGradient'; -import styles from '../../../styles/styles'; -import Avatar from '../../../components/Avatar'; -import Text from '../../../components/Text'; -import * as UserUtils from '../../../libs/UserUtils'; -import CONST from '../../../CONST'; -import themeColors from '../../../styles/themes/default'; -import * as LocalePhoneNumber from '../../../libs/LocalePhoneNumber'; +import Avatar from '@components/Avatar'; +import FeatureList from '@components/FeatureList'; +import * as Illustrations from '@components/Icon/Illustrations'; +import IllustratedHeaderPageLayout from '@components/IllustratedHeaderPageLayout'; +import LinearGradient from '@components/LinearGradient'; +import * as LottieAnimations from '@components/LottieAnimations'; +import Text from '@components/Text'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; +import Navigation from '@libs/Navigation/Navigation'; +import * as UserUtils from '@libs/UserUtils'; +import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; +import userPropTypes from '@pages/settings/userPropTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** The session of the logged in person */ diff --git a/src/pages/settings/Profile/PersonalDetails/AddressPage.js b/src/pages/settings/Profile/PersonalDetails/AddressPage.js index 3a49b6901035..a6cb069780b2 100644 --- a/src/pages/settings/Profile/PersonalDetails/AddressPage.js +++ b/src/pages/settings/Profile/PersonalDetails/AddressPage.js @@ -1,27 +1,27 @@ +import {CONST as COMMON_CONST} from 'expensify-common/lib/CONST'; import lodashGet from 'lodash/get'; -import _ from 'underscore'; -import React, {useState, useCallback, useEffect, useMemo} from 'react'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; -import {CONST as COMMON_CONST} from 'expensify-common/lib/CONST'; import {withOnyx} from 'react-native-onyx'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; -import Form from '../../../../components/Form'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import CONST from '../../../../CONST'; -import TextInput from '../../../../components/TextInput'; -import styles from '../../../../styles/styles'; -import * as PersonalDetails from '../../../../libs/actions/PersonalDetails'; -import * as ValidationUtils from '../../../../libs/ValidationUtils'; -import AddressSearch from '../../../../components/AddressSearch'; -import StatePicker from '../../../../components/StatePicker'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import ROUTES from '../../../../ROUTES'; -import useLocalize from '../../../../hooks/useLocalize'; -import usePrivatePersonalDetails from '../../../../hooks/usePrivatePersonalDetails'; -import FullscreenLoadingIndicator from '../../../../components/FullscreenLoadingIndicator'; -import CountrySelector from '../../../../components/CountrySelector'; +import _ from 'underscore'; +import AddressSearch from '@components/AddressSearch'; +import CountrySelector from '@components/CountrySelector'; +import Form from '@components/Form'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import StatePicker from '@components/StatePicker'; +import TextInput from '@components/TextInput'; +import useLocalize from '@hooks/useLocalize'; +import usePrivatePersonalDetails from '@hooks/usePrivatePersonalDetails'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.js b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.js index 741974776df1..a0c2a02b2cb5 100644 --- a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.js +++ b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.js @@ -1,15 +1,15 @@ -import React, {useState, useMemo, useCallback} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useMemo, useState} from 'react'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; -import SelectionList from '../../../../components/SelectionList'; -import searchCountryOptions from '../../../../libs/searchCountryOptions'; -import StringUtils from '../../../../libs/StringUtils'; -import CONST from '../../../../CONST'; -import useLocalize from '../../../../hooks/useLocalize'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import searchCountryOptions from '@libs/searchCountryOptions'; +import StringUtils from '@libs/StringUtils'; +import CONST from '@src/CONST'; const propTypes = { /** Route from navigation */ diff --git a/src/pages/settings/Profile/PersonalDetails/DateOfBirthPage.js b/src/pages/settings/Profile/PersonalDetails/DateOfBirthPage.js index 68d81d64c604..51164fa29dac 100644 --- a/src/pages/settings/Profile/PersonalDetails/DateOfBirthPage.js +++ b/src/pages/settings/Profile/PersonalDetails/DateOfBirthPage.js @@ -1,23 +1,23 @@ +import {subYears} from 'date-fns'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; import React, {useCallback} from 'react'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import {subYears} from 'date-fns'; -import CONST from '../../../../CONST'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import ROUTES from '../../../../ROUTES'; -import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; -import NewDatePicker from '../../../../components/NewDatePicker'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import * as ValidationUtils from '../../../../libs/ValidationUtils'; -import * as PersonalDetails from '../../../../libs/actions/PersonalDetails'; -import compose from '../../../../libs/compose'; -import styles from '../../../../styles/styles'; -import usePrivatePersonalDetails from '../../../../hooks/usePrivatePersonalDetails'; -import FullscreenLoadingIndicator from '../../../../components/FullscreenLoadingIndicator'; -import FormProvider from '../../../../components/Form/FormProvider'; +import FormProvider from '@components/Form/FormProvider'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import NewDatePicker from '@components/NewDatePicker'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import usePrivatePersonalDetails from '@hooks/usePrivatePersonalDetails'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Profile/PersonalDetails/LegalNamePage.js b/src/pages/settings/Profile/PersonalDetails/LegalNamePage.js index 8d10c7c85b31..eeb6d8217f9f 100644 --- a/src/pages/settings/Profile/PersonalDetails/LegalNamePage.js +++ b/src/pages/settings/Profile/PersonalDetails/LegalNamePage.js @@ -1,26 +1,26 @@ -import _ from 'underscore'; -import React, {useCallback} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import CONST from '../../../../CONST'; -import * as ValidationUtils from '../../../../libs/ValidationUtils'; -import TextInput from '../../../../components/TextInput'; -import styles from '../../../../styles/styles'; -import * as PersonalDetails from '../../../../libs/actions/PersonalDetails'; -import compose from '../../../../libs/compose'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import ROUTES from '../../../../ROUTES'; -import usePrivatePersonalDetails from '../../../../hooks/usePrivatePersonalDetails'; -import FullscreenLoadingIndicator from '../../../../components/FullscreenLoadingIndicator'; -import * as ErrorUtils from '../../../../libs/ErrorUtils'; -import FormProvider from '../../../../components/Form/FormProvider'; -import InputWrapper from '../../../../components/Form/InputWrapper'; +import _ from 'underscore'; +import FormProvider from '@components/Form/FormProvider'; +import InputWrapper from '@components/Form/InputWrapper'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import usePrivatePersonalDetails from '@hooks/usePrivatePersonalDetails'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Profile/PersonalDetails/PersonalDetailsInitialPage.js b/src/pages/settings/Profile/PersonalDetails/PersonalDetailsInitialPage.js index 3b695de3fcb7..3a35f65f45ae 100644 --- a/src/pages/settings/Profile/PersonalDetails/PersonalDetailsInitialPage.js +++ b/src/pages/settings/Profile/PersonalDetails/PersonalDetailsInitialPage.js @@ -1,22 +1,22 @@ -import React from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React from 'react'; import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize'; -import ROUTES from '../../../../ROUTES'; -import Text from '../../../../components/Text'; -import styles from '../../../../styles/styles'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import compose from '../../../../libs/compose'; -import MenuItemWithTopDescription from '../../../../components/MenuItemWithTopDescription'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import {withNetwork} from '../../../../components/OnyxProvider'; -import usePrivatePersonalDetails from '../../../../hooks/usePrivatePersonalDetails'; -import FullscreenLoadingIndicator from '../../../../components/FullscreenLoadingIndicator'; -import * as PersonalDetailsUtils from '../../../../libs/PersonalDetailsUtils'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import {withNetwork} from '@components/OnyxProvider'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import usePrivatePersonalDetails from '@hooks/usePrivatePersonalDetails'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; +import styles from '@styles/styles'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Profile/ProfilePage.js b/src/pages/settings/Profile/ProfilePage.js index dda3dd4f456a..7ec8e05b76ff 100755 --- a/src/pages/settings/Profile/ProfilePage.js +++ b/src/pages/settings/Profile/ProfilePage.js @@ -1,29 +1,29 @@ import lodashGet from 'lodash/get'; -import React, {useEffect} from 'react'; -import {View, ScrollView} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; +import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import AvatarWithImagePicker from '../../../components/AvatarWithImagePicker'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import MenuItem from '../../../components/MenuItem'; -import MenuItemWithTopDescription from '../../../components/MenuItemWithTopDescription'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '../../../components/withCurrentUserPersonalDetails'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import CONST from '../../../CONST'; -import * as PersonalDetails from '../../../libs/actions/PersonalDetails'; -import compose from '../../../libs/compose'; -import Navigation from '../../../libs/Navigation/Navigation'; -import * as UserUtils from '../../../libs/UserUtils'; -import ROUTES from '../../../ROUTES'; -import styles from '../../../styles/styles'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import ONYXKEYS from '../../../ONYXKEYS'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import userPropTypes from '../userPropTypes'; -import * as App from '../../../libs/actions/App'; -import Permissions from '../../../libs/Permissions'; +import AvatarWithImagePicker from '@components/AvatarWithImagePicker'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import Permissions from '@libs/Permissions'; +import * as UserUtils from '@libs/UserUtils'; +import userPropTypes from '@pages/settings/userPropTypes'; +import styles from '@styles/styles'; +import * as App from '@userActions/App'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Profile/PronounsPage.js b/src/pages/settings/Profile/PronounsPage.js index 232b861a0f35..408da6376853 100644 --- a/src/pages/settings/Profile/PronounsPage.js +++ b/src/pages/settings/Profile/PronounsPage.js @@ -1,22 +1,22 @@ -import _ from 'underscore'; import lodashGet from 'lodash/get'; -import React, {useState, useMemo, useEffect} from 'react'; -import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes, withCurrentUserPersonalDetailsDefaultProps} from '../../../components/withCurrentUserPersonalDetails'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import * as PersonalDetails from '../../../libs/actions/PersonalDetails'; -import CONST from '../../../CONST'; -import ROUTES from '../../../ROUTES'; -import Navigation from '../../../libs/Navigation/Navigation'; -import SelectionList from '../../../components/SelectionList'; -import useLocalize from '../../../hooks/useLocalize'; -import ONYXKEYS from '../../../ONYXKEYS'; -import FullScreenLoadingIndicator from '../../../components/FullscreenLoadingIndicator'; -import compose from '../../../libs/compose'; +import React, {useEffect, useMemo, useState} from 'react'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import Text from '@components/Text'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { ...withCurrentUserPersonalDetailsPropTypes, diff --git a/src/pages/settings/Profile/TimezoneInitialPage.js b/src/pages/settings/Profile/TimezoneInitialPage.js index 5fd5e1bd7661..d2dec7195087 100644 --- a/src/pages/settings/Profile/TimezoneInitialPage.js +++ b/src/pages/settings/Profile/TimezoneInitialPage.js @@ -1,19 +1,19 @@ import lodashGet from 'lodash/get'; import React from 'react'; import {View} from 'react-native'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes, withCurrentUserPersonalDetailsDefaultProps} from '../../../components/withCurrentUserPersonalDetails'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import ROUTES from '../../../ROUTES'; -import CONST from '../../../CONST'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import Navigation from '../../../libs/Navigation/Navigation'; -import * as PersonalDetails from '../../../libs/actions/PersonalDetails'; -import compose from '../../../libs/compose'; -import Switch from '../../../components/Switch'; -import MenuItemWithTopDescription from '../../../components/MenuItemWithTopDescription'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Switch from '@components/Switch'; +import Text from '@components/Text'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/Profile/TimezoneSelectPage.js b/src/pages/settings/Profile/TimezoneSelectPage.js index 6bf0c2e974a4..2586be9fb673 100644 --- a/src/pages/settings/Profile/TimezoneSelectPage.js +++ b/src/pages/settings/Profile/TimezoneSelectPage.js @@ -1,17 +1,17 @@ import lodashGet from 'lodash/get'; import React, {useState} from 'react'; import _ from 'underscore'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes, withCurrentUserPersonalDetailsDefaultProps} from '../../../components/withCurrentUserPersonalDetails'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import CONST from '../../../CONST'; -import TIMEZONES from '../../../TIMEZONES'; -import * as PersonalDetails from '../../../libs/actions/PersonalDetails'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import SelectionList from '../../../components/SelectionList'; -import useLocalize from '../../../hooks/useLocalize'; -import useInitialValue from '../../../hooks/useInitialValue'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import useInitialValue from '@hooks/useInitialValue'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PersonalDetails from '@userActions/PersonalDetails'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; +import TIMEZONES from '@src/TIMEZONES'; const propTypes = { ...withCurrentUserPersonalDetailsPropTypes, diff --git a/src/pages/settings/Report/NotificationPreferencePage.js b/src/pages/settings/Report/NotificationPreferencePage.js index 43e346150ca8..75e9e0d5c5e8 100644 --- a/src/pages/settings/Report/NotificationPreferencePage.js +++ b/src/pages/settings/Report/NotificationPreferencePage.js @@ -1,18 +1,18 @@ import React from 'react'; import _ from 'underscore'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import Navigation from '../../../libs/Navigation/Navigation'; -import compose from '../../../libs/compose'; -import withReportOrNotFound from '../../home/report/withReportOrNotFound'; -import FullPageNotFoundView from '../../../components/BlockingViews/FullPageNotFoundView'; -import reportPropTypes from '../../reportPropTypes'; -import ROUTES from '../../../ROUTES'; -import CONST from '../../../CONST'; -import * as Report from '../../../libs/actions/Report'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import SelectionList from '../../../components/SelectionList'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; +import reportPropTypes from '@pages/reportPropTypes'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ROUTES from '@src/ROUTES'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/Report/ReportSettingsPage.js b/src/pages/settings/Report/ReportSettingsPage.js index fb88cbd59f25..df23e16e80cd 100644 --- a/src/pages/settings/Report/ReportSettingsPage.js +++ b/src/pages/settings/Report/ReportSettingsPage.js @@ -1,29 +1,29 @@ -import React, {useMemo} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; -import {View, ScrollView} from 'react-native'; +import React, {useMemo} from 'react'; +import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import CONST from '../../../CONST'; -import ONYXKEYS from '../../../ONYXKEYS'; -import styles from '../../../styles/styles'; -import compose from '../../../libs/compose'; -import Navigation from '../../../libs/Navigation/Navigation'; -import * as Report from '../../../libs/actions/Report'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import useLocalize from '../../../hooks/useLocalize'; -import Text from '../../../components/Text'; -import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; -import reportPropTypes from '../../reportPropTypes'; -import withReportOrNotFound from '../../home/report/withReportOrNotFound'; -import FullPageNotFoundView from '../../../components/BlockingViews/FullPageNotFoundView'; -import MenuItemWithTopDescription from '../../../components/MenuItemWithTopDescription'; -import ROUTES from '../../../ROUTES'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import MenuItem from '../../../components/MenuItem'; -import DisplayNames from '../../../components/DisplayNames'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import DisplayNames from '@components/DisplayNames'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Route params */ diff --git a/src/pages/settings/Report/RoomNamePage.js b/src/pages/settings/Report/RoomNamePage.js index 4ce997533378..2ff9b1f1108f 100644 --- a/src/pages/settings/Report/RoomNamePage.js +++ b/src/pages/settings/Report/RoomNamePage.js @@ -1,26 +1,26 @@ -import React, {useCallback, useRef} from 'react'; -import {withOnyx} from 'react-native-onyx'; +import {useIsFocused} from '@react-navigation/native'; import PropTypes from 'prop-types'; +import React, {useCallback, useRef} from 'react'; import {View} from 'react-native'; -import {useIsFocused} from '@react-navigation/native'; -import CONST from '../../../CONST'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import Form from '../../../components/Form'; -import ONYXKEYS from '../../../ONYXKEYS'; -import styles from '../../../styles/styles'; -import Navigation from '../../../libs/Navigation/Navigation'; -import compose from '../../../libs/compose'; -import * as ErrorUtils from '../../../libs/ErrorUtils'; -import * as ValidationUtils from '../../../libs/ValidationUtils'; -import withReportOrNotFound from '../../home/report/withReportOrNotFound'; -import reportPropTypes from '../../reportPropTypes'; -import ROUTES from '../../../ROUTES'; -import * as Report from '../../../libs/actions/Report'; -import RoomNameInput from '../../../components/RoomNameInput'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import FullPageNotFoundView from '../../../components/BlockingViews/FullPageNotFoundView'; +import {withOnyx} from 'react-native-onyx'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import RoomNameInput from '@components/RoomNameInput'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/Report/WriteCapabilityPage.js b/src/pages/settings/Report/WriteCapabilityPage.js index 174cc57d8d18..c1b417bc28bd 100644 --- a/src/pages/settings/Report/WriteCapabilityPage.js +++ b/src/pages/settings/Report/WriteCapabilityPage.js @@ -1,22 +1,22 @@ import React from 'react'; -import _ from 'underscore'; import {withOnyx} from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import CONST from '../../../CONST'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import Navigation from '../../../libs/Navigation/Navigation'; -import compose from '../../../libs/compose'; -import withReportOrNotFound from '../../home/report/withReportOrNotFound'; -import reportPropTypes from '../../reportPropTypes'; -import ROUTES from '../../../ROUTES'; -import * as Report from '../../../libs/actions/Report'; -import * as ReportUtils from '../../../libs/ReportUtils'; -import FullPageNotFoundView from '../../../components/BlockingViews/FullPageNotFoundView'; -import * as PolicyUtils from '../../../libs/PolicyUtils'; -import {policyPropTypes, policyDefaultProps} from '../../workspace/withPolicy'; -import SelectionList from '../../../components/SelectionList'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; +import reportPropTypes from '@pages/reportPropTypes'; +import {policyDefaultProps, policyPropTypes} from '@pages/workspace/withPolicy'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 763f6c77d774..da4cd7b60e2a 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -1,26 +1,26 @@ -import React, {useState, useEffect} from 'react'; +import Str from 'expensify-common/lib/str'; +import PropTypes from 'prop-types'; +import React, {useEffect, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import Str from 'expensify-common/lib/str'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import * as User from '../../../libs/actions/User'; -import compose from '../../../libs/compose'; -import styles from '../../../styles/styles'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import TextInput from '../../../components/TextInput'; -import Text from '../../../components/Text'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import * as CloseAccount from '../../../libs/actions/CloseAccount'; -import ONYXKEYS from '../../../ONYXKEYS'; -import CONST from '../../../CONST'; -import ConfirmModal from '../../../components/ConfirmModal'; -import * as ValidationUtils from '../../../libs/ValidationUtils'; -import FormProvider from '../../../components/Form/FormProvider'; -import InputWrapper from '../../../components/Form/InputWrapper'; +import ConfirmModal from '@components/ConfirmModal'; +import FormProvider from '@components/Form/FormProvider'; +import InputWrapper from '@components/Form/InputWrapper'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as CloseAccount from '@userActions/CloseAccount'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Session of currently logged in user */ diff --git a/src/pages/settings/Security/SecuritySettingsPage.js b/src/pages/settings/Security/SecuritySettingsPage.js index dac4ed4f872f..1bd6310ec97f 100644 --- a/src/pages/settings/Security/SecuritySettingsPage.js +++ b/src/pages/settings/Security/SecuritySettingsPage.js @@ -3,19 +3,19 @@ import React, {useMemo} from 'react'; import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import ONYXKEYS from '../../../ONYXKEYS'; -import ROUTES from '../../../ROUTES'; -import SCREENS from '../../../SCREENS'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import IllustratedHeaderPageLayout from '../../../components/IllustratedHeaderPageLayout'; -import * as LottieAnimations from '../../../components/LottieAnimations'; -import MenuItemList from '../../../components/MenuItemList'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import useWaitForNavigation from '../../../hooks/useWaitForNavigation'; -import Navigation from '../../../libs/Navigation/Navigation'; -import compose from '../../../libs/compose'; -import styles from '../../../styles/styles'; -import themeColors from '../../../styles/themes/default'; +import * as Expensicons from '@components/Icon/Expensicons'; +import IllustratedHeaderPageLayout from '@components/IllustratedHeaderPageLayout'; +import * as LottieAnimations from '@components/LottieAnimations'; +import MenuItemList from '@components/MenuItemList'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import useWaitForNavigation from '@hooks/useWaitForNavigation'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/Security/TwoFactorAuth/StepWrapper/StepWrapper.js b/src/pages/settings/Security/TwoFactorAuth/StepWrapper/StepWrapper.js index 64aa64d07ee5..98df839ce31e 100644 --- a/src/pages/settings/Security/TwoFactorAuth/StepWrapper/StepWrapper.js +++ b/src/pages/settings/Security/TwoFactorAuth/StepWrapper/StepWrapper.js @@ -1,12 +1,12 @@ import React from 'react'; -import HeaderWithBackButton from '../../../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../../../components/ScreenWrapper'; -import FullPageOfflineBlockingView from '../../../../../components/BlockingViews/FullPageOfflineBlockingView'; -import * as TwoFactorAuthActions from '../../../../../libs/actions/TwoFactorAuthActions'; +import AnimatedStep from '@components/AnimatedStep'; +import useAnimatedStepContext from '@components/AnimatedStep/useAnimatedStepContext'; +import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import styles from '@styles/styles'; +import * as TwoFactorAuthActions from '@userActions/TwoFactorAuthActions'; import StepWrapperPropTypes from './StepWrapperPropTypes'; -import AnimatedStep from '../../../../../components/AnimatedStep'; -import styles from '../../../../../styles/styles'; -import useAnimatedStepContext from '../../../../../components/AnimatedStep/useAnimatedStepContext'; function StepWrapper({ title = '', diff --git a/src/pages/settings/Security/TwoFactorAuth/Steps/CodesStep.js b/src/pages/settings/Security/TwoFactorAuth/Steps/CodesStep.js index ebad8d8bc5d0..6d74a0f91bd9 100644 --- a/src/pages/settings/Security/TwoFactorAuth/Steps/CodesStep.js +++ b/src/pages/settings/Security/TwoFactorAuth/Steps/CodesStep.js @@ -1,28 +1,28 @@ import React, {useEffect, useState} from 'react'; +import {ActivityIndicator, ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import {ActivityIndicator, View, ScrollView} from 'react-native'; import _ from 'underscore'; -import * as Expensicons from '../../../../../components/Icon/Expensicons'; -import * as Illustrations from '../../../../../components/Icon/Illustrations'; -import styles from '../../../../../styles/styles'; -import FixedFooter from '../../../../../components/FixedFooter'; -import Button from '../../../../../components/Button'; -import PressableWithDelayToggle from '../../../../../components/Pressable/PressableWithDelayToggle'; -import Text from '../../../../../components/Text'; -import Section from '../../../../../components/Section'; -import ONYXKEYS from '../../../../../ONYXKEYS'; -import Clipboard from '../../../../../libs/Clipboard'; -import themeColors from '../../../../../styles/themes/default'; -import localFileDownload from '../../../../../libs/localFileDownload'; -import * as Session from '../../../../../libs/actions/Session'; -import CONST from '../../../../../CONST'; -import useTwoFactorAuthContext from '../TwoFactorAuthContext/useTwoFactorAuth'; -import useLocalize from '../../../../../hooks/useLocalize'; -import useWindowDimensions from '../../../../../hooks/useWindowDimensions'; -import StepWrapper from '../StepWrapper/StepWrapper'; -import {defaultAccount, TwoFactorAuthPropTypes} from '../TwoFactorAuthPropTypes'; -import * as TwoFactorAuthActions from '../../../../../libs/actions/TwoFactorAuthActions'; -import FormHelpMessage from '../../../../../components/FormHelpMessage'; +import Button from '@components/Button'; +import FixedFooter from '@components/FixedFooter'; +import FormHelpMessage from '@components/FormHelpMessage'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import PressableWithDelayToggle from '@components/Pressable/PressableWithDelayToggle'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import Clipboard from '@libs/Clipboard'; +import localFileDownload from '@libs/localFileDownload'; +import StepWrapper from '@pages/settings/Security/TwoFactorAuth/StepWrapper/StepWrapper'; +import useTwoFactorAuthContext from '@pages/settings/Security/TwoFactorAuth/TwoFactorAuthContext/useTwoFactorAuth'; +import {defaultAccount, TwoFactorAuthPropTypes} from '@pages/settings/Security/TwoFactorAuth/TwoFactorAuthPropTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as Session from '@userActions/Session'; +import * as TwoFactorAuthActions from '@userActions/TwoFactorAuthActions'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; function CodesStep({account = defaultAccount}) { const {translate} = useLocalize(); diff --git a/src/pages/settings/Security/TwoFactorAuth/Steps/DisabledStep.js b/src/pages/settings/Security/TwoFactorAuth/Steps/DisabledStep.js index 2f3b87e69a6e..317e510024b0 100644 --- a/src/pages/settings/Security/TwoFactorAuth/Steps/DisabledStep.js +++ b/src/pages/settings/Security/TwoFactorAuth/Steps/DisabledStep.js @@ -1,13 +1,13 @@ import React from 'react'; -import * as Illustrations from '../../../../../components/Icon/Illustrations'; -import styles from '../../../../../styles/styles'; -import BlockingView from '../../../../../components/BlockingViews/BlockingView'; -import FixedFooter from '../../../../../components/FixedFooter'; -import Button from '../../../../../components/Button'; -import variables from '../../../../../styles/variables'; -import StepWrapper from '../StepWrapper/StepWrapper'; -import useLocalize from '../../../../../hooks/useLocalize'; -import * as TwoFactorAuthActions from '../../../../../libs/actions/TwoFactorAuthActions'; +import BlockingView from '@components/BlockingViews/BlockingView'; +import Button from '@components/Button'; +import FixedFooter from '@components/FixedFooter'; +import * as Illustrations from '@components/Icon/Illustrations'; +import useLocalize from '@hooks/useLocalize'; +import StepWrapper from '@pages/settings/Security/TwoFactorAuth/StepWrapper/StepWrapper'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import * as TwoFactorAuthActions from '@userActions/TwoFactorAuthActions'; function DisabledStep() { const {translate} = useLocalize(); diff --git a/src/pages/settings/Security/TwoFactorAuth/Steps/EnabledStep.js b/src/pages/settings/Security/TwoFactorAuth/Steps/EnabledStep.js index 584d6195bbe6..6b0edfc49da3 100644 --- a/src/pages/settings/Security/TwoFactorAuth/Steps/EnabledStep.js +++ b/src/pages/settings/Security/TwoFactorAuth/Steps/EnabledStep.js @@ -1,16 +1,16 @@ import React, {useState} from 'react'; -import {Text, View, ScrollView} from 'react-native'; -import Section from '../../../../../components/Section'; -import * as Illustrations from '../../../../../components/Icon/Illustrations'; -import * as Expensicons from '../../../../../components/Icon/Expensicons'; -import themeColors from '../../../../../styles/themes/default'; -import styles from '../../../../../styles/styles'; -import ConfirmModal from '../../../../../components/ConfirmModal'; -import * as Session from '../../../../../libs/actions/Session'; -import StepWrapper from '../StepWrapper/StepWrapper'; -import CONST from '../../../../../CONST'; -import useLocalize from '../../../../../hooks/useLocalize'; -import useTwoFactorAuthContext from '../TwoFactorAuthContext/useTwoFactorAuth'; +import {ScrollView, Text, View} from 'react-native'; +import ConfirmModal from '@components/ConfirmModal'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import useLocalize from '@hooks/useLocalize'; +import StepWrapper from '@pages/settings/Security/TwoFactorAuth/StepWrapper/StepWrapper'; +import useTwoFactorAuthContext from '@pages/settings/Security/TwoFactorAuth/TwoFactorAuthContext/useTwoFactorAuth'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; function EnabledStep() { const [isConfirmModalVisible, setIsConfirmModalVisible] = useState(false); diff --git a/src/pages/settings/Security/TwoFactorAuth/Steps/SuccessStep.js b/src/pages/settings/Security/TwoFactorAuth/Steps/SuccessStep.js index 308efecf3415..76d5e8a19a46 100644 --- a/src/pages/settings/Security/TwoFactorAuth/Steps/SuccessStep.js +++ b/src/pages/settings/Security/TwoFactorAuth/Steps/SuccessStep.js @@ -1,11 +1,11 @@ import React from 'react'; -import ConfirmationPage from '../../../../../components/ConfirmationPage'; -import * as TwoFactorAuthActions from '../../../../../libs/actions/TwoFactorAuthActions'; -import * as LottieAnimations from '../../../../../components/LottieAnimations'; -import CONST from '../../../../../CONST'; -import StepWrapper from '../StepWrapper/StepWrapper'; -import useTwoFactorAuthContext from '../TwoFactorAuthContext/useTwoFactorAuth'; -import useLocalize from '../../../../../hooks/useLocalize'; +import ConfirmationPage from '@components/ConfirmationPage'; +import * as LottieAnimations from '@components/LottieAnimations'; +import useLocalize from '@hooks/useLocalize'; +import StepWrapper from '@pages/settings/Security/TwoFactorAuth/StepWrapper/StepWrapper'; +import useTwoFactorAuthContext from '@pages/settings/Security/TwoFactorAuth/TwoFactorAuthContext/useTwoFactorAuth'; +import * as TwoFactorAuthActions from '@userActions/TwoFactorAuthActions'; +import CONST from '@src/CONST'; function SuccessStep() { const {setStep} = useTwoFactorAuthContext(); diff --git a/src/pages/settings/Security/TwoFactorAuth/Steps/VerifyStep.js b/src/pages/settings/Security/TwoFactorAuth/Steps/VerifyStep.js index a254b28341f1..440b40c5363c 100644 --- a/src/pages/settings/Security/TwoFactorAuth/Steps/VerifyStep.js +++ b/src/pages/settings/Security/TwoFactorAuth/Steps/VerifyStep.js @@ -1,25 +1,25 @@ +import PropTypes from 'prop-types'; import React, {useEffect} from 'react'; -import {withOnyx} from 'react-native-onyx'; import {ScrollView, View} from 'react-native'; -import PropTypes from 'prop-types'; -import * as Session from '../../../../../libs/actions/Session'; -import styles from '../../../../../styles/styles'; -import Button from '../../../../../components/Button'; -import Text from '../../../../../components/Text'; -import ONYXKEYS from '../../../../../ONYXKEYS'; -import TextLink from '../../../../../components/TextLink'; -import Clipboard from '../../../../../libs/Clipboard'; -import FixedFooter from '../../../../../components/FixedFooter'; -import * as Expensicons from '../../../../../components/Icon/Expensicons'; -import PressableWithDelayToggle from '../../../../../components/Pressable/PressableWithDelayToggle'; -import TwoFactorAuthForm from '../TwoFactorAuthForm'; -import QRCode from '../../../../../components/QRCode'; -import expensifyLogo from '../../../../../../assets/images/expensify-logo-round-transparent.png'; -import CONST from '../../../../../CONST'; -import StepWrapper from '../StepWrapper/StepWrapper'; -import useTwoFactorAuthContext from '../TwoFactorAuthContext/useTwoFactorAuth'; -import useLocalize from '../../../../../hooks/useLocalize'; -import {defaultAccount, TwoFactorAuthPropTypes} from '../TwoFactorAuthPropTypes'; +import {withOnyx} from 'react-native-onyx'; +import expensifyLogo from '@assets/images/expensify-logo-round-transparent.png'; +import Button from '@components/Button'; +import FixedFooter from '@components/FixedFooter'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithDelayToggle from '@components/Pressable/PressableWithDelayToggle'; +import QRCode from '@components/QRCode'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import useLocalize from '@hooks/useLocalize'; +import Clipboard from '@libs/Clipboard'; +import StepWrapper from '@pages/settings/Security/TwoFactorAuth/StepWrapper/StepWrapper'; +import useTwoFactorAuthContext from '@pages/settings/Security/TwoFactorAuth/TwoFactorAuthContext/useTwoFactorAuth'; +import TwoFactorAuthForm from '@pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm'; +import {defaultAccount, TwoFactorAuthPropTypes} from '@pages/settings/Security/TwoFactorAuth/TwoFactorAuthPropTypes'; +import styles from '@styles/styles'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const TROUBLESHOOTING_LINK = 'https://community.expensify.com/discussion/7736/faq-troubleshooting-two-factor-authentication-issues/p1?new=1'; diff --git a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/BaseTwoFactorAuthForm.js b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/BaseTwoFactorAuthForm.js index ea51bbc71cf9..d441a6157049 100644 --- a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/BaseTwoFactorAuthForm.js +++ b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/BaseTwoFactorAuthForm.js @@ -1,13 +1,13 @@ -import React, {useCallback, useState, forwardRef, useImperativeHandle} from 'react'; import PropTypes from 'prop-types'; +import React, {forwardRef, useCallback, useImperativeHandle, useState} from 'react'; import {withOnyx} from 'react-native-onyx'; -import MagicCodeInput from '../../../../../components/MagicCodeInput'; -import * as ErrorUtils from '../../../../../libs/ErrorUtils'; -import withLocalize, {withLocalizePropTypes} from '../../../../../components/withLocalize'; -import ONYXKEYS from '../../../../../ONYXKEYS'; -import compose from '../../../../../libs/compose'; -import * as ValidationUtils from '../../../../../libs/ValidationUtils'; -import * as Session from '../../../../../libs/actions/Session'; +import MagicCodeInput from '@components/MagicCodeInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import * as Session from '@userActions/Session'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/index.android.js b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/index.android.js index ba7bb2186aa6..5f71da7629dd 100644 --- a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/index.android.js +++ b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/index.android.js @@ -1,5 +1,5 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import BaseTwoFactorAuthForm from './BaseTwoFactorAuthForm'; const propTypes = { diff --git a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/index.js b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/index.js index 171322ecb32d..5d361c41e7e3 100644 --- a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/index.js +++ b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/index.js @@ -1,5 +1,5 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import BaseTwoFactorAuthForm from './BaseTwoFactorAuthForm'; const propTypes = { diff --git a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthPage.js b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthPage.js index 99aeb4b11f89..99f57a5a5a9d 100644 --- a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthPage.js +++ b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthPage.js @@ -1,5 +1,5 @@ import React from 'react'; -import AnimatedStepProvider from '../../../../components/AnimatedStep/AnimatedStepProvider'; +import AnimatedStepProvider from '@components/AnimatedStep/AnimatedStepProvider'; import TwoFactorAuthSteps from './TwoFactorAuthSteps'; function TwoFactorAuthPage() { diff --git a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthSteps.js b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthSteps.js index df2a4d8e0950..31a33efa3996 100644 --- a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthSteps.js +++ b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthSteps.js @@ -1,16 +1,16 @@ import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {withOnyx} from 'react-native-onyx'; +import useAnimatedStepContext from '@components/AnimatedStep/useAnimatedStepContext'; +import * as TwoFactorAuthActions from '@userActions/TwoFactorAuthActions'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import CodesStep from './Steps/CodesStep'; import DisabledStep from './Steps/DisabledStep'; import EnabledStep from './Steps/EnabledStep'; -import VerifyStep from './Steps/VerifyStep'; import SuccessStep from './Steps/SuccessStep'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import CONST from '../../../../CONST'; -import * as TwoFactorAuthActions from '../../../../libs/actions/TwoFactorAuthActions'; +import VerifyStep from './Steps/VerifyStep'; import TwoFactorAuthContext from './TwoFactorAuthContext'; import {defaultAccount, TwoFactorAuthPropTypes} from './TwoFactorAuthPropTypes'; -import useAnimatedStepContext from '../../../../components/AnimatedStep/useAnimatedStepContext'; function TwoFactorAuthSteps({account = defaultAccount}) { const [currentStep, setCurrentStep] = useState(CONST.TWO_FACTOR_AUTH_STEPS.CODES); diff --git a/src/pages/settings/Wallet/ActivatePhysicalCardPage.js b/src/pages/settings/Wallet/ActivatePhysicalCardPage.js index 0175f2ceac1f..b643f2c54ad3 100644 --- a/src/pages/settings/Wallet/ActivatePhysicalCardPage.js +++ b/src/pages/settings/Wallet/ActivatePhysicalCardPage.js @@ -1,31 +1,31 @@ -import React, {useRef, useCallback, useState, useEffect} from 'react'; -import {View} from 'react-native'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useRef, useState} from 'react'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; import _ from 'underscore'; -import Text from '../../../components/Text'; -import Navigation from '../../../libs/Navigation/Navigation'; -import styles from '../../../styles/styles'; -import MagicCodeInput from '../../../components/MagicCodeInput'; -import * as DeviceCapabilities from '../../../libs/DeviceCapabilities'; -import * as ErrorUtils from '../../../libs/ErrorUtils'; -import * as CardSettings from '../../../libs/actions/Card'; -import BigNumberPad from '../../../components/BigNumberPad'; -import Button from '../../../components/Button'; -import IllustratedHeaderPageLayout from '../../../components/IllustratedHeaderPageLayout'; -import themeColors from '../../../styles/themes/default'; -import SCREENS from '../../../SCREENS'; -import * as LottieAnimations from '../../../components/LottieAnimations'; -import useWindowDimensions from '../../../hooks/useWindowDimensions'; -import ONYXKEYS from '../../../ONYXKEYS'; -import useLocalize from '../../../hooks/useLocalize'; -import ROUTES from '../../../ROUTES'; -import CONST from '../../../CONST'; +import BigNumberPad from '@components/BigNumberPad'; +import Button from '@components/Button'; +import IllustratedHeaderPageLayout from '@components/IllustratedHeaderPageLayout'; +import * as LottieAnimations from '@components/LottieAnimations'; +import MagicCodeInput from '@components/MagicCodeInput'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as CardUtils from '@libs/CardUtils'; +import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as CardSettings from '@userActions/Card'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; import assignedCardPropTypes from './assignedCardPropTypes'; -import * as CardUtils from '../../../libs/CardUtils'; -import useNetwork from '../../../hooks/useNetwork'; -import NotFoundPage from '../../ErrorPage/NotFoundPage'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Wallet/AddDebitCardPage.js b/src/pages/settings/Wallet/AddDebitCardPage.js index e75c3b2c517e..ff20d518ff5d 100644 --- a/src/pages/settings/Wallet/AddDebitCardPage.js +++ b/src/pages/settings/Wallet/AddDebitCardPage.js @@ -1,27 +1,27 @@ +import PropTypes from 'prop-types'; import React, {useEffect, useRef} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import styles from '../../../styles/styles'; -import Text from '../../../components/Text'; -import TextLink from '../../../components/TextLink'; -import useLocalize from '../../../hooks/useLocalize'; -import * as PaymentMethods from '../../../libs/actions/PaymentMethods'; -import * as ValidationUtils from '../../../libs/ValidationUtils'; -import CheckboxWithLabel from '../../../components/CheckboxWithLabel'; -import StatePicker from '../../../components/StatePicker'; -import TextInput from '../../../components/TextInput'; -import CONST from '../../../CONST'; -import ONYXKEYS from '../../../ONYXKEYS'; -import AddressSearch from '../../../components/AddressSearch'; -import Form from '../../../components/Form'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import usePrevious from '../../../hooks/usePrevious'; -import NotFoundPage from '../../ErrorPage/NotFoundPage'; -import Permissions from '../../../libs/Permissions'; +import AddressSearch from '@components/AddressSearch'; +import CheckboxWithLabel from '@components/CheckboxWithLabel'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import StatePicker from '@components/StatePicker'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import TextLink from '@components/TextLink'; +import useLocalize from '@hooks/useLocalize'; +import usePrevious from '@hooks/usePrevious'; +import Navigation from '@libs/Navigation/Navigation'; +import Permissions from '@libs/Permissions'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; +import styles from '@styles/styles'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Wallet/ChooseTransferAccountPage.js b/src/pages/settings/Wallet/ChooseTransferAccountPage.js index 78a9e92326bc..a44e21390b80 100644 --- a/src/pages/settings/Wallet/ChooseTransferAccountPage.js +++ b/src/pages/settings/Wallet/ChooseTransferAccountPage.js @@ -1,21 +1,21 @@ import React from 'react'; -import {withOnyx} from 'react-native-onyx'; import {View} from 'react-native'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import Navigation from '../../../libs/Navigation/Navigation'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import CONST from '../../../CONST'; +import {withOnyx} from 'react-native-onyx'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import PaymentMethodList from './PaymentMethodList'; -import * as PaymentMethods from '../../../libs/actions/PaymentMethods'; -import ROUTES from '../../../ROUTES'; -import MenuItem from '../../../components/MenuItem'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import compose from '../../../libs/compose'; -import ONYXKEYS from '../../../ONYXKEYS'; import walletTransferPropTypes from './walletTransferPropTypes'; -import styles from '../../../styles/styles'; -import * as BankAccounts from '../../../libs/actions/BankAccounts'; const propTypes = { /** Wallet transfer propTypes */ diff --git a/src/pages/settings/Wallet/DangerCardSection.js b/src/pages/settings/Wallet/DangerCardSection.js index bd67ba03c43b..40788753bce7 100644 --- a/src/pages/settings/Wallet/DangerCardSection.js +++ b/src/pages/settings/Wallet/DangerCardSection.js @@ -1,9 +1,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import styles from '../../../styles/styles'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import Text from '../../../components/Text'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Text from '@components/Text'; +import styles from '@styles/styles'; const propTypes = { title: PropTypes.string.isRequired, diff --git a/src/pages/settings/Wallet/ExpensifyCardPage.js b/src/pages/settings/Wallet/ExpensifyCardPage.js index 672db26cea82..d6cdbefc471a 100644 --- a/src/pages/settings/Wallet/ExpensifyCardPage.js +++ b/src/pages/settings/Wallet/ExpensifyCardPage.js @@ -3,30 +3,30 @@ import React, {useState} from 'react'; import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import ONYXKEYS from '../../../ONYXKEYS'; -import ROUTES from '../../../ROUTES'; -import NotFoundPage from '../../ErrorPage/NotFoundPage'; -import CardPreview from '../../../components/CardPreview'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import MenuItemWithTopDescription from '../../../components/MenuItemWithTopDescription'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import useLocalize from '../../../hooks/useLocalize'; -import * as CurrencyUtils from '../../../libs/CurrencyUtils'; -import Navigation from '../../../libs/Navigation/Navigation'; -import styles from '../../../styles/styles'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import * as CardUtils from '../../../libs/CardUtils'; -import Button from '../../../components/Button'; -import CardDetails from './WalletPage/CardDetails'; -import * as Card from '../../../libs/actions/Card'; -import MenuItem from '../../../components/MenuItem'; -import CONST from '../../../CONST'; +import Button from '@components/Button'; +import CardPreview from '@components/CardPreview'; +import DotIndicatorMessage from '@components/DotIndicatorMessage'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import ScreenWrapper from '@components/ScreenWrapper'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import * as CardUtils from '@libs/CardUtils'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; +import styles from '@styles/styles'; +import theme from '@styles/themes/default'; +import * as Card from '@userActions/Card'; +import * as Link from '@userActions/Link'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import assignedCardPropTypes from './assignedCardPropTypes'; -import useNetwork from '../../../hooks/useNetwork'; -import theme from '../../../styles/themes/default'; -import DotIndicatorMessage from '../../../components/DotIndicatorMessage'; -import * as Link from '../../../libs/actions/Link'; import DangerCardSection from './DangerCardSection'; +import CardDetails from './WalletPage/CardDetails'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Wallet/PaymentMethodList.js b/src/pages/settings/Wallet/PaymentMethodList.js index 5125832f6eb3..5ba521e94412 100644 --- a/src/pages/settings/Wallet/PaymentMethodList.js +++ b/src/pages/settings/Wallet/PaymentMethodList.js @@ -1,34 +1,34 @@ -import _ from 'underscore'; -import React, {useCallback, useMemo} from 'react'; -import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {FlashList} from '@shopify/flash-list'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useCallback, useMemo} from 'react'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import styles from '../../../styles/styles'; -import variables from '../../../styles/variables'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import MenuItem from '../../../components/MenuItem'; -import Button from '../../../components/Button'; -import Text from '../../../components/Text'; -import ONYXKEYS from '../../../ONYXKEYS'; -import CONST from '../../../CONST'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import bankAccountPropTypes from '../../../components/bankAccountPropTypes'; -import cardPropTypes from '../../../components/cardPropTypes'; -import * as PaymentUtils from '../../../libs/PaymentUtils'; -import FormAlertWrapper from '../../../components/FormAlertWrapper'; -import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; -import * as PaymentMethods from '../../../libs/actions/PaymentMethods'; -import useLocalize from '../../../hooks/useLocalize'; -import useNetwork from '../../../hooks/useNetwork'; -import Log from '../../../libs/Log'; -import stylePropTypes from '../../../styles/stylePropTypes'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import getBankIcon from '../../../components/Icon/BankIcons'; +import _ from 'underscore'; +import bankAccountPropTypes from '@components/bankAccountPropTypes'; +import Button from '@components/Button'; +import cardPropTypes from '@components/cardPropTypes'; +import FormAlertWrapper from '@components/FormAlertWrapper'; +import getBankIcon from '@components/Icon/BankIcons'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import * as CardUtils from '@libs/CardUtils'; +import Log from '@libs/Log'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PaymentUtils from '@libs/PaymentUtils'; +import stylePropTypes from '@styles/stylePropTypes'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import assignedCardPropTypes from './assignedCardPropTypes'; -import * as CardUtils from '../../../libs/CardUtils'; const propTypes = { /** What to do when a menu item is pressed */ diff --git a/src/pages/settings/Wallet/ReportCardLostPage.js b/src/pages/settings/Wallet/ReportCardLostPage.js index 29a588916326..ee6580a0b0f6 100644 --- a/src/pages/settings/Wallet/ReportCardLostPage.js +++ b/src/pages/settings/Wallet/ReportCardLostPage.js @@ -1,27 +1,27 @@ -import React, {useState, useEffect} from 'react'; -import _ from 'underscore'; -import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; +import React, {useEffect, useState} from 'react'; import {View} from 'react-native'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import styles from '../../../styles/styles'; -import ONYXKEYS from '../../../ONYXKEYS'; -import SingleOptionSelector from '../../../components/SingleOptionSelector'; -import useLocalize from '../../../hooks/useLocalize'; -import Text from '../../../components/Text'; -import MenuItemWithTopDescription from '../../../components/MenuItemWithTopDescription'; -import usePrivatePersonalDetails from '../../../hooks/usePrivatePersonalDetails'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SingleOptionSelector from '@components/SingleOptionSelector'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import usePrevious from '@hooks/usePrevious'; +import usePrivatePersonalDetails from '@hooks/usePrivatePersonalDetails'; +import * as CardUtils from '@libs/CardUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; +import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; +import styles from '@styles/styles'; +import * as CardActions from '@userActions/Card'; +import * as FormActions from '@userActions/FormActions'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import assignedCardPropTypes from './assignedCardPropTypes'; -import * as CardUtils from '../../../libs/CardUtils'; -import * as PersonalDetailsUtils from '../../../libs/PersonalDetailsUtils'; -import NotFoundPage from '../../ErrorPage/NotFoundPage'; -import usePrevious from '../../../hooks/usePrevious'; -import * as FormActions from '../../../libs/actions/FormActions'; -import * as CardActions from '../../../libs/actions/Card'; -import FormAlertWithSubmitButton from '../../../components/FormAlertWithSubmitButton'; /** Options for reason selector */ const OPTIONS = [ diff --git a/src/pages/settings/Wallet/ReportVirtualCardFraudPage.js b/src/pages/settings/Wallet/ReportVirtualCardFraudPage.js index 1a51fc4d9453..58e5d2b62c90 100644 --- a/src/pages/settings/Wallet/ReportVirtualCardFraudPage.js +++ b/src/pages/settings/Wallet/ReportVirtualCardFraudPage.js @@ -1,23 +1,23 @@ +import PropTypes from 'prop-types'; import React, {useEffect} from 'react'; -import _ from 'underscore'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; -import ROUTES from '../../../ROUTES'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import Navigation from '../../../libs/Navigation/Navigation'; -import styles from '../../../styles/styles'; -import Text from '../../../components/Text'; -import useLocalize from '../../../hooks/useLocalize'; -import * as Card from '../../../libs/actions/Card'; +import _ from 'underscore'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import usePrevious from '@hooks/usePrevious'; +import * as CardUtils from '@libs/CardUtils'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; +import styles from '@styles/styles'; +import * as Card from '@userActions/Card'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import assignedCardPropTypes from './assignedCardPropTypes'; -import * as CardUtils from '../../../libs/CardUtils'; -import ONYXKEYS from '../../../ONYXKEYS'; -import NotFoundPage from '../../ErrorPage/NotFoundPage'; -import usePrevious from '../../../hooks/usePrevious'; -import FormAlertWithSubmitButton from '../../../components/FormAlertWithSubmitButton'; -import * as ErrorUtils from '../../../libs/ErrorUtils'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/settings/Wallet/TransferBalancePage.js b/src/pages/settings/Wallet/TransferBalancePage.js index ae54dab569f7..1df07365a1f6 100644 --- a/src/pages/settings/Wallet/TransferBalancePage.js +++ b/src/pages/settings/Wallet/TransferBalancePage.js @@ -1,32 +1,32 @@ -import _ from 'underscore'; -import React, {useEffect} from 'react'; -import {View, ScrollView} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; +import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../components/ScreenWrapper'; -import Navigation from '../../../libs/Navigation/Navigation'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import compose from '../../../libs/compose'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import MenuItem from '../../../components/MenuItem'; -import CONST from '../../../CONST'; -import variables from '../../../styles/variables'; -import Text from '../../../components/Text'; -import CurrentWalletBalance from '../../../components/CurrentWalletBalance'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import cardPropTypes from '@components/cardPropTypes'; +import ConfirmationPage from '@components/ConfirmationPage'; +import CurrentWalletBalance from '@components/CurrentWalletBalance'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import {withNetwork} from '@components/OnyxProvider'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PaymentUtils from '@libs/PaymentUtils'; +import userWalletPropTypes from '@pages/EnablePayments/userWalletPropTypes'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import walletTransferPropTypes from './walletTransferPropTypes'; -import * as PaymentMethods from '../../../libs/actions/PaymentMethods'; -import * as PaymentUtils from '../../../libs/PaymentUtils'; -import cardPropTypes from '../../../components/cardPropTypes'; -import userWalletPropTypes from '../../EnablePayments/userWalletPropTypes'; -import ROUTES from '../../../ROUTES'; -import FormAlertWithSubmitButton from '../../../components/FormAlertWithSubmitButton'; -import {withNetwork} from '../../../components/OnyxProvider'; -import ConfirmationPage from '../../../components/ConfirmationPage'; -import * as CurrencyUtils from '../../../libs/CurrencyUtils'; -import FullPageNotFoundView from '../../../components/BlockingViews/FullPageNotFoundView'; const propTypes = { /** User's wallet information */ diff --git a/src/pages/settings/Wallet/WalletEmptyState.js b/src/pages/settings/Wallet/WalletEmptyState.js index f54716e3110a..ad507f62c225 100644 --- a/src/pages/settings/Wallet/WalletEmptyState.js +++ b/src/pages/settings/Wallet/WalletEmptyState.js @@ -1,15 +1,15 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import IllustratedHeaderPageLayout from '../../../components/IllustratedHeaderPageLayout'; -import useLocalize from '../../../hooks/useLocalize'; -import * as LottieAnimations from '../../../components/LottieAnimations'; -import Button from '../../../components/Button'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import FeatureList from '../../../components/FeatureList'; -import themeColors from '../../../styles/themes/default'; -import SCREENS from '../../../SCREENS'; +import React from 'react'; +import Button from '@components/Button'; +import FeatureList from '@components/FeatureList'; +import * as Illustrations from '@components/Icon/Illustrations'; +import IllustratedHeaderPageLayout from '@components/IllustratedHeaderPageLayout'; +import * as LottieAnimations from '@components/LottieAnimations'; +import useLocalize from '@hooks/useLocalize'; +import Navigation from '@libs/Navigation/Navigation'; +import themeColors from '@styles/themes/default'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; const propTypes = { /** The function that is called when a menu item is pressed */ diff --git a/src/pages/settings/Wallet/WalletPage/CardDetails.js b/src/pages/settings/Wallet/WalletPage/CardDetails.js index f38f90fdfcb2..a57792f5fadf 100644 --- a/src/pages/settings/Wallet/WalletPage/CardDetails.js +++ b/src/pages/settings/Wallet/WalletPage/CardDetails.js @@ -1,19 +1,19 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; -import * as Expensicons from '../../../../components/Icon/Expensicons'; -import MenuItemWithTopDescription from '../../../../components/MenuItemWithTopDescription'; -import Clipboard from '../../../../libs/Clipboard'; -import useLocalize from '../../../../hooks/useLocalize'; -import usePrivatePersonalDetails from '../../../../hooks/usePrivatePersonalDetails'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import * as PersonalDetailsUtils from '../../../../libs/PersonalDetailsUtils'; -import PressableWithDelayToggle from '../../../../components/Pressable/PressableWithDelayToggle'; -import styles from '../../../../styles/styles'; -import TextLink from '../../../../components/TextLink'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import ROUTES from '../../../../ROUTES'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import PressableWithDelayToggle from '@components/Pressable/PressableWithDelayToggle'; +import TextLink from '@components/TextLink'; +import useLocalize from '@hooks/useLocalize'; +import usePrivatePersonalDetails from '@hooks/usePrivatePersonalDetails'; +import Clipboard from '@libs/Clipboard'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; +import styles from '@styles/styles'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Card number */ diff --git a/src/pages/settings/Wallet/WalletPage/WalletPage.js b/src/pages/settings/Wallet/WalletPage/WalletPage.js index 11974446eea6..38d9722e2ed7 100644 --- a/src/pages/settings/Wallet/WalletPage/WalletPage.js +++ b/src/pages/settings/Wallet/WalletPage/WalletPage.js @@ -1,42 +1,42 @@ -import React, {useCallback, useEffect, useState, useRef} from 'react'; -import {ActivityIndicator, View, InteractionManager, ScrollView} from 'react-native'; +import lodashGet from 'lodash/get'; +import React, {useCallback, useEffect, useRef, useState} from 'react'; +import {ActivityIndicator, InteractionManager, ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import PaymentMethodList from '../PaymentMethodList'; -import ROUTES from '../../../../ROUTES'; -import HeaderWithBackButton from '../../../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../../../components/ScreenWrapper'; -import Navigation from '../../../../libs/Navigation/Navigation'; -import styles from '../../../../styles/styles'; -import compose from '../../../../libs/compose'; -import * as BankAccounts from '../../../../libs/actions/BankAccounts'; -import Popover from '../../../../components/Popover'; -import MenuItem from '../../../../components/MenuItem'; -import Text from '../../../../components/Text'; -import Icon from '../../../../components/Icon'; -import * as PaymentMethods from '../../../../libs/actions/PaymentMethods'; -import getClickedTargetLocation from '../../../../libs/getClickedTargetLocation'; -import CurrentWalletBalance from '../../../../components/CurrentWalletBalance'; -import ONYXKEYS from '../../../../ONYXKEYS'; -import Permissions from '../../../../libs/Permissions'; -import AddPaymentMethodMenu from '../../../../components/AddPaymentMethodMenu'; -import CONST from '../../../../CONST'; -import * as Expensicons from '../../../../components/Icon/Expensicons'; -import KYCWall from '../../../../components/KYCWall'; -import {propTypes, defaultProps} from './walletPagePropTypes'; -import {withNetwork} from '../../../../components/OnyxProvider'; -import * as PaymentUtils from '../../../../libs/PaymentUtils'; -import OfflineWithFeedback from '../../../../components/OfflineWithFeedback'; -import ConfirmContent from '../../../../components/ConfirmContent'; -import Button from '../../../../components/Button'; -import themeColors from '../../../../styles/themes/default'; -import variables from '../../../../styles/variables'; -import useLocalize from '../../../../hooks/useLocalize'; -import useWindowDimensions from '../../../../hooks/useWindowDimensions'; -import WalletEmptyState from '../WalletEmptyState'; -import * as Illustrations from '../../../../components/Icon/Illustrations'; -import WalletSection from '../../../../components/WalletSection'; +import AddPaymentMethodMenu from '@components/AddPaymentMethodMenu'; +import Button from '@components/Button'; +import ConfirmContent from '@components/ConfirmContent'; +import CurrentWalletBalance from '@components/CurrentWalletBalance'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import KYCWall from '@components/KYCWall'; +import MenuItem from '@components/MenuItem'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import {withNetwork} from '@components/OnyxProvider'; +import Popover from '@components/Popover'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import WalletSection from '@components/WalletSection'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import compose from '@libs/compose'; +import getClickedTargetLocation from '@libs/getClickedTargetLocation'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PaymentUtils from '@libs/PaymentUtils'; +import Permissions from '@libs/Permissions'; +import PaymentMethodList from '@pages/settings/Wallet/PaymentMethodList'; +import WalletEmptyState from '@pages/settings/Wallet/WalletEmptyState'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as PaymentMethods from '@userActions/PaymentMethods'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {defaultProps, propTypes} from './walletPagePropTypes'; function WalletPage({bankAccountList, betas, cardList, fundList, isLoadingPaymentMethods, network, shouldListenForResize, userWallet, walletTerms}) { const {translate} = useLocalize(); diff --git a/src/pages/settings/Wallet/WalletPage/walletPagePropTypes.js b/src/pages/settings/Wallet/WalletPage/walletPagePropTypes.js index 3c411d7984e4..23bdfe99b086 100644 --- a/src/pages/settings/Wallet/WalletPage/walletPagePropTypes.js +++ b/src/pages/settings/Wallet/WalletPage/walletPagePropTypes.js @@ -1,10 +1,10 @@ import PropTypes from 'prop-types'; -import walletTransferPropTypes from '../walletTransferPropTypes'; -import networkPropTypes from '../../../../components/networkPropTypes'; -import bankAccountPropTypes from '../../../../components/bankAccountPropTypes'; -import cardPropTypes from '../../../../components/cardPropTypes'; -import userWalletPropTypes from '../../../EnablePayments/userWalletPropTypes'; -import walletTermsPropTypes from '../../../EnablePayments/walletTermsPropTypes'; +import bankAccountPropTypes from '@components/bankAccountPropTypes'; +import cardPropTypes from '@components/cardPropTypes'; +import networkPropTypes from '@components/networkPropTypes'; +import userWalletPropTypes from '@pages/EnablePayments/userWalletPropTypes'; +import walletTermsPropTypes from '@pages/EnablePayments/walletTermsPropTypes'; +import walletTransferPropTypes from '@pages/settings/Wallet/walletTransferPropTypes'; const propTypes = { /** Wallet balance transfer props */ diff --git a/src/pages/settings/Wallet/assignedCardPropTypes.js b/src/pages/settings/Wallet/assignedCardPropTypes.js index a8bfc1a2cbd0..a560c0250388 100644 --- a/src/pages/settings/Wallet/assignedCardPropTypes.js +++ b/src/pages/settings/Wallet/assignedCardPropTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import CONST from '../../../CONST'; +import CONST from '@src/CONST'; /** Assigned Card props */ const assignedCardPropTypes = PropTypes.shape({ diff --git a/src/pages/settings/Wallet/walletTransferPropTypes.js b/src/pages/settings/Wallet/walletTransferPropTypes.js index 8a2ab06c9066..38c65fcfd703 100644 --- a/src/pages/settings/Wallet/walletTransferPropTypes.js +++ b/src/pages/settings/Wallet/walletTransferPropTypes.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import CONST from '../../../CONST'; +import CONST from '@src/CONST'; /** Wallet balance transfer props */ const walletTransferPropTypes = PropTypes.shape({ diff --git a/src/pages/signin/AppleSignInDesktopPage/index.website.js b/src/pages/signin/AppleSignInDesktopPage/index.website.js index 10887e0ebdee..867dfddc443d 100644 --- a/src/pages/signin/AppleSignInDesktopPage/index.website.js +++ b/src/pages/signin/AppleSignInDesktopPage/index.website.js @@ -1,6 +1,6 @@ import React from 'react'; -import ThirdPartySignInPage from '../ThirdPartySignInPage'; -import CONST from '../../../CONST'; +import ThirdPartySignInPage from '@pages/signin/ThirdPartySignInPage'; +import CONST from '@src/CONST'; function AppleSignInDesktopPage() { return ; diff --git a/src/pages/signin/ChangeExpensifyLoginLink.js b/src/pages/signin/ChangeExpensifyLoginLink.js index c152a903fbef..f5e526964333 100755 --- a/src/pages/signin/ChangeExpensifyLoginLink.js +++ b/src/pages/signin/ChangeExpensifyLoginLink.js @@ -1,15 +1,15 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import PropTypes from 'prop-types'; -import Text from '../../components/Text'; -import styles from '../../styles/styles'; -import ONYXKEYS from '../../ONYXKEYS'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import PressableWithFeedback from '../../components/Pressable/PressableWithFeedback'; -import CONST from '../../CONST'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** The credentials of the logged in person */ diff --git a/src/pages/signin/ChooseSSOOrMagicCode.js b/src/pages/signin/ChooseSSOOrMagicCode.js index 32f0776cdbc9..fd3ec85c5cb2 100644 --- a/src/pages/signin/ChooseSSOOrMagicCode.js +++ b/src/pages/signin/ChooseSSOOrMagicCode.js @@ -1,23 +1,23 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import styles from '../../styles/styles'; -import ONYXKEYS from '../../ONYXKEYS'; -import Text from '../../components/Text'; -import Button from '../../components/Button'; -import * as Session from '../../libs/actions/Session'; +import Button from '@components/Button'; +import FormHelpMessage from '@components/FormHelpMessage'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import ChangeExpensifyLoginLink from './ChangeExpensifyLoginLink'; import Terms from './Terms'; -import CONST from '../../CONST'; -import ROUTES from '../../ROUTES'; -import Navigation from '../../libs/Navigation/Navigation'; -import * as ErrorUtils from '../../libs/ErrorUtils'; -import useLocalize from '../../hooks/useLocalize'; -import useNetwork from '../../hooks/useNetwork'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; -import FormHelpMessage from '../../components/FormHelpMessage'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/signin/DesktopRedirectPage.js b/src/pages/signin/DesktopRedirectPage.js index ef6421da23bd..1c2521be09e2 100644 --- a/src/pages/signin/DesktopRedirectPage.js +++ b/src/pages/signin/DesktopRedirectPage.js @@ -1,6 +1,6 @@ import React from 'react'; -import * as App from '../../libs/actions/App'; -import DeeplinkRedirectLoadingIndicator from '../../components/DeeplinkWrapper/DeeplinkRedirectLoadingIndicator'; +import DeeplinkRedirectLoadingIndicator from '@components/DeeplinkWrapper/DeeplinkRedirectLoadingIndicator'; +import * as App from '@userActions/App'; /** * Landing page for when a user enters third party login flow on desktop. diff --git a/src/pages/signin/DesktopSignInRedirectPage/index.website.js b/src/pages/signin/DesktopSignInRedirectPage/index.website.js index bec9b5107359..1536b45cf667 100644 --- a/src/pages/signin/DesktopSignInRedirectPage/index.website.js +++ b/src/pages/signin/DesktopSignInRedirectPage/index.website.js @@ -1,5 +1,5 @@ import React from 'react'; -import DesktopRedirectPage from '../DesktopRedirectPage'; +import DesktopRedirectPage from '@pages/signin/DesktopRedirectPage'; function DesktopSignInRedirectPage() { return ; diff --git a/src/pages/signin/EmailDeliveryFailurePage.js b/src/pages/signin/EmailDeliveryFailurePage.js index 5d56980a2b97..a7b690a6151a 100644 --- a/src/pages/signin/EmailDeliveryFailurePage.js +++ b/src/pages/signin/EmailDeliveryFailurePage.js @@ -1,17 +1,17 @@ +import Str from 'expensify-common/lib/str'; +import PropTypes from 'prop-types'; import React, {useEffect} from 'react'; import {Keyboard, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import Str from 'expensify-common/lib/str'; -import styles from '../../styles/styles'; -import Text from '../../components/Text'; -import TextLink from '../../components/TextLink'; -import ONYXKEYS from '../../ONYXKEYS'; -import useLocalize from '../../hooks/useLocalize'; -import useKeyboardState from '../../hooks/useKeyboardState'; -import redirectToSignIn from '../../libs/actions/SignInRedirect'; -import CONST from '../../CONST'; -import PressableWithFeedback from '../../components/Pressable/PressableWithFeedback'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import useKeyboardState from '@hooks/useKeyboardState'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import redirectToSignIn from '@userActions/SignInRedirect'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/signin/GoogleSignInDesktopPage/index.website.js b/src/pages/signin/GoogleSignInDesktopPage/index.website.js index 691b82448e31..b9451460dfb0 100644 --- a/src/pages/signin/GoogleSignInDesktopPage/index.website.js +++ b/src/pages/signin/GoogleSignInDesktopPage/index.website.js @@ -1,6 +1,6 @@ import React from 'react'; -import ThirdPartySignInPage from '../ThirdPartySignInPage'; -import CONST from '../../../CONST'; +import ThirdPartySignInPage from '@pages/signin/ThirdPartySignInPage'; +import CONST from '@src/CONST'; function GoogleSignInDesktopPage() { return ; diff --git a/src/pages/signin/Licenses.js b/src/pages/signin/Licenses.js index e3f1026c1e9f..b73d1ad8c47d 100644 --- a/src/pages/signin/Licenses.js +++ b/src/pages/signin/Licenses.js @@ -1,11 +1,11 @@ import React from 'react'; import {View} from 'react-native'; -import styles from '../../styles/styles'; -import CONST from '../../CONST'; -import Text from '../../components/Text'; -import TextLink from '../../components/TextLink'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import LocalePicker from '../../components/LocalePicker'; +import LocalePicker from '@components/LocalePicker'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const currentYear = new Date().getFullYear(); diff --git a/src/pages/signin/LoginForm/BaseLoginForm.js b/src/pages/signin/LoginForm/BaseLoginForm.js index 5ce8739beb5f..9529d7fd0d60 100644 --- a/src/pages/signin/LoginForm/BaseLoginForm.js +++ b/src/pages/signin/LoginForm/BaseLoginForm.js @@ -1,38 +1,38 @@ +import {parsePhoneNumber} from 'awesome-phonenumber'; +import Str from 'expensify-common/lib/str'; +import PropTypes from 'prop-types'; import React, {forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import Str from 'expensify-common/lib/str'; -import {parsePhoneNumber} from 'awesome-phonenumber'; -import styles from '../../../styles/styles'; -import Text from '../../../components/Text'; -import * as Session from '../../../libs/actions/Session'; -import ONYXKEYS from '../../../ONYXKEYS'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import compose from '../../../libs/compose'; -import canFocusInputOnScreenFocus from '../../../libs/canFocusInputOnScreenFocus'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import TextInput from '../../../components/TextInput'; -import * as ValidationUtils from '../../../libs/ValidationUtils'; -import * as LoginUtils from '../../../libs/LoginUtils'; -import withToggleVisibilityView, {toggleVisibilityViewPropTypes} from '../../../components/withToggleVisibilityView'; -import FormAlertWithSubmitButton from '../../../components/FormAlertWithSubmitButton'; -import {withNetwork} from '../../../components/OnyxProvider'; -import networkPropTypes from '../../../components/networkPropTypes'; -import * as ErrorUtils from '../../../libs/ErrorUtils'; -import DotIndicatorMessage from '../../../components/DotIndicatorMessage'; -import * as CloseAccount from '../../../libs/actions/CloseAccount'; -import CONST from '../../../CONST'; -import CONFIG from '../../../CONFIG'; -import AppleSignIn from '../../../components/SignInButtons/AppleSignIn'; -import GoogleSignIn from '../../../components/SignInButtons/GoogleSignIn'; -import isInputAutoFilled from '../../../libs/isInputAutoFilled'; -import * as PolicyUtils from '../../../libs/PolicyUtils'; -import Log from '../../../libs/Log'; -import withNavigationFocus from '../../../components/withNavigationFocus'; -import usePrevious from '../../../hooks/usePrevious'; -import * as MemoryOnlyKeys from '../../../libs/actions/MemoryOnlyKeys/MemoryOnlyKeys'; +import DotIndicatorMessage from '@components/DotIndicatorMessage'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import AppleSignIn from '@components/SignInButtons/AppleSignIn'; +import GoogleSignIn from '@components/SignInButtons/GoogleSignIn'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withNavigationFocus from '@components/withNavigationFocus'; +import withToggleVisibilityView, {toggleVisibilityViewPropTypes} from '@components/withToggleVisibilityView'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import usePrevious from '@hooks/usePrevious'; +import canFocusInputOnScreenFocus from '@libs/canFocusInputOnScreenFocus'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import isInputAutoFilled from '@libs/isInputAutoFilled'; +import Log from '@libs/Log'; +import * as LoginUtils from '@libs/LoginUtils'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import styles from '@styles/styles'; +import * as CloseAccount from '@userActions/CloseAccount'; +import * as MemoryOnlyKeys from '@userActions/MemoryOnlyKeys/MemoryOnlyKeys'; +import * as Session from '@userActions/Session'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Should we dismiss the keyboard when transitioning away from the page? */ diff --git a/src/pages/signin/LoginForm/index.js b/src/pages/signin/LoginForm/index.js index b9dfbb8dfbb5..91aba70a866f 100644 --- a/src/pages/signin/LoginForm/index.js +++ b/src/pages/signin/LoginForm/index.js @@ -1,5 +1,5 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import BaseLoginForm from './BaseLoginForm'; const propTypes = { diff --git a/src/pages/signin/LoginForm/index.native.js b/src/pages/signin/LoginForm/index.native.js index dc55ad68e53b..87258e69165f 100644 --- a/src/pages/signin/LoginForm/index.native.js +++ b/src/pages/signin/LoginForm/index.native.js @@ -1,7 +1,7 @@ -import React, {useEffect, useRef} from 'react'; import PropTypes from 'prop-types'; +import React, {useEffect, useRef} from 'react'; +import AppStateMonitor from '@libs/AppStateMonitor'; import BaseLoginForm from './BaseLoginForm'; -import AppStateMonitor from '../../../libs/AppStateMonitor'; const propTypes = { /** Function used to scroll to the top of the page */ diff --git a/src/pages/signin/SAMLSignInPage/index.js b/src/pages/signin/SAMLSignInPage/index.js index 23ce9b93b8cc..67154c8e85fe 100644 --- a/src/pages/signin/SAMLSignInPage/index.js +++ b/src/pages/signin/SAMLSignInPage/index.js @@ -1,16 +1,16 @@ +import PropTypes from 'prop-types'; import React, {useEffect} from 'react'; -import {withOnyx} from 'react-native-onyx'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import ONYXKEYS from '../../../ONYXKEYS'; -import CONFIG from '../../../CONFIG'; -import Icon from '../../../components/Icon'; -import Text from '../../../components/Text'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import styles from '../../../styles/styles'; -import themeColors from '../../../styles/themes/default'; -import useLocalize from '../../../hooks/useLocalize'; +import {withOnyx} from 'react-native-onyx'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import CONFIG from '@src/CONFIG'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** The credentials of the logged in person */ diff --git a/src/pages/signin/SignInHeroCopy.js b/src/pages/signin/SignInHeroCopy.js index c2caa3ea1296..2cf3adac1022 100644 --- a/src/pages/signin/SignInHeroCopy.js +++ b/src/pages/signin/SignInHeroCopy.js @@ -1,13 +1,13 @@ -import {View} from 'react-native'; import PropTypes from 'prop-types'; import React from 'react'; -import Text from '../../components/Text'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import * as StyleUtils from '../../styles/StyleUtils'; -import styles from '../../styles/styles'; -import variables from '../../styles/variables'; +import {View} from 'react-native'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; const propTypes = { /** Override the green headline copy */ diff --git a/src/pages/signin/SignInHeroImage.js b/src/pages/signin/SignInHeroImage.js index 6d53aa25e9af..8ed9a168b328 100644 --- a/src/pages/signin/SignInHeroImage.js +++ b/src/pages/signin/SignInHeroImage.js @@ -1,9 +1,9 @@ import React from 'react'; -import Lottie from '../../components/Lottie'; -import * as LottieAnimations from '../../components/LottieAnimations'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; -import styles from '../../styles/styles'; -import variables from '../../styles/variables'; +import Lottie from '@components/Lottie'; +import * as LottieAnimations from '@components/LottieAnimations'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; const propTypes = { ...windowDimensionsPropTypes, diff --git a/src/pages/signin/SignInModal.js b/src/pages/signin/SignInModal.js index f1ce09def084..725209537a6d 100644 --- a/src/pages/signin/SignInModal.js +++ b/src/pages/signin/SignInModal.js @@ -1,10 +1,10 @@ import React from 'react'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import * as Session from '@userActions/Session'; import SignInPage from './SignInPage'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import styles from '../../styles/styles'; -import * as Session from '../../libs/actions/Session'; const propTypes = {}; diff --git a/src/pages/signin/SignInPage.js b/src/pages/signin/SignInPage.js index 18ed29fa0415..30eadf952042 100644 --- a/src/pages/signin/SignInPage.js +++ b/src/pages/signin/SignInPage.js @@ -1,31 +1,31 @@ -import React, {useEffect, useRef, useState} from 'react'; +import Str from 'expensify-common/lib/str'; import PropTypes from 'prop-types'; -import _ from 'underscore'; -import {withOnyx} from 'react-native-onyx'; +import React, {useEffect, useRef, useState} from 'react'; import {View} from 'react-native'; -import Str from 'expensify-common/lib/str'; +import {withOnyx} from 'react-native-onyx'; import {useSafeAreaInsets} from 'react-native-safe-area-context'; -import ONYXKEYS from '../../ONYXKEYS'; -import styles from '../../styles/styles'; -import SignInPageLayout from './SignInPageLayout'; +import _ from 'underscore'; +import useLocalize from '@hooks/useLocalize'; +import useWindowDimensions from '@hooks/useWindowDimensions'; +import * as ActiveClientManager from '@libs/ActiveClientManager'; +import getPlatform from '@libs/getPlatform'; +import * as Localize from '@libs/Localize'; +import Log from '@libs/Log'; +import Navigation from '@libs/Navigation/Navigation'; +import Performance from '@libs/Performance'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import * as App from '@userActions/App'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import ChooseSSOOrMagicCode from './ChooseSSOOrMagicCode'; +import EmailDeliveryFailurePage from './EmailDeliveryFailurePage'; import LoginForm from './LoginForm'; -import ValidateCodeForm from './ValidateCodeForm'; -import Performance from '../../libs/Performance'; -import * as App from '../../libs/actions/App'; +import SignInPageLayout from './SignInPageLayout'; import UnlinkLoginForm from './UnlinkLoginForm'; -import EmailDeliveryFailurePage from './EmailDeliveryFailurePage'; -import * as Localize from '../../libs/Localize'; -import * as StyleUtils from '../../styles/StyleUtils'; -import useLocalize from '../../hooks/useLocalize'; -import useWindowDimensions from '../../hooks/useWindowDimensions'; -import Log from '../../libs/Log'; -import getPlatform from '../../libs/getPlatform'; -import CONST from '../../CONST'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import ChooseSSOOrMagicCode from './ChooseSSOOrMagicCode'; -import * as ActiveClientManager from '../../libs/ActiveClientManager'; -import * as Session from '../../libs/actions/Session'; +import ValidateCodeForm from './ValidateCodeForm'; const propTypes = { /** The details about the account that the user is signing in with */ diff --git a/src/pages/signin/SignInPageHero.js b/src/pages/signin/SignInPageHero.js index 89e9088d12f2..28cc0b711ae1 100644 --- a/src/pages/signin/SignInPageHero.js +++ b/src/pages/signin/SignInPageHero.js @@ -1,12 +1,12 @@ -import {View} from 'react-native'; import PropTypes from 'prop-types'; import React from 'react'; -import * as StyleUtils from '../../styles/StyleUtils'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; -import SignInHeroImage from './SignInHeroImage'; +import {View} from 'react-native'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; import SignInHeroCopy from './SignInHeroCopy'; -import styles from '../../styles/styles'; -import variables from '../../styles/variables'; +import SignInHeroImage from './SignInHeroImage'; const propTypes = { /** Override the green headline copy */ diff --git a/src/pages/signin/SignInPageLayout/BackgroundImage/index.android.js b/src/pages/signin/SignInPageLayout/BackgroundImage/index.android.js index 6ce60fc364fd..9b420753c17a 100644 --- a/src/pages/signin/SignInPageLayout/BackgroundImage/index.android.js +++ b/src/pages/signin/SignInPageLayout/BackgroundImage/index.android.js @@ -1,6 +1,6 @@ import React from 'react'; -import AndroidBackgroundImage from '../../../../../assets/images/home-background--android.svg'; -import styles from '../../../../styles/styles'; +import AndroidBackgroundImage from '@assets/images/home-background--android.svg'; +import styles from '@styles/styles'; import defaultPropTypes from './propTypes'; function BackgroundImage(props) { diff --git a/src/pages/signin/SignInPageLayout/BackgroundImage/index.js b/src/pages/signin/SignInPageLayout/BackgroundImage/index.js index 710f7b373a81..2dc95bd28215 100644 --- a/src/pages/signin/SignInPageLayout/BackgroundImage/index.js +++ b/src/pages/signin/SignInPageLayout/BackgroundImage/index.js @@ -1,8 +1,8 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import MobileBackgroundImage from '../../../../../assets/images/home-background--mobile.svg'; -import DesktopBackgroundImage from '../../../../../assets/images/home-background--desktop.svg'; -import styles from '../../../../styles/styles'; +import React from 'react'; +import DesktopBackgroundImage from '@assets/images/home-background--desktop.svg'; +import MobileBackgroundImage from '@assets/images/home-background--mobile.svg'; +import styles from '@styles/styles'; import defaultPropTypes from './propTypes'; const defaultProps = { diff --git a/src/pages/signin/SignInPageLayout/Footer.js b/src/pages/signin/SignInPageLayout/Footer.js index 2fb5e45db760..f220dd56b613 100644 --- a/src/pages/signin/SignInPageLayout/Footer.js +++ b/src/pages/signin/SignInPageLayout/Footer.js @@ -1,21 +1,21 @@ -import {View} from 'react-native'; -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; +import {View} from 'react-native'; import _ from 'underscore'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import themeColors from '../../../styles/themes/default'; -import variables from '../../../styles/variables'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import TextLink from '../../../components/TextLink'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import Licenses from '../Licenses'; -import Socials from '../Socials'; -import Hoverable from '../../../components/Hoverable'; -import CONST from '../../../CONST'; -import * as Session from '../../../libs/actions/Session'; -import SignInGradient from '../../../../assets/images/home-fade-gradient--mobile.svg'; +import SignInGradient from '@assets/images/home-fade-gradient--mobile.svg'; +import Hoverable from '@components/Hoverable'; +import * as Expensicons from '@components/Icon/Expensicons'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import Licenses from '@pages/signin/Licenses'; +import Socials from '@pages/signin/Socials'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import * as Session from '@userActions/Session'; +import CONST from '@src/CONST'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/signin/SignInPageLayout/SignInPageContent.js b/src/pages/signin/SignInPageLayout/SignInPageContent.js index 571af6a640b7..14b7b7e004a6 100755 --- a/src/pages/signin/SignInPageLayout/SignInPageContent.js +++ b/src/pages/signin/SignInPageLayout/SignInPageContent.js @@ -1,18 +1,18 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {withSafeAreaInsets} from 'react-native-safe-area-context'; -import styles from '../../../styles/styles'; -import ExpensifyWordmark from '../../../components/ExpensifyWordmark'; -import Text from '../../../components/Text'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import SignInPageForm from '../../../components/SignInPageForm'; -import compose from '../../../libs/compose'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import OfflineIndicator from '../../../components/OfflineIndicator'; -import SignInHeroImage from '../SignInHeroImage'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import variables from '../../../styles/variables'; +import ExpensifyWordmark from '@components/ExpensifyWordmark'; +import OfflineIndicator from '@components/OfflineIndicator'; +import SignInPageForm from '@components/SignInPageForm'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import SignInHeroImage from '@pages/signin/SignInHeroImage'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import variables from '@styles/variables'; const propTypes = { /** The children to show inside the layout */ diff --git a/src/pages/signin/SignInPageLayout/index.js b/src/pages/signin/SignInPageLayout/index.js index 21a768aac3b1..627fdd0eaa37 100644 --- a/src/pages/signin/SignInPageLayout/index.js +++ b/src/pages/signin/SignInPageLayout/index.js @@ -1,21 +1,21 @@ -import React, {forwardRef, useRef, useEffect, useImperativeHandle} from 'react'; -import {View, ScrollView} from 'react-native'; -import {withSafeAreaInsets} from 'react-native-safe-area-context'; import PropTypes from 'prop-types'; -import compose from '../../../libs/compose'; -import SignInPageContent from './SignInPageContent'; +import React, {forwardRef, useEffect, useImperativeHandle, useRef} from 'react'; +import {ScrollView, View} from 'react-native'; +import {withSafeAreaInsets} from 'react-native-safe-area-context'; +import SignInGradient from '@assets/images/home-fade-gradient.svg'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import usePrevious from '@hooks/usePrevious'; +import compose from '@libs/compose'; +import SignInPageHero from '@pages/signin/SignInPageHero'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import BackgroundImage from './BackgroundImage'; import Footer from './Footer'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import styles from '../../../styles/styles'; -import SignInPageHero from '../SignInPageHero'; -import * as StyleUtils from '../../../styles/StyleUtils'; +import SignInPageContent from './SignInPageContent'; import scrollViewContentContainerStyles from './signInPageStyles'; -import themeColors from '../../../styles/themes/default'; -import BackgroundImage from './BackgroundImage'; -import SignInGradient from '../../../../assets/images/home-fade-gradient.svg'; -import variables from '../../../styles/variables'; -import usePrevious from '../../../hooks/usePrevious'; const propTypes = { /** The children to show inside the layout */ diff --git a/src/pages/signin/SignInPageLayout/signInPageStyles/index.js b/src/pages/signin/SignInPageLayout/signInPageStyles/index.js index de3cdcc20c0c..b058c78aca86 100644 --- a/src/pages/signin/SignInPageLayout/signInPageStyles/index.js +++ b/src/pages/signin/SignInPageLayout/signInPageStyles/index.js @@ -1,4 +1,4 @@ -import styles from '../../../../styles/styles'; +import styles from '@styles/styles'; // On web, we can use flex to fit the content to fit the viewport within a ScrollView. const scrollViewContentContainerStyles = styles.flex1; diff --git a/src/pages/signin/SignInPageLayout/signInPageStyles/index.native.js b/src/pages/signin/SignInPageLayout/signInPageStyles/index.native.js index 004534709783..76f847f638b9 100644 --- a/src/pages/signin/SignInPageLayout/signInPageStyles/index.native.js +++ b/src/pages/signin/SignInPageLayout/signInPageStyles/index.native.js @@ -1,4 +1,4 @@ -import styles from '../../../../styles/styles'; +import styles from '@styles/styles'; // Using flexGrow on mobile allows the ScrollView container to grow to fit the content. // This is necessary because making the sign-in content fit exactly the viewheight causes the scroll to stop working on mobile. diff --git a/src/pages/signin/Socials.js b/src/pages/signin/Socials.js index f7a866d2023b..b8dddf3f799d 100644 --- a/src/pages/signin/Socials.js +++ b/src/pages/signin/Socials.js @@ -1,14 +1,14 @@ import React from 'react'; import {View} from 'react-native'; import _ from 'underscore'; -import * as Link from '../../libs/actions/Link'; -import Icon from '../../components/Icon'; -import PressableWithoutFeedback from '../../components/Pressable/PressableWithoutFeedback'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import themeColors from '../../styles/themes/default'; -import styles from '../../styles/styles'; -import variables from '../../styles/variables'; -import CONST from '../../CONST'; +import Icon from '@components/Icon'; +import * as Expensicons from '@components/Icon/Expensicons'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import variables from '@styles/variables'; +import * as Link from '@userActions/Link'; +import CONST from '@src/CONST'; const socialsList = [ { diff --git a/src/pages/signin/Terms.js b/src/pages/signin/Terms.js index 15f7c17a2889..13af9829305d 100644 --- a/src/pages/signin/Terms.js +++ b/src/pages/signin/Terms.js @@ -1,9 +1,9 @@ import React from 'react'; -import styles from '../../styles/styles'; -import CONST from '../../CONST'; -import Text from '../../components/Text'; -import TextLink from '../../components/TextLink'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; const linkStyles = [styles.textExtraSmallSupporting, styles.link]; diff --git a/src/pages/signin/ThirdPartySignInPage.js b/src/pages/signin/ThirdPartySignInPage.js index fa6aa4d5895e..c480356d5c15 100644 --- a/src/pages/signin/ThirdPartySignInPage.js +++ b/src/pages/signin/ThirdPartySignInPage.js @@ -1,21 +1,21 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {ActivityIndicator, View} from 'react-native'; -import {SafeAreaView} from 'react-native-safe-area-context'; import {withOnyx} from 'react-native-onyx'; -import styles from '../../styles/styles'; -import compose from '../../libs/compose'; +import {SafeAreaView} from 'react-native-safe-area-context'; +import AppleSignIn from '@components/SignInButtons/AppleSignIn'; +import GoogleSignIn from '@components/SignInButtons/GoogleSignIn'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import SignInPageLayout from './SignInPageLayout'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import Text from '../../components/Text'; -import TextLink from '../../components/TextLink'; -import AppleSignIn from '../../components/SignInButtons/AppleSignIn'; -import GoogleSignIn from '../../components/SignInButtons/GoogleSignIn'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; -import ROUTES from '../../ROUTES'; -import Navigation from '../../libs/Navigation/Navigation'; -import CONST from '../../CONST'; -import ONYXKEYS from '../../ONYXKEYS'; const propTypes = { /** Which sign in provider we are using. */ diff --git a/src/pages/signin/UnlinkLoginForm.js b/src/pages/signin/UnlinkLoginForm.js index 6807ba74c6f9..d0fc44c1b1f7 100644 --- a/src/pages/signin/UnlinkLoginForm.js +++ b/src/pages/signin/UnlinkLoginForm.js @@ -1,22 +1,22 @@ +import Str from 'expensify-common/lib/str'; +import PropTypes from 'prop-types'; import React from 'react'; -import _ from 'underscore'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import Str from 'expensify-common/lib/str'; -import styles from '../../styles/styles'; -import Button from '../../components/Button'; -import Text from '../../components/Text'; -import * as Session from '../../libs/actions/Session'; -import ONYXKEYS from '../../ONYXKEYS'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import redirectToSignIn from '../../libs/actions/SignInRedirect'; -import networkPropTypes from '../../components/networkPropTypes'; -import {withNetwork} from '../../components/OnyxProvider'; -import DotIndicatorMessage from '../../components/DotIndicatorMessage'; -import CONST from '../../CONST'; -import PressableWithFeedback from '../../components/Pressable/PressableWithFeedback'; +import _ from 'underscore'; +import Button from '@components/Button'; +import DotIndicatorMessage from '@components/DotIndicatorMessage'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import styles from '@styles/styles'; +import * as Session from '@userActions/Session'; +import redirectToSignIn from '@userActions/SignInRedirect'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js index dc100fffe4f1..2d8f0e98e03c 100755 --- a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js @@ -1,32 +1,32 @@ -import React, {useState, useEffect, useRef, useCallback} from 'react'; -import {View} from 'react-native'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useRef, useState} from 'react'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import styles from '../../../styles/styles'; -import Button from '../../../components/Button'; -import Text from '../../../components/Text'; -import themeColors from '../../../styles/themes/default'; -import * as Session from '../../../libs/actions/Session'; -import ONYXKEYS from '../../../ONYXKEYS'; -import CONST from '../../../CONST'; -import ChangeExpensifyLoginLink from '../ChangeExpensifyLoginLink'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import compose from '../../../libs/compose'; -import * as ValidationUtils from '../../../libs/ValidationUtils'; -import canFocusInputOnScreenFocus from '../../../libs/canFocusInputOnScreenFocus'; -import * as ErrorUtils from '../../../libs/ErrorUtils'; -import {withNetwork} from '../../../components/OnyxProvider'; -import networkPropTypes from '../../../components/networkPropTypes'; -import * as User from '../../../libs/actions/User'; -import FormHelpMessage from '../../../components/FormHelpMessage'; -import MagicCodeInput from '../../../components/MagicCodeInput'; -import Terms from '../Terms'; -import PressableWithFeedback from '../../../components/Pressable/PressableWithFeedback'; -import usePrevious from '../../../hooks/usePrevious'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import TextInput from '../../../components/TextInput'; +import Button from '@components/Button'; +import FormHelpMessage from '@components/FormHelpMessage'; +import MagicCodeInput from '@components/MagicCodeInput'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import usePrevious from '@hooks/usePrevious'; +import canFocusInputOnScreenFocus from '@libs/canFocusInputOnScreenFocus'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import ChangeExpensifyLoginLink from '@pages/signin/ChangeExpensifyLoginLink'; +import Terms from '@pages/signin/Terms'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import * as Session from '@userActions/Session'; +import * as User from '@userActions/User'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/signin/ValidateCodeForm/index.android.js b/src/pages/signin/ValidateCodeForm/index.android.js index 1e888d24bc60..9adddf7c92d8 100644 --- a/src/pages/signin/ValidateCodeForm/index.android.js +++ b/src/pages/signin/ValidateCodeForm/index.android.js @@ -1,5 +1,5 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import BaseValidateCodeForm from './BaseValidateCodeForm'; const defaultProps = {}; diff --git a/src/pages/signin/ValidateCodeForm/index.js b/src/pages/signin/ValidateCodeForm/index.js index 540b6a3e3ed6..35afc283972b 100644 --- a/src/pages/signin/ValidateCodeForm/index.js +++ b/src/pages/signin/ValidateCodeForm/index.js @@ -1,5 +1,5 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import BaseValidateCodeForm from './BaseValidateCodeForm'; const defaultProps = {}; diff --git a/src/pages/tasks/NewTaskDescriptionPage.js b/src/pages/tasks/NewTaskDescriptionPage.js index 15f843853431..c8bd4f8cafd1 100644 --- a/src/pages/tasks/NewTaskDescriptionPage.js +++ b/src/pages/tasks/NewTaskDescriptionPage.js @@ -1,23 +1,23 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import styles from '../../styles/styles'; -import ONYXKEYS from '../../ONYXKEYS'; -import Form from '../../components/Form'; -import TextInput from '../../components/TextInput'; -import Permissions from '../../libs/Permissions'; -import ROUTES from '../../ROUTES'; -import * as Task from '../../libs/actions/Task'; -import updateMultilineInputRange from '../../libs/UpdateMultilineInputRange'; -import CONST from '../../CONST'; -import * as Browser from '../../libs/Browser'; -import useAutoFocusInput from '../../hooks/useAutoFocusInput'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import useAutoFocusInput from '@hooks/useAutoFocusInput'; +import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import Permissions from '@libs/Permissions'; +import updateMultilineInputRange from '@libs/UpdateMultilineInputRange'; +import styles from '@styles/styles'; +import * as Task from '@userActions/Task'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Beta features list */ diff --git a/src/pages/tasks/NewTaskDetailsPage.js b/src/pages/tasks/NewTaskDetailsPage.js index 236003b23c68..0ab3771c28f2 100644 --- a/src/pages/tasks/NewTaskDetailsPage.js +++ b/src/pages/tasks/NewTaskDetailsPage.js @@ -1,24 +1,24 @@ +import PropTypes from 'prop-types'; import React, {useEffect, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import styles from '../../styles/styles'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as ErrorUtils from '../../libs/ErrorUtils'; -import TextInput from '../../components/TextInput'; -import Permissions from '../../libs/Permissions'; -import ROUTES from '../../ROUTES'; -import * as Task from '../../libs/actions/Task'; -import CONST from '../../CONST'; -import * as Browser from '../../libs/Browser'; -import useAutoFocusInput from '../../hooks/useAutoFocusInput'; -import FormProvider from '../../components/Form/FormProvider'; -import InputWrapper from '../../components/Form/InputWrapper'; +import FormProvider from '@components/Form/FormProvider'; +import InputWrapper from '@components/Form/InputWrapper'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import useAutoFocusInput from '@hooks/useAutoFocusInput'; +import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import Permissions from '@libs/Permissions'; +import styles from '@styles/styles'; +import * as Task from '@userActions/Task'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Beta features list */ diff --git a/src/pages/tasks/NewTaskPage.js b/src/pages/tasks/NewTaskPage.js index f0d2d506c9d8..41cda42ccbd8 100644 --- a/src/pages/tasks/NewTaskPage.js +++ b/src/pages/tasks/NewTaskPage.js @@ -1,27 +1,27 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useEffect, useMemo, useState} from 'react'; import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import styles from '../../styles/styles'; -import ONYXKEYS from '../../ONYXKEYS'; -import Permissions from '../../libs/Permissions'; -import ROUTES from '../../ROUTES'; -import MenuItemWithTopDescription from '../../components/MenuItemWithTopDescription'; -import MenuItem from '../../components/MenuItem'; -import reportPropTypes from '../reportPropTypes'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; -import * as Task from '../../libs/actions/Task'; -import * as ReportUtils from '../../libs/ReportUtils'; -import FormAlertWithSubmitButton from '../../components/FormAlertWithSubmitButton'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import * as LocalePhoneNumber from '../../libs/LocalePhoneNumber'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import MenuItem from '@components/MenuItem'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import Permissions from '@libs/Permissions'; +import * as ReportUtils from '@libs/ReportUtils'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as Task from '@userActions/Task'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Task Creation Data */ diff --git a/src/pages/tasks/NewTaskTitlePage.js b/src/pages/tasks/NewTaskTitlePage.js index f1c14dbe06b8..8508024b45ef 100644 --- a/src/pages/tasks/NewTaskTitlePage.js +++ b/src/pages/tasks/NewTaskTitlePage.js @@ -1,22 +1,22 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import styles from '../../styles/styles'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as ErrorUtils from '../../libs/ErrorUtils'; -import Form from '../../components/Form'; -import TextInput from '../../components/TextInput'; -import Permissions from '../../libs/Permissions'; -import ROUTES from '../../ROUTES'; -import * as Task from '../../libs/actions/Task'; -import CONST from '../../CONST'; -import useAutoFocusInput from '../../hooks/useAutoFocusInput'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import useAutoFocusInput from '@hooks/useAutoFocusInput'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import Permissions from '@libs/Permissions'; +import styles from '@styles/styles'; +import * as Task from '@userActions/Task'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Beta features list */ diff --git a/src/pages/tasks/TaskAssigneeSelectorModal.js b/src/pages/tasks/TaskAssigneeSelectorModal.js index bfa3ac884e4a..cb08d2928d88 100644 --- a/src/pages/tasks/TaskAssigneeSelectorModal.js +++ b/src/pages/tasks/TaskAssigneeSelectorModal.js @@ -1,27 +1,27 @@ /* eslint-disable es/no-optional-chaining */ -import React, {useState, useEffect, useMemo, useCallback, useRef} from 'react'; -import {View} from 'react-native'; import lodashGet from 'lodash/get'; -import _ from 'underscore'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import OptionsSelector from '../../components/OptionsSelector'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; -import ONYXKEYS from '../../ONYXKEYS'; -import styles from '../../styles/styles'; -import Navigation from '../../libs/Navigation/Navigation'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import CONST from '../../CONST'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import personalDetailsPropType from '../personalDetailsPropType'; -import reportPropTypes from '../reportPropTypes'; -import * as ReportUtils from '../../libs/ReportUtils'; -import ROUTES from '../../ROUTES'; -import * as Task from '../../libs/actions/Task'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import withCurrentUserPersonalDetails from '../../components/withCurrentUserPersonalDetails'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import OptionsSelector from '@components/OptionsSelector'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as Task from '@userActions/Task'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Beta features list */ diff --git a/src/pages/tasks/TaskDescriptionPage.js b/src/pages/tasks/TaskDescriptionPage.js index a757e138d949..5d496fbca6c1 100644 --- a/src/pages/tasks/TaskDescriptionPage.js +++ b/src/pages/tasks/TaskDescriptionPage.js @@ -1,26 +1,26 @@ +import {useFocusEffect} from '@react-navigation/native'; import React, {useCallback, useRef} from 'react'; import {View} from 'react-native'; -import {useFocusEffect} from '@react-navigation/native'; import {withOnyx} from 'react-native-onyx'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import ONYXKEYS from '../../ONYXKEYS'; -import TextInput from '../../components/TextInput'; -import reportPropTypes from '../reportPropTypes'; -import styles from '../../styles/styles'; -import compose from '../../libs/compose'; -import * as Task from '../../libs/actions/Task'; -import * as ReportUtils from '../../libs/ReportUtils'; -import CONST from '../../CONST'; -import updateMultilineInputRange from '../../libs/UpdateMultilineInputRange'; -import * as Browser from '../../libs/Browser'; -import Navigation from '../../libs/Navigation/Navigation'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import withCurrentUserPersonalDetails from '../../components/withCurrentUserPersonalDetails'; -import withReportOrNotFound from '../home/report/withReportOrNotFound'; -import FormProvider from '../../components/Form/FormProvider'; -import InputWrapper from '../../components/Form/InputWrapper'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import FormProvider from '@components/Form/FormProvider'; +import InputWrapper from '@components/Form/InputWrapper'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TextInput from '@components/TextInput'; +import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import updateMultilineInputRange from '@libs/UpdateMultilineInputRange'; +import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as Task from '@userActions/Task'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** The report currently being looked at */ diff --git a/src/pages/tasks/TaskShareDestinationSelectorModal.js b/src/pages/tasks/TaskShareDestinationSelectorModal.js index 2fc8f0eab014..fde02c2a4108 100644 --- a/src/pages/tasks/TaskShareDestinationSelectorModal.js +++ b/src/pages/tasks/TaskShareDestinationSelectorModal.js @@ -1,24 +1,24 @@ /* eslint-disable es/no-optional-chaining */ -import React, {useState, useEffect, useMemo, useCallback, useRef} from 'react'; -import _ from 'underscore'; -import {View} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import OptionsSelector from '../../components/OptionsSelector'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; -import ONYXKEYS from '../../ONYXKEYS'; -import styles from '../../styles/styles'; -import Navigation from '../../libs/Navigation/Navigation'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import CONST from '../../CONST'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import personalDetailsPropType from '../personalDetailsPropType'; -import reportPropTypes from '../reportPropTypes'; -import * as Task from '../../libs/actions/Task'; -import * as ReportUtils from '../../libs/ReportUtils'; -import ROUTES from '../../ROUTES'; +import _ from 'underscore'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import OptionsSelector from '@components/OptionsSelector'; +import ScreenWrapper from '@components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as Task from '@userActions/Task'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /* Onyx Props */ diff --git a/src/pages/tasks/TaskTitlePage.js b/src/pages/tasks/TaskTitlePage.js index d7fae27851c9..375a23cc3012 100644 --- a/src/pages/tasks/TaskTitlePage.js +++ b/src/pages/tasks/TaskTitlePage.js @@ -1,24 +1,24 @@ -import _ from 'underscore'; import React, {useCallback, useRef} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import ONYXKEYS from '../../ONYXKEYS'; -import TextInput from '../../components/TextInput'; -import styles from '../../styles/styles'; -import reportPropTypes from '../reportPropTypes'; -import compose from '../../libs/compose'; -import * as Task from '../../libs/actions/Task'; -import * as ReportUtils from '../../libs/ReportUtils'; -import CONST from '../../CONST'; -import Navigation from '../../libs/Navigation/Navigation'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import withCurrentUserPersonalDetails from '../../components/withCurrentUserPersonalDetails'; -import withReportOrNotFound from '../home/report/withReportOrNotFound'; -import FormProvider from '../../components/Form/FormProvider'; -import InputWrapper from '../../components/Form/InputWrapper'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import FormProvider from '@components/Form/FormProvider'; +import InputWrapper from '@components/Form/InputWrapper'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import TextInput from '@components/TextInput'; +import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as Task from '@userActions/Task'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** The report currently being looked at */ diff --git a/src/pages/wallet/WalletStatementPage.js b/src/pages/wallet/WalletStatementPage.js index b220776cd9ef..0d33be70f1b7 100644 --- a/src/pages/wallet/WalletStatementPage.js +++ b/src/pages/wallet/WalletStatementPage.js @@ -1,25 +1,25 @@ -import React, {useEffect} from 'react'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; -import {withOnyx} from 'react-native-onyx'; import {format, getMonth, getYear} from 'date-fns'; import Str from 'expensify-common/lib/str'; -import Navigation from '../../libs/Navigation/Navigation'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import ONYXKEYS from '../../ONYXKEYS'; -import compose from '../../libs/compose'; -import CONFIG from '../../CONFIG'; -import WalletStatementModal from '../../components/WalletStatementModal'; -import * as User from '../../libs/actions/User'; -import fileDownload from '../../libs/fileDownload'; -import Growl from '../../libs/Growl'; -import CONST from '../../CONST'; -import FullPageOfflineBlockingView from '../../components/BlockingViews/FullPageOfflineBlockingView'; -import {withNetwork} from '../../components/OnyxProvider'; -import networkPropTypes from '../../components/networkPropTypes'; -import DateUtils from '../../libs/DateUtils'; +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; +import {withOnyx} from 'react-native-onyx'; +import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import ScreenWrapper from '@components/ScreenWrapper'; +import WalletStatementModal from '@components/WalletStatementModal'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import DateUtils from '@libs/DateUtils'; +import fileDownload from '@libs/fileDownload'; +import Growl from '@libs/Growl'; +import Navigation from '@libs/Navigation/Navigation'; +import * as User from '@userActions/User'; +import CONFIG from '@src/CONFIG'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** The route object passed to this page from the navigator */ diff --git a/src/pages/workspace/WorkspaceInitialPage.js b/src/pages/workspace/WorkspaceInitialPage.js index 5c754a1ef5fb..69c6ee7589e6 100644 --- a/src/pages/workspace/WorkspaceInitialPage.js +++ b/src/pages/workspace/WorkspaceInitialPage.js @@ -1,39 +1,39 @@ -import _ from 'underscore'; import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useCallback, useEffect, useState} from 'react'; -import {View, ScrollView} from 'react-native'; +import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import styles from '../../styles/styles'; -import Tooltip from '../../components/Tooltip'; -import Text from '../../components/Text'; -import ConfirmModal from '../../components/ConfirmModal'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import * as App from '../../libs/actions/App'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import MenuItem from '../../components/MenuItem'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import compose from '../../libs/compose'; -import Avatar from '../../components/Avatar'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import {policyPropTypes, policyDefaultProps} from './withPolicy'; +import _ from 'underscore'; +import Avatar from '@components/Avatar'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import ConfirmModal from '@components/ConfirmModal'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import Tooltip from '@components/Tooltip'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions from '@components/withWindowDimensions'; +import useSingleExecution from '@hooks/useSingleExecution'; +import useWaitForNavigation from '@hooks/useWaitForNavigation'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as ReimbursementAccountProps from '@pages/ReimbursementAccount/reimbursementAccountPropTypes'; +import reportPropTypes from '@pages/reportPropTypes'; +import styles from '@styles/styles'; +import * as App from '@userActions/App'; +import * as Policy from '@userActions/Policy'; +import * as ReimbursementAccount from '@userActions/ReimbursementAccount'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {policyDefaultProps, policyPropTypes} from './withPolicy'; import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading'; -import reportPropTypes from '../reportPropTypes'; -import * as Policy from '../../libs/actions/Policy'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import CONST from '../../CONST'; -import * as ReimbursementAccount from '../../libs/actions/ReimbursementAccount'; -import ONYXKEYS from '../../ONYXKEYS'; -import OfflineWithFeedback from '../../components/OfflineWithFeedback'; -import * as ReimbursementAccountProps from '../ReimbursementAccount/reimbursementAccountPropTypes'; -import * as ReportUtils from '../../libs/ReportUtils'; -import withWindowDimensions from '../../components/withWindowDimensions'; -import PressableWithoutFeedback from '../../components/Pressable/PressableWithoutFeedback'; -import useSingleExecution from '../../hooks/useSingleExecution'; -import useWaitForNavigation from '../../hooks/useWaitForNavigation'; const propTypes = { ...policyPropTypes, diff --git a/src/pages/workspace/WorkspaceInviteMessagePage.js b/src/pages/workspace/WorkspaceInviteMessagePage.js index 1f032ab514d3..1414354b4b38 100644 --- a/src/pages/workspace/WorkspaceInviteMessagePage.js +++ b/src/pages/workspace/WorkspaceInviteMessagePage.js @@ -1,32 +1,32 @@ -import React from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; -import {View, Keyboard} from 'react-native'; +import React from 'react'; +import {Keyboard, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import styles from '../../styles/styles'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as Policy from '../../libs/actions/Policy'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import TextInput from '../../components/TextInput'; -import MultipleAvatars from '../../components/MultipleAvatars'; -import CONST from '../../CONST'; -import * as Link from '../../libs/actions/Link'; -import Text from '../../components/Text'; -import {policyPropTypes, policyDefaultProps} from './withPolicy'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import Form from '@components/Form'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import MultipleAvatars from '@components/MultipleAvatars'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withNavigationFocus from '@components/withNavigationFocus'; +import compose from '@libs/compose'; +import * as Localize from '@libs/Localize'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; +import * as Policy from '@userActions/Policy'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import {policyDefaultProps, policyPropTypes} from './withPolicy'; import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; -import ROUTES from '../../ROUTES'; -import * as Localize from '../../libs/Localize'; -import Form from '../../components/Form'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import withNavigationFocus from '../../components/withNavigationFocus'; -import PressableWithoutFeedback from '../../components/Pressable/PressableWithoutFeedback'; const personalDetailsPropTypes = PropTypes.shape({ /** The accountID of the person */ diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index a21173dd7d98..afb0c55e7d4e 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -1,27 +1,27 @@ -import React, {useEffect, useMemo, useState} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import styles from '../../styles/styles'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as Policy from '../../libs/actions/Policy'; -import FormAlertWithSubmitButton from '../../components/FormAlertWithSubmitButton'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; -import CONST from '../../CONST'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import styles from '@styles/styles'; +import * as Policy from '@userActions/Policy'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import {policyDefaultProps, policyPropTypes} from './withPolicy'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import ROUTES from '../../ROUTES'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import * as Browser from '../../libs/Browser'; -import useNetwork from '../../hooks/useNetwork'; -import useLocalize from '../../hooks/useLocalize'; -import SelectionList from '../../components/SelectionList'; import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading'; const personalDetailsPropTypes = PropTypes.shape({ diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index c886df950674..3ee24b2db1b3 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -1,38 +1,38 @@ -import React, {useCallback, useEffect, useState, useMemo, useRef} from 'react'; -import _ from 'underscore'; import lodashGet from 'lodash/get'; -import {InteractionManager, View} from 'react-native'; import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import {InteractionManager, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import styles from '../../styles/styles'; -import ONYXKEYS from '../../ONYXKEYS'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import compose from '../../libs/compose'; -import * as Policy from '../../libs/actions/Policy'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; -import Button from '../../components/Button'; -import ROUTES from '../../ROUTES'; -import ConfirmModal from '../../components/ConfirmModal'; -import personalDetailsPropType from '../personalDetailsPropType'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import Button from '@components/Button'; +import ConfirmModal from '@components/ConfirmModal'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import MessagesRow from '@components/MessagesRow'; +import networkPropTypes from '@components/networkPropTypes'; +import {withNetwork} from '@components/OnyxProvider'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import Text from '@components/Text'; +import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '@components/withCurrentUserPersonalDetails'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import usePrevious from '@hooks/usePrevious'; +import * as Browser from '@libs/Browser'; +import compose from '@libs/compose'; +import Log from '@libs/Log'; +import Navigation from '@libs/Navigation/Navigation'; +import * as OptionsListUtils from '@libs/OptionsListUtils'; +import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as UserUtils from '@libs/UserUtils'; +import personalDetailsPropType from '@pages/personalDetailsPropType'; +import styles from '@styles/styles'; +import * as Policy from '@userActions/Policy'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import {policyDefaultProps, policyPropTypes} from './withPolicy'; -import CONST from '../../CONST'; -import {withNetwork} from '../../components/OnyxProvider'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import networkPropTypes from '../../components/networkPropTypes'; -import * as UserUtils from '../../libs/UserUtils'; -import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps, withCurrentUserPersonalDetailsPropTypes} from '../../components/withCurrentUserPersonalDetails'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import usePrevious from '../../hooks/usePrevious'; -import Log from '../../libs/Log'; -import * as PersonalDetailsUtils from '../../libs/PersonalDetailsUtils'; -import MessagesRow from '../../components/MessagesRow'; -import SelectionList from '../../components/SelectionList'; -import Text from '../../components/Text'; -import * as Browser from '../../libs/Browser'; import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading'; const propTypes = { diff --git a/src/pages/workspace/WorkspaceNewRoomPage.js b/src/pages/workspace/WorkspaceNewRoomPage.js index c059a54b7c21..05156c89ea61 100644 --- a/src/pages/workspace/WorkspaceNewRoomPage.js +++ b/src/pages/workspace/WorkspaceNewRoomPage.js @@ -1,32 +1,32 @@ -import React, {useState, useEffect, useCallback, useMemo, useRef} from 'react'; +import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; import {View} from 'react-native'; -import _ from 'underscore'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import withNavigationFocus from '../../components/withNavigationFocus'; -import * as Report from '../../libs/actions/Report'; -import * as App from '../../libs/actions/App'; -import useLocalize from '../../hooks/useLocalize'; -import styles from '../../styles/styles'; -import RoomNameInput from '../../components/RoomNameInput'; -import KeyboardAvoidingView from '../../components/KeyboardAvoidingView'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import Text from '../../components/Text'; -import TextInput from '../../components/TextInput'; -import Permissions from '../../libs/Permissions'; -import * as ErrorUtils from '../../libs/ErrorUtils'; -import * as ValidationUtils from '../../libs/ValidationUtils'; -import * as ReportUtils from '../../libs/ReportUtils'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import Form from '../../components/Form'; -import policyMemberPropType from '../policyMemberPropType'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import compose from '../../libs/compose'; -import variables from '../../styles/variables'; -import useDelayedInputFocus from '../../hooks/useDelayedInputFocus'; -import ValuePicker from '../../components/ValuePicker'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import Form from '@components/Form'; +import KeyboardAvoidingView from '@components/KeyboardAvoidingView'; +import RoomNameInput from '@components/RoomNameInput'; +import ScreenWrapper from '@components/ScreenWrapper'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import ValuePicker from '@components/ValuePicker'; +import withNavigationFocus from '@components/withNavigationFocus'; +import useDelayedInputFocus from '@hooks/useDelayedInputFocus'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import * as ErrorUtils from '@libs/ErrorUtils'; +import Permissions from '@libs/Permissions'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as ValidationUtils from '@libs/ValidationUtils'; +import policyMemberPropType from '@pages/policyMemberPropType'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; +import * as App from '@userActions/App'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** All reports shared with the user */ diff --git a/src/pages/workspace/WorkspacePageWithSections.js b/src/pages/workspace/WorkspacePageWithSections.js index fbe950248062..98e9da3674c1 100644 --- a/src/pages/workspace/WorkspacePageWithSections.js +++ b/src/pages/workspace/WorkspacePageWithSections.js @@ -1,25 +1,25 @@ -import React, {useEffect} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useEffect} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import lodashGet from 'lodash/get'; import _ from 'underscore'; -import styles from '../../styles/styles'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import Navigation from '../../libs/Navigation/Navigation'; -import compose from '../../libs/compose'; -import ROUTES from '../../ROUTES'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import ONYXKEYS from '../../ONYXKEYS'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import BankAccount from '../../libs/models/BankAccount'; -import * as ReimbursementAccountProps from '../ReimbursementAccount/reimbursementAccountPropTypes'; -import userPropTypes from '../settings/userPropTypes'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import ScrollViewWithContext from '@components/ScrollViewWithContext'; +import useNetwork from '@hooks/useNetwork'; +import compose from '@libs/compose'; +import BankAccount from '@libs/models/BankAccount'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReimbursementAccountProps from '@pages/ReimbursementAccount/reimbursementAccountPropTypes'; +import userPropTypes from '@pages/settings/userPropTypes'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; -import ScrollViewWithContext from '../../components/ScrollViewWithContext'; -import useNetwork from '../../hooks/useNetwork'; const propTypes = { shouldSkipVBBACall: PropTypes.bool, diff --git a/src/pages/workspace/WorkspaceResetBankAccountModal.js b/src/pages/workspace/WorkspaceResetBankAccountModal.js index ff7bcb51e939..434c09f0ac04 100644 --- a/src/pages/workspace/WorkspaceResetBankAccountModal.js +++ b/src/pages/workspace/WorkspaceResetBankAccountModal.js @@ -1,15 +1,15 @@ import lodashGet from 'lodash/get'; -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import ConfirmModal from '../../components/ConfirmModal'; -import * as BankAccounts from '../../libs/actions/BankAccounts'; -import * as ReimbursementAccountProps from '../ReimbursementAccount/reimbursementAccountPropTypes'; -import Text from '../../components/Text'; -import styles from '../../styles/styles'; -import BankAccount from '../../libs/models/BankAccount'; -import ONYXKEYS from '../../ONYXKEYS'; -import useLocalize from '../../hooks/useLocalize'; +import ConfirmModal from '@components/ConfirmModal'; +import Text from '@components/Text'; +import useLocalize from '@hooks/useLocalize'; +import BankAccount from '@libs/models/BankAccount'; +import * as ReimbursementAccountProps from '@pages/ReimbursementAccount/reimbursementAccountPropTypes'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Reimbursement account data */ diff --git a/src/pages/workspace/WorkspaceSettingsCurrencyPage.js b/src/pages/workspace/WorkspaceSettingsCurrencyPage.js index a8f473bb1a0b..ce1e1d7b8966 100644 --- a/src/pages/workspace/WorkspaceSettingsCurrencyPage.js +++ b/src/pages/workspace/WorkspaceSettingsCurrencyPage.js @@ -1,19 +1,19 @@ -import React, {useState, useCallback} from 'react'; -import _ from 'underscore'; -import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; -import useLocalize from '../../hooks/useLocalize'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import SelectionList from '../../components/SelectionList'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; +import React, {useCallback, useState} from 'react'; +import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; +import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; +import ScreenWrapper from '@components/ScreenWrapper'; +import SelectionList from '@components/SelectionList'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as Policy from '@userActions/Policy'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import {policyDefaultProps, policyPropTypes} from './withPolicy'; -import * as Policy from '../../libs/actions/Policy'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading'; const propTypes = { diff --git a/src/pages/workspace/WorkspaceSettingsPage.js b/src/pages/workspace/WorkspaceSettingsPage.js index fd975ebc9247..9d1000179291 100644 --- a/src/pages/workspace/WorkspaceSettingsPage.js +++ b/src/pages/workspace/WorkspaceSettingsPage.js @@ -1,31 +1,31 @@ +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; import React, {useCallback} from 'react'; import {Keyboard, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import lodashGet from 'lodash/get'; -import ONYXKEYS from '../../ONYXKEYS'; -import styles from '../../styles/styles'; -import compose from '../../libs/compose'; -import * as Policy from '../../libs/actions/Policy'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import AvatarWithImagePicker from '../../components/AvatarWithImagePicker'; -import CONST from '../../CONST'; -import TextInput from '../../components/TextInput'; +import Avatar from '@components/Avatar'; +import AvatarWithImagePicker from '@components/AvatarWithImagePicker'; +import Form from '@components/Form'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import {withNetwork} from '@components/OnyxProvider'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import withWindowDimensions, {windowDimensionsPropTypes} from '@components/withWindowDimensions'; +import useLocalize from '@hooks/useLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as ReportUtils from '@libs/ReportUtils'; +import * as UserUtils from '@libs/UserUtils'; +import styles from '@styles/styles'; +import * as Policy from '@userActions/Policy'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import withPolicy, {policyDefaultProps, policyPropTypes} from './withPolicy'; import WorkspacePageWithSections from './WorkspacePageWithSections'; -import withPolicy, {policyPropTypes, policyDefaultProps} from './withPolicy'; -import {withNetwork} from '../../components/OnyxProvider'; -import OfflineWithFeedback from '../../components/OfflineWithFeedback'; -import Form from '../../components/Form'; -import * as ReportUtils from '../../libs/ReportUtils'; -import * as UserUtils from '../../libs/UserUtils'; -import Avatar from '../../components/Avatar'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; -import MenuItemWithTopDescription from '../../components/MenuItemWithTopDescription'; -import Text from '../../components/Text'; -import useLocalize from '../../hooks/useLocalize'; const propTypes = { /** Constant, list of available currencies */ diff --git a/src/pages/workspace/WorkspacesListPage.js b/src/pages/workspace/WorkspacesListPage.js index 5a2e01562cc1..572dd9d1152f 100755 --- a/src/pages/workspace/WorkspacesListPage.js +++ b/src/pages/workspace/WorkspacesListPage.js @@ -1,34 +1,34 @@ +import PropTypes from 'prop-types'; import React, {useMemo} from 'react'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; import _ from 'underscore'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import ONYXKEYS from '../../ONYXKEYS'; -import CONST from '../../CONST'; -import styles from '../../styles/styles'; -import compose from '../../libs/compose'; -import OfflineWithFeedback from '../../components/OfflineWithFeedback'; -import * as Expensicons from '../../components/Icon/Expensicons'; -import themeColors from '../../styles/themes/default'; -import * as PolicyUtils from '../../libs/PolicyUtils'; -import MenuItem from '../../components/MenuItem'; -import * as Policy from '../../libs/actions/Policy'; -import policyMemberPropType from '../policyMemberPropType'; -import Button from '../../components/Button'; -import * as ReimbursementAccountProps from '../ReimbursementAccount/reimbursementAccountPropTypes'; -import * as ReportUtils from '../../libs/ReportUtils'; -import * as CurrencyUtils from '../../libs/CurrencyUtils'; +import Button from '@components/Button'; +import FeatureList from '@components/FeatureList'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import IllustratedHeaderPageLayout from '@components/IllustratedHeaderPageLayout'; +import * as LottieAnimations from '@components/LottieAnimations'; +import MenuItem from '@components/MenuItem'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import useLocalize from '@hooks/useLocalize'; +import useNetwork from '@hooks/useNetwork'; +import usePermissions from '@hooks/usePermissions'; +import compose from '@libs/compose'; +import * as CurrencyUtils from '@libs/CurrencyUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReportUtils from '@libs/ReportUtils'; +import policyMemberPropType from '@pages/policyMemberPropType'; +import * as ReimbursementAccountProps from '@pages/ReimbursementAccount/reimbursementAccountPropTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as App from '@userActions/App'; +import * as Policy from '@userActions/Policy'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import SCREENS from '@src/SCREENS'; import withPolicyAndFullscreenLoading from './withPolicyAndFullscreenLoading'; -import * as App from '../../libs/actions/App'; -import useLocalize from '../../hooks/useLocalize'; -import useNetwork from '../../hooks/useNetwork'; -import usePermissions from '../../hooks/usePermissions'; -import IllustratedHeaderPageLayout from '../../components/IllustratedHeaderPageLayout'; -import SCREENS from '../../SCREENS'; -import * as LottieAnimations from '../../components/LottieAnimations'; -import * as Illustrations from '../../components/Icon/Illustrations'; -import FeatureList from '../../components/FeatureList'; const propTypes = { /** The list of this user's policies */ diff --git a/src/pages/workspace/bills/WorkspaceBillsFirstSection.js b/src/pages/workspace/bills/WorkspaceBillsFirstSection.js index b0fc0e99c8f9..d71614f8a078 100644 --- a/src/pages/workspace/bills/WorkspaceBillsFirstSection.js +++ b/src/pages/workspace/bills/WorkspaceBillsFirstSection.js @@ -1,20 +1,20 @@ +import Str from 'expensify-common/lib/str'; +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; -import Str from 'expensify-common/lib/str'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import Section from '../../../components/Section'; -import CopyTextToClipboard from '../../../components/CopyTextToClipboard'; -import * as Link from '../../../libs/actions/Link'; -import compose from '../../../libs/compose'; -import ONYXKEYS from '../../../ONYXKEYS'; -import userPropTypes from '../../settings/userPropTypes'; -import TextLink from '../../../components/TextLink'; +import CopyTextToClipboard from '@components/CopyTextToClipboard'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import TextLink from '@components/TextLink'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import userPropTypes from '@pages/settings/userPropTypes'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** The policy ID currently being configured */ diff --git a/src/pages/workspace/bills/WorkspaceBillsNoVBAView.js b/src/pages/workspace/bills/WorkspaceBillsNoVBAView.js index 8c16cbb195cc..8bca8e9067ee 100644 --- a/src/pages/workspace/bills/WorkspaceBillsNoVBAView.js +++ b/src/pages/workspace/bills/WorkspaceBillsNoVBAView.js @@ -1,13 +1,13 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import Section from '../../../components/Section'; +import ConnectBankAccountButton from '@components/ConnectBankAccountButton'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; import WorkspaceBillsFirstSection from './WorkspaceBillsFirstSection'; -import ConnectBankAccountButton from '../../../components/ConnectBankAccountButton'; const propTypes = { /** The policy ID currently being configured */ diff --git a/src/pages/workspace/bills/WorkspaceBillsPage.js b/src/pages/workspace/bills/WorkspaceBillsPage.js index 5cb590895e0d..c607071a4365 100644 --- a/src/pages/workspace/bills/WorkspaceBillsPage.js +++ b/src/pages/workspace/bills/WorkspaceBillsPage.js @@ -1,10 +1,10 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; +import React from 'react'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; +import CONST from '@src/CONST'; import WorkspaceBillsNoVBAView from './WorkspaceBillsNoVBAView'; import WorkspaceBillsVBAView from './WorkspaceBillsVBAView'; -import WorkspacePageWithSections from '../WorkspacePageWithSections'; -import CONST from '../../../CONST'; const propTypes = { /** The route object passed to this page from the navigator */ diff --git a/src/pages/workspace/bills/WorkspaceBillsVBAView.js b/src/pages/workspace/bills/WorkspaceBillsVBAView.js index c35b3400e7d1..08e5349e2e1f 100644 --- a/src/pages/workspace/bills/WorkspaceBillsVBAView.js +++ b/src/pages/workspace/bills/WorkspaceBillsVBAView.js @@ -1,13 +1,13 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import Section from '../../../components/Section'; -import * as Link from '../../../libs/actions/Link'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; import WorkspaceBillsFirstSection from './WorkspaceBillsFirstSection'; const propTypes = { diff --git a/src/pages/workspace/card/WorkspaceCardNoVBAView.js b/src/pages/workspace/card/WorkspaceCardNoVBAView.js index b1a1dcf0b793..a8ad276dd0ce 100644 --- a/src/pages/workspace/card/WorkspaceCardNoVBAView.js +++ b/src/pages/workspace/card/WorkspaceCardNoVBAView.js @@ -1,13 +1,13 @@ -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {View} from 'react-native'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import UnorderedList from '../../../components/UnorderedList'; -import Section from '../../../components/Section'; -import ConnectBankAccountButton from '../../../components/ConnectBankAccountButton'; +import ConnectBankAccountButton from '@components/ConnectBankAccountButton'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import UnorderedList from '@components/UnorderedList'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; const propTypes = { /** The policy ID currently being configured */ diff --git a/src/pages/workspace/card/WorkspaceCardPage.js b/src/pages/workspace/card/WorkspaceCardPage.js index 2f5527c49cf0..55220b85ce63 100644 --- a/src/pages/workspace/card/WorkspaceCardPage.js +++ b/src/pages/workspace/card/WorkspaceCardPage.js @@ -1,11 +1,11 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; +import React from 'react'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; +import CONST from '@src/CONST'; import WorkspaceCardNoVBAView from './WorkspaceCardNoVBAView'; import WorkspaceCardVBANoECardView from './WorkspaceCardVBANoECardView'; import WorkspaceCardVBAWithECardView from './WorkspaceCardVBAWithECardView'; -import WorkspacePageWithSections from '../WorkspacePageWithSections'; -import CONST from '../../../CONST'; const propTypes = { /** The route object passed to this page from the navigator */ diff --git a/src/pages/workspace/card/WorkspaceCardVBANoECardView.js b/src/pages/workspace/card/WorkspaceCardVBANoECardView.js index 5c93b8858de4..0ac81230b32e 100644 --- a/src/pages/workspace/card/WorkspaceCardVBANoECardView.js +++ b/src/pages/workspace/card/WorkspaceCardVBANoECardView.js @@ -1,19 +1,19 @@ import React from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import Text from '../../../components/Text'; -import Button from '../../../components/Button'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import UnorderedList from '../../../components/UnorderedList'; -import Section from '../../../components/Section'; -import * as Link from '../../../libs/actions/Link'; -import ONYXKEYS from '../../../ONYXKEYS'; -import compose from '../../../libs/compose'; -import CONST from '../../../CONST'; -import userPropTypes from '../../settings/userPropTypes'; +import Button from '@components/Button'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import UnorderedList from '@components/UnorderedList'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import userPropTypes from '@pages/settings/userPropTypes'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; const propTypes = { /** Information about the logged in user's account */ diff --git a/src/pages/workspace/card/WorkspaceCardVBAWithECardView.js b/src/pages/workspace/card/WorkspaceCardVBAWithECardView.js index 7f9971f00c1b..582a85109461 100644 --- a/src/pages/workspace/card/WorkspaceCardVBAWithECardView.js +++ b/src/pages/workspace/card/WorkspaceCardVBAWithECardView.js @@ -1,13 +1,13 @@ import React from 'react'; import {View} from 'react-native'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import UnorderedList from '../../../components/UnorderedList'; -import * as Link from '../../../libs/actions/Link'; -import Section from '../../../components/Section'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import UnorderedList from '@components/UnorderedList'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/workspace/invoices/WorkspaceInvoicesFirstSection.js b/src/pages/workspace/invoices/WorkspaceInvoicesFirstSection.js index 7c47476e1c7b..78fe7cdae1cb 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoicesFirstSection.js +++ b/src/pages/workspace/invoices/WorkspaceInvoicesFirstSection.js @@ -1,13 +1,13 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import Section from '../../../components/Section'; -import * as Link from '../../../libs/actions/Link'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; const propTypes = { /** The policy ID currently being configured */ diff --git a/src/pages/workspace/invoices/WorkspaceInvoicesNoVBAView.js b/src/pages/workspace/invoices/WorkspaceInvoicesNoVBAView.js index 5348e49ee599..6f334cd10b0a 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoicesNoVBAView.js +++ b/src/pages/workspace/invoices/WorkspaceInvoicesNoVBAView.js @@ -1,13 +1,13 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import Section from '../../../components/Section'; +import ConnectBankAccountButton from '@components/ConnectBankAccountButton'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; import WorkspaceInvoicesFirstSection from './WorkspaceInvoicesFirstSection'; -import ConnectBankAccountButton from '../../../components/ConnectBankAccountButton'; const propTypes = { /** The policy ID currently being configured */ diff --git a/src/pages/workspace/invoices/WorkspaceInvoicesPage.js b/src/pages/workspace/invoices/WorkspaceInvoicesPage.js index bfc1988211ce..8bc0c4484100 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoicesPage.js +++ b/src/pages/workspace/invoices/WorkspaceInvoicesPage.js @@ -1,10 +1,10 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import WorkspacePageWithSections from '../WorkspacePageWithSections'; +import React from 'react'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; +import CONST from '@src/CONST'; import WorkspaceInvoicesNoVBAView from './WorkspaceInvoicesNoVBAView'; import WorkspaceInvoicesVBAView from './WorkspaceInvoicesVBAView'; -import CONST from '../../../CONST'; const propTypes = { /** The route object passed to this page from the navigator */ diff --git a/src/pages/workspace/invoices/WorkspaceInvoicesVBAView.js b/src/pages/workspace/invoices/WorkspaceInvoicesVBAView.js index 0f7dd8b340fc..0958ba9688e5 100644 --- a/src/pages/workspace/invoices/WorkspaceInvoicesVBAView.js +++ b/src/pages/workspace/invoices/WorkspaceInvoicesVBAView.js @@ -1,14 +1,14 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import Section from '../../../components/Section'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; import WorkspaceInvoicesFirstSection from './WorkspaceInvoicesFirstSection'; -import * as Link from '../../../libs/actions/Link'; const propTypes = { /** The policy ID currently being configured */ diff --git a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.js b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.js index 026441c665a2..14338424e11d 100644 --- a/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.js +++ b/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage.js @@ -1,28 +1,28 @@ +import lodashGet from 'lodash/get'; import React from 'react'; import {Keyboard, View} from 'react-native'; -import _ from 'underscore'; -import lodashGet from 'lodash/get'; import {withOnyx} from 'react-native-onyx'; -import ONYXKEYS from '../../../ONYXKEYS'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import styles from '../../../styles/styles'; -import compose from '../../../libs/compose'; -import * as Policy from '../../../libs/actions/Policy'; -import * as PolicyUtils from '../../../libs/PolicyUtils'; -import CONST from '../../../CONST'; -import Picker from '../../../components/Picker'; -import TextInput from '../../../components/TextInput'; -import WorkspacePageWithSections from '../WorkspacePageWithSections'; -import withPolicy, {policyPropTypes, policyDefaultProps} from '../withPolicy'; -import {withNetwork} from '../../../components/OnyxProvider'; -import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; -import Form from '../../../components/Form'; -import Navigation from '../../../libs/Navigation/Navigation'; -import ROUTES from '../../../ROUTES'; -import getPermittedDecimalSeparator from '../../../libs/getPermittedDecimalSeparator'; -import * as BankAccounts from '../../../libs/actions/BankAccounts'; -import * as ReimbursementAccountProps from '../../ReimbursementAccount/reimbursementAccountPropTypes'; -import * as NumberUtils from '../../../libs/NumberUtils'; +import _ from 'underscore'; +import Form from '@components/Form'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import {withNetwork} from '@components/OnyxProvider'; +import Picker from '@components/Picker'; +import TextInput from '@components/TextInput'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import getPermittedDecimalSeparator from '@libs/getPermittedDecimalSeparator'; +import Navigation from '@libs/Navigation/Navigation'; +import * as NumberUtils from '@libs/NumberUtils'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReimbursementAccountProps from '@pages/ReimbursementAccount/reimbursementAccountPropTypes'; +import withPolicy, {policyDefaultProps, policyPropTypes} from '@pages/workspace/withPolicy'; +import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as Policy from '@userActions/Policy'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; const propTypes = { /** Bank account attached to free plan */ diff --git a/src/pages/workspace/reimburse/WorkspaceReimbursePage.js b/src/pages/workspace/reimburse/WorkspaceReimbursePage.js index 9d1495c2a11f..d19cde6a0553 100644 --- a/src/pages/workspace/reimburse/WorkspaceReimbursePage.js +++ b/src/pages/workspace/reimburse/WorkspaceReimbursePage.js @@ -1,11 +1,11 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; +import React from 'react'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import withPolicy, {policyPropTypes} from '@pages/workspace/withPolicy'; +import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; +import CONST from '@src/CONST'; import WorkspaceReimburseView from './WorkspaceReimburseView'; -import WorkspacePageWithSections from '../WorkspacePageWithSections'; -import CONST from '../../../CONST'; -import compose from '../../../libs/compose'; -import withPolicy, {policyPropTypes} from '../withPolicy'; const propTypes = { /** The route object passed to this page from the navigator */ diff --git a/src/pages/workspace/reimburse/WorkspaceReimburseSection.js b/src/pages/workspace/reimburse/WorkspaceReimburseSection.js index eb8305f23140..4a6c32287018 100644 --- a/src/pages/workspace/reimburse/WorkspaceReimburseSection.js +++ b/src/pages/workspace/reimburse/WorkspaceReimburseSection.js @@ -1,20 +1,20 @@ -import React, {useState, useEffect} from 'react'; +import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import React, {useEffect, useState} from 'react'; import {ActivityIndicator, View} from 'react-native'; -import lodashGet from 'lodash/get'; import _ from 'underscore'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import themeColors from '../../../styles/themes/default'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import Section from '../../../components/Section'; -import * as Link from '../../../libs/actions/Link'; -import BankAccount from '../../../libs/models/BankAccount'; -import * as ReimbursementAccountProps from '../../ReimbursementAccount/reimbursementAccountPropTypes'; -import networkPropTypes from '../../../components/networkPropTypes'; -import CONST from '../../../CONST'; -import ConnectBankAccountButton from '../../../components/ConnectBankAccountButton'; +import ConnectBankAccountButton from '@components/ConnectBankAccountButton'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import networkPropTypes from '@components/networkPropTypes'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import BankAccount from '@libs/models/BankAccount'; +import * as ReimbursementAccountProps from '@pages/ReimbursementAccount/reimbursementAccountPropTypes'; +import styles from '@styles/styles'; +import themeColors from '@styles/themes/default'; +import * as Link from '@userActions/Link'; +import CONST from '@src/CONST'; const propTypes = { /** Policy values needed in the component */ diff --git a/src/pages/workspace/reimburse/WorkspaceReimburseView.js b/src/pages/workspace/reimburse/WorkspaceReimburseView.js index 6b520b65eff2..5085792ed027 100644 --- a/src/pages/workspace/reimburse/WorkspaceReimburseView.js +++ b/src/pages/workspace/reimburse/WorkspaceReimburseView.js @@ -1,31 +1,31 @@ -import React, {useState, useEffect, useCallback} from 'react'; +import lodashGet from 'lodash/get'; +import PropTypes from 'prop-types'; +import React, {useCallback, useEffect, useState} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import lodashGet from 'lodash/get'; import _ from 'underscore'; -import MenuItemWithTopDescription from '../../../components/MenuItemWithTopDescription'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import Section from '../../../components/Section'; -import Navigation from '../../../libs/Navigation/Navigation'; -import CopyTextToClipboard from '../../../components/CopyTextToClipboard'; -import * as Link from '../../../libs/actions/Link'; -import compose from '../../../libs/compose'; -import * as Policy from '../../../libs/actions/Policy'; -import * as PolicyUtils from '../../../libs/PolicyUtils'; -import CONST from '../../../CONST'; -import ROUTES from '../../../ROUTES'; -import ONYXKEYS from '../../../ONYXKEYS'; -import * as ReimbursementAccountProps from '../../ReimbursementAccount/reimbursementAccountPropTypes'; -import {withNetwork} from '../../../components/OnyxProvider'; -import networkPropTypes from '../../../components/networkPropTypes'; +import CopyTextToClipboard from '@components/CopyTextToClipboard'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; +import networkPropTypes from '@components/networkPropTypes'; +import OfflineWithFeedback from '@components/OfflineWithFeedback'; +import {withNetwork} from '@components/OnyxProvider'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import compose from '@libs/compose'; +import Navigation from '@libs/Navigation/Navigation'; +import * as PolicyUtils from '@libs/PolicyUtils'; +import * as ReimbursementAccountProps from '@pages/ReimbursementAccount/reimbursementAccountPropTypes'; +import styles from '@styles/styles'; +import * as BankAccounts from '@userActions/BankAccounts'; +import * as Link from '@userActions/Link'; +import * as Policy from '@userActions/Policy'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; import WorkspaceReimburseSection from './WorkspaceReimburseSection'; -import * as BankAccounts from '../../../libs/actions/BankAccounts'; -import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; const propTypes = { /** Policy values needed in the component */ diff --git a/src/pages/workspace/travel/WorkspaceTravelNoVBAView.js b/src/pages/workspace/travel/WorkspaceTravelNoVBAView.js index 254162e29aed..67be0fdca9fb 100644 --- a/src/pages/workspace/travel/WorkspaceTravelNoVBAView.js +++ b/src/pages/workspace/travel/WorkspaceTravelNoVBAView.js @@ -1,12 +1,12 @@ +import PropTypes from 'prop-types'; import React from 'react'; import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import Section from '../../../components/Section'; -import ConnectBankAccountButton from '../../../components/ConnectBankAccountButton'; +import ConnectBankAccountButton from '@components/ConnectBankAccountButton'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; const propTypes = { /** The policy ID currently being configured */ diff --git a/src/pages/workspace/travel/WorkspaceTravelPage.js b/src/pages/workspace/travel/WorkspaceTravelPage.js index 8f8a174a5876..a88e180cc7b6 100644 --- a/src/pages/workspace/travel/WorkspaceTravelPage.js +++ b/src/pages/workspace/travel/WorkspaceTravelPage.js @@ -1,10 +1,10 @@ -import React from 'react'; import PropTypes from 'prop-types'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import WorkspacePageWithSections from '../WorkspacePageWithSections'; +import React from 'react'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import WorkspacePageWithSections from '@pages/workspace/WorkspacePageWithSections'; +import CONST from '@src/CONST'; import WorkspaceTravelNoVBAView from './WorkspaceTravelNoVBAView'; import WorkspaceTravelVBAView from './WorkspaceTravelVBAView'; -import CONST from '../../../CONST'; const propTypes = { /** The route object passed to this page from the navigator */ diff --git a/src/pages/workspace/travel/WorkspaceTravelVBAView.js b/src/pages/workspace/travel/WorkspaceTravelVBAView.js index 8156b0334b3d..6d5620d8c939 100644 --- a/src/pages/workspace/travel/WorkspaceTravelVBAView.js +++ b/src/pages/workspace/travel/WorkspaceTravelVBAView.js @@ -1,14 +1,14 @@ import React from 'react'; import {View} from 'react-native'; -import Text from '../../../components/Text'; -import styles from '../../../styles/styles'; -import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; -import * as Expensicons from '../../../components/Icon/Expensicons'; -import * as Illustrations from '../../../components/Icon/Illustrations'; -import Section from '../../../components/Section'; -import * as Link from '../../../libs/actions/Link'; -import * as Report from '../../../libs/actions/Report'; -import CONST from '../../../CONST'; +import * as Expensicons from '@components/Icon/Expensicons'; +import * as Illustrations from '@components/Icon/Illustrations'; +import Section from '@components/Section'; +import Text from '@components/Text'; +import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; +import styles from '@styles/styles'; +import * as Link from '@userActions/Link'; +import * as Report from '@userActions/Report'; +import CONST from '@src/CONST'; const propTypes = { ...withLocalizePropTypes, diff --git a/src/pages/workspace/withPolicy.js b/src/pages/workspace/withPolicy.js index 19c24c7dad39..cc0865dfcfdd 100644 --- a/src/pages/workspace/withPolicy.js +++ b/src/pages/workspace/withPolicy.js @@ -1,14 +1,14 @@ -import _ from 'underscore'; +import {useNavigationState} from '@react-navigation/native'; import lodashGet from 'lodash/get'; -import React from 'react'; import PropTypes from 'prop-types'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import {useNavigationState} from '@react-navigation/native'; -import CONST from '../../CONST'; -import getComponentDisplayName from '../../libs/getComponentDisplayName'; -import * as Policy from '../../libs/actions/Policy'; -import ONYXKEYS from '../../ONYXKEYS'; -import policyMemberPropType from '../policyMemberPropType'; +import _ from 'underscore'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import policyMemberPropType from '@pages/policyMemberPropType'; +import * as Policy from '@userActions/Policy'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; /** * @param {Object} route diff --git a/src/pages/workspace/withPolicyAndFullscreenLoading.js b/src/pages/workspace/withPolicyAndFullscreenLoading.js index 60522cbfbf05..2911eadccf5f 100644 --- a/src/pages/workspace/withPolicyAndFullscreenLoading.js +++ b/src/pages/workspace/withPolicyAndFullscreenLoading.js @@ -1,13 +1,13 @@ +import isEmpty from 'lodash/isEmpty'; +import omit from 'lodash/omit'; import PropTypes from 'prop-types'; import React from 'react'; import {withOnyx} from 'react-native-onyx'; -import isEmpty from 'lodash/isEmpty'; -import omit from 'lodash/omit'; -import compose from '../../libs/compose'; -import ONYXKEYS from '../../ONYXKEYS'; -import withPolicy, {policyPropTypes, policyDefaultProps} from './withPolicy'; -import getComponentDisplayName from '../../libs/getComponentDisplayName'; -import FullscreenLoadingIndicator from '../../components/FullscreenLoadingIndicator'; +import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; +import compose from '@libs/compose'; +import getComponentDisplayName from '@libs/getComponentDisplayName'; +import ONYXKEYS from '@src/ONYXKEYS'; +import withPolicy, {policyDefaultProps, policyPropTypes} from './withPolicy'; export default function (WrappedComponent) { const propTypes = { diff --git a/src/setup/index.js b/src/setup/index.js index 5e92bff35ba1..aac6f1e4e732 100644 --- a/src/setup/index.js +++ b/src/setup/index.js @@ -1,12 +1,12 @@ import {I18nManager} from 'react-native'; import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../ONYXKEYS'; -import CONST from '../CONST'; +import intlPolyfill from '@libs/IntlPolyfill'; +import * as Metrics from '@libs/Metrics'; +import * as Device from '@userActions/Device'; +import exposeGlobalMemoryOnlyKeysMethods from '@userActions/MemoryOnlyKeys/exposeGlobalMemoryOnlyKeysMethods'; +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; import platformSetup from './platformSetup'; -import * as Metrics from '../libs/Metrics'; -import * as Device from '../libs/actions/Device'; -import intlPolyfill from '../libs/IntlPolyfill'; -import exposeGlobalMemoryOnlyKeysMethods from '../libs/actions/MemoryOnlyKeys/exposeGlobalMemoryOnlyKeysMethods'; export default function () { /* diff --git a/src/setup/platformSetup/index.desktop.js b/src/setup/platformSetup/index.desktop.js index 0fff03ed252b..ab485b1855f1 100644 --- a/src/setup/platformSetup/index.desktop.js +++ b/src/setup/platformSetup/index.desktop.js @@ -1,10 +1,10 @@ import {AppRegistry} from 'react-native'; -import Config from '../../CONFIG'; -import LocalNotification from '../../libs/Notification/LocalNotification'; -import DateUtils from '../../libs/DateUtils'; +import DateUtils from '@libs/DateUtils'; +import Navigation from '@libs/Navigation/Navigation'; +import LocalNotification from '@libs/Notification/LocalNotification'; +import Config from '@src/CONFIG'; +import ROUTES from '@src/ROUTES'; import ELECTRON_EVENTS from '../../../desktop/ELECTRON_EVENTS'; -import ROUTES from '../../ROUTES'; -import Navigation from '../../libs/Navigation/Navigation'; export default function () { AppRegistry.runApplication(Config.APP_NAME, { diff --git a/src/setup/platformSetup/index.native.js b/src/setup/platformSetup/index.native.js index 470bef78848f..09a39e13386e 100644 --- a/src/setup/platformSetup/index.native.js +++ b/src/setup/platformSetup/index.native.js @@ -1,8 +1,8 @@ import crashlytics from '@react-native-firebase/crashlytics'; -import CONFIG from '../../CONFIG'; -import PushNotification from '../../libs/Notification/PushNotification'; -import Performance from '../../libs/Performance'; -import subscribeToReportCommentPushNotifications from '../../libs/Notification/PushNotification/subscribeToReportCommentPushNotifications'; +import PushNotification from '@libs/Notification/PushNotification'; +import subscribeToReportCommentPushNotifications from '@libs/Notification/PushNotification/subscribeToReportCommentPushNotifications'; +import Performance from '@libs/Performance'; +import CONFIG from '@src/CONFIG'; export default function () { // We do not want to send crash reports if we are on a locally built release version of the app. diff --git a/src/setup/platformSetup/index.website.js b/src/setup/platformSetup/index.website.js index e859005c9abe..d26268cd94bf 100644 --- a/src/setup/platformSetup/index.website.js +++ b/src/setup/platformSetup/index.website.js @@ -1,13 +1,11 @@ import {AppRegistry} from 'react-native'; - // This is a polyfill for InternetExplorer to support the modern KeyboardEvent.key and KeyboardEvent.code instead of KeyboardEvent.keyCode import 'shim-keyboard-event-key'; - -import checkForUpdates from '../../libs/checkForUpdates'; -import Config from '../../CONFIG'; -import DateUtils from '../../libs/DateUtils'; +import checkForUpdates from '@libs/checkForUpdates'; +import DateUtils from '@libs/DateUtils'; +import Visibility from '@libs/Visibility'; +import Config from '@src/CONFIG'; import pkg from '../../../package.json'; -import Visibility from '../../libs/Visibility'; /** * Download the latest app version from the server, and if it is different than the current one, diff --git a/src/stories/AddressSearch.stories.js b/src/stories/AddressSearch.stories.js index 35f7e3a07596..8b9223bc5ea2 100644 --- a/src/stories/AddressSearch.stories.js +++ b/src/stories/AddressSearch.stories.js @@ -1,5 +1,5 @@ import React, {useState} from 'react'; -import AddressSearch from '../components/AddressSearch'; +import AddressSearch from '@components/AddressSearch'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/Banner.stories.js b/src/stories/Banner.stories.js index c7c27cb52352..3a6f454843d1 100644 --- a/src/stories/Banner.stories.js +++ b/src/stories/Banner.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import Banner from '../components/Banner'; +import Banner from '@components/Banner'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/Button.stories.js b/src/stories/Button.stories.js index 9fec08800f0a..2bf254b9f382 100644 --- a/src/stories/Button.stories.js +++ b/src/stories/Button.stories.js @@ -1,8 +1,8 @@ /* eslint-disable react/jsx-props-no-spreading */ import React, {useCallback, useState} from 'react'; import {View} from 'react-native'; -import Button from '../components/Button'; -import Text from '../components/Text'; +import Button from '@components/Button'; +import Text from '@components/Text'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/ButtonWithDropdownMenu.stories.js b/src/stories/ButtonWithDropdownMenu.stories.js index 88fa73c20fa1..b87bdc321d45 100644 --- a/src/stories/ButtonWithDropdownMenu.stories.js +++ b/src/stories/ButtonWithDropdownMenu.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import ButtonWithDropdownMenu from '../components/ButtonWithDropdownMenu'; +import ButtonWithDropdownMenu from '@components/ButtonWithDropdownMenu'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/Checkbox.stories.js b/src/stories/Checkbox.stories.js index 4a7de2c29753..fc5b63347c71 100644 --- a/src/stories/Checkbox.stories.js +++ b/src/stories/Checkbox.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import Checkbox from '../components/Checkbox'; +import Checkbox from '@components/Checkbox'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/CheckboxWithLabel.stories.js b/src/stories/CheckboxWithLabel.stories.js index 61ec66a6b2f6..e8d45f434b16 100644 --- a/src/stories/CheckboxWithLabel.stories.js +++ b/src/stories/CheckboxWithLabel.stories.js @@ -1,7 +1,7 @@ import React from 'react'; -import CheckboxWithLabel from '../components/CheckboxWithLabel'; -import Text from '../components/Text'; -import styles from '../styles/styles'; +import CheckboxWithLabel from '@components/CheckboxWithLabel'; +import Text from '@components/Text'; +import styles from '@styles/styles'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/Composer.stories.js b/src/stories/Composer.stories.js index 50039d7d537a..fc817ef2c86d 100644 --- a/src/stories/Composer.stories.js +++ b/src/stories/Composer.stories.js @@ -1,14 +1,14 @@ import ExpensiMark from 'expensify-common/lib/ExpensiMark'; import React, {useState} from 'react'; -import {View, Image} from 'react-native'; -import Composer from '../components/Composer'; -import RenderHTML from '../components/RenderHTML'; -import Text from '../components/Text'; -import styles from '../styles/styles'; -import themeColors from '../styles/themes/default'; -import * as StyleUtils from '../styles/StyleUtils'; -import CONST from '../CONST'; -import withNavigationFallback from '../components/withNavigationFallback'; +import {Image, View} from 'react-native'; +import Composer from '@components/Composer'; +import RenderHTML from '@components/RenderHTML'; +import Text from '@components/Text'; +import withNavigationFallback from '@components/withNavigationFallback'; +import styles from '@styles/styles'; +import * as StyleUtils from '@styles/StyleUtils'; +import themeColors from '@styles/themes/default'; +import CONST from '@src/CONST'; const ComposerWithNavigation = withNavigationFallback(Composer); diff --git a/src/stories/Datepicker.stories.js b/src/stories/Datepicker.stories.js index c4a002c6f88d..65bbec9d7f39 100644 --- a/src/stories/Datepicker.stories.js +++ b/src/stories/Datepicker.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import DatePicker from '../components/DatePicker'; +import DatePicker from '@components/DatePicker'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/DragAndDrop.stories.js b/src/stories/DragAndDrop.stories.js index eb9b6bbed6f2..c594d059b396 100644 --- a/src/stories/DragAndDrop.stories.js +++ b/src/stories/DragAndDrop.stories.js @@ -1,10 +1,10 @@ -import React, {useState} from 'react'; -import {View, Image} from 'react-native'; import lodashGet from 'lodash/get'; -import Text from '../components/Text'; -import DragAndDropProvider from '../components/DragAndDrop/Provider'; -import DragAndDropConsumer from '../components/DragAndDrop/Consumer'; -import styles from '../styles/styles'; +import React, {useState} from 'react'; +import {Image, View} from 'react-native'; +import DragAndDropConsumer from '@components/DragAndDrop/Consumer'; +import DragAndDropProvider from '@components/DragAndDrop/Provider'; +import Text from '@components/Text'; +import styles from '@styles/styles'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/EReceipt.stories.js b/src/stories/EReceipt.stories.js index 56a79e30980b..d4f2b58cb213 100644 --- a/src/stories/EReceipt.stories.js +++ b/src/stories/EReceipt.stories.js @@ -1,8 +1,8 @@ /* eslint-disable rulesdir/prefer-actions-set-data */ import React from 'react'; import Onyx from 'react-native-onyx'; -import EReceipt from '../components/EReceipt'; -import ONYXKEYS from '../ONYXKEYS'; +import EReceipt from '@components/EReceipt'; +import ONYXKEYS from '@src/ONYXKEYS'; const transactionData = { [`${ONYXKEYS.COLLECTION.TRANSACTION}FAKE_1`]: { diff --git a/src/stories/EReceiptThumbail.stories.js b/src/stories/EReceiptThumbail.stories.js index 3d8e79957172..32d9c00851ab 100644 --- a/src/stories/EReceiptThumbail.stories.js +++ b/src/stories/EReceiptThumbail.stories.js @@ -1,7 +1,7 @@ /* eslint-disable react/jsx-props-no-spreading */ import React from 'react'; import {View} from 'react-native'; -import EReceiptThumbnail from '../components/EReceiptThumbnail'; +import EReceiptThumbnail from '@components/EReceiptThumbnail'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/Form.stories.js b/src/stories/Form.stories.js index 3f41edda9992..8bcbaf31b600 100644 --- a/src/stories/Form.stories.js +++ b/src/stories/Form.stories.js @@ -1,18 +1,18 @@ import React, {useState} from 'react'; import {View} from 'react-native'; -import TextInput from '../components/TextInput'; -import Picker from '../components/Picker'; -import StatePicker from '../components/StatePicker'; -import AddressSearch from '../components/AddressSearch'; -import DatePicker from '../components/DatePicker'; -import * as FormActions from '../libs/actions/FormActions'; -import styles from '../styles/styles'; -import CheckboxWithLabel from '../components/CheckboxWithLabel'; -import Text from '../components/Text'; -import NetworkConnection from '../libs/NetworkConnection'; -import CONST from '../CONST'; -import InputWrapper from '../components/Form/InputWrapper'; -import FormProvider from '../components/Form/FormProvider'; +import AddressSearch from '@components/AddressSearch'; +import CheckboxWithLabel from '@components/CheckboxWithLabel'; +import DatePicker from '@components/DatePicker'; +import FormProvider from '@components/Form/FormProvider'; +import InputWrapper from '@components/Form/InputWrapper'; +import Picker from '@components/Picker'; +import StatePicker from '@components/StatePicker'; +import Text from '@components/Text'; +import TextInput from '@components/TextInput'; +import NetworkConnection from '@libs/NetworkConnection'; +import styles from '@styles/styles'; +import * as FormActions from '@userActions/FormActions'; +import CONST from '@src/CONST'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/FormAlertWithSubmitButton.stories.js b/src/stories/FormAlertWithSubmitButton.stories.js index 5ac5404f851d..5d64deb74145 100644 --- a/src/stories/FormAlertWithSubmitButton.stories.js +++ b/src/stories/FormAlertWithSubmitButton.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import FormAlertWithSubmitButton from '../components/FormAlertWithSubmitButton'; +import FormAlertWithSubmitButton from '@components/FormAlertWithSubmitButton'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/Header.stories.js b/src/stories/Header.stories.js index 78250fa2c35d..8560fba4b27f 100644 --- a/src/stories/Header.stories.js +++ b/src/stories/Header.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import Header from '../components/Header'; +import Header from '@components/Header'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/HeaderWithBackButton.stories.js b/src/stories/HeaderWithBackButton.stories.js index f7d361feb8c4..38d816b8fdd2 100644 --- a/src/stories/HeaderWithBackButton.stories.js +++ b/src/stories/HeaderWithBackButton.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import HeaderWithBackButton from '../components/HeaderWithBackButton'; +import HeaderWithBackButton from '@components/HeaderWithBackButton'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/InlineSystemMessage.stories.js b/src/stories/InlineSystemMessage.stories.js index 9a4b034ae35b..b7fe21c8b10e 100644 --- a/src/stories/InlineSystemMessage.stories.js +++ b/src/stories/InlineSystemMessage.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import InlineSystemMessage from '../components/InlineSystemMessage'; +import InlineSystemMessage from '@components/InlineSystemMessage'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/MagicCodeInput.stories.js b/src/stories/MagicCodeInput.stories.js index 1ea746dd44ac..14b234996ce1 100644 --- a/src/stories/MagicCodeInput.stories.js +++ b/src/stories/MagicCodeInput.stories.js @@ -1,5 +1,5 @@ import React, {useState} from 'react'; -import MagicCodeInput from '../components/MagicCodeInput'; +import MagicCodeInput from '@components/MagicCodeInput'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/MenuItem.stories.js b/src/stories/MenuItem.stories.js index 7046617fe2ae..47b74b1f0ef8 100644 --- a/src/stories/MenuItem.stories.js +++ b/src/stories/MenuItem.stories.js @@ -1,7 +1,7 @@ import React from 'react'; -import MenuItem from '../components/MenuItem'; -import Chase from '../../assets/images/bankicons/chase.svg'; -import variables from '../styles/variables'; +import Chase from '@assets/images/bankicons/chase.svg'; +import MenuItem from '@components/MenuItem'; +import variables from '@styles/variables'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/OptionRow.stories.js b/src/stories/OptionRow.stories.js index d5ad27f2d939..3096940dda5f 100644 --- a/src/stories/OptionRow.stories.js +++ b/src/stories/OptionRow.stories.js @@ -1,7 +1,8 @@ import React from 'react'; -import OptionRow from '../components/OptionRow'; -import * as Expensicons from '../components/Icon/Expensicons'; -import OnyxProvider from '../components/OnyxProvider'; +import * as Expensicons from '@components/Icon/Expensicons'; +import OnyxProvider from '@components/OnyxProvider'; +import OptionRow from '@components/OptionRow'; + /* eslint-disable react/jsx-props-no-spreading */ /** diff --git a/src/stories/Picker.stories.js b/src/stories/Picker.stories.js index 19b04f9fa79a..b42cfed8f471 100644 --- a/src/stories/Picker.stories.js +++ b/src/stories/Picker.stories.js @@ -1,5 +1,5 @@ import React, {useState} from 'react'; -import Picker from '../components/Picker'; +import Picker from '@components/Picker'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/PopoverMenu.stories.js b/src/stories/PopoverMenu.stories.js index 5f8fb8994e1f..b860a8343309 100644 --- a/src/stories/PopoverMenu.stories.js +++ b/src/stories/PopoverMenu.stories.js @@ -1,9 +1,9 @@ import React from 'react'; import {SafeAreaProvider} from 'react-native-safe-area-context'; -import PopoverMenu from '../components/PopoverMenu'; -import * as Expensicons from '../components/Icon/Expensicons'; -import MenuItem from '../components/MenuItem'; -import themeColors from '../styles/themes/default'; +import * as Expensicons from '@components/Icon/Expensicons'; +import MenuItem from '@components/MenuItem'; +import PopoverMenu from '@components/PopoverMenu'; +import themeColors from '@styles/themes/default'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/ReportActionItemImages.stories.js b/src/stories/ReportActionItemImages.stories.js index b776d9261e60..fe86f50f7e34 100644 --- a/src/stories/ReportActionItemImages.stories.js +++ b/src/stories/ReportActionItemImages.stories.js @@ -1,6 +1,6 @@ import React from 'react'; -import ReportActionItemImages from '../components/ReportActionItem/ReportActionItemImages'; -import PressableWithoutFeedback from '../components/Pressable/PressableWithoutFeedback'; +import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import ReportActionItemImages from '@components/ReportActionItem/ReportActionItemImages'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/SelectionList.stories.js b/src/stories/SelectionList.stories.js index c4510611306e..28880e1b00d7 100644 --- a/src/stories/SelectionList.stories.js +++ b/src/stories/SelectionList.stories.js @@ -1,10 +1,10 @@ import React, {useMemo, useState} from 'react'; -import _ from 'underscore'; import {View} from 'react-native'; -import SelectionList from '../components/SelectionList'; -import CONST from '../CONST'; -import styles from '../styles/styles'; -import Text from '../components/Text'; +import _ from 'underscore'; +import SelectionList from '@components/SelectionList'; +import Text from '@components/Text'; +import styles from '@styles/styles'; +import CONST from '@src/CONST'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/SubscriptAvatar.stories.js b/src/stories/SubscriptAvatar.stories.js index 08941bd9c19a..9ca055aaa5d8 100644 --- a/src/stories/SubscriptAvatar.stories.js +++ b/src/stories/SubscriptAvatar.stories.js @@ -1,8 +1,8 @@ import React from 'react'; -import SubscriptAvatar from '../components/SubscriptAvatar'; -import * as defaultWorkspaceAvatars from '../components/Icon/WorkspaceDefaultAvatars'; -import * as defaultAvatars from '../components/Icon/DefaultAvatars'; -import CONST from '../CONST'; +import * as defaultAvatars from '@components/Icon/DefaultAvatars'; +import * as defaultWorkspaceAvatars from '@components/Icon/WorkspaceDefaultAvatars'; +import SubscriptAvatar from '@components/SubscriptAvatar'; +import CONST from '@src/CONST'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/TextInput.stories.js b/src/stories/TextInput.stories.js index 098828c65198..dd2fcced68b0 100644 --- a/src/stories/TextInput.stories.js +++ b/src/stories/TextInput.stories.js @@ -1,5 +1,5 @@ import React, {useState} from 'react'; -import TextInput from '../components/TextInput'; +import TextInput from '@components/TextInput'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/stories/Tooltip.stories.js b/src/stories/Tooltip.stories.js index e88c48fcf202..900cd6dedd76 100644 --- a/src/stories/Tooltip.stories.js +++ b/src/stories/Tooltip.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import Tooltip from '../components/Tooltip'; +import Tooltip from '@components/Tooltip'; /** * We use the Component Story Format for writing stories. Follow the docs here: diff --git a/src/styles/StyleUtils.ts b/src/styles/StyleUtils.ts index 48100b2efb60..f58d2c9a236d 100644 --- a/src/styles/StyleUtils.ts +++ b/src/styles/StyleUtils.ts @@ -2,9 +2,10 @@ import {CSSProperties} from 'react'; import {Animated, DimensionValue, ImageStyle, PressableStateCallbackType, TextStyle, ViewStyle} from 'react-native'; import {EdgeInsets} from 'react-native-safe-area-context'; import {ValueOf} from 'type-fest'; -import CONST from '../CONST'; -import * as Browser from '../libs/Browser'; -import * as UserUtils from '../libs/UserUtils'; +import * as Browser from '@libs/Browser'; +import * as UserUtils from '@libs/UserUtils'; +import CONST from '@src/CONST'; +import {Transaction} from '@src/types/onyx'; import colors from './colors'; import fontFamily from './fontFamily'; import styles from './styles'; @@ -13,7 +14,6 @@ import cursor from './utilities/cursor'; import positioning from './utilities/positioning'; import spacing from './utilities/spacing'; import variables from './variables'; -import {Transaction} from '../types/onyx'; type AllStyles = ViewStyle | TextStyle | ImageStyle; type ParsableStyle = AllStyles | ((state: PressableStateCallbackType) => AllStyles); diff --git a/src/styles/ThemeStylesProvider.tsx b/src/styles/ThemeStylesProvider.tsx index 4e6f91baf34a..25ce1f58b65e 100644 --- a/src/styles/ThemeStylesProvider.tsx +++ b/src/styles/ThemeStylesProvider.tsx @@ -1,9 +1,9 @@ /* eslint-disable react/jsx-props-no-spreading */ import React, {useMemo} from 'react'; -import useTheme from './themes/useTheme'; -import ThemeStylesContext from './ThemeStylesContext'; // TODO: Rename this to "styles" once the app is migrated to theme switching hooks and HOCs import {stylesGenerator as stylesUntyped} from './styles'; +import useTheme from './themes/useTheme'; +import ThemeStylesContext from './ThemeStylesContext'; const styles = stylesUntyped; diff --git a/src/styles/addOutlineWidth/index.native.ts b/src/styles/addOutlineWidth/index.native.ts index 69e2ffaf3a5b..4384a3f811e2 100644 --- a/src/styles/addOutlineWidth/index.native.ts +++ b/src/styles/addOutlineWidth/index.native.ts @@ -2,7 +2,6 @@ * Native platforms don't support the "addOutlineWidth" property, so this * function is a no-op */ - import AddOutlineWidth from './types'; const addOutlineWidth: AddOutlineWidth = (obj) => obj; diff --git a/src/styles/addOutlineWidth/index.ts b/src/styles/addOutlineWidth/index.ts index 6fe2ecf85978..5d99e369b79a 100644 --- a/src/styles/addOutlineWidth/index.ts +++ b/src/styles/addOutlineWidth/index.ts @@ -2,8 +2,7 @@ * Web and desktop platforms support the "addOutlineWidth" property, so it * can be added to the object */ - -import themeDefault from '../themes/default'; +import themeDefault from '@styles/themes/default'; import AddOutlineWidth from './types'; /** diff --git a/src/styles/animation/SpinningIndicatorAnimation.js b/src/styles/animation/SpinningIndicatorAnimation.js index 29044f0d127a..1ae4b1518325 100644 --- a/src/styles/animation/SpinningIndicatorAnimation.js +++ b/src/styles/animation/SpinningIndicatorAnimation.js @@ -1,5 +1,5 @@ import {Animated, Easing} from 'react-native'; -import useNativeDriver from '../../libs/useNativeDriver'; +import useNativeDriver from '@libs/useNativeDriver'; class SpinningIndicatorAnimation { constructor() { diff --git a/src/styles/cardStyles/index.ts b/src/styles/cardStyles/index.ts index 1f28ca4f4b78..b5d3c069b73a 100644 --- a/src/styles/cardStyles/index.ts +++ b/src/styles/cardStyles/index.ts @@ -1,4 +1,4 @@ -import positioning from '../utilities/positioning'; +import positioning from '@styles/utilities/positioning'; import GetCardStyles from './types'; /** diff --git a/src/styles/containerComposeStyles/index.native.ts b/src/styles/containerComposeStyles/index.native.ts index ea525dc652cf..9e1398b8176f 100644 --- a/src/styles/containerComposeStyles/index.native.ts +++ b/src/styles/containerComposeStyles/index.native.ts @@ -1,4 +1,4 @@ -import styles from '../styles'; +import styles from '@styles/styles'; import ContainerComposeStyles from './types'; const containerComposeStyles: ContainerComposeStyles = [styles.textInputComposeSpacing]; diff --git a/src/styles/containerComposeStyles/index.ts b/src/styles/containerComposeStyles/index.ts index fbbf35a20818..0e40adda571e 100644 --- a/src/styles/containerComposeStyles/index.ts +++ b/src/styles/containerComposeStyles/index.ts @@ -1,4 +1,4 @@ -import styles from '../styles'; +import styles from '@styles/styles'; import ContainerComposeStyles from './types'; // We need to set paddingVertical = 0 on web to avoid displaying a normal pointer on some parts of compose box when not in focus diff --git a/src/styles/editedLabelStyles/index.ts b/src/styles/editedLabelStyles/index.ts index 5764735d0dea..339c50d8a4df 100644 --- a/src/styles/editedLabelStyles/index.ts +++ b/src/styles/editedLabelStyles/index.ts @@ -1,5 +1,5 @@ -import display from '../utilities/display'; -import flex from '../utilities/flex'; +import display from '@styles/utilities/display'; +import flex from '@styles/utilities/flex'; import EditedLabelStyles from './types'; const editedLabelStyles: EditedLabelStyles = { diff --git a/src/styles/getContextMenuItemStyles/index.js b/src/styles/getContextMenuItemStyles/index.js index 17f4b82f1290..4116ac75ce05 100644 --- a/src/styles/getContextMenuItemStyles/index.js +++ b/src/styles/getContextMenuItemStyles/index.js @@ -1,5 +1,5 @@ -import styles from '../styles'; -import variables from '../variables'; +import styles from '@styles/styles'; +import variables from '@styles/variables'; export default (windowWidth) => { if (windowWidth > variables.mobileResponsiveWidthBreakpoint) { diff --git a/src/styles/getContextMenuItemStyles/index.native.js b/src/styles/getContextMenuItemStyles/index.native.js index aa7ed19a88d7..cbb048a68d2f 100644 --- a/src/styles/getContextMenuItemStyles/index.native.js +++ b/src/styles/getContextMenuItemStyles/index.native.js @@ -1,3 +1,3 @@ -import styles from '../styles'; +import styles from '@styles/styles'; export default () => [styles.popoverMenuItem]; diff --git a/src/styles/getModalStyles.ts b/src/styles/getModalStyles.ts index d52d29568c2d..55f822693b3e 100644 --- a/src/styles/getModalStyles.ts +++ b/src/styles/getModalStyles.ts @@ -1,7 +1,7 @@ import {ViewStyle} from 'react-native'; import {ModalProps} from 'react-native-modal'; import {ValueOf} from 'type-fest'; -import CONST from '../CONST'; +import CONST from '@src/CONST'; import styles from './styles'; import themeColors from './themes/default'; import variables from './variables'; diff --git a/src/styles/getNavigationModalCardStyles/index.desktop.ts b/src/styles/getNavigationModalCardStyles/index.desktop.ts index 75b5636f9bd8..9e182636ad76 100644 --- a/src/styles/getNavigationModalCardStyles/index.desktop.ts +++ b/src/styles/getNavigationModalCardStyles/index.desktop.ts @@ -1,4 +1,4 @@ -import positioning from '../utilities/positioning'; +import positioning from '@styles/utilities/positioning'; import GetNavigationModalCardStyles from './types'; const getNavigationModalCardStyles: GetNavigationModalCardStyles = () => ({ diff --git a/src/styles/getNavigationModalCardStyles/index.website.ts b/src/styles/getNavigationModalCardStyles/index.website.ts index 75b5636f9bd8..9e182636ad76 100644 --- a/src/styles/getNavigationModalCardStyles/index.website.ts +++ b/src/styles/getNavigationModalCardStyles/index.website.ts @@ -1,4 +1,4 @@ -import positioning from '../utilities/positioning'; +import positioning from '@styles/utilities/positioning'; import GetNavigationModalCardStyles from './types'; const getNavigationModalCardStyles: GetNavigationModalCardStyles = () => ({ diff --git a/src/styles/getPopOverVerticalOffset/index.desktop.ts b/src/styles/getPopOverVerticalOffset/index.desktop.ts index d7c02f95b169..3caab6057a4b 100644 --- a/src/styles/getPopOverVerticalOffset/index.desktop.ts +++ b/src/styles/getPopOverVerticalOffset/index.desktop.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import GetPopOverVerticalOffset from './types'; /** Adds the header padding with vertical offset on desktop */ diff --git a/src/styles/optionRowStyles/index.native.ts b/src/styles/optionRowStyles/index.native.ts index 9c13fdd082a4..6198def8219a 100644 --- a/src/styles/optionRowStyles/index.native.ts +++ b/src/styles/optionRowStyles/index.native.ts @@ -1,4 +1,4 @@ -import styles from '../styles'; +import styles from '@styles/styles'; import CompactContentContainerStyles from './types'; /** diff --git a/src/styles/optionRowStyles/index.ts b/src/styles/optionRowStyles/index.ts index 975f4243842e..d0351be24553 100644 --- a/src/styles/optionRowStyles/index.ts +++ b/src/styles/optionRowStyles/index.ts @@ -1,5 +1,5 @@ +import styles from '@styles/styles'; import CompactContentContainerStyles from './types'; -import styles from '../styles'; const compactContentContainerStyles: CompactContentContainerStyles = styles.alignItemsBaseline; diff --git a/src/styles/styles.ts b/src/styles/styles.ts index c5946801abd7..589c3756042f 100644 --- a/src/styles/styles.ts +++ b/src/styles/styles.ts @@ -6,10 +6,11 @@ import {AnimatableNumericValue, Animated, ImageStyle, TextStyle, ViewStyle} from import {CustomAnimation} from 'react-native-animatable'; import {PickerStyle} from 'react-native-picker-select'; import {MixedStyleDeclaration, MixedStyleRecord} from 'react-native-render-html'; -import CONST from '../CONST'; -import * as Browser from '../libs/Browser'; +import * as Browser from '@libs/Browser'; +import CONST from '@src/CONST'; import addOutlineWidth from './addOutlineWidth'; import codeStyles from './codeStyles'; +import colors from './colors'; import fontFamily from './fontFamily'; import fontWeightBold from './fontWeight/bold'; import getPopOverVerticalOffset from './getPopOverVerticalOffset'; @@ -19,14 +20,16 @@ import pointerEventsAuto from './pointerEventsAuto'; import pointerEventsNone from './pointerEventsNone'; import defaultTheme from './themes/default'; import {ThemeDefault} from './themes/types'; +import borders from './utilities/borders'; import cursor from './utilities/cursor'; import display from './utilities/display'; import flex from './utilities/flex'; +import objectFit from './utilities/objectFit'; import overflow from './utilities/overflow'; import positioning from './utilities/positioning'; import sizing from './utilities/sizing'; import spacing from './utilities/spacing'; -import borders from './utilities/borders'; +import textDecorationLine from './utilities/textDecorationLine'; import textUnderline from './utilities/textUnderline'; import userSelect from './utilities/userSelect'; import visibility from './utilities/visibility'; @@ -34,9 +37,6 @@ import whiteSpace from './utilities/whiteSpace'; import wordBreak from './utilities/wordBreak'; import writingDirection from './utilities/writingDirection'; import variables from './variables'; -import colors from './colors'; -import objectFit from './utilities/objectFit'; -import textDecorationLine from './utilities/textDecorationLine'; type AnchorPosition = { horizontal: number; diff --git a/src/styles/themes/ThemeProvider.js b/src/styles/themes/ThemeProvider.js index f4601712a0bc..58d0baedbe06 100644 --- a/src/styles/themes/ThemeProvider.js +++ b/src/styles/themes/ThemeProvider.js @@ -1,12 +1,11 @@ /* eslint-disable react/jsx-props-no-spreading */ -import React, {useMemo} from 'react'; import PropTypes from 'prop-types'; -import ThemeContext from './ThemeContext'; -import useThemePreference from './useThemePreference'; -import CONST from '../../CONST'; - +import React, {useMemo} from 'react'; +import CONST from '@src/CONST'; // Going to eventually import the light theme here too import darkTheme from './default'; +import ThemeContext from './ThemeContext'; +import useThemePreference from './useThemePreference'; const propTypes = { /** Rendered child component */ diff --git a/src/styles/themes/default.ts b/src/styles/themes/default.ts index b46a7aea97c6..98ff8773fb51 100644 --- a/src/styles/themes/default.ts +++ b/src/styles/themes/default.ts @@ -1,5 +1,5 @@ -import SCREENS from '../../SCREENS'; -import colors from '../colors'; +import colors from '@styles/colors'; +import SCREENS from '@src/SCREENS'; import type {ThemeBase} from './types'; const darkTheme = { diff --git a/src/styles/themes/light.ts b/src/styles/themes/light.ts index 6e8a89a7b9d2..624c7df0caa8 100644 --- a/src/styles/themes/light.ts +++ b/src/styles/themes/light.ts @@ -1,5 +1,5 @@ -import SCREENS from '../../SCREENS'; -import colors from '../colors'; +import colors from '@styles/colors'; +import SCREENS from '@src/SCREENS'; import type {ThemeDefault} from './types'; const lightTheme = { diff --git a/src/styles/themes/types.ts b/src/styles/themes/types.ts index 40b8da361654..59e8001d29fe 100644 --- a/src/styles/themes/types.ts +++ b/src/styles/themes/types.ts @@ -1,4 +1,4 @@ -import DeepRecord from '../../types/utils/DeepRecord'; +import DeepRecord from '@src/types/utils/DeepRecord'; import defaultTheme from './default'; type ThemeBase = DeepRecord; diff --git a/src/styles/themes/useThemePreference.js b/src/styles/themes/useThemePreference.js index 579e9dc97c69..8c26ad931d6d 100644 --- a/src/styles/themes/useThemePreference.js +++ b/src/styles/themes/useThemePreference.js @@ -1,7 +1,7 @@ -import {useState, useEffect, useContext} from 'react'; +import {useContext, useEffect, useState} from 'react'; import {Appearance} from 'react-native'; -import CONST from '../../CONST'; -import {PreferredThemeContext} from '../../components/OnyxProvider'; +import {PreferredThemeContext} from '@components/OnyxProvider'; +import CONST from '@src/CONST'; function useThemePreference() { const [themePreference, setThemePreference] = useState(CONST.THEME.DEFAULT); diff --git a/src/styles/utilities/writingDirection.ts b/src/styles/utilities/writingDirection.ts index 1d9a32122373..f3f249796047 100644 --- a/src/styles/utilities/writingDirection.ts +++ b/src/styles/utilities/writingDirection.ts @@ -1,4 +1,5 @@ import {TextStyle} from 'react-native'; + /** * Writing direction utility styles. * Note: writingDirection isn't supported on Android. Unicode controls are being used for Android diff --git a/src/types/modules/react-native-key-command.d.ts b/src/types/modules/react-native-key-command.d.ts index 6af989e33814..5cac93f2a90b 100644 --- a/src/types/modules/react-native-key-command.d.ts +++ b/src/types/modules/react-native-key-command.d.ts @@ -1,29 +1,31 @@ +/* eslint-disable @typescript-eslint/naming-convention */ declare module 'react-native-key-command' { - declare const constants = { - keyInputDownArrow: 'keyInputDownArrow', - keyInputEscape: 'keyInputEscape', - keyInputLeftArrow: 'keyInputLeftArrow', - keyInputRightArrow: 'keyInputRightArrow', - keyInputUpArrow: 'keyInputUpArrow', - keyInputEnter: 'keyInputEnter', - keyModifierCapsLock: 'keyModifierCapsLock', - keyModifierCommand: 'keyModifierCommand', - keyModifierControl: 'keyModifierControl', - keyModifierControlCommand: 'keyModifierControlCommand', - keyModifierControlOption: 'keyModifierControlOption', - keyModifierControlOptionCommand: 'keyModifierControlOptionCommand', - keyModifierNumericPad: 'keyModifierNumericPad', - keyModifierOption: 'keyModifierOption', - keyModifierOptionCommand: 'keyModifierOptionCommand', - keyModifierShift: 'keyModifierShift', - keyModifierShiftCommand: 'keyModifierShiftCommand', - keyModifierShiftControl: 'keyModifierShiftControl', - keyModifierAlternate: 'keyModifierAlternate', - } as const; + // eslint-disable-next-line no-restricted-syntax + enum constants { + keyInputDownArrow = 'keyInputDownArrow', + keyInputEscape = 'keyInputEscape', + keyInputLeftArrow = 'keyInputLeftArrow', + keyInputRightArrow = 'keyInputRightArrow', + keyInputUpArrow = 'keyInputUpArrow', + keyInputEnter = 'keyInputEnter', + keyModifierCapsLock = 'keyModifierCapsLock', + keyModifierCommand = 'keyModifierCommand', + keyModifierControl = 'keyModifierControl', + keyModifierControlCommand = 'keyModifierControlCommand', + keyModifierControlOption = 'keyModifierControlOption', + keyModifierControlOptionCommand = 'keyModifierControlOptionCommand', + keyModifierNumericPad = 'keyModifierNumericPad', + keyModifierOption = 'keyModifierOption', + keyModifierOptionCommand = 'keyModifierOptionCommand', + keyModifierShift = 'keyModifierShift', + keyModifierShiftCommand = 'keyModifierShiftCommand', + keyModifierShiftControl = 'keyModifierShiftControl', + keyModifierAlternate = 'keyModifierAlternate', + } - type KeyCommandEvent = {input: string; modifierFlags?: string}; + type KeyCommand = {input: string; modifierFlags: string}; - declare function addListener(keyCommand: KeyCommandEvent, callback: (keyCommandEvent: KeyCommand, event: KeyboardEvent) => void): () => void; + declare function addListener(keyCommand: KeyCommand, callback: (keycommandEvent: KeyCommand, event: Event) => void): () => void; // eslint-disable-next-line import/prefer-default-export export {constants, addListener}; diff --git a/src/types/modules/react-native-onyx.d.ts b/src/types/modules/react-native-onyx.d.ts index 4979f8fd0dbb..d603b9f93ae8 100644 --- a/src/types/modules/react-native-onyx.d.ts +++ b/src/types/modules/react-native-onyx.d.ts @@ -1,4 +1,4 @@ -import {OnyxKey, OnyxCollectionKey, OnyxValues} from '../../ONYXKEYS'; +import {OnyxCollectionKey, OnyxKey, OnyxValues} from '@src/ONYXKEYS'; declare module 'react-native-onyx' { // eslint-disable-next-line @typescript-eslint/consistent-type-definitions diff --git a/src/types/modules/react-native.d.ts b/src/types/modules/react-native.d.ts index 0659cc4e4b4a..a816fc77625b 100644 --- a/src/types/modules/react-native.d.ts +++ b/src/types/modules/react-native.d.ts @@ -1,9 +1,11 @@ /* eslint-disable @typescript-eslint/naming-convention */ + /* eslint-disable @typescript-eslint/no-empty-interface */ + /* eslint-disable @typescript-eslint/consistent-type-definitions */ import {CSSProperties, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, PointerEventHandler, UIEventHandler, WheelEventHandler} from 'react'; import 'react-native'; -import {BootSplashModule} from '../../libs/BootSplash/types'; +import {BootSplashModule} from '@libs/BootSplash/types'; declare module 'react-native' { // <------ REACT NATIVE WEB (0.19.0) ------> diff --git a/src/types/onyx/Account.ts b/src/types/onyx/Account.ts index 85b0c2359702..c338924bae55 100644 --- a/src/types/onyx/Account.ts +++ b/src/types/onyx/Account.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import * as OnyxCommon from './OnyxCommon'; type TwoFactorAuthStep = ValueOf | ''; diff --git a/src/types/onyx/BankAccount.ts b/src/types/onyx/BankAccount.ts index 58d9654f0c6f..4a7b6dac7387 100644 --- a/src/types/onyx/BankAccount.ts +++ b/src/types/onyx/BankAccount.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import AccountData from './AccountData'; import * as OnyxCommon from './OnyxCommon'; diff --git a/src/types/onyx/Beta.ts b/src/types/onyx/Beta.ts index d40d05a9ed3d..9216946499e8 100644 --- a/src/types/onyx/Beta.ts +++ b/src/types/onyx/Beta.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; type Beta = ValueOf; diff --git a/src/types/onyx/Card.ts b/src/types/onyx/Card.ts index 395515c1ca08..ae4e86212a00 100644 --- a/src/types/onyx/Card.ts +++ b/src/types/onyx/Card.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import * as OnyxCommon from './OnyxCommon'; type Card = { diff --git a/src/types/onyx/Fund.ts b/src/types/onyx/Fund.ts index e27cc0e20e0e..4e6cbc695a8d 100644 --- a/src/types/onyx/Fund.ts +++ b/src/types/onyx/Fund.ts @@ -1,4 +1,4 @@ -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import * as OnyxCommon from './OnyxCommon'; type AdditionalData = { diff --git a/src/types/onyx/OnyxCommon.ts b/src/types/onyx/OnyxCommon.ts index db82edcb98ff..bafd5e8cbbf0 100644 --- a/src/types/onyx/OnyxCommon.ts +++ b/src/types/onyx/OnyxCommon.ts @@ -1,6 +1,6 @@ -import {ValueOf} from 'type-fest'; import * as React from 'react'; -import CONST from '../../CONST'; +import {ValueOf} from 'type-fest'; +import CONST from '@src/CONST'; type PendingAction = ValueOf; diff --git a/src/types/onyx/OriginalMessage.ts b/src/types/onyx/OriginalMessage.ts index cd2bf1bbbe42..014cd67a9a2a 100644 --- a/src/types/onyx/OriginalMessage.ts +++ b/src/types/onyx/OriginalMessage.ts @@ -1,6 +1,6 @@ import {ValueOf} from 'type-fest'; -import CONST from '../../CONST'; -import DeepValueOf from '../utils/DeepValueOf'; +import CONST from '@src/CONST'; +import DeepValueOf from '@src/types/utils/DeepValueOf'; type ActionName = DeepValueOf; diff --git a/src/types/onyx/PaymentMethod.ts b/src/types/onyx/PaymentMethod.ts index 85f3655f49e8..4a9722911bf9 100644 --- a/src/types/onyx/PaymentMethod.ts +++ b/src/types/onyx/PaymentMethod.ts @@ -1,6 +1,6 @@ -import {SvgProps} from 'react-native-svg'; import {CSSProperties} from 'react'; import {ViewStyle} from 'react-native'; +import {SvgProps} from 'react-native-svg'; import BankAccount from './BankAccount'; import Fund from './Fund'; diff --git a/src/types/onyx/PlaidData.ts b/src/types/onyx/PlaidData.ts index a4a6d8e6fe8c..28a1cb324bcb 100644 --- a/src/types/onyx/PlaidData.ts +++ b/src/types/onyx/PlaidData.ts @@ -1,5 +1,5 @@ -import PlaidBankAccount from './PlaidBankAccount'; import * as OnyxCommon from './OnyxCommon'; +import PlaidBankAccount from './PlaidBankAccount'; type PlaidData = { /** Name of the bank */ diff --git a/src/types/onyx/Policy.ts b/src/types/onyx/Policy.ts index e4d77b150a7c..6b115bf0609f 100644 --- a/src/types/onyx/Policy.ts +++ b/src/types/onyx/Policy.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import * as OnyxCommon from './OnyxCommon'; type Policy = { diff --git a/src/types/onyx/ReimbursementAccount.ts b/src/types/onyx/ReimbursementAccount.ts index fc46c9aa3132..75954983371e 100644 --- a/src/types/onyx/ReimbursementAccount.ts +++ b/src/types/onyx/ReimbursementAccount.ts @@ -1,6 +1,6 @@ import {ValueOf} from 'type-fest'; +import CONST from '@src/CONST'; import * as OnyxCommon from './OnyxCommon'; -import CONST from '../../CONST'; type BankAccountStep = ValueOf; diff --git a/src/types/onyx/Report.ts b/src/types/onyx/Report.ts index 494661b2fb89..6fe9b5fd5099 100644 --- a/src/types/onyx/Report.ts +++ b/src/types/onyx/Report.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import * as OnyxCommon from './OnyxCommon'; type Report = { diff --git a/src/types/onyx/Session.ts b/src/types/onyx/Session.ts index 606723f17b82..faaa493b1286 100644 --- a/src/types/onyx/Session.ts +++ b/src/types/onyx/Session.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import * as OnyxCommon from './OnyxCommon'; type AutoAuthState = ValueOf; diff --git a/src/types/onyx/Transaction.ts b/src/types/onyx/Transaction.ts index d0f17cc2cf01..de5f2eec9f9d 100644 --- a/src/types/onyx/Transaction.ts +++ b/src/types/onyx/Transaction.ts @@ -1,6 +1,6 @@ import {ValueOf} from 'type-fest'; +import CONST from '@src/CONST'; import * as OnyxCommon from './OnyxCommon'; -import CONST from '../../CONST'; import RecentWaypoint from './RecentWaypoint'; type Waypoint = { diff --git a/src/types/onyx/UserWallet.ts b/src/types/onyx/UserWallet.ts index aae662f62b6f..501e05a31ad0 100644 --- a/src/types/onyx/UserWallet.ts +++ b/src/types/onyx/UserWallet.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import * as OnyxCommon from './OnyxCommon'; type WalletLinkedAccountType = 'debitCard' | 'bankAccount'; diff --git a/src/types/onyx/WalletTransfer.ts b/src/types/onyx/WalletTransfer.ts index 18b223a0b1ef..e1b1468d6536 100644 --- a/src/types/onyx/WalletTransfer.ts +++ b/src/types/onyx/WalletTransfer.ts @@ -1,5 +1,5 @@ import {ValueOf} from 'type-fest'; -import CONST from '../../CONST'; +import CONST from '@src/CONST'; import * as OnyxCommon from './OnyxCommon'; import PaymentMethod from './PaymentMethod'; diff --git a/src/types/onyx/index.ts b/src/types/onyx/index.ts index b64c1268086e..93a19b39aad3 100644 --- a/src/types/onyx/index.ts +++ b/src/types/onyx/index.ts @@ -1,53 +1,53 @@ import Account from './Account'; -import Request from './Request'; +import AccountData from './AccountData'; +import BankAccount from './BankAccount'; +import Beta from './Beta'; +import BlockedFromConcierge from './BlockedFromConcierge'; +import Card from './Card'; import Credentials from './Credentials'; +import Currency from './Currency'; +import CustomStatusDraft from './CustomStatusDraft'; +import Download from './Download'; +import Form, {AddDebitCardForm} from './Form'; +import FrequentlyUsedEmoji from './FrequentlyUsedEmoji'; +import Fund from './Fund'; import IOU from './IOU'; +import Login from './Login'; +import MapboxAccessToken from './MapboxAccessToken'; import Modal from './Modal'; import Network from './Network'; -import CustomStatusDraft from './CustomStatusDraft'; +import {OnyxUpdateEvent, OnyxUpdatesFromServer} from './OnyxUpdatesFromServer'; +import PersonalBankAccount from './PersonalBankAccount'; import PersonalDetails from './PersonalDetails'; -import PrivatePersonalDetails from './PrivatePersonalDetails'; -import Task from './Task'; -import Currency from './Currency'; -import ScreenShareRequest from './ScreenShareRequest'; -import User from './User'; -import Login from './Login'; -import Session from './Session'; -import Beta from './Beta'; -import BlockedFromConcierge from './BlockedFromConcierge'; import PlaidData from './PlaidData'; -import UserWallet from './UserWallet'; -import WalletOnfido from './WalletOnfido'; -import WalletAdditionalDetails from './WalletAdditionalDetails'; -import WalletTerms from './WalletTerms'; -import BankAccount from './BankAccount'; -import Card from './Card'; -import Fund from './Fund'; -import WalletStatement from './WalletStatement'; -import PersonalBankAccount from './PersonalBankAccount'; -import FrequentlyUsedEmoji from './FrequentlyUsedEmoji'; -import ReimbursementAccount from './ReimbursementAccount'; -import ReimbursementAccountDraft from './ReimbursementAccountDraft'; -import WalletTransfer from './WalletTransfer'; -import MapboxAccessToken from './MapboxAccessToken'; -import {OnyxUpdatesFromServer, OnyxUpdateEvent} from './OnyxUpdatesFromServer'; -import Download from './Download'; -import PolicyMember, {PolicyMembers} from './PolicyMember'; import Policy from './Policy'; import PolicyCategory from './PolicyCategory'; +import PolicyMember, {PolicyMembers} from './PolicyMember'; +import PolicyTag, {PolicyTags} from './PolicyTag'; +import PrivatePersonalDetails from './PrivatePersonalDetails'; +import RecentlyUsedCategories from './RecentlyUsedCategories'; +import RecentlyUsedTags from './RecentlyUsedTags'; +import RecentWaypoint from './RecentWaypoint'; +import ReimbursementAccount from './ReimbursementAccount'; +import ReimbursementAccountDraft from './ReimbursementAccountDraft'; import Report from './Report'; -import ReportMetadata from './ReportMetadata'; import ReportAction, {ReportActions} from './ReportAction'; -import ReportActionsDrafts from './ReportActionsDrafts'; import ReportActionReactions from './ReportActionReactions'; +import ReportActionsDrafts from './ReportActionsDrafts'; +import ReportMetadata from './ReportMetadata'; +import Request from './Request'; +import ScreenShareRequest from './ScreenShareRequest'; import SecurityGroup from './SecurityGroup'; +import Session from './Session'; +import Task from './Task'; import Transaction from './Transaction'; -import Form, {AddDebitCardForm} from './Form'; -import RecentWaypoint from './RecentWaypoint'; -import RecentlyUsedCategories from './RecentlyUsedCategories'; -import RecentlyUsedTags from './RecentlyUsedTags'; -import PolicyTag, {PolicyTags} from './PolicyTag'; -import AccountData from './AccountData'; +import User from './User'; +import UserWallet from './UserWallet'; +import WalletAdditionalDetails from './WalletAdditionalDetails'; +import WalletOnfido from './WalletOnfido'; +import WalletStatement from './WalletStatement'; +import WalletTerms from './WalletTerms'; +import WalletTransfer from './WalletTransfer'; export type { Account, diff --git a/tests/actions/IOUTest.js b/tests/actions/IOUTest.js index 7b780802e9b8..2c6b94a2d7d5 100644 --- a/tests/actions/IOUTest.js +++ b/tests/actions/IOUTest.js @@ -1,24 +1,24 @@ -import _ from 'underscore'; import Onyx from 'react-native-onyx'; +import _ from 'underscore'; import CONST from '../../src/CONST'; -import ONYXKEYS from '../../src/ONYXKEYS'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import * as IOU from '../../src/libs/actions/IOU'; -import * as TestHelper from '../utils/TestHelper'; -import DateUtils from '../../src/libs/DateUtils'; -import * as NumberUtils from '../../src/libs/NumberUtils'; -import * as ReportActions from '../../src/libs/actions/ReportActions'; -import * as ReportUtils from '../../src/libs/ReportUtils'; -import * as Report from '../../src/libs/actions/Report'; import OnyxUpdateManager from '../../src/libs/actions/OnyxUpdateManager'; -import waitForNetworkPromises from '../utils/waitForNetworkPromises'; -import * as ReportActionsUtils from '../../src/libs/ReportActionsUtils'; import * as PolicyActions from '../../src/libs/actions/Policy'; -import * as PersonalDetailsUtils from '../../src/libs/PersonalDetailsUtils'; +import * as Report from '../../src/libs/actions/Report'; +import * as ReportActions from '../../src/libs/actions/ReportActions'; import * as User from '../../src/libs/actions/User'; -import PusherHelper from '../utils/PusherHelper'; +import DateUtils from '../../src/libs/DateUtils'; import Navigation from '../../src/libs/Navigation/Navigation'; +import * as NumberUtils from '../../src/libs/NumberUtils'; +import * as PersonalDetailsUtils from '../../src/libs/PersonalDetailsUtils'; +import * as ReportActionsUtils from '../../src/libs/ReportActionsUtils'; +import * as ReportUtils from '../../src/libs/ReportUtils'; +import ONYXKEYS from '../../src/ONYXKEYS'; import ROUTES from '../../src/ROUTES'; +import PusherHelper from '../utils/PusherHelper'; +import * as TestHelper from '../utils/TestHelper'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; +import waitForNetworkPromises from '../utils/waitForNetworkPromises'; jest.mock('../../src/libs/Navigation/Navigation', () => ({ navigate: jest.fn(), diff --git a/tests/actions/ReportTest.js b/tests/actions/ReportTest.js index 025c226b3fb8..a94db507637b 100644 --- a/tests/actions/ReportTest.js +++ b/tests/actions/ReportTest.js @@ -1,23 +1,23 @@ -import _ from 'underscore'; -import Onyx from 'react-native-onyx'; -import lodashGet from 'lodash/get'; +import {afterEach, beforeAll, beforeEach, describe, expect, it} from '@jest/globals'; import {utcToZonedTime} from 'date-fns-tz'; -import {beforeEach, beforeAll, afterEach, describe, it, expect} from '@jest/globals'; -import ONYXKEYS from '../../src/ONYXKEYS'; +import lodashGet from 'lodash/get'; +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; import CONST from '../../src/CONST'; -import * as Report from '../../src/libs/actions/Report'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; -import PusherHelper from '../utils/PusherHelper'; -import * as TestHelper from '../utils/TestHelper'; -import Log from '../../src/libs/Log'; +import OnyxUpdateManager from '../../src/libs/actions/OnyxUpdateManager'; import * as PersistedRequests from '../../src/libs/actions/PersistedRequests'; +import * as Report from '../../src/libs/actions/Report'; import * as User from '../../src/libs/actions/User'; -import * as ReportUtils from '../../src/libs/ReportUtils'; import DateUtils from '../../src/libs/DateUtils'; +import Log from '../../src/libs/Log'; import * as SequentialQueue from '../../src/libs/Network/SequentialQueue'; -import OnyxUpdateManager from '../../src/libs/actions/OnyxUpdateManager'; -import waitForNetworkPromises from '../utils/waitForNetworkPromises'; +import * as ReportUtils from '../../src/libs/ReportUtils'; +import ONYXKEYS from '../../src/ONYXKEYS'; import getIsUsingFakeTimers from '../utils/getIsUsingFakeTimers'; +import PusherHelper from '../utils/PusherHelper'; +import * as TestHelper from '../utils/TestHelper'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; +import waitForNetworkPromises from '../utils/waitForNetworkPromises'; const UTC = 'UTC'; jest.mock('../../src/libs/actions/Report', () => { diff --git a/tests/actions/SessionTest.js b/tests/actions/SessionTest.js index 4ecb2a33b763..f7d7f8ed5835 100644 --- a/tests/actions/SessionTest.js +++ b/tests/actions/SessionTest.js @@ -1,17 +1,16 @@ -import Onyx from 'react-native-onyx'; import {beforeEach, jest, test} from '@jest/globals'; -import HttpUtils from '../../src/libs/HttpUtils'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; -import ONYXKEYS from '../../src/ONYXKEYS'; -import * as TestHelper from '../utils/TestHelper'; +import Onyx from 'react-native-onyx'; import CONST from '../../src/CONST'; -import PushNotification from '../../src/libs/Notification/PushNotification'; import * as App from '../../src/libs/actions/App'; import OnyxUpdateManager from '../../src/libs/actions/OnyxUpdateManager'; - +import HttpUtils from '../../src/libs/HttpUtils'; +import PushNotification from '../../src/libs/Notification/PushNotification'; // This lib needs to be imported, but it has nothing to export since all it contains is an Onyx connection // eslint-disable-next-line no-unused-vars import subscribePushNotification from '../../src/libs/Notification/PushNotification/subscribePushNotification'; +import ONYXKEYS from '../../src/ONYXKEYS'; +import * as TestHelper from '../utils/TestHelper'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; // We are mocking this method so that we can later test to see if it was called and what arguments it was called with. // We test HttpUtils.xhr() since this means that our API command turned into a network request and isn't only queued. diff --git a/tests/perf-test/ReportActionsList.perf-test.js b/tests/perf-test/ReportActionsList.perf-test.js index dcd40dd1e03f..f4dcd969923f 100644 --- a/tests/perf-test/ReportActionsList.perf-test.js +++ b/tests/perf-test/ReportActionsList.perf-test.js @@ -1,20 +1,20 @@ -import {measurePerformance} from 'reassure'; +import {fireEvent, screen} from '@testing-library/react-native'; import Onyx from 'react-native-onyx'; -import {screen, fireEvent} from '@testing-library/react-native'; -import ReportActionsList from '../../src/pages/home/report/ReportActionsList'; +import {measurePerformance} from 'reassure'; import ComposeProviders from '../../src/components/ComposeProviders'; +import {LocaleContextProvider} from '../../src/components/LocaleContextProvider'; import OnyxProvider from '../../src/components/OnyxProvider'; -import {ReportAttachmentsProvider} from '../../src/pages/home/report/ReportAttachmentsContext'; import {WindowDimensionsProvider} from '../../src/components/withWindowDimensions'; -import {LocaleContextProvider} from '../../src/components/LocaleContextProvider'; +import * as Localize from '../../src/libs/Localize'; +import ONYXKEYS from '../../src/ONYXKEYS'; +import ReportActionsList from '../../src/pages/home/report/ReportActionsList'; +import {ReportAttachmentsProvider} from '../../src/pages/home/report/ReportAttachmentsContext'; +import {ActionListContext, ReactionListContext} from '../../src/pages/home/ReportScreenContext'; +import variables from '../../src/styles/variables'; import * as LHNTestUtils from '../utils/LHNTestUtils'; +import PusherHelper from '../utils/PusherHelper'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; -import PusherHelper from '../utils/PusherHelper'; -import variables from '../../src/styles/variables'; -import {ActionListContext, ReactionListContext} from '../../src/pages/home/ReportScreenContext'; -import ONYXKEYS from '../../src/ONYXKEYS'; -import * as Localize from '../../src/libs/Localize'; jest.setTimeout(60000); diff --git a/tests/perf-test/SelectionList.perf-test.js b/tests/perf-test/SelectionList.perf-test.js index e78970a04012..f8e358db9d5c 100644 --- a/tests/perf-test/SelectionList.perf-test.js +++ b/tests/perf-test/SelectionList.perf-test.js @@ -1,6 +1,6 @@ +import {fireEvent} from '@testing-library/react-native'; import React, {useState} from 'react'; import {measurePerformance} from 'reassure'; -import {fireEvent} from '@testing-library/react-native'; import _ from 'underscore'; import SelectionList from '../../src/components/SelectionList'; import variables from '../../src/styles/variables'; diff --git a/tests/perf-test/SidebarLinks.perf-test.js b/tests/perf-test/SidebarLinks.perf-test.js index 7c2d91b3356c..f6819d40a48f 100644 --- a/tests/perf-test/SidebarLinks.perf-test.js +++ b/tests/perf-test/SidebarLinks.perf-test.js @@ -1,13 +1,13 @@ -import {measurePerformance} from 'reassure'; -import Onyx from 'react-native-onyx'; import {fireEvent, screen} from '@testing-library/react-native'; +import Onyx from 'react-native-onyx'; +import {measurePerformance} from 'reassure'; import _ from 'underscore'; -import * as LHNTestUtils from '../utils/LHNTestUtils'; import CONST from '../../src/CONST'; import ONYXKEYS from '../../src/ONYXKEYS'; +import variables from '../../src/styles/variables'; +import * as LHNTestUtils from '../utils/LHNTestUtils'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; -import variables from '../../src/styles/variables'; /** * Performance tests with Reassure can require big timeouts as all runs diff --git a/tests/ui/UnreadIndicatorsTest.js b/tests/ui/UnreadIndicatorsTest.js index 5615e0b67729..54808d2b618d 100644 --- a/tests/ui/UnreadIndicatorsTest.js +++ b/tests/ui/UnreadIndicatorsTest.js @@ -1,29 +1,29 @@ -import React from 'react'; -import Onyx from 'react-native-onyx'; -import {Linking, AppState} from 'react-native'; import {fireEvent, render, screen, waitFor} from '@testing-library/react-native'; -import lodashGet from 'lodash/get'; -import {subMinutes, format, addSeconds, subSeconds} from 'date-fns'; +import {addSeconds, format, subMinutes, subSeconds} from 'date-fns'; import {utcToZonedTime} from 'date-fns-tz'; +import lodashGet from 'lodash/get'; +import React from 'react'; +import {AppState, Linking} from 'react-native'; +import Onyx from 'react-native-onyx'; import App from '../../src/App'; +import CONFIG from '../../src/CONFIG'; import CONST from '../../src/CONST'; -import ONYXKEYS from '../../src/ONYXKEYS'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; -import waitForBatchedUpdatesWithAct from '../utils/waitForBatchedUpdatesWithAct'; -import * as TestHelper from '../utils/TestHelper'; -import appSetup from '../../src/setup'; -import fontWeightBold from '../../src/styles/fontWeight/bold'; import * as AppActions from '../../src/libs/actions/App'; -import * as NumberUtils from '../../src/libs/NumberUtils'; -import LocalNotification from '../../src/libs/Notification/LocalNotification'; import * as Report from '../../src/libs/actions/Report'; +import * as User from '../../src/libs/actions/User'; import * as CollectionUtils from '../../src/libs/CollectionUtils'; import DateUtils from '../../src/libs/DateUtils'; -import * as User from '../../src/libs/actions/User'; +import * as Localize from '../../src/libs/Localize'; +import LocalNotification from '../../src/libs/Notification/LocalNotification'; +import * as NumberUtils from '../../src/libs/NumberUtils'; import * as Pusher from '../../src/libs/Pusher/pusher'; import PusherConnectionManager from '../../src/libs/PusherConnectionManager'; -import CONFIG from '../../src/CONFIG'; -import * as Localize from '../../src/libs/Localize'; +import ONYXKEYS from '../../src/ONYXKEYS'; +import appSetup from '../../src/setup'; +import fontWeightBold from '../../src/styles/fontWeight/bold'; +import * as TestHelper from '../utils/TestHelper'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; +import waitForBatchedUpdatesWithAct from '../utils/waitForBatchedUpdatesWithAct'; // We need a large timeout here as we are lazy loading React Navigation screens and this test is running against the entire mounted App jest.setTimeout(30000); diff --git a/tests/unit/APITest.js b/tests/unit/APITest.js index 395f1438b666..474ccbf36328 100644 --- a/tests/unit/APITest.js +++ b/tests/unit/APITest.js @@ -1,18 +1,17 @@ import Onyx from 'react-native-onyx'; import _ from 'underscore'; - -import * as TestHelper from '../utils/TestHelper'; -import HttpUtils from '../../src/libs/HttpUtils'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; -import ONYXKEYS from '../../src/ONYXKEYS'; import CONST from '../../src/CONST'; -import * as NetworkStore from '../../src/libs/Network/NetworkStore'; import * as PersistedRequests from '../../src/libs/actions/PersistedRequests'; -import * as MainQueue from '../../src/libs/Network/MainQueue'; import * as API from '../../src/libs/API'; +import HttpUtils from '../../src/libs/HttpUtils'; +import * as MainQueue from '../../src/libs/Network/MainQueue'; +import * as NetworkStore from '../../src/libs/Network/NetworkStore'; import * as SequentialQueue from '../../src/libs/Network/SequentialQueue'; import * as Request from '../../src/libs/Request'; import * as RequestThrottle from '../../src/libs/RequestThrottle'; +import ONYXKEYS from '../../src/ONYXKEYS'; +import * as TestHelper from '../utils/TestHelper'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import waitForNetworkPromises from '../utils/waitForNetworkPromises'; jest.mock('../../src/libs/Log'); diff --git a/tests/unit/CalendarPickerTest.js b/tests/unit/CalendarPickerTest.js index 3b3b123cd946..5d0c22459710 100644 --- a/tests/unit/CalendarPickerTest.js +++ b/tests/unit/CalendarPickerTest.js @@ -1,8 +1,8 @@ -import {render, fireEvent, within} from '@testing-library/react-native'; -import {format, eachMonthOfInterval, subYears, addYears} from 'date-fns'; -import DateUtils from '../../src/libs/DateUtils'; +import {fireEvent, render, within} from '@testing-library/react-native'; +import {addYears, eachMonthOfInterval, format, subYears} from 'date-fns'; import CalendarPicker from '../../src/components/NewDatePicker/CalendarPicker'; import CONST from '../../src/CONST'; +import DateUtils from '../../src/libs/DateUtils'; DateUtils.setLocale(CONST.LOCALES.EN); const fullYear = new Date().getFullYear(); diff --git a/tests/unit/CurrencyUtilsTest.js b/tests/unit/CurrencyUtilsTest.js index ba61775f30da..89e1e2ffb3be 100644 --- a/tests/unit/CurrencyUtilsTest.js +++ b/tests/unit/CurrencyUtilsTest.js @@ -1,11 +1,10 @@ -import _ from 'underscore'; import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../src/ONYXKEYS'; +import _ from 'underscore'; import CONST from '../../src/CONST'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import * as CurrencyUtils from '../../src/libs/CurrencyUtils'; import LocaleListener from '../../src/libs/Localize/LocaleListener'; - +import ONYXKEYS from '../../src/ONYXKEYS'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; // This file can get outdated. In that case, you can follow these steps to update it: // - open your browser console and navigate to the Network tab // - refresh the App diff --git a/tests/unit/DateUtilsTest.js b/tests/unit/DateUtilsTest.js index 91590eb955b2..4b76e0f496c8 100644 --- a/tests/unit/DateUtilsTest.js +++ b/tests/unit/DateUtilsTest.js @@ -1,6 +1,6 @@ -import Onyx from 'react-native-onyx'; +import {addDays, addMinutes, format, setHours, setMinutes, subDays, subHours, subMinutes, subSeconds} from 'date-fns'; import {format as tzFormat, utcToZonedTime} from 'date-fns-tz'; -import {addMinutes, subHours, subMinutes, subSeconds, format, setMinutes, setHours, subDays, addDays} from 'date-fns'; +import Onyx from 'react-native-onyx'; import CONST from '../../src/CONST'; import DateUtils from '../../src/libs/DateUtils'; import ONYXKEYS from '../../src/ONYXKEYS'; diff --git a/tests/unit/EmojiTest.js b/tests/unit/EmojiTest.js index d10da618480e..4da29027de86 100644 --- a/tests/unit/EmojiTest.js +++ b/tests/unit/EmojiTest.js @@ -1,14 +1,14 @@ -import _ from 'underscore'; import {getUnixTime} from 'date-fns'; -import Onyx from 'react-native-onyx'; import lodashGet from 'lodash/get'; +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; import Emoji from '../../assets/emojis'; +import CONST from '../../src/CONST'; +import * as User from '../../src/libs/actions/User'; import * as EmojiUtils from '../../src/libs/EmojiUtils'; import ONYXKEYS from '../../src/ONYXKEYS'; -import * as User from '../../src/libs/actions/User'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import * as TestHelper from '../utils/TestHelper'; -import CONST from '../../src/CONST'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; describe('EmojiTest', () => { it('matches all the emojis in the list', () => { diff --git a/tests/unit/IOUUtilsTest.js b/tests/unit/IOUUtilsTest.js index 9785acf68317..ac04b74a0ca5 100644 --- a/tests/unit/IOUUtilsTest.js +++ b/tests/unit/IOUUtilsTest.js @@ -1,10 +1,10 @@ import Onyx from 'react-native-onyx'; import * as IOUUtils from '../../src/libs/IOUUtils'; import * as ReportUtils from '../../src/libs/ReportUtils'; +import * as TransactionUtils from '../../src/libs/TransactionUtils'; import ONYXKEYS from '../../src/ONYXKEYS'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import currencyList from './currencyList.json'; -import * as TransactionUtils from '../../src/libs/TransactionUtils'; function initCurrencyList() { Onyx.init({ diff --git a/tests/unit/LocalePhoneNumberTest.js b/tests/unit/LocalePhoneNumberTest.js index 1435e0819fa4..99f53e7f980a 100644 --- a/tests/unit/LocalePhoneNumberTest.js +++ b/tests/unit/LocalePhoneNumberTest.js @@ -1,6 +1,6 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../src/ONYXKEYS'; import * as LocalePhoneNumber from '../../src/libs/LocalePhoneNumber'; +import ONYXKEYS from '../../src/ONYXKEYS'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; const ES_NUMBER = '+34702474537'; diff --git a/tests/unit/LocalizeTests.js b/tests/unit/LocalizeTests.js index 921cf158a47c..4c89d587fc06 100644 --- a/tests/unit/LocalizeTests.js +++ b/tests/unit/LocalizeTests.js @@ -1,8 +1,8 @@ import Onyx from 'react-native-onyx'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import CONST from '../../src/CONST'; -import ONYXKEYS from '../../src/ONYXKEYS'; import * as Localize from '../../src/libs/Localize'; +import ONYXKEYS from '../../src/ONYXKEYS'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; describe('localize', () => { beforeAll(() => { diff --git a/tests/unit/LoginUtilsTest.js b/tests/unit/LoginUtilsTest.js index e49d710b8f49..b27ffdbb3897 100644 --- a/tests/unit/LoginUtilsTest.js +++ b/tests/unit/LoginUtilsTest.js @@ -1,7 +1,7 @@ import Onyx from 'react-native-onyx'; +import * as LoginUtils from '../../src/libs/LoginUtils'; import ONYXKEYS from '../../src/ONYXKEYS'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; -import * as LoginUtils from '../../src/libs/LoginUtils'; describe('LoginUtils', () => { beforeAll(() => { diff --git a/tests/unit/MiddlewareTest.js b/tests/unit/MiddlewareTest.js index db020ea924ed..85148cdb40e0 100644 --- a/tests/unit/MiddlewareTest.js +++ b/tests/unit/MiddlewareTest.js @@ -1,12 +1,12 @@ import Onyx from 'react-native-onyx'; +import HttpUtils from '../../src/libs/HttpUtils'; +import * as MainQueue from '../../src/libs/Network/MainQueue'; import * as NetworkStore from '../../src/libs/Network/NetworkStore'; -import * as Request from '../../src/libs/Request'; import * as SequentialQueue from '../../src/libs/Network/SequentialQueue'; +import * as Request from '../../src/libs/Request'; +import ONYXKEYS from '../../src/ONYXKEYS'; import * as TestHelper from '../utils/TestHelper'; import waitForNetworkPromises from '../utils/waitForNetworkPromises'; -import ONYXKEYS from '../../src/ONYXKEYS'; -import * as MainQueue from '../../src/libs/Network/MainQueue'; -import HttpUtils from '../../src/libs/HttpUtils'; Onyx.init({ keys: ONYXKEYS, diff --git a/tests/unit/MigrationTest.js b/tests/unit/MigrationTest.js index 3139f7efc97f..4bd739a08a59 100644 --- a/tests/unit/MigrationTest.js +++ b/tests/unit/MigrationTest.js @@ -1,11 +1,11 @@ import Onyx from 'react-native-onyx'; import _ from 'underscore'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import Log from '../../src/libs/Log'; -import PersonalDetailsByAccountID from '../../src/libs/migrations/PersonalDetailsByAccountID'; import CheckForPreviousReportActionID from '../../src/libs/migrations/CheckForPreviousReportActionID'; import KeyReportActionsDraftByReportActionID from '../../src/libs/migrations/KeyReportActionsDraftByReportActionID'; +import PersonalDetailsByAccountID from '../../src/libs/migrations/PersonalDetailsByAccountID'; import ONYXKEYS from '../../src/ONYXKEYS'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; jest.mock('../../src/libs/getPlatform'); diff --git a/tests/unit/NetworkTest.js b/tests/unit/NetworkTest.js index bd45ae3c2187..9a90a100769f 100644 --- a/tests/unit/NetworkTest.js +++ b/tests/unit/NetworkTest.js @@ -1,20 +1,19 @@ -import _ from 'underscore'; import Onyx from 'react-native-onyx'; - -import * as TestHelper from '../utils/TestHelper'; -import HttpUtils from '../../src/libs/HttpUtils'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; -import ONYXKEYS from '../../src/ONYXKEYS'; +import _ from 'underscore'; import CONST from '../../src/CONST'; -import * as Network from '../../src/libs/Network'; -import * as NetworkStore from '../../src/libs/Network/NetworkStore'; -import * as Session from '../../src/libs/actions/Session'; +import * as App from '../../src/libs/actions/App'; +import OnyxUpdateManager from '../../src/libs/actions/OnyxUpdateManager'; import * as PersistedRequests from '../../src/libs/actions/PersistedRequests'; +import * as Session from '../../src/libs/actions/Session'; +import HttpUtils from '../../src/libs/HttpUtils'; import Log from '../../src/libs/Log'; +import * as Network from '../../src/libs/Network'; import * as MainQueue from '../../src/libs/Network/MainQueue'; -import * as App from '../../src/libs/actions/App'; +import * as NetworkStore from '../../src/libs/Network/NetworkStore'; import NetworkConnection from '../../src/libs/NetworkConnection'; -import OnyxUpdateManager from '../../src/libs/actions/OnyxUpdateManager'; +import ONYXKEYS from '../../src/ONYXKEYS'; +import * as TestHelper from '../utils/TestHelper'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; jest.mock('../../src/libs/Log'); diff --git a/tests/unit/OptionsListUtilsTest.js b/tests/unit/OptionsListUtilsTest.js index 7a9fbb558455..5d18608a3de4 100644 --- a/tests/unit/OptionsListUtilsTest.js +++ b/tests/unit/OptionsListUtilsTest.js @@ -1,11 +1,11 @@ -import _ from 'underscore'; -import Onyx from 'react-native-onyx'; import {View} from 'react-native'; +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; +import CONST from '../../src/CONST'; import * as OptionsListUtils from '../../src/libs/OptionsListUtils'; import * as ReportUtils from '../../src/libs/ReportUtils'; import ONYXKEYS from '../../src/ONYXKEYS'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; -import CONST from '../../src/CONST'; describe('OptionsListUtils', () => { // Given a set of reports with both single participants and multiple participants some pinned and some not diff --git a/tests/unit/ReportActionItemSingleTest.js b/tests/unit/ReportActionItemSingleTest.js index d6b46eb55414..55cae01c19f1 100644 --- a/tests/unit/ReportActionItemSingleTest.js +++ b/tests/unit/ReportActionItemSingleTest.js @@ -1,5 +1,5 @@ -import Onyx from 'react-native-onyx'; import {cleanup, screen} from '@testing-library/react-native'; +import Onyx from 'react-native-onyx'; import * as LHNTestUtils from '../utils/LHNTestUtils'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; diff --git a/tests/unit/ReportActionsUtilsTest.js b/tests/unit/ReportActionsUtilsTest.js index 2f02203bad64..9973515c44de 100644 --- a/tests/unit/ReportActionsUtilsTest.js +++ b/tests/unit/ReportActionsUtilsTest.js @@ -1,10 +1,10 @@ import Onyx from 'react-native-onyx'; import CONST from '../../src/CONST'; +import * as ReportActionsUtils from '../../src/libs/ReportActionsUtils'; import ONYXKEYS from '../../src/ONYXKEYS'; +import * as LHNTestUtils from '../utils/LHNTestUtils'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; -import * as ReportActionsUtils from '../../src/libs/ReportActionsUtils'; -import * as LHNTestUtils from '../utils/LHNTestUtils'; describe('ReportActionsUtils', () => { beforeAll(() => diff --git a/tests/unit/ReportUtilsTest.js b/tests/unit/ReportUtilsTest.js index 26257b469939..2b836f8eb0bf 100644 --- a/tests/unit/ReportUtilsTest.js +++ b/tests/unit/ReportUtilsTest.js @@ -1,10 +1,10 @@ import Onyx from 'react-native-onyx'; import _ from 'underscore'; import CONST from '../../src/CONST'; -import ONYXKEYS from '../../src/ONYXKEYS'; import * as ReportUtils from '../../src/libs/ReportUtils'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; +import ONYXKEYS from '../../src/ONYXKEYS'; import * as LHNTestUtils from '../utils/LHNTestUtils'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; // Be sure to include the mocked permissions library or else the beta tests won't work jest.mock('../../src/libs/Permissions'); diff --git a/tests/unit/RequestTest.js b/tests/unit/RequestTest.js index fb1032e70cfe..823b05fd4e0e 100644 --- a/tests/unit/RequestTest.js +++ b/tests/unit/RequestTest.js @@ -1,6 +1,6 @@ import * as Request from '../../src/libs/Request'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import * as TestHelper from '../utils/TestHelper'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; beforeAll(() => { global.fetch = TestHelper.getGlobalFetchMock(); diff --git a/tests/unit/SidebarFilterTest.js b/tests/unit/SidebarFilterTest.js index 18e499d89293..23a958e3aa9d 100644 --- a/tests/unit/SidebarFilterTest.js +++ b/tests/unit/SidebarFilterTest.js @@ -1,12 +1,12 @@ import {cleanup, screen} from '@testing-library/react-native'; -import Onyx from 'react-native-onyx'; import lodashGet from 'lodash/get'; -import * as LHNTestUtils from '../utils/LHNTestUtils'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; -import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; +import Onyx from 'react-native-onyx'; import CONST from '../../src/CONST'; import DateUtils from '../../src/libs/DateUtils'; import * as Localize from '../../src/libs/Localize'; +import * as LHNTestUtils from '../utils/LHNTestUtils'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; +import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; // Be sure to include the mocked permissions library or else the beta tests won't work jest.mock('../../src/libs/Permissions'); diff --git a/tests/unit/SidebarOrderTest.js b/tests/unit/SidebarOrderTest.js index 4a693d679b86..72b3a0c2f631 100644 --- a/tests/unit/SidebarOrderTest.js +++ b/tests/unit/SidebarOrderTest.js @@ -1,13 +1,13 @@ -import Onyx from 'react-native-onyx'; import {cleanup, screen} from '@testing-library/react-native'; import lodashGet from 'lodash/get'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; -import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; -import * as LHNTestUtils from '../utils/LHNTestUtils'; +import Onyx from 'react-native-onyx'; import CONST from '../../src/CONST'; +import * as Report from '../../src/libs/actions/Report'; import DateUtils from '../../src/libs/DateUtils'; import * as Localize from '../../src/libs/Localize'; -import * as Report from '../../src/libs/actions/Report'; +import * as LHNTestUtils from '../utils/LHNTestUtils'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; +import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; // Be sure to include the mocked Permissions and Expensicons libraries or else the beta tests won't work jest.mock('../../src/libs/Permissions'); diff --git a/tests/unit/SidebarTest.js b/tests/unit/SidebarTest.js index 1b5daa323da5..4bd0795aa3b9 100644 --- a/tests/unit/SidebarTest.js +++ b/tests/unit/SidebarTest.js @@ -1,11 +1,11 @@ -import Onyx from 'react-native-onyx'; import {cleanup, screen} from '@testing-library/react-native'; import lodashGet from 'lodash/get'; -import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; -import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; -import * as LHNTestUtils from '../utils/LHNTestUtils'; +import Onyx from 'react-native-onyx'; import CONST from '../../src/CONST'; import * as Localize from '../../src/libs/Localize'; +import * as LHNTestUtils from '../utils/LHNTestUtils'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; +import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates'; // Be sure to include the mocked Permissions and Expensicons libraries or else the beta tests won't work jest.mock('../../src/libs/Permissions'); diff --git a/tests/unit/ValidationUtilsTest.js b/tests/unit/ValidationUtilsTest.js index a9e0b1b61128..bdc1f11948ae 100644 --- a/tests/unit/ValidationUtilsTest.js +++ b/tests/unit/ValidationUtilsTest.js @@ -1,4 +1,4 @@ -import {addDays, format, subYears, startOfDay} from 'date-fns'; +import {addDays, format, startOfDay, subYears} from 'date-fns'; import CONST from '../../src/CONST'; const ValidationUtils = require('../../src/libs/ValidationUtils'); diff --git a/tests/unit/enhanceParametersTest.js b/tests/unit/enhanceParametersTest.js index fb2ccc86ad79..513206b42614 100644 --- a/tests/unit/enhanceParametersTest.js +++ b/tests/unit/enhanceParametersTest.js @@ -1,8 +1,8 @@ import Onyx from 'react-native-onyx'; -import ONYXKEYS from '../../src/ONYXKEYS'; +import CONFIG from '../../src/CONFIG'; import enhanceParameters from '../../src/libs/Network/enhanceParameters'; +import ONYXKEYS from '../../src/ONYXKEYS'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; -import CONFIG from '../../src/CONFIG'; beforeEach(() => Onyx.clear()); diff --git a/tests/unit/loginTest.js b/tests/unit/loginTest.js index c8bcc6c6f00f..a1b59cfcb998 100644 --- a/tests/unit/loginTest.js +++ b/tests/unit/loginTest.js @@ -1,10 +1,8 @@ /** * @format */ - -import 'react-native'; import React from 'react'; - +import 'react-native'; // Note: `react-test-renderer` renderer must be required after react-native. import renderer from 'react-test-renderer'; import App from '../../src/App'; diff --git a/tests/utils/LHNTestUtils.js b/tests/utils/LHNTestUtils.js index 6e7d4390b4e9..9898063cc496 100644 --- a/tests/utils/LHNTestUtils.js +++ b/tests/utils/LHNTestUtils.js @@ -1,17 +1,17 @@ -import React from 'react'; -import PropTypes from 'prop-types'; import {render} from '@testing-library/react-native'; +import PropTypes from 'prop-types'; +import React from 'react'; import ComposeProviders from '../../src/components/ComposeProviders'; -import OnyxProvider from '../../src/components/OnyxProvider'; import {LocaleContextProvider} from '../../src/components/LocaleContextProvider'; -import SidebarLinksData from '../../src/pages/home/sidebar/SidebarLinksData'; -import ReportActionItemSingle from '../../src/pages/home/report/ReportActionItemSingle'; -import {EnvironmentProvider} from '../../src/components/withEnvironment'; +import OnyxProvider from '../../src/components/OnyxProvider'; import {CurrentReportIDContextProvider} from '../../src/components/withCurrentReportID'; +import {EnvironmentProvider} from '../../src/components/withEnvironment'; import CONST from '../../src/CONST'; import DateUtils from '../../src/libs/DateUtils'; -import reportPropTypes from '../../src/pages/reportPropTypes'; +import ReportActionItemSingle from '../../src/pages/home/report/ReportActionItemSingle'; import reportActionPropTypes from '../../src/pages/home/report/reportActionPropTypes'; +import SidebarLinksData from '../../src/pages/home/sidebar/SidebarLinksData'; +import reportPropTypes from '../../src/pages/reportPropTypes'; // we have to mock `useIsFocused` because it's used in the SidebarLinks component const mockedNavigate = jest.fn(); diff --git a/tests/utils/PusherHelper.js b/tests/utils/PusherHelper.js index b763f4ebb28f..3d0ce1404a91 100644 --- a/tests/utils/PusherHelper.js +++ b/tests/utils/PusherHelper.js @@ -1,7 +1,7 @@ -import * as Pusher from '../../src/libs/Pusher/pusher'; -import PusherConnectionManager from '../../src/libs/PusherConnectionManager'; import CONFIG from '../../src/CONFIG'; import CONST from '../../src/CONST'; +import * as Pusher from '../../src/libs/Pusher/pusher'; +import PusherConnectionManager from '../../src/libs/PusherConnectionManager'; const CHANNEL_NAME = `${CONST.PUSHER.PRIVATE_USER_CHANNEL_PREFIX}1${CONFIG.PUSHER.SUFFIX}`; diff --git a/tests/utils/TestHelper.js b/tests/utils/TestHelper.js index 4c658f004894..03f5416a92fb 100644 --- a/tests/utils/TestHelper.js +++ b/tests/utils/TestHelper.js @@ -1,12 +1,12 @@ -import _ from 'underscore'; -import Onyx from 'react-native-onyx'; import Str from 'expensify-common/lib/str'; +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; import CONST from '../../src/CONST'; import * as Session from '../../src/libs/actions/Session'; import HttpUtils from '../../src/libs/HttpUtils'; +import * as NumberUtils from '../../src/libs/NumberUtils'; import ONYXKEYS from '../../src/ONYXKEYS'; import waitForBatchedUpdates from './waitForBatchedUpdates'; -import * as NumberUtils from '../../src/libs/NumberUtils'; /** * @param {String} login diff --git a/tests/utils/bumpVersion.mjs b/tests/utils/bumpVersion.mjs index e9ab115382ce..19471ee7f905 100644 --- a/tests/utils/bumpVersion.mjs +++ b/tests/utils/bumpVersion.mjs @@ -1,5 +1,4 @@ #!/usr/bin/env node - import {incrementVersion} from '../../.github/libs/versionUpdater.js'; const version = process.argv[2]; diff --git a/tests/utils/getPreviousVersion.mjs b/tests/utils/getPreviousVersion.mjs index fb4acd625070..31ca672776fa 100644 --- a/tests/utils/getPreviousVersion.mjs +++ b/tests/utils/getPreviousVersion.mjs @@ -1,5 +1,4 @@ #!/usr/bin/env node - import {getPreviousVersion} from '../../.github/libs/versionUpdater.js'; const currentVersion = process.argv[2]; diff --git a/tests/utils/getPullRequestsMergedBetween.mjs b/tests/utils/getPullRequestsMergedBetween.mjs index 05dedaa3e4f1..0afb1499e67f 100755 --- a/tests/utils/getPullRequestsMergedBetween.mjs +++ b/tests/utils/getPullRequestsMergedBetween.mjs @@ -1,5 +1,4 @@ #!/usr/bin/env node - import GitUtils from '../../.github/libs/GitUtils.js'; const fromRef = process.argv[2]; diff --git a/tests/utils/waitForBatchedUpdates.js b/tests/utils/waitForBatchedUpdates.js index 2c4dbec250bc..c9d7a99fa1fb 100644 --- a/tests/utils/waitForBatchedUpdates.js +++ b/tests/utils/waitForBatchedUpdates.js @@ -1,4 +1,5 @@ import getIsUsingFakeTimers from './getIsUsingFakeTimers'; + /** * Method which waits for all asynchronous JS to stop executing before proceeding. This helps test things like actions * that expect some Onyx value to be available. This way we do not have to explicitly wait for an action to finish diff --git a/wdyr.js b/wdyr.js index 5f790b922d9e..ad1edaa5a075 100644 --- a/wdyr.js +++ b/wdyr.js @@ -1,8 +1,7 @@ // Implements Why Did You Render (WDYR) in Dev - +import lodashGet from 'lodash/get'; import React from 'react'; import Config from 'react-native-config'; -import lodashGet from 'lodash/get'; const useWDYR = lodashGet(Config, 'USE_WDYR') === 'true';