upgrade to SDK 47

This commit is contained in:
Ninjas Code - 4 2023-03-09 14:15:59 +05:00
parent 194a514431
commit 65bf311498
9 changed files with 6119 additions and 14926 deletions

15
Rider App/.expo/README.md Normal file
View File

@ -0,0 +1,15 @@
> Why do I have a folder named ".expo" in my project?
The ".expo" folder is created when an Expo project is started using "expo start" command.
> What do the files contain?
- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
- "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
- "settings.json": contains the server configuration that is used to serve the application manifest.
> Should I commit the ".expo" folder?
No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
Upon project creation, the ".expo" folder is already added to your ".gitignore" file.

View File

@ -0,0 +1,3 @@
{
"devices": []
}

View File

@ -0,0 +1,9 @@
{
"expoServerPort": null,
"packagerPort": null,
"packagerPid": null,
"expoServerNgrokUrl": null,
"packagerNgrokUrl": null,
"ngrokPid": null,
"webpackServerPort": null
}

View File

@ -0,0 +1,9 @@
{
"hostType": "lan",
"lanType": "ip",
"dev": true,
"minify": false,
"urlRandomness": null,
"https": false,
"scheme": null
}

1
Rider App/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/node_modules

View File

@ -1,96 +1,98 @@
import { ApolloProvider } from '@apollo/react-hooks' import { ApolloProvider } from "@apollo/react-hooks";
import AsyncStorage from '@react-native-async-storage/async-storage' import AsyncStorage from "@react-native-async-storage/async-storage";
import * as Font from 'expo-font' import * as Font from "expo-font";
import * as Notifications from 'expo-notifications' import * as Notifications from "expo-notifications";
import * as SplashScreen from 'expo-splash-screen' import * as SplashScreen from "expo-splash-screen";
import React, { useEffect, useState } from 'react' import React, { useEffect, useState } from "react";
import { Platform, StatusBar } from 'react-native' import { Platform, StatusBar } from "react-native";
import FlashMessage from 'react-native-flash-message' import FlashMessage from "react-native-flash-message";
import i18n from './i18n' import i18n from "./i18n";
import setupApolloClient from './src/apollo/index' import setupApolloClient from "./src/apollo/index";
import { AuthContext } from './src/context/auth' import { AuthContext } from "./src/context/auth";
import { ConfigurationProvider } from './src/context/configuration' import { ConfigurationProvider } from "./src/context/configuration";
import AppContainer from './src/routes/index' import AppContainer from "./src/routes/index";
export default function App() { export default function App() {
const [fontLoaded, setFontLoaded] = useState(false) const [fontLoaded, setFontLoaded] = useState(false);
const [client, setClient] = useState(null) const [client, setClient] = useState(null);
const [token, setToken] = useState(false) const [token, setToken] = useState(false);
const [appIsReady, setAppIsReady] = useState(false) const [appIsReady, setAppIsReady] = useState(false);
useEffect(() => { useEffect(() => {
;(async () => { (async () => {
const token = await AsyncStorage.getItem('rider-token') const token = await AsyncStorage.getItem("rider-token");
if (token) setToken(token) if (token) setToken(token);
setAppIsReady(true) setAppIsReady(true);
})() })();
}, []) }, []);
useEffect(() => { useEffect(() => {
;(async () => { (async () => {
try { try {
await SplashScreen.preventAutoHideAsync() await SplashScreen.preventAutoHideAsync();
} catch (e) { } catch (e) {
console.log(e) console.log(e);
} }
})() })();
loadData() loadData();
}, []) }, []);
const setTokenAsync = async token => { const setTokenAsync = async (token) => {
await AsyncStorage.setItem('rider-token', token) await AsyncStorage.setItem("rider-token", token);
setToken(token) setToken(token);
} };
const logout = async () => { const logout = async () => {
try { try {
await AsyncStorage.removeItem('rider-token') await AsyncStorage.removeItem("rider-token");
setToken(null) setToken(null);
} catch (e) { } catch (e) {
console.log('Logout Error: ', e) console.log("Logout Error: ", e);
}
} }
};
async function loadData() { async function loadData() {
await i18n.initAsync() await i18n.initAsync();
await Font.loadAsync({ await Font.loadAsync({
MuseoSans300: require('./assets/font/MuseoSans/MuseoSans300.ttf'), MuseoSans300: require("./assets/font/MuseoSans/MuseoSans300.ttf"),
MuseoSans500: require('./assets/font/MuseoSans/MuseoSans500.ttf'), MuseoSans500: require("./assets/font/MuseoSans/MuseoSans500.ttf"),
MuseoSans700: require('./assets/font/MuseoSans/MuseoSans700.ttf'), MuseoSans700: require("./assets/font/MuseoSans/MuseoSans700.ttf"),
icomoon: require('./assets/font/icomoon.ttf') icomoon: require("./assets/font/icomoon.ttf"),
}) });
const client = await setupApolloClient() const client = await setupApolloClient();
await permissionForPushNotificationsAsync() await permissionForPushNotificationsAsync();
setClient(client) setClient(client);
setFontLoaded(true) setFontLoaded(true);
await SplashScreen.hideAsync() await SplashScreen.hideAsync();
} }
async function permissionForPushNotificationsAsync() { async function permissionForPushNotificationsAsync() {
const { status: existingStatus } = await Notifications.getPermissionsAsync() const {
let finalStatus = existingStatus status: existingStatus,
} = await Notifications.getPermissionsAsync();
let finalStatus = existingStatus;
// only ask if permissions have not already been determined, because // only ask if permissions have not already been determined, because
// iOS won't necessarily prompt the user a second time. // iOS won't necessarily prompt the user a second time.
if (existingStatus !== 'granted') { if (existingStatus !== "granted") {
// Android remote notification permissions are granted during the app // Android remote notification permissions are granted during the app
// install, so this will only ask on iOS // install, so this will only ask on iOS
const { status } = await Notifications.requestPermissionsAsync() const { status } = await Notifications.requestPermissionsAsync();
finalStatus = status finalStatus = status;
} }
// Stop here if the user did not grant permissions // Stop here if the user did not grant permissions
if (finalStatus !== 'granted') { if (finalStatus !== "granted") {
return return;
} }
if (Platform.OS === 'android') { if (Platform.OS === "android") {
Notifications.setNotificationChannelAsync('default', { Notifications.setNotificationChannelAsync("default", {
name: 'default', name: "default",
sound: true, sound: true,
priority: 'max', priority: "max",
importance: Notifications.AndroidImportance.HIGH, importance: Notifications.AndroidImportance.HIGH,
vibrate: [0, 250, 250, 250] vibrate: [0, 250, 250, 250],
}) });
} }
} }
@ -99,7 +101,7 @@ export default function App() {
<ApolloProvider client={client}> <ApolloProvider client={client}>
<StatusBar <StatusBar
translucent translucent
backgroundColor={'transparent'} backgroundColor={"transparent"}
barStyle="dark-content" barStyle="dark-content"
/> />
<ConfigurationProvider> <ConfigurationProvider>
@ -109,7 +111,7 @@ export default function App() {
</ConfigurationProvider> </ConfigurationProvider>
<FlashMessage duration={2000} position="center" /> <FlashMessage duration={2000} position="center" />
</ApolloProvider> </ApolloProvider>
) );
} }
return null return null;
} }

