ordering-ui-react-native 0.16.33 → 0.16.34-release
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 +7 -5
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/ActiveOrders/index.tsx +61 -63
- package/src/components/ActiveOrders/styles.tsx +8 -14
- package/src/components/BusinessBasicInformation/index.tsx +11 -19
- package/src/components/BusinessInformation/index.tsx +33 -4
- package/src/components/BusinessInformation/styles.tsx +2 -2
- package/src/components/BusinessProductsList/index.tsx +10 -10
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +2 -1
- package/src/components/LanguageSelector/index.tsx +21 -16
- package/src/components/LoginForm/index.tsx +15 -0
- package/src/components/Messages/index.tsx +2 -2
- package/src/components/NotificationSetting/index.tsx +85 -0
- package/src/components/OrderDetails/index.tsx +2 -20
- package/src/components/OrdersOption/index.tsx +54 -56
- package/src/components/PaymentOptions/index.tsx +335 -365
- package/src/components/PaymentOptionsWebView/index.tsx +120 -121
- package/src/components/ReviewDriver/index.tsx +1 -1
- package/src/components/ReviewOrder/index.tsx +2 -1
- package/src/components/ReviewProducts/index.tsx +11 -0
- package/src/components/SignupForm/index.tsx +15 -0
- package/src/components/SingleProductReview/index.tsx +8 -5
- package/src/components/StripeElementsForm/index.tsx +25 -16
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OBottomPopup.tsx +6 -2
- package/src/index.tsx +2 -0
- package/src/pages/BusinessesListing.tsx +7 -6
- package/src/pages/OrderDetails.tsx +1 -1
- package/src/pages/ReviewDriver.tsx +2 -2
- package/src/pages/ReviewOrder.tsx +2 -2
- package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
- package/src/utils/index.tsx +2 -1
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/BusinessController/index.tsx +2 -2
- package/themes/business/src/components/Chat/index.tsx +38 -30
- package/themes/business/src/components/DriverMap/index.tsx +7 -5
- package/themes/business/src/components/DriverSchedule/index.tsx +71 -0
- package/themes/business/src/components/DriverSchedule/styles.tsx +6 -0
- package/themes/business/src/components/LoginForm/index.tsx +111 -74
- package/themes/business/src/components/MapView/index.tsx +12 -1
- package/themes/business/src/components/MessagesOption/index.tsx +11 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -19
- package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
- package/themes/business/src/components/OrdersOption/index.tsx +65 -21
- package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
- package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
- package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
- package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
- package/themes/business/src/components/PreviousOrders/index.tsx +21 -23
- package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +27 -13
- package/themes/business/src/components/ScheduleBlocked/index.tsx +53 -0
- package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +28 -4
- package/themes/business/src/components/shared/ODropDown.tsx +42 -8
- package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
- package/themes/business/src/components/shared/OModal.tsx +40 -37
- package/themes/business/src/types/index.tsx +15 -9
- package/themes/business/src/utils/index.tsx +10 -0
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
- package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/types/index.d.ts +2 -0
- package/themes/original/index.tsx +4 -0
- package/themes/original/src/components/AddressDetails/index.tsx +2 -2
- package/themes/original/src/components/AddressForm/index.tsx +151 -140
- package/themes/original/src/components/AddressList/index.tsx +1 -1
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +311 -161
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
- package/themes/original/src/components/BusinessController/index.tsx +190 -113
- package/themes/original/src/components/BusinessController/styles.tsx +0 -7
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +4 -4
- package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +80 -128
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
- package/themes/original/src/components/BusinessProductsList/index.tsx +49 -52
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +173 -104
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +18 -11
- package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +37 -25
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -4
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +278 -104
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +47 -10
- package/themes/original/src/components/BusinessesListing/index.tsx +95 -7
- package/themes/original/src/components/Cart/index.tsx +44 -12
- package/themes/original/src/components/Cart/styles.tsx +4 -0
- package/themes/original/src/components/CartContent/index.tsx +22 -16
- package/themes/original/src/components/Checkout/index.tsx +101 -61
- package/themes/original/src/components/Checkout/styles.tsx +0 -1
- package/themes/original/src/components/DriverTips/index.tsx +4 -4
- package/themes/original/src/components/DriverTips/styles.tsx +2 -1
- package/themes/original/src/components/Favorite/index.tsx +1 -0
- package/themes/original/src/components/FavoriteList/index.tsx +32 -2
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +20 -19
- package/themes/original/src/components/GoogleMap/index.tsx +20 -12
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +25 -10
- package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +4 -0
- package/themes/original/src/components/HelpGuide/index.tsx +9 -8
- package/themes/original/src/components/HelpOrder/index.tsx +9 -8
- package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
- package/themes/original/src/components/LoginForm/Otp/index.tsx +95 -72
- package/themes/original/src/components/LoginForm/index.tsx +90 -46
- package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
- package/themes/original/src/components/Messages/index.tsx +17 -17
- package/themes/original/src/components/MomentOption/index.tsx +8 -6
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -92
- package/themes/original/src/components/MultiCheckout/index.tsx +6 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
- package/themes/original/src/components/MyOrders/index.tsx +70 -6
- package/themes/original/src/components/NavBar/index.tsx +15 -9
- package/themes/original/src/components/NetworkError/index.tsx +5 -3
- package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
- package/themes/original/src/components/Notifications/index.tsx +148 -0
- package/themes/original/src/components/Notifications/styles.tsx +17 -0
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
- package/themes/original/src/components/OrderDetails/index.tsx +200 -37
- package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
- package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
- package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
- package/themes/original/src/components/OrderProgress/index.tsx +77 -66
- package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
- package/themes/original/src/components/OrderSummary/index.tsx +3 -36
- package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
- package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +97 -106
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
- package/themes/original/src/components/OrdersOption/index.tsx +71 -55
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +41 -23
- package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
- package/themes/original/src/components/PlaceSpot/index.tsx +243 -47
- package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
- package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
- package/themes/original/src/components/ProductForm/index.tsx +635 -664
- package/themes/original/src/components/ProductForm/styles.tsx +9 -8
- package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
- package/themes/original/src/components/ProductOption/index.tsx +1 -1
- package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
- package/themes/original/src/components/ProfessionalProfile/index.tsx +26 -14
- package/themes/original/src/components/ReviewDriver/index.tsx +7 -7
- package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
- package/themes/original/src/components/ReviewProducts/index.tsx +2 -2
- package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
- package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
- package/themes/original/src/components/SearchBar/index.tsx +5 -3
- package/themes/original/src/components/ServiceForm/index.tsx +410 -258
- package/themes/original/src/components/SignupForm/index.tsx +350 -206
- package/themes/original/src/components/SingleOrderCard/index.tsx +229 -181
- package/themes/original/src/components/SingleOrderCard/styles.tsx +0 -7
- package/themes/original/src/components/SingleProductCard/index.tsx +200 -110
- package/themes/original/src/components/SingleProductCard/styles.tsx +2 -10
- package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
- package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
- package/themes/original/src/components/StripeElementsForm/index.tsx +18 -7
- package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
- package/themes/original/src/components/UserDetails/index.tsx +31 -17
- package/themes/original/src/components/UserFormDetails/index.tsx +74 -81
- package/themes/original/src/components/UserProfile/index.tsx +54 -29
- package/themes/original/src/components/UserProfile/styles.ts +17 -0
- package/themes/original/src/components/UserProfileForm/index.tsx +15 -10
- package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
- package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
- package/themes/original/src/components/Wallets/index.tsx +176 -164
- package/themes/original/src/components/Wallets/styles.tsx +12 -8
- package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
- package/themes/original/src/components/shared/OBottomPopup.tsx +48 -15
- package/themes/original/src/components/shared/OButton.tsx +10 -3
- package/themes/original/src/components/shared/OIcon.tsx +8 -1
- package/themes/original/src/components/shared/OInput.tsx +13 -3
- package/themes/original/src/layouts/Container.tsx +13 -9
- package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
- package/themes/original/src/types/index.tsx +91 -30
- package/themes/original/src/utils/index.tsx +121 -10
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -1,33 +1,45 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Modal, TouchableWithoutFeedback, Dimensions, StyleSheet, View, Text, Platform, StatusBar } from 'react-native'
|
|
2
|
+
import { Modal, TouchableWithoutFeedback, TouchableOpacity, Dimensions, StyleSheet, View, Text, Platform, StatusBar } from 'react-native'
|
|
3
3
|
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
4
|
+
import { OIcon } from '.';
|
|
4
5
|
const deviceHeight = Dimensions.get('window').height
|
|
5
6
|
|
|
6
7
|
interface Props {
|
|
7
8
|
open: boolean;
|
|
9
|
+
transparent?: boolean;
|
|
8
10
|
title?: string;
|
|
9
11
|
children?: any;
|
|
10
12
|
onClose?: any;
|
|
11
13
|
isStatusBar?: boolean;
|
|
14
|
+
bottomContainerStyle?: any;
|
|
15
|
+
titleStyle?: any;
|
|
16
|
+
closeIcon?: any;
|
|
17
|
+
presentationStyle?: "fullScreen" | "pageSheet" | "formSheet" | "overFullScreen" | undefined
|
|
12
18
|
}
|
|
13
19
|
const OBottomPopup = (props: Props) => {
|
|
14
20
|
const {
|
|
15
21
|
open,
|
|
22
|
+
transparent,
|
|
16
23
|
title,
|
|
17
24
|
onClose,
|
|
18
25
|
children,
|
|
19
|
-
isStatusBar
|
|
26
|
+
isStatusBar,
|
|
27
|
+
titleStyle,
|
|
28
|
+
bottomContainerStyle,
|
|
29
|
+
closeIcon,
|
|
30
|
+
presentationStyle
|
|
20
31
|
} = props
|
|
21
32
|
const { top, bottom } = useSafeAreaInsets();
|
|
33
|
+
|
|
22
34
|
return (
|
|
23
35
|
<Modal
|
|
24
|
-
animationType='
|
|
25
|
-
transparent={
|
|
36
|
+
animationType='fade'
|
|
37
|
+
transparent={transparent}
|
|
26
38
|
visible={open}
|
|
27
39
|
onRequestClose={() => onClose()}
|
|
28
|
-
presentationStyle={'fullScreen'}
|
|
40
|
+
presentationStyle={presentationStyle || 'fullScreen'}
|
|
29
41
|
>
|
|
30
|
-
|
|
42
|
+
{isStatusBar && <StatusBar translucent={false} />}
|
|
31
43
|
<View style={styles.container}>
|
|
32
44
|
<TouchableWithoutFeedback
|
|
33
45
|
style={styles.touchableOutsideStyle}
|
|
@@ -35,13 +47,24 @@ const OBottomPopup = (props: Props) => {
|
|
|
35
47
|
>
|
|
36
48
|
<View style={styles.touchableOutsideStyle} />
|
|
37
49
|
</TouchableWithoutFeedback>
|
|
38
|
-
<View style={styles.bottomContainer}>
|
|
50
|
+
<View style={{ ...styles.bottomContainer, ...bottomContainerStyle }}>
|
|
39
51
|
<View style={{ paddingTop: top, paddingBottom: bottom }}>
|
|
40
|
-
{
|
|
41
|
-
|
|
42
|
-
{
|
|
43
|
-
|
|
44
|
-
|
|
52
|
+
<View style={styles.modalTitleStyle}>
|
|
53
|
+
{closeIcon && (
|
|
54
|
+
<TouchableOpacity onPress={() => onClose()} style={styles.closeIconStyle}>
|
|
55
|
+
<OIcon
|
|
56
|
+
src={closeIcon}
|
|
57
|
+
width={20}
|
|
58
|
+
height={20}
|
|
59
|
+
/>
|
|
60
|
+
</TouchableOpacity>
|
|
61
|
+
)}
|
|
62
|
+
{!!title && (
|
|
63
|
+
<Text style={{ ...styles.titleStyle, ...titleStyle }}>
|
|
64
|
+
{title}
|
|
65
|
+
</Text>
|
|
66
|
+
)}
|
|
67
|
+
</View>
|
|
45
68
|
{children}
|
|
46
69
|
</View>
|
|
47
70
|
</View>
|
|
@@ -54,7 +77,7 @@ const styles = StyleSheet.create({
|
|
|
54
77
|
container: {
|
|
55
78
|
flex: 1,
|
|
56
79
|
backgroundColor: '#000000AA',
|
|
57
|
-
justifyContent: 'flex-end'
|
|
80
|
+
justifyContent: 'flex-end'
|
|
58
81
|
},
|
|
59
82
|
touchableOutsideStyle: {
|
|
60
83
|
flex: 1,
|
|
@@ -68,8 +91,18 @@ const styles = StyleSheet.create({
|
|
|
68
91
|
},
|
|
69
92
|
titleStyle: {
|
|
70
93
|
fontSize: 20,
|
|
71
|
-
fontWeight: 'bold'
|
|
72
|
-
|
|
94
|
+
fontWeight: 'bold'
|
|
95
|
+
},
|
|
96
|
+
closeIconStyle: {
|
|
97
|
+
position: 'absolute',
|
|
98
|
+
left: 25,
|
|
99
|
+
top: 25,
|
|
100
|
+
zIndex: 100
|
|
101
|
+
},
|
|
102
|
+
modalTitleStyle: {
|
|
103
|
+
position: 'relative',
|
|
104
|
+
paddingHorizontal: 10,
|
|
105
|
+
paddingVertical: 20
|
|
73
106
|
}
|
|
74
107
|
})
|
|
75
108
|
|
|
@@ -78,6 +78,9 @@ interface Props {
|
|
|
78
78
|
borderColor?: string;
|
|
79
79
|
loadingStyle?: ViewStyle;
|
|
80
80
|
showNextIcon?: boolean;
|
|
81
|
+
isDisabledWithSameStyles?: boolean;
|
|
82
|
+
icon?: any;
|
|
83
|
+
iconProps?: any
|
|
81
84
|
}
|
|
82
85
|
|
|
83
86
|
const OButton = (props: Props): React.ReactElement => {
|
|
@@ -110,8 +113,12 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
110
113
|
activeOpacity={props.activeOpacity}
|
|
111
114
|
onPress={props.onClick}
|
|
112
115
|
style={{ width: props.isCircle ? 52 : props.style?.width, ...props.parentStyle }}
|
|
116
|
+
disabled={props.isDisabledWithSameStyles}
|
|
113
117
|
>
|
|
114
118
|
<StyledButton style={props.bgColor ? { ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor } : props.style}>
|
|
119
|
+
{props.icon ? (
|
|
120
|
+
<props.icon {...props.iconProps} />
|
|
121
|
+
) : null}
|
|
115
122
|
{props.imgLeftSrc ? (
|
|
116
123
|
<OIcon style={props.imgLeftStyle} src={props.imgLeftSrc} />
|
|
117
124
|
) : null}
|
|
@@ -120,9 +127,9 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
120
127
|
) : null}
|
|
121
128
|
{props.imgRightSrc ? (
|
|
122
129
|
<EndImage style={props.imgRightStyle} source={props.imgRightSrc} />
|
|
123
|
-
) : props.showNextIcon ?
|
|
124
|
-
<EndImage source={theme.images.general.arrow_left}
|
|
125
|
-
|
|
130
|
+
) : props.showNextIcon ?
|
|
131
|
+
<EndImage source={theme.images.general.arrow_left}
|
|
132
|
+
style={{ width: 16, tintColor: 'white', transform: [{ rotate: I18nManager.isRTL ? '0deg' : '180deg' }] }} /> : null}
|
|
126
133
|
</StyledButton>
|
|
127
134
|
</TouchableOpacity>
|
|
128
135
|
);
|
|
@@ -26,7 +26,14 @@ const OImage = (props: Props): React.ReactElement => {
|
|
|
26
26
|
return (
|
|
27
27
|
<Wrapper style={{ borderRadius: props.style?.borderRadius, overflow: 'hidden', marginHorizontal: props.style?.marginHorizontal }}>
|
|
28
28
|
<SImage
|
|
29
|
-
source={
|
|
29
|
+
source={
|
|
30
|
+
props.src
|
|
31
|
+
? props.src
|
|
32
|
+
: props.url
|
|
33
|
+
? typeof props.url === 'number'
|
|
34
|
+
? props.url
|
|
35
|
+
: { uri: props.url }
|
|
36
|
+
: props.dummy}
|
|
30
37
|
style={{
|
|
31
38
|
tintColor: props.color,
|
|
32
39
|
flex: props.isWrap ? 1 : 0,
|
|
@@ -3,6 +3,7 @@ import { ImageSourcePropType, ImageStyle, ViewStyle, TextInputProps, TextStyle }
|
|
|
3
3
|
import styled from 'styled-components/native';
|
|
4
4
|
import OIcon from './OIcon';
|
|
5
5
|
import MaterialIcon from 'react-native-vector-icons/MaterialIcons'
|
|
6
|
+
import { useTheme } from 'styled-components/native';
|
|
6
7
|
|
|
7
8
|
const Input = styled.TextInput`
|
|
8
9
|
flex-grow: 1;
|
|
@@ -39,6 +40,7 @@ interface Props extends TextInputProps {
|
|
|
39
40
|
inputStyle?: TextStyle;
|
|
40
41
|
wrapperRef?: any;
|
|
41
42
|
onPress?: any;
|
|
43
|
+
isFocusHighlight?: boolean
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
const Wrapper = styled.Pressable`
|
|
@@ -54,12 +56,16 @@ const Wrapper = styled.Pressable`
|
|
|
54
56
|
`;
|
|
55
57
|
|
|
56
58
|
const OInput = (props: Props): React.ReactElement => {
|
|
59
|
+
const theme = useTheme();
|
|
60
|
+
const [inputFocused, setInputFocused] = React.useState(false)
|
|
57
61
|
return (
|
|
58
62
|
<Wrapper
|
|
59
|
-
onPress={() => {props.forwardRef?.current?.focus?.(); props.onPress && props.onPress()}}
|
|
63
|
+
onPress={() => { props.forwardRef?.current?.focus?.(); props.onPress && props.onPress() }}
|
|
60
64
|
style={{
|
|
61
65
|
backgroundColor: props.bgColor,
|
|
62
|
-
borderColor: props.
|
|
66
|
+
borderColor: !props.isFocusHighlight
|
|
67
|
+
? props.borderColor
|
|
68
|
+
: inputFocused ? theme.colors.primary : theme.colors.border,
|
|
63
69
|
...props.style,
|
|
64
70
|
}}>
|
|
65
71
|
{props.icon ? (
|
|
@@ -75,6 +81,7 @@ const OInput = (props: Props): React.ReactElement => {
|
|
|
75
81
|
<MaterialIcon name={props?.vertorIcon} size={20} color={props?.vectorIconColor} style={{ marginHorizontal: 10 }} />
|
|
76
82
|
)}
|
|
77
83
|
<Input
|
|
84
|
+
autoFocus={props?.autoFocus}
|
|
78
85
|
name={props.name}
|
|
79
86
|
secureTextEntry={props.isSecured}
|
|
80
87
|
onChangeText={(txt: any) => props.name ? props.onChange({ target: { name: props.name, value: txt } }) : props.onChange(txt)}
|
|
@@ -90,10 +97,12 @@ const OInput = (props: Props): React.ReactElement => {
|
|
|
90
97
|
returnKeyType={props.returnKeyType}
|
|
91
98
|
onSubmitEditing={props.onSubmitEditing}
|
|
92
99
|
blurOnSubmit={props.blurOnSubmit}
|
|
93
|
-
ref={(e
|
|
100
|
+
ref={(e: any) => {
|
|
94
101
|
props.forwardRef && (props.forwardRef.current = e)
|
|
95
102
|
}}
|
|
96
103
|
style={props?.inputStyle}
|
|
104
|
+
onFocus={() => setInputFocused(true)}
|
|
105
|
+
onBlur={() => setInputFocused(false)}
|
|
97
106
|
/>
|
|
98
107
|
{props.iconRight && (
|
|
99
108
|
<OIcon
|
|
@@ -113,6 +122,7 @@ OInput.defaultProps = {
|
|
|
113
122
|
iconColor: '#959595',
|
|
114
123
|
bgColor: 'white',
|
|
115
124
|
borderColor: 'white',
|
|
125
|
+
isFocusHighlight: false
|
|
116
126
|
};
|
|
117
127
|
|
|
118
128
|
export default OInput;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
3
|
+
import styled, { css, useTheme } from 'styled-components/native';
|
|
4
|
+
import { Platform, View } from 'react-native';
|
|
4
5
|
|
|
5
6
|
const ContainerStyled = styled.ScrollView`
|
|
6
7
|
flex: 1;
|
|
@@ -10,17 +11,20 @@ const ContainerStyled = styled.ScrollView`
|
|
|
10
11
|
background-color: ${(props: any) => props.theme.colors.backgroundPage};
|
|
11
12
|
`;
|
|
12
13
|
|
|
13
|
-
const SafeAreaStyled = styled.SafeAreaView`
|
|
14
|
-
flex: 1;
|
|
15
|
-
background-color: ${(props: any) => props.theme.colors.backgroundPage};
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
14
|
export const Container = (props: any) => {
|
|
15
|
+
const theme = useTheme()
|
|
16
|
+
const insets = useSafeAreaInsets()
|
|
19
17
|
return (
|
|
20
|
-
<
|
|
18
|
+
<View
|
|
19
|
+
style={{
|
|
20
|
+
flex: 1,
|
|
21
|
+
paddingTop: insets.top,
|
|
22
|
+
backgroundColor: theme.colors.backgroundPage
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
21
25
|
<ContainerStyled {...props} ref={props?.forwardRef} keyboardShouldPersistTaps='handled' style={{...props.style}}>
|
|
22
26
|
{props.children}
|
|
23
27
|
</ContainerStyled>
|
|
24
|
-
</
|
|
28
|
+
</View>
|
|
25
29
|
)
|
|
26
30
|
}
|
|
@@ -19,7 +19,11 @@ export const Container = styled.View`
|
|
|
19
19
|
|
|
20
20
|
export const FloatingBottomContainer = (props: any) => {
|
|
21
21
|
return (
|
|
22
|
-
<Container style={{
|
|
22
|
+
<Container style={{
|
|
23
|
+
width: windowWidth,
|
|
24
|
+
borderTopWidth: props?.borderTopWidth ?? 1,
|
|
25
|
+
borderRadius: props?.borderRadius ?? 0
|
|
26
|
+
}}>
|
|
23
27
|
{props.children}
|
|
24
28
|
</Container>
|
|
25
29
|
)
|
|
@@ -47,6 +47,8 @@ export interface ProfileParams {
|
|
|
47
47
|
isVerifiedPhone?: any;
|
|
48
48
|
handleRemoveAccount?: any;
|
|
49
49
|
removeAccountState?: any;
|
|
50
|
+
handleChangePromotions?: any;
|
|
51
|
+
notificationsGroup?: any;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
export interface AddressListParams {
|
|
@@ -80,6 +82,7 @@ export interface AddressFormParams {
|
|
|
80
82
|
saveAddress?: any,
|
|
81
83
|
userCustomerSetup?: boolean,
|
|
82
84
|
isRequiredField?: (field: string) => {},
|
|
85
|
+
showField?: (field: string) => {},
|
|
83
86
|
isGuestUser?: boolean,
|
|
84
87
|
useValidationFileds?: boolean,
|
|
85
88
|
isSelectedAfterAdd?: boolean,
|
|
@@ -110,9 +113,20 @@ export interface SignupParams {
|
|
|
110
113
|
handleSendVerifyCode?: any;
|
|
111
114
|
handleCheckPhoneCode?: any;
|
|
112
115
|
notificationState?: any;
|
|
116
|
+
signUpTab?: string;
|
|
117
|
+
useSignUpFullDetails?: boolean;
|
|
118
|
+
useSignUpOtpEmail?: boolean;
|
|
119
|
+
useSignUpOtpCellphone?: boolean;
|
|
120
|
+
willVerifyOtpState?: boolean;
|
|
121
|
+
numOtpInputs?: number;
|
|
113
122
|
handleChangePromotions: () => void;
|
|
123
|
+
handleChangeInput?: (in1: any, in2: any) => void;
|
|
114
124
|
enableReCaptcha?: boolean;
|
|
115
|
-
|
|
125
|
+
generateOtpCode?: (in1?: any) => void;
|
|
126
|
+
handleReCaptcha?: (token?: any) => void;
|
|
127
|
+
setSignUpTab?: (in1: string) => void;
|
|
128
|
+
setWillVerifyOtpState?: (in1: boolean) => void;
|
|
129
|
+
setOtpState?: (in1: string) => void;
|
|
116
130
|
}
|
|
117
131
|
|
|
118
132
|
export interface PhoneInputParams {
|
|
@@ -158,6 +172,7 @@ export interface BusinessesListingParams {
|
|
|
158
172
|
priceLevelSelected?: any;
|
|
159
173
|
handleChangePriceLevel?: any;
|
|
160
174
|
businessTypeSelected?: any;
|
|
175
|
+
logosLayout?: boolean;
|
|
161
176
|
}
|
|
162
177
|
export interface HighestRatedBusinessesParams {
|
|
163
178
|
businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
|
|
@@ -202,6 +217,8 @@ export interface BusinessControllerParams {
|
|
|
202
217
|
handleFavoriteBusiness?: any,
|
|
203
218
|
setFavoriteIds?: any;
|
|
204
219
|
handleUpdateBusinessList?: any;
|
|
220
|
+
enableIntersection?: boolean;
|
|
221
|
+
handleCustomUpdate?: (businessId: number, changes: any) => {};
|
|
205
222
|
}
|
|
206
223
|
export interface BusinessProductsListingParams {
|
|
207
224
|
navigation?: any;
|
|
@@ -275,18 +292,24 @@ export interface BusinessProductsListParams {
|
|
|
275
292
|
onClickCategory?: any,
|
|
276
293
|
lazyLoadProductsRecommended?: boolean,
|
|
277
294
|
isFiltMode?: boolean,
|
|
278
|
-
handleUpdateProducts?: any
|
|
295
|
+
handleUpdateProducts?: any,
|
|
296
|
+
navigation?: any;
|
|
297
|
+
previouslyProducts?: any;
|
|
279
298
|
}
|
|
280
299
|
export interface SingleProductCardParams {
|
|
281
|
-
businessId: any
|
|
300
|
+
businessId: any;
|
|
282
301
|
product: any;
|
|
283
302
|
isSoldOut: boolean;
|
|
284
303
|
onProductClick: any;
|
|
285
304
|
productAddedToCartLength: number;
|
|
286
|
-
style?: ViewStyle
|
|
287
|
-
categoryState?: any
|
|
288
|
-
handleFavoriteProduct?: any
|
|
289
|
-
handleUpdateProducts?: any
|
|
305
|
+
style?: ViewStyle;
|
|
306
|
+
categoryState?: any;
|
|
307
|
+
handleFavoriteProduct?: any;
|
|
308
|
+
handleUpdateProducts?: any;
|
|
309
|
+
enableIntersection?: boolean;
|
|
310
|
+
navigation?: any;
|
|
311
|
+
isPreviously?: any;
|
|
312
|
+
isProductId?: any;
|
|
290
313
|
}
|
|
291
314
|
export interface BusinessInformationParams {
|
|
292
315
|
navigation?: any,
|
|
@@ -341,6 +364,8 @@ export interface OrdersOptionParams {
|
|
|
341
364
|
refreshOrders?: boolean,
|
|
342
365
|
setRefreshOrders?: (value: boolean) => void,
|
|
343
366
|
handleUpdateOrderList?: (orderId: number, changes: any) => {},
|
|
367
|
+
handleUpdateProducts?: (productId: number, changes: any) => {},
|
|
368
|
+
handleUpdateBusinesses?: (businessId: number, changes: any) => {},
|
|
344
369
|
isBusiness?: boolean,
|
|
345
370
|
isProducts?: boolean,
|
|
346
371
|
businessOrderIds?: any,
|
|
@@ -348,6 +373,8 @@ export interface OrdersOptionParams {
|
|
|
348
373
|
businessesSearchList?: any,
|
|
349
374
|
hideOrders?: boolean,
|
|
350
375
|
BusinessControllerSkeletons?: any,
|
|
376
|
+
businessPaginationProps?: any,
|
|
377
|
+
businesses?: any
|
|
351
378
|
}
|
|
352
379
|
export interface ActiveOrdersParams {
|
|
353
380
|
orders?: any,
|
|
@@ -369,6 +396,7 @@ export interface PreviousOrdersParams {
|
|
|
369
396
|
getOrderStatus?: any,
|
|
370
397
|
orderID?: number
|
|
371
398
|
reorderLoading?: boolean,
|
|
399
|
+
loading?: boolean,
|
|
372
400
|
loadMoreOrders?: () => {},
|
|
373
401
|
handleReorder?: (orderId: number) => {},
|
|
374
402
|
onNavigationRedirect?: (route: string, params?: any) => {}
|
|
@@ -404,25 +432,26 @@ export interface ProductItemAccordionParams {
|
|
|
404
432
|
isFromCheckout?: any
|
|
405
433
|
}
|
|
406
434
|
export interface ReviewOrderParams {
|
|
407
|
-
order?: { id: number,
|
|
408
|
-
stars?: any
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
435
|
+
order?: { id: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any };
|
|
436
|
+
stars?: any;
|
|
437
|
+
defaultStar?: number;
|
|
438
|
+
handleChangeInput?: any;
|
|
439
|
+
handleChangeRating?: any;
|
|
440
|
+
handleSendReview?: any;
|
|
441
|
+
formState?: any;
|
|
442
|
+
navigation?: any;
|
|
443
|
+
setIsReviewed?: (isReviewed: boolean) => void;
|
|
444
|
+
handleReviewState?: any;
|
|
445
|
+
setStars?: any;
|
|
446
|
+
onNavigationRedirect?: any;
|
|
418
447
|
}
|
|
419
448
|
export interface ReviewProductParams {
|
|
420
449
|
navigation?: any,
|
|
421
450
|
onNavigationRedirect?: any,
|
|
422
|
-
order?: { orderId: number,
|
|
451
|
+
order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
|
|
423
452
|
formState?: any,
|
|
424
453
|
handleChangeFormState?: any,
|
|
425
|
-
handleSendProductReview?: any
|
|
454
|
+
handleSendProductReview?: any;
|
|
426
455
|
}
|
|
427
456
|
export interface SingleProductReviewParams {
|
|
428
457
|
product: any,
|
|
@@ -432,12 +461,12 @@ export interface SingleProductReviewParams {
|
|
|
432
461
|
export interface ReviewDriverParams {
|
|
433
462
|
navigation?: any,
|
|
434
463
|
onNavigationRedirect?: any,
|
|
435
|
-
order?: { orderId: number,
|
|
464
|
+
order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
|
|
436
465
|
formState?: any,
|
|
437
466
|
setIsDriverReviewed?: (isReviewed: boolean) => {},
|
|
438
467
|
dirverReviews?: any,
|
|
439
468
|
setDriverReviews?: any,
|
|
440
|
-
handleSendDriverReview?: any
|
|
469
|
+
handleSendDriverReview?: any;
|
|
441
470
|
}
|
|
442
471
|
export interface MessagesParams {
|
|
443
472
|
type?: string,
|
|
@@ -535,7 +564,9 @@ export interface OrderTypeSelectParams {
|
|
|
535
564
|
defaultValue?: number;
|
|
536
565
|
configTypes?: Array<any>;
|
|
537
566
|
orderTypes: Array<any>;
|
|
538
|
-
setOrderTypeValue?: (value: number) => any
|
|
567
|
+
setOrderTypeValue?: (value: number) => any,
|
|
568
|
+
isChewLayout?: boolean;
|
|
569
|
+
chewOrderTypes?: any;
|
|
539
570
|
}
|
|
540
571
|
export interface UpsellingProductsParams {
|
|
541
572
|
isCustomMode?: boolean;
|
|
@@ -621,12 +652,20 @@ export interface NoNetworkParams {
|
|
|
621
652
|
}
|
|
622
653
|
|
|
623
654
|
export interface PlaceSpotParams {
|
|
624
|
-
|
|
655
|
+
isCheckout?: any,
|
|
656
|
+
isInputMode?: any,
|
|
625
657
|
cart?: any,
|
|
658
|
+
spotNumberDefault?: any,
|
|
659
|
+
vehicleDefault?: any,
|
|
660
|
+
spotNumber?: any,
|
|
661
|
+
setSpotNumber?: any,
|
|
662
|
+
orderTypes?: any,
|
|
626
663
|
placesState?: any,
|
|
627
664
|
handleChangePlace?: any,
|
|
628
|
-
|
|
629
|
-
|
|
665
|
+
spotState?: any,
|
|
666
|
+
vehicle?: any,
|
|
667
|
+
setVehicle?: any,
|
|
668
|
+
handleChangeSpot?: any
|
|
630
669
|
}
|
|
631
670
|
|
|
632
671
|
export interface PromotionParams {
|
|
@@ -651,7 +690,8 @@ export interface otpParams {
|
|
|
651
690
|
setWillVerifyOtpState: (val: boolean) => void,
|
|
652
691
|
onSubmit: () => void,
|
|
653
692
|
handleLoginOtp: (code: string) => void,
|
|
654
|
-
setAlertState: any
|
|
693
|
+
setAlertState: any;
|
|
694
|
+
pinCount: number;
|
|
655
695
|
}
|
|
656
696
|
|
|
657
697
|
export interface FavoriteParams {
|
|
@@ -677,7 +717,9 @@ export interface SingleOrderCardParams {
|
|
|
677
717
|
onNavigationRedirect?: (route: string, params?: any) => {},
|
|
678
718
|
pastOrders: any,
|
|
679
719
|
isMessageView?: any,
|
|
680
|
-
handleClickOrder: (value: any) => {}
|
|
720
|
+
handleClickOrder: (value: any) => {},
|
|
721
|
+
handleRemoveCart: () => {},
|
|
722
|
+
cartState: any
|
|
681
723
|
}
|
|
682
724
|
|
|
683
725
|
export interface PreviousBusinessOrderedParams {
|
|
@@ -687,7 +729,9 @@ export interface PreviousBusinessOrderedParams {
|
|
|
687
729
|
businessId?: number,
|
|
688
730
|
onNavigationRedirect?: any,
|
|
689
731
|
isBusinessesSearchList?: any,
|
|
690
|
-
businessLoading?: boolean
|
|
732
|
+
businessLoading?: boolean,
|
|
733
|
+
businesses?: any
|
|
734
|
+
handleUpdateBusinesses?: (businessId: number, changes: any) => {},
|
|
691
735
|
}
|
|
692
736
|
|
|
693
737
|
export interface ServiceFormParams {
|
|
@@ -699,7 +743,11 @@ export interface ServiceFormParams {
|
|
|
699
743
|
isSoldOut: boolean,
|
|
700
744
|
maxProductQuantity: any,
|
|
701
745
|
businessSlug?: string,
|
|
702
|
-
onClose: any
|
|
746
|
+
onClose: any,
|
|
747
|
+
professionalList: any,
|
|
748
|
+
productObject?: any,
|
|
749
|
+
professionalListState?: any,
|
|
750
|
+
isCartProduct?: any
|
|
703
751
|
}
|
|
704
752
|
|
|
705
753
|
export interface ProfessionalFilterParams {
|
|
@@ -714,8 +762,21 @@ export interface ProfessionalProfileParams {
|
|
|
714
762
|
onClose: any
|
|
715
763
|
}
|
|
716
764
|
|
|
765
|
+
export interface OrderItAgainParams {
|
|
766
|
+
onProductClick: any,
|
|
767
|
+
productList: any,
|
|
768
|
+
businessId: any,
|
|
769
|
+
categoryState: any,
|
|
770
|
+
currentCart: any,
|
|
771
|
+
handleUpdateProducts: any,
|
|
772
|
+
navigation: any,
|
|
773
|
+
searchValue?: string
|
|
774
|
+
}
|
|
775
|
+
|
|
717
776
|
export interface PreviousProductsOrderedParams {
|
|
718
777
|
products?: any,
|
|
778
|
+
isProductId?: boolean
|
|
719
779
|
onProductClick?: any,
|
|
720
780
|
isBusinessesSearchList?: boolean
|
|
781
|
+
handleUpdateProducts?: any
|
|
721
782
|
}
|