Merge pull request #5 from Ninjas-Code-official/adnan-admin-dashboard-singlevendor

@Adnan admin dashboard singlevendor
This commit is contained in:
Sharan 2023-03-29 12:58:25 +05:00 committed by GitHub
commit 2f45f293a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
40 changed files with 17278 additions and 46402 deletions

View File

@ -0,0 +1,8 @@
NODE_PATH=./src
SKIP_PREFLIGHT_CHECK=true
REACT_APP_CLOUDINARY_UPLOAD_URL = https://api.cloudinary.com/v1_1/dimjm4ald/image/upload
REACT_APP_SERVER_URL = http://localhost:8000/
REACT_APP_WS_SERVER_URL = ws://localhost:8000/
REACT_APP_CLOUDINARY_CATEGORY = hmtkg7s5
REACT_APP_CLOUDINARY_FOOD = wdgvyas8
REACT_APP_ENV = “dev”

View File

@ -0,0 +1,10 @@
All variables should be appended by REACT_APP_
NODE_PATH=./src
SKIP_PREFLIGHT_CHECK=true
REACT_APP_CLOUDINARY_UPLOAD_URL = <Cloudinary URL>
REACT_APP_SERVER_URL = <Your SERVER URL>
REACT_APP_WS_SERVER_URL = <SERVER URL with appending "ws" for local or "wss" for remote>
REACT_APP_CLOUDINARY_CATEGORY = <Folder ID from Cloudinary>
REACT_APP_CLOUDINARY_FOOD = <Folder ID from Cloudinary>
REACT_APP_ENV = <Alias that is mentioned in package.json script>

View File

@ -0,0 +1,8 @@
NODE_PATH=./src
SKIP_PREFLIGHT_CHECK=true
REACT_APP_CLOUDINARY_UPLOAD_URL = https://api.cloudinary.com/v1_1/dimjm4ald/image/upload
REACT_APP_SERVER_URL = https://prod-enatega-single-api.herokuapp.com/
REACT_APP_WS_SERVER_URL = wss://prod-enatega-single-api.herokuapp.com/
REACT_APP_CLOUDINARY_CATEGORY = hmtkg7s5
REACT_APP_CLOUDINARY_FOOD = wdgvyas8
REACT_APP_ENV = "prod"

View File

@ -0,0 +1,8 @@
NODE_PATH=./src
SKIP_PREFLIGHT_CHECK=true
REACT_APP_CLOUDINARY_UPLOAD_URL = https://api.cloudinary.com/v1_1/dimjm4ald/image/upload
REACT_APP_SERVER_URL = https://staging-enatega-single-api.herokuapp.com/
REACT_APP_WS_SERVER_URL = wss://staging-enatega-single-api.herokuapp.com/
REACT_APP_CLOUDINARY_CATEGORY = hmtkg7s5
REACT_APP_CLOUDINARY_FOOD = wdgvyas8
REACT_APP_ENV = “staging”

View File

@ -0,0 +1,5 @@
src/assets/*
public/*
./node_modules
./patches
./history

View File

@ -0,0 +1,28 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"plugin:react/recommended",
"standard"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"space-before-function-paren": ["error", "never"],
"react/prop-types": 0
}
}

4
Admin Dashboard/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/build
/node_modules
package-lock.json
yarn.lock

View File

@ -3,11 +3,11 @@ import { Route, Switch } from 'react-router-dom'
// reactstrap components
import { Container } from 'reactstrap'
// core components
import AdminNavbar from 'components/Navbars/AdminNavbar.jsx'
import AdminFooter from 'components/Footers/AdminFooter.jsx'
import Sidebar from 'components/Sidebar/Sidebar.jsx'
import AdminNavbar from '../components/Navbars/AdminNavbar.jsx'
import AdminFooter from '../components/Footers/AdminFooter.jsx'
import Sidebar from '../components/Sidebar/Sidebar.jsx'
import routes from 'routes.js'
import routes from './../routes.js'
const Admin = props => {
var divRef = useRef(null)
@ -49,7 +49,7 @@ const Admin = props => {
routes={routes}
logo={{
innerLink: '/admin/dashboard',
imgSrc: require('assets/img/brand/logo.png'),
imgSrc: require('../assets/img/brand/logo.png'),
imgAlt: '...'
}}
/>

View File

@ -4,10 +4,10 @@ import { Route, Switch } from 'react-router-dom'
import { Container, Row } from 'reactstrap'
// core components
import AuthNavbar from 'components/Navbars/AuthNavbar.jsx'
import AuthFooter from 'components/Footers/AuthFooter.jsx'
import AuthNavbar from '../components/Navbars/AuthNavbar.jsx'
import AuthFooter from '../components/Footers/AuthFooter.jsx'
import routes from 'routes.js'
import routes from '../routes.js'
function Auth(props) {
useEffect(() => {

View File

@ -1,7 +1,7 @@
/* eslint-disable react/display-name */
import React, { useState } from 'react'
import { Container, Badge, Row, Card, Modal } from 'reactstrap'
import Header from 'components/Headers/Header.jsx'
import Header from '../components/Headers/Header.jsx'
import AddonComponent from '../components/Addon/Addon'
import { addons, deleteAddon } from '../apollo/server'
import CustomLoader from '../components/Loader/CustomLoader'

View File

@ -8,7 +8,7 @@ import CustomLoader from '../components/Loader/CustomLoader'
// reactstrap components
import { Badge, Card, Container, Row, Modal } from 'reactstrap'
// core components
import Header from 'components/Headers/Header.jsx'
import Header from '../components/Headers/Header.jsx'
import { categories, deleteCategory, getFoods } from '../apollo/server'
import DataTable from 'react-data-table-component'
import orderBy from 'lodash/orderBy'

View File

@ -3,7 +3,7 @@ import { withTranslation } from 'react-i18next'
import { Container } from 'reactstrap'
import { Query } from 'react-apollo'
import gql from 'graphql-tag'
import Header from 'components/Headers/Header.jsx'
import Header from '../components/Headers/Header.jsx'
import { getConfiguration } from '../apollo/server'
import OrderConfiguration from '../components/Configuration/Order/Order'
import EmailConfiguration from '../components/Configuration/Email/Email'

View File

@ -8,7 +8,7 @@ import CouponComponent from '../components/Coupon/Coupon'
import { Badge, Card, Container, Row, Modal } from 'reactstrap'
// core components
import Header from 'components/Headers/Header.jsx'
import Header from '../components/Headers/Header.jsx'
import CustomLoader from '../components/Loader/CustomLoader'
import DataTable from 'react-data-table-component'
import orderBy from 'lodash/orderBy'

View File