20587
Rider App/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,8 +24,8 @@
}, },
"dependencies": { "dependencies": {
"@apollo/react-hooks": "^3.1.3", "@apollo/react-hooks": "^3.1.3",
"@expo/vector-icons": "^12.0.0", "@expo/vector-icons": "^13.0.0",
"@react-native-async-storage/async-storage": "~1.15.0", "@react-native-async-storage/async-storage": "~1.17.3",
"@react-native-community/masked-view": "0.1.10", "@react-native-community/masked-view": "0.1.10",
"@react-navigation/bottom-tabs": "^5.11.11", "@react-navigation/bottom-tabs": "^5.11.11",
"@react-navigation/drawer": "^5.12.5", "@react-navigation/drawer": "^5.12.5",
@ -39,39 +39,40 @@
"apollo-link-state": "^0.4.2", "apollo-link-state": "^0.4.2",
"apollo-link-ws": "^1.0.20", "apollo-link-ws": "^1.0.20",
"apollo-upload-client": "^10.0.1", "apollo-upload-client": "^10.0.1",
"expo": "^44.0.0", "deprecated-react-native-prop-types": "^4.0.0",
"expo-constants": "~13.0.1", "expo": "^47.0.0",
"expo-font": "~10.0.4", "expo-constants": "~14.0.2",
"expo-localization": "~12.0.0", "expo-font": "~11.0.1",
"expo-location": "~14.0.1", "expo-localization": "~14.0.0",
"expo-notifications": "~0.14.0", "expo-location": "~15.0.1",
"expo-splash-screen": "~0.14.1", "expo-notifications": "~0.17.0",
"expo-task-manager": "~10.1.0", "expo-splash-screen": "~0.17.5",
"expo-updates": "~0.11.6", "expo-task-manager": "~11.0.1",
"expo-updates": "~0.15.6",
"graphql": "^14.3.1", "graphql": "^14.3.1",
"graphql-tag": "^2.10.1", "graphql-tag": "^2.10.1",
"i18n-js": "^3.3.0", "i18n-js": "^3.3.0",
"patch-package": "^6.2.2", "patch-package": "^6.5.1",
"react": "17.0.1", "react": "18.1.0",
"react-apollo": "^2.5.8", "react-apollo": "^2.5.8",
"react-native": "0.64.3", "react-native": "0.70.5",
"react-native-animatable": "^1.3.2", "react-native-animatable": "^1.3.2",
"react-native-flash-message": "^0.1.13", "react-native-flash-message": "^0.1.13",
"react-native-gesture-handler": "~2.1.0", "react-native-gesture-handler": "~2.8.0",
"react-native-gifted-chat": "^0.16.3", "react-native-gifted-chat": "^0.16.3",
"react-native-maps": "0.29.4", "react-native-maps": "1.3.2",
"react-native-maps-directions": "^1.8.0", "react-native-maps-directions": "^1.8.0",
"react-native-material-textfield": "^0.16.1", "react-native-material-textfield": "^0.16.1",
"react-native-modal": "^11.5.6", "react-native-modal": "^11.5.6",
"react-native-reanimated": "~2.3.1", "react-native-reanimated": "~2.12.0",
"react-native-safe-area-context": "3.3.2", "react-native-safe-area-context": "4.4.1",
"react-native-screens": "~3.10.1", "react-native-screens": "~3.18.0",
"react-native-svg": "12.1.1", "react-native-svg": "13.4.0",
"react-native-webview": "11.15.0", "react-native-webview": "11.23.1",
"subscriptions-transport-ws": "^0.9.16" "subscriptions-transport-ws": "^0.9.16"
}, },
"devDependencies": { "devDependencies": {
"babel-preset-expo": "9.0.2", "babel-preset-expo": "~9.2.1",
"eslint": "^7.1.0", "eslint": "^7.1.0",
"eslint-config-standard": "^14.1.1", "eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.20.2", "eslint-plugin-import": "^2.20.2",

View File

@ -1,21 +1,108 @@
diff --git a/node_modules/react-native-material-textfield/src/components/affix/index.js b/node_modules/react-native-material-textfield/src/components/affix/index.js diff --git a/node_modules/react-native-material-textfield/src/components/affix/index.js b/node_modules/react-native-material-textfield/src/components/affix/index.js
index 0f85022..c12b3a6 100644 index 0f85022..e467adb 100644
--- a/node_modules/react-native-material-textfield/src/components/affix/index.js --- a/node_modules/react-native-material-textfield/src/components/affix/index.js
+++ b/node_modules/react-native-material-textfield/src/components/affix/index.js +++ b/node_modules/react-native-material-textfield/src/components/affix/index.js
@@ -11,7 +11,7 @@ export default class Affix extends PureComponent { @@ -9,26 +9,26 @@ export default class Affix extends PureComponent {
numberOfLines: 1,
};
static propTypes = { - static propTypes = {
numberOfLines: PropTypes.number, - numberOfLines: PropTypes.number,
- style: Animated.Text.propTypes.style, - style: Animated.Text.propTypes.style,
+ style: PropTypes.object, + // static propTypes = {
+ // numberOfLines: PropTypes.number,
+ // style: PropTypes.object,
color: PropTypes.string.isRequired, - color: PropTypes.string.isRequired,
fontSize: PropTypes.number.isRequired, - fontSize: PropTypes.number.isRequired,
+ // color: PropTypes.string.isRequired,
+ // fontSize: PropTypes.number.isRequired,
- type: PropTypes
- .oneOf(['prefix', 'suffix'])
- .isRequired,
+ // type: PropTypes
+ // .oneOf(['prefix', 'suffix'])
+ // .isRequired,
- labelAnimation: PropTypes
- .instanceOf(Animated.Value)
- .isRequired,
+ // labelAnimation: PropTypes
+ // .instanceOf(Animated.Value)
+ // .isRequired,
- children: PropTypes.oneOfType([
- PropTypes.arrayOf(PropTypes.node),
- PropTypes.node,
- ]),
- };
+ // children: PropTypes.oneOfType([
+ // PropTypes.arrayOf(PropTypes.node),
+ // PropTypes.node,
+ // ]),
+ // };
render() {
let { labelAnimation, style, children, type, fontSize, color } = this.props;
diff --git a/node_modules/react-native-material-textfield/src/components/counter/index.js b/node_modules/react-native-material-textfield/src/components/counter/index.js
index 35d3264..e4258cd 100644
--- a/node_modules/react-native-material-textfield/src/components/counter/index.js
+++ b/node_modules/react-native-material-textfield/src/components/counter/index.js
@@ -5,15 +5,15 @@ import { Text } from 'react-native';
import styles from './styles';
export default class Counter extends PureComponent {
- static propTypes = {
- count: PropTypes.number.isRequired,
- limit: PropTypes.number,
+ // static propTypes = {
+ // count: PropTypes.number.isRequired,
+ // limit: PropTypes.number,
- baseColor: PropTypes.string.isRequired,
- errorColor: PropTypes.string.isRequired,
+ // baseColor: PropTypes.string.isRequired,
+ // errorColor: PropTypes.string.isRequired,
- style: Text.propTypes.style,
- };
+ // style: Text.propTypes.style,
+ // };
render() {
let { count, limit, baseColor, errorColor, style } = this.props;
diff --git a/node_modules/react-native-material-textfield/src/components/field/index.js b/node_modules/react-native-material-textfield/src/components/field/index.js diff --git a/node_modules/react-native-material-textfield/src/components/field/index.js b/node_modules/react-native-material-textfield/src/components/field/index.js
index 494bbaa..9bbf2e2 100644 index 494bbaa..d3960a6 100644
--- a/node_modules/react-native-material-textfield/src/components/field/index.js --- a/node_modules/react-native-material-textfield/src/components/field/index.js
+++ b/node_modules/react-native-material-textfield/src/components/field/index.js +++ b/node_modules/react-native-material-textfield/src/components/field/index.js
@@ -221,6 +221,7 @@ export default class TextField extends PureComponent { @@ -1,4 +1,5 @@
import PropTypes from 'prop-types';
+import {ViewPropTypes} from 'deprecated-react-native-prop-types'
import React, { PureComponent } from 'react';
import {
View,
@@ -7,7 +8,7 @@ import {
Animated,
StyleSheet,
Platform,
- ViewPropTypes,
+ //ViewPropTypes,
} from 'react-native';
import Line from '../line';
@@ -83,9 +84,7 @@ export default class TextField extends PureComponent {
labelOffset: Label.propTypes.offset,
- labelTextStyle: Text.propTypes.style,
- titleTextStyle: Text.propTypes.style,
- affixTextStyle: Text.propTypes.style,
+
tintColor: PropTypes.string,
textColor: PropTypes.string,
@@ -221,6 +220,7 @@ export default class TextField extends PureComponent {
let options = { let options = {
toValue: this.focusState(), toValue: this.focusState(),
@ -24,22 +111,59 @@ index 494bbaa..9bbf2e2 100644
}; };
diff --git a/node_modules/react-native-material-textfield/src/components/helper/index.js b/node_modules/react-native-material-textfield/src/components/helper/index.js diff --git a/node_modules/react-native-material-textfield/src/components/helper/index.js b/node_modules/react-native-material-textfield/src/components/helper/index.js
index 6060f9f..fe9d9c4 100644 index 6060f9f..7f790ca 100644
--- a/node_modules/react-native-material-textfield/src/components/helper/index.js --- a/node_modules/react-native-material-textfield/src/components/helper/index.js
+++ b/node_modules/react-native-material-textfield/src/components/helper/index.js +++ b/node_modules/react-native-material-textfield/src/components/helper/index.js
@@ -11,7 +11,7 @@ export default class Helper extends PureComponent { @@ -5,19 +5,19 @@ import { Animated } from 'react-native';
import styles from './styles';
disabled: PropTypes.bool, export default class Helper extends PureComponent {
- static propTypes = {
- title: PropTypes.string,
- error: PropTypes.string,
+ // static propTypes = {
+ // title: PropTypes.string,
+ // error: PropTypes.string,
- disabled: PropTypes.bool,
+ // disabled: PropTypes.bool,
- style: Animated.Text.propTypes.style, - style: Animated.Text.propTypes.style,
+ style: PropTypes.object, + // style: PropTypes.object,
baseColor: PropTypes.string, - baseColor: PropTypes.string,
errorColor: PropTypes.string, - errorColor: PropTypes.string,
+ // baseColor: PropTypes.string,
+ // errorColor: PropTypes.string,
- focusAnimation: PropTypes.instanceOf(Animated.Value),
- };
+ // focusAnimation: PropTypes.instanceOf(Animated.Value),
+ // };
constructor(props) {
super(props);
diff --git a/node_modules/react-native-material-textfield/src/components/label/index.js b/node_modules/react-native-material-textfield/src/components/label/index.js diff --git a/node_modules/react-native-material-textfield/src/components/label/index.js b/node_modules/react-native-material-textfield/src/components/label/index.js
index 82eaf03..809fcdd 100644 index 82eaf03..eebad36 100644
--- a/node_modules/react-native-material-textfield/src/components/label/index.js --- a/node_modules/react-native-material-textfield/src/components/label/index.js
+++ b/node_modules/react-native-material-textfield/src/components/label/index.js +++ b/node_modules/react-native-material-textfield/src/components/label/index.js
@@ -5,11 +5,11 @@ import { Animated } from 'react-native';
import styles from './styles';
export default class Label extends PureComponent {
- static defaultProps = {
- numberOfLines: 1,
- disabled: false,
- restricted: false,
- };
+ // static defaultProps = {
+ // numberOfLines: 1,
+ // disabled: false,
+ // restricted: false,
+ // };
static propTypes = {
numberOfLines: PropTypes.number,
@@ -43,7 +43,7 @@ export default class Label extends PureComponent { @@ -43,7 +43,7 @@ export default class Label extends PureComponent {
y1: PropTypes.number, y1: PropTypes.number,
}), }),
@ -49,3 +173,79 @@ index 82eaf03..809fcdd 100644
label: PropTypes.string, label: PropTypes.string,
}; };
diff --git a/node_modules/react-native-material-textfield/src/components/line/index.js b/node_modules/react-native-material-textfield/src/components/line/index.js
index 44995e9..7ba8db0 100644
--- a/node_modules/react-native-material-textfield/src/components/line/index.js
+++ b/node_modules/react-native-material-textfield/src/components/line/index.js
@@ -8,13 +8,13 @@ const lineTypes = PropTypes
.oneOf(['solid', 'dotted', 'dashed', 'none']);
export default class Line extends PureComponent {
- static defaultProps = {
- lineType: 'solid',
- disabledLineType: 'dotted',
+ // static defaultProps = {
+ // lineType: 'solid',
+ // disabledLineType: 'dotted',
- disabled: false,
- restricted: false,
- };
+ // disabled: false,
+ // restricted: false,
+ // };
static propTypes = {
lineType: lineTypes,
diff --git a/node_modules/react-native-material-textfield/src/components/outline/index.js b/node_modules/react-native-material-textfield/src/components/outline/index.js
index 9347a99..9c3e8a3 100644
--- a/node_modules/react-native-material-textfield/src/components/outline/index.js
+++ b/node_modules/react-native-material-textfield/src/components/outline/index.js
@@ -11,29 +11,29 @@ export default class Line extends PureComponent {
restricted: false,
};
- static propTypes = {
- lineType: PropTypes.oneOf(['solid', 'none']),
+ // static propTypes = {
+ // lineType: PropTypes.oneOf(['solid', 'none']),
- disabled: PropTypes.bool,
- restricted: PropTypes.bool,
+ // disabled: PropTypes.bool,
+ // restricted: PropTypes.bool,
- tintColor: PropTypes.string,
- baseColor: PropTypes.string,
- errorColor: PropTypes.string,
+ // tintColor: PropTypes.string,
+ // baseColor: PropTypes.string,
+ // errorColor: PropTypes.string,
- lineWidth: PropTypes.number,
- activeLineWidth: PropTypes.number,
- disabledLineWidth: PropTypes.number,
+ // lineWidth: PropTypes.number,
+ // activeLineWidth: PropTypes.number,
+ // disabledLineWidth: PropTypes.number,
- focusAnimation: PropTypes.instanceOf(Animated.Value),
- labelAnimation: PropTypes.instanceOf(Animated.Value),
- labelWidth: PropTypes.instanceOf(Animated.Value),
+ // focusAnimation: PropTypes.instanceOf(Animated.Value),
+ // labelAnimation: PropTypes.instanceOf(Animated.Value),
+ // labelWidth: PropTypes.instanceOf(Animated.Value),
- contentInset: PropTypes.shape({
- left: PropTypes.number,
- right: PropTypes.number,
- }),
- };
+ // contentInset: PropTypes.shape({
+ // left: PropTypes.number,
+ // right: PropTypes.number,
+ // }),
+ // };
borderProps() {
let {