diff --git a/src/components/SignInButtons/AppleSignIn/index.website.tsx b/src/components/SignInButtons/AppleSignIn/index.website.tsx index f256330c2344..9d7322878c98 100644 --- a/src/components/SignInButtons/AppleSignIn/index.website.tsx +++ b/src/components/SignInButtons/AppleSignIn/index.website.tsx @@ -1,12 +1,14 @@ import React, {useEffect, useState} from 'react'; -import Config, {NativeConfig} from 'react-native-config'; +import type {NativeConfig} from 'react-native-config'; +import Config from 'react-native-config'; import getUserLanguage from '@components/SignInButtons/GetUserLanguage'; -import withNavigationFocus, {WithNavigationFocusProps} from '@components/withNavigationFocus'; +import type {WithNavigationFocusProps} from '@components/withNavigationFocus'; +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'; -import {AppleIDSignInOnFailureEvent, AppleIDSignInOnSuccessEvent} from '@src/types/modules/dom'; +import type {AppleIDSignInOnFailureEvent, AppleIDSignInOnSuccessEvent} from '@src/types/modules/dom'; // 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/GetUserLanguage.ts b/src/components/SignInButtons/GetUserLanguage.ts index 611ba415008b..a1101e92f656 100644 --- a/src/components/SignInButtons/GetUserLanguage.ts +++ b/src/components/SignInButtons/GetUserLanguage.ts @@ -1,4 +1,4 @@ -import {ValueOf} from 'type-fest'; +import type {ValueOf} from 'type-fest'; const localeCodes = { en: 'en_US', diff --git a/src/components/SignInButtons/GoogleSignIn/index.website.tsx b/src/components/SignInButtons/GoogleSignIn/index.website.tsx index 5d419c8744e5..3cc4cdebffa6 100644 --- a/src/components/SignInButtons/GoogleSignIn/index.website.tsx +++ b/src/components/SignInButtons/GoogleSignIn/index.website.tsx @@ -5,7 +5,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import * as Session from '@userActions/Session'; import CONFIG from '@src/CONFIG'; import CONST from '@src/CONST'; -import Response from '@src/types/modules/google'; +import type Response from '@src/types/modules/google'; type GoogleSignInProps = { isDesktopFlow?: boolean; diff --git a/src/components/SignInButtons/IconButton.tsx b/src/components/SignInButtons/IconButton.tsx index 848ca5463854..7ef476cff18a 100644 --- a/src/components/SignInButtons/IconButton.tsx +++ b/src/components/SignInButtons/IconButton.tsx @@ -1,13 +1,13 @@ import React from 'react'; -import {ValueOf} from 'type-fest'; +import type {ValueOf} from 'type-fest'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; -import {TranslationPaths} from '@src/languages/types'; -import IconAsset from '@src/types/utils/IconAsset'; +import type {TranslationPaths} from '@src/languages/types'; +import type IconAsset from '@src/types/utils/IconAsset'; const providerData = { [CONST.SIGN_IN_METHOD.APPLE]: { diff --git a/src/languages/es.ts b/src/languages/es.ts index b83385b602c8..8969ce91a9a5 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -1778,7 +1778,7 @@ export default { messages: { created: ({title}: TaskCreatedActionParams) => `tarea para ${title}`, completed: 'marcada como completa', - canceled: 'tarea eliminado', + canceled: 'tarea eliminada', reopened: 'marcada como incompleta', error: 'No tiene permiso para realizar la acción solicitada.', }, @@ -2416,7 +2416,7 @@ export default { deletedMessage: '[Mensaje eliminado]', deletedRequest: '[Pedido eliminado]', reversedTransaction: '[Transacción anulada]', - deletedTask: '[Tarea eliminado]', + deletedTask: '[Tarea eliminada]', hiddenMessage: '[Mensaje oculto]', }, threads: { diff --git a/src/pages/RoomInvitePage.js b/src/pages/RoomInvitePage.js index f290eff91669..5254339dd7ba 100644 --- a/src/pages/RoomInvitePage.js +++ b/src/pages/RoomInvitePage.js @@ -1,3 +1,5 @@ +import {parsePhoneNumber} from 'awesome-phonenumber'; +import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; import React, {useCallback, useEffect, useMemo, useState} from 'react'; @@ -13,6 +15,7 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import compose from '@libs/compose'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; @@ -102,8 +105,9 @@ function RoomInvitePage(props) { filterSelectedOptions = _.filter(selectedOptions, (option) => { const accountID = lodashGet(option, 'accountID', null); const isOptionInPersonalDetails = _.some(personalDetails, (personalDetail) => personalDetail.accountID === accountID); - - const isPartOfSearchTerm = option.text.toLowerCase().includes(searchTerm.trim().toLowerCase()); + const parsedPhoneNumber = parsePhoneNumber(LoginUtils.appendCountryCode(Str.removeSMSDomain(searchTerm))); + const searchValue = parsedPhoneNumber.possible ? parsedPhoneNumber.number.e164 : searchTerm.toLowerCase(); + const isPartOfSearchTerm = option.text.toLowerCase().includes(searchValue) || option.login.toLowerCase().includes(searchValue); return isPartOfSearchTerm || isOptionInPersonalDetails; }); } diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index 6496fbecfc9f..1f75ea0f1aa0 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -1,3 +1,5 @@ +import {parsePhoneNumber} from 'awesome-phonenumber'; +import Str from 'expensify-common/lib/str'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; import React, {useEffect, useMemo, useState} from 'react'; @@ -14,6 +16,7 @@ import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; import compose from '@libs/compose'; import * as DeviceCapabilities from '@libs/DeviceCapabilities'; +import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; import * as OptionsListUtils from '@libs/OptionsListUtils'; import * as PolicyUtils from '@libs/PolicyUtils'; @@ -141,8 +144,10 @@ function WorkspaceInvitePage(props) { filterSelectedOptions = _.filter(selectedOptions, (option) => { const accountID = lodashGet(option, 'accountID', null); const isOptionInPersonalDetails = _.some(personalDetails, (personalDetail) => personalDetail.accountID === accountID); + const parsedPhoneNumber = parsePhoneNumber(LoginUtils.appendCountryCode(Str.removeSMSDomain(searchTerm))); + const searchValue = parsedPhoneNumber.possible ? parsedPhoneNumber.number.e164 : searchTerm.toLowerCase(); - const isPartOfSearchTerm = option.text.toLowerCase().includes(searchTerm.trim().toLowerCase()); + const isPartOfSearchTerm = option.text.toLowerCase().includes(searchValue) || option.login.toLowerCase().includes(searchValue); return isPartOfSearchTerm || isOptionInPersonalDetails; }); }