Skip to content

Commit

Permalink
Merge pull request #54756 from Expensify/Beamanator-cherry-pick-stagi…
Browse files Browse the repository at this point in the history
…ng-54729-1

🍒 Cherry pick PR #54729 to staging 🍒
  • Loading branch information
mjasikowski authored Jan 2, 2025
2 parents b3f0729 + 1e3e676 commit 318aa29
Show file tree
Hide file tree
Showing 54 changed files with 207 additions and 1,746 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009008004
versionName "9.0.80-4"
versionCode 1009008005
versionName "9.0.80-5"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.80.4</string>
<string>9.0.80.5</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9.0.80.4</string>
<string>9.0.80.5</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.0.80</string>
<key>CFBundleVersion</key>
<string>9.0.80.4</string>
<string>9.0.80.5</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "9.0.80-4",
"version": "9.0.80-5",
"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.",
Expand Down
45 changes: 0 additions & 45 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,6 @@ const CONST = {
CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/workspaces/Configure-Reimbursement-Settings',
COPILOT_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/copilots-and-delegates/Assign-or-remove-a-Copilot',
DELAYED_SUBMISSION_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/reports/Automatically-submit-employee-reports',
ENCRYPTION_AND_SECURITY_HELP_URL: 'https://help.expensify.com/articles/new-expensify/settings/Encryption-and-Data-Security',
PLAN_TYPES_AND_PRICING_HELP_URL: 'https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/Plan-types-and-pricing',
// Use Environment.getEnvironmentURL to get the complete URL with port number
DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:',
Expand Down Expand Up @@ -6441,50 +6440,6 @@ const CONST = {
},
},

CORPAY_FIELDS: {
BANK_ACCOUNT_DETAILS_FIELDS: ['accountNumber', 'localAccountNumber', 'routingCode', 'localRoutingCode', 'swiftBicCode'] as string[],
ACCOUNT_TYPE_KEY: 'BeneficiaryAccountType',
BANK_INFORMATION_FIELDS: ['bankName', 'bankAddressLine1', 'bankAddressLine2', 'bankCity', 'bankRegion', 'bankPostal', 'BeneficiaryBankBranchName'] as string[],
ACCOUNT_HOLDER_FIELDS: [
'accountHolderName',
'accountHolderAddress1',
'accountHolderAddress2',
'accountHolderCity',
'accountHolderRegion',
'accountHolderCountry',
'accountHolderPostal',
'accountHolderPhoneNumber',
'accountHolderEmail',
'ContactName',
'BeneficiaryCPF',
'BeneficiaryRUT',
'BeneficiaryCedulaID',
'BeneficiaryTaxID',
] as string[],
SPECIAL_LIST_REGION_KEYS: ['bankRegion', 'accountHolderRegion'] as string[],
SPECIAL_LIST_ADDRESS_KEYS: ['bankAddressLine1', 'accountHolderAddress1'] as string[],
STEPS_NAME: {
COUNTRY_SELECTOR: 'CountrySelector',
BANK_ACCOUNT_DETAILS: 'BankAccountDetails',
ACCOUNT_TYPE: 'AccountType',
BANK_INFORMATION: 'BankInformation',
ACCOUNT_HOLDER_INFORMATION: 'AccountHolderInformation',
CONFIRMATION: 'Confirmation',
SUCCESS: 'Success',
},
INDEXES: {
MAPPING: {
COUNTRY_SELECTOR: 0,
BANK_ACCOUNT_DETAILS: 1,
ACCOUNT_TYPE: 2,
BANK_INFORMATION: 3,
ACCOUNT_HOLDER_INFORMATION: 4,
CONFIRMATION: 5,
SUCCESS: 6,
},
},
},

