diff --git a/.well-known/apple-app-site-association b/.well-known/apple-app-site-association index a9e2b0383691..d6da0232f2fc 100644 --- a/.well-known/apple-app-site-association +++ b/.well-known/apple-app-site-association @@ -75,6 +75,10 @@ { "/": "/teachersunite/*", "comment": "Teachers Unite!" + }, + { + "/": "/search/*", + "comment": "Search" } ] } diff --git a/android/app/build.gradle b/android/app/build.gradle index 4c5311ffea20..b63b41077169 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 1001037403 - versionName "1.3.74-3" + versionCode 1001037500 + versionName "1.3.75-0" } flavorDimensions "default" diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 8d69c62bfd1f..dc135fa9834e 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -67,6 +67,7 @@ + @@ -83,6 +84,7 @@ + diff --git a/docs/articles/expensify-classic/policy-and-domain-settings/Admins.md b/docs/articles/expensify-classic/policy-and-domain-settings/Admins.md deleted file mode 100644 index cea96cfe2057..000000000000 --- a/docs/articles/expensify-classic/policy-and-domain-settings/Admins.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Admins -description: Admins ---- -## Resource Coming Soon! diff --git a/docs/articles/expensify-classic/policy-and-domain-settings/Domain-Admins.md b/docs/articles/expensify-classic/policy-and-domain-settings/Domain-Admins.md deleted file mode 100644 index 3ee1c8656b4b..000000000000 --- a/docs/articles/expensify-classic/policy-and-domain-settings/Domain-Admins.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Coming Soon -description: Coming Soon ---- -## Resource Coming Soon! diff --git a/docs/articles/expensify-classic/policy-and-domain-settings/Domain-Members.md b/docs/articles/expensify-classic/policy-and-domain-settings/Domain-Members.md deleted file mode 100644 index 3ee1c8656b4b..000000000000 --- a/docs/articles/expensify-classic/policy-and-domain-settings/Domain-Members.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Coming Soon -description: Coming Soon ---- -## Resource Coming Soon! diff --git a/docs/articles/expensify-classic/policy-and-domain-settings/Overview.md b/docs/articles/expensify-classic/policy-and-domain-settings/Overview.md deleted file mode 100644 index 3ee1c8656b4b..000000000000 --- a/docs/articles/expensify-classic/policy-and-domain-settings/Overview.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Coming Soon -description: Coming Soon ---- -## Resource Coming Soon! diff --git a/docs/articles/expensify-classic/policy-and-domain-settings/Reports.md b/docs/articles/expensify-classic/policy-and-domain-settings/Reports.md deleted file mode 100644 index 3ee1c8656b4b..000000000000 --- a/docs/articles/expensify-classic/policy-and-domain-settings/Reports.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Coming Soon -description: Coming Soon ---- -## Resource Coming Soon! diff --git a/docs/articles/expensify-classic/policy-and-domain-settings/Trips.md b/docs/articles/expensify-classic/policy-and-domain-settings/Trips.md deleted file mode 100644 index 3ee1c8656b4b..000000000000 --- a/docs/articles/expensify-classic/policy-and-domain-settings/Trips.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Coming Soon -description: Coming Soon ---- -## Resource Coming Soon! diff --git a/docs/articles/expensify-classic/policy-and-domain-settings/reports/Currency.md b/docs/articles/expensify-classic/policy-and-domain-settings/reports/Currency.md new file mode 100644 index 000000000000..e5c9096fa610 --- /dev/null +++ b/docs/articles/expensify-classic/policy-and-domain-settings/reports/Currency.md @@ -0,0 +1,5 @@ +--- +title: Currency +description: Currency +--- +## Resource Coming Soon! diff --git a/docs/articles/expensify-classic/policy-and-domain-settings/reports/Report-Fields-And-Titles.md b/docs/articles/expensify-classic/policy-and-domain-settings/reports/Report-Fields-And-Titles.md new file mode 100644 index 000000000000..47b96f495a1c --- /dev/null +++ b/docs/articles/expensify-classic/policy-and-domain-settings/reports/Report-Fields-And-Titles.md @@ -0,0 +1,5 @@ +--- +title: Report Fields & Titles +description: Report Fields & Titles +--- +## Resource Coming Soon! diff --git a/docs/articles/expensify-classic/policy-and-domain-settings/reports/Scheduled-Submit.md b/docs/articles/expensify-classic/policy-and-domain-settings/reports/Scheduled-Submit.md new file mode 100644 index 000000000000..78471e6c3906 --- /dev/null +++ b/docs/articles/expensify-classic/policy-and-domain-settings/reports/Scheduled-Submit.md @@ -0,0 +1,5 @@ +--- +title: Scheduled Submit +description: Scheduled Submit +--- +## Resource Coming Soon! diff --git a/docs/expensify-classic/hubs/policy-and-domain-settings/reports.html b/docs/expensify-classic/hubs/policy-and-domain-settings/reports.html new file mode 100644 index 000000000000..86641ee60b7d --- /dev/null +++ b/docs/expensify-classic/hubs/policy-and-domain-settings/reports.html @@ -0,0 +1,5 @@ +--- +layout: default +--- + +{% include section.html %} diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 73e22053eda1..90683ca8e085 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.3.74 + 1.3.75 CFBundleSignature ???? CFBundleURLTypes @@ -40,7 +40,7 @@ CFBundleVersion - 1.3.74.3 + 1.3.75.0 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 5e7f02699579..60a57f3bec42 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.3.74 + 1.3.75 CFBundleSignature ???? CFBundleVersion - 1.3.74.3 + 1.3.75.0 diff --git a/package-lock.json b/package-lock.json index 42755b09f8b6..bc94fb780a1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.74-3", + "version": "1.3.75-0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.74-3", + "version": "1.3.75-0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 3b88d603ba52..f7f385f7620c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.74-3", + "version": "1.3.75-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.", diff --git a/src/CONST.ts b/src/CONST.ts index dbe47c6ed1a7..38e861d9fc0c 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1263,6 +1263,8 @@ const CONST = { DATE_TIME_FORMAT: /^\d{2}-\d{2} \d{2}:\d{2} [AP]M$/, ATTACHMENT_ROUTE: /\/r\/(\d*)\/attachment/, ILLEGAL_FILENAME_CHARACTERS: /\/|<|>|\*|"|:|\?|\\|\|/g, + + ENCODE_PERCENT_CHARACTER: /%(25)+/g, }, PRONOUNS: { diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index d2b3031220f1..a1afc4fef2c1 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -1,5 +1,4 @@ import {ValueOf} from 'type-fest'; -import {OnyxUpdate} from 'react-native-onyx'; import DeepValueOf from './types/utils/DeepValueOf'; import * as OnyxTypes from './types/onyx'; import CONST from './CONST'; @@ -30,9 +29,6 @@ const ONYXKEYS = { /** Note: These are Persisted Requests - not all requests in the main queue as the key name might lead one to believe */ PERSISTED_REQUESTS: 'networkRequestQueue', - /** Onyx updates from a response, or success or failure data from a request. */ - QUEUED_ONYX_UPDATES: 'queuedOnyxUpdates', - /** Stores current date */ CURRENT_DATE: 'currentDate', @@ -307,7 +303,6 @@ type OnyxValues = { [ONYXKEYS.DEVICE_ID]: string; [ONYXKEYS.IS_SIDEBAR_LOADED]: boolean; [ONYXKEYS.PERSISTED_REQUESTS]: OnyxTypes.Request[]; - [ONYXKEYS.QUEUED_ONYX_UPDATES]: OnyxUpdate[]; [ONYXKEYS.CURRENT_DATE]: string; [ONYXKEYS.CREDENTIALS]: OnyxTypes.Credentials; [ONYXKEYS.IOU]: OnyxTypes.IOU; diff --git a/src/libs/ValidationUtils.ts b/src/libs/ValidationUtils.ts index 80b15690ac46..b94c240b6e92 100644 --- a/src/libs/ValidationUtils.ts +++ b/src/libs/ValidationUtils.ts @@ -314,8 +314,8 @@ function isReservedRoomName(roomName: string): boolean { /** * Checks if the room name already exists. */ -function isExistingRoomName(roomName: string, reports: Report[], policyID: string): boolean { - return reports.some((report) => report && report.policyID === policyID && report.reportName === roomName); +function isExistingRoomName(roomName: string, reports: Record, policyID: string): boolean { + return Object.values(reports).some((report) => report && report.policyID === policyID && report.reportName === roomName); } /** diff --git a/src/libs/actions/QueuedOnyxUpdates.ts b/src/libs/actions/QueuedOnyxUpdates.ts index ac94e6f335e3..1707bebd6cb2 100644 --- a/src/libs/actions/QueuedOnyxUpdates.ts +++ b/src/libs/actions/QueuedOnyxUpdates.ts @@ -1,27 +1,21 @@ import Onyx, {OnyxUpdate} from 'react-native-onyx'; -import ONYXKEYS from '../../ONYXKEYS'; // In this file we manage a queue of Onyx updates while the SequentialQueue is processing. There are functions to get the updates and clear the queue after saving the updates in Onyx. let queuedOnyxUpdates: OnyxUpdate[] = []; -Onyx.connect({ - key: ONYXKEYS.QUEUED_ONYX_UPDATES, - callback: (val) => (queuedOnyxUpdates = val ?? []), -}); /** * @param updates Onyx updates to queue for later */ function queueOnyxUpdates(updates: OnyxUpdate[]): Promise { - return Onyx.set(ONYXKEYS.QUEUED_ONYX_UPDATES, [...queuedOnyxUpdates, ...updates]); -} - -function clear() { - Onyx.set(ONYXKEYS.QUEUED_ONYX_UPDATES, null); + queuedOnyxUpdates = queuedOnyxUpdates.concat(updates); + return Promise.resolve(); } function flushQueue(): Promise { - return Onyx.update(queuedOnyxUpdates).then(clear); + return Onyx.update(queuedOnyxUpdates).then(() => { + queuedOnyxUpdates = []; + }); } export {queueOnyxUpdates, flushQueue}; diff --git a/src/pages/EditRequestReceiptPage.js b/src/pages/EditRequestReceiptPage.js index f45085a052e9..c5dd69624159 100644 --- a/src/pages/EditRequestReceiptPage.js +++ b/src/pages/EditRequestReceiptPage.js @@ -37,11 +37,11 @@ function EditRequestReceiptPage({route, transactionID}) { shouldEnableMaxHeight testID={EditRequestReceiptPage.displayName} > - + { + if (isOffline) { return; } Wallet.openEnablePaymentsPage(); - } + }, [isOffline]); - render() { - if (_.isEmpty(this.props.userWallet)) { - return ; - } - - return ( - - {() => { - if (this.props.userWallet.errorCode === CONST.WALLET.ERROR.KYC) { - return ( - <> - Navigation.goBack(ROUTES.SETTINGS_WALLET)} - /> - - - ); - } - - if (this.props.userWallet.shouldShowWalletActivationSuccess) { - return ; - } - - const currentStep = this.props.userWallet.currentStep || CONST.WALLET.STEP.ADDITIONAL_DETAILS; + if (_.isEmpty(userWallet)) { + return ; + } + return ( + + {() => { + if (userWallet.errorCode === CONST.WALLET.ERROR.KYC) { return ( <> - {(currentStep === CONST.WALLET.STEP.ADDITIONAL_DETAILS || currentStep === CONST.WALLET.STEP.ADDITIONAL_DETAILS_KBA) && } - {currentStep === CONST.WALLET.STEP.ONFIDO && } - {currentStep === CONST.WALLET.STEP.TERMS && } - {currentStep === CONST.WALLET.STEP.ACTIVATE && } + Navigation.goBack(ROUTES.SETTINGS_WALLET)} + /> + ); - }} - - ); - } + } + + if (userWallet.shouldShowWalletActivationSuccess) { + return ; + } + + const currentStep = userWallet.currentStep || CONST.WALLET.STEP.ADDITIONAL_DETAILS; + + switch (currentStep) { + case CONST.WALLET.STEP.ADDITIONAL_DETAILS: + case CONST.WALLET.STEP.ADDITIONAL_DETAILS_KBA: + return ; + case CONST.WALLET.STEP.ONFIDO: + return ; + case CONST.WALLET.STEP.TERMS: + return ; + case CONST.WALLET.STEP.ACTIVATE: + return ; + default: + return null; + } + }} + + ); } +EnablePaymentsPage.displayName = 'EnablePaymentsPage'; EnablePaymentsPage.propTypes = propTypes; EnablePaymentsPage.defaultProps = defaultProps; -export default compose( - withLocalize, - withOnyx({ - userWallet: { - key: ONYXKEYS.USER_WALLET, +export default withOnyx({ + userWallet: { + key: ONYXKEYS.USER_WALLET, - // We want to refresh the wallet each time the user attempts to activate the wallet so we won't use the - // stored values here. - initWithStoredValues: false, - }, - }), - withNetwork(), -)(EnablePaymentsPage); + // We want to refresh the wallet each time the user attempts to activate the wallet so we won't use the + // stored values here. + initWithStoredValues: false, + }, +})(EnablePaymentsPage); diff --git a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js index b8c817350a38..7e8baba5a9ce 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js +++ b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js @@ -25,6 +25,7 @@ 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 */ @@ -131,7 +132,22 @@ class ContactMethodDetailsPage extends Component { * @returns {string} */ getContactMethod() { - return decodeURIComponent(lodashGet(this.props.route, 'params.contactMethod')); + const contactMethod = lodashGet(this.props.route, 'params.contactMethod'); + + // We find the number of times the url is encoded based on the last % sign and remove them. + const lastPercentIndex = contactMethod.lastIndexOf('%'); + const encodePercents = contactMethod.substring(lastPercentIndex).match(new RegExp('25', 'g')); + let numberEncodePercents = encodePercents ? encodePercents.length : 0; + const beforeAtSign = contactMethod.substring(0, lastPercentIndex).replace(CONST.REGEX.ENCODE_PERCENT_CHARACTER, (match) => { + if (numberEncodePercents > 0) { + numberEncodePercents--; + return '%'; + } + return match; + }); + const afterAtSign = contactMethod.substring(lastPercentIndex).replace(CONST.REGEX.ENCODE_PERCENT_CHARACTER, '%'); + + return decodeURIComponent(beforeAtSign + afterAtSign); } /** @@ -230,6 +246,7 @@ class ContactMethodDetailsPage extends Component { const isDefaultContactMethod = this.props.session.email === loginData.partnerUserID; const hasMagicCodeBeenSent = lodashGet(this.props.loginList, [contactMethod, 'validateCodeSent'], false); const isFailedAddContactMethod = Boolean(lodashGet(loginData, 'errorFields.addedLogin')); + const isFailedRemovedContactMethod = Boolean(lodashGet(loginData, 'errorFields.deletedLogin')); return ( {isFailedAddContactMethod && ( @@ -289,9 +306,9 @@ class ContactMethodDetailsPage extends Component { {isDefaultContactMethod ? ( User.clearContactMethodErrors(contactMethod, 'defaultLogin')} + onClose={() => User.clearContactMethodErrors(contactMethod, isFailedRemovedContactMethod ? 'deletedLogin' : 'defaultLogin')} > {this.props.translate('contacts.yourDefaultContactMethod')}