Skip to content

Commit

Permalink
merge upstream vit-tieredBankAccountFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
barttom committed Jan 18, 2024
2 parents 531d753 + 4da7fda commit 8f99658
Show file tree
Hide file tree
Showing 77 changed files with 2,125 additions and 1,859 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001042601
versionName "1.4.26-1"
versionCode 1001042700
versionName "1.4.27-0"
}

flavorDimensions "default"
Expand Down
13 changes: 13 additions & 0 deletions assets/images/chatbubble-add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions assets/images/chatbubble-unread.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.26</string>
<string>1.4.27</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.4.26.1</string>
<string>1.4.27.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.26</string>
<string>1.4.27</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.4.26.1</string>
<string>1.4.27.0</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>CFBundleShortVersionString</key>
<string>1.4.26</string>
<string>1.4.27</string>
<key>CFBundleVersion</key>
<string>1.4.26.1</string>
<string>1.4.27.0</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": "1.4.26-1",
"version": "1.4.27-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.",
Expand Down
6 changes: 3 additions & 3 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -681,11 +681,9 @@ const CONST = {
},
THREAD_DISABLED: ['CREATED'],
},
CANCEL_PAYMENT_REASONS: {
ADMIN: 'CANCEL_REASON_ADMIN',
},
ACTIONABLE_MENTION_WHISPER_RESOLUTION: {
INVITE: 'invited',
NOTHING: 'nothing',
},
ARCHIVE_REASON: {
DEFAULT: 'default',
Expand Down Expand Up @@ -3199,6 +3197,8 @@ const CONST = {
EMAIL: 'EMAIL',
REPORT: 'REPORT',
},

MINI_CONTEXT_MENU_MAX_ITEMS: 4,
} as const;

export default CONST;
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import {CONST} from 'expensify-common/lib/CONST';
import PropTypes from 'prop-types';
import React from 'react';
import _ from 'underscore';
import type {StyleProp, TextStyle} from 'react-native';
import useThemeStyles from '@hooks/useThemeStyles';
import Text from './Text';
import TextLink from './TextLink';

const propTypes = {
text: PropTypes.string.isRequired,
style: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]),
};