@ -16,7 +16,7 @@ import {
Col
} from 'reactstrap'
import Header from 'components/Headers/Header.jsx'
import Header from '../components/Headers/Header.jsx'
import { Query } from 'react-apollo'
import {
getDashboardTotal,

View File

@ -6,7 +6,7 @@ import { withTranslation } from 'react-i18next'
// reactstrap components
import { Badge, Card, Container, Row, Media, Modal } from 'reactstrap'
// core components
import Header from 'components/Headers/Header.jsx'
import Header from '../components/Headers/Header.jsx'
import { getFoods, deleteFood } from '../apollo/server'
import FoodComponent from '../components/Food/Food'
import CustomLoader from '../components/Loader/CustomLoader'

View File

@ -2,7 +2,7 @@ import React, { useState } from 'react'
import gql from 'graphql-tag'
import { Mutation } from 'react-apollo'
import { withTranslation } from 'react-i18next'
import Header from 'components/Headers/Header.jsx'
import Header from '../components/Headers/Header.jsx'
import { sendNotificationUser } from '../apollo/server'
import CustomLoader from '../components/Loader/CustomLoader'
import { validateFunc } from '../constraints/constraints'

View File

@ -1,7 +1,7 @@
/* eslint-disable react/display-name */
import React, { useState } from 'react'
import { Badge, Container, Row, Card, Modal } from 'reactstrap'
import Header from 'components/Headers/Header.jsx'
import Header from '../components/Headers/Header.jsx'
import OptionComponent from '../components/Option/Option'
import CustomLoader from '../components/Loader/CustomLoader'
import DataTable from 'react-data-table-component'

View File

@ -3,7 +3,7 @@ import { withTranslation } from 'react-i18next'
import { Container, Row, Card, Modal } from 'reactstrap'
import OrderComponent from '../components/Order/Order'
import OrdersData from '../components/Order/OrderData'
import Header from 'components/Headers/Header.jsx'
import Header from '../components/Headers/Header.jsx'
import { Query, compose, withApollo } from 'react-apollo'
import gql from 'graphql-tag'
import { getOrders } from '../apollo/server'

View File

@ -2,7 +2,7 @@
import React from 'react'
import { withTranslation } from 'react-i18next'
import { Container, Row, Card } from 'reactstrap'
import Header from 'components/Headers/Header.jsx'
import Header from '../components/Headers/Header.jsx'
import CustomLoader from '../components/Loader/CustomLoader'
import { Query, compose, withApollo } from 'react-apollo'
import gql from 'graphql-tag'

1
Customer App/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/node_modules

View File

@ -47,6 +47,7 @@ export default function App() {
setupClient(client)
await i18n.initAsync()
// load fonts
await Font.loadAsync({
Poppin300: require('./src/assets/font/Poppin/Poppins-Light.ttf'),
Poppin400: require('./src/assets/font/Poppin/Poppins-Regular.ttf'),

View File

@ -47,7 +47,7 @@
"versionCode": 22,
"package": "com.enatega.vendor",
"googleServicesFile": "./google-services-prod.json",
"useNextNotificationsApi": true,
"config": {
"googleMaps": {
"apiKey": ""

View File

@ -3,54 +3,48 @@
* path: '/environment.js' (root of your project)
******************************/
import Constants from 'expo-constants'
import Constants from "expo-constants";
const ENV = {
development: {
GRAPHQL_URL: 'http://192.168.100.90:8000/graphql',
WS_GRAPHQL_URL: 'ws://192.168.100.90:8000/graphql',
SERVER_URL: 'http://192.168.100.90:8000/', // put / at the end of server url
IOS_CLIENT_ID_GOOGLE:
'',
ANDROID_CLIENT_ID_GOOGLE:
'',
FACEBOOK_APP_ID: '404956210315749',
AMPLITUDE_API_KEY: '',
STRIPE_PUBLIC_KEY: '',
STRIPE_IMAGE_URL: 'http://192.168.100.90:8000/assets/images/logo.png',
STRIPE_STORE_NAME: 'Enatega'
GRAPHQL_URL: "http://10.97.28.88.90:8000/graphql",
WS_GRAPHQL_URL: "ws://10.97.28.88.90:8000/graphql",
SERVER_URL: "http://10.97.28.88.90:8000/", // put / at the end of server url
IOS_CLIENT_ID_GOOGLE: "",
ANDROID_CLIENT_ID_GOOGLE: "",
FACEBOOK_APP_ID: "404956210315749",
AMPLITUDE_API_KEY: "",
STRIPE_PUBLIC_KEY: "",
STRIPE_IMAGE_URL: "http://10.97.28.88.90:8000/assets/images/logo.png",
STRIPE_STORE_NAME: "Enatega",
},
staging: {
GRAPHQL_URL: 'https://staging-enatega-single-api.herokuapp.com/graphql',
WS_GRAPHQL_URL: 'wss://staging-enatega-single-api.herokuapp.com/graphql',
SERVER_URL: 'https://staging-enatega-single-api.herokuapp.com/', // put / at the end of server url
IOS_CLIENT_ID_GOOGLE:
'',
ANDROID_CLIENT_ID_GOOGLE:
'',
FACEBOOK_APP_ID: '404956210315749',
AMPLITUDE_API_KEY: '',
STRIPE_PUBLIC_KEY: '',
GRAPHQL_URL: "https://staging-enatega-single-api.herokuapp.com/graphql",
WS_GRAPHQL_URL: "wss://staging-enatega-single-api.herokuapp.com/graphql",
SERVER_URL: "https://staging-enatega-single-api.herokuapp.com/", // put / at the end of server url
IOS_CLIENT_ID_GOOGLE: "",
ANDROID_CLIENT_ID_GOOGLE: "",
FACEBOOK_APP_ID: "404956210315749",
AMPLITUDE_API_KEY: "",
STRIPE_PUBLIC_KEY: "",
STRIPE_IMAGE_URL:
'https://staging-enatega-single-api.herokuapp.com/assets/images/logo.png',
STRIPE_STORE_NAME: 'Enatega'
"https://staging-enatega-single-api.herokuapp.com/assets/images/logo.png",
STRIPE_STORE_NAME: "Enatega",
},
production: {
GRAPHQL_URL: 'https://prod-enatega-single-api.herokuapp.com/graphql',
WS_GRAPHQL_URL: 'wss://prod-enatega-single-api.herokuapp.com/graphql',
SERVER_URL: 'https://prod-enatega-single-api.herokuapp.com/', // put / at the end of server url
IOS_CLIENT_ID_GOOGLE:
'',
ANDROID_CLIENT_ID_GOOGLE:
'',
FACEBOOK_APP_ID: '3017447961609878',
AMPLITUDE_API_KEY: '',
STRIPE_PUBLIC_KEY: '',
GRAPHQL_URL: "https://prod-enatega-single-api.herokuapp.com/graphql",
WS_GRAPHQL_URL: "wss://prod-enatega-single-api.herokuapp.com/graphql",
SERVER_URL: "https://prod-enatega-single-api.herokuapp.com/", // put / at the end of server url
IOS_CLIENT_ID_GOOGLE: "",
ANDROID_CLIENT_ID_GOOGLE: "",
FACEBOOK_APP_ID: "3017447961609878",
AMPLITUDE_API_KEY: "",
STRIPE_PUBLIC_KEY: "",
STRIPE_IMAGE_URL:
'https://prod-enatega-single-api.herokuapp.com/assets/images/logo.png',
STRIPE_STORE_NAME: 'Enatega'
}
}
"https://prod-enatega-single-api.herokuapp.com/assets/images/logo.png",
STRIPE_STORE_NAME: "Enatega",
},
};
const getEnvVars = (env = Constants.manifest.releaseChannel) => {
// What is __DEV__ ?
@ -58,14 +52,14 @@ const getEnvVars = (env = Constants.manifest.releaseChannel) => {
// __DEV__ is true when run locally, but false when published.
// eslint-disable-next-line no-undef
if (__DEV__) {
return ENV.development
} else if (env === 'production') {
return ENV.production
} else if (env === 'staging') {
return ENV.staging
return ENV.development;
} else if (env === "production") {
return ENV.production;
} else if (env === "staging") {
return ENV.staging;
} else {
return ENV.production
return ENV.production;
}
}
};
export default getEnvVars
export default getEnvVars;

File diff suppressed because it is too large Load Diff

View File

@ -25,14 +25,15 @@
},
"dependencies": {
"@apollo/react-hooks": "^3.1.3",
"@expo/vector-icons": "^12.0.0",
"@expo/vector-icons": "^13.0.0",
"@ptomasroos/react-native-multi-slider": "^2.2.2",
"@react-native-async-storage/async-storage": "~1.15.0",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/drawer": "^5.12.5",
"@react-navigation/native": "^5.9.4",
"@react-navigation/stack": "^5.14.5",
"apollo-boost": "^0.3.1",
"@react-native-async-storage/async-storage": "~1.17.3",
"@react-native-community/masked-view": "0.1.11",
"@react-navigation/drawer": "^6.6.0",
"@react-navigation/native": "^6.1.4",
"@react-navigation/native-stack": "^6.9.10",
"@react-navigation/stack": "^6.3.14",
"apollo-boost": "^0.4.9",
"apollo-cache-inmemory": "^1.5.1",
"apollo-cache-persist": "^0.1.1",
"apollo-client": "^2.5.1",
@ -41,72 +42,79 @@
"apollo-link-state": "^0.4.2",
"apollo-link-ws": "^1.0.20",
"apollo-upload-client": "^10.0.0",
"expo": "^44.0.0",
"expo-analytics-amplitude": "~11.1.0",
"apollo-utilities": "^1.3.4",
"deprecated-react-native-prop-types": "^4.0.0",
"expo": "^47.0.0",
"expo-analytics-amplitude": "~11.3.0",
"expo-app-auth": "~11.1.0",
"expo-app-loading": "~1.3.0",
"expo-apple-authentication": "~4.1.0",
"expo-application": "~4.0.1",
"expo-asset": "~8.4.6",
"expo-constants": "~13.0.1",
"expo-device": "~4.1.0",
"expo-facebook": "~12.1.0",
"expo-font": "~10.0.4",
"expo-google-app-auth": "~8.3.0",
"expo-image-picker": "~12.0.1",
"expo-linking": "~3.0.0",
"expo-localization": "~12.0.0",
"expo-location": "~14.0.1",
"expo-notifications": "~0.14.0",
"expo-splash-screen": "~0.14.1",
"expo-tracking-transparency": "~2.1.0",
"expo-updates": "~0.11.6",
"graphql": "^14.5.8",
"expo-app-loading": "~2.1.1",
"expo-apple-authentication": "~5.0.1",
"expo-application": "~5.0.1",
"expo-asset": "~8.7.0",
"expo-camera": "~13.1.0",
"expo-constants": "~14.0.2",
"expo-contacts": "~11.0.1",
"expo-device": "~5.0.0",
"expo-facebook": "~12.2.0",
"expo-font": "~11.0.1",
"expo-google-app-auth": "^8.3.0",
"expo-image-picker": "~14.0.2",
"expo-linking": "~3.3.1",
"expo-localization": "~14.0.0",
"expo-location": "~15.0.1",
"expo-notifications": "~0.17.0",
"expo-sensors": "~12.0.1",
"expo-splash-screen": "~0.17.5",
"expo-tracking-transparency": "~3.0.1",
"expo-updates": "~0.15.6",
"graphql": "^16.6.0",
"graphql-tag": "^2.10.1",
"i18n-js": "^3.2.2",
"lodash": "^4.17.21",
"patch-package": "^6.2.2",
"react": "17.0.1",
"react-apollo": "^2.5.8",
"react-native": "0.64.3",
"react-native-flash-message": "^0.1.23",
"patch-package": "^6.5.1",
"react": "18.1.0",
"react-apollo": "^3.1.5",
"react-native": "0.70.5",
"react-native-button": "^3.0.1",
"react-native-flash-message": "^0.4.0",
"react-native-flatlist-slider": "^1.0.5",
"react-native-gesture-handler": "~2.1.0",
"react-native-gifted-chat": "^0.16.3",
"react-native-maps": "0.29.4",
"react-native-gesture-handler": "~2.8.0",
"react-native-gifted-chat": "^1.1.1",
"react-native-i18n": "1.0.0",
"react-native-maps": "1.3.2",
"react-native-material-textfield": "^0.16.1",
"react-native-modal": "^11.10.0",
"react-native-modal": "^13.0.1",
"react-native-modalize": "^2.0.8",
"react-native-reanimated": "~2.3.1",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-reanimated": "~2.12.0",
"react-native-safe-area-context": "4.4.1",
"react-native-screens": "~3.18.0",
"react-native-star-rating": "^1.1.0",
"react-native-svg": "12.1.1",
"react-native-timeline-flatlist": "^0.7.2",
"react-native-webview": "11.15.0",
"subscriptions-transport-ws": "^0.9.16",
"react-native-svg": "13.4.0",
"react-native-timeline-flatlist": "^0.8.0",
"react-native-webview": "11.23.1",
"subscriptions-transport-ws": "^0.11.0",
"uuid": "^3.3.2",
"validate.js": "^0.12.0"
"validate.js": "^0.13.1"
},
"devDependencies": {
"babel-jest": "^24.8.0",
"babel-preset-expo": "9.0.2",
"babel-jest": "^29.4.3",
"babel-preset-expo": "~9.2.1",
"babel-preset-react-native": "^4.0.1",
"eslint": "^7.28.0",
"eslint-config-standard": "^14.1.1",
"eslint": "^8.34.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-standard": "^4.0.1",
"husky": "^4.3.8",
"jest": "^26.6.3",
"eslint-plugin-standard": "^5.0.0",
"husky": "^8.0.3",
"jest": "^29.4.3",
"jest-react-native": "^18.0.0",
"lint-staged": "^10.5.4",
"metro-react-native-babel-preset": "^0.54.1",
"lint-staged": "^13.1.2",
"metro-react-native-babel-preset": "^0.75.0",
"prettier": "^2.3.1",
"prettier-config-standard": "^1.0.1",
"react-test-renderer": "^16.8.6"
"prettier-config-standard": "^5.0.0",
"react-test-renderer": "^18.2.0"
},
"jest": {
"preset": "react-native",

View File

@ -0,0 +1,38 @@
diff --git a/node_modules/react-native-button/Button.js b/node_modules/react-native-button/Button.js
index b248176..3c6aefa 100644
--- a/node_modules/react-native-button/Button.js
+++ b/node_modules/react-native-button/Button.js
@@ -1,4 +1,5 @@
import PropTypes from 'prop-types';
+import {TextPropTypes,ViewPropTypes} from 'deprecated-react-native-prop-types'
import React, { Component } from 'react';
import {
Platform,
@@ -7,7 +8,7 @@ import {
TouchableOpacity,
TouchableNativeFeedback,
View,
- ViewPropTypes
+ //ViewPropTypes
} from 'react-native';
import coalesceNonElementChildren from './coalesceNonElementChildren';
@@ -18,12 +19,15 @@ export default class Button extends Component {
static propTypes = {
...TouchableOpacity.propTypes,
accessibilityLabel: PropTypes.string,
- allowFontScaling: Text.propTypes.allowFontScaling,
+ // allowFontScaling: Text.propTypes.allowFontScaling,
+ allowFontScaling: TextPropTypes.allowFontScaling,
containerStyle: ViewPropTypes.style,
disabledContainerStyle: ViewPropTypes.style,
disabled: PropTypes.bool,
- style: Text.propTypes.style,
- styleDisabled: Text.propTypes.style,
+ style: TextPropTypes.style,
+ styleDisabled: TextPropTypes.style,
+ // style: Text.propTypes.style,
+ // styleDisabled: Text.propTypes.style,
childGroupStyle: ViewPropTypes.style,
androidBackground: PropTypes.object,
};

View File

@ -1,21 +1,197 @@
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
+++ 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 = {
numberOfLines: PropTypes.number,
- static propTypes = {
- numberOfLines: PropTypes.number,
- style: Animated.Text.propTypes.style,
+ style: PropTypes.object,
+ // static propTypes = {
+ // numberOfLines: PropTypes.number,
+ // style: PropTypes.object,
color: PropTypes.string.isRequired,
fontSize: PropTypes.number.isRequired,
- color: PropTypes.string.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..089b871 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: PropTypes.object,
+ // };
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
index 494bbaa..9bbf2e2 100644
index 494bbaa..2a71c82 100644
--- a/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,5 +1,6 @@
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
+import {ViewPropTypes} from 'deprecated-react-native-prop-types';
import {
View,
Text,
@@ -7,7 +8,7 @@ import {
Animated,
StyleSheet,
Platform,
- ViewPropTypes,
+ //ViewPropTypes,
} from 'react-native';
import Line from '../line';
@@ -65,60 +66,60 @@ export default class TextField extends PureComponent {
disabled: false,
};
- static propTypes = {
- ...TextInput.propTypes,
+ // static propTypes = {
+ // ...TextInput.propTypes,
- animationDuration: PropTypes.number,
+ // animationDuration: PropTypes.number,
- fontSize: PropTypes.number,
- labelFontSize: PropTypes.number,
+ // fontSize: PropTypes.number,
+ // labelFontSize: PropTypes.number,
- contentInset: PropTypes.shape({
- top: PropTypes.number,
- label: PropTypes.number,
- input: PropTypes.number,
- left: PropTypes.number,
- right: PropTypes.number,
- }),
+ // contentInset: PropTypes.shape({
+ // top: PropTypes.number,
+ // label: PropTypes.number,
+ // input: PropTypes.number,
+ // left: PropTypes.number,
+ // right: PropTypes.number,
+ // }),
- labelOffset: Label.propTypes.offset,
+ // labelOffset: Label.propTypes.offset,
- labelTextStyle: Text.propTypes.style,
- titleTextStyle: Text.propTypes.style,
- affixTextStyle: Text.propTypes.style,
+ // labelTextStyle: PropTypes.object.style,
+ // // titleTextStyle: PropTypes.object.style,
+ // // affixTextStyle: PropTypes.object.style,
- tintColor: PropTypes.string,
- textColor: PropTypes.string,
- baseColor: PropTypes.string,
+ // tintColor: PropTypes.string,
+ // textColor: PropTypes.string,
+ // baseColor: PropTypes.string,
- label: PropTypes.string,
- title: PropTypes.string,
+ // label: PropTypes.string,
+ // title: PropTypes.string,
- characterRestriction: PropTypes.number,
+ // characterRestriction: PropTypes.number,
- error: PropTypes.string,
- errorColor: PropTypes.string,
+ // error: PropTypes.string,
+ // errorColor: PropTypes.string,
- lineWidth: PropTypes.number,
- activeLineWidth: PropTypes.number,
- disabledLineWidth: PropTypes.number,
+ // lineWidth: PropTypes.number,
+ // activeLineWidth: PropTypes.number,
+ // disabledLineWidth: PropTypes.number,
- lineType: Line.propTypes.lineType,
- disabledLineType: Line.propTypes.lineType,
+ // lineType: Line.propTypes.lineType,
+ // disabledLineType: Line.propTypes.lineType,
- disabled: PropTypes.bool,
+ // disabled: PropTypes.bool,
- formatText: PropTypes.func,
+ // formatText: PropTypes.func,
- renderLeftAccessory: PropTypes.func,
- renderRightAccessory: PropTypes.func,
+ // renderLeftAccessory: PropTypes.func,
+ // renderRightAccessory: PropTypes.func,
- prefix: PropTypes.string,
- suffix: PropTypes.string,
+ // prefix: PropTypes.string,
+ // suffix: PropTypes.string,
- containerStyle: (ViewPropTypes || View.propTypes).style,
- inputContainerStyle: (ViewPropTypes || View.propTypes).style,
- };
+ // containerStyle: (ViewPropTypes || View.propTypes).style,
+ // inputContainerStyle: (ViewPropTypes || View.propTypes).style,
+ // };
static inputContainerStyle = styles.inputContainer;
@@ -221,6 +222,7 @@ export default class TextField extends PureComponent {
let options = {
toValue: this.focusState(),
@ -24,28 +200,206 @@ 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
index 6060f9f..fe9d9c4 100644
index 6060f9f..86ac2c0 100644
--- a/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 {
@@ -1,23 +1,24 @@
import PropTypes from 'prop-types';
+
import React, { PureComponent } from 'react';
import { Animated } from 'react-native';
disabled: PropTypes.bool,
import styles from './styles';
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: PropTypes.object,
+ // style: PropTypes.object,
baseColor: PropTypes.string,
errorColor: PropTypes.string,
- baseColor: 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
index 82eaf03..809fcdd 100644
index 82eaf03..1ad9a93 100644
--- a/node_modules/react-native-material-textfield/src/components/label/index.js
+++ b/node_modules/react-native-material-textfield/src/components/label/index.js
@@ -43,7 +43,7 @@ export default class Label extends PureComponent {
y1: PropTypes.number,
}),
- style: Animated.Text.propTypes.style,
+ style: PropTypes.object,
label: PropTypes.string,
@@ -11,41 +11,41 @@ export default class Label extends PureComponent {
restricted: false,
};
- static propTypes = {
- numberOfLines: PropTypes.number,
+ // static propTypes = {
+ // numberOfLines: PropTypes.number,
- disabled: PropTypes.bool,
- restricted: PropTypes.bool,
+ // disabled: PropTypes.bool,
+ // restricted: PropTypes.bool,
- fontSize: PropTypes.number.isRequired,
- activeFontSize: PropTypes.number.isRequired,
+ // fontSize: PropTypes.number.isRequired,
+ // activeFontSize: PropTypes.number.isRequired,
- baseColor: PropTypes.string.isRequired,
- tintColor: PropTypes.string.isRequired,
- errorColor: PropTypes.string.isRequired,
+ // baseColor: PropTypes.string.isRequired,
+ // tintColor: PropTypes.string.isRequired,
+ // errorColor: PropTypes.string.isRequired,
- focusAnimation: PropTypes
- .instanceOf(Animated.Value)
- .isRequired,
+ // focusAnimation: PropTypes
+ // .instanceOf(Animated.Value)
+ // .isRequired,
- labelAnimation: PropTypes
- .instanceOf(Animated.Value)
- .isRequired,
+ // labelAnimation: PropTypes
+ // .instanceOf(Animated.Value)
+ // .isRequired,
- contentInset: PropTypes.shape({
- label: PropTypes.number,
- }),
+ // contentInset: PropTypes.shape({
+ // label: PropTypes.number,
+ // }),
- offset: PropTypes.shape({
- x0: PropTypes.number,
- y0: PropTypes.number,
- x1: PropTypes.number,
- y1: PropTypes.number,
- }),
+ // offset: PropTypes.shape({
+ // x0: PropTypes.number,
+ // y0: PropTypes.number,
+ // x1: PropTypes.number,
+ // y1: PropTypes.number,
+ // }),
- style: Animated.Text.propTypes.style,
- label: PropTypes.string,
- };
+ // style: PropTypes.object,
+ // label: PropTypes.string,
+ // };
render() {
let {
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..b689387 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
@@ -16,23 +16,23 @@ export default class Line extends PureComponent {
restricted: false,
};
- static propTypes = {
- lineType: lineTypes,
- disabledLineType: lineTypes,
+ // static propTypes = {
+ // lineType: lineTypes,
+ // disabledLineType: lineTypes,
- 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),
- };
+ // focusAnimation: PropTypes.instanceOf(Animated.Value),
+ // };
static getDerivedStateFromProps(props, state) {
let { lineWidth, activeLineWidth, disabledLineWidth } = props;
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 {

View File

@ -0,0 +1,26 @@
diff --git a/node_modules/react-native-star-rating/StarButton.js b/node_modules/react-native-star-rating/StarButton.js
index b6db613..8a62f5a 100644
--- a/node_modules/react-native-star-rating/StarButton.js
+++ b/node_modules/react-native-star-rating/StarButton.js
@@ -1,6 +1,7 @@
// React and react native imports
import React, { Component } from 'react';
-import { Image, StyleSheet, ViewPropTypes } from 'react-native';
+import { Image, StyleSheet } from 'react-native';
+import {ViewPropTypes} from 'deprecated-react-native-prop-types';
import PropTypes from 'prop-types';
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';
diff --git a/node_modules/react-native-star-rating/StarRating.js b/node_modules/react-native-star-rating/StarRating.js
index 7aecc95..de6397c 100644
--- a/node_modules/react-native-star-rating/StarRating.js
+++ b/node_modules/react-native-star-rating/StarRating.js
@@ -1,6 +1,7 @@
// React and react native imports
import React, { Component } from 'react';
-import { View, ViewPropTypes, StyleSheet } from 'react-native';
+import { View, StyleSheet } from 'react-native';
+import {ViewPropTypes} from 'deprecated-react-native-prop-types';
import PropTypes from 'prop-types';
import { View as AnimatableView } from 'react-native-animatable';

View File

@ -1,25 +1,25 @@
import { useTheme } from '@react-navigation/native'
import { useHeaderHeight } from '@react-navigation/stack'
import { StyleSheet } from 'react-native'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import { scale } from '../../utils/scaling'
import { useTheme } from "@react-navigation/native";
import { useHeaderHeight } from "@react-navigation/elements";
import { StyleSheet } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { scale } from "../../utils/scaling";
const useStyle = () => {
const { colors } = useTheme()
const inset = useSafeAreaInsets()
const headerHeight = useHeaderHeight()
const { colors } = useTheme();
const inset = useSafeAreaInsets();
const headerHeight = useHeaderHeight();
return StyleSheet.create({
flex: {
flex: 1
flex: 1,
},
wrapperView: {
backgroundColor: colors.background,
paddingTop: headerHeight,
paddingBottom: inset.bottom
paddingBottom: inset.bottom,
},
topCurve: {
position: 'absolute',
position: "absolute",
opacity: 0.2,
left: -75,
borderTopRightRadius: scale(90),
@ -28,10 +28,10 @@ const useStyle = () => {
width: scale(250),
height: scale(260),
borderRadius: 100,
backgroundColor: colors.curve
backgroundColor: colors.curve,
},
bottomCurve: {
position: 'absolute',
position: "absolute",
height: scale(185),
width: scale(170),
borderTopRightRadius: scale(110),
@ -42,9 +42,9 @@ const useStyle = () => {
backgroundColor: colors.curve,
opacity: 0.2,
bottom: -80,
zIndex: -1
}
})
}
zIndex: -1,
},
});
};
export default useStyle
export default useStyle;

View File

@ -1,100 +1,141 @@
/* eslint-disable react/prop-types */
import { createDrawerNavigator } from '@react-navigation/drawer'
import { NavigationContainer, useTheme } from '@react-navigation/native'
import { createStackNavigator } from '@react-navigation/stack'
import * as Notifications from 'expo-notifications'
import React, { useEffect } from 'react'
import { useColorScheme } from 'react-native'
import Animated from 'react-native-reanimated'
import { createDrawerNavigator } from "@react-navigation/drawer";
import { NavigationContainer, useTheme } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import * as Notifications from "expo-notifications";
import React, { useEffect } from "react";
import { Text, useColorScheme, View } from "react-native";
import Animated from "react-native-reanimated";
import {
initialWindowMetrics,
SafeAreaProvider
} from 'react-native-safe-area-context'
import { TextDefault, LeftButton, Sidebar } from '../components'
import {
Addresses,
Cart,
CartAddress,
Chat,
CreateAccount,
EditAddress,
ForgotPassword,
FullMap,
Help,
HelpBrowser,
ItemDetail,
Login,
Menu,
MenuItems,
MyOrders,
NewAddress,
OrderDetail,
Paypal,
Profile,
RateAndReview,
Register,
SelectVoucher,
Settings,
StripeCheckout
} from '../screens'
import { THEME } from '../Theme'
import { ICONS_NAME, NAVIGATION_SCREEN } from '../utils/constant'
import navigationService from './navigationService'
import screenOptions from './screenOptions'
import styles from './styles'
SafeAreaProvider,
} from "react-native-safe-area-context";
import { TextDefault, LeftButton, Sidebar } from "../components";
import Menu from "../screens/Menu/Menu";
import MenuItems from "../screens/MenuItems/MenuItems";
import Addresses from "../screens/Addresses/Addresses";
import NewAddress from "../screens/NewAddress/NewAddress";
import EditAddress from "../screens/EditAddress/EditAddress";
import Cart from "../screens/Cart/Cart";
import Profile from "../screens/Profile/Profile";
import FullMap from "../screens/FullMap/FullMap";
import CartAddress from "../screens/CartAddress/CartAddress";
import SelectVoucher from "../screens/Coupon/Coupon";
import Help from "../screens/Help/Help";
import HelpBrowser from "../screens/HelpBrowser/HelpBrowser";
import Chat from "../screens/Chat/Chat";
import Settings from "../screens/Settings/Settings";
import Paypal from "../screens/Paypal/Paypal";
import ItemDetail from "../screens/ItemDetail/ItemDetail";
import MyOrders from "../screens/MyOrders/MyOrders";
import OrderDetail from "../screens/OrderDetail/OrderDetail";
import StripeCheckout from "../screens/Stripe/StripeCheckout";
import RateAndReview from "../screens/RateAndReview/RateAndReview";
import CreateAccount from "../screens/CreateAccount/CreateAccount";
import Login from "../screens/Login/Login";
import Register from "../screens/Register/Register";
import ForgotPassword from "../screens/ForgotPassword/ForgotPassword";
const NavigationStack = createStackNavigator()
const MainStack = createStackNavigator()
const SideDrawer = createDrawerNavigator()
// import {
// Addresses,
// Cart,
// CartAddress,
// Chat,
// CreateAccount,
// EditAddress,
// ForgotPassword,
// FullMap,
// Help,
// HelpBrowser,
// ItemDetail,
// Login,
// MenuItems,
// MyOrders,
// NewAddress,
// OrderDetail,
// Paypal,
// Profile,
// RateAndReview,
// Register,
// SelectVoucher,
// Settings,
// StripeCheckout,
// Menu,
// } from "../screens";
import { THEME } from "../Theme";
import { ICONS_NAME, NAVIGATION_SCREEN } from "../utils/constant";
import navigationService from "./navigationService";
import screenOptions from "./screenOptions";
import styles from "./styles";
const NavigationStack = createStackNavigator();
const MainStack = createStackNavigator();
const SideDrawer = createDrawerNavigator();
function Drawer() {
const { colors } = useTheme()
let animatedStyle = {}
let opacity
let OuterWindowSlide, InnerWindowSlide
const { colors } = useTheme();
let animatedStyle = {};
let opacity;
let OuterWindowSlide, InnerWindowSlide;
return (
<SideDrawer.Navigator
drawerType="slide"
overlayColor="transparent"
drawerStyle={{
flex: 1,
backgroundColor: colors.drawerBackground,
width: '60%',
justifyContent: 'space-between',
borderRightWidth: 0,
shadowOpacity: 0,
elevation: 0
screenOptions={{
drawerStyle: {
flex: 1,
backgroundColor: colors.drawerBackground,
width: "60%",
justifyContent: "space-between",
borderRightWidth: 0,
shadowOpacity: 0,
elevation: 0,
},
sceneContainerStyle: { backgroundColor: colors.drawerBackground },
}}
sceneContainerStyle={{ backgroundColor: colors.drawerBackground }}
drawerContent={props => {
// drawerStyle={{
// flex: 1,
// backgroundColor: colors.drawerBackground,
// width: "60%",
// justifyContent: "space-between",
// borderRightWidth: 0,
// shadowOpacity: 0,
// elevation: 0,
// }}
// sceneContainerStyle={{ backgroundColor: colors.drawerBackground }}
drawerContent={(props) => {
const scale = Animated.interpolateNode(props.progress, {
inputRange: [0, 1],
outputRange: [1, 0.7]
})
outputRange: [1, 0.7],
});
const Animatedopacity = Animated.interpolateNode(props.progress, {
inputRange: [0, 0.6, 1],
outputRange: [0, 0, 1]
})
outputRange: [0, 0, 1],
});
const AnimatedOuterSlide = Animated.interpolateNode(props.progress, {
inputRange: [0, 1],
outputRange: [0, -35]
})
outputRange: [0, -35],
});
const AnimatedInnerSlide = Animated.interpolateNode(props.progress, {
inputRange: [0, 1],
outputRange: [0, -15]
})
outputRange: [0, -15],
});
const borderRadius = Animated.interpolateNode(props.progress, {
inputRange: [0, 1],
outputRange: [0, 20]
})
animatedStyle = { borderRadius, transform: [{ scale }] }
opacity = Animatedopacity
OuterWindowSlide = AnimatedOuterSlide
InnerWindowSlide = AnimatedInnerSlide
return <Sidebar {...props} />
}}>
<SideDrawer.Screen name="noDrawer">
{props => (
outputRange: [0, 20],
});
animatedStyle = { borderRadius, transform: [{ scale }] };
opacity = Animatedopacity;
OuterWindowSlide = AnimatedOuterSlide;
InnerWindowSlide = AnimatedInnerSlide;
return <Sidebar {...props} />;
}}
>
<SideDrawer.Screen name="noDrawer" options={{ headerShown: false }}>
{(props) => (
<NoDrawer
{...props}
style={animatedStyle}
@ -105,10 +146,11 @@ function Drawer() {
)}
</SideDrawer.Screen>
</SideDrawer.Navigator>
)
);
}
function NoDrawer({ style, opacity = 1, OuterWindowSlide, InnerWindowSlide }) {
const { colors } = useTheme()
const { colors } = useTheme();
return (
<React.Fragment>
@ -120,15 +162,17 @@ function NoDrawer({ style, opacity = 1, OuterWindowSlide, InnerWindowSlide }) {
/>
<Animated.View style={[styles.animatedView, style]}>
<NavigationStack.Navigator
mode="modal"
//mode="modal"
presentation="modal"
screenOptions={screenOptions({
textColor: colors.headerTextColor
})}>
textColor: colors.headerTextColor,
})}
>
<NavigationStack.Screen
name={NAVIGATION_SCREEN.Menu}
component={Menu}
options={{
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />,
}}
/>
<NavigationStack.Screen
@ -143,14 +187,14 @@ function NoDrawer({ style, opacity = 1, OuterWindowSlide, InnerWindowSlide }) {
name={NAVIGATION_SCREEN.Profile}
component={Profile}
options={{
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />,
}}
/>
<NavigationStack.Screen
name={NAVIGATION_SCREEN.Addresses}
component={Addresses}
options={{
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />,
}}
/>
<NavigationStack.Screen
@ -177,14 +221,14 @@ function NoDrawer({ style, opacity = 1, OuterWindowSlide, InnerWindowSlide }) {
name={NAVIGATION_SCREEN.Help}
component={Help}
options={{
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />,
}}
/>
<NavigationStack.Screen
name={NAVIGATION_SCREEN.Chat}
component={Chat}
options={{
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />,
}}
/>
<NavigationStack.Screen
@ -195,7 +239,7 @@ function NoDrawer({ style, opacity = 1, OuterWindowSlide, InnerWindowSlide }) {
name={NAVIGATION_SCREEN.Settings}
component={Settings}
options={{
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />,
}}
/>
<NavigationStack.Screen
@ -210,7 +254,7 @@ function NoDrawer({ style, opacity = 1, OuterWindowSlide, InnerWindowSlide }) {
name={NAVIGATION_SCREEN.MyOrders}
component={MyOrders}
options={{
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />
headerLeft: () => <LeftButton icon={ICONS_NAME.Menu} />,
}}
/>
<NavigationStack.Screen
@ -249,51 +293,60 @@ function NoDrawer({ style, opacity = 1, OuterWindowSlide, InnerWindowSlide }) {
</Animated.View>
<Animated.View style={[styles.closeView, { opacity: opacity }]}>
<TextDefault H4 medium>
{'Close X'}
{"Close X"}
</TextDefault>
</Animated.View>
</React.Fragment>
)
);
}
function AppContainer() {
const colorScheme = useColorScheme()
console.log("AppContainer Working");
const colorScheme = useColorScheme();
function _handleNotification(notification) {
try {
if (notification.origin === 'selected') {
if (notification.origin === "selected") {
if (notification.data.order) {
navigationService.navigate(NAVIGATION_SCREEN.OrderDetail, {
_id: notification.data._id
})
_id: notification.data._id,
});
}
}
} catch (e) {
console.log(e)
console.log(e);
}
}
useEffect(() => {
Notifications.setNotificationHandler({
handleNotification: async() => ({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: false,
shouldSetBadge: false
})
})
shouldSetBadge: false,
}),
});
const subscription =
Notifications.addNotificationResponseReceivedListener(_handleNotification)
return () => subscription.remove()
}, [])
Notifications.addNotificationResponseReceivedListener(
_handleNotification
);
return () => subscription.remove();
}, []);
return (
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
<NavigationContainer
theme={colorScheme === 'dark' ? THEME.Dark : THEME.Light}
ref={ref => {
navigationService.setGlobalRef(ref)
Notifications.addNotificationReceivedListener(_handleNotification)
}}>
theme={colorScheme === "dark" ? THEME.Dark : THEME.Light}
ref={(ref) => {
navigationService.setGlobalRef(ref);
Notifications.addNotificationReceivedListener(_handleNotification);
}}
>
<MainStack.Navigator
headerMode="none"
initialRouteName={NAVIGATION_SCREEN.Drawer}>
screenOptions={{
headerShown: false,
}}
//headerMode="none"
initialRouteName={NAVIGATION_SCREEN.Drawer}
>
<MainStack.Screen
name={NAVIGATION_SCREEN.Drawer}
component={Drawer}
@ -301,7 +354,7 @@ function AppContainer() {
</MainStack.Navigator>
</NavigationContainer>
</SafeAreaProvider>
)
);
}
export default AppContainer
export default AppContainer;

