From dc87e20bcba3759fba759ec90f6ef0a7b46c79cf Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Sat, 15 Aug 2020 10:58:07 -0400 Subject: [PATCH] Update react-native-elements (#4658) (#4683) (cherry picked from commit 27849beed46cdd208f330c1058a94684a29eb0e6) Co-authored-by: Elias Nahum --- package-lock.json | 43 +++++-------------- package.json | 2 +- ...atch => react-native-elements+2.2.0.patch} | 22 +++++----- 3 files changed, 23 insertions(+), 44 deletions(-) rename patches/{react-native-elements+2.0.0.patch => react-native-elements+2.2.0.patch} (78%) diff --git a/package-lock.json b/package-lock.json index 53898c734..3026903b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6140,7 +6140,6 @@ "version": "16.9.43", "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.43.tgz", "integrity": "sha512-PxshAFcnJqIWYpJbLPriClH53Z2WlJcVZE+NP2etUtWQs2s7yIMj3/LDKZT/5CHJ/F62iyjVCDu2H3jHEXIxSg==", - "dev": true, "requires": { "@types/prop-types": "*", "csstype": "^2.2.0" @@ -6150,7 +6149,6 @@ "version": "0.62.18", "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.62.18.tgz", "integrity": "sha512-7QfU8EzIYxYqeXpPf8QNv2xi8hrePlgTbRATRo+plRSdVfJu7N6sAXqrFxKJp6bGLvp82GV1gczl93gqiAfXPA==", - "dev": true, "requires": { "@types/react": "*" } @@ -6162,25 +6160,6 @@ "requires": { "@types/react": "*", "@types/react-native": "*" - }, - "dependencies": { - "@types/react": { - "version": "16.9.38", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.38.tgz", - "integrity": "sha512-pHAeZbjjNRa/hxyNuLrvbxhhnKyKNiLC6I5fRF2Zr/t/S6zS41MiyzH4+c+1I9vVfvuRt1VS2Lodjr4ZWnxrdA==", - "requires": { - "@types/prop-types": "*", - "csstype": "^2.2.0" - } - }, - "@types/react-native": { - "version": "0.62.13", - "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.62.13.tgz", - "integrity": "sha512-hs4/tSABhcJx+J8pZhVoXHrOQD89WFmbs8QiDLNSA9zNrD46pityAuBWuwk1aMjPk9I3vC5ewkJroVRHgRIfdg==", - "requires": { - "@types/react": "*" - } - } } }, "@types/react-test-renderer": { @@ -15365,8 +15344,7 @@ "lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" }, "lodash.isplainobject": { "version": "4.0.6", @@ -18290,18 +18268,19 @@ "integrity": "sha512-YdjiiElDdvOj55IDPNJ0kxXxzDRWyDymV/iYZJt34ueRWWFLIff+DymSjBc0QljrIFv7pODws2lo81+5Y0ww0w==" }, "react-native-elements": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/react-native-elements/-/react-native-elements-2.0.0.tgz", - "integrity": "sha512-xViTU/JlabYX94fDL2iu17gvMtgEOq2lFAToYlU3RBkwb/J13cdwSr8Ti9z6v6Iui4f8S3FjkpRJnFaOsZrK7w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/react-native-elements/-/react-native-elements-2.2.0.tgz", + "integrity": "sha512-OkXH96ecqDFcrjxzOWw2h3nt8TxX1ghzvJ/W4OGaxm7u7LC0LzE3SMAx/rh/Zyp/jkdXap032ZLm1mSrxrBuuQ==", "requires": { - "@types/react-native-vector-icons": "^6.4.4", + "@types/react-native-vector-icons": "^6.4.5", "color": "^3.1.0", "deepmerge": "^3.1.0", "hoist-non-react-statics": "^3.1.0", + "lodash.isequal": "^4.5.0", "opencollective-postinstall": "^2.0.0", "prop-types": "^15.7.2", - "react-native-ratings": "^6.5.0", - "react-native-status-bar-height": "^2.2.0" + "react-native-ratings": "^7.2.0", + "react-native-status-bar-height": "^2.5.0" }, "dependencies": { "deepmerge": { @@ -18468,9 +18447,9 @@ "integrity": "sha512-R1mVPGctEJuOlxoeIBlT5270A+DKngP78rWU0dgMxIuETjGYhBRJMKOp1rQUbp6PxcahfU+PjSTSzsbja5FyDw==" }, "react-native-ratings": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/react-native-ratings/-/react-native-ratings-6.5.0.tgz", - "integrity": "sha512-YMcfQ7UQCmXGEc/WPlukHSHs5yvckTwjq5fTRk1FG8gaO7fZCNygEUGPuw4Dbvvp3IlsCUn0bOQd63RYsb7NDQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/react-native-ratings/-/react-native-ratings-7.2.0.tgz", + "integrity": "sha512-oSrkQ4rnpYjCw+d6MPJQghXfrfb3uQKoTJx1exdk7xqzw4jnv3pyu0PAuxCDJk/rfDSD/sirIAudz+zdGxrBog==", "requires": { "lodash": "^4.17.4", "prop-types": "^15.5.10" diff --git a/package.json b/package.json index 260f69dc5..e4d56be1b 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "react-native-cookies": "github:mattermost/react-native-cookies#b35bafc388ae09c83bd875e887daf6a0755e0b40", "react-native-device-info": "5.5.7", "react-native-document-picker": "3.4.0", - "react-native-elements": "2.0.0", + "react-native-elements": "2.2.0", "react-native-exception-handler": "2.10.8", "react-native-fast-image": "8.1.5", "react-native-file-viewer": "2.1.0", diff --git a/patches/react-native-elements+2.0.0.patch b/patches/react-native-elements+2.2.0.patch similarity index 78% rename from patches/react-native-elements+2.0.0.patch rename to patches/react-native-elements+2.2.0.patch index 28b6689f8..3572170f1 100644 --- a/patches/react-native-elements+2.0.0.patch +++ b/patches/react-native-elements+2.2.0.patch @@ -1,25 +1,25 @@ diff --git a/node_modules/react-native-elements/src/searchbar/SearchBar-android.js b/node_modules/react-native-elements/src/searchbar/SearchBar-android.js -index f44866a..76406c2 100644 +index e8394b6..0eaf9dd 100644 --- a/node_modules/react-native-elements/src/searchbar/SearchBar-android.js +++ b/node_modules/react-native-elements/src/searchbar/SearchBar-android.js -@@ -78,6 +78,12 @@ class SearchBar extends Component { - }; - } +@@ -31,6 +31,12 @@ const defaultClearIcon = { + }; + class SearchBar extends Component { + componentDidUpdate(prevProps) { + if (this.props.value !== prevProps.value) { + this.setState({isEmpty: this.props.value === ''}); + } + } + - render() { - const { - clearIcon, + focus = () => { + this.input.focus(); + }; diff --git a/node_modules/react-native-elements/src/searchbar/SearchBar-ios.js b/node_modules/react-native-elements/src/searchbar/SearchBar-ios.js -index 32a28d5..d43e9bf 100644 +index b656616..6ecbad2 100644 --- a/node_modules/react-native-elements/src/searchbar/SearchBar-ios.js +++ b/node_modules/react-native-elements/src/searchbar/SearchBar-ios.js -@@ -41,6 +41,12 @@ class SearchBar extends Component { +@@ -40,6 +40,12 @@ class SearchBar extends Component { }; } @@ -32,7 +32,7 @@ index 32a28d5..d43e9bf 100644 focus = () => { this.input.focus(); }; -@@ -260,7 +266,6 @@ const styles = StyleSheet.create({ +@@ -265,7 +271,6 @@ const styles = StyleSheet.create({ paddingBottom: 13, paddingTop: 13, flexDirection: 'row', @@ -40,7 +40,7 @@ index 32a28d5..d43e9bf 100644 alignItems: 'center', }, input: { -@@ -271,7 +276,7 @@ const styles = StyleSheet.create({ +@@ -276,7 +281,7 @@ const styles = StyleSheet.create({ borderBottomWidth: 0, backgroundColor: '#dcdce1', borderRadius: 9,