const defaultProps = {
style: [],
type AutoEmailLinkProps = {
text: string;
style?: StyleProp<TextStyle>;
};

/*
Expand All @@ -21,14 +16,15 @@ const defaultProps = {
* - Else just render it inside `Text` component
*/

function AutoEmailLink(props) {
function AutoEmailLink({text, style}: AutoEmailLinkProps) {
const styles = useThemeStyles();
return (
<Text style={props.style}>
{_.map(props.text.split(CONST.REG_EXP.EXTRACT_EMAIL), (str, index) => {
<Text style={style}>
{text.split(CONST.REG_EXP.EXTRACT_EMAIL).map((str, index) => {
if (CONST.REG_EXP.EMAIL.test(str)) {
return (
<TextLink
// eslint-disable-next-line react/no-array-index-key
key={`${index}-${str}`}
href={`mailto:${str}`}
style={styles.link}
Expand All @@ -40,7 +36,8 @@ function AutoEmailLink(props) {

return (
<Text
style={props.style}
style={style}
// eslint-disable-next-line react/no-array-index-key
key={`${index}-${str}`}
>
{str}
Expand All @@ -52,6 +49,5 @@ function AutoEmailLink(props) {
}

AutoEmailLink.displayName = 'AutoEmailLink';
AutoEmailLink.propTypes = propTypes;
AutoEmailLink.defaultProps = defaultProps;

export default AutoEmailLink;
7 changes: 4 additions & 3 deletions src/components/ContextMenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type {ForwardedRef} from 'react';
import React, {forwardRef, useImperativeHandle} from 'react';
import type {GestureResponderEvent} from 'react-native';
import useStyleUtils from '@hooks/useStyleUtils';
import useThemeStyles from '@hooks/useThemeStyles';
import useThrottledButtonState from '@hooks/useThrottledButtonState';
Expand Down Expand Up @@ -27,7 +28,7 @@ type ContextMenuItemProps = {
isMini?: boolean;

/** Callback to fire when the item is pressed */
onPress: () => void;
onPress: (event?: GestureResponderEvent | MouseEvent | KeyboardEvent) => void;

/** A description text to show under the title */
description?: string;
Expand All @@ -52,11 +53,11 @@ function ContextMenuItem(
const {windowWidth} = useWindowDimensions();
const [isThrottledButtonActive, setThrottledButtonInactive] = useThrottledButtonState();

const triggerPressAndUpdateSuccess = () => {
const triggerPressAndUpdateSuccess = (event?: GestureResponderEvent | MouseEvent | KeyboardEvent) => {
if (!isThrottledButtonActive) {
return;
}
onPress();
onPress(event);

// We only set the success state when we have icon or text to represent the success state
// We may want to replace this check by checking the Result from OnPress Callback in future.
Expand Down
8 changes: 7 additions & 1 deletion src/components/EmojiPicker/EmojiPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ const EmojiPicker = forwardRef((props, ref) => {
if (isNavigating) {
onModalHide.current = () => {};
}
emojiPopoverAnchorRef.current = null;
const currOnModalHide = onModalHide.current;
onModalHide.current = () => {
if (currOnModalHide) {
currOnModalHide();
}
emojiPopoverAnchorRef.current = null;
};
setIsEmojiPickerVisible(false);
};

Expand Down
4 changes: 4 additions & 0 deletions src/components/Form/FormProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ const propTypes = {

/** Should validate function be called when the value of the input is changed */
shouldValidateOnChange: PropTypes.bool,

/** Should fix the errors alert be displayed when there is an error in the form */
shouldHideFixErrorsAlert: PropTypes.bool,
};

// In order to prevent Checkbox focus loss when the user are focusing a TextInput and proceeds to toggle a CheckBox in web and mobile web.
Expand All @@ -94,6 +97,7 @@ const defaultProps = {
validate: () => {},
shouldValidateOnBlur: true,
shouldValidateOnChange: true,
shouldHideFixErrorsAlert: false,
};

function getInitialValueByType(valueType) {
Expand Down
8 changes: 7 additions & 1 deletion src/components/Form/FormWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ const propTypes = {
errors: errorsPropType.isRequired,

inputRefs: PropTypes.objectOf(refPropTypes).isRequired,

shouldHideFixErrorsAlert: PropTypes.bool,
};

const defaultProps = {
Expand All @@ -80,6 +82,7 @@ const defaultProps = {
footerContent: null,
style: [],
submitButtonStyles: [],
shouldHideFixErrorsAlert: false,
};

function FormWrapper(props) {
Expand All @@ -97,6 +100,7 @@ function FormWrapper(props) {
enabledWhenOffline,
isSubmitActionDangerous,
formID,
shouldHideFixErrorsAlert,
submitButtonStyles,
} = props;
const formRef = useRef(null);
Expand All @@ -118,7 +122,7 @@ function FormWrapper(props) {
{isSubmitButtonVisible && (
<FormAlertWithSubmitButton
buttonText={submitButtonText}
isAlertVisible={_.size(errors) > 0 || Boolean(errorMessage) || !_.isEmpty(formState.errorFields)}
isAlertVisible={((_.size(errors) > 0 || !_.isEmpty(formState.errorFields)) && !shouldHideFixErrorsAlert) || Boolean(errorMessage)}
isLoading={formState.isLoading}
message={_.isEmpty(formState.errorFields) ? errorMessage : null}
onSubmit={onSubmit}
Expand Down Expand Up @@ -154,6 +158,7 @@ function FormWrapper(props) {
enabledWhenOffline={enabledWhenOffline}
isSubmitActionDangerous={isSubmitActionDangerous}
disablePressOnEnter
shouldHideFixErrorsAlert={shouldHideFixErrorsAlert}
/>
)}
</FormSubmit>
Expand All @@ -177,6 +182,7 @@ function FormWrapper(props) {
styles.mt5,
submitButtonStyles,
submitButtonText,
shouldHideFixErrorsAlert,
],
);

Expand Down
5 changes: 3 additions & 2 deletions src/components/HeaderWithBackButton/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {PersonalDetails, Policy, Report} from '@src/types/onyx';
import type ChildrenProps from '@src/types/utils/ChildrenProps';
import type IconAsset from '@src/types/utils/IconAsset';

type ThreeDotsMenuItems = {
type ThreeDotsMenuItem = {
/** An icon element displayed on the left side */
icon?: IconAsset;

Expand Down Expand Up @@ -62,7 +62,7 @@ type HeaderWithBackButtonProps = Partial<ChildrenProps> & {
shouldDisableThreeDotsButton?: boolean;

/** List of menu items for more(three dots) menu */
threeDotsMenuItems?: ThreeDotsMenuItems[];
threeDotsMenuItems?: ThreeDotsMenuItem[];

/** The anchor position of the menu */
threeDotsAnchorPosition?: AnchorPosition;
Expand Down Expand Up @@ -110,4 +110,5 @@ type HeaderWithBackButtonProps = Partial<ChildrenProps> & {
shouldEnableDetailPageNavigation?: boolean;
};

export type {ThreeDotsMenuItem};
export default HeaderWithBackButtonProps;
4 changes: 4 additions & 0 deletions src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ 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 ChatBubbleAdd from '@assets/images/chatbubble-add.svg';
import ChatBubbleUnread from '@assets/images/chatbubble-unread.svg';
import ChatBubble from '@assets/images/chatbubble.svg';
import ChatBubbles from '@assets/images/chatbubbles.svg';
import Checkmark from '@assets/images/checkmark.svg';
Expand Down Expand Up @@ -264,4 +266,6 @@ export {
Podcast,
Linkedin,
Instagram,
ChatBubbleAdd,
ChatBubbleUnread,
};
Loading

0 comments on commit 8f99658

Please sign in to comment.