ordering-ui-react-native 0.13.3 → 0.13.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/DeliveryApp.tsx +2 -0
- package/src/components/FacebookLogin/index.tsx +2 -2
- package/src/components/FacebookPixel/index.tsx +81 -0
- package/src/components/LoginForm/index.tsx +7 -7
- package/src/types/react-native-fbsdk-next/index.d.ts +1 -0
- package/themes/kiosk/src/components/CategoriesMenu/index.tsx +1 -1
- package/themes/kiosk/src/components/LanguageSelector/index.tsx +5 -16
- package/themes/kiosk/src/components/ProductForm/index.tsx +2 -2
- package/themes/original/src/components/ActiveOrders/index.tsx +2 -13
- package/themes/original/src/components/MyOrders/index.tsx +56 -0
- package/themes/original/src/components/MyOrders/styles.tsx +6 -0
- package/themes/original/src/components/OrdersOption/index.tsx +17 -14
- package/themes/original/src/types/index.tsx +3 -2
- package/themes/uber-eats/src/components/Cart/index.tsx +2 -2
- package/themes/uber-eats/src/components/Cart/styles.tsx +1 -1
- package/themes/uber-eats/src/components/shared/OBottomPopup.tsx +31 -21
- package/src/types/react-native-fbsdk/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-react-native",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.7",
|
|
4
4
|
"description": "Reusable components made in react native",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"author": "ordering.inc",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"react-native-document-picker": "^5.2.0",
|
|
76
76
|
"react-native-elements": "^3.0.0-alpha.1",
|
|
77
77
|
"react-native-fast-image": "^8.3.3",
|
|
78
|
-
"react-native-fbsdk": "^
|
|
78
|
+
"react-native-fbsdk-next": "^7.0.1",
|
|
79
79
|
"react-native-geocoding": "^0.5.0",
|
|
80
80
|
"react-native-gesture-handler": "^1.8.0",
|
|
81
81
|
"react-native-gifted-chat": "^0.16.3",
|
package/src/DeliveryApp.tsx
CHANGED
|
@@ -21,6 +21,7 @@ import { ThemeProvider } from './context/Theme';
|
|
|
21
21
|
import settings from './config.json';
|
|
22
22
|
import theme from './theme.json';
|
|
23
23
|
import AppContainer from './AppContainer';
|
|
24
|
+
import { FacebookPixel } from './components/FacebookPixel';
|
|
24
25
|
|
|
25
26
|
Sentry.init({
|
|
26
27
|
environment: Platform.OS === 'ios' ? 'ios' : 'android',
|
|
@@ -169,6 +170,7 @@ const DeliveryApp = () => {
|
|
|
169
170
|
return (
|
|
170
171
|
<ThemeProvider theme={theme}>
|
|
171
172
|
<OrderingProvider settings={settings} Alert={Alert}>
|
|
173
|
+
<FacebookPixel />
|
|
172
174
|
<AppContainer />
|
|
173
175
|
<Toast />
|
|
174
176
|
<Analytics />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, Text } from 'react-native';
|
|
3
|
-
import { AccessToken, LoginManager } from 'react-native-fbsdk';
|
|
3
|
+
import { AccessToken, LoginManager } from 'react-native-fbsdk-next';
|
|
4
4
|
import { useLanguage, useSession, useApi } from 'ordering-components/native';
|
|
5
5
|
|
|
6
6
|
import Icon from 'react-native-vector-icons/FontAwesome5';
|
|
@@ -49,7 +49,7 @@ export const FacebookLogin = (props: any) => {
|
|
|
49
49
|
handleErrors && handleErrors(response.content.result)
|
|
50
50
|
logoutWithFacebook()
|
|
51
51
|
}
|
|
52
|
-
} catch (err) {
|
|
52
|
+
} catch (err : any) {
|
|
53
53
|
handleLoading && handleLoading(false)
|
|
54
54
|
handleErrors && handleErrors(err.message)
|
|
55
55
|
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { useEvent, useConfig } from 'ordering-components/native'
|
|
3
|
+
import { AppEventsLogger } from "react-native-fbsdk-next"
|
|
4
|
+
|
|
5
|
+
export const FacebookPixel = (props : any) => {
|
|
6
|
+
const {
|
|
7
|
+
children
|
|
8
|
+
} = props
|
|
9
|
+
|
|
10
|
+
const [configs] = useConfig()
|
|
11
|
+
const [events] = useEvent()
|
|
12
|
+
|
|
13
|
+
const handleLoginUser = () => {
|
|
14
|
+
AppEventsLogger.logEvent(AppEventsLogger.AppEvents.CompletedRegistration, {
|
|
15
|
+
[AppEventsLogger.AppEventParams.RegistrationMethod]: "login",
|
|
16
|
+
["currency"]: "email"
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const handleProductAdded = (product : any) => {
|
|
21
|
+
AppEventsLogger.logEvent(AppEventsLogger.AppEvents.AddedToCart, product?.total ?? product?.price , {
|
|
22
|
+
[AppEventsLogger.AppEventParams.Description]: product?.name,
|
|
23
|
+
[AppEventsLogger.AppEventParams.Currency]: configs?.stripe_currency?.value ?? 'USD',
|
|
24
|
+
[AppEventsLogger.AppEventParams.ContentID]: product?.id,
|
|
25
|
+
[AppEventsLogger.AppEventParams.ContentType]: "product",
|
|
26
|
+
["fb_quantity"]: product?.quantity,
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const handleProductEdited = (product : any) => {
|
|
31
|
+
AppEventsLogger.logEvent(AppEventsLogger.AppEvents.CustomizeProduct, product?.total ?? product?.price , {
|
|
32
|
+
[AppEventsLogger.AppEventParams.Description]: product?.name,
|
|
33
|
+
[AppEventsLogger.AppEventParams.Currency]: configs?.stripe_currency?.value ?? 'USD',
|
|
34
|
+
[AppEventsLogger.AppEventParams.ContentID]: product?.id,
|
|
35
|
+
[AppEventsLogger.AppEventParams.ContentType]: "product",
|
|
36
|
+
["fb_quantity"]: product?.quantity,
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const handleSignupUser = () => {
|
|
41
|
+
AppEventsLogger.logEvent(AppEventsLogger.AppEvents.CompletedRegistration, {
|
|
42
|
+
[AppEventsLogger.AppEventParams.RegistrationMethod]: "signup",
|
|
43
|
+
["currency"]: "email"
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const handlePaymentInfo = (payment : any) => {
|
|
48
|
+
AppEventsLogger.logEvent(AppEventsLogger.AppEvents.AddedPaymentInfo, {
|
|
49
|
+
[AppEventsLogger.AppEventParams.ContentType]: payment?.gateway,
|
|
50
|
+
[AppEventsLogger.AppEventParams.ContentID]: payment?.id
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const handleOrderPlaced = (order : any) => {
|
|
55
|
+
AppEventsLogger.logPurchase(order.total, configs?.stripe_currency?.value ?? 'USD', { param: "value", id: order.id });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
events.on('userLogin', handleLoginUser)
|
|
60
|
+
events.on('product_added', handleProductAdded)
|
|
61
|
+
events.on('product_edited', handleProductEdited)
|
|
62
|
+
events.on('order_placed', handleOrderPlaced)
|
|
63
|
+
events.on('singup_user', handleSignupUser)
|
|
64
|
+
events.on('add_payment_option', handlePaymentInfo)
|
|
65
|
+
|
|
66
|
+
return () => {
|
|
67
|
+
events.off('userLogin', handleLoginUser)
|
|
68
|
+
events.off('product_added', handleProductAdded)
|
|
69
|
+
events.off('product_edited', handleProductEdited)
|
|
70
|
+
events.off('order_placed', handleOrderPlaced)
|
|
71
|
+
events.off('singup_user', handleSignupUser)
|
|
72
|
+
events.off('add_payment_option', handlePaymentInfo)
|
|
73
|
+
}
|
|
74
|
+
}, [])
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<>
|
|
78
|
+
{children}
|
|
79
|
+
</>
|
|
80
|
+
)
|
|
81
|
+
};
|
|
@@ -374,13 +374,13 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
374
374
|
<SocialButtons>
|
|
375
375
|
{(configs?.facebook_login?.value === 'true' || configs?.facebook_login?.value === '1') &&
|
|
376
376
|
configs?.facebook_id?.value && (
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
377
|
+
<FacebookLogin
|
|
378
|
+
notificationState={notificationState}
|
|
379
|
+
handleErrors={(err: any) => showToast(ToastType.Error, err)}
|
|
380
|
+
handleLoading={(val: boolean) => setIsLoadingSocialButton(val)}
|
|
381
|
+
handleSuccessFacebookLogin={handleSuccessFacebook}
|
|
382
|
+
/>
|
|
383
|
+
)}
|
|
384
384
|
{(configs?.google_login_client_id?.value !== '' && configs?.google_login_client_id?.value !== null) && (
|
|
385
385
|
<GoogleLogin
|
|
386
386
|
notificationState={notificationState}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'react-native-fbsdk-next';
|
|
@@ -162,7 +162,7 @@ const CategoriesMenu = (props: any): React.ReactElement => {
|
|
|
162
162
|
? bottomSheetVisibility ? orientationState?.dimensions?.width * 0.145 :orientationState?.dimensions?.width * 0.16
|
|
163
163
|
: orientationState?.dimensions?.width * 0.20
|
|
164
164
|
}}
|
|
165
|
-
titleStyle={{marginTop: Platform.OS === 'ios' ?
|
|
165
|
+
titleStyle={{marginTop: Platform.OS === 'ios' ? orientationState?.orientation === LANDSCAPE ? orientationState?.dimensions.height * 0.05 : orientationState?.dimensions.width * 0.05 : 0}}
|
|
166
166
|
onPress={() => {
|
|
167
167
|
resetInactivityTimeout()
|
|
168
168
|
if (isDrawer) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import { TouchableOpacity, View, StyleSheet } from 'react-native'
|
|
3
|
-
import { LanguageSelector as LanguageSelectorController
|
|
3
|
+
import { LanguageSelector as LanguageSelectorController } from 'ordering-components/native'
|
|
4
4
|
import CountryPicker, { Flag } from 'react-native-country-picker-modal'
|
|
5
5
|
|
|
6
6
|
import { Container, LanguageItem } from './styles'
|
|
@@ -17,9 +17,7 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
|
17
17
|
handleChangeLanguage,
|
|
18
18
|
} = props
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
const [{loading}] = useLanguage()
|
|
22
|
-
const [isLoading, setIsLoading] = useState(true)
|
|
20
|
+
const theme = useTheme()
|
|
23
21
|
const styles = StyleSheet.create({
|
|
24
22
|
closeIcon: {
|
|
25
23
|
width: 48, marginLeft: 32
|
|
@@ -28,15 +26,6 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
|
28
26
|
marginLeft: 40
|
|
29
27
|
}
|
|
30
28
|
})
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
if (!isLoading) return
|
|
33
|
-
const loadingLanguage = setTimeout(() =>{
|
|
34
|
-
setIsLoading(false)
|
|
35
|
-
}, 1000);
|
|
36
|
-
return () => {
|
|
37
|
-
clearTimeout(loadingLanguage);
|
|
38
|
-
}
|
|
39
|
-
}, [])
|
|
40
29
|
|
|
41
30
|
const _languages = languagesState?.languages?.map((language: any) => {
|
|
42
31
|
return {
|
|
@@ -59,7 +48,7 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
|
59
48
|
|
|
60
49
|
return (
|
|
61
50
|
<>
|
|
62
|
-
{
|
|
51
|
+
{ languagesState.loading ?
|
|
63
52
|
(<Container>
|
|
64
53
|
<Placeholder style={{ width: 130, paddingTop: 10 }} Animation={Fade}>
|
|
65
54
|
<PlaceholderLine height={15}/>
|
|
@@ -78,7 +67,7 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
|
78
67
|
renderFlagButton={() => (
|
|
79
68
|
<TouchableOpacity
|
|
80
69
|
onPress={() => setCountryModalVisible(true)}
|
|
81
|
-
disabled={loading}
|
|
70
|
+
disabled={languagesState.loading}
|
|
82
71
|
>
|
|
83
72
|
<LanguageItem>
|
|
84
73
|
<Flag
|
|
@@ -102,7 +91,7 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
|
102
91
|
handleChangeLanguage(item.value);
|
|
103
92
|
setCountryModalVisible(false);
|
|
104
93
|
}}
|
|
105
|
-
disabled={loading}
|
|
94
|
+
disabled={languagesState.loading}
|
|
106
95
|
>
|
|
107
96
|
<LanguageItem>
|
|
108
97
|
<View style={styles.flagsContainer} />
|
|
@@ -365,9 +365,9 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
365
365
|
</Animated.View>
|
|
366
366
|
</Animated.View>
|
|
367
367
|
|
|
368
|
-
{!isFromCheckout && (
|
|
368
|
+
{/* {!isFromCheckout && (
|
|
369
369
|
<Spinner visible={loading} />
|
|
370
|
-
)}
|
|
370
|
+
)} */}
|
|
371
371
|
{!loading && !error && product && (
|
|
372
372
|
<View style={{ paddingTop: isDrawer ? 10 : 20, paddingBottom: 80 }}>
|
|
373
373
|
<WrapContent isDrawer={isDrawer}>
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
LoadMore
|
|
15
15
|
} from './styles';
|
|
16
16
|
import { View, StyleSheet } from 'react-native';
|
|
17
|
-
import { getGoogleMapImage } from '../../utils';
|
|
18
17
|
|
|
19
18
|
import { ActiveOrdersParams } from '../../types';
|
|
20
19
|
import moment from 'moment';
|
|
@@ -41,7 +40,7 @@ export const ActiveOrders = (props: ActiveOrdersParams) => {
|
|
|
41
40
|
};
|
|
42
41
|
|
|
43
42
|
const handleClickCard = (uuid: string) => {
|
|
44
|
-
if (isMessageView
|
|
43
|
+
if (isMessageView) {
|
|
45
44
|
handleClickOrder(uuid)
|
|
46
45
|
return
|
|
47
46
|
}
|
|
@@ -132,18 +131,8 @@ export const ActiveOrders = (props: ActiveOrdersParams) => {
|
|
|
132
131
|
<ActiveOrdersContainer isMiniCards={configs?.google_maps_api_key?.value}>
|
|
133
132
|
{orders.length > 0 &&
|
|
134
133
|
orders.map((order: any, index: any) => (
|
|
135
|
-
<Order key={
|
|
134
|
+
<Order key={index} order={order} index={index} />
|
|
136
135
|
))}
|
|
137
|
-
{pagination?.totalPages && pagination?.currentPage < pagination?.totalPages && (
|
|
138
|
-
<LoadMore>
|
|
139
|
-
<OButton
|
|
140
|
-
textStyle={{ color: '#fff' }}
|
|
141
|
-
text={t('LOAD_MORE_ORDERS', 'Load more orders')}
|
|
142
|
-
onClick={loadMoreOrders}
|
|
143
|
-
style={styles.loadMoreButton}
|
|
144
|
-
/>
|
|
145
|
-
</LoadMore>
|
|
146
|
-
)}
|
|
147
136
|
</ActiveOrdersContainer>
|
|
148
137
|
<View
|
|
149
138
|
style={{
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useLanguage } from 'ordering-components/native';
|
|
3
|
+
import { View, StyleSheet, Platform, I18nManager } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { OrdersOption } from '../OrdersOption'
|
|
6
|
+
import { OText } from '../shared'
|
|
7
|
+
import { ScrollView } from 'react-native-gesture-handler';
|
|
8
|
+
|
|
9
|
+
const PIXELS_TO_SCROLL = 1000;
|
|
10
|
+
|
|
11
|
+
export const MyOrders = (props: any) => {
|
|
12
|
+
const [, t] = useLanguage();
|
|
13
|
+
const [loadMore, setLoadMore] = useState(false)
|
|
14
|
+
|
|
15
|
+
const [ordersLength, setOrdersLength] = useState({
|
|
16
|
+
activeOrdersLength: 0,
|
|
17
|
+
previousOrdersLength: 0,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const handleScroll = ({ nativeEvent }: any) => {
|
|
21
|
+
const y = nativeEvent.contentOffset.y
|
|
22
|
+
const height = nativeEvent.contentSize.height
|
|
23
|
+
|
|
24
|
+
if (y + PIXELS_TO_SCROLL > height ) {
|
|
25
|
+
setLoadMore(true)
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<ScrollView onScroll={(e: any) => handleScroll(e)}>
|
|
31
|
+
<OText
|
|
32
|
+
size={20}
|
|
33
|
+
mBottom={15}
|
|
34
|
+
style={{ marginTop: 25, paddingHorizontal: 40 }}>
|
|
35
|
+
{t('MY_ORDERS', 'My Orders')}
|
|
36
|
+
</OText>
|
|
37
|
+
<View style={{ paddingLeft: 40, paddingRight: 40 }}>
|
|
38
|
+
<OrdersOption
|
|
39
|
+
{...props}
|
|
40
|
+
activeOrders
|
|
41
|
+
ordersLength={ordersLength}
|
|
42
|
+
setOrdersLength={setOrdersLength}
|
|
43
|
+
loadMoreStatus={loadMore}
|
|
44
|
+
setLoadMoreStatus={setLoadMore}
|
|
45
|
+
/>
|
|
46
|
+
</View>
|
|
47
|
+
<View style={{ paddingLeft: 40, paddingRight: 40 }}>
|
|
48
|
+
<OrdersOption
|
|
49
|
+
{...props}
|
|
50
|
+
ordersLength={ordersLength}
|
|
51
|
+
setOrdersLength={setOrdersLength}
|
|
52
|
+
/>
|
|
53
|
+
</View>
|
|
54
|
+
</ScrollView>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { OrderList, useLanguage, useOrder, ToastType, useToast } from 'ordering-components/native'
|
|
3
3
|
import { useTheme } from 'styled-components/native';
|
|
4
4
|
import { useFocusEffect } from '@react-navigation/native'
|
|
@@ -15,7 +15,8 @@ import {
|
|
|
15
15
|
PlaceholderLine,
|
|
16
16
|
Fade
|
|
17
17
|
} from "rn-placeholder";
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
import { View, ScrollView } from 'react-native'
|
|
19
20
|
|
|
20
21
|
const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
21
22
|
const {
|
|
@@ -28,8 +29,9 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
28
29
|
customArray,
|
|
29
30
|
onNavigationRedirect,
|
|
30
31
|
orderStatus,
|
|
32
|
+
loadMoreStatus,
|
|
31
33
|
loadMoreOrders,
|
|
32
|
-
loadOrders
|
|
34
|
+
loadOrders,
|
|
33
35
|
} = props
|
|
34
36
|
|
|
35
37
|
const theme = useTheme();
|
|
@@ -98,10 +100,17 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
useFocusEffect(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
React.useCallback(() => {
|
|
104
|
+
loadOrders()
|
|
105
|
+
}, [navigation])
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
const hasMore = pagination?.totalPages && pagination?.currentPage !== pagination?.totalPages
|
|
110
|
+
if (loadMoreStatus && hasMore && !loading) {
|
|
111
|
+
loadMoreOrders()
|
|
112
|
+
}
|
|
113
|
+
}, [loadMoreStatus, loading, pagination])
|
|
105
114
|
|
|
106
115
|
return (
|
|
107
116
|
<>
|
|
@@ -127,7 +136,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
127
136
|
)}
|
|
128
137
|
{loading && (
|
|
129
138
|
<>
|
|
130
|
-
{activeOrders ? (
|
|
139
|
+
{!activeOrders ? (
|
|
131
140
|
<Placeholder style={{ marginTop: 30 }} Animation={Fade}>
|
|
132
141
|
<View style={{ width: '100%', flexDirection: 'row' }}>
|
|
133
142
|
<PlaceholderLine width={20} height={70} style={{ marginRight: 20, marginBottom: 35 }} />
|
|
@@ -171,7 +180,6 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
171
180
|
<ActiveOrders
|
|
172
181
|
orders={orders.filter((order: any) => orderStatus.includes(order.status))}
|
|
173
182
|
pagination={pagination}
|
|
174
|
-
loadMoreOrders={loadMoreOrders}
|
|
175
183
|
reorderLoading={reorderLoading}
|
|
176
184
|
customArray={customArray}
|
|
177
185
|
getOrderStatus={getOrderStatus}
|
|
@@ -201,11 +209,6 @@ export const OrdersOption = (props: OrdersOptionParams) => {
|
|
|
201
209
|
? [0, 3, 4, 7, 8, 9, 14, 15, 18, 19, 20, 21]
|
|
202
210
|
: [1, 2, 5, 6, 10, 11, 12, 16, 17],
|
|
203
211
|
useDefualtSessionManager: true,
|
|
204
|
-
paginationSettings: {
|
|
205
|
-
initialPage: 1,
|
|
206
|
-
pageSize: 10,
|
|
207
|
-
controlType: 'infinity'
|
|
208
|
-
}
|
|
209
212
|
}
|
|
210
213
|
|
|
211
214
|
return <OrderList {...MyOrdersProps} />
|
|
@@ -253,7 +253,7 @@ export interface OrdersOptionParams {
|
|
|
253
253
|
pagination?: any,
|
|
254
254
|
titleContent?: string,
|
|
255
255
|
customArray?: Array<any>,
|
|
256
|
-
loadMoreOrders?:
|
|
256
|
+
loadMoreOrders?: any,
|
|
257
257
|
onNavigationRedirect?: any,
|
|
258
258
|
orderStatus?: any,
|
|
259
259
|
navigation?: any,
|
|
@@ -263,7 +263,8 @@ export interface OrdersOptionParams {
|
|
|
263
263
|
setOrdersLength?: ({ activeOrdersLength, previousOrdersLength }: { activeOrdersLength: number, previousOrdersLength: number }) => void,
|
|
264
264
|
ordersLength: { activeOrdersLength: number, previousOrdersLength: number },
|
|
265
265
|
setSelectedOrderId?: any,
|
|
266
|
-
setOpenMessges?: any
|
|
266
|
+
setOpenMessges?: any,
|
|
267
|
+
loadMoreStatus?: boolean
|
|
267
268
|
}
|
|
268
269
|
export interface ActiveOrdersParams {
|
|
269
270
|
orders?: any,
|
|
@@ -239,9 +239,9 @@ const CartUI = (props: any) => {
|
|
|
239
239
|
</OSTotal>
|
|
240
240
|
{cart?.status !== 2 && (
|
|
241
241
|
<OSTable>
|
|
242
|
-
<View style={{
|
|
242
|
+
<View style={{ flex: 1, marginTop: 20, paddingBottom: 20 }}>
|
|
243
243
|
<OText>{t('COMMENTS', 'Comments')}</OText>
|
|
244
|
-
<View style={{ flex: 1
|
|
244
|
+
<View style={{ flex: 1 }}>
|
|
245
245
|
<OInput
|
|
246
246
|
value={cart?.comment}
|
|
247
247
|
placeholder={t('SPECIAL_COMMENTS', 'Special Comments')}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Modal, TouchableWithoutFeedback, Dimensions, StyleSheet, View, ScrollView, Text } from 'react-native'
|
|
2
|
+
import { Modal, TouchableWithoutFeedback, Dimensions, StyleSheet, View, ScrollView, Text, Platform } from 'react-native'
|
|
3
3
|
import { OText } from '../shared'
|
|
4
4
|
import Icon from 'react-native-vector-icons/Feather'
|
|
5
|
-
import { useTheme } from 'styled-components/native'
|
|
5
|
+
import styled,{ useTheme } from 'styled-components/native'
|
|
6
6
|
|
|
7
7
|
const deviceHeight = Dimensions.get('window').height
|
|
8
8
|
|
|
@@ -24,6 +24,11 @@ const OBottomPopup = (props: Props) => {
|
|
|
24
24
|
|
|
25
25
|
const theme = useTheme()
|
|
26
26
|
|
|
27
|
+
const KeyboardView = styled.KeyboardAvoidingView`
|
|
28
|
+
flex-grow: 1;
|
|
29
|
+
flex-shrink: 1;
|
|
30
|
+
`;
|
|
31
|
+
|
|
27
32
|
const styles = StyleSheet.create({
|
|
28
33
|
container: {
|
|
29
34
|
flex: 1,
|
|
@@ -79,26 +84,31 @@ const OBottomPopup = (props: Props) => {
|
|
|
79
84
|
<View style={styles.touchableOutsideStyle} />
|
|
80
85
|
</TouchableWithoutFeedback>
|
|
81
86
|
<View style={styles.bottomContainer}>
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
<KeyboardView
|
|
88
|
+
enabled
|
|
89
|
+
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
90
|
+
>
|
|
91
|
+
<ScrollView showsVerticalScrollIndicator={false} >
|
|
92
|
+
{customHeaderShow ? (
|
|
93
|
+
<View style={styles.customHeaderStyle}>
|
|
94
|
+
<OText size={16} numberOfLines={1} style={styles.customTitleStyle}>
|
|
95
|
+
{title}
|
|
96
|
+
</OText>
|
|
97
|
+
<Icon
|
|
98
|
+
name='x'
|
|
99
|
+
size={30}
|
|
100
|
+
style={styles.closeBtnStyle}
|
|
101
|
+
onPress={onClose}
|
|
102
|
+
/>
|
|
103
|
+
</View>
|
|
104
|
+
) : (
|
|
105
|
+
<Text style={styles.titleStyle}>
|
|
86
106
|
{title}
|
|
87
|
-
</
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
onPress={onClose}
|
|
93
|
-
/>
|
|
94
|
-
</View>
|
|
95
|
-
) : (
|
|
96
|
-
<Text style={styles.titleStyle}>
|
|
97
|
-
{title}
|
|
98
|
-
</Text>
|
|
99
|
-
)}
|
|
100
|
-
{children}
|
|
101
|
-
</ScrollView>
|
|
107
|
+
</Text>
|
|
108
|
+
)}
|
|
109
|
+
{children}
|
|
110
|
+
</ScrollView>
|
|
111
|
+
</KeyboardView>
|
|
102
112
|
</View>
|
|
103
113
|
</View>
|
|
104
114
|
</Modal>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'react-native-fbsdk';
|