diff --git a/.eslintrc.js b/.eslintrc.js index b3531beb5ae4..8f58c1f89e51 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,7 +2,7 @@ module.exports = { extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-hooks/recommended', 'prettier', 'plugin:react-native-a11y/basic'], plugins: ['react-hooks', 'react-native-a11y'], parser: 'babel-eslint', - ignorePatterns: ['!.*', 'src/vendor', '.github/actions/**/index.js', 'desktop/dist/*.js', 'dist/*.js', 'node_modules/.bin/**', '.git/**'], + ignorePatterns: ['!.*', 'src/vendor', '.github/actions/**/index.js', 'desktop/dist/*.js', 'dist/*.js', 'node_modules/.bin/**', 'node_modules/.cache/**', '.git/**'], env: { jest: true, }, diff --git a/package-lock.json b/package-lock.json index a1a2a0bd684c..af187424f308 100644 --- a/package-lock.json +++ b/package-lock.json @@ -144,7 +144,7 @@ "css-loader": "^6.7.2", "diff-so-fancy": "^1.3.0", "dotenv": "^16.0.3", - "electron": "22.3.14", + "electron": "^25.2.0", "electron-builder": "24.5.0", "eslint": "^7.6.0", "eslint-config-expensify": "^2.0.38", @@ -15892,8 +15892,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.7.6", - "license": "MIT" + "version": "18.16.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.18.tgz", + "integrity": "sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==" }, "node_modules/@types/node-fetch": { "version": "2.6.2", @@ -22140,14 +22141,14 @@ } }, "node_modules/electron": { - "version": "22.3.14", - "resolved": "https://registry.npmjs.org/electron/-/electron-22.3.14.tgz", - "integrity": "sha512-WxVcLnC4DrkBLN1/BwpxNkGvVq8iq1hM7lae5nvjnSYg/bwVbuo1Cwc80Keft4MIWKlYCXNiKKqs3qCXV4Aiaw==", + "version": "25.2.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-25.2.0.tgz", + "integrity": "sha512-I/rhcW2sV2fyiveVSBr2N7v5ZiCtdGY0UiNCDZgk2fpSC+irQjbeh7JT2b4vWmJ2ogOXBjqesrN9XszTIG6DHg==", "dev": true, "hasInstallScript": true, "dependencies": { "@electron/get": "^2.0.0", - "@types/node": "^16.11.26", + "@types/node": "^18.11.18", "extract-zip": "^2.0.1" }, "bin": { @@ -22413,11 +22414,6 @@ "version": "1.4.284", "license": "ISC" }, - "node_modules/electron/node_modules/@types/node": { - "version": "16.11.60", - "dev": true, - "license": "MIT" - }, "node_modules/element-resize-detector": { "version": "1.2.4", "dev": true, @@ -54383,7 +54379,9 @@ "dev": true }, "@types/node": { - "version": "18.7.6" + "version": "18.16.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.18.tgz", + "integrity": "sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==" }, "@types/node-fetch": { "version": "2.6.2", @@ -58685,20 +58683,14 @@ } }, "electron": { - "version": "22.3.14", - "resolved": "https://registry.npmjs.org/electron/-/electron-22.3.14.tgz", - "integrity": "sha512-WxVcLnC4DrkBLN1/BwpxNkGvVq8iq1hM7lae5nvjnSYg/bwVbuo1Cwc80Keft4MIWKlYCXNiKKqs3qCXV4Aiaw==", + "version": "25.2.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-25.2.0.tgz", + "integrity": "sha512-I/rhcW2sV2fyiveVSBr2N7v5ZiCtdGY0UiNCDZgk2fpSC+irQjbeh7JT2b4vWmJ2ogOXBjqesrN9XszTIG6DHg==", "dev": true, "requires": { "@electron/get": "^2.0.0", - "@types/node": "^16.11.26", + "@types/node": "^18.11.18", "extract-zip": "^2.0.1" - }, - "dependencies": { - "@types/node": { - "version": "16.11.60", - "dev": true - } } }, "electron-builder": { diff --git a/package.json b/package.json index 7c2f58c15131..af8f8793bf80 100644 --- a/package.json +++ b/package.json @@ -182,7 +182,7 @@ "css-loader": "^6.7.2", "diff-so-fancy": "^1.3.0", "dotenv": "^16.0.3", - "electron": "22.3.14", + "electron": "^25.2.0", "electron-builder": "24.5.0", "eslint": "^7.6.0", "eslint-config-expensify": "^2.0.38", diff --git a/src/CONST.js b/src/CONST.js index eb7fbbf35a2f..c16309f3436a 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -1141,7 +1141,7 @@ const CONST = { CARD_SECURITY_CODE: /^[0-9]{3,4}$/, CARD_EXPIRATION_DATE: /^(0[1-9]|1[0-2])([^0-9])?([0-9]{4}|([0-9]{2}))$/, PAYPAL_ME_USERNAME: /^[a-zA-Z0-9]{1,20}$/, - ROOM_NAME: /^#[a-z0-9-]{1,80}$/, + ROOM_NAME: /^#[a-z0-9à-ÿ-]{1,80}$/, // eslint-disable-next-line max-len, no-misleading-character-class EMOJIS: /[\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu, diff --git a/src/components/Pressable/GenericPressable/index.js b/src/components/Pressable/GenericPressable/index.js index 7412d85d1b88..859552e10cf3 100644 --- a/src/components/Pressable/GenericPressable/index.js +++ b/src/components/Pressable/GenericPressable/index.js @@ -14,6 +14,7 @@ const WebGenericPressable = forwardRef((props, ref) => ( aria-label={props.accessibilityLabel} aria-labelledby={props.accessibilityLabelledBy} aria-valuenow={props.accessibilityValue} + nativeID={props.nativeID || 'no-drag-area'} /> )); diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index b1aafa6414c2..27dcbbf1d4d0 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -23,6 +23,7 @@ import * as IOU from '../../libs/actions/IOU'; import refPropTypes from '../refPropTypes'; import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; import themeColors from '../../styles/themes/default'; +import reportPropTypes from '../../pages/reportPropTypes'; const propTypes = { /** All the data of the action */ @@ -37,10 +38,7 @@ const propTypes = { /* Onyx Props */ /** chatReport associated with iouReport */ - chatReport: PropTypes.shape({ - /** Whether the chat report has an outstanding IOU */ - hasOutstandingIOU: PropTypes.bool.isRequired, - }), + chatReport: reportPropTypes, /** Active IOU Report for current report */ iouReport: PropTypes.shape({ diff --git a/src/components/SettlementButton.js b/src/components/SettlementButton.js index dbcaae083659..13a25c94540e 100644 --- a/src/components/SettlementButton.js +++ b/src/components/SettlementButton.js @@ -94,7 +94,7 @@ class SettlementButton extends React.Component { value: CONST.IOU.PAYMENT_TYPE.PAYPAL_ME, }, [CONST.IOU.PAYMENT_TYPE.ELSEWHERE]: { - text: isExpenseReport ? this.props.translate('iou.payExpenseElsewhere') : this.props.translate('iou.settleElsewhere'), + text: this.props.translate('iou.payElsewhere'), icon: Expensicons.Cash, value: CONST.IOU.PAYMENT_TYPE.ELSEWHERE, }, @@ -127,7 +127,7 @@ class SettlementButton extends React.Component { return [ { ...paymentMethods[paymentMethod], - text: paymentMethod === CONST.IOU.PAYMENT_TYPE.ELSEWHERE ? this.props.translate('iou.payExpenseElsewhere') : this.props.translate('iou.pay'), + text: paymentMethod === CONST.IOU.PAYMENT_TYPE.ELSEWHERE ? this.props.translate('iou.payElsewhere') : this.props.translate('iou.pay'), }, ]; } diff --git a/src/languages/en.js b/src/languages/en.js index 537ceb1504de..29e1523bf3b1 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -353,8 +353,7 @@ export default { settledElsewhere: 'Paid elsewhere', settledPaypalMe: 'Paid using Paypal.me', settleExpensify: 'Pay with Expensify', - settleElsewhere: "I'll settle up elsewhere", - payExpenseElsewhere: 'Pay elsewhere', + payElsewhere: 'Pay elsewhere', settlePaypalMe: 'Pay with PayPal.me', requestAmount: ({amount}) => `request ${amount}`, splitAmount: ({amount}) => `split ${amount}`, diff --git a/src/languages/es.js b/src/languages/es.js index 7f9cc51907e5..4b81e0ceb61b 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -352,8 +352,7 @@ export default { settledElsewhere: 'Pagado de otra forma', settledPaypalMe: 'Pagado con PayPal.me', settleExpensify: 'Pagar con Expensify', - settleElsewhere: 'Voy a pagar de otra forma', - payExpenseElsewhere: 'Pagar de otra forma', + payElsewhere: 'Pagar de otra forma', settlePaypalMe: 'Pagar con PayPal.me', requestAmount: ({amount}) => `solicitar ${amount}`, splitAmount: ({amount}) => `dividir ${amount}`, diff --git a/src/styles/styles.js b/src/styles/styles.js index c75514a9b53c..809640d65f48 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -25,10 +25,6 @@ import cursor from './utilities/cursor'; import userSelect from './utilities/userSelect'; import textUnderline from './utilities/textUnderline'; -function getTransparentColor(color, transparency = '') { - return `${color}${transparency}`; -} - const picker = { backgroundColor: themeColors.transparent, color: themeColors.text, @@ -3388,7 +3384,7 @@ const styles = { linkPreviewWrapper: { marginTop: 16, borderLeftWidth: 4, - borderLeftColor: getTransparentColor(themeColors.inverse, 33), + borderLeftColor: themeColors.border, paddingLeft: 12, }, diff --git a/tests/unit/ValidationUtilsTest.js b/tests/unit/ValidationUtilsTest.js index 31735c15243c..82cd3b84304e 100644 --- a/tests/unit/ValidationUtilsTest.js +++ b/tests/unit/ValidationUtilsTest.js @@ -47,6 +47,10 @@ describe('ValidationUtils', () => { test('room name with lowercase letters, numbers, and dashes', () => { expect(ValidationUtils.isValidRoomName('#this-is-a-room1')).toBe(true); }); + + test('room name with spanish Accented letters and dashes', () => { + expect(ValidationUtils.isValidRoomName('#sala-de-opinión')).toBe(true); + }); }); describe('isValidWebsite', () => {