View File

@ -1,19 +1,20 @@
import { useQuery } from '@apollo/react-hooks'
import { useNavigation, useRoute } from '@react-navigation/native'
import { useHeaderHeight } from '@react-navigation/stack'
import gql from 'graphql-tag'
import { get } from 'lodash'
import React, { useContext, useLayoutEffect, useRef, useState } from 'react'
import { useQuery } from "@apollo/react-hooks";
import { useNavigation, useRoute } from "@react-navigation/native";
//import { useHeaderHeight } from '@react-navigation/stack'
import { useHeaderHeight } from "@react-navigation/elements";
import gql from "graphql-tag";
import { get } from "lodash";
import React, { useContext, useLayoutEffect, useRef, useState } from "react";
import {
FlatList,
ImageBackground,
Platform,
TouchableOpacity,
View
} from 'react-native'
import { Modalize } from 'react-native-modalize'
import { foods } from '../../apollo/server'
import EmptyFood from '../../assets/images/SVG/imageComponents/EmptyFood'
View,
} from "react-native";
import { Modalize } from "react-native-modalize";
import { foods } from "../../apollo/server";
import EmptyFood from "../../assets/images/SVG/imageComponents/EmptyFood";
import {
EnategaImage,
FilterModal,
@ -22,40 +23,40 @@ import {
Spinner,
TextDefault,
TextError,
WrapperView
} from '../../components'
import ConfigurationContext from '../../context/Configuration'
import UserContext from '../../context/User'
import { alignment } from '../../utils/alignment'
import { ICONS_NAME, NAVIGATION_SCREEN, SORT_DATA } from '../../utils/constant'
import { moderateScale, scale } from '../../utils/scaling'
import useStyle from './styles'
WrapperView,
} from "../../components";
import ConfigurationContext from "../../context/Configuration";
import UserContext from "../../context/User";
import { alignment } from "../../utils/alignment";
import { ICONS_NAME, NAVIGATION_SCREEN, SORT_DATA } from "../../utils/constant";
import { moderateScale, scale } from "../../utils/scaling";
import useStyle from "./styles";
// constants
const FOODS = gql`
${foods}
`
`;
function MenuItems() {
const route = useRoute()
const styles = useStyle()
const headerHeight = useHeaderHeight()
const navigation = useNavigation()
const _id = route.params._id ?? null
const imgMenu = route.params.img_menu ?? null
const title = route.params.title ?? null
const description = route.params.description ?? null
const [filters, setFilters] = useState({})
const route = useRoute();
const styles = useStyle();
const headerHeight = useHeaderHeight();
const navigation = useNavigation();
const _id = route.params._id ?? null;
const imgMenu = route.params.img_menu ?? null;
const title = route.params.title ?? null;
const description = route.params.description ?? null;
const [filters, setFilters] = useState({});
const { loading, error, data, refetch, networkStatus } = useQuery(FOODS, {
variables: { category: _id, ...filters }
})
const { addCartItem } = useContext(UserContext)
const configuration = useContext(ConfigurationContext)
const modalizeRef = useRef(null)
variables: { category: _id, ...filters },
});
const { addCartItem } = useContext(UserContext);
const configuration = useContext(ConfigurationContext);
const modalizeRef = useRef(null);
const closeModal = () => {
modalizeRef.current.close()
}
modalizeRef.current.close();
};
useLayoutEffect(() => {
navigation.setOptions({
@ -65,26 +66,26 @@ function MenuItems() {
icon={ICONS_NAME.Filter}
onPress={() => modalizeRef.current.open()}
/>
)
})
}, [navigation])
),
});
}, [navigation]);
async function onAddToCart(food) {
if (food.stock < 1) {
FlashMessage({
message: 'Item out of stock'
})
return
message: "Item out of stock",
});
return;
}
if (
food.variations.length === 1 &&
food.variations[0].addons.length === 0
) {
await addCartItem(food._id, food.variations[0]._id)
navigation.navigate(NAVIGATION_SCREEN.Cart)
await addCartItem(food._id, food.variations[0]._id);
navigation.navigate(NAVIGATION_SCREEN.Cart);
} else {
navigation.navigate(NAVIGATION_SCREEN.ItemDetail, { food })
navigation.navigate(NAVIGATION_SCREEN.ItemDetail, { food });
}
}
@ -92,19 +93,20 @@ function MenuItems() {
return (
<TouchableOpacity
onPress={() => {
onAddToCart(item)
onAddToCart(item);
}}
activeOpacity={0.7}
style={styles.cardContainer}>
style={styles.cardContainer}
>
<View style={styles.cardImageContainer}>
<EnategaImage
imgStyle={styles.imgResponsive}
imgSource={
item.img_url
? { uri: item.img_url }
: require('../../assets/images/food_placeholder.png')
: require("../../assets/images/food_placeholder.png")
}
resizeMode={'cover'}
resizeMode={"cover"}
spinnerProps={{ style: styles.loadingView }}
/>
{item.stock < 1 && (
@ -123,10 +125,11 @@ function MenuItems() {
numberOfLines={2}
textColor={styles.lightColor.color}
small
medium>
medium
>
{item.description}
</TextDefault>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<View style={{ flexDirection: "row", alignItems: "center" }}>
{item.variations[0].discounted > 0 && (
<TextDefault
textColor={styles.lightColor.color}
@ -134,61 +137,62 @@ function MenuItems() {
small
bold
H5
lineOver>
{configuration.currency_symbol}{' '}
lineOver
>
{configuration.currency_symbol}{" "}
{(
item.variations[0].price + item.variations[0].discounted
).toFixed(2)}
</TextDefault>
)}
<TextDefault textColor={styles.tagColor.color} H4 bolder>
{configuration.currency_symbol}{' '}
{configuration.currency_symbol}{" "}
{item.variations[0].price.toFixed(2)}
</TextDefault>
</View>
</View>
</TouchableOpacity>
)
);
}
function sortData(foods) {
const VALUE = get(SORT_DATA, get(filters, 'sort'))
const VALUE = get(SORT_DATA, get(filters, "sort"));
switch (VALUE) {
case SORT_DATA.NameAsc:
return foods.sort((a, b) =>
a.title.toLowerCase() > b.title.toLowerCase() ? 1 : -1
)
);
case SORT_DATA.NameDesc:
return foods.sort((a, b) =>
a.title.toLowerCase() < b.title.toLowerCase() ? 1 : -1
)
);
case SORT_DATA.PriceAsc:
return foods.sort((a, b) =>
a.variations[0].price > b.variations[0].price ? 1 : -1
)
);
case SORT_DATA.PriceDesc:
return foods.sort((a, b) =>
a.variations[0].price < b.variations[0].price ? 1 : -1
)
);
default:
return foods.sort((a, b) => (a.img_url < b.img_url ? 1 : -1))
return foods.sort((a, b) => (a.img_url < b.img_url ? 1 : -1));
}
}
const setFilterss = filterObj => {
setFilters(filterObj)
}
const setFilterss = (filterObj) => {
setFilters(filterObj);
};
function emptyView() {
if (loading) {
return <Spinner />
return <Spinner />;
} else if (error) {
return (
<TextError
text={error ? error.message : 'No Foods'}
text={error ? error.message : "No Foods"}
backColor="transparent"
/>
)
);
} else {
return (
<View style={styles.emptyContainer}>
@ -197,7 +201,7 @@ function MenuItems() {
No food item found
</TextDefault>
</View>
)
);
}
}
@ -210,27 +214,30 @@ function MenuItems() {
source={
imgMenu
? { uri: imgMenu }
: require('../../assets/images/food_placeholder.png')
}>
: require("../../assets/images/food_placeholder.png")
}
>
<View style={styles.shadeContainer}></View>
<View style={styles.backgroundImageTextContainer}>
<TextDefault
numberOfLines={1}
textColor={styles.whiteFont.color}
H4
bolder>
bolder
>
{title}
</TextDefault>
<TextDefault
numberOfLines={1}
textColor={styles.whiteFont.color}
bold>
bold
>
{description}
</TextDefault>
</View>
</ImageBackground>
</View>
)
);
}
return (
<WrapperView>
@ -240,13 +247,13 @@ function MenuItems() {
contentContainerStyle={styles.contentContaienr}
showsVerticalScrollIndicator={false}
ListHeaderComponent={renderListHeader()}
keyExtractor={item => item._id}
keyExtractor={(item) => item._id}
ListEmptyComponent={emptyView}
data={loading ? [] : error ? [] : sortData(data.foodByCategory)}
refreshing={networkStatus === 4}
onRefresh={() =>
refetch({
variables: { category: _id, ...filters }
variables: { category: _id, ...filters },
})
}
renderItem={({ item }) => renderGridCards(item)}
@ -259,10 +266,11 @@ function MenuItems() {
modalTopOffset={headerHeight}
avoidKeyboardLikeIOS={Platform.select({
ios: true,
android: false
android: false,
})}
keyboardAvoidingOffset={2}
keyboardAvoidingBehavior="height">
keyboardAvoidingBehavior="height"
>
<FilterModal
filterObj={filters}
setFilters={setFilterss}
@ -270,6 +278,6 @@ function MenuItems() {
/>
</Modalize>
</WrapperView>
)
);
}
export default MenuItems
export default MenuItems;

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

20599
Rider App/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,8 +24,8 @@
},
"dependencies": {
"@apollo/react-hooks": "^3.1.3",
"@expo/vector-icons": "^12.0.0",
"@react-native-async-storage/async-storage": "~1.15.0",
"@expo/vector-icons": "^13.0.0",
"@react-native-async-storage/async-storage": "~1.17.3",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/bottom-tabs": "^5.11.11",
"@react-navigation/drawer": "^5.12.5",
@ -39,39 +39,40 @@
"apollo-link-state": "^0.4.2",
"apollo-link-ws": "^1.0.20",
"apollo-upload-client": "^10.0.1",
"expo": "^44.0.0",
"expo-constants": "~13.0.1",
"expo-font": "~10.0.4",
"expo-localization": "~12.0.0",
"expo-location": "~14.0.1",
"expo-notifications": "~0.14.0",
"expo-splash-screen": "~0.14.1",
"expo-task-manager": "~10.1.0",
"expo-updates": "~0.11.6",
"deprecated-react-native-prop-types": "^4.0.0",
"expo": "^47.0.0",
"expo-constants": "~14.0.2",
"expo-font": "~11.0.1",
"expo-localization": "~14.0.0",
"expo-location": "~15.0.1",
"expo-notifications": "~0.17.0",
"expo-splash-screen": "~0.17.5",
"expo-task-manager": "~11.0.1",
"expo-updates": "~0.15.6",
"graphql": "^14.3.1",
"graphql-tag": "^2.10.1",
"i18n-js": "^3.3.0",
"patch-package": "^6.2.2",
"react": "17.0.1",
"patch-package": "^6.5.1",
"react": "18.1.0",
"react-apollo": "^2.5.8",
"react-native": "0.64.3",
"react-native": "0.70.5",
"react-native-animatable": "^1.3.2",
"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-maps": "0.29.4",
"react-native-maps": "1.3.2",
"react-native-maps-directions": "^1.8.0",
"react-native-material-textfield": "^0.16.1",
"react-native-modal": "^11.5.6",
"react-native-reanimated": "~2.3.1",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-svg": "12.1.1",
"react-native-webview": "11.15.0",
"react-native-reanimated": "~2.12.0",
"react-native-safe-area-context": "4.4.1",
"react-native-screens": "~3.18.0",
"react-native-svg": "13.4.0",
"react-native-webview": "11.23.1",
"subscriptions-transport-ws": "^0.9.16"
},
"devDependencies": {
"babel-preset-expo": "9.0.2",
"babel-preset-expo": "~9.2.1",
"eslint": "^7.1.0",
"eslint-config-standard": "^14.1.1",
"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
index 0f85022..c12b3a6 100644
index 0f85022..e467adb 100644
--- a/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 = {
numberOfLines: PropTypes.number,
- static propTypes = {
- numberOfLines: PropTypes.number,
- style: Animated.Text.propTypes.style,
+ style: PropTypes.object,
+ // static propTypes = {
+ // numberOfLines: PropTypes.number,
+ // style: PropTypes.object,
color: PropTypes.string.isRequired,
fontSize: PropTypes.number.isRequired,
- color: PropTypes.string.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
index 494bbaa..9bbf2e2 100644
index 494bbaa..d3960a6 100644
--- a/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 = {
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
index 6060f9f..fe9d9c4 100644
index 6060f9f..7f790ca 100644
--- a/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: PropTypes.object,
+ // style: PropTypes.object,
baseColor: PropTypes.string,
errorColor: PropTypes.string,
- baseColor: 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
index 82eaf03..809fcdd 100644
index 82eaf03..eebad36 100644
--- a/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 {
y1: PropTypes.number,
}),
@ -49,3 +173,79 @@ index 82eaf03..809fcdd 100644
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 {