Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Expensify/App into personalDetailsL…
Browse files Browse the repository at this point in the history
…ist-migration
  • Loading branch information
Beamanator committed Jun 14, 2023
2 parents 3397b76 + 862955c commit 4fdc8db
Show file tree
Hide file tree
Showing 325 changed files with 3,032 additions and 2,508 deletions.
20 changes: 11 additions & 9 deletions __mocks__/react-native-safe-area-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ const insets = {
};

function withSafeAreaInsets(WrappedComponent) {
const WithSafeAreaInsets = (props) => (
<WrappedComponent
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
// eslint-disable-next-line react/prop-types
ref={props.forwardedRef}
insets={insets}
/>
);
function WithSafeAreaInsets(props) {
return (
<WrappedComponent
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
// eslint-disable-next-line react/prop-types
ref={props.forwardedRef}
insets={insets}
/>
);
}
return forwardRef((props, ref) => (
<WithSafeAreaInsets
// eslint-disable-next-line react/jsx-props-no-spreading
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001032702
versionName "1.3.27-2"
versionCode 1001032706
versionName "1.3.27-6"
}

splits {
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.27.2</string>
<string>1.3.27.6</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</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>1.3.27.2</string>
<string>1.3.27.6</string>
</dict>
</plist>
18 changes: 9 additions & 9 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.3.27-2",
"version": "1.3.27-6",
"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 Expand Up @@ -183,7 +183,7 @@
"electron": "22.3.7",
"electron-builder": "24.4.0",
"eslint": "^7.6.0",
"eslint-config-expensify": "^2.0.36",
"eslint-config-expensify": "^2.0.38",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-jest": "^24.1.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
Expand Down
48 changes: 25 additions & 23 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,31 @@ LogBox.ignoreLogs([

const fill = {flex: 1};

const App = () => (
<GestureHandlerRootView style={fill}>
<ComposeProviders
components={[
OnyxProvider,
SafeAreaProvider,
PortalProvider,
SafeArea,
LocaleContextProvider,
HTMLEngineProvider,
WindowDimensionsProvider,
KeyboardStateProvider,
CurrentReportIdContextProvider,
PickerStateProvider,
]}
>
<CustomStatusBar />
<ErrorBoundary errorMessage="NewExpensify crash caught by error boundary">
<Expensify />
</ErrorBoundary>
</ComposeProviders>
</GestureHandlerRootView>
);
function App() {
return (
<GestureHandlerRootView style={fill}>
<ComposeProviders
components={[
OnyxProvider,
SafeAreaProvider,
PortalProvider,
SafeArea,
LocaleContextProvider,
HTMLEngineProvider,
WindowDimensionsProvider,
KeyboardStateProvider,
CurrentReportIdContextProvider,
PickerStateProvider,
]}
>
<CustomStatusBar />
<ErrorBoundary errorMessage="NewExpensify crash caught by error boundary">
<Expensify />
</ErrorBoundary>
</ComposeProviders>
</GestureHandlerRootView>
);
}

App.displayName = 'App';

Expand Down
70 changes: 36 additions & 34 deletions src/components/AddPaymentMethodMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,41 +43,43 @@ const defaultProps = {
betas: [],
};

const AddPaymentMethodMenu = (props) => (
<PopoverMenu
isVisible={props.isVisible}
onClose={props.onClose}
anchorPosition={props.anchorPosition}
onItemSelected={props.onClose}
menuItems={[
{
text: props.translate('common.bankAccount'),
icon: Expensicons.Bank,
onSelected: () => {
props.onItemSelected(CONST.PAYMENT_METHODS.BANK_ACCOUNT);
function AddPaymentMethodMenu(props) {
return (
<PopoverMenu
isVisible={props.isVisible}
onClose={props.onClose}
anchorPosition={props.anchorPosition}
onItemSelected={props.onClose}
menuItems={[
{
text: props.translate('common.bankAccount'),
icon: Expensicons.Bank,
onSelected: () => {
props.onItemSelected(CONST.PAYMENT_METHODS.BANK_ACCOUNT);
},
},
},
...(Permissions.canUseWallet(props.betas)
? [
{
text: props.translate('common.debitCard'),
icon: Expensicons.CreditCard,
onSelected: () => props.onItemSelected(CONST.PAYMENT_METHODS.DEBIT_CARD),
},
]
: []),
...(props.shouldShowPaypal && !props.payPalMeData.description
? [
{
text: props.translate('common.payPalMe'),
icon: Expensicons.PayPal,
onSelected: () => props.onItemSelected(CONST.PAYMENT_METHODS.PAYPAL),
},
]
: []),
]}
/>
);
...(Permissions.canUseWallet(props.betas)
? [
{
text: props.translate('common.debitCard'),
icon: Expensicons.CreditCard,
onSelected: () => props.onItemSelected(CONST.PAYMENT_METHODS.DEBIT_CARD),
},
]
: []),
...(props.shouldShowPaypal && !props.payPalMeData.description
? [
{
text: props.translate('common.payPalMe'),
icon: Expensicons.PayPal,
onSelected: () => props.onItemSelected(CONST.PAYMENT_METHODS.PAYPAL),
},
]
: []),
]}
/>
);
}

AddPaymentMethodMenu.propTypes = propTypes;
AddPaymentMethodMenu.defaultProps = defaultProps;
Expand Down
4 changes: 2 additions & 2 deletions src/components/AddressSearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const defaultProps = {
// Do not convert to class component! It's been tried before and presents more challenges than it's worth.
// Relevant thread: https://expensify.slack.com/archives/C03TQ48KC/p1634088400387400
// Reference: https://github.com/FaridSafi/react-native-google-places-autocomplete/issues/609#issuecomment-886133839
const AddressSearch = (props) => {
function AddressSearch(props) {
const [displayListViewBorder, setDisplayListViewBorder] = useState(false);
const containerRef = useRef();
const query = useMemo(
Expand Down Expand Up @@ -291,7 +291,7 @@ const AddressSearch = (props) => {
</View>
</ScrollView>
);
};
}

AddressSearch.propTypes = propTypes;
AddressSearch.defaultProps = defaultProps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const defaultProps = {
...anchorForAttachmentsOnlyDefaultProps,
};

const BaseAnchorForAttachmentsOnly = (props) => {
function BaseAnchorForAttachmentsOnly(props) {
const sourceURL = props.source;
const sourceURLWithAuth = addEncryptedAuthTokenToURL(sourceURL);
const sourceID = (sourceURL.match(CONST.REGEX.ATTACHMENT_ID) || [])[1];
Expand Down Expand Up @@ -70,7 +70,7 @@ const BaseAnchorForAttachmentsOnly = (props) => {
)}
</ShowContextMenuContext.Consumer>
);
};
}

BaseAnchorForAttachmentsOnly.displayName = 'BaseAnchorForAttachmentsOnly';
BaseAnchorForAttachmentsOnly.propTypes = propTypes;
Expand Down
18 changes: 10 additions & 8 deletions src/components/AnchorForAttachmentsOnly/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import BaseAnchorForAttachmentsOnly from './BaseAnchorForAttachmentsOnly';
import * as DeviceCapabilities from '../../libs/DeviceCapabilities';
import ControlSelection from '../../libs/ControlSelection';

const AnchorForAttachmentsOnly = (props) => (
<BaseAnchorForAttachmentsOnly
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
onPressIn={() => DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
onPressOut={() => ControlSelection.unblock()}
/>
);
function AnchorForAttachmentsOnly(props) {
return (
<BaseAnchorForAttachmentsOnly
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
onPressIn={() => DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
onPressOut={() => ControlSelection.unblock()}
/>
);
}

AnchorForAttachmentsOnly.propTypes = anchorForAttachmentsOnlyPropTypes.propTypes;
AnchorForAttachmentsOnly.defaultProps = anchorForAttachmentsOnlyPropTypes.defaultProps;
Expand Down
16 changes: 9 additions & 7 deletions src/components/AnchorForAttachmentsOnly/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import * as anchorForAttachmentsOnlyPropTypes from './anchorForAttachmentsOnlyPr
import BaseAnchorForAttachmentsOnly from './BaseAnchorForAttachmentsOnly';
import styles from '../../styles/styles';

const AnchorForAttachmentsOnly = (props) => (
<BaseAnchorForAttachmentsOnly
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
style={styles.mw100}
/>
);
function AnchorForAttachmentsOnly(props) {
return (
<BaseAnchorForAttachmentsOnly
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
style={styles.mw100}
/>
);
}

AnchorForAttachmentsOnly.propTypes = anchorForAttachmentsOnlyPropTypes.propTypes;
AnchorForAttachmentsOnly.defaultProps = anchorForAttachmentsOnlyPropTypes.defaultProps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import * as ContextMenuActions from '../../pages/home/report/ContextMenu/Context
import Tooltip from '../Tooltip';
import * as DeviceCapabilities from '../../libs/DeviceCapabilities';
import styles from '../../styles/styles';
import * as StyleUtils from '../../styles/StyleUtils';
import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions';
import {propTypes as anchorForCommentsOnlyPropTypes, defaultProps as anchorForCommentsOnlyDefaultProps} from './anchorForCommentsOnlyPropTypes';

Expand Down Expand Up @@ -39,7 +38,7 @@ const defaultProps = {
/*
* This is a default anchor component for regular links.
*/
const BaseAnchorForCommentsOnly = (props) => {
function BaseAnchorForCommentsOnly(props) {
let linkRef;
const rest = _.omit(props, _.keys(propTypes));
const linkProps = {};
Expand All @@ -54,7 +53,6 @@ const BaseAnchorForCommentsOnly = (props) => {
return (
<PressableWithSecondaryInteraction
inline
style={[styles.cursorDefault, StyleUtils.getFontSizeStyle(props.style.fontSize)]}
onSecondaryInteraction={(event) => {
ReportActionContextMenu.showContextMenu(
isEmail ? ContextMenuActions.CONTEXT_MENU_TYPES.EMAIL : ContextMenuActions.CONTEXT_MENU_TYPES.LINK,
Expand Down Expand Up @@ -87,7 +85,7 @@ const BaseAnchorForCommentsOnly = (props) => {
</Tooltip>
</PressableWithSecondaryInteraction>
);
};
}

BaseAnchorForCommentsOnly.propTypes = propTypes;
BaseAnchorForCommentsOnly.defaultProps = defaultProps;
Expand Down
Loading

0 comments on commit 4fdc8db

Please sign in to comment.