HYBRID_APP: {
REORDERING_REACT_NATIVE_ACTIVITY_TO_FRONT: 'reorderingReactNativeActivityToFront',
},
Expand Down
3 changes: 0 additions & 3 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,6 @@ const ONYXKEYS = {
HOME_ADDRESS_FORM_DRAFT: 'homeAddressFormDraft',
PERSONAL_DETAILS_FORM: 'personalDetailsForm',
PERSONAL_DETAILS_FORM_DRAFT: 'personalDetailsFormDraft',
INTERNATIONAL_BANK_ACCOUNT_FORM: 'internationalBankAccountForm',
INTERNATIONAL_BANK_ACCOUNT_FORM_DRAFT: 'internationalBankAccountFormDraft',
NEW_ROOM_FORM: 'newRoomForm',
NEW_ROOM_FORM_DRAFT: 'newRoomFormDraft',
ROOM_SETTINGS_FORM: 'roomSettingsForm',
Expand Down Expand Up @@ -821,7 +819,6 @@ type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.RULES_MAX_EXPENSE_AGE_FORM]: FormTypes.RulesMaxExpenseAgeForm;
[ONYXKEYS.FORMS.SEARCH_SAVED_SEARCH_RENAME_FORM]: FormTypes.SearchSavedSearchRenameForm;
[ONYXKEYS.FORMS.DEBUG_DETAILS_FORM]: FormTypes.DebugReportForm | FormTypes.DebugReportActionForm | FormTypes.DebugTransactionForm | FormTypes.DebugTransactionViolationForm;
[ONYXKEYS.FORMS.INTERNATIONAL_BANK_ACCOUNT_FORM]: FormTypes.InternationalBankAccountForm;
[ONYXKEYS.FORMS.WORKSPACE_PER_DIEM_FORM]: FormTypes.WorkspacePerDiemForm;
};

