From 5ae65ead66ad2f87b2dcd4b1ab55c87a4b3a17ce Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Wed, 26 Jul 2023 16:19:52 -0700 Subject: [PATCH 01/51] Component for indicator messages with close button --- .../DotIndicatorMessageWithClose.js | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/components/DotIndicatorMessageWithClose.js diff --git a/src/components/DotIndicatorMessageWithClose.js b/src/components/DotIndicatorMessageWithClose.js new file mode 100644 index 000000000000..1a0770508eb3 --- /dev/null +++ b/src/components/DotIndicatorMessageWithClose.js @@ -0,0 +1,74 @@ +import React from 'react'; +import _ from 'underscore'; +import PropTypes from 'prop-types'; +import {View} from 'react-native'; +import styles from '../styles/styles'; +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 withLocalize, {withLocalizePropTypes} from './withLocalize'; + +const propTypes = { + /** + * In most cases this should just be errors from onxyData + * if you are not passing that data then this needs to be in a similar shape like + * { + * timestamp: 'message', + * } + */ + messages: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object]))])), + + // The type of message, 'error' shows a red dot, 'success' shows a green dot + type: PropTypes.oneOf(['error', 'success']).isRequired, + + /** A function to run when the X button next to the message is clicked */ + onClose: PropTypes.func, + + /** Additional style object for the container*/ + containerStyles: stylePropTypes, + + ...withLocalizePropTypes, +}; + +const defaultProps = { + messages: {}, + onClose: () => {}, + containerStyles: [], +}; + +function DotIndicatorMessageWithClose(props) { + if (_.isEmpty(props.messages)) { + return null; + } + + return ( + + + + + + + + + ); +} + +DotIndicatorMessageWithClose.propTypes = propTypes; +DotIndicatorMessageWithClose.defaultProps = defaultProps; +DotIndicatorMessageWithClose.displayName = 'DotIndicatorMessageWithClose'; + +export default withLocalize(DotIndicatorMessageWithClose); From 1039385b4d1c94b7f7586ea3aff57e716e171391 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Wed, 26 Jul 2023 16:21:29 -0700 Subject: [PATCH 02/51] Show message when members added with primary login --- src/languages/en.js | 1 + src/pages/workspace/WorkspaceMembersPage.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/languages/en.js b/src/languages/en.js index b7a130addf18..a0f73bc41788 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -1150,6 +1150,7 @@ export default { cannotRemove: 'You cannot remove yourself or the workspace owner.', genericRemove: 'There was a problem removing that workspace member.', }, + addedWithPrimary: 'Some users were added with their primary logins.', }, card: { header: 'Unlock free Expensify Cards', diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index e758d738d964..028420d60093 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -38,6 +38,7 @@ import PressableWithFeedback from '../../components/Pressable/PressableWithFeedb import usePrevious from '../../hooks/usePrevious'; import Log from '../../libs/Log'; import * as PersonalDetailsUtils from '../../libs/PersonalDetailsUtils'; +import DotIndicatorMessageWithClose from '../../components/DotIndicatorMessageWithClose'; const propTypes = { /** All personal details asssociated with user */ @@ -397,6 +398,7 @@ function WorkspaceMembersPage(props) { }); const policyID = lodashGet(props.route, 'params.policyID'); const policyName = lodashGet(props.policy, 'name'); + const primaryLoginsInvited = props.policy.primaryLoginsInvited || {}; return ( + {data.length > 0 ? ( From fa3adb21e53d8cdb0460c7fe739ba253bbbb6847 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Wed, 26 Jul 2023 16:21:57 -0700 Subject: [PATCH 03/51] Style fix --- src/components/DotIndicatorMessageWithClose.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/DotIndicatorMessageWithClose.js b/src/components/DotIndicatorMessageWithClose.js index 1a0770508eb3..fd535475583f 100644 --- a/src/components/DotIndicatorMessageWithClose.js +++ b/src/components/DotIndicatorMessageWithClose.js @@ -29,7 +29,7 @@ const propTypes = { /** A function to run when the X button next to the message is clicked */ onClose: PropTypes.func, - /** Additional style object for the container*/ + /** Additional style object for the container */ containerStyles: stylePropTypes, ...withLocalizePropTypes, @@ -47,7 +47,7 @@ function DotIndicatorMessageWithClose(props) { } return ( - + Date: Wed, 26 Jul 2023 16:29:40 -0700 Subject: [PATCH 04/51] Allow dismissing added with primary message --- src/libs/actions/Policy.js | 5 +++++ src/pages/workspace/WorkspaceMembersPage.js | 1 + 2 files changed, 6 insertions(+) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index ebf9f100bc90..b1364dd9c373 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -1144,6 +1144,10 @@ function clearErrors(policyID) { hideWorkspaceAlertMessage(policyID); } +function dismissAddedWithPrimaryMessages(policyID) { + Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {primaryLoginsInvited: null}); +} + export { removeMembers, addMembersToWorkspace, @@ -1173,4 +1177,5 @@ export { setWorkspaceInviteMembersDraft, isPolicyOwner, clearErrors, + dismissAddedWithPrimaryMessages, }; diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 028420d60093..7c396aa0f65d 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -460,6 +460,7 @@ function WorkspaceMembersPage(props) { type="success" messages={_.isEmpty(primaryLoginsInvited) ? null : {0: props.translate('workspace.people.addedWithPrimary')}} containerStyles={[styles.pt3]} + onClose={() => Policy.dismissAddedWithPrimaryMessages(props.route.params.policyID)} /> {data.length > 0 ? ( From 8a449b1a8b70fdc1fb4a82038a5d94f0b65b1a2a Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Wed, 26 Jul 2023 18:02:22 -0700 Subject: [PATCH 05/51] Show added by secondary login messages --- src/languages/en.js | 1 + src/pages/workspace/WorkspaceMembersPage.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index a0f73bc41788..b35bf44f6159 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -1151,6 +1151,7 @@ export default { genericRemove: 'There was a problem removing that workspace member.', }, addedWithPrimary: 'Some users were added with their primary logins.', + invitedBySecondaryLogin: ({secondaryLogin}) => `Added by secondary login ${secondaryLogin}.`, }, card: { header: 'Unlock free Expensify Cards', diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 7c396aa0f65d..3dadf76b2431 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -342,6 +342,7 @@ function WorkspaceMembersPage(props) { }} onSelectRow={() => toggleUser(item.accountID, item.pendingAction)} /> + {Boolean(item.invitedSecondaryLogin) && {props.translate('workspace.people.invitedBySecondaryLogin', {secondaryLogin: item.invitedSecondaryLogin})}} {(props.session.accountID === item.accountID || item.role === 'admin') && ( @@ -362,6 +363,7 @@ function WorkspaceMembersPage(props) { [selectedEmployees, errors, props.session.accountID, dismissError, toggleUser], ); + const invitedSecondaryToPrimaryLogins = _.invert(props.policy.primaryLoginsInvited); const policyOwner = lodashGet(props.policy, 'owner'); const currentUserLogin = lodashGet(props.currentUserPersonalDetails, 'login'); const removableMembers = {}; @@ -378,6 +380,7 @@ function WorkspaceMembersPage(props) { data.push({ ...policyMember, ...details, + invitedSecondaryLogin: invitedSecondaryToPrimaryLogins[details.login] || '', }); }); data = _.sortBy(data, (value) => value.displayName.toLowerCase()); @@ -398,7 +401,6 @@ function WorkspaceMembersPage(props) { }); const policyID = lodashGet(props.route, 'params.policyID'); const policyName = lodashGet(props.policy, 'name'); - const primaryLoginsInvited = props.policy.primaryLoginsInvited || {}; return ( Policy.dismissAddedWithPrimaryMessages(props.route.params.policyID)} /> From 3afc37b3a183f25584a56acc7759128f0d0d1896 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Thu, 3 Aug 2023 18:23:29 -0700 Subject: [PATCH 06/51] Reuse component where it was extracted from --- src/components/OfflineWithFeedback.js | 29 +++++++-------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/src/components/OfflineWithFeedback.js b/src/components/OfflineWithFeedback.js index 820cce252205..87963ed26fd9 100644 --- a/src/components/OfflineWithFeedback.js +++ b/src/components/OfflineWithFeedback.js @@ -9,13 +9,9 @@ import CONST from '../CONST'; import networkPropTypes from './networkPropTypes'; import stylePropTypes from '../styles/stylePropTypes'; import styles from '../styles/styles'; -import Tooltip from './Tooltip'; -import Icon from './Icon'; -import * as Expensicons from './Icon/Expensicons'; import * as StyleUtils from '../styles/StyleUtils'; -import DotIndicatorMessage from './DotIndicatorMessage'; import shouldRenderOffscreen from '../libs/shouldRenderOffscreen'; -import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; +import DotIndicatorMessageWithClose from './DotIndicatorMessageWithClose'; /** * This component should be used when we are using the offline pattern B (offline with feedback). @@ -116,23 +112,12 @@ function OfflineWithFeedback(props) { )} {props.shouldShowErrorMessages && hasErrorMessages && ( - - - - - - - - + )} ); From d4c2c737245b230484be65a2f31faf40ddf8c5f6 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Thu, 3 Aug 2023 18:23:37 -0700 Subject: [PATCH 07/51] style --- src/pages/workspace/WorkspaceMembersPage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 3dadf76b2431..647c35b4f6b3 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -342,7 +342,11 @@ function WorkspaceMembersPage(props) { }} onSelectRow={() => toggleUser(item.accountID, item.pendingAction)} /> - {Boolean(item.invitedSecondaryLogin) && {props.translate('workspace.people.invitedBySecondaryLogin', {secondaryLogin: item.invitedSecondaryLogin})}} + {Boolean(item.invitedSecondaryLogin) && ( + + {props.translate('workspace.people.invitedBySecondaryLogin', {secondaryLogin: item.invitedSecondaryLogin})} + + )} {(props.session.accountID === item.accountID || item.role === 'admin') && ( From 9157c287179821b57de11d482fc64134ce615a2b Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Thu, 3 Aug 2023 18:36:09 -0700 Subject: [PATCH 08/51] Add informative comments, better variable name --- src/components/DotIndicatorMessage.js | 8 +------- src/libs/actions/Policy.js | 5 +++++ src/pages/workspace/WorkspaceMembersPage.js | 8 +++++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/components/DotIndicatorMessage.js b/src/components/DotIndicatorMessage.js index ac550f34de3f..1073f8c9aedc 100644 --- a/src/components/DotIndicatorMessage.js +++ b/src/components/DotIndicatorMessage.js @@ -10,13 +10,7 @@ import Text from './Text'; import * as Localize from '../libs/Localize'; const propTypes = { - /** - * In most cases this should just be errors from onxyData - * if you are not passing that data then this needs to be in a similar shape like - * { - * timestamp: 'message', - * } - */ + // The error messages to display messages: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object]))])), // The type of message, 'error' shows a red dot, 'success' shows a green dot diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index b1364dd9c373..28ebb3d29e09 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -1144,6 +1144,11 @@ function clearErrors(policyID) { hideWorkspaceAlertMessage(policyID); } +/** + * Dismiss the informative messages about which policy members were added with primary logins when invited with their secondary login. + * + * @param {String} policyID + */ function dismissAddedWithPrimaryMessages(policyID) { Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {primaryLoginsInvited: null}); } diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 647c35b4f6b3..018ffb717908 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -367,7 +367,7 @@ function WorkspaceMembersPage(props) { [selectedEmployees, errors, props.session.accountID, dismissError, toggleUser], ); - const invitedSecondaryToPrimaryLogins = _.invert(props.policy.primaryLoginsInvited); + const invitedPrimaryToSecondaryLogins = _.invert(props.policy.primaryLoginsInvited); const policyOwner = lodashGet(props.policy, 'owner'); const currentUserLogin = lodashGet(props.currentUserPersonalDetails, 'login'); const removableMembers = {}; @@ -384,7 +384,9 @@ function WorkspaceMembersPage(props) { data.push({ ...policyMember, ...details, - invitedSecondaryLogin: invitedSecondaryToPrimaryLogins[details.login] || '', + + // Note which secondary login was used to invite this primary login + invitedSecondaryLogin: invitedPrimaryToSecondaryLogins[details.login] || '', }); }); data = _.sortBy(data, (value) => value.displayName.toLowerCase()); @@ -464,7 +466,7 @@ function WorkspaceMembersPage(props) { /> Policy.dismissAddedWithPrimaryMessages(props.route.params.policyID)} /> From 0a28b29e21703cdee9083c317c54c182b7fd82a3 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Thu, 3 Aug 2023 19:22:53 -0700 Subject: [PATCH 09/51] Add spanish translations --- src/languages/es.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/languages/es.js b/src/languages/es.js index 4006f559eb1f..f2837c60b5e7 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -1159,6 +1159,8 @@ export default { cannotRemove: 'No puedes eliminarte ni a ti mismo ni al dueño del espacio de trabajo.', genericRemove: 'Ha ocurrido un problema al eliminar al miembro del espacio de trabajo.', }, + addedWithPrimary: 'Se agregaron algunos usuarios con sus inicios de sesión principales.', + invitedBySecondaryLogin: ({secondaryLogin}) => `Agregado por inicio de sesión secundario ${secondaryLogin}.`, }, card: { header: 'Desbloquea Tarjetas Expensify gratis', From f88a4560795434cfe55384c37f30e9d43b9b4fb6 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Thu, 3 Aug 2023 19:26:25 -0700 Subject: [PATCH 10/51] Change comment in proper file --- src/components/DotIndicatorMessage.js | 8 +++++++- src/components/DotIndicatorMessageWithClose.js | 8 +------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/DotIndicatorMessage.js b/src/components/DotIndicatorMessage.js index 1073f8c9aedc..ac550f34de3f 100644 --- a/src/components/DotIndicatorMessage.js +++ b/src/components/DotIndicatorMessage.js @@ -10,7 +10,13 @@ import Text from './Text'; import * as Localize from '../libs/Localize'; const propTypes = { - // The error messages to display + /** + * In most cases this should just be errors from onxyData + * if you are not passing that data then this needs to be in a similar shape like + * { + * timestamp: 'message', + * } + */ messages: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object]))])), // The type of message, 'error' shows a red dot, 'success' shows a green dot diff --git a/src/components/DotIndicatorMessageWithClose.js b/src/components/DotIndicatorMessageWithClose.js index fd535475583f..7626a956489f 100644 --- a/src/components/DotIndicatorMessageWithClose.js +++ b/src/components/DotIndicatorMessageWithClose.js @@ -14,13 +14,7 @@ import stylePropTypes from '../styles/stylePropTypes'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; const propTypes = { - /** - * In most cases this should just be errors from onxyData - * if you are not passing that data then this needs to be in a similar shape like - * { - * timestamp: 'message', - * } - */ + // The error messages to display messages: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object]))])), // The type of message, 'error' shows a red dot, 'success' shows a green dot From 1a9d3284a1eaf165b1119d5bbc50231747a494e3 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Mon, 7 Aug 2023 17:10:30 -0700 Subject: [PATCH 11/51] Update with native speaker translations --- src/languages/es.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/es.js b/src/languages/es.js index 3e2d5b820f9e..8592f55d998c 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -1184,8 +1184,8 @@ export default { cannotRemove: 'No puedes eliminarte ni a ti mismo ni al dueño del espacio de trabajo.', genericRemove: 'Ha ocurrido un problema al eliminar al miembro del espacio de trabajo.', }, - addedWithPrimary: 'Se agregaron algunos usuarios con sus inicios de sesión principales.', - invitedBySecondaryLogin: ({secondaryLogin}) => `Agregado por inicio de sesión secundario ${secondaryLogin}.`, + addedWithPrimary: 'Se agregaron algunos usuarios con sus nombres de usuario principales.', + invitedBySecondaryLogin: ({secondaryLogin}) => `Agregado por nombre de usuario secundario ${secondaryLogin}.`, }, card: { header: 'Desbloquea Tarjetas Expensify gratis', From 45b90544c39d8bdaa5c0fdaea999d3a3d95f31e1 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Thu, 21 Sep 2023 13:07:56 +0800 Subject: [PATCH 12/51] boilerplate for changes --- src/languages/en.ts | 1 + src/languages/es.ts | 1 + src/libs/actions/Report.js | 36 +++++++++++++++++++ .../report/ContextMenu/ContextMenuActions.js | 28 +++++++++++++++ 4 files changed, 66 insertions(+) diff --git a/src/languages/en.ts b/src/languages/en.ts index 1882b7e97afb..30f6b0c68f8e 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -396,6 +396,7 @@ export default { deleteConfirmation: ({action}: DeleteConfirmationParams) => `Are you sure you want to delete this ${ReportActionsUtils.isMoneyRequestAction(action) ? 'request' : 'comment'}?`, onlyVisible: 'Only visible to', replyInThread: 'Reply in thread', + subscribeToThread: 'Subscribe to thread', flagAsOffensive: 'Flag as offensive', }, emojiReactions: { diff --git a/src/languages/es.ts b/src/languages/es.ts index 87c7a19fed8a..f2786057e107 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -387,6 +387,7 @@ export default { deleteConfirmation: ({action}: DeleteConfirmationParams) => `¿Estás seguro de que quieres eliminar este ${ReportActionsUtils.isMoneyRequestAction(action) ? 'pedido' : 'comentario'}`, onlyVisible: 'Visible sólo para', replyInThread: 'Responder en el hilo', + subscribeToThread: 'NEED TO TRANSLATE', flagAsOffensive: 'Marcar como ofensivo', }, emojiReactions: { diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 55b03110e925..61d6df634dca 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -630,6 +630,42 @@ function navigateToAndOpenChildReport(childReportID = '0', parentReportAction = } } +/** + * This will subscribe to an existing thread, or create a new one and then subsribe to it if necessary + * + * @param {String} childReportID The reportID we are trying to open + * @param {Object} parentReportAction the parent comment of a thread + * @param {String} parentReportID The reportID of the parent + * + */ +function subscribeToChildReport(childReportID = '0', parentReportAction = {}, parentReportID = '0') { + if (childReportID !== '0') { + openReport(childReportID); + Navigation.navigate(ROUTES.getReportRoute(childReportID)); + } else { + const participantAccountIDs = _.uniq([currentUserAccountID, Number(parentReportAction.actorAccountID)]); + const parentReport = allReports[parentReportID]; + const newChat = ReportUtils.buildOptimisticChatReport( + participantAccountIDs, + lodashGet(parentReportAction, ['message', 0, 'text']), + lodashGet(parentReport, 'chatType', ''), + lodashGet(parentReport, 'policyID', CONST.POLICY.OWNER_EMAIL_FAKE), + CONST.POLICY.OWNER_ACCOUNT_ID_FAKE, + false, + '', + undefined, + undefined, + CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, + parentReportAction.reportActionID, + parentReportID, + ); + + const participantLogins = PersonalDetailsUtils.getLoginsByAccountIDs(newChat.participantAccountIDs); + openReport(newChat.reportID, participantLogins, newChat, parentReportAction.reportActionID); + Navigation.navigate(ROUTES.getReportRoute(newChat.reportID)); + } +} + /** * Get the latest report history without marking the report as read. * diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 173bda0e5221..6e7256162be6 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -146,6 +146,34 @@ export default [ }, getDescription: () => {}, }, + { + isAnonymousAction: false, + textTranslateKey: 'reportActionContextMenu.subscribeToThread', + icon: Expensicons.ChatBubble, + successTextTranslateKey: '', + successIcon: null, + shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { + if (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) { + return false; + } + const isCommentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID); + const isReportPreviewAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW; + const isIOUAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && !ReportActionsUtils.isSplitBillAction(reportAction); + return isCommentAction || isReportPreviewAction || isIOUAction; + }, + onPress: (closePopover, {reportAction, reportID}) => { + if (closePopover) { + hideContextMenu(false, () => { + ReportActionComposeFocusManager.focus(); + Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); + }); + return; + } + + Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); + }, + getDescription: () => {}, + }, { isAnonymousAction: false, textTranslateKey: 'reportActionContextMenu.copyURLToClipboard', From 58f417f8039a4d6faab3d0ee6254582beada2fd3 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Fri, 22 Sep 2023 16:19:47 +0800 Subject: [PATCH 13/51] intermediate changes --- src/libs/actions/Report.js | 33 +++++++++++++++++-- .../report/ContextMenu/ContextMenuActions.js | 22 +++++++------ 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 61d6df634dca..c2dd3daf49b1 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -638,10 +638,11 @@ function navigateToAndOpenChildReport(childReportID = '0', parentReportAction = * @param {String} parentReportID The reportID of the parent * */ -function subscribeToChildReport(childReportID = '0', parentReportAction = {}, parentReportID = '0') { +function toggleSubscribeToChildReport(childReportID = '0', parentReportAction = {}, parentReportID = '0', prevNotificationPreference) { if (childReportID !== '0') { openReport(childReportID); - Navigation.navigate(ROUTES.getReportRoute(childReportID)); + if (prevNotificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE) + updateNotificationPreference(childReportID, CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, ) } else { const participantAccountIDs = _.uniq([currentUserAccountID, Number(parentReportAction.actorAccountID)]); const parentReport = allReports[parentReportID]; @@ -1241,6 +1242,32 @@ function saveReportActionDraftNumberOfLines(reportID, reportActionID, numberOfLi Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT_NUMBER_OF_LINES}${reportID}_${reportActionID}`, numberOfLines); } +/** + * @param {String} reportID + * @param {String} previousValue + * @param {String} newValue + */ +function updateNotificationPreference(reportID, previousValue, newValue) { + if (previousValue === newValue) { + return; + } + const optimisticData = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, + value: {notificationPreference: newValue}, + }, + ]; + const failureData = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, + value: {notificationPreference: previousValue}, + }, + ]; + API.write('UpdateReportNotificationPreference', {reportID, notificationPreference: newValue}, {optimisticData, failureData}); +} + /** * @param {String} reportID * @param {String} previousValue @@ -2105,6 +2132,7 @@ export { reconnect, updateWelcomeMessage, updateWriteCapabilityAndNavigate, + updateNotificationPreference, updateNotificationPreferenceAndNavigate, subscribeToReportTypingEvents, unsubscribeFromReportChannel, @@ -2132,6 +2160,7 @@ export { navigateToAndOpenReport, navigateToAndOpenReportWithAccountIDs, navigateToAndOpenChildReport, + toggleSubscribeToChildReport, updatePolicyRoomNameAndNavigate, clearPolicyRoomNameErrors, clearIOUError, diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 6e7256162be6..61bf5abe4674 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -25,6 +25,7 @@ import * as Task from '../../../../libs/actions/Task'; import * as Localize from '../../../../libs/Localize'; import * as TransactionUtils from '../../../../libs/TransactionUtils'; import * as CurrencyUtils from '../../../../libs/CurrencyUtils'; +import Log from '../../../../libs/Log'; /** * Gets the HTML version of the message in an action. @@ -149,7 +150,7 @@ export default [ { isAnonymousAction: false, textTranslateKey: 'reportActionContextMenu.subscribeToThread', - icon: Expensicons.ChatBubble, + icon: Expensicons.Chair, successTextTranslateKey: '', successIcon: null, shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { @@ -162,15 +163,16 @@ export default [ return isCommentAction || isReportPreviewAction || isIOUAction; }, onPress: (closePopover, {reportAction, reportID}) => { - if (closePopover) { - hideContextMenu(false, () => { - ReportActionComposeFocusManager.focus(); - Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); - }); - return; - } - - Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); + Log.info("sparsisparsi start"); + Log.info(JSON.stringify(reportAction)); + Log.info("sparsisparsi done"); + // if (closePopover) { + // hideContextMenu(false, () => { + // ReportActionComposeFocusManager.focus(); + // Report.subscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); + // }); + // return; + // } }, getDescription: () => {}, }, From 0b7a83e8edd8e44971226f86f55c81140b20fc76 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Thu, 28 Sep 2023 18:22:10 +0800 Subject: [PATCH 14/51] icons and frontend wip --- assets/images/bell.svg | 3 ++ assets/images/bellSlash.svg | 3 ++ ios/NewExpensify.xcodeproj/project.pbxproj | 18 +++++++- ios/tmp.xcconfig | 10 ++++- src/components/Icon/Expensicons.js | 4 ++ src/languages/en.ts | 1 + src/languages/es.ts | 1 + src/libs/actions/Report.js | 1 + .../report/ContextMenu/ContextMenuActions.js | 43 +++++++++++++++++-- 9 files changed, 77 insertions(+), 7 deletions(-) create mode 100644 assets/images/bell.svg create mode 100644 assets/images/bellSlash.svg diff --git a/assets/images/bell.svg b/assets/images/bell.svg new file mode 100644 index 000000000000..a53c9508cbd6 --- /dev/null +++ b/assets/images/bell.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/bellSlash.svg b/assets/images/bellSlash.svg new file mode 100644 index 000000000000..2cacb07f4268 --- /dev/null +++ b/assets/images/bellSlash.svg @@ -0,0 +1,3 @@ + + + diff --git a/ios/NewExpensify.xcodeproj/project.pbxproj b/ios/NewExpensify.xcodeproj/project.pbxproj index 64ed3fda8b02..d1cd2d066833 100644 --- a/ios/NewExpensify.xcodeproj/project.pbxproj +++ b/ios/NewExpensify.xcodeproj/project.pbxproj @@ -29,7 +29,7 @@ 70CF6E82262E297300711ADC /* BootSplash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 70CF6E81262E297300711ADC /* BootSplash.storyboard */; }; BDB853621F354EBB84E619C2 /* ExpensifyNewKansas-MediumItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = D2AFB39EC1D44BF9B91D3227 /* ExpensifyNewKansas-MediumItalic.otf */; }; DD79042B2792E76D004484B4 /* RCTBootSplash.m in Sources */ = {isa = PBXBuildFile; fileRef = DD79042A2792E76D004484B4 /* RCTBootSplash.m */; }; - E51DC681C7DEE40AEBDDFBFE /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; + E51DC681C7DEE40AEBDDFBFE /* (null) in Frameworks */ = {isa = PBXBuildFile; }; E9DF872D2525201700607FDC /* AirshipConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = E9DF872C2525201700607FDC /* AirshipConfig.plist */; }; ED222ED90E074A5481A854FA /* ExpensifyNeue-BoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8B28D84EF339436DBD42A203 /* ExpensifyNeue-BoldItalic.otf */; }; F0C450EA2705020500FD2970 /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = F0C450E92705020500FD2970 /* colors.json */; }; @@ -124,7 +124,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E51DC681C7DEE40AEBDDFBFE /* BuildFile in Frameworks */, + E51DC681C7DEE40AEBDDFBFE /* (null) in Frameworks */, 5A464BC8112CDB1DE1E38F1C /* libPods-NewExpensify.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -722,9 +722,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = NewExpensify/Chat.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; ENABLE_BITCODE = NO; INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -738,6 +740,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.expensify.chat.dev; PRODUCT_NAME = "New Expensify Dev"; PROVISIONING_PROFILE_SPECIFIER = expensify_chat_dev; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = expensify_chat_dev; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -754,9 +757,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = NewExpensify/Chat.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; INFOPLIST_FILE = NewExpensify/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -769,6 +774,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.expensify.chat.dev; PRODUCT_NAME = "New Expensify Dev"; PROVISIONING_PROFILE_SPECIFIER = expensify_chat_dev; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = expensify_chat_dev; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -976,6 +982,7 @@ CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; ENABLE_BITCODE = NO; INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -989,6 +996,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.chat.expensify.chat; PRODUCT_NAME = "New Expensify"; PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = chat_expensify_appstore; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1098,6 +1106,7 @@ CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; ENABLE_BITCODE = NO; INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -1111,6 +1120,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.expensify.chat.adhoc; PRODUCT_NAME = "New Expensify AdHoc"; PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = expensify_chat_adhoc; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1214,6 +1224,7 @@ CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; INFOPLIST_FILE = NewExpensify/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1226,6 +1237,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.chat.expensify.chat; PRODUCT_NAME = "New Expensify"; PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = chat_expensify_appstore; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -1326,6 +1338,7 @@ CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; INFOPLIST_FILE = NewExpensify/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1338,6 +1351,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.expensify.chat.adhoc; PRODUCT_NAME = "New Expensify AdHoc"; PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = expensify_chat_adhoc; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; diff --git a/ios/tmp.xcconfig b/ios/tmp.xcconfig index 8b137891791f..2f2502669450 100644 --- a/ios/tmp.xcconfig +++ b/ios/tmp.xcconfig @@ -1 +1,9 @@ - +NEW_EXPENSIFY_URL=https:/$()/new.expensify.com/ +SECURE_EXPENSIFY_URL=https:/$()/secure.expensify.com/ +EXPENSIFY_URL=https:/$()/www.expensify.com/ +EXPENSIFY_PARTNER_NAME=chat-expensify-com +EXPENSIFY_PARTNER_PASSWORD=e21965746fd75f82bb66 +PUSHER_APP_KEY=268df511a204fbb60884 +USE_WEB_PROXY=false +ENVIRONMENT=production +SEND_CRASH_REPORTS=true diff --git a/src/components/Icon/Expensicons.js b/src/components/Icon/Expensicons.js index a0c8b72d755a..0eea0ca7398c 100644 --- a/src/components/Icon/Expensicons.js +++ b/src/components/Icon/Expensicons.js @@ -9,6 +9,8 @@ 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'; @@ -138,6 +140,8 @@ export { BackArrow, Bank, Bill, + Bell, + BellSlash, Bolt, Briefcase, Bug, diff --git a/src/languages/en.ts b/src/languages/en.ts index 53b9bab98ced..e038acf7a862 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -400,6 +400,7 @@ export default { onlyVisible: 'Only visible to', replyInThread: 'Reply in thread', subscribeToThread: 'Subscribe to thread', + unsubscribeFromThread: 'Unsubscribe from thread', flagAsOffensive: 'Flag as offensive', }, emojiReactions: { diff --git a/src/languages/es.ts b/src/languages/es.ts index 4eead6ddc0f3..c577e8f4b7ce 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -391,6 +391,7 @@ export default { onlyVisible: 'Visible sólo para', replyInThread: 'Responder en el hilo', subscribeToThread: 'NEED TO TRANSLATE', + unsubscribeFromThread: 'NEED TO TRANSLATE', flagAsOffensive: 'Marcar como ofensivo', }, emojiReactions: { diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index ecb98548d5e1..4d9b74a5a69f 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -706,6 +706,7 @@ function navigateToAndOpenChildReport(childReportID = '0', parentReportAction = * @param {String} childReportID The reportID we are trying to open * @param {Object} parentReportAction the parent comment of a thread * @param {String} parentReportID The reportID of the parent + * @param {String} prevNotificationPreference The previous notification preference for the child report * */ function toggleSubscribeToChildReport(childReportID = '0', parentReportAction = {}, parentReportID = '0', prevNotificationPreference) { diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 1e603e40a99e..3fd39ddf25c0 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -138,7 +138,7 @@ export default [ if (closePopover) { hideContextMenu(false, () => { ReportActionComposeFocusManager.focus(); - Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); + Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', ''), reportAction, reportID); }); return; } @@ -150,22 +150,57 @@ export default [ { isAnonymousAction: false, textTranslateKey: 'reportActionContextMenu.subscribeToThread', - icon: Expensicons.Chair, + // textTranslateKey: lodashGet(reportAction, 'childReportNotificationPreference', '0'), + icon: Expensicons.Bell, + successTextTranslateKey: '', + successIcon: null,g + shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { + const subscribed = lodashGet(reportAction, 'childReportNotificationPreference', '') !== "hidden"; + if (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) { + return false; + } + const isCommentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID); + const isReportPreviewAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW; + const isIOUAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && !ReportActionsUtils.isSplitBillAction(reportAction); + return !subscribed && (isCommentAction || isReportPreviewAction || isIOUAction); + }, + onPress: (closePopover, {reportAction, reportID}) => { + Log.info("sparsisparsi start"); + Log.info(lodashGet(reportAction, 'childReportNotificationPreference', '0')); + Log.info("sparsisparsi done"); + debugger; + // if (closePopover) { + // hideContextMenu(false, () => { + // ReportActionComposeFocusManager.focus(); + // Report.subscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); + // }); + // return; + // } + }, + getDescription: () => {}, + }, + { + isAnonymousAction: false, + textTranslateKey: 'reportActionContextMenu.unsubscribeFromThread', + // textTranslateKey: lodashGet(reportAction, 'childReportNotificationPreference', '0'), + icon: Expensicons.BellSlash, successTextTranslateKey: '', successIcon: null, shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { + const subscribed = lodashGet(reportAction, 'childReportNotificationPreference', '0') !== "hidden"; if (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) { return false; } const isCommentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID); const isReportPreviewAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW; const isIOUAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && !ReportActionsUtils.isSplitBillAction(reportAction); - return isCommentAction || isReportPreviewAction || isIOUAction; + return subscribed && (isCommentAction || isReportPreviewAction || isIOUAction); }, onPress: (closePopover, {reportAction, reportID}) => { Log.info("sparsisparsi start"); - Log.info(JSON.stringify(reportAction)); + Log.info(lodashGet(reportAction, 'childReportNotificationPreference', '0')); Log.info("sparsisparsi done"); + debugger; // if (closePopover) { // hideContextMenu(false, () => { // ReportActionComposeFocusManager.focus(); From c3df845adfe24f1377d7d9ca03fdb21b476ea566 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Wed, 11 Oct 2023 23:07:57 -0400 Subject: [PATCH 15/51] resolve merge conflicts --- src/pages/home/report/ContextMenu/ContextMenuActions.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 01b4e5a64b04..0c2ace646cdb 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -148,13 +148,12 @@ export default [ getDescription: () => {}, }, { -<<<<<<< HEAD isAnonymousAction: false, textTranslateKey: 'reportActionContextMenu.subscribeToThread', // textTranslateKey: lodashGet(reportAction, 'childReportNotificationPreference', '0'), icon: Expensicons.Bell, successTextTranslateKey: '', - successIcon: null,g + successIcon: null, shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { const subscribed = lodashGet(reportAction, 'childReportNotificationPreference', '') !== "hidden"; if (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) { @@ -213,10 +212,7 @@ export default [ getDescription: () => {}, }, { - isAnonymousAction: false, -======= isAnonymousAction: true, ->>>>>>> main textTranslateKey: 'reportActionContextMenu.copyURLToClipboard', icon: Expensicons.Copy, successTextTranslateKey: 'reportActionContextMenu.copied', From 9a562e897f3b17f2f75cc2b1d05f5b25b99bc81f Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Fri, 13 Oct 2023 15:28:54 -0700 Subject: [PATCH 16/51] Implement review feedback --- .../DotIndicatorMessageWithClose.js | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/components/DotIndicatorMessageWithClose.js b/src/components/DotIndicatorMessageWithClose.js index 7626a956489f..0f23c3783336 100644 --- a/src/components/DotIndicatorMessageWithClose.js +++ b/src/components/DotIndicatorMessageWithClose.js @@ -11,7 +11,7 @@ import CONST from '../CONST'; import * as StyleUtils from '../styles/StyleUtils'; import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; import stylePropTypes from '../styles/stylePropTypes'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; +import useLocalize from '../hooks/useLocalize'; const propTypes = { // The error messages to display @@ -25,8 +25,6 @@ const propTypes = { /** Additional style object for the container */ containerStyles: stylePropTypes, - - ...withLocalizePropTypes, }; const defaultProps = { @@ -35,24 +33,25 @@ const defaultProps = { containerStyles: [], }; -function DotIndicatorMessageWithClose(props) { - if (_.isEmpty(props.messages)) { +function DotIndicatorMessageWithClose({messages, type, onClose, containerStyles}) { + const {translate} = useLocalize(); + if (_.isEmpty(messages)) { return null; } return ( - + - + @@ -65,4 +64,4 @@ DotIndicatorMessageWithClose.propTypes = propTypes; DotIndicatorMessageWithClose.defaultProps = defaultProps; DotIndicatorMessageWithClose.displayName = 'DotIndicatorMessageWithClose'; -export default withLocalize(DotIndicatorMessageWithClose); +export default DotIndicatorMessageWithClose; From e22bd99ba4bead6b9c0df158e174fb2a543657b0 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Mon, 16 Oct 2023 09:46:58 -0700 Subject: [PATCH 17/51] Show message about users added by primary login --- .../SelectionList/BaseSelectionList.js | 2 ++ .../SelectionList/selectionListPropTypes.js | 3 +++ src/pages/workspace/WorkspaceMembersPage.js | 16 ++++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/src/components/SelectionList/BaseSelectionList.js b/src/components/SelectionList/BaseSelectionList.js index fdb1f92ca73b..0878e404aafe 100644 --- a/src/components/SelectionList/BaseSelectionList.js +++ b/src/components/SelectionList/BaseSelectionList.js @@ -48,6 +48,7 @@ function BaseSelectionList({ headerMessage = '', confirmButtonText = '', onConfirm, + headerContent, footerContent, showScrollIndicator = false, showLoadingPlaceholder = false, @@ -389,6 +390,7 @@ function BaseSelectionList({ {headerMessage} )} + {Boolean(headerContent) && headerContent} {flattenedSections.allOptions.length === 0 && showLoadingPlaceholder ? ( ) : ( diff --git a/src/components/SelectionList/selectionListPropTypes.js b/src/components/SelectionList/selectionListPropTypes.js index e75335e39b23..58aecb0da1a1 100644 --- a/src/components/SelectionList/selectionListPropTypes.js +++ b/src/components/SelectionList/selectionListPropTypes.js @@ -174,6 +174,9 @@ const propTypes = { /** A ref to forward to the TextInput */ inputRef: PropTypes.oneOfType([PropTypes.object]), + /** Custom content to display in the header */ + headerContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), + /** Custom content to display in the footer */ footerContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), }; diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index e0e818ba90d6..120d818fcd20 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -262,6 +262,7 @@ function WorkspaceMembersPage(props) { const currentUserLogin = lodashGet(props.currentUserPersonalDetails, 'login'); const policyID = lodashGet(props.route, 'params.policyID'); const policyName = lodashGet(props.policy, 'name'); + const invitedPrimaryToSecondaryLogins = _.invert(props.policy.primaryLoginsInvited); const getMemberOptions = () => { let result = []; @@ -354,6 +355,20 @@ function WorkspaceMembersPage(props) { return searchValue.trim() && !data.length ? props.translate('workspace.common.memberNotFound') : ''; }; + const getHeaderContent = () => { + if (_.isEmpty(invitedPrimaryToSecondaryLogins)) { + return null; + } + return ( + Policy.dismissAddedWithPrimaryMessages(policyID)} + /> + ); + }; + return ( toggleUser(item.keyForList)} onSelectAll={() => toggleAllUsers(data)} onDismissError={dismissError} From 6e747221a7e920e7e5ec8fe4670574c5dc488402 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Tue, 17 Oct 2023 03:06:31 -0400 Subject: [PATCH 18/51] re-add functionality --- src/libs/actions/Report.js | 2 +- .../report/ContextMenu/ContextMenuActions.js | 50 ++++++++++--------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index af052c717425..c9ab02f127f4 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1351,7 +1351,7 @@ function updateNotificationPreference(reportID, previousValue, newValue, navigat function toggleSubscribeToChildReport(childReportID = '0', parentReportAction = {}, parentReportID = '0', prevNotificationPreference) { if (childReportID !== '0') { openReport(childReportID); - if (prevNotificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) { + if (!prevNotificationPreference || prevNotificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) { updateNotificationPreference(childReportID, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, false) } else { updateNotificationPreference(childReportID, CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, false) diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 0c2ace646cdb..468c06326064 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -155,7 +155,8 @@ export default [ successTextTranslateKey: '', successIcon: null, shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { - const subscribed = lodashGet(reportAction, 'childReportNotificationPreference', '') !== "hidden"; + const childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); + const subscribed = childReportNotificationPreference && (childReportNotificationPreference !== "hidden"); if (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) { return false; } @@ -165,17 +166,17 @@ export default [ return !subscribed && (isCommentAction || isReportPreviewAction || isIOUAction); }, onPress: (closePopover, {reportAction, reportID}) => { - Log.info("sparsisparsi start"); - Log.info(lodashGet(reportAction, 'childReportNotificationPreference', '0')); - Log.info("sparsisparsi done"); - debugger; - // if (closePopover) { - // hideContextMenu(false, () => { - // ReportActionComposeFocusManager.focus(); - // Report.subscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); - // }); - // return; - // } + const childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); + if (closePopover) { + hideContextMenu(false, () => { + ReportActionComposeFocusManager.focus(); + Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); + }); + return; + } else { + ReportActionComposeFocusManager.focus(); + Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); + } }, getDescription: () => {}, }, @@ -187,7 +188,8 @@ export default [ successTextTranslateKey: '', successIcon: null, shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { - const subscribed = lodashGet(reportAction, 'childReportNotificationPreference', '0') !== "hidden"; + const childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); + const subscribed = childReportNotificationPreference && (childReportNotificationPreference !== "hidden"); if (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) { return false; } @@ -197,17 +199,17 @@ export default [ return subscribed && (isCommentAction || isReportPreviewAction || isIOUAction); }, onPress: (closePopover, {reportAction, reportID}) => { - Log.info("sparsisparsi start"); - Log.info(lodashGet(reportAction, 'childReportNotificationPreference', '0')); - Log.info("sparsisparsi done"); - debugger; - // if (closePopover) { - // hideContextMenu(false, () => { - // ReportActionComposeFocusManager.focus(); - // Report.subscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); - // }); - // return; - // } + const childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); + if (closePopover) { + hideContextMenu(false, () => { + ReportActionComposeFocusManager.focus(); + Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); + }); + return; + } else { + ReportActionComposeFocusManager.focus(); + Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); + } }, getDescription: () => {}, }, From bad56feb0f2c0e2a618a90eab0c29dca631835c2 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Tue, 17 Oct 2023 03:17:37 -0400 Subject: [PATCH 19/51] lint --- assets/images/bell.svg | 7 +++++-- assets/images/bellSlash.svg | 7 +++++-- src/libs/actions/Report.js | 4 ++-- .../report/ContextMenu/ContextMenuActions.js | 20 ++++++++----------- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/assets/images/bell.svg b/assets/images/bell.svg index a53c9508cbd6..6ba600dc695b 100644 --- a/assets/images/bell.svg +++ b/assets/images/bell.svg @@ -1,3 +1,6 @@ - - + + + + diff --git a/assets/images/bellSlash.svg b/assets/images/bellSlash.svg index 2cacb07f4268..488acc4de05e 100644 --- a/assets/images/bellSlash.svg +++ b/assets/images/bellSlash.svg @@ -1,3 +1,6 @@ - - + + + + diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index c9ab02f127f4..d7c8be68977c 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1352,9 +1352,9 @@ function toggleSubscribeToChildReport(childReportID = '0', parentReportAction = if (childReportID !== '0') { openReport(childReportID); if (!prevNotificationPreference || prevNotificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) { - updateNotificationPreference(childReportID, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, false) + updateNotificationPreference(childReportID, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, false); } else { - updateNotificationPreference(childReportID, CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, false) + updateNotificationPreference(childReportID, CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, false); } } else { const participantAccountIDs = _.uniq([currentUserAccountID, Number(parentReportAction.actorAccountID)]); diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 468c06326064..ba5c274ed59a 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -22,10 +22,6 @@ import MiniQuickEmojiReactions from '../../../../components/Reactions/MiniQuickE import Navigation from '../../../../libs/Navigation/Navigation'; import ROUTES from '../../../../ROUTES'; import * as Task from '../../../../libs/actions/Task'; -import * as Localize from '../../../../libs/Localize'; -import * as TransactionUtils from '../../../../libs/TransactionUtils'; -import * as CurrencyUtils from '../../../../libs/CurrencyUtils'; -import Log from '../../../../libs/Log'; /** * Gets the HTML version of the message in an action. @@ -156,7 +152,7 @@ export default [ successIcon: null, shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { const childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); - const subscribed = childReportNotificationPreference && (childReportNotificationPreference !== "hidden"); + const subscribed = childReportNotificationPreference && childReportNotificationPreference !== 'hidden'; if (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) { return false; } @@ -173,10 +169,10 @@ export default [ Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); }); return; - } else { - ReportActionComposeFocusManager.focus(); - Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); } + + ReportActionComposeFocusManager.focus(); + Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); }, getDescription: () => {}, }, @@ -189,7 +185,7 @@ export default [ successIcon: null, shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { const childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); - const subscribed = childReportNotificationPreference && (childReportNotificationPreference !== "hidden"); + const subscribed = childReportNotificationPreference && childReportNotificationPreference !== 'hidden'; if (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) { return false; } @@ -206,10 +202,10 @@ export default [ Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); }); return; - } else { - ReportActionComposeFocusManager.focus(); - Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); } + + ReportActionComposeFocusManager.focus(); + Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); }, getDescription: () => {}, }, From f016bb803da86d178715ce4d8179e5b999606641 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Tue, 17 Oct 2023 03:23:22 -0400 Subject: [PATCH 20/51] prettier --- src/pages/home/report/ContextMenu/ContextMenuActions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index ba5c274ed59a..8006cd3e3f29 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -170,7 +170,7 @@ export default [ }); return; } - + ReportActionComposeFocusManager.focus(); Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); }, @@ -203,7 +203,7 @@ export default [ }); return; } - + ReportActionComposeFocusManager.focus(); Report.toggleSubscribeToChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID, childReportNotificationPreference); }, From cac1f47ec4628b6c5d209b74308e94b9b1345e20 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Tue, 17 Oct 2023 08:44:20 -0700 Subject: [PATCH 21/51] Use a more simple component name --- src/components/DotIndicatorMessageWithClose.js | 10 +++++----- src/components/OfflineWithFeedback.js | 4 ++-- src/pages/workspace/WorkspaceMembersPage.js | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/DotIndicatorMessageWithClose.js b/src/components/DotIndicatorMessageWithClose.js index 0f23c3783336..37366ce5a442 100644 --- a/src/components/DotIndicatorMessageWithClose.js +++ b/src/components/DotIndicatorMessageWithClose.js @@ -33,7 +33,7 @@ const defaultProps = { containerStyles: [], }; -function DotIndicatorMessageWithClose({messages, type, onClose, containerStyles}) { +function MessagesRow({messages, type, onClose, containerStyles}) { const {translate} = useLocalize(); if (_.isEmpty(messages)) { return null; @@ -60,8 +60,8 @@ function DotIndicatorMessageWithClose({messages, type, onClose, containerStyles} ); } -DotIndicatorMessageWithClose.propTypes = propTypes; -DotIndicatorMessageWithClose.defaultProps = defaultProps; -DotIndicatorMessageWithClose.displayName = 'DotIndicatorMessageWithClose'; +MessagesRow.propTypes = propTypes; +MessagesRow.defaultProps = defaultProps; +MessagesRow.displayName = 'MessagesRow'; -export default DotIndicatorMessageWithClose; +export default MessagesRow; diff --git a/src/components/OfflineWithFeedback.js b/src/components/OfflineWithFeedback.js index e0f0de5df6d7..23b0facf8366 100644 --- a/src/components/OfflineWithFeedback.js +++ b/src/components/OfflineWithFeedback.js @@ -7,7 +7,7 @@ import stylePropTypes from '../styles/stylePropTypes'; import styles from '../styles/styles'; import * as StyleUtils from '../styles/StyleUtils'; import shouldRenderOffscreen from '../libs/shouldRenderOffscreen'; -import DotIndicatorMessageWithClose from './DotIndicatorMessageWithClose'; +import MessagesRow from './MessagesRow'; import useNetwork from '../hooks/useNetwork'; /** @@ -118,7 +118,7 @@ function OfflineWithFeedback(props) { )} {props.shouldShowErrorMessages && hasErrorMessages && ( - Date: Tue, 17 Oct 2023 08:58:27 -0700 Subject: [PATCH 22/51] Woops, rename file too --- .../{DotIndicatorMessageWithClose.js => MessagesRow.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/components/{DotIndicatorMessageWithClose.js => MessagesRow.js} (100%) diff --git a/src/components/DotIndicatorMessageWithClose.js b/src/components/MessagesRow.js similarity index 100% rename from src/components/DotIndicatorMessageWithClose.js rename to src/components/MessagesRow.js From 3b928cb9e56d823614710239336e5082d6717086 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Tue, 17 Oct 2023 09:27:53 -0700 Subject: [PATCH 23/51] WIP display invited secondary login below member --- src/components/SelectionList/UserListItem.js | 5 +++++ src/pages/workspace/WorkspaceMembersPage.js | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/components/SelectionList/UserListItem.js b/src/components/SelectionList/UserListItem.js index 436ae8cb056b..faef86b68aed 100644 --- a/src/components/SelectionList/UserListItem.js +++ b/src/components/SelectionList/UserListItem.js @@ -6,8 +6,10 @@ import Text from '../Text'; import {userListItemPropTypes} from './selectionListPropTypes'; import Tooltip from '../Tooltip'; import SubscriptAvatar from '../SubscriptAvatar'; +import useLocalize from '../../hooks/useLocalize'; function UserListItem({item, isFocused = false, showTooltip}) { + const {translate} = useLocalize(); return ( <> {Boolean(item.icons) && ( @@ -42,6 +44,9 @@ function UserListItem({item, isFocused = false, showTooltip}) { )} + {Boolean(item.invitedSecondaryLogin) && ( + {translate('workspace.people.invitedBySecondaryLogin', {secondaryLogin: item.invitedSecondaryLogin})} + )} {Boolean(item.rightElement) && item.rightElement} diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 2bd045a12e5d..769e5b07ea0e 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -339,6 +339,9 @@ function WorkspaceMembersPage(props) { ], errors: policyMember.errors, pendingAction: policyMember.pendingAction, + + // Note which secondary login was used to invite this primary login + invitedSecondaryLogin: invitedPrimaryToSecondaryLogins[details.login] || '', }); }); From 9beba29d8cd3fbc95723ae061aa9e99dba9ed519 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Tue, 17 Oct 2023 18:36:18 -0400 Subject: [PATCH 24/51] pass in prev notification preference --- src/libs/actions/Report.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index d7c8be68977c..96975d9b2383 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1352,9 +1352,9 @@ function toggleSubscribeToChildReport(childReportID = '0', parentReportAction = if (childReportID !== '0') { openReport(childReportID); if (!prevNotificationPreference || prevNotificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) { - updateNotificationPreference(childReportID, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, false); + updateNotificationPreference(childReportID, prevNotificationPreference, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, false); } else { - updateNotificationPreference(childReportID, CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, false); + updateNotificationPreference(childReportID, prevNotificationPreference, CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, false); } } else { const participantAccountIDs = _.uniq([currentUserAccountID, Number(parentReportAction.actorAccountID)]); From 341d267aff9c5c1ec9fa86832cb2c226c6434c38 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Tue, 17 Oct 2023 21:33:38 -0400 Subject: [PATCH 25/51] update notification preferences optimistically --- src/libs/actions/Report.js | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 96975d9b2383..223ee41a5991 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1311,8 +1311,10 @@ function saveReportActionDraftNumberOfLines(reportID, reportActionID, numberOfLi * @param {String} previousValue * @param {String} newValue * @param {boolean} navigate + * @param {String} parentReportID + * @param {String} parentReportActionID */ -function updateNotificationPreference(reportID, previousValue, newValue, navigate) { +function updateNotificationPreference(reportID, previousValue, newValue, navigate, parentReportID = 0, parentReportActionID = 0) { if (previousValue === newValue) { if (navigate) { Navigation.goBack(ROUTES.REPORT_SETTINGS.getRoute(reportID)); @@ -1333,7 +1335,23 @@ function updateNotificationPreference(reportID, previousValue, newValue, navigat value: {notificationPreference: previousValue}, }, ]; - API.write('UpdateReportNotificationPreference', {reportID, notificationPreference: newValue}, {optimisticData, failureData}); + if (parentReportID && parentReportActionID) { + optimisticData.push( + { + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`, + value: {[parentReportActionID] : {childReportNotificationPreference: newValue}}, + } + ); + failureData.push( + { + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`, + value: {[parentReportActionID] : {childReportNotificationPreference: previousValue}}, + } + ) + } + API.write('UpdateReportNotificationPreference', {reportID, notificationPreference: newValue, parentReportID, parentReportActionID}, {optimisticData, failureData}); if (navigate) { Navigation.goBack(ROUTES.REPORT_SETTINGS.getRoute(reportID)); } @@ -1351,10 +1369,11 @@ function updateNotificationPreference(reportID, previousValue, newValue, navigat function toggleSubscribeToChildReport(childReportID = '0', parentReportAction = {}, parentReportID = '0', prevNotificationPreference) { if (childReportID !== '0') { openReport(childReportID); + const parentReportActionID = lodashGet(parentReportAction, 'reportActionID', '0'); if (!prevNotificationPreference || prevNotificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) { - updateNotificationPreference(childReportID, prevNotificationPreference, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, false); + updateNotificationPreference(childReportID, prevNotificationPreference, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, false, parentReportID, parentReportActionID); } else { - updateNotificationPreference(childReportID, prevNotificationPreference, CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, false); + updateNotificationPreference(childReportID, prevNotificationPreference, CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, false, parentReportID, parentReportActionID); } } else { const participantAccountIDs = _.uniq([currentUserAccountID, Number(parentReportAction.actorAccountID)]); From e6851b38c971df65cf722272100efcad5cfc3a7d Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Tue, 17 Oct 2023 22:30:28 -0400 Subject: [PATCH 26/51] prettier --- src/libs/actions/Report.js | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 223ee41a5991..8506807a0fff 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1336,20 +1336,16 @@ function updateNotificationPreference(reportID, previousValue, newValue, navigat }, ]; if (parentReportID && parentReportActionID) { - optimisticData.push( - { - onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`, - value: {[parentReportActionID] : {childReportNotificationPreference: newValue}}, - } - ); - failureData.push( - { - onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`, - value: {[parentReportActionID] : {childReportNotificationPreference: previousValue}}, - } - ) + optimisticData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`, + value: {[parentReportActionID]: {childReportNotificationPreference: newValue}}, + }); + failureData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`, + value: {[parentReportActionID]: {childReportNotificationPreference: previousValue}}, + }); } API.write('UpdateReportNotificationPreference', {reportID, notificationPreference: newValue, parentReportID, parentReportActionID}, {optimisticData, failureData}); if (navigate) { From d30f297412c3450f1175c5e2cdf4d58f50fcac60 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Tue, 17 Oct 2023 22:42:38 -0400 Subject: [PATCH 27/51] update notification preference on new reports --- src/libs/actions/Report.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 8506807a0fff..6dd66d570450 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1391,7 +1391,7 @@ function toggleSubscribeToChildReport(childReportID = '0', parentReportAction = const participantLogins = PersonalDetailsUtils.getLoginsByAccountIDs(newChat.participantAccountIDs); openReport(newChat.reportID, participantLogins, newChat, parentReportAction.reportActionID); - Navigation.navigate(ROUTES.getReportRoute(newChat.reportID)); + updateNotificationPreference(newChat.reportID, prevNotificationPreference, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, false, parentReportID, parentReportAction.reportActionID); } } From 2ca79c84e1a50d16f53a01e49087e602101d3b86 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Wed, 18 Oct 2023 10:17:33 -0700 Subject: [PATCH 28/51] Invited secondary login message row below item --- src/components/SelectionList/BaseListItem.js | 10 ++++++++-- src/components/SelectionList/UserListItem.js | 5 ----- src/styles/utilities/spacing.ts | 4 ++++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/SelectionList/BaseListItem.js b/src/components/SelectionList/BaseListItem.js index 171a58ee9fa9..497bba20ceb4 100644 --- a/src/components/SelectionList/BaseListItem.js +++ b/src/components/SelectionList/BaseListItem.js @@ -12,6 +12,8 @@ import UserListItem from './UserListItem'; import RadioListItem from './RadioListItem'; import OfflineWithFeedback from '../OfflineWithFeedback'; import CONST from '../../CONST'; +import useLocalize from '../../hooks/useLocalize'; +import Text from '../Text'; function BaseListItem({ item, @@ -23,6 +25,7 @@ function BaseListItem({ onSelectRow, onDismissError = () => {}, }) { + const {translate} = useLocalize(); const isUserItem = lodashGet(item, 'icons.length', 0) > 0; const ListItem = isUserItem ? UserListItem : RadioListItem; @@ -76,7 +79,6 @@ function BaseListItem({ )} - - {!canSelectMultiple && item.isSelected && ( )} + {Boolean(item.invitedSecondaryLogin) && ( + + {translate('workspace.people.invitedBySecondaryLogin', {secondaryLogin: item.invitedSecondaryLogin})} + + )} ); diff --git a/src/components/SelectionList/UserListItem.js b/src/components/SelectionList/UserListItem.js index faef86b68aed..436ae8cb056b 100644 --- a/src/components/SelectionList/UserListItem.js +++ b/src/components/SelectionList/UserListItem.js @@ -6,10 +6,8 @@ import Text from '../Text'; import {userListItemPropTypes} from './selectionListPropTypes'; import Tooltip from '../Tooltip'; import SubscriptAvatar from '../SubscriptAvatar'; -import useLocalize from '../../hooks/useLocalize'; function UserListItem({item, isFocused = false, showTooltip}) { - const {translate} = useLocalize(); return ( <> {Boolean(item.icons) && ( @@ -44,9 +42,6 @@ function UserListItem({item, isFocused = false, showTooltip}) { )} - {Boolean(item.invitedSecondaryLogin) && ( - {translate('workspace.people.invitedBySecondaryLogin', {secondaryLogin: item.invitedSecondaryLogin})} - )} {Boolean(item.rightElement) && item.rightElement} diff --git a/src/styles/utilities/spacing.ts b/src/styles/utilities/spacing.ts index e2b161ca0d62..4d30d9136785 100644 --- a/src/styles/utilities/spacing.ts +++ b/src/styles/utilities/spacing.ts @@ -155,6 +155,10 @@ export default { marginLeft: 32, }, + ml9: { + marginLeft: 36, + }, + ml10: { marginLeft: 40, }, From 28105ea2ca5838ee6cb9230b836f7fa58636600e Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Thu, 19 Oct 2023 03:55:34 -0400 Subject: [PATCH 29/51] restore ios folder from main --- ios/NewExpensify.xcodeproj/project.pbxproj | 18 ++---------------- ios/NewExpensify/Info.plist | 4 ++-- ios/NewExpensifyTests/Info.plist | 4 ++-- ios/Podfile.lock | 14 +++++++------- ios/tmp.xcconfig | 10 +--------- 5 files changed, 14 insertions(+), 36 deletions(-) diff --git a/ios/NewExpensify.xcodeproj/project.pbxproj b/ios/NewExpensify.xcodeproj/project.pbxproj index d1cd2d066833..64ed3fda8b02 100644 --- a/ios/NewExpensify.xcodeproj/project.pbxproj +++ b/ios/NewExpensify.xcodeproj/project.pbxproj @@ -29,7 +29,7 @@ 70CF6E82262E297300711ADC /* BootSplash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 70CF6E81262E297300711ADC /* BootSplash.storyboard */; }; BDB853621F354EBB84E619C2 /* ExpensifyNewKansas-MediumItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = D2AFB39EC1D44BF9B91D3227 /* ExpensifyNewKansas-MediumItalic.otf */; }; DD79042B2792E76D004484B4 /* RCTBootSplash.m in Sources */ = {isa = PBXBuildFile; fileRef = DD79042A2792E76D004484B4 /* RCTBootSplash.m */; }; - E51DC681C7DEE40AEBDDFBFE /* (null) in Frameworks */ = {isa = PBXBuildFile; }; + E51DC681C7DEE40AEBDDFBFE /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; E9DF872D2525201700607FDC /* AirshipConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = E9DF872C2525201700607FDC /* AirshipConfig.plist */; }; ED222ED90E074A5481A854FA /* ExpensifyNeue-BoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8B28D84EF339436DBD42A203 /* ExpensifyNeue-BoldItalic.otf */; }; F0C450EA2705020500FD2970 /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = F0C450E92705020500FD2970 /* colors.json */; }; @@ -124,7 +124,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E51DC681C7DEE40AEBDDFBFE /* (null) in Frameworks */, + E51DC681C7DEE40AEBDDFBFE /* BuildFile in Frameworks */, 5A464BC8112CDB1DE1E38F1C /* libPods-NewExpensify.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -722,11 +722,9 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = NewExpensify/Chat.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; ENABLE_BITCODE = NO; INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -740,7 +738,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.expensify.chat.dev; PRODUCT_NAME = "New Expensify Dev"; PROVISIONING_PROFILE_SPECIFIER = expensify_chat_dev; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = expensify_chat_dev; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -757,11 +754,9 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = NewExpensify/Chat.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; INFOPLIST_FILE = NewExpensify/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -774,7 +769,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.expensify.chat.dev; PRODUCT_NAME = "New Expensify Dev"; PROVISIONING_PROFILE_SPECIFIER = expensify_chat_dev; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = expensify_chat_dev; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -982,7 +976,6 @@ CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; ENABLE_BITCODE = NO; INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -996,7 +989,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.chat.expensify.chat; PRODUCT_NAME = "New Expensify"; PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = chat_expensify_appstore; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1106,7 +1098,6 @@ CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; ENABLE_BITCODE = NO; INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -1120,7 +1111,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.expensify.chat.adhoc; PRODUCT_NAME = "New Expensify AdHoc"; PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = expensify_chat_adhoc; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1224,7 +1214,6 @@ CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; INFOPLIST_FILE = NewExpensify/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1237,7 +1226,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.chat.expensify.chat; PRODUCT_NAME = "New Expensify"; PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = chat_expensify_appstore; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -1338,7 +1326,6 @@ CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; INFOPLIST_FILE = NewExpensify/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1351,7 +1338,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.expensify.chat.adhoc; PRODUCT_NAME = "New Expensify AdHoc"; PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = expensify_chat_adhoc; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index cb04e9c1ef90..8eed7d03e73f 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.3.81 + 1.3.87 CFBundleSignature ???? CFBundleURLTypes @@ -40,7 +40,7 @@ CFBundleVersion - 1.3.81.10 + 1.3.87.1 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index e597c10142d8..57b623864549 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.3.81 + 1.3.87 CFBundleSignature ???? CFBundleVersion - 1.3.81.10 + 1.3.87.1 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 54d0525fd3c9..cb120bca2b88 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -251,9 +251,9 @@ PODS: - nanopb/encode (= 2.30908.0) - nanopb/decode (2.30908.0) - nanopb/encode (2.30908.0) - - Onfido (27.4.0) - - onfido-react-native-sdk (7.4.0): - - Onfido (= 27.4.0) + - Onfido (28.3.0) + - onfido-react-native-sdk (8.3.0): + - Onfido (~> 28.3.0) - React - OpenSSL-Universal (1.1.1100) - Plaid (4.1.0) @@ -819,7 +819,7 @@ PODS: - SDWebImage/Core (~> 5.10) - SocketRocket (0.6.1) - Turf (2.6.1) - - VisionCamera (2.15.4): + - VisionCamera (2.16.2): - React - React-callinvoker - React-Core @@ -1204,8 +1204,8 @@ SPEC CHECKSUMS: MapboxMaps: af50ec61a7eb3b032c3f7962c6bd671d93d2a209 MapboxMobileEvents: de50b3a4de180dd129c326e09cd12c8adaaa46d6 nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96 - Onfido: e36f284b865adcf99d9c905590a64ac09d4a576b - onfido-react-native-sdk: 4ecde1a97435dcff9f00a878e3f8d1eb14fabbdc + Onfido: c7d010d9793790d44a07799d9be25aa8e3814ee7 + onfido-react-native-sdk: b346a620af5669f9fecb6dc3052314a35a94ad9f OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c Plaid: 7d340abeadb46c7aa1a91f896c5b22395a31fcf2 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef @@ -1287,7 +1287,7 @@ SPEC CHECKSUMS: SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Turf: 469ce2c3d22e5e8e4818d5a3b254699a5c89efa4 - VisionCamera: d3ec8883417a6a4a0e3a6ba37d81d22db7611601 + VisionCamera: 95f969b8950b411285579d633a1014782fe0e634 Yoga: 3efc43e0d48686ce2e8c60f99d4e6bd349aff981 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a diff --git a/ios/tmp.xcconfig b/ios/tmp.xcconfig index 2f2502669450..8b137891791f 100644 --- a/ios/tmp.xcconfig +++ b/ios/tmp.xcconfig @@ -1,9 +1 @@ -NEW_EXPENSIFY_URL=https:/$()/new.expensify.com/ -SECURE_EXPENSIFY_URL=https:/$()/secure.expensify.com/ -EXPENSIFY_URL=https:/$()/www.expensify.com/ -EXPENSIFY_PARTNER_NAME=chat-expensify-com -EXPENSIFY_PARTNER_PASSWORD=e21965746fd75f82bb66 -PUSHER_APP_KEY=268df511a204fbb60884 -USE_WEB_PROXY=false -ENVIRONMENT=production -SEND_CRASH_REPORTS=true + From c7a0c606782349385f45fee20cf463b28141787a Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Thu, 19 Oct 2023 04:06:21 -0400 Subject: [PATCH 30/51] cleanup changes --- src/languages/es.ts | 120 +++++++++--------- .../report/ContextMenu/ContextMenuActions.js | 4 +- 2 files changed, 61 insertions(+), 63 deletions(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 5b03ff63438d..1e3ea723288c 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2,81 +2,81 @@ import CONST from '../CONST'; import * as ReportActionsUtils from '../libs/ReportActionsUtils'; 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, + SettleExpensifyCardParams, SettledAfterAddedBankAccountParams, - PaidElsewhereWithAmountParams, - PaidWithExpensifyWithAmountParams, + 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, + WeSentYouMagicSignInLinkParams, + WelcomeEnterMagicCodeParams, + WelcomeNoteParams, + WelcomeToRoomParams, + ZipCodeExampleFormatParams, } from './types'; /* eslint-disable max-len */ @@ -417,8 +417,8 @@ export default { deleteConfirmation: ({action}: DeleteConfirmationParams) => `¿Estás seguro de que quieres eliminar este ${ReportActionsUtils.isMoneyRequestAction(action) ? 'pedido' : 'comentario'}`, onlyVisible: 'Visible sólo para', replyInThread: 'Responder en el hilo', - subscribeToThread: 'NEED TO TRANSLATE', - unsubscribeFromThread: 'NEED TO TRANSLATE', + subscribeToThread: 'Suscríbete al hilo', + unsubscribeFromThread: 'Darse de baja del hilo', flagAsOffensive: 'Marcar como ofensivo', }, emojiReactions: { diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 8006cd3e3f29..999f8e9fa26b 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -134,7 +134,7 @@ export default [ if (closePopover) { hideContextMenu(false, () => { ReportActionComposeFocusManager.focus(); - Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', ''), reportAction, reportID); + Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); }); return; } @@ -146,7 +146,6 @@ export default [ { isAnonymousAction: false, textTranslateKey: 'reportActionContextMenu.subscribeToThread', - // textTranslateKey: lodashGet(reportAction, 'childReportNotificationPreference', '0'), icon: Expensicons.Bell, successTextTranslateKey: '', successIcon: null, @@ -179,7 +178,6 @@ export default [ { isAnonymousAction: false, textTranslateKey: 'reportActionContextMenu.unsubscribeFromThread', - // textTranslateKey: lodashGet(reportAction, 'childReportNotificationPreference', '0'), icon: Expensicons.BellSlash, successTextTranslateKey: '', successIcon: null, From 8a609fd5b22dd83baf79b48f65e481d02ac25598 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Thu, 19 Oct 2023 04:07:45 -0400 Subject: [PATCH 31/51] revert accidental change --- src/languages/es.ts | 116 ++++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 1e3ea723288c..0ecff93d2758 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2,81 +2,81 @@ import CONST from '../CONST'; import * as ReportActionsUtils from '../libs/ReportActionsUtils'; import type { AddressLineParams, + CharacterLimitParams, + MaxParticipantsReachedParams, + ZipCodeExampleFormatParams, + LoggedInAsParams, + NewFaceEnterMagicCodeParams, + WelcomeEnterMagicCodeParams, AlreadySignedInParams, - AmountEachParams, + GoBackMessageParams, + LocalTimeParams, + EditActionParams, + DeleteActionParams, + DeleteConfirmationParams, + BeginningOfChatHistoryDomainRoomPartOneParams, BeginningOfChatHistoryAdminRoomPartOneParams, BeginningOfChatHistoryAnnounceRoomPartOneParams, BeginningOfChatHistoryAnnounceRoomPartTwo, - BeginningOfChatHistoryDomainRoomPartOneParams, - CharacterLimitParams, - ConfirmThatParams, - DateShouldBeAfterParams, - DateShouldBeBeforeParams, - DeleteActionParams, - DeleteConfirmationParams, + WelcomeToRoomParams, + ReportArchiveReasonsClosedParams, + ReportArchiveReasonsMergedParams, + ReportArchiveReasonsRemovedFromPolicyParams, + ReportArchiveReasonsPolicyDeletedParams, + RequestCountParams, + SettleExpensifyCardParams, + RequestAmountParams, + SplitAmountParams, DidSplitAmountMessageParams, - EditActionParams, - EnglishTranslation, - EnterMagicCodeParams, - FormattedMaxLengthParams, - GoBackMessageParams, - GoToRoomParams, - IncorrectZipFormatParams, - InstantSummaryParams, - LocalTimeParams, - LoggedInAsParams, - ManagerApprovedParams, - MaxParticipantsReachedParams, - NewFaceEnterMagicCodeParams, - NoLongerHaveAccessParams, - NotAllowedExtensionParams, - NotYouParams, - OOOEventSummaryFullDayParams, - OOOEventSummaryPartialDayParams, - OurEmailProviderParams, - PaidElsewhereWithAmountParams, - PaidWithExpensifyWithAmountParams, - ParentNavigationSummaryParams, + AmountEachParams, PayerOwesAmountParams, PayerOwesParams, PayerPaidAmountParams, PayerPaidParams, PayerSettledParams, - RemovedTheRequestParams, - RenamedRoomActionParams, - ReportArchiveReasonsClosedParams, - ReportArchiveReasonsMergedParams, - ReportArchiveReasonsPolicyDeletedParams, - ReportArchiveReasonsRemovedFromPolicyParams, - RequestAmountParams, - RequestCountParams, - RequestedAmountMessageParams, - ResolutionConstraintsParams, - RoomNameReservedErrorParams, - RoomRenamedToParams, - SetTheDistanceParams, - SetTheRequestParams, - SettleExpensifyCardParams, + WaitingOnBankAccountParams, SettledAfterAddedBankAccountParams, - SizeExceededParams, - SplitAmountParams, - StepCounterParams, - TagSelectionParams, + PaidElsewhereWithAmountParams, + PaidWithExpensifyWithAmountParams, ThreadRequestReportNameParams, ThreadSentMoneyReportNameParams, - ToValidateLoginParams, + SizeExceededParams, + ResolutionConstraintsParams, + NotAllowedExtensionParams, + EnterMagicCodeParams, TransferParams, + InstantSummaryParams, + NotYouParams, + DateShouldBeBeforeParams, + DateShouldBeAfterParams, + IncorrectZipFormatParams, + WeSentYouMagicSignInLinkParams, + ToValidateLoginParams, + NoLongerHaveAccessParams, + OurEmailProviderParams, + ConfirmThatParams, UntilTimeParams, - UpdatedTheDistanceParams, - UpdatedTheRequestParams, + StepCounterParams, UserIsAlreadyMemberParams, - WaitingOnBankAccountParams, - WalletProgramParams, - WeSentYouMagicSignInLinkParams, - WelcomeEnterMagicCodeParams, + GoToRoomParams, WelcomeNoteParams, - WelcomeToRoomParams, - ZipCodeExampleFormatParams, + RoomNameReservedErrorParams, + RenamedRoomActionParams, + RoomRenamedToParams, + OOOEventSummaryFullDayParams, + OOOEventSummaryPartialDayParams, + ParentNavigationSummaryParams, + ManagerApprovedParams, + SetTheRequestParams, + SetTheDistanceParams, + UpdatedTheRequestParams, + UpdatedTheDistanceParams, + RemovedTheRequestParams, + FormattedMaxLengthParams, + RequestedAmountMessageParams, + TagSelectionParams, + EnglishTranslation, + WalletProgramParams, } from './types'; /* eslint-disable max-len */ From 71cb32ba907148e412bd9841d2f111cf69908091 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Thu, 19 Oct 2023 12:21:41 -0700 Subject: [PATCH 32/51] Extra merge changes that got left out --- src/components/MessagesRow.js | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/components/MessagesRow.js b/src/components/MessagesRow.js index 37366ce5a442..6f4aa13a36f8 100644 --- a/src/components/MessagesRow.js +++ b/src/components/MessagesRow.js @@ -25,15 +25,19 @@ const propTypes = { /** Additional style object for the container */ containerStyles: stylePropTypes, + + /** Whether we can dismiss the error message */ + canDismissError: PropTypes.bool, }; const defaultProps = { messages: {}, onClose: () => {}, containerStyles: [], + canDismissError: true, }; -function MessagesRow({messages, type, onClose, containerStyles}) { +function MessagesRow({messages, type, onClose, containerStyles, canDismissError}) { const {translate} = useLocalize(); if (_.isEmpty(messages)) { return null; @@ -46,16 +50,18 @@ function MessagesRow({messages, type, onClose, containerStyles}) { messages={messages} type={type} /> - - - - - + {canDismissError && ( + + + + + + )} ); } From db19896eff8e7589909a1b7b3cd9955c3cc77eb5 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Thu, 19 Oct 2023 18:57:10 -0400 Subject: [PATCH 33/51] remove extra parameters --- src/libs/actions/Report.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 7d8bce044f94..cdc07df2ea13 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1354,7 +1354,7 @@ function updateNotificationPreference(reportID, previousValue, newValue, navigat value: {[parentReportActionID]: {childReportNotificationPreference: previousValue}}, }); } - API.write('UpdateReportNotificationPreference', {reportID, notificationPreference: newValue, parentReportID, parentReportActionID}, {optimisticData, failureData}); + API.write('UpdateReportNotificationPreference', {reportID, notificationPreference: newValue}, {optimisticData, failureData}); if (navigate) { Navigation.goBack(ROUTES.REPORT_SETTINGS.getRoute(reportID)); } From 986529036ba06832f10ae7f3dc387872e6519ea5 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Thu, 19 Oct 2023 18:58:34 -0400 Subject: [PATCH 34/51] modify spanish translation --- src/languages/es.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 0ecff93d2758..287790fe24c7 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -417,7 +417,7 @@ export default { deleteConfirmation: ({action}: DeleteConfirmationParams) => `¿Estás seguro de que quieres eliminar este ${ReportActionsUtils.isMoneyRequestAction(action) ? 'pedido' : 'comentario'}`, onlyVisible: 'Visible sólo para', replyInThread: 'Responder en el hilo', - subscribeToThread: 'Suscríbete al hilo', + subscribeToThread: 'Suscribirse al hilo', unsubscribeFromThread: 'Darse de baja del hilo', flagAsOffensive: 'Marcar como ofensivo', }, From e93d6dde643a722b4765589fbe3a8181ea76216e Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Fri, 20 Oct 2023 19:22:58 -0400 Subject: [PATCH 35/51] unsubscribe on new comment --- src/libs/ReportUtils.js | 11 +++++++++++ src/libs/actions/Report.js | 3 ++- .../report/ContextMenu/ContextMenuActions.js | 17 +++++++++++------ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index efd4557aea8b..8ea5c20b324f 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -777,6 +777,16 @@ function getReport(reportID) { return lodashGet(allReports, `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {}) || {}; } +/** + * Returns whether or not the author of the action is this user + * + * @param {Object} reportAction + * @returns {Boolean} + */ +function isActionCreator(reportAction) { + return reportAction.actorAccountID === currentUserAccountID +} + /** * Can only delete if the author is this user and the action is an ADDCOMMENT action or an IOU action in an unsettled report, or if the user is a * policy admin @@ -3969,6 +3979,7 @@ export { canEditReportAction, canFlagReportAction, shouldShowFlagComment, + isActionCreator, canDeleteReportAction, canLeaveRoom, sortReportsByLastRead, diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 93b2d72f9d96..2e714154c8aa 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1398,7 +1398,8 @@ function toggleSubscribeToChildReport(childReportID = '0', parentReportAction = const participantLogins = PersonalDetailsUtils.getLoginsByAccountIDs(newChat.participantAccountIDs); openReport(newChat.reportID, participantLogins, newChat, parentReportAction.reportActionID); - updateNotificationPreference(newChat.reportID, prevNotificationPreference, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, false, parentReportID, parentReportAction.reportActionID); + const notificationPreference = prevNotificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN ? CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS : CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; + updateNotificationPreference(newChat.reportID, prevNotificationPreference, notificationPreference, false, parentReportID, parentReportAction.reportActionID); } } diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 999f8e9fa26b..cb26af15181d 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -150,11 +150,12 @@ export default [ successTextTranslateKey: '', successIcon: null, shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { - const childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); - const subscribed = childReportNotificationPreference && childReportNotificationPreference !== 'hidden'; - if (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) { - return false; + let childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); + if (!childReportNotificationPreference) { + const isActionCreator = ReportUtils.isActionCreator(reportAction); + childReportNotificationPreference = isActionCreator ? CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS : CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; } + const subscribed = childReportNotificationPreference !== 'hidden'; const isCommentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID); const isReportPreviewAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW; const isIOUAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && !ReportActionsUtils.isSplitBillAction(reportAction); @@ -182,8 +183,12 @@ export default [ successTextTranslateKey: '', successIcon: null, shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { - const childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); - const subscribed = childReportNotificationPreference && childReportNotificationPreference !== 'hidden'; + let childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); + if (!childReportNotificationPreference) { + const isActionCreator = ReportUtils.isActionCreator(reportAction); + childReportNotificationPreference = isActionCreator ? CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS : CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; + } + const subscribed = childReportNotificationPreference !== 'hidden'; if (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) { return false; } From 6caf051a8d0e1fb734c6fd1887f36afba9fe7fd6 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Fri, 20 Oct 2023 19:54:04 -0400 Subject: [PATCH 36/51] prettier --- src/libs/ReportUtils.js | 2 +- src/libs/actions/Report.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 8ea5c20b324f..7f231381c85d 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -784,7 +784,7 @@ function getReport(reportID) { * @returns {Boolean} */ function isActionCreator(reportAction) { - return reportAction.actorAccountID === currentUserAccountID + return reportAction.actorAccountID === currentUserAccountID; } /** diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 2e714154c8aa..38889a474231 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1398,7 +1398,8 @@ function toggleSubscribeToChildReport(childReportID = '0', parentReportAction = const participantLogins = PersonalDetailsUtils.getLoginsByAccountIDs(newChat.participantAccountIDs); openReport(newChat.reportID, participantLogins, newChat, parentReportAction.reportActionID); - const notificationPreference = prevNotificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN ? CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS : CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; + const notificationPreference = + prevNotificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN ? CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS : CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; updateNotificationPreference(newChat.reportID, prevNotificationPreference, notificationPreference, false, parentReportID, parentReportAction.reportActionID); } } From c4182b36cb17a87789777f2296ae48f45040ec25 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Fri, 20 Oct 2023 20:52:20 -0400 Subject: [PATCH 37/51] change subscribe based on user created --- .../home/report/ContextMenu/ContextMenuActions.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index cb26af15181d..c4fac6d21283 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -162,7 +162,11 @@ export default [ return !subscribed && (isCommentAction || isReportPreviewAction || isIOUAction); }, onPress: (closePopover, {reportAction, reportID}) => { - const childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); + let childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); + if (!childReportNotificationPreference) { + const isActionCreator = ReportUtils.isActionCreator(reportAction); + childReportNotificationPreference = isActionCreator ? CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS : CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; + } if (closePopover) { hideContextMenu(false, () => { ReportActionComposeFocusManager.focus(); @@ -198,7 +202,11 @@ export default [ return subscribed && (isCommentAction || isReportPreviewAction || isIOUAction); }, onPress: (closePopover, {reportAction, reportID}) => { - const childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); + let childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', ''); + if (!childReportNotificationPreference) { + const isActionCreator = ReportUtils.isActionCreator(reportAction); + childReportNotificationPreference = isActionCreator ? CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS : CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; + } if (closePopover) { hideContextMenu(false, () => { ReportActionComposeFocusManager.focus(); From f2d3c241fa3b53d4de28e35c98335fda5fb6fbae Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Tue, 24 Oct 2023 18:03:18 -0700 Subject: [PATCH 38/51] Review feedback and rename prop --- src/components/MessagesRow.js | 14 +++++++------- src/components/OfflineWithFeedback.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/MessagesRow.js b/src/components/MessagesRow.js index 6f4aa13a36f8..8a699265bb56 100644 --- a/src/components/MessagesRow.js +++ b/src/components/MessagesRow.js @@ -14,10 +14,10 @@ import stylePropTypes from '../styles/stylePropTypes'; import useLocalize from '../hooks/useLocalize'; const propTypes = { - // The error messages to display + /* The messages to display */ messages: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object]))])), - // The type of message, 'error' shows a red dot, 'success' shows a green dot + /* The type of message, 'error' shows a red dot, 'success' shows a green dot */ type: PropTypes.oneOf(['error', 'success']).isRequired, /** A function to run when the X button next to the message is clicked */ @@ -26,18 +26,18 @@ const propTypes = { /** Additional style object for the container */ containerStyles: stylePropTypes, - /** Whether we can dismiss the error message */ - canDismissError: PropTypes.bool, + /** Whether we can dismiss the messages */ + canDismiss: PropTypes.bool, }; const defaultProps = { messages: {}, onClose: () => {}, containerStyles: [], - canDismissError: true, + canDismiss: true, }; -function MessagesRow({messages, type, onClose, containerStyles, canDismissError}) { +function MessagesRow({messages, type, onClose, containerStyles, canDismiss}) { const {translate} = useLocalize(); if (_.isEmpty(messages)) { return null; @@ -50,7 +50,7 @@ function MessagesRow({messages, type, onClose, containerStyles, canDismissError} messages={messages} type={type} /> - {canDismissError && ( + {canDismiss && ( )} From 7e81daeb9e92adea827ec62b73af638c0c4f6c34 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Tue, 24 Oct 2023 19:11:57 -0700 Subject: [PATCH 39/51] WIP remove secondary login messages with members --- src/libs/actions/Policy.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index f275ab420e79..e141bf382acb 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -14,6 +14,7 @@ import * as ErrorUtils from '../ErrorUtils'; import * as ReportUtils from '../ReportUtils'; import * as PersonalDetailsUtils from '../PersonalDetailsUtils'; import Log from '../Log'; +import CollectionUtils from '../CollectionUtils'; const allPolicies = {}; Onyx.connect({ @@ -44,6 +45,18 @@ Onyx.connect({ }, }); +const allPolicyMembers = {}; +Onyx.connect({ + key: ONYXKEYS.COLLECTION.POLICY_MEMBERS, + callback: (val, key) => { + if (!val || !key) { + return; + } + const policyID = CollectionUtils.extractCollectionItemID(key); + allPolicyMembers[policyID] = val; + }, +}); + let lastAccessedWorkspacePolicyID = null; Onyx.connect({ key: ONYXKEYS.LAST_ACCESSED_WORKSPACE_POLICY_ID, @@ -242,6 +255,27 @@ function removeMembers(accountIDs, policyID) { })), ]; + // If the policy has primaryLoginsInvited, then it displays informative messages on the members page about which primary logins were added by secondary logins. + // If we delete all these logins then we should clear the informative messages since they are no longer relevant. + if (!_.isEmpty(policy.primaryLoginsInvited)) { + // Take the current policy members and remove them optimistically + const policyMemberAccountIDs = _.keys(allPolicyMembers[policyID]); + const remainingMemberAccountIDs = _.difference(policyMemberAccountIDs, accountIDs); + const remainingLogins = PersonalDetailsUtils.getLoginsByAccountIDs(remainingMemberAccountIDs); + const invitedPrimaryToSecondaryLogins = _.invert(policy.primaryLoginsInvited); + + // Then, if no remaining members exist in primaryLoginsInvited, delete it + if (!_.some(remainingLogins, (remainingLogin) => Boolean(invitedPrimaryToSecondaryLogins[remainingLogin]))) { + optimisticData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`, + value: { + primaryLoginsInvited: null, + }, + }); + } + } + const successData = [ { onyxMethod: Onyx.METHOD.MERGE, From b1ff83927424a9520c9f073d5c53f33e211031b3 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Wed, 25 Oct 2023 08:38:47 -0700 Subject: [PATCH 40/51] Fix remove secondary login messages with members --- src/libs/actions/Policy.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index e141bf382acb..854a7850c585 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -45,16 +45,11 @@ Onyx.connect({ }, }); -const allPolicyMembers = {}; +let allPolicyMembers; Onyx.connect({ key: ONYXKEYS.COLLECTION.POLICY_MEMBERS, - callback: (val, key) => { - if (!val || !key) { - return; - } - const policyID = CollectionUtils.extractCollectionItemID(key); - allPolicyMembers[policyID] = val; - }, + waitForCollectionCallback: true, + callback: (val) => (allPolicyMembers = val), }); let lastAccessedWorkspacePolicyID = null; @@ -259,12 +254,12 @@ function removeMembers(accountIDs, policyID) { // If we delete all these logins then we should clear the informative messages since they are no longer relevant. if (!_.isEmpty(policy.primaryLoginsInvited)) { // Take the current policy members and remove them optimistically - const policyMemberAccountIDs = _.keys(allPolicyMembers[policyID]); + const policyMemberAccountIDs = _.map(allPolicyMembers[`${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${policyID}`], (value, key) => Number(key)); const remainingMemberAccountIDs = _.difference(policyMemberAccountIDs, accountIDs); const remainingLogins = PersonalDetailsUtils.getLoginsByAccountIDs(remainingMemberAccountIDs); const invitedPrimaryToSecondaryLogins = _.invert(policy.primaryLoginsInvited); - // Then, if no remaining members exist in primaryLoginsInvited, delete it + // Then, if no remaining members exist that were invited by a secondary login, clear the informative messages if (!_.some(remainingLogins, (remainingLogin) => Boolean(invitedPrimaryToSecondaryLogins[remainingLogin]))) { optimisticData.push({ onyxMethod: Onyx.METHOD.MERGE, From b9d4d475e0822b97fe40356a43473582a569b3d3 Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Wed, 25 Oct 2023 22:52:13 +0700 Subject: [PATCH 41/51] fix trim the draft private note --- src/libs/actions/Report.js | 2 +- src/pages/PrivateNotes/PrivateNotesEditPage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 29ebcaff121f..d2062e2dcb58 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -2359,7 +2359,7 @@ function clearPrivateNotesError(reportID, accountID) { } function getDraftPrivateNote(reportID) { - return draftNoteMap[reportID]; + return draftNoteMap[reportID] || ''; } /** diff --git a/src/pages/PrivateNotes/PrivateNotesEditPage.js b/src/pages/PrivateNotes/PrivateNotesEditPage.js index d8b91c27c501..9be0f42e9a5b 100644 --- a/src/pages/PrivateNotes/PrivateNotesEditPage.js +++ b/src/pages/PrivateNotes/PrivateNotesEditPage.js @@ -64,7 +64,7 @@ function PrivateNotesEditPage({route, personalDetailsList, session, report}) { // We need to edit the note in markdown format, but display it in HTML format const parser = new ExpensiMark(); const [privateNote, setPrivateNote] = useState( - () => Report.getDraftPrivateNote(report.reportID) || parser.htmlToMarkdown(lodashGet(report, ['privateNotes', route.params.accountID, 'note'], '')).trim(), + () => Report.getDraftPrivateNote(report.reportID).trim() || parser.htmlToMarkdown(lodashGet(report, ['privateNotes', route.params.accountID, 'note'], '')).trim(), ); /** From 7eb0ba5710f17decd7b9b028fd78b780eb3e64a3 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Wed, 25 Oct 2023 12:24:40 -0700 Subject: [PATCH 42/51] Fix lint, remove unused import --- src/libs/actions/Policy.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index 854a7850c585..f06757362f6a 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -14,7 +14,6 @@ import * as ErrorUtils from '../ErrorUtils'; import * as ReportUtils from '../ReportUtils'; import * as PersonalDetailsUtils from '../PersonalDetailsUtils'; import Log from '../Log'; -import CollectionUtils from '../CollectionUtils'; const allPolicies = {}; Onyx.connect({ From d7d19c14dc898762fb1b552eaf0eb4664e3b6f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Miko=C5=82ajczak?= Date: Thu, 26 Oct 2023 21:19:17 +0200 Subject: [PATCH 43/51] hijack ref without hover support --- src/components/Hoverable/index.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/Hoverable/index.js b/src/components/Hoverable/index.js index 2ded0e52e94d..62f42a9b4b93 100644 --- a/src/components/Hoverable/index.js +++ b/src/components/Hoverable/index.js @@ -194,15 +194,21 @@ const Hoverable = React.forwardRef(({disabled, onHoverIn, onHoverOut, onMouseEnt [child.props], ); + // We need to access the ref of a children from both parent and current component + // So we pass it to current ref and assign it once again to the child ref prop + const hijackRef = (el) => { + ref.current = el; + assignRef(child.ref, el); + }; + if (!DeviceCapabilities.hasHoverSupport()) { - return child; + return React.cloneElement(child, { + ref: hijackRef, + }); } return React.cloneElement(child, { - ref: (el) => { - ref.current = el; - assignRef(child.ref, el); - }, + ref: hijackRef, onMouseEnter: enableHoveredOnMouseEnter, onMouseLeave: disableHoveredOnMouseLeave, onBlur: disableHoveredOnBlur, From dfbaffeb345c3e1fa0ad42d99851a5a085eceff6 Mon Sep 17 00:00:00 2001 From: isabelastisser <31258516+isabelastisser@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:51:11 -0400 Subject: [PATCH 44/51] Update QuickBooks-Online.md Adding the QuickBooks Online resource to the help site. --- .../QuickBooks-Online.md | 321 +++++++++++++++++- 1 file changed, 318 insertions(+), 3 deletions(-) diff --git a/docs/articles/new-expensify/integrations/accounting-integrations/QuickBooks-Online.md b/docs/articles/new-expensify/integrations/accounting-integrations/QuickBooks-Online.md index aa5f40ee4e5d..7a0717eeb5d1 100644 --- a/docs/articles/new-expensify/integrations/accounting-integrations/QuickBooks-Online.md +++ b/docs/articles/new-expensify/integrations/accounting-integrations/QuickBooks-Online.md @@ -1,5 +1,320 @@ --- -title: QuickBooks Online -description: QuickBooks Online +title: The QuickBooks Online Integration +description: Expensify's integration with QuickBooks Online streamlines your expense management. + --- -## Resource Coming Soon! +# Overview + +The Expensify integration with QuickBooks Online brings in your expense accounts and other data and even exports reports directly to QuickBooks for easy reconciliation. Plus, with advanced features in QuickBooks Online, you can fine-tune coding settings in Expensify for automated data export to optimize your accounting workflow. + +## Before connecting + +It's crucial to understand the requirements based on your specific QuickBooks subscription: + +- While all the features are available in Expensify, their accessibility may vary depending on your QuickBooks Online subscription. +- An error will occur if you try to export to QuickBooks with a feature enabled that isn't part of your subscription. +- Please be aware that Expensify does not support the Self-Employed subscription in QuickBooks Online. + +# How to connect to QuickBooks Online + +## Step 1: Setup employees in QuickBooks Online + +Employees must be set up as either Vendors or Employees in QuickBooks Online. Make sure to include the submitter's email in their record. + +If you use vendor records, you can export as Vendor Bills, Checks, or Journal Entries. If you use employee records, you can export as Checks or Journal Entries (if exporting against a liability account). + +Additional Options for Streamlined Setup: + +- Automatic Vendor Creation: Enable “Automatically Create Entities” in your connection settings to automatically generate Vendor or Employee records upon export for submitters that don't already exist in QBO. +- Employee Setup Considerations: If setting up submitters as Employees, ensure you activate QuickBooks Online Payroll. This will grant access to the Employee Profile tab to input employee email addresses. + +## Step 2: Connect Expensify and QuickBooks Online + +- Navigate to Settings > Workspaces > Group > [Workspace Name] > Connections > QuickBooks Online. Click Connect to QuickBooks. +- Enter your QuickBooks Online Administrator’s login information and choose the QuickBooks Online Company File you want to connect to Expensify (you can connect one Company File per Workspace). Then Click Authorize. +- Enter your QuickBooks Online Administrator’s login information and choose the QuickBooks Online Company File you want to connect to Expensify (you can connect one Company File per Workspace): + +Exporting Historical Reports to QuickBooks Online: + +After connecting QuickBooks Online to Expensify, you may receive a prompt to export all historical reports from Expensify. To export multiple reports at once, follow these steps: + +a. Go to the Reports page on the web. + +b. Tick the checkbox next to the reports you want to export. + +c. Click 'Export To' and select 'QuickBooks Online' from the drop-down list. + +If you don't want to export specific reports, click “Mark as manually entered” on the report. + +# How to configure export settings for QuickBooks Online + +Our QuickBooks Online integration offers a range of features. This section will focus on Export Settings and how to set them up. + +## Preferred Exporter + +Any Workspace admin can export to your accounting integration, but the Preferred Exporter can be chosen to automate specific steps. You can set this role from Settings > Workspaces > Group > [Workspace Name] > Connections > Configure > Export > Preferred Exporter. + +The Preferred Exporter: + +- Is the user whose Concierge performs all automated exports on behalf of. +- Is the only user who will see reports awaiting export in their **Home.** +- Must be a **Domain Admin** if you have set individual GL accounts for Company Card export. +- Must be a **Domain Admin** if this is the Preferred Workspace for any Expensify Card domain using Automatic Reconciliation. + +## Date + +When exporting reports to QuickBooks Online, you can choose the report's **submitted date**, the report's **exported date**, or the **date of the last expense on the report.** + +Most export options (Check, Journal Entry, and Vendor Bill) will create a single itemized entry with one date. +Please note that if you choose a Credit Card or Debit Card for non-reimbursable expenses, we'll use the transaction date on each expense during export. + +# Reimbursable expenses + +Reimbursable expenses export to QuickBooks Online as: + +- Vendor Bills +- Checks +- Journal Entries + +## Vendor bill (recommended) + +This is a single itemized vendor bill for each Expensify report. If the accounting period is closed, we will post the vendor bill on the first day of the next open period. If you export as Vendor Bills, you can also choose to Sync reimbursed reports (set on the Advanced tab). **An A/P account is required to export to a vendor bill. Here is a screenshot of how your expenses map in QuickBooks.** + +The submitter will be listed as the vendor in the vendor bill. + +## Check + +This is a single itemized check for each Expensify report. You can mark a check to be printed later in QuickBooks Online. + +## Journal entry + +This is a single itemized journal entry for each Expensify report. + +# Non-reimbursable expenses + +Non-reimbursable expenses export to QuickBooks Online as: + +- Credit Card expenses +- Debit Card Expenses +- Vendor Bills + +## Credit/debit card + +Using Credit/Debit Card Transactions: + +- Each expense will be exported as a bank transaction with its transaction date. +- If you split an expense in Expensify, we'll consolidate it into a single credit card transaction in QuickBooks with multiple line items posted to the corresponding General Ledger accounts. + +Pro-Tip: To ensure the payee field in QuickBooks Online reflects the merchant name for Credit Card expenses, ensure there's a matching Vendor in QuickBooks Online. Expensify checks for an exact match during export. If none are found, the payee will be mapped to a vendor we create and labeled as Credit Card Misc. or Debit Card Misc. + +If you centrally manage your company cards through Domains, you can export expenses from each card to a specific account in QuickBooks. + +## Vendor Bill + +- A single detailed vendor bill is generated for each Expensify report. If the accounting period is closed, the vendor bill will be posted on the first day of the next open period. If you choose to export non-reimbursable expenses as Vendor Bills, you can assign a default vendor to the bill. +- The export will use your default vendor if you have Default Vendor enabled. If the Default Vendor is disabled, the report's submitter will be set as the Vendor in QuickBooks. + +Billable Expenses: + +- In Expensify, you can designate expenses as billable. These will be exported to QuickBooks Online with the billable flag. - This feature applies only to expenses exported as Vendor Bills or Checks. To maximize this functionality, ensure that any billable expense is associated with a Customer/Job. + +## Export Invoices + +If you are creating Invoices in Expensify and exporting these to QuickBooks Online, this is the account the invoice will appear against. + +# Configure coding for QuickBooks Online + +The coding tab is where your information is configured for Expensify; this will allow employees to code expenses and reports accurately. + +- Categories +- Classes and/or Customers/Projects +- Locations +- Items +- Tax + +## Categories + +QuickBooks Online expense accounts will be automatically imported into Expensify as Categories. + +## Account Import + +Equity type accounts will also be imported as categories. + +Important notes: + +- Other Current Liabilities can only be exported as Journal Entries if the submitter is set up as an Employee in QuickBooks. +- Exchange Gain or Loss detail type does not import. + +Recommended steps to take after importing the expense accounts from QuickBooks to Expensify: + +- Go to Settings > Workspaces > Groups > [Workspace Name] > Categories to see the accounts imported from QuickBooks Online. +- Use the enable/disable button to choose which Categories to make available to your employees, and set Category specific rules via the blue settings cog. +- If necessary, edit the names of imported Categories to make expense coding easier for your employees. (Please Note: If you make any changes to these accounts in QuickBooks Online, the category names on Expensify's side will revert to match the name of the account in QuickBooks Online the next time you sync). +- If you use Items in QuickBooks Online, you can import them into Expensify as Categories. + +Please note that each expense has to have a category selected to export to QuickBooks Online. The chosen category has to be imported from QuickBooks Online and cannot be manually created within the Workspace settings. + +## Classes and Customers/Projects + +If you use Classes or Customers/Projects in QuickBooks Online, you can import those into Expensify as Tags or Report Fields: + +- Tags let you apply a Class and/or Customer/Project to each expense +- Report Fields enables you to apply a Class and/or Customer/Project to all expenses on a report. + +Note: Although Projects can be imported into Expensify and coded to expenses, due to the limitations of the QuickBooks API, expenses cannot be created within the Projects module in QuickBooks. + +## Locations + +Locations can be imported into Expensify as a Report Field or, if you export reimbursable expenses as Journal Entries and non-reimbursable expenses as Credit/Debit Card, you can import Locations as Tags. + +## Items + +If you use Items in QuickBooks Online, you can import Items defined with Purchasing Information (with or without Sales Information) into Expensify as Categories. +## Tax + +- Using our tax tracking feature, you can assign a tax rate and amount to each expense. +-To activate tax tracking, go to connection configuration and enable it. This will automatically import purchasing taxes from QuickBooks Online into Expensify. +- After the connection is set, navigate to Settings > Worspaces > Groups > Workspace Name] > Tax. Here, you can view the taxes imported from QuickBooks Online. +- Use the enable/disable button to choose which taxes are accessible to your employees. +- Set a default tax for the Company Workspace, which will automatically apply to all new expenses. +- Please note that, at present, tax cannot be exported to Journal Entries in QuickBooks Online. +- Expensify performs a daily sync to ensure your information is up-to-date. This minimizes errors from outdated QuickBooks Online data and saves you time on syncing. + +# How to configure advanced settings for QuickBooks Online + +The advanced settings are where functionality for automating and customizing the QuickBooks Online integration can be enabled. +Navigate to this section of your Workspace by following Settings > Workspaces > Group > [Workspace Name] > Connections > Configure button > Advanced tab. +## Auto Sync +With QuickBooks Online auto-sync, once a non-reimbursable report is final approved in Expensify, it's automatically queued for export to QuickBooks Online. For expenses eligible for reimbursement with a linked business bank account, they'll sync when marked as reimbursed. + +## Newly Imported Categories + +This setting determines the default status of newly imported categories from QuickBooks Online to Expensify, either enabled or disabled. + +## Invite Employees + +Enabling this automatically invites all Employees from QuickBooks Online to the connected Expensify Company Workspace. If not, you can manually invite or import them using a CSV file. + +## Automatically Create Entities + +When exporting reimbursable expenses as Vendor Bills or Journal Entries, Expensify will automatically create a vendor in QuickBooks if one doesn't exist. It will also generate a customer when exporting Invoices. + +## Sync Reimbursed Reports + +Enabling this marks the Vendor Bill as paid in QuickBooks Online when you reimburse a report via ACH direct deposit in Expensify. If reimbursing outside Expensify, marking the Vendor Bill as paid will automatically in QuickBooks Online update the report as reimbursed in Expensify. Note: After enabling this feature, select your QuickBooks Account in the drop-down, indicating the bank account for reimbursements. + +## Collection Account + +If you are exporting Invoices from Expensify to Quickbooks Online, this is the account the Invoice will appear against once marked as Paid. + +# Deep Dive + +## Preventing Duplicate Transactions in QuickBooks + +When importing a banking feed directly into QuickBooks Online while also importing transactions from Expensify, it's possible to encounter duplicate entries in QuickBooks. To prevent this, follow these steps: + +Step 1: Complete the Approval Process in Expensify + +- Before exporting any expenses to QuickBooks Online, ensure they are added to a report and the report receives approval. Depending on your Workspace setup, reports may require approval from one or more individuals. The approval process concludes when the last user who views the report selects "Final Approve." + +Step 2: Exporting Reports to QuickBooks Online + +- To ensure expenses exported from Expensify match seamlessly in the QuickBooks Banking platform, make sure these expenses are marked as non-reimbursable within Expensify and that “Credit Card” is selected as the non-reimbursable export option for your expenses. + +Step 3: Importing Your Credit Card Transactions into QuickBooks Online + +- After completing Steps 1 and 2, you can import your credit card transactions into QuickBooks Online. These imported banking transactions will align with the ones brought in from Expensify. QuickBooks Online will guide you through the process of matching these transactions, similar to the example below: + +## Tax in QuickBooks Online + +If your country applies taxes on sales (like GST, HST, or VAT), you can utilize Expensify's Tax Tracking along with your QuickBooks Online tax rates. Please note: Tax Tracking is not available for Workspaces linked to the US version of QuickBooks Online. If you need assistance applying taxes after reports are exported, contact QuickBooks. + +To get started: + +- Go to Settings > Workpaces > Group > [Workspace Name] > Connections, and click Configure. +- Navigate to the Coding tab. +- Turn on 'T.''. +- Click Save. This imports the Tax Name and rate from QuickBooks Online. +- Visit Settings > Workspaces > Group > [Workspace Name] > Tax to view the imported taxes. +- Use the enable/disable button in the Tax tab to choose which taxes your employees can use. + +Remember, you can also set a default tax rate for the entire Workspace. This will be automatically applied to all new expenses. The user can still choose a different tax rate for each expense. + +Tax information can't be sent to Journal Entries in QuickBooks Online. Also, when dealing with multiple tax rates, where one receipt has different tax rates (like in the EU, UK, and Canada), users should split the expense into the respective parts and set the appropriate tax rate for each part. + +## Multi-currency + +When working with QuickBooks Online Multi-Currency, there are some things to remember when exporting Vendor Bills and Check! Make sure the vendor's currency and the Accounts Payable (A/P) bank account match. + +In QuickBooks Online, the currency conversion rates are not applied when exporting. All transactions will be exported with a 1:1 conversion rate, so for example, if a vendor's currency is CAD (Canadian Dollar) and the home currency is USD (US Dollar), the export will show these currencies without applying conversion rates. + +To correct this, you must manually update the conversion rate after the report has been exported to QuickBooks Online. + +Specifically for Vendor Bills: + +If multi-currency is enabled and the Vendor's currency is different from the Workspace currency, OR if QuickBooks Online home currency is foreign from the Workspace currency, then: + +- We create the Vendor Bill in the Vendor's currency (this is a QuickBooks Online requirement - we don't have a choice) +- We set the exchange rate between the home currency and the Vendor's currency +- We convert line item amounts to the vendor's currency + +Let's consider this example: + +- QuickBooks Online home currency is USD +- Vendor's currency is VND +- Workspace (report) currency is JPY + +Upon export, we: + +1. Specified the bill is in VND +2. Set the exchange rate between VND and USD (home currency), computed at the time of export. +3. Converted line items from JPY (currency in Expensify) to VND +4. QuickBooks Online automatically computed the USD amount (home currency) based on the exchange rate we specified +5. Journal Entries, Credit Card, and Debit Card: + +Multi-currency exports will fail as the account currency must match both the vendor and home currencies. + +## Report Fields + +Report fields are a handy way to collect specific information for a report tailored to your organization's needs. They can specify a project, business trip, client, location, and more! + +When integrating Expensify with Your Accounting Software, you can create your report fields in your accounting software so the next time you sync your Workspace, these fields will be imported into Expensify. + +To select how a specific field imports to Expensify, head to Settings > Workspaces > Group > +[Workspace Name] > Connections > Accounting Integrations > QuickBooks Online > Configure > Coding. + +Here are the QuickBooks Online fields that can be mapped as a report field within Expensify: + +- Classes +- Customers/Projects +- Locations + +# FAQ + +## What happens if the report can't be exported to QuickBooks Online automatically? + +If a report encounters an issue during automatic export to QuickBooks Online, you'll receive an email with details about the problem, including any specific error messages. These messages will also be recorded in the report's history section. + +The report will be placed in your Home for your attention. You can address the issues there. If you need further assistance, refer to our QuickBooks Online Export Errors page or export the report manually. + +## How can I ensure that I final approve reports before they're exported to QuickBooks Online? + +To ensure reports are reviewed before export, set up your Workspaces with the appropriate workflow in Expensify. Additionally, consider changing your Workspace settings to enforce expense Workspace workflows strictly. This guarantees that your Workspace's workflow is consistently followed. + +## What happens to existing approved and reimbursed reports if I enable Auto Sync? + +- If Auto Sync was disabled when your Workspace was linked to QuickBooks Online, enabling it won't impact existing reports that haven't been exported. +- If a report has been exported and reimbursed via ACH, it will be automatically marked as paid in QuickBooks Online during the next sync. +- If a report has been exported and marked as paid in QuickBooks Online, it will be automatically marked as reimbursed in Expensify during the next sync. +- Reports that have yet to be exported to QuickBooks Online won't be automatically exported. + + + + + + + + + + + From 08557e9a99b80d438ab8391fd2d89cd469d261c9 Mon Sep 17 00:00:00 2001 From: Ishpaul Singh Date: Sat, 28 Oct 2023 00:53:13 +0530 Subject: [PATCH 45/51] fix/focus error input on click of CTA message --- src/components/Form/FormProvider.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Form/FormProvider.js b/src/components/Form/FormProvider.js index ce402976d097..7e6ace1fa4c6 100644 --- a/src/components/Form/FormProvider.js +++ b/src/components/Form/FormProvider.js @@ -204,6 +204,7 @@ function FormProvider({validate, formID, shouldValidateOnBlur, shouldValidateOnC const registerInput = useCallback( (inputID, propsToParse = {}) => { + const newRef = inputRefs.current[inputID] || propsToParse.ref || createRef(); if (inputRefs.current[inputID] !== newRef) { inputRefs.current[inputID] = newRef; @@ -233,7 +234,10 @@ function FormProvider({validate, formID, shouldValidateOnBlur, shouldValidateOnC return { ...propsToParse, - ref: newRef, + ref: typeof propsToParse.ref === 'function' ? (node) => { + propsToParse.ref(node); + newRef.current = node; + } : newRef, inputID, key: propsToParse.key || inputID, errorText: errors[inputID] || fieldErrorMessage, From 8ec732744d2a65425b0fd26300a6625240feb607 Mon Sep 17 00:00:00 2001 From: Ishpaul Singh Date: Sat, 28 Oct 2023 01:05:56 +0530 Subject: [PATCH 46/51] fix linters --- src/components/Form/FormProvider.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/Form/FormProvider.js b/src/components/Form/FormProvider.js index 7e6ace1fa4c6..6d63435e1f9d 100644 --- a/src/components/Form/FormProvider.js +++ b/src/components/Form/FormProvider.js @@ -204,7 +204,6 @@ function FormProvider({validate, formID, shouldValidateOnBlur, shouldValidateOnC const registerInput = useCallback( (inputID, propsToParse = {}) => { - const newRef = inputRefs.current[inputID] || propsToParse.ref || createRef(); if (inputRefs.current[inputID] !== newRef) { inputRefs.current[inputID] = newRef; @@ -234,10 +233,13 @@ function FormProvider({validate, formID, shouldValidateOnBlur, shouldValidateOnC return { ...propsToParse, - ref: typeof propsToParse.ref === 'function' ? (node) => { - propsToParse.ref(node); - newRef.current = node; - } : newRef, + ref: + typeof propsToParse.ref === 'function' + ? (node) => { + propsToParse.ref(node); + newRef.current = node; + } + : newRef, inputID, key: propsToParse.key || inputID, errorText: errors[inputID] || fieldErrorMessage, From 7da77b2d659b47f8fa92e92bc6e83814df2811c7 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 27 Oct 2023 20:58:31 +0000 Subject: [PATCH 47/51] Update version to 1.3.92-4 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 4ac63865ad43..8396dc1e4ec1 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -90,8 +90,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001039203 - versionName "1.3.92-3" + versionCode 1001039204 + versionName "1.3.92-4" } flavorDimensions "default" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 4e44dfb6cfbb..848823f3578e 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 1.3.92.3 + 1.3.92.4 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 27d98f1dff94..d211b5b97278 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.92.3 + 1.3.92.4 diff --git a/package-lock.json b/package-lock.json index 03d3b0f1f46f..49a94029b2d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.92-3", + "version": "1.3.92-4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.92-3", + "version": "1.3.92-4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 90b3169d91e2..6d01ba6570a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.92-3", + "version": "1.3.92-4", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 419e0774795d88ff66e667400debf05049378bf8 Mon Sep 17 00:00:00 2001 From: Mahesh Vagicherla Date: Sat, 28 Oct 2023 18:37:04 +0530 Subject: [PATCH 48/51] import alias config --- .eslintrc.js | 25 +- .prettierrc.js | 3 + .storybook/webpack.config.js | 3 + babel.config.js | 36 +++ config/webpack/webpack.common.js | 13 + package-lock.json | 443 ++++++++++++++++++++++++------- package.json | 4 +- tsconfig.json | 15 +- 8 files changed, 449 insertions(+), 93 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 35a4a333f8af..ac549aa13c4b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,7 +24,7 @@ const restrictedImportPatterns = [ ]; module.exports = { - extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-hooks/recommended', 'plugin:react-native-a11y/basic', 'prettier'], + extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-hooks/recommended', 'plugin:react-native-a11y/basic', 'plugin:@dword-design/import-alias/recommended', 'prettier'], plugins: ['react-hooks', 'react-native-a11y'], parser: 'babel-eslint', ignorePatterns: ['!.*', 'src/vendor', '.github/actions/**/index.js', 'desktop/dist/*.js', 'dist/*.js', 'node_modules/.bin/**', 'node_modules/.cache/**', '.git/**'], @@ -49,8 +49,31 @@ module.exports = { touchables: ['PressableWithoutFeedback', 'PressableWithFeedback'], }, ], + '@dword-design/import-alias/prefer-alias': [ + 'warn', + { + alias: { + '@assets': './assets', + '@components': './src/components', + '@hooks': './src/hooks', + // This is needed up here, if not @libs/actions would take the priority + '@userActions': './src/libs/actions', + '@libs': './src/libs', + '@navigation': './src/libs/Navigation', + '@pages': './src/pages', + '@styles': './src/styles', + // This path is provide alias for files like `ONYXKEYS` and `CONST`. + '@src': './src', + }, + }, + ], }, }, + // This helps disable the `prefer-alias` rule to be enabled for specific directories + { + files: ['tests/**/*.js', 'tests/**/*.ts', 'tests/**/*.jsx', 'assets/**/*.js', '.storybook/**/*.js'], + rules: {'@dword-design/import-alias/prefer-alias': ['off']}, + }, { files: ['*.js', '*.jsx'], settings: { diff --git a/.prettierrc.js b/.prettierrc.js index ad1fafbb51be..bcc67708cc95 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -6,4 +6,7 @@ module.exports = { arrowParens: 'always', printWidth: 190, singleAttributePerLine: true, + importOrder: ['@assets/(.*)$', '@components/(.*)$', '@hooks/(.*)$', '@libs/(.*)$', '@navigation/(.*)$', '@pages/(.*)$', '@styles/(.*)$', '@userActions/(.*)$', '@src/(.*)$', '^[./]'], + importOrderSortSpecifiers: true, + importOrderCaseInsensitive: true, }; diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js index 3c5dbb41ea2c..fe58f3c0a6d8 100644 --- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -28,6 +28,9 @@ module.exports = ({config}) => { 'react-native-web': '@expensify/react-native-web', '@react-native-community/netinfo': path.resolve(__dirname, '../__mocks__/@react-native-community/netinfo.js'), '@react-navigation/native': path.resolve(__dirname, '../__mocks__/@react-navigation/native'), + + // Module alias support for storybook files, coping from `webpack.common.js` + ...custom.resolve.alias, }; // Necessary to overwrite the values in the existing DefinePlugin hardcoded to the Config staging values diff --git a/babel.config.js b/babel.config.js index 3a49f3bccbe5..189c3379aa6d 100644 --- a/babel.config.js +++ b/babel.config.js @@ -41,6 +41,42 @@ const metro = { ['@babel/plugin-proposal-private-property-in-object', {loose: true}], // The reanimated babel plugin needs to be last, as stated here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation 'react-native-reanimated/plugin', + // Import alias for native devices + [ + 'module-resolver', + { + extensions: [ + '.native.js', + '.native.jsx', + '.native.ts', + '.native.tsx', + '.js', + '.jsx', + '.ts', + '.tsx', + '.ios.js', + '.ios.jsx', + '.ios.ts', + '.ios.tsx', + '.android.js', + '.android.jsx', + '.android.ts', + '.android.tx', + ], + alias: { + '@assets': './assets', + '@components': './src/components', + '@hooks': './src/hooks', + '@libs': './src/libs', + '@navigation': './src/libs/Navigation', + '@pages': './src/pages', + '@styles': './src/styles', + // This path is provide alias for files like `ONYXKEYS` and `CONST`. + '@src': './src', + '@userActions': './src/libs/actions', + }, + }, + ], ], }; diff --git a/config/webpack/webpack.common.js b/config/webpack/webpack.common.js index 7dc851c95c9e..20e174a004d7 100644 --- a/config/webpack/webpack.common.js +++ b/config/webpack/webpack.common.js @@ -187,6 +187,19 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({ 'react-native-web': '@expensify/react-native-web', 'react-content-loader/native': 'react-content-loader', 'lottie-react-native': 'react-native-web-lottie', + + // Module alias for web & desktop + // https://webpack.js.org/configuration/resolve/#resolvealias + '@assets': path.resolve(__dirname, '../../assets'), + '@components': path.resolve(__dirname, '../../src/components/'), + '@hooks': path.resolve(__dirname, '../../src/hooks/'), + '@libs': path.resolve(__dirname, '../../src/libs/'), + '@navigation': path.resolve(__dirname, '../../src/libs/Navigation/'), + '@pages': path.resolve(__dirname, '../../src/pages/'), + '@styles': path.resolve(__dirname, '../../src/styles/'), + // This path is provide alias for files like `ONYXKEYS` and `CONST`. + '@src': path.resolve(__dirname, '../../src/'), + '@userActions': path.resolve(__dirname, '../../src/libs/actions/'), }, // React Native libraries may have web-specific module implementations that appear with the extension `.web.js` diff --git a/package-lock.json b/package-lock.json index 579b1b278bcf..e95637f2488d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -135,6 +135,7 @@ "@babel/preset-react": "^7.10.4", "@babel/preset-typescript": "^7.21.5", "@babel/runtime": "^7.20.0", + "@dword-design/eslint-plugin-import-alias": "^4.0.8", "@electron/notarize": "^1.2.3", "@jest/globals": "^29.5.0", "@octokit/core": "4.0.4", @@ -154,6 +155,7 @@ "@svgr/webpack": "^6.0.0", "@testing-library/jest-native": "5.4.1", "@testing-library/react-native": "11.5.1", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@types/concurrently": "^7.0.0", "@types/jest": "^29.5.2", "@types/jest-when": "^3.5.2", @@ -383,11 +385,11 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", - "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dependencies": { - "@babel/highlight": "^7.22.10", + "@babel/highlight": "^7.22.13", "chalk": "^2.4.2" }, "engines": { @@ -440,11 +442,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dependencies": { - "@babel/types": "^7.22.10", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -604,20 +606,20 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -768,9 +770,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "engines": { "node": ">=6.9.0" } @@ -811,11 +813,11 @@ } }, "node_modules/@babel/highlight": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", - "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, @@ -824,9 +826,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz", - "integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -2552,31 +2554,31 @@ "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz", - "integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dependencies": { - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.11", - "@babel/types": "^7.22.11", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -2585,12 +2587,12 @@ } }, "node_modules/@babel/types": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", - "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dependencies": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2939,6 +2941,63 @@ "node": ">=10.0.0" } }, + "node_modules/@dword-design/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@dword-design/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-OFmAmzKiDUh9m7WRMYcoEOPI7b5tS5hdqQmtKDwF+ZssVJv8a+GHo9VOtFsmlw3h8Roh/9QzFWIsjSFZyQUMdg==", + "dev": true, + "dependencies": { + "babel-plugin-add-module-exports": "^1.0.2" + } + }, + "node_modules/@dword-design/endent": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@dword-design/endent/-/endent-1.4.1.tgz", + "integrity": "sha512-e2sCTzth5kyRdM0o+yEb5wBVzUdJL8Y6HblRGRV0Bif0knf1ZjRLhUjdCrqM+Muirb68X/xJzgdRDJVmLqgXGA==", + "dev": true, + "dependencies": { + "@dword-design/dedent": "^0.7.0", + "fast-json-parse": "^1.0.3", + "objectorarray": "^1.0.3" + } + }, + "node_modules/@dword-design/eslint-plugin-import-alias": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@dword-design/eslint-plugin-import-alias/-/eslint-plugin-import-alias-4.0.8.tgz", + "integrity": "sha512-u20BC0eJ6MHhGen+lG38nf/dvlQI7g1GdXLZbgJfOeGT+GKYey7SVTdotY0X4iKWFGGqElkW0bbOuF07T90VOA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.10.2", + "@dword-design/functions": "^5.0.22", + "babel-plugin-module-resolver": "^5.0.0", + "deepmerge": "^4.3.1", + "jiti": "^1.18.2" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/dword-design" + } + }, + "node_modules/@dword-design/functions": { + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@dword-design/functions/-/functions-5.0.26.tgz", + "integrity": "sha512-7MxBcG1zP42LR+45kdRvb+P56u48INNKSolGsdmYMFd367btOP/BLHHHTVU1M+uI3KmH7o2J/oasEPtYquravw==", + "dev": true, + "dependencies": { + "@dword-design/endent": "^1.0.0", + "delay": "^5.0.0", + "lodash": "^4.17.15", + "tinycolor2": "^1.4.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/dword-design" + } + }, "node_modules/@egjs/hammerjs": { "version": "2.0.17", "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz", @@ -19057,6 +19116,65 @@ "node": ">= 10" } }, + "node_modules/@trivago/prettier-plugin-sort-imports": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.1.tgz", + "integrity": "sha512-iuy2MPVURGdxILTchHr15VAioItuYBejKfcTmQFlxIuqA7jeaT6ngr5aUIG6S6U096d6a6lJCgaOwlRrPLlOPg==", + "dev": true, + "dependencies": { + "@babel/generator": "7.17.7", + "@babel/parser": "^7.20.5", + "@babel/traverse": "7.23.2", + "@babel/types": "7.17.0", + "javascript-natural-sort": "0.7.1", + "lodash": "^4.17.21" + }, + "peerDependencies": { + "@vue/compiler-sfc": "3.x", + "prettier": "2.x - 3.x" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/types": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", @@ -22652,6 +22770,12 @@ "babel-runtime": "^6.22.0" } }, + "node_modules/babel-plugin-add-module-exports": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-1.0.4.tgz", + "integrity": "sha512-g+8yxHUZ60RcyaUpfNzy56OtWW+x9cyEe9j+CranqLiqbju2yf/Cy6ZtYK40EZxtrdHllzlVZgLmcOUCTlJ7Jg==", + "dev": true + }, "node_modules/babel-plugin-add-react-displayname": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/babel-plugin-add-react-displayname/-/babel-plugin-add-react-displayname-0.0.5.tgz", @@ -26894,6 +27018,18 @@ "rimraf": "bin.js" } }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -36915,6 +37051,15 @@ "node": ">=8" } }, + "node_modules/jiti": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz", + "integrity": "sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/joi": { "version": "17.10.2", "resolved": "https://registry.npmjs.org/joi/-/joi-17.10.2.tgz", @@ -49844,6 +49989,12 @@ "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", "license": "MIT" }, + "node_modules/tinycolor2": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", + "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==", + "dev": true + }, "node_modules/tinyqueue": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz", @@ -53341,11 +53492,11 @@ } }, "@babel/code-frame": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", - "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "requires": { - "@babel/highlight": "^7.22.10", + "@babel/highlight": "^7.22.13", "chalk": "^2.4.2" } }, @@ -53384,11 +53535,11 @@ } }, "@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "requires": { - "@babel/types": "^7.22.10", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -53513,17 +53664,17 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==" + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==" }, "@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "requires": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { @@ -53626,9 +53777,9 @@ "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==" }, "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==" + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==" }, "@babel/helper-validator-option": { "version": "7.22.5", @@ -53657,19 +53808,19 @@ } }, "@babel/highlight": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", - "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "requires": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz", - "integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==" + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.22.5", @@ -54747,39 +54898,39 @@ } }, "@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "requires": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz", - "integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "requires": { - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.11", - "@babel/types": "^7.22.11", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", - "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "requires": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -55046,6 +55197,51 @@ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, + "@dword-design/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@dword-design/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-OFmAmzKiDUh9m7WRMYcoEOPI7b5tS5hdqQmtKDwF+ZssVJv8a+GHo9VOtFsmlw3h8Roh/9QzFWIsjSFZyQUMdg==", + "dev": true, + "requires": { + "babel-plugin-add-module-exports": "^1.0.2" + } + }, + "@dword-design/endent": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@dword-design/endent/-/endent-1.4.1.tgz", + "integrity": "sha512-e2sCTzth5kyRdM0o+yEb5wBVzUdJL8Y6HblRGRV0Bif0knf1ZjRLhUjdCrqM+Muirb68X/xJzgdRDJVmLqgXGA==", + "dev": true, + "requires": { + "@dword-design/dedent": "^0.7.0", + "fast-json-parse": "^1.0.3", + "objectorarray": "^1.0.3" + } + }, + "@dword-design/eslint-plugin-import-alias": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@dword-design/eslint-plugin-import-alias/-/eslint-plugin-import-alias-4.0.8.tgz", + "integrity": "sha512-u20BC0eJ6MHhGen+lG38nf/dvlQI7g1GdXLZbgJfOeGT+GKYey7SVTdotY0X4iKWFGGqElkW0bbOuF07T90VOA==", + "dev": true, + "requires": { + "@babel/core": "^7.10.2", + "@dword-design/functions": "^5.0.22", + "babel-plugin-module-resolver": "^5.0.0", + "deepmerge": "^4.3.1", + "jiti": "^1.18.2" + } + }, + "@dword-design/functions": { + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/@dword-design/functions/-/functions-5.0.26.tgz", + "integrity": "sha512-7MxBcG1zP42LR+45kdRvb+P56u48INNKSolGsdmYMFd367btOP/BLHHHTVU1M+uI3KmH7o2J/oasEPtYquravw==", + "dev": true, + "requires": { + "@dword-design/endent": "^1.0.0", + "delay": "^5.0.0", + "lodash": "^4.17.15", + "tinycolor2": "^1.4.1" + } + }, "@egjs/hammerjs": { "version": "2.0.17", "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz", @@ -66535,6 +66731,49 @@ "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true }, + "@trivago/prettier-plugin-sort-imports": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.1.tgz", + "integrity": "sha512-iuy2MPVURGdxILTchHr15VAioItuYBejKfcTmQFlxIuqA7jeaT6ngr5aUIG6S6U096d6a6lJCgaOwlRrPLlOPg==", + "dev": true, + "requires": { + "@babel/generator": "7.17.7", + "@babel/parser": "^7.20.5", + "@babel/traverse": "7.23.2", + "@babel/types": "7.17.0", + "javascript-natural-sort": "0.7.1", + "lodash": "^4.17.21" + }, + "dependencies": { + "@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "dev": true, + "requires": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/types": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true + } + } + }, "@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", @@ -69272,6 +69511,12 @@ "babel-runtime": "^6.22.0" } }, + "babel-plugin-add-module-exports": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-1.0.4.tgz", + "integrity": "sha512-g+8yxHUZ60RcyaUpfNzy56OtWW+x9cyEe9j+CranqLiqbju2yf/Cy6ZtYK40EZxtrdHllzlVZgLmcOUCTlJ7Jg==", + "dev": true + }, "babel-plugin-add-react-displayname": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/babel-plugin-add-react-displayname/-/babel-plugin-add-react-displayname-0.0.5.tgz", @@ -72364,6 +72609,12 @@ } } }, + "delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "dev": true + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -79476,6 +79727,12 @@ } } }, + "jiti": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz", + "integrity": "sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==", + "dev": true + }, "joi": { "version": "17.10.2", "resolved": "https://registry.npmjs.org/joi/-/joi-17.10.2.tgz", @@ -88799,6 +89056,12 @@ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, + "tinycolor2": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", + "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==", + "dev": true + }, "tinyqueue": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz", diff --git a/package.json b/package.json index c866cc84f62b..e968f3314eb8 100644 --- a/package.json +++ b/package.json @@ -170,6 +170,8 @@ "underscore": "^1.13.1" }, "devDependencies": { + "@dword-design/eslint-plugin-import-alias": "^4.0.8", + "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@actions/core": "1.10.0", "@actions/github": "5.1.1", "@babel/core": "^7.20.0", @@ -298,4 +300,4 @@ "node": "16.15.1", "npm": "8.11.0" } -} +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 0c88512b9749..151087fb1321 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,7 +30,20 @@ "resolveJsonModule": true, "allowSyntheticDefaultImports": true, "skipLibCheck": true, - "incremental": true + "incremental": true, + "baseUrl": ".", + "paths": { + "@assets/*": ["./assets/*"], + "@components/*": ["./src/components/*"], + "@hooks/*": ["./src/hooks/*"], + "@libs/*": ["./src/libs/*"], + "@navigation/*": ["./src/libs/Navigation/*"], + "@pages/*": ["./src/pages/*"], + "@styles/*": ["./src/styles/*"], + // This path is provide alias for files like `ONYXKEYS` and `CONST`. + "@src/*": ["./src/*"], + "@userActions/*": ["./src/libs/actions/*"] + } }, "exclude": ["**/node_modules/*", "**/dist/*", ".github/actions/**/index.js", "**/docs/*"], "include": ["src", "desktop", "web", "docs", "assets", "config", "tests", "jest", "__mocks__", ".github/**/*", ".storybook/**/*"] From 5d45f0f6c86e97d4ae58ac167b6c162a610b817c Mon Sep 17 00:00:00 2001 From: Mahesh Vagicherla Date: Sat, 28 Oct 2023 19:58:04 +0530 Subject: [PATCH 49/51] run alias & lint config --- .storybook/preview.js | 8 +- assets/emojis/common.js | 8 +- index.js | 3 +- jest/setup.js | 6 +- src/App.js | 26 +- src/CONFIG.ts | 2 +- src/Expensify.js | 53 ++-- src/ONYXKEYS.ts | 6 +- src/components/AddPaymentMethodMenu.js | 16 +- src/components/AddPlaidBankAccount.js | 38 +-- .../AddressSearch/CurrentLocationButton.js | 16 +- src/components/AddressSearch/index.js | 40 +-- src/components/AmountTextInput.js | 8 +- .../BaseAnchorForAttachmentsOnly.js | 22 +- .../anchorForAttachmentsOnlyPropTypes.js | 2 +- .../AnchorForAttachmentsOnly/index.js | 4 +- .../AnchorForAttachmentsOnly/index.native.js | 2 +- .../BaseAnchorForCommentsOnly.js | 28 +- .../anchorForCommentsOnlyPropTypes.js | 2 +- src/components/AnchorForCommentsOnly/index.js | 4 +- .../AnchorForCommentsOnly/index.native.js | 1 - .../AnimatedStep/AnimatedStepProvider.js | 4 +- src/components/AnimatedStep/index.js | 8 +- src/components/AnonymousReportFooter.js | 14 +- src/components/ArchivedReportFooter.js | 22 +- src/components/ArrowKeyFocusManager.js | 6 +- src/components/AttachmentModal.js | 64 ++--- .../attachmentPickerPropTypes.js | 2 +- src/components/AttachmentPicker/index.js | 6 +- .../AttachmentPicker/index.native.js | 32 +-- .../AttachmentPicker/launchCamera.ios.js | 2 +- .../AttachmentCarouselCellRenderer.js | 8 +- .../AttachmentCarousel/CarouselActions.js | 6 +- .../AttachmentCarousel/CarouselButtons.js | 18 +- .../AttachmentCarousel/CarouselItem.js | 22 +- .../Pager/AttachmentCarouselPage.js | 6 +- .../Pager/ImageTransformer.js | 6 +- .../AttachmentCarousel/Pager/ImageWrapper.js | 4 +- .../AttachmentCarousel/Pager/index.js | 12 +- .../attachmentCarouselPropTypes.js | 4 +- .../extractAttachmentsFromReport.js | 12 +- .../Attachments/AttachmentCarousel/index.js | 30 +- .../AttachmentCarousel/index.native.js | 26 +- .../AttachmentCarousel/useCarouselArrows.js | 4 +- .../AttachmentViewImage/index.js | 14 +- .../AttachmentViewImage/index.native.js | 16 +- .../AttachmentViewImage/propTypes.js | 2 +- .../AttachmentView/AttachmentViewPdf/index.js | 4 +- .../AttachmentViewPdf/index.native.js | 6 +- .../AttachmentViewPdf/propTypes.js | 4 +- .../Attachments/AttachmentView/index.js | 44 +-- .../Attachments/AttachmentView/propTypes.js | 2 +- .../BaseAutoCompleteSuggestions.js | 10 +- .../AutoCompleteSuggestions/index.js | 10 +- .../AutoCompleteSuggestions/index.native.js | 4 +- src/components/AutoEmailLink.js | 6 +- src/components/AutoUpdateTime.js | 10 +- src/components/Avatar.js | 16 +- .../AvatarCropModal/AvatarCropModal.js | 38 +-- .../AvatarCropModal/ImageCropView.js | 10 +- src/components/AvatarCropModal/Slider.js | 8 +- src/components/AvatarWithDisplayName.js | 38 +-- src/components/AvatarWithImagePicker.js | 40 +-- src/components/AvatarWithIndicator.js | 10 +- src/components/Badge.js | 10 +- src/components/Banner.js | 14 +- src/components/BaseMiniContextMenuItem.js | 18 +- src/components/BigNumberPad.js | 8 +- src/components/BlockingViews/BlockingView.js | 20 +- .../BlockingViews/FullPageNotFoundView.js | 16 +- .../FullPageOfflineBlockingView.js | 12 +- src/components/Button/index.js | 30 +- src/components/ButtonWithDropdownMenu.js | 14 +- src/components/CardPreview.js | 12 +- .../CategoryPicker/categoryPickerPropTypes.js | 2 +- src/components/CategoryPicker/index.js | 16 +- src/components/Checkbox.js | 12 +- src/components/CheckboxWithLabel.js | 8 +- ...heckboxWithTooltipForMobileWebAndNative.js | 8 +- .../checkboxWithTooltipPropTypes.js | 6 +- src/components/CheckboxWithTooltip/index.js | 8 +- .../CheckboxWithTooltip/index.native.js | 4 +- .../Collapsible/index.native.js | 2 +- src/components/CollapsibleSection/index.js | 14 +- src/components/CommunicationsLink.js | 8 +- src/components/ComposeProviders.tsx | 2 +- src/components/Composer/index.android.js | 10 +- src/components/Composer/index.ios.js | 10 +- src/components/Composer/index.js | 40 +-- src/components/ConfirmContent.js | 14 +- src/components/ConfirmModal.js | 6 +- src/components/ConfirmPopover.js | 4 +- src/components/ConfirmationPage.js | 8 +- src/components/ConfirmedRoute.js | 25 +- src/components/ConnectBankAccountButton.js | 16 +- src/components/ContextMenuItem.js | 18 +- src/components/CopyTextToClipboard.js | 4 +- src/components/CountrySelector.js | 12 +- src/components/CurrencySymbolButton.js | 10 +- .../index.js | 16 +- src/components/CurrentWalletBalance.js | 12 +- src/components/CustomDevMenu/index.native.js | 2 +- src/components/CustomStatusBar/index.js | 6 +- .../DatePicker/datepickerPropTypes.js | 4 +- src/components/DatePicker/index.android.js | 12 +- src/components/DatePicker/index.ios.js | 22 +- src/components/DatePicker/index.js | 10 +- .../DeeplinkRedirectLoadingIndicator.js | 26 +- .../DeeplinkWrapper/index.website.js | 20 +- .../DisplayNames/DisplayNamesTooltipItem.js | 6 +- .../DisplayNames/DisplayNamesWithTooltip.js | 10 +- .../DisplayNamesWithoutTooltip.js | 4 +- src/components/DisplayNames/index.js | 4 +- src/components/DisplayNames/index.native.js | 4 +- src/components/DistanceEReceipt.js | 30 +- .../DistanceMapView/index.android.js | 14 +- src/components/DistanceMapView/index.js | 2 +- .../DistanceRequest/DistanceRequestFooter.js | 30 +- .../DistanceRequestRenderItem.js | 12 +- src/components/DistanceRequest/index.js | 48 ++-- src/components/DotIndicatorMessage.js | 12 +- src/components/DragAndDrop/Consumer/index.js | 4 +- .../DragAndDrop/NoDropZone/index.js | 6 +- src/components/DragAndDrop/Provider/index.js | 10 +- src/components/DraggableList/index.native.tsx | 2 +- src/components/DraggableList/index.tsx | 6 +- .../DraggableList/useDraggableInPortal.ts | 2 +- src/components/EReceipt.js | 26 +- src/components/EReceiptThumbnail.js | 20 +- .../EmojiPicker/CategoryShortcutBar.js | 4 +- .../EmojiPicker/CategoryShortcutButton.js | 22 +- src/components/EmojiPicker/EmojiPicker.js | 18 +- .../EmojiPicker/EmojiPickerButton.js | 20 +- .../EmojiPicker/EmojiPickerButtonDropdown.js | 24 +- .../EmojiPicker/EmojiPickerMenu/index.js | 44 +-- .../EmojiPickerMenu/index.native.js | 38 +-- .../EmojiPicker/EmojiPickerMenuItem/index.js | 16 +- .../EmojiPickerMenuItem/index.native.js | 14 +- .../EmojiPicker/EmojiSkinToneList.js | 18 +- .../EmojiPicker/getSkinToneEmojiFromIndex.js | 2 +- src/components/EmojiSuggestions.js | 12 +- src/components/EnvironmentBadge.js | 10 +- .../ErrorBoundary/BaseErrorBoundary.js | 6 +- src/components/ErrorBoundary/index.js | 2 +- src/components/ErrorBoundary/index.native.js | 3 +- src/components/ExceededCommentLength.js | 14 +- src/components/ExpensifyWordmark.js | 22 +- src/components/FeatureList.js | 10 +- src/components/FixedFooter.tsx | 2 +- src/components/FlatList/index.android.js | 4 +- src/components/FloatingActionButton.js | 12 +- src/components/Form.js | 26 +- src/components/Form/FormProvider.js | 20 +- src/components/Form/FormWrapper.js | 19 +- src/components/Form/InputWrapper.js | 2 +- src/components/FormAlertWithSubmitButton.js | 4 +- src/components/FormAlertWrapper.js | 12 +- src/components/FormElement.js | 2 +- src/components/FormHelpMessage.js | 12 +- src/components/FormScrollView.tsx | 2 +- .../FormSubmit/formSubmitPropTypes.js | 2 +- src/components/FormSubmit/index.js | 8 +- src/components/FullscreenLoadingIndicator.js | 8 +- .../growlNotificationContainerPropTypes.js | 2 +- .../GrowlNotificationContainer/index.js | 4 +- .../index.native.js | 4 +- src/components/GrowlNotification/index.js | 20 +- .../BaseHTMLEngineProvider.js | 14 +- .../HTMLRenderers/AnchorRenderer.js | 28 +- .../HTMLRenderers/CodeRenderer.js | 6 +- .../HTMLRenderers/EditedRenderer.js | 16 +- .../HTMLRenderers/ImageRenderer.js | 24 +- .../HTMLRenderers/MentionHereRenderer.js | 6 +- .../HTMLRenderers/MentionUserRenderer.js | 38 +-- .../PreRenderer/BasePreRenderer.js | 18 +- .../HTMLRenderers/PreRenderer/index.js | 7 +- .../HTMLRenderers/PreRenderer/index.native.js | 4 +- .../HTMLEngineProvider/HTMLRenderers/index.js | 2 +- src/components/HTMLEngineProvider/index.js | 4 +- .../HTMLEngineProvider/index.native.js | 2 +- src/components/Header.js | 6 +- src/components/HeaderGap/index.desktop.js | 4 +- src/components/HeaderPageLayout.js | 20 +- .../headerWithBackButtonPropTypes.js | 6 +- src/components/HeaderWithBackButton/index.js | 38 +-- src/components/Hoverable/index.js | 10 +- src/components/Hoverable/index.native.js | 4 +- src/components/IFrame.js | 4 +- src/components/Icon/BankIcons.ts | 84 +++--- src/components/Icon/DefaultAvatars.js | 48 ++-- src/components/Icon/EReceiptBGs.js | 12 +- src/components/Icon/Expensicons.js | 256 +++++++++--------- src/components/Icon/Illustrations.js | 98 +++---- src/components/Icon/MCCIcons.js | 26 +- .../Icon/WorkspaceDefaultAvatars.js | 74 ++--- src/components/Icon/index.js | 10 +- src/components/Icon/svgs/LoungeAccessIcon.js | 4 +- src/components/IllustratedHeaderPageLayout.js | 10 +- src/components/Image/imagePropTypes.js | 4 +- src/components/Image/index.js | 4 +- src/components/Image/index.native.js | 6 +- src/components/ImageView/index.js | 16 +- src/components/ImageView/index.native.js | 14 +- src/components/ImageWithSizeCalculation.js | 10 +- src/components/Indicator.js | 26 +- src/components/InlineCodeBlock/WrappedText.js | 10 +- src/components/InlineCodeBlock/index.js | 4 +- .../InlineCodeBlock/index.native.js | 4 +- src/components/InlineErrorText.js | 6 +- src/components/InlineSystemMessage.tsx | 8 +- .../InvertedFlatList/BaseInvertedFlatList.js | 10 +- .../InvertedFlatList/CellRendererComponent.js | 2 +- src/components/InvertedFlatList/index.js | 6 +- src/components/KYCWall/BaseKYCWall.js | 28 +- src/components/KYCWall/index.js | 2 +- src/components/KYCWall/kycWallPropTypes.js | 16 +- .../KeyboardSpacer/BaseKeyboardSpacer.js | 6 +- .../KeyboardSpacer/index.android.js | 4 +- src/components/KeyboardSpacer/index.ios.js | 6 +- .../LHNOptionsList/LHNOptionsList.js | 6 +- src/components/LHNOptionsList/OptionRowLHN.js | 60 ++-- .../LHNOptionsList/OptionRowLHNData.js | 31 +-- .../OptionRowLHNDataWithFocus.js | 4 +- src/components/LocaleContextProvider.js | 21 +- src/components/LocalePicker.js | 18 +- .../BaseLocationErrorMessage.js | 20 +- src/components/LocationErrorMessage/index.js | 2 +- src/components/Lottie/Lottie.tsx | 4 +- src/components/MagicCodeInput.js | 20 +- src/components/MapView/Direction.tsx | 2 +- src/components/MapView/Direction.web.tsx | 6 +- src/components/MapView/MapView.tsx | 12 +- src/components/MapView/MapView.web.tsx | 20 +- src/components/MapView/PendingMapView.tsx | 12 +- src/components/MapView/responder/index.ts | 2 +- src/components/MentionSuggestions.js | 16 +- src/components/MenuItem.js | 40 +-- src/components/MenuItemList.js | 8 +- src/components/MenuItemWithTopDescription.js | 2 +- src/components/MessagesRow.js | 18 +- src/components/Modal/BaseModal.js | 26 +- src/components/Modal/index.android.js | 6 +- src/components/Modal/index.ios.js | 4 +- src/components/Modal/index.web.js | 12 +- src/components/Modal/modalPropTypes.js | 6 +- src/components/MoneyReportHeader.js | 40 +-- src/components/MoneyReportHeaderStatusBar.js | 8 +- .../MoneyRequestConfirmationList.js | 74 ++--- src/components/MoneyRequestHeader.js | 42 +-- src/components/MoneyRequestHeaderStatusBar.js | 4 +- src/components/MoneyRequestSkeletonView.js | 8 +- src/components/MultipleAvatars.js | 16 +- .../NewDatePicker/CalendarPicker/ArrowIcon.js | 12 +- .../CalendarPicker/YearPickerModal.js | 18 +- .../CalendarPicker/generateMonthMatrix.js | 2 +- .../NewDatePicker/CalendarPicker/index.js | 26 +- src/components/NewDatePicker/index.js | 20 +- src/components/OfflineIndicator.js | 14 +- src/components/OfflineWithFeedback.js | 16 +- src/components/Onfido/BaseOnfidoWeb.js | 20 +- src/components/Onfido/index.native.js | 12 +- src/components/Onfido/index.website.js | 2 +- src/components/OnyxProvider.tsx | 4 +- src/components/OpacityView.js | 8 +- src/components/OptionRow.js | 34 +-- src/components/OptionsList/BaseOptionsList.js | 22 +- src/components/OptionsList/index.js | 8 +- src/components/OptionsList/index.native.js | 2 +- .../OptionsList/optionsListPropTypes.js | 6 +- src/components/OptionsListSkeletonView.js | 12 +- .../OptionsSelector/BaseOptionsSelector.js | 34 +-- .../optionsSelectorPropTypes.js | 6 +- src/components/PDFView/PDFInfoMessage.js | 16 +- src/components/PDFView/PDFPasswordForm.js | 24 +- src/components/PDFView/index.js | 32 +-- src/components/PDFView/index.native.js | 24 +- src/components/PDFView/pdfViewPropTypes.js | 4 +- src/components/ParentNavigationSubtitle.js | 14 +- src/components/Picker/BasePicker.js | 20 +- src/components/PinButton.js | 16 +- src/components/PlaidLink/index.js | 4 +- src/components/PlaidLink/index.native.js | 8 +- src/components/Popover/index.js | 12 +- src/components/Popover/index.native.js | 10 +- src/components/Popover/popoverPropTypes.js | 8 +- src/components/PopoverMenu/index.js | 26 +- .../PopoverMenu/popoverMenuPropTypes.js | 2 +- src/components/PopoverProvider/index.js | 2 +- .../PopoverProvider/index.native.js | 2 +- src/components/PopoverWithMeasuredContent.js | 14 +- src/components/PopoverWithoutOverlay/index.js | 14 +- .../GenericPressable/BaseGenericPressable.js | 16 +- .../Pressable/GenericPressable/PropTypes.js | 4 +- .../Pressable/PressableWithDelayToggle.js | 22 +- .../Pressable/PressableWithFeedback.js | 6 +- .../Pressable/PressableWithoutFocus.js | 4 +- .../index.js | 10 +- .../index.native.js | 6 +- ...ssableWithSecondaryInteractionPropTypes.js | 4 +- src/components/QRCode/index.tsx | 6 +- .../QRShare/QRShareWithDownload/index.js | 8 +- .../QRShareWithDownload/index.native.js | 8 +- src/components/QRShare/index.js | 20 +- src/components/RNTextInput.js | 4 +- src/components/RadioButton.js | 6 +- src/components/RadioButtonWithLabel.js | 8 +- src/components/RadioButtons.tsx | 2 +- src/components/Reactions/AddReactionBubble.js | 30 +- .../Reactions/EmojiReactionBubble.js | 16 +- .../Reactions/MiniQuickEmojiReactions.js | 34 +-- .../BaseQuickEmojiReactions.js | 22 +- .../Reactions/QuickEmojiReactions/index.js | 6 +- .../QuickEmojiReactions/index.native.js | 4 +- .../Reactions/ReactionTooltipContent.js | 12 +- .../ReportActionItemEmojiReactions.js | 26 +- .../ReimbursementAccountLoadingIndicator.js | 14 +- src/components/RenderHTML.js | 4 +- .../ReportActionItem/ChronosOOOListActions.js | 20 +- .../ReportActionItem/MoneyReportView.js | 30 +- .../ReportActionItem/MoneyRequestAction.js | 44 +-- .../ReportActionItem/MoneyRequestPreview.js | 68 ++--- .../ReportActionItem/MoneyRequestView.js | 72 ++--- .../ReportActionItem/RenameAction.js | 16 +- .../ReportActionItem/ReportActionItemImage.js | 28 +- .../ReportActionItemImages.js | 12 +- .../ReportActionItem/ReportPreview.js | 60 ++-- src/components/ReportActionItem/TaskAction.js | 10 +- .../ReportActionItem/TaskPreview.js | 46 ++-- src/components/ReportActionItem/TaskView.js | 56 ++-- .../SkeletonViewLines.js | 10 +- .../ReportActionsSkeletonView/index.js | 6 +- src/components/ReportHeaderSkeletonView.js | 18 +- src/components/ReportWelcomeText.js | 26 +- src/components/RoomHeaderAvatars.js | 16 +- src/components/RoomNameInput/index.js | 8 +- src/components/RoomNameInput/index.native.js | 10 +- src/components/SVGImage/index.js | 2 +- src/components/SafeArea/index.ios.js | 4 +- src/components/SafeAreaConsumer.js | 4 +- src/components/ScreenWrapper/index.js | 38 +-- src/components/ScreenWrapper/propTypes.js | 2 +- src/components/ScrollViewWithContext.js | 2 +- src/components/Section.js | 8 +- src/components/SelectCircle.js | 6 +- src/components/SelectionList/BaseListItem.js | 24 +- .../SelectionList/BaseSelectionList.js | 44 +-- src/components/SelectionList/RadioListItem.js | 4 +- src/components/SelectionList/UserListItem.js | 10 +- src/components/SelectionList/index.js | 2 +- .../SelectionList/selectionListPropTypes.js | 2 +- src/components/SettlementButton.js | 30 +- src/components/ShowContextMenuContext.js | 8 +- .../AppleAuthWrapper/index.ios.js | 4 +- .../AppleSignIn/index.android.js | 12 +- .../AppleSignIn/index.desktop.js | 10 +- .../SignInButtons/AppleSignIn/index.ios.js | 10 +- .../AppleSignIn/index.website.js | 16 +- .../GoogleSignIn/index.desktop.js | 12 +- .../GoogleSignIn/index.native.js | 12 +- .../GoogleSignIn/index.website.js | 10 +- src/components/SignInButtons/IconButton.js | 14 +- .../SignInPageForm/index.native.tsx | 2 +- src/components/SignInPageForm/index.tsx | 2 +- src/components/SingleOptionSelector.js | 10 +- src/components/SpacerView.js | 8 +- src/components/SplashScreenHider/index.js | 4 +- .../SplashScreenHider/index.native.js | 10 +- .../StatePicker/StateSelectorModal.js | 24 +- src/components/StatePicker/index.js | 14 +- src/components/SubscriptAvatar.js | 12 +- src/components/SwipeableView/index.native.tsx | 2 +- src/components/Switch.js | 6 +- src/components/TabSelector/TabIcon.js | 8 +- src/components/TabSelector/TabLabel.js | 6 +- src/components/TabSelector/TabSelector.js | 14 +- src/components/TabSelector/TabSelectorItem.js | 8 +- src/components/TagPicker/index.js | 20 +- .../TagPicker/tagPickerPropTypes.js | 2 +- src/components/TaskHeaderActionButton.js | 16 +- src/components/TestToolMenu.js | 26 +- src/components/TestToolRow.tsx | 2 +- src/components/TestToolsModal.js | 12 +- src/components/Text.tsx | 6 +- src/components/TextInput/BaseTextInput.js | 44 +-- .../TextInput/TextInputLabel/index.js | 8 +- .../TextInput/TextInputLabel/index.native.js | 4 +- src/components/TextInput/index.js | 10 +- src/components/TextInput/index.native.js | 2 +- src/components/TextInput/styleConst.js | 2 +- .../BaseTextInputWithCurrencySymbol.js | 10 +- .../index.android.js | 2 +- .../textInputWithCurrencySymbolPropTypes.js | 2 +- src/components/TextLink.js | 14 +- src/components/TextPill.js | 8 +- src/components/TextWithEllipsis/index.js | 10 +- src/components/ThreeDotsMenu/index.js | 22 +- src/components/ThumbnailImage.js | 12 +- src/components/Tooltip/BaseTooltip.js | 18 +- .../Tooltip/PopoverAnchorTooltip.js | 6 +- .../Tooltip/TooltipRenderedOnPageBody.js | 10 +- src/components/Tooltip/TooltipSense.js | 2 +- src/components/Tooltip/index.js | 4 +- src/components/Tooltip/tooltipPropTypes.js | 6 +- src/components/UnorderedList.js | 6 +- src/components/UnreadActionIndicator.js | 4 +- .../UpdateAppModal/BaseUpdateAppModal.js | 8 +- .../UpdateAppModal/index.desktop.js | 2 +- .../BaseUserDetailsTooltip.web.js | 24 +- src/components/UserDetailsTooltip/index.js | 4 +- .../userDetailsTooltipPropTypes.js | 4 +- .../ValidateCode/ExpiredValidateCodeModal.js | 16 +- .../ValidateCode/JustSignedInModal.js | 18 +- .../ValidateCode/ValidateCodeModal.js | 30 +- .../ValuePicker/ValueSelectorModal.js | 16 +- src/components/ValuePicker/index.js | 16 +- .../BaseVideoChatButtonAndMenu.js | 40 +-- .../VideoChatButtonAndMenu/index.android.js | 4 +- .../VideoChatButtonAndMenu/index.js | 4 +- src/components/WalletSection.js | 2 +- src/components/WalletStatementModal/index.js | 24 +- .../WalletStatementModal/index.native.js | 18 +- src/components/ZeroWidthView/index.js | 8 +- src/components/avatarPropTypes.js | 2 +- src/components/createOnyxContext.tsx | 10 +- src/components/menuItemPropTypes.js | 4 +- src/components/optionPropTypes.js | 4 +- src/components/transactionPropTypes.js | 2 +- src/components/withCurrentReportID.js | 7 +- .../withCurrentUserPersonalDetails.tsx | 10 +- src/components/withEnvironment.tsx | 8 +- src/components/withKeyboardState.js | 6 +- src/components/withLocalize.js | 4 +- src/components/withNavigation.tsx | 4 +- src/components/withNavigationFallback.js | 4 +- src/components/withNavigationFocus.tsx | 4 +- src/components/withTheme.js | 6 +- src/components/withThemeStyles.js | 6 +- src/components/withToggleVisibilityView.js | 6 +- src/components/withViewportOffsetTop.tsx | 6 +- src/components/withWindowDimensions/index.js | 10 +- .../withWindowDimensions/index.native.js | 8 +- src/hooks/useArrowKeyFocusManager.js | 4 +- src/hooks/useAutoFocusInput.js | 4 +- src/hooks/useCopySelectionHelper.ts | 10 +- src/hooks/useCurrentReportID.js | 2 +- src/hooks/useDebounce.js | 2 +- src/hooks/useDelayedInputFocus.js | 4 +- src/hooks/useDragAndDrop.ts | 2 +- src/hooks/useEnvironment.ts | 6 +- src/hooks/useKeyboardShortcut.js | 4 +- src/hooks/useKeyboardState.js | 2 +- src/hooks/useLocalize.js | 2 +- src/hooks/useNetwork.ts | 4 +- src/hooks/usePermissions.ts | 4 +- src/hooks/usePrivatePersonalDetails.js | 6 +- .../useReportScrollManager/index.native.ts | 4 +- src/hooks/useReportScrollManager/index.ts | 4 +- src/hooks/useReportScrollManager/types.ts | 2 +- src/hooks/useSingleExecution.js | 2 +- src/hooks/useWaitForNavigation.js | 2 +- src/hooks/useWindowDimensions/index.native.ts | 2 +- src/hooks/useWindowDimensions/index.ts | 2 +- src/languages/en.ts | 120 ++++---- src/languages/es.ts | 120 ++++---- src/languages/types.ts | 2 +- src/libs/API.ts | 10 +- src/libs/Accessibility/index.ts | 2 +- src/libs/ActiveClientManager/index.native.ts | 3 +- src/libs/ActiveClientManager/index.ts | 9 +- src/libs/ApiUtils.ts | 10 +- src/libs/AppStateMonitor/index.ts | 2 +- src/libs/Authentication.ts | 14 +- src/libs/BootSplash/index.native.ts | 2 +- src/libs/BootSplash/index.ts | 2 +- src/libs/Browser/index.web.ts | 6 +- src/libs/CardUtils.ts | 8 +- src/libs/Clipboard/index.js | 4 +- src/libs/CollectionUtils.ts | 2 +- src/libs/ComposerUtils/getDraftComment.ts | 2 +- src/libs/ComposerUtils/index.ts | 2 +- .../updateIsFullComposerAvailable.ts | 2 +- .../updateNumberOfLines/index.native.ts | 6 +- .../updateNumberOfLines/types.ts | 2 +- src/libs/ControlSelection/index.ts | 2 +- src/libs/ControlSelection/types.ts | 2 +- src/libs/CurrencyUtils.ts | 6 +- src/libs/DateUtils.ts | 33 ++- src/libs/DistanceRequestUtils.js | 2 +- src/libs/E2E/API.mock.js | 9 +- src/libs/E2E/actions/e2eLogin.js | 4 +- src/libs/E2E/client.js | 2 +- src/libs/E2E/isE2ETestSession.native.js | 2 +- src/libs/E2E/reactNativeLaunchingTest.js | 10 +- src/libs/E2E/tests/appStartTimeTest.e2e.js | 6 +- src/libs/E2E/tests/openSearchPageTest.e2e.js | 12 +- src/libs/EmojiTrie.ts | 6 +- src/libs/EmojiUtils.js | 10 +- src/libs/Environment/Environment.js | 6 +- .../Environment/betaChecker/index.android.js | 8 +- src/libs/Environment/getEnvironment/index.js | 2 +- .../getEnvironment/index.native.js | 4 +- src/libs/ErrorUtils.ts | 8 +- src/libs/Firebase/index.native.ts | 2 +- src/libs/Growl.ts | 2 +- src/libs/HeaderUtils.js | 6 +- src/libs/HttpUtils.js | 8 +- src/libs/IOUUtils.ts | 6 +- src/libs/IntlPolyfill/index.native.ts | 2 +- src/libs/IntlPolyfill/polyfillNumberFormat.ts | 2 +- .../bindHandlerToKeydownEvent/index.native.ts | 2 +- .../bindHandlerToKeydownEvent/index.ts | 4 +- .../bindHandlerToKeydownEvent/types.ts | 2 +- src/libs/KeyboardShortcut/index.ts | 4 +- .../isEnterWhileComposition.ts | 4 +- src/libs/LocaleDigitUtils.ts | 1 - src/libs/LocalePhoneNumber.ts | 6 +- .../LocaleListener/BaseLocaleListener.js | 4 +- src/libs/Localize/index.js | 14 +- src/libs/Log.ts | 7 +- src/libs/LoginUtils.ts | 8 +- src/libs/Metrics/index.native.ts | 2 +- src/libs/Metrics/index.ts | 2 +- .../Middleware/HandleUnusedOptimisticID.ts | 10 +- src/libs/Middleware/Logging.ts | 8 +- src/libs/Middleware/Reauthentication.ts | 14 +- src/libs/Middleware/RecheckConnection.ts | 4 +- src/libs/Middleware/SaveResponseInOnyx.ts | 8 +- src/libs/Middleware/types.ts | 4 +- src/libs/MoneyRequestUtils.ts | 2 +- .../Navigation/AppNavigator/AuthScreens.js | 62 ++--- .../AppNavigator/ModalStackNavigators.js | 8 +- .../Navigators/CentralPaneNavigator.js | 12 +- .../AppNavigator/Navigators/Overlay.js | 14 +- .../Navigators/RightModalNavigator.js | 15 +- .../Navigation/AppNavigator/PublicScreens.js | 18 +- .../AppNavigator/RHPScreenOptions.js | 2 +- .../AppNavigator/ReportScreenIDSetter.js | 16 +- .../AppNavigator/ReportScreenWrapper.js | 2 +- .../CustomRouter.js | 6 +- .../createCustomStackNavigator/index.js | 8 +- .../getRootNavigatorScreenOptions.js | 8 +- src/libs/Navigation/AppNavigator/index.js | 2 +- .../modalCardStyleInterpolator.js | 4 +- src/libs/Navigation/FreezeWrapper.js | 4 +- src/libs/Navigation/Navigation.js | 24 +- src/libs/Navigation/NavigationRoot.js | 24 +- src/libs/Navigation/OnyxTabNavigator.js | 8 +- src/libs/Navigation/linkTo.js | 8 +- src/libs/Navigation/linkingConfig.js | 8 +- .../shouldPreventDeeplinkPrompt/index.js | 2 +- src/libs/Network/MainQueue.ts | 4 +- src/libs/Network/NetworkStore.ts | 4 +- src/libs/Network/SequentialQueue.ts | 16 +- src/libs/Network/enhanceParameters.ts | 4 +- src/libs/Network/index.ts | 10 +- src/libs/NetworkConnection.ts | 10 +- src/libs/NextStepUtils.js | 2 +- .../LocalNotification/BrowserNotifications.js | 6 +- .../ForegroundNotifications/index.android.js | 2 +- .../ForegroundNotifications/index.ios.js | 2 +- .../backgroundRefresh/index.android.js | 6 +- .../PushNotification/index.native.js | 12 +- .../shouldShowPushNotification.js | 6 +- .../subscribePushNotification/index.js | 4 +- ...bscribeToReportCommentPushNotifications.js | 10 +- src/libs/NumberUtils.ts | 2 +- .../reportWithoutHasDraftSelector.ts | 2 +- src/libs/OptionsListUtils.js | 30 +- src/libs/PaymentUtils.ts | 12 +- src/libs/Performance.tsx | 17 +- src/libs/Permissions.ts | 4 +- src/libs/PersonalDetailsUtils.js | 4 +- src/libs/PolicyUtils.ts | 8 +- src/libs/Pusher/pusher.ts | 16 +- src/libs/PusherConnectionManager.ts | 4 +- src/libs/PusherUtils.ts | 4 +- src/libs/ReceiptUtils.ts | 14 +- src/libs/ReportActionComposeFocusManager.ts | 2 +- src/libs/ReportActionsUtils.ts | 14 +- src/libs/ReportUtils.js | 24 +- src/libs/Request.ts | 6 +- src/libs/RequestThrottle.ts | 2 +- src/libs/RoomNameInputUtils.ts | 2 +- src/libs/SelectionScraper/index.js | 4 +- src/libs/SessionUtils.ts | 2 +- src/libs/SidebarUtils.ts | 28 +- src/libs/StartupTimer/index.ts | 1 - src/libs/StringUtils.ts | 2 +- src/libs/SuggestionUtils.js | 2 +- src/libs/TransactionUtils.ts | 12 +- src/libs/UnreadIndicatorUpdater/index.js | 8 +- .../updateUnread/index.website.js | 2 +- src/libs/UserUtils.ts | 8 +- src/libs/ValidationUtils.ts | 10 +- src/libs/Visibility/index.native.ts | 1 - src/libs/__mocks__/Permissions.ts | 4 +- src/libs/actions/ActiveClients.ts | 2 +- src/libs/actions/App.js | 26 +- src/libs/actions/AppUpdate.ts | 2 +- src/libs/actions/BankAccounts.ts | 22 +- src/libs/actions/CanvasSize.js | 6 +- src/libs/actions/Card.js | 7 +- src/libs/actions/Chronos.ts | 8 +- src/libs/actions/CloseAccount.ts | 4 +- src/libs/actions/Composer.ts | 2 +- src/libs/actions/CurrentDate.ts | 2 +- src/libs/actions/DemoActions.js | 12 +- .../Device/generateDeviceID/index.android.js | 2 +- src/libs/actions/Device/index.js | 4 +- src/libs/actions/Download.ts | 2 +- src/libs/actions/EmojiPickerAction.ts | 4 +- src/libs/actions/IOU.js | 46 ++-- src/libs/actions/InputFocus/index.desktop.ts | 4 +- src/libs/actions/InputFocus/index.website.ts | 6 +- src/libs/actions/Link.js | 12 +- src/libs/actions/MapboxToken.ts | 12 +- .../actions/MemoryOnlyKeys/MemoryOnlyKeys.js | 4 +- .../index.js | 2 +- src/libs/actions/Modal.ts | 2 +- src/libs/actions/Network.ts | 2 +- src/libs/actions/OnyxUpdateManager.js | 8 +- src/libs/actions/OnyxUpdates.ts | 10 +- src/libs/actions/PaymentMethods.ts | 16 +- src/libs/actions/PersistedRequests.ts | 6 +- src/libs/actions/PersonalDetails.js | 16 +- src/libs/actions/Plaid.ts | 8 +- src/libs/actions/Policy.js | 26 +- src/libs/actions/PushNotification.js | 4 +- .../deleteFromBankAccountList.js | 2 +- .../actions/ReimbursementAccount/errors.js | 4 +- .../actions/ReimbursementAccount/index.js | 4 +- .../ReimbursementAccount/navigation.js | 6 +- .../resetFreePlanBankAccount.js | 10 +- .../actions/ReimbursementAccount/store.js | 6 +- src/libs/actions/Report.js | 54 ++-- src/libs/actions/ReportActions.ts | 10 +- src/libs/actions/Session/index.ts | 48 ++-- .../Session/updateSessionAuthTokens.ts | 2 +- src/libs/actions/SignInRedirect.ts | 18 +- src/libs/actions/Tab.ts | 2 +- src/libs/actions/Task.js | 30 +- src/libs/actions/TeachersUnite.js | 16 +- src/libs/actions/TestTool.ts | 4 +- src/libs/actions/Timing.ts | 10 +- src/libs/actions/Transaction.ts | 20 +- src/libs/actions/TransactionEdit.js | 2 +- src/libs/actions/TwoFactorAuthActions.ts | 8 +- src/libs/actions/User.js | 28 +- src/libs/actions/Wallet.js | 4 +- src/libs/actions/Welcome.ts | 16 +- src/libs/addEncryptedAuthTokenToURL.ts | 2 +- src/libs/calculateAnchorPosition.ts | 4 +- src/libs/canFocusInputOnScreenFocus/index.ts | 2 +- src/libs/convertToLTR/index.android.ts | 2 +- src/libs/convertToLTRForComposer/index.ts | 2 +- src/libs/fileDownload/FileUtils.js | 6 +- src/libs/fileDownload/getAttachmentDetails.js | 4 +- src/libs/fileDownload/index.ios.js | 4 +- src/libs/fileDownload/index.js | 2 +- src/libs/focusAndUpdateMultilineInputRange.ts | 1 + src/libs/getButtonState.ts | 2 +- src/libs/getModalState.js | 2 +- src/libs/getOperatingSystem/index.native.ts | 2 +- src/libs/getOperatingSystem/index.ts | 2 +- src/libs/getOperatingSystem/types.ts | 2 +- .../getPermittedDecimalSeparator/index.js | 4 +- .../index.android.ts | 2 +- .../getPlaidLinkTokenParameters/index.ios.ts | 2 +- src/libs/getPlaidLinkTokenParameters/index.ts | 4 +- src/libs/getPlatform/index.android.ts | 2 +- src/libs/getPlatform/index.desktop.ts | 2 +- src/libs/getPlatform/index.ios.ts | 2 +- src/libs/getPlatform/index.ts | 2 +- src/libs/getPlatform/types.ts | 2 +- .../index.android.ts | 2 +- src/libs/isReportMessageAttachment.ts | 4 +- src/libs/localFileDownload/index.android.ts | 2 +- src/libs/localFileDownload/index.ios.ts | 2 +- src/libs/localFileDownload/index.ts | 2 +- src/libs/migrateOnyx.js | 2 +- .../CheckForPreviousReportActionID.js | 6 +- .../KeyReportActionsDraftByReportActionID.js | 6 +- .../migrations/PersonalDetailsByAccountID.js | 6 +- src/libs/migrations/RenameReceiptFilename.js | 6 +- src/libs/models/BankAccount.js | 4 +- src/libs/onyxSubscribe.ts | 2 +- .../index.native.ts | 2 +- .../index.ts | 2 +- src/libs/tryResolveUrlFromApiRoot.ts | 4 +- src/pages/AddPersonalBankAccountPage.js | 32 +-- src/pages/ConciergePage.js | 16 +- src/pages/DemoSetupPage.js | 14 +- src/pages/DetailsPage.js | 54 ++-- src/pages/EditRequestAmountPage.js | 10 +- src/pages/EditRequestCategoryPage.js | 16 +- src/pages/EditRequestCreatedPage.js | 16 +- src/pages/EditRequestDescriptionPage.js | 26 +- src/pages/EditRequestDistancePage.js | 28 +- src/pages/EditRequestMerchantPage.js | 18 +- src/pages/EditRequestPage.js | 48 ++-- src/pages/EditRequestReceiptPage.js | 14 +- src/pages/EditRequestTagPage.js | 16 +- src/pages/EditSplitBillPage.js | 28 +- src/pages/EnablePayments/ActivateStep.js | 18 +- .../EnablePayments/AdditionalDetailsStep.js | 44 +-- .../EnablePayments/EnablePaymentsPage.js | 31 +-- src/pages/EnablePayments/FailedKYC.js | 10 +- src/pages/EnablePayments/IdologyQuestions.js | 28 +- src/pages/EnablePayments/OnfidoPrivacy.js | 28 +- src/pages/EnablePayments/OnfidoStep.js | 22 +- .../EnablePayments/TermsPage/LongTermsForm.js | 18 +- .../TermsPage/ShortTermsForm.js | 12 +- src/pages/EnablePayments/TermsStep.js | 26 +- .../EnablePayments/walletTermsPropTypes.js | 2 +- src/pages/ErrorPage/ErrorBodyText/index.js | 10 +- src/pages/ErrorPage/GenericErrorPage.js | 30 +- src/pages/ErrorPage/NotFoundPage.js | 4 +- src/pages/FlagCommentPage.js | 40 +-- src/pages/GetAssistancePage.js | 36 +-- src/pages/KeyboardShortcutsPage.js | 18 +- src/pages/LogInWithShortLivedAuthTokenPage.js | 28 +- src/pages/LogOutPreviousUserPage.js | 12 +- src/pages/NewChatPage.js | 40 +-- src/pages/NewChatSelectorPage.js | 20 +- .../PrivateNotes/PrivateNotesEditPage.js | 52 ++-- .../PrivateNotes/PrivateNotesListPage.js | 50 ++-- .../PrivateNotes/PrivateNotesViewPage.js | 36 +-- src/pages/ProfilePage.js | 74 ++--- .../ReimbursementAccount/ACHContractStep.js | 32 +-- src/pages/ReimbursementAccount/AddressForm.js | 12 +- .../BankAccountManualStep.js | 34 +-- .../BankAccountPlaidStep.js | 34 +-- .../ReimbursementAccount/BankAccountStep.js | 50 ++-- src/pages/ReimbursementAccount/CompanyStep.js | 42 +-- .../ContinueBankAccountSetup.js | 30 +- .../ReimbursementAccount/Enable2FAPrompt.js | 16 +- src/pages/ReimbursementAccount/EnableStep.js | 44 +-- .../ReimbursementAccount/IdentityForm.js | 12 +- .../ReimbursementAccountPage.js | 56 ++-- .../RequestorOnfidoStep.js | 24 +- .../ReimbursementAccount/RequestorStep.js | 30 +- .../ReimbursementAccount/StepPropTypes.js | 4 +- .../ReimbursementAccount/ValidationStep.js | 48 ++-- .../ReimbursementAccount/exampleCheckImage.js | 6 +- .../reimbursementAccountPropTypes.js | 2 +- src/pages/ReportDetailsPage.js | 54 ++-- src/pages/ReportParticipantsPage.js | 36 +-- src/pages/ReportWelcomeMessagePage.js | 44 +-- src/pages/RoomInvitePage.js | 44 +-- src/pages/RoomMembersPage.js | 50 ++-- src/pages/SearchPage.js | 38 +-- src/pages/ShareCodePage.js | 44 +-- src/pages/TeachersUnite/ImTeacherPage.js | 6 +- .../TeachersUnite/ImTeacherUpdateEmailPage.js | 22 +- .../TeachersUnite/IntroSchoolPrincipalPage.js | 34 +-- src/pages/TeachersUnite/KnowATeacherPage.js | 36 +-- src/pages/TeachersUnite/SaveTheWorldPage.js | 28 +- src/pages/UnlinkLoginPage.js | 18 +- src/pages/ValidateLoginPage/index.js | 14 +- src/pages/ValidateLoginPage/index.website.js | 22 +- src/pages/home/HeaderView.js | 62 ++--- src/pages/home/ReportScreen.js | 68 ++--- src/pages/home/ReportScreenContext.ts | 2 +- .../report/AnimatedEmptyStateBackground.js | 12 +- .../BaseReportActionContextMenu.js | 32 +-- .../report/ContextMenu/ContextMenuActions.js | 44 +-- .../MiniReportActionContextMenu/index.js | 15 +- .../PopoverReportActionContextMenu.js | 14 +- .../index.android.js | 4 +- .../FloatingMessageCounterContainer/index.js | 2 +- .../report/FloatingMessageCounter/index.js | 22 +- src/pages/home/report/LinkPreviewer.js | 18 +- .../ListBoundaryLoader/ListBoundaryLoader.js | 12 +- src/pages/home/report/ParticipantLocalTime.js | 18 +- .../report/ReactionList/BaseReactionList.js | 22 +- .../report/ReactionList/HeaderReactionList.js | 14 +- .../BasePopoverReactionList.js | 26 +- .../ReactionList/PopoverReactionList/index.js | 2 +- .../AttachmentPickerWithMenuItems.js | 36 +-- .../ComposerWithSuggestions.js | 70 ++--- .../ReportActionCompose.js | 68 ++--- .../report/ReportActionCompose/SendButton.js | 18 +- .../SilentCommentUpdater.js | 8 +- .../ReportActionCompose/SuggestionEmoji.js | 18 +- .../ReportActionCompose/SuggestionMention.js | 24 +- .../report/ReportActionCompose/Suggestions.js | 4 +- .../composerWithSuggestionsProps.js | 4 +- src/pages/home/report/ReportActionItem.js | 134 ++++----- .../report/ReportActionItemBasicMessage.js | 6 +- .../home/report/ReportActionItemCreated.js | 36 +-- src/pages/home/report/ReportActionItemDate.js | 12 +- .../home/report/ReportActionItemDraft.js | 4 +- .../home/report/ReportActionItemFragment.js | 38 +-- .../home/report/ReportActionItemGrouped.js | 4 +- .../home/report/ReportActionItemMessage.js | 14 +- .../report/ReportActionItemMessageEdit.js | 72 ++--- .../report/ReportActionItemParentAction.js | 26 +- .../home/report/ReportActionItemSingle.js | 56 ++-- .../home/report/ReportActionItemThread.js | 22 +- src/pages/home/report/ReportActionsList.js | 40 +-- .../report/ReportActionsListItemRenderer.js | 8 +- src/pages/home/report/ReportActionsView.js | 38 +-- src/pages/home/report/ReportAttachments.js | 10 +- .../home/report/ReportAttachmentsContext.js | 4 +- .../home/report/ReportDetailsShareCodePage.js | 6 +- src/pages/home/report/ReportDropUI.js | 14 +- src/pages/home/report/ReportFooter.js | 34 +-- .../home/report/ReportTypingIndicator.js | 22 +- .../withReportAndReportActionOrNotFound.js | 24 +- .../home/report/withReportOrNotFound.tsx | 14 +- .../home/sidebar/AvatarWithOptionalStatus.js | 16 +- .../GlobalNavigationMenuItem.js | 16 +- .../home/sidebar/GlobalNavigation/index.js | 18 +- .../sidebar/PressableAvatarWithIndicator.js | 22 +- src/pages/home/sidebar/SidebarLinks.js | 52 ++-- src/pages/home/sidebar/SidebarLinksData.js | 28 +- .../home/sidebar/SidebarNavigationContext.js | 8 +- .../SidebarScreen/BaseSidebarScreen.js | 18 +- .../FloatingActionButtonAndPopover.js | 52 ++-- src/pages/home/sidebar/SidebarScreen/index.js | 4 +- .../sidebar/SidebarScreen/index.native.js | 4 +- src/pages/home/sidebar/SignInButton.js | 12 +- .../SignInOrAvatarWithOptionalStatus.js | 18 +- .../sidebar/SubNavigation/SubNavigation.js | 14 +- src/pages/iou/IOUCurrencySelection.js | 36 +-- src/pages/iou/MoneyRequestCategoryPage.js | 30 +- src/pages/iou/MoneyRequestDatePage.js | 30 +- src/pages/iou/MoneyRequestDescriptionPage.js | 38 +-- src/pages/iou/MoneyRequestEditWaypointPage.js | 2 +- src/pages/iou/MoneyRequestMerchantPage.js | 28 +- src/pages/iou/MoneyRequestSelectorPage.js | 44 +-- src/pages/iou/MoneyRequestTagPage.js | 36 +-- src/pages/iou/NewDistanceRequestPage.js | 14 +- .../NewDistanceRequestWaypointEditorPage.js | 4 +- src/pages/iou/ReceiptDropUI.js | 12 +- .../ReceiptSelector/NavigationAwareCamera.js | 4 +- .../NavigationAwareCamera.native.js | 6 +- src/pages/iou/ReceiptSelector/index.js | 54 ++-- src/pages/iou/ReceiptSelector/index.native.js | 42 +-- src/pages/iou/SplitBillDetailsPage.js | 44 +-- src/pages/iou/WaypointEditor.js | 46 ++-- src/pages/iou/propTypes/index.js | 4 +- src/pages/iou/steps/MoneyRequestAmountForm.js | 34 +-- .../iou/steps/MoneyRequestConfirmPage.js | 52 ++-- .../MoneyRequestParticipantsPage.js | 32 +-- .../MoneyRequestParticipantsSelector.js | 28 +- src/pages/iou/steps/NewRequestAmountPage.js | 36 +-- src/pages/reportPropTypes.js | 6 +- src/pages/settings/AboutPage/AboutPage.js | 44 +-- src/pages/settings/AppDownloadLinks.js | 30 +- src/pages/settings/InitialSettingsPage.js | 86 +++--- .../settings/Preferences/LanguagePage.js | 20 +- .../settings/Preferences/PreferencesPage.js | 34 +-- .../settings/Preferences/PriorityModePage.js | 26 +- src/pages/settings/Preferences/ThemePage.js | 28 +- .../Contacts/ContactMethodDetailsPage.js | 46 ++-- .../Profile/Contacts/ContactMethodsPage.js | 32 +-- .../Profile/Contacts/NewContactMethodPage.js | 38 +-- .../ValidateCodeForm/BaseValidateCodeForm.js | 46 ++-- .../Profile/CustomStatus/StatusPage.js | 40 +-- .../Profile/CustomStatus/StatusSetPage.js | 34 +-- src/pages/settings/Profile/DisplayNamePage.js | 38 +-- .../settings/Profile/LoungeAccessPage.js | 42 +-- .../Profile/PersonalDetails/AddressPage.js | 40 +-- .../PersonalDetails/CountrySelectionPage.js | 20 +- .../PersonalDetails/DateOfBirthPage.js | 34 +-- .../Profile/PersonalDetails/LegalNamePage.js | 40 +-- .../PersonalDetailsInitialPage.js | 32 +-- src/pages/settings/Profile/ProfilePage.js | 44 +-- src/pages/settings/Profile/PronounsPage.js | 34 +-- .../settings/Profile/TimezoneInitialPage.js | 26 +- .../settings/Profile/TimezoneSelectPage.js | 22 +- .../Report/NotificationPreferencePage.js | 26 +- .../settings/Report/ReportSettingsPage.js | 46 ++-- src/pages/settings/Report/RoomNamePage.js | 42 +-- .../settings/Report/WriteCapabilityPage.js | 34 +-- .../settings/Security/CloseAccountPage.js | 42 +-- .../settings/Security/SecuritySettingsPage.js | 26 +- .../TwoFactorAuth/StepWrapper/StepWrapper.js | 14 +- .../Security/TwoFactorAuth/Steps/CodesStep.js | 44 +-- .../TwoFactorAuth/Steps/DisabledStep.js | 18 +- .../TwoFactorAuth/Steps/EnabledStep.js | 24 +- .../TwoFactorAuth/Steps/SuccessStep.js | 14 +- .../TwoFactorAuth/Steps/VerifyStep.js | 40 +-- .../BaseTwoFactorAuthForm.js | 16 +- .../TwoFactorAuthForm/index.android.js | 2 +- .../TwoFactorAuth/TwoFactorAuthForm/index.js | 2 +- .../TwoFactorAuth/TwoFactorAuthPage.js | 2 +- .../TwoFactorAuth/TwoFactorAuthSteps.js | 10 +- .../Wallet/ActivatePhysicalCardPage.js | 48 ++-- src/pages/settings/Wallet/AddDebitCardPage.js | 42 +-- .../Wallet/ChooseTransferAccountPage.js | 28 +- .../settings/Wallet/DangerCardSection.js | 6 +- .../settings/Wallet/ExpensifyCardPage.js | 44 +-- .../settings/Wallet/PaymentMethodList.js | 54 ++-- .../settings/Wallet/ReportCardLostPage.js | 42 +-- .../Wallet/ReportVirtualCardFraudPage.js | 32 +-- .../settings/Wallet/TransferBalancePage.js | 52 ++-- src/pages/settings/Wallet/WalletEmptyState.js | 22 +- .../settings/Wallet/WalletPage/CardDetails.js | 26 +- .../settings/Wallet/WalletPage/WalletPage.js | 74 ++--- .../Wallet/WalletPage/walletPagePropTypes.js | 12 +- .../settings/Wallet/assignedCardPropTypes.js | 2 +- .../Wallet/walletTransferPropTypes.js | 2 +- .../AppleSignInDesktopPage/index.website.js | 4 +- src/pages/signin/ChangeExpensifyLoginLink.js | 16 +- src/pages/signin/ChooseSSOOrMagicCode.js | 28 +- src/pages/signin/DesktopRedirectPage.js | 4 +- .../index.website.js | 2 +- src/pages/signin/EmailDeliveryFailurePage.js | 22 +- .../GoogleSignInDesktopPage/index.website.js | 4 +- src/pages/signin/Licenses.js | 12 +- src/pages/signin/LoginForm/BaseLoginForm.js | 62 ++--- src/pages/signin/LoginForm/index.js | 2 +- src/pages/signin/LoginForm/index.native.js | 4 +- src/pages/signin/SAMLSignInPage/index.js | 22 +- src/pages/signin/SignInHeroCopy.js | 16 +- src/pages/signin/SignInHeroImage.js | 10 +- src/pages/signin/SignInModal.js | 10 +- src/pages/signin/SignInPage.js | 46 ++-- src/pages/signin/SignInPageHero.js | 12 +- .../BackgroundImage/index.android.js | 4 +- .../SignInPageLayout/BackgroundImage/index.js | 8 +- src/pages/signin/SignInPageLayout/Footer.js | 32 +-- .../SignInPageLayout/SignInPageContent.js | 24 +- src/pages/signin/SignInPageLayout/index.js | 30 +- .../signInPageStyles/index.js | 2 +- .../signInPageStyles/index.native.js | 2 +- src/pages/signin/Socials.js | 16 +- src/pages/signin/Terms.js | 10 +- src/pages/signin/ThirdPartySignInPage.js | 28 +- src/pages/signin/UnlinkLoginForm.js | 32 +-- .../ValidateCodeForm/BaseValidateCodeForm.js | 52 ++-- .../signin/ValidateCodeForm/index.android.js | 2 +- src/pages/signin/ValidateCodeForm/index.js | 2 +- src/pages/tasks/NewTaskDescriptionPage.js | 34 +-- src/pages/tasks/NewTaskDetailsPage.js | 36 +-- src/pages/tasks/NewTaskPage.js | 40 +-- src/pages/tasks/NewTaskTitlePage.js | 32 +-- src/pages/tasks/TaskAssigneeSelectorModal.js | 40 +-- src/pages/tasks/TaskDescriptionPage.js | 40 +-- .../TaskShareDestinationSelectorModal.js | 36 +-- src/pages/tasks/TaskTitlePage.js | 36 +-- src/pages/wallet/WalletStatementPage.js | 40 +-- src/pages/workspace/WorkspaceInitialPage.js | 64 ++--- .../workspace/WorkspaceInviteMessagePage.js | 50 ++-- src/pages/workspace/WorkspaceInvitePage.js | 38 +-- src/pages/workspace/WorkspaceMembersPage.js | 62 ++--- src/pages/workspace/WorkspaceNewRoomPage.js | 54 ++-- .../workspace/WorkspacePageWithSections.js | 34 +-- .../WorkspaceResetBankAccountModal.js | 18 +- .../WorkspaceSettingsCurrencyPage.js | 28 +- src/pages/workspace/WorkspaceSettingsPage.js | 46 ++-- src/pages/workspace/WorkspacesListPage.js | 54 ++-- .../bills/WorkspaceBillsFirstSection.js | 28 +- .../bills/WorkspaceBillsNoVBAView.js | 14 +- .../workspace/bills/WorkspaceBillsPage.js | 8 +- .../workspace/bills/WorkspaceBillsVBAView.js | 16 +- .../workspace/card/WorkspaceCardNoVBAView.js | 16 +- src/pages/workspace/card/WorkspaceCardPage.js | 8 +- .../card/WorkspaceCardVBANoECardView.js | 26 +- .../card/WorkspaceCardVBAWithECardView.js | 16 +- .../invoices/WorkspaceInvoicesFirstSection.js | 16 +- .../invoices/WorkspaceInvoicesNoVBAView.js | 14 +- .../invoices/WorkspaceInvoicesPage.js | 8 +- .../invoices/WorkspaceInvoicesVBAView.js | 16 +- .../reimburse/WorkspaceRateAndUnitPage.js | 44 +-- .../reimburse/WorkspaceReimbursePage.js | 12 +- .../reimburse/WorkspaceReimburseSection.js | 28 +- .../reimburse/WorkspaceReimburseView.js | 48 ++-- .../travel/WorkspaceTravelNoVBAView.js | 14 +- .../workspace/travel/WorkspaceTravelPage.js | 8 +- .../travel/WorkspaceTravelVBAView.js | 18 +- src/pages/workspace/withPolicy.js | 16 +- .../withPolicyAndFullscreenLoading.js | 14 +- src/setup/index.js | 12 +- src/setup/platformSetup/index.desktop.js | 10 +- src/setup/platformSetup/index.native.js | 8 +- src/setup/platformSetup/index.website.js | 10 +- src/stories/AddressSearch.stories.js | 2 +- src/stories/Banner.stories.js | 2 +- src/stories/Button.stories.js | 4 +- src/stories/ButtonWithDropdownMenu.stories.js | 2 +- src/stories/Checkbox.stories.js | 2 +- src/stories/CheckboxWithLabel.stories.js | 6 +- src/stories/Composer.stories.js | 18 +- src/stories/Datepicker.stories.js | 2 +- src/stories/DragAndDrop.stories.js | 12 +- src/stories/EReceipt.stories.js | 4 +- src/stories/EReceiptThumbail.stories.js | 2 +- src/stories/Form.stories.js | 26 +- .../FormAlertWithSubmitButton.stories.js | 2 +- src/stories/Header.stories.js | 2 +- src/stories/HeaderWithBackButton.stories.js | 2 +- src/stories/InlineSystemMessage.stories.js | 2 +- src/stories/MagicCodeInput.stories.js | 2 +- src/stories/MenuItem.stories.js | 6 +- src/stories/OptionRow.stories.js | 7 +- src/stories/Picker.stories.js | 2 +- src/stories/PopoverMenu.stories.js | 8 +- src/stories/ReportActionItemImages.stories.js | 4 +- src/stories/SelectionList.stories.js | 10 +- src/stories/SubscriptAvatar.stories.js | 8 +- src/stories/TextInput.stories.js | 2 +- src/stories/Tooltip.stories.js | 2 +- src/styles/StyleUtils.ts | 8 +- src/styles/ThemeStylesProvider.tsx | 4 +- src/styles/addOutlineWidth/index.native.ts | 1 - src/styles/addOutlineWidth/index.ts | 3 +- .../animation/SpinningIndicatorAnimation.js | 2 +- src/styles/cardStyles/index.ts | 2 +- .../containerComposeStyles/index.native.ts | 2 +- src/styles/containerComposeStyles/index.ts | 2 +- src/styles/editedLabelStyles/index.ts | 4 +- src/styles/getContextMenuItemStyles/index.js | 4 +- .../getContextMenuItemStyles/index.native.js | 2 +- src/styles/getModalStyles.ts | 2 +- .../index.desktop.ts | 2 +- .../index.website.ts | 2 +- .../getPopOverVerticalOffset/index.desktop.ts | 2 +- src/styles/optionRowStyles/index.native.ts | 2 +- src/styles/optionRowStyles/index.ts | 2 +- src/styles/styles.ts | 12 +- src/styles/themes/ThemeProvider.js | 9 +- src/styles/themes/default.ts | 4 +- src/styles/themes/light.ts | 4 +- src/styles/themes/types.ts | 2 +- src/styles/themes/useThemePreference.js | 6 +- src/styles/utilities/writingDirection.ts | 1 + .../modules/react-native-key-command.d.ts | 48 ++-- src/types/modules/react-native-onyx.d.ts | 2 +- src/types/modules/react-native.d.ts | 4 +- src/types/onyx/Account.ts | 2 +- src/types/onyx/BankAccount.ts | 2 +- src/types/onyx/Beta.ts | 2 +- src/types/onyx/Card.ts | 2 +- src/types/onyx/Fund.ts | 2 +- src/types/onyx/OnyxCommon.ts | 4 +- src/types/onyx/OriginalMessage.ts | 4 +- src/types/onyx/PaymentMethod.ts | 2 +- src/types/onyx/PlaidData.ts | 2 +- src/types/onyx/Policy.ts | 2 +- src/types/onyx/ReimbursementAccount.ts | 2 +- src/types/onyx/Report.ts | 2 +- src/types/onyx/Session.ts | 2 +- src/types/onyx/Transaction.ts | 2 +- src/types/onyx/UserWallet.ts | 2 +- src/types/onyx/WalletTransfer.ts | 2 +- src/types/onyx/index.ts | 72 ++--- tests/actions/IOUTest.js | 26 +- tests/actions/ReportTest.js | 26 +- tests/actions/SessionTest.js | 13 +- .../perf-test/ReportActionsList.perf-test.js | 20 +- tests/perf-test/SelectionList.perf-test.js | 2 +- tests/perf-test/SidebarLinks.perf-test.js | 8 +- tests/ui/UnreadIndicatorsTest.js | 32 +-- tests/unit/APITest.js | 13 +- tests/unit/CalendarPickerTest.js | 6 +- tests/unit/CurrencyUtilsTest.js | 7 +- tests/unit/DateUtilsTest.js | 4 +- tests/unit/EmojiTest.js | 10 +- tests/unit/IOUUtilsTest.js | 2 +- tests/unit/LocalePhoneNumberTest.js | 2 +- tests/unit/LocalizeTests.js | 4 +- tests/unit/LoginUtilsTest.js | 2 +- tests/unit/MiddlewareTest.js | 8 +- tests/unit/MigrationTest.js | 4 +- tests/unit/NetworkTest.js | 21 +- tests/unit/OptionsListUtilsTest.js | 6 +- tests/unit/ReportActionItemSingleTest.js | 2 +- tests/unit/ReportActionsUtilsTest.js | 4 +- tests/unit/ReportUtilsTest.js | 4 +- tests/unit/RequestTest.js | 2 +- tests/unit/SidebarFilterTest.js | 8 +- tests/unit/SidebarOrderTest.js | 10 +- tests/unit/SidebarTest.js | 8 +- tests/unit/ValidationUtilsTest.js | 2 +- tests/unit/enhanceParametersTest.js | 4 +- tests/unit/loginTest.js | 4 +- tests/utils/LHNTestUtils.js | 14 +- tests/utils/PusherHelper.js | 4 +- tests/utils/TestHelper.js | 6 +- tests/utils/bumpVersion.mjs | 1 - tests/utils/getPreviousVersion.mjs | 1 - tests/utils/getPullRequestsMergedBetween.mjs | 1 - tests/utils/waitForBatchedUpdates.js | 1 + wdyr.js | 3 +- 1087 files changed, 8303 insertions(+), 8335 deletions(-) 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'; From 23898a19c4fc3dd08b9e94b96f89dda84b9388af Mon Sep 17 00:00:00 2001 From: Mahesh Vagicherla Date: Sat, 28 Oct 2023 20:06:49 +0530 Subject: [PATCH 50/51] fix typecheck issue --- src/types/modules/react-native-key-command.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/modules/react-native-key-command.d.ts b/src/types/modules/react-native-key-command.d.ts index 5cac93f2a90b..4c7f07bd6d7e 100644 --- a/src/types/modules/react-native-key-command.d.ts +++ b/src/types/modules/react-native-key-command.d.ts @@ -23,9 +23,9 @@ declare module 'react-native-key-command' { keyModifierAlternate = 'keyModifierAlternate', } - type KeyCommand = {input: string; modifierFlags: string}; + type KeyCommand = {input: string; modifierFlags?: string}; - declare function addListener(keyCommand: KeyCommand, callback: (keycommandEvent: KeyCommand, event: Event) => void): () => void; + declare function addListener(keyCommand: KeyCommand, callback: (keycommandEvent: KeyCommand, event: KeyboardEvent) => void): () => void; // eslint-disable-next-line import/prefer-default-export export {constants, addListener}; From a094cbb4f02ffeb21608176d986de7b8ace1794d Mon Sep 17 00:00:00 2001 From: OSBotify Date: Mon, 30 Oct 2023 07:28:13 +0000 Subject: [PATCH 51/51] Update version to 1.3.93-0 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 4 ++-- ios/NewExpensifyTests/Info.plist | 4 ++-- package-lock.json | 4 ++-- package.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 8396dc1e4ec1..badc6ed25b07 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -90,8 +90,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001039204 - versionName "1.3.92-4" + versionCode 1001039300 + versionName "1.3.93-0" } flavorDimensions "default" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 848823f3578e..10c7e43c98f1 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.3.92 + 1.3.93 CFBundleSignature ???? CFBundleURLTypes @@ -40,7 +40,7 @@ CFBundleVersion - 1.3.92.4 + 1.3.93.0 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index d211b5b97278..ad90d11e41f0 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.3.92 + 1.3.93 CFBundleSignature ???? CFBundleVersion - 1.3.92.4 + 1.3.93.0 diff --git a/package-lock.json b/package-lock.json index d7f3ddc6653e..690e658fa476 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.92-4", + "version": "1.3.93-0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.92-4", + "version": "1.3.93-0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 01159ac08d2c..a8143fd2a809 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.92-4", + "version": "1.3.93-0", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", @@ -303,4 +303,4 @@ "node": "16.15.1", "npm": "8.11.0" } -} \ No newline at end of file +}