Expand Down
1 change: 0 additions & 1 deletion src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ const ROUTES = {
},
SETTINGS_ADD_DEBIT_CARD: 'settings/wallet/add-debit-card',
SETTINGS_ADD_BANK_ACCOUNT: 'settings/wallet/add-bank-account',
SETTINGS_ADD_US_BANK_ACCOUNT: 'settings/wallet/add-us-bank-account',
SETTINGS_ENABLE_PAYMENTS: 'settings/wallet/enable-payments',
SETTINGS_WALLET_CARD_DIGITAL_DETAILS_UPDATE_ADDRESS: {
route: 'settings/wallet/card/:domain/digital-details/update-address',
Expand Down
1 change: 0 additions & 1 deletion src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const SCREENS = {
ADD_DEBIT_CARD: 'Settings_Add_Debit_Card',
ADD_PAYMENT_CARD_CHANGE_CURRENCY: 'Settings_Add_Payment_Card_Change_Currency',
ADD_BANK_ACCOUNT: 'Settings_Add_Bank_Account',
ADD_US_BANK_ACCOUNT: 'Settings_Add_US_Bank_Account',
CLOSE: 'Settings_Close',
TWO_FACTOR_AUTH: 'Settings_TwoFactorAuth',
REPORT_CARD_LOST_OR_DAMAGED: 'Settings_ReportCardLostOrDamaged',
Expand Down
86 changes: 0 additions & 86 deletions src/components/CurrencyPicker.tsx

This file was deleted.

9 changes: 2 additions & 7 deletions src/components/Form/FormProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ type FormProviderProps<TFormID extends OnyxFormKey = OnyxFormKey> = FormProps<TF

/** Whether HTML is allowed in form inputs */
allowHTML?: boolean;

/** Whether the form is loading */
isLoading?: boolean;
};

function FormProvider(
Expand All @@ -85,7 +82,6 @@ function FormProvider(
onSubmit,
shouldTrimValues = true,
allowHTML = false,
isLoading = false,
...rest
}: FormProviderProps,
forwardedRef: ForwardedRef<FormRef>,
Expand Down Expand Up @@ -193,7 +189,7 @@ function FormProvider(
const submit = useDebounceNonReactive(
useCallback(() => {
// Return early if the form is already submitting to avoid duplicate submission
if (!!formState?.isLoading || isLoading) {
if (formState?.isLoading) {
return;
}

Expand All @@ -214,7 +210,7 @@ function FormProvider(
}

KeyboardUtils.dismiss().then(() => onSubmit(trimmedStringValues));
}, [enabledWhenOffline, formState?.isLoading, inputValues, isLoading, network?.isOffline, onSubmit, onValidate, shouldTrimValues]),
}, [enabledWhenOffline, formState?.isLoading, inputValues, network?.isOffline, onSubmit, onValidate, shouldTrimValues]),
1000,
{leading: true, trailing: false},
);
Expand Down Expand Up @@ -410,7 +406,6 @@ function FormProvider(
onSubmit={submit}
inputRefs={inputRefs}
errors={errors}
isLoading={isLoading}
enabledWhenOffline={enabledWhenOffline}
>
{typeof children === 'function' ? children({inputValues}) : children}
Expand Down
7 changes: 1 addition & 6 deletions src/components/Form/FormWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ type FormWrapperProps = ChildrenProps &

/** Callback to submit the form */
onSubmit: () => void;

/** Whether the form is loading */
isLoading?: boolean;
};

function FormWrapper({
Expand All @@ -60,7 +57,6 @@ function FormWrapper({
shouldHideFixErrorsAlert = false,
disablePressOnEnter = false,
isSubmitDisabled = false,
isLoading = false,
}: FormWrapperProps) {
const styles = useThemeStyles();
const {paddingBottom: safeAreaInsetPaddingBottom} = useStyledSafeAreaInsets();
Expand Down Expand Up @@ -116,7 +112,7 @@ function FormWrapper({
buttonText={submitButtonText}
isDisabled={isSubmitDisabled}
isAlertVisible={((!isEmptyObject(errors) || !isEmptyObject(formState?.errorFields)) && !shouldHideFixErrorsAlert) || !!errorMessage}
isLoading={!!formState?.isLoading || isLoading}
isLoading={!!formState?.isLoading}
message={isEmptyObject(formState?.errorFields) ? errorMessage : undefined}
onSubmit={onSubmit}
footerContent={footerContent}
Expand Down Expand Up @@ -147,7 +143,6 @@ function FormWrapper({
formState?.isLoading,
shouldHideFixErrorsAlert,
errorMessage,
isLoading,
onSubmit,
footerContent,
onFixTheErrorsLinkPressed,
Expand Down
4 changes: 1 addition & 3 deletions src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ function BaseSelectionList<TItem extends ListItem>(
showScrollIndicator = true,
showLoadingPlaceholder = false,
showConfirmButton = false,
isConfirmButtonDisabled = false,
shouldUseDefaultTheme = false,
shouldPreventDefaultFocusOnSelectRow = false,
containerStyle,
Expand Down Expand Up @@ -766,7 +765,7 @@ function BaseSelectionList<TItem extends ListItem>(
{
captureOnInputs: true,
shouldBubble: !flattenedSections.allOptions.at(focusedIndex) || focusedIndex === -1,
isActive: !disableKeyboardShortcuts && isFocused && !isConfirmButtonDisabled,
isActive: !disableKeyboardShortcuts && isFocused,
},
);

Expand Down Expand Up @@ -849,7 +848,6 @@ function BaseSelectionList<TItem extends ListItem>(
onPress={onConfirm}
pressOnEnter
enterKeyEventListenerPriority={1}
isDisabled={isConfirmButtonDisabled}
/>
</FixedFooter>
)}
Expand Down
3 changes: 0 additions & 3 deletions src/components/SelectionList/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,6 @@ type BaseSelectionListProps<TItem extends ListItem> = Partial<ChildrenProps> & {
/** Whether to show the default confirm button */
showConfirmButton?: boolean;

/** Whether to show the default confirm button disabled */
isConfirmButtonDisabled?: boolean;

/** Whether to use the default theme for the confirm button */
shouldUseDefaultTheme?: boolean;

Expand Down
12 changes: 2 additions & 10 deletions src/components/TextPicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ import CONST from '@src/CONST';
import TextSelectorModal from './TextSelectorModal';
import type {TextPickerProps} from './types';

function TextPicker(
{value, description, placeholder = '', errorText = '', onInputChange, furtherDetails, rightLabel, disabled = false, interactive = true, ...rest}: TextPickerProps,
forwardedRef: ForwardedRef<View>,
) {
function TextPicker({value, description, placeholder = '', errorText = '', onInputChange, furtherDetails, rightLabel, ...rest}: TextPickerProps, forwardedRef: ForwardedRef<View>) {
const styles = useThemeStyles();
const [isPickerVisible, setIsPickerVisible] = useState(false);

const showPickerModal = () => {
if (disabled) {
return;
}
setIsPickerVisible(true);
};

Expand All @@ -36,7 +30,7 @@ function TextPicker(
<View>
<MenuItemWithTopDescription
ref={forwardedRef}
shouldShowRightIcon={!disabled}
shouldShowRightIcon
title={value ?? placeholder ?? ''}
description={description}
onPress={showPickerModal}
Expand All @@ -45,15 +39,13 @@ function TextPicker(
brickRoadIndicator={errorText ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined}
errorText={errorText}
style={[styles.moneyRequestMenuItem]}
interactive={interactive}
/>
<TextSelectorModal
value={value}
isVisible={isPickerVisible}
description={description}
onClose={hidePickerModal}
onValueSelected={updateInput}
disabled={disabled}
// eslint-disable-next-line react/jsx-props-no-spreading
{...rest}
/>
Expand Down
Loading

0 comments on commit 318aa29

Please sign in to comment.