ordering-ui-react-native 0.16.13 → 0.16.14-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.
Files changed (213) hide show
  1. package/package.json +7 -4
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/ActiveOrders/index.tsx +61 -63
  4. package/src/components/ActiveOrders/styles.tsx +8 -14
  5. package/src/components/AddressForm/index.tsx +18 -2
  6. package/src/components/BusinessBasicInformation/index.tsx +11 -19
  7. package/src/components/BusinessController/index.tsx +10 -8
  8. package/src/components/BusinessInformation/index.tsx +22 -0
  9. package/src/components/BusinessProductsList/index.tsx +10 -10
  10. package/src/components/BusinessTypeFilter/index.tsx +1 -2
  11. package/src/components/BusinessesListing/index.tsx +1 -1
  12. package/src/components/Checkout/index.tsx +2 -1
  13. package/src/components/LanguageSelector/index.tsx +21 -16
  14. package/src/components/LoginForm/index.tsx +118 -30
  15. package/src/components/LoginForm/styles.tsx +6 -0
  16. package/src/components/Messages/index.tsx +2 -2
  17. package/src/components/NotificationSetting/index.tsx +85 -0
  18. package/src/components/OrderDetails/index.tsx +7 -21
  19. package/src/components/OrdersOption/index.tsx +54 -56
  20. package/src/components/PaymentOptions/index.tsx +335 -365
  21. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  22. package/src/components/ReviewDriver/index.tsx +1 -1
  23. package/src/components/ReviewOrder/index.tsx +2 -1
  24. package/src/components/ReviewProducts/index.tsx +11 -0
  25. package/src/components/SignupForm/index.tsx +143 -61
  26. package/src/components/SingleProductReview/index.tsx +8 -5
  27. package/src/components/StripeElementsForm/index.tsx +25 -16
  28. package/src/components/VerifyPhone/styles.tsx +1 -2
  29. package/src/components/shared/OBottomPopup.tsx +6 -2
  30. package/src/index.tsx +2 -0
  31. package/src/navigators/CheckoutNavigator.tsx +6 -0
  32. package/src/navigators/HomeNavigator.tsx +6 -0
  33. package/src/pages/BusinessesListing.tsx +7 -6
  34. package/src/pages/MultiCheckout.tsx +31 -0
  35. package/src/pages/MultiOrdersDetails.tsx +27 -0
  36. package/src/pages/OrderDetails.tsx +1 -1
  37. package/src/pages/ReviewDriver.tsx +2 -2
  38. package/src/pages/ReviewOrder.tsx +2 -2
  39. package/src/theme.json +0 -1
  40. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  41. package/src/types/index.tsx +13 -9
  42. package/src/utils/index.tsx +0 -1
  43. package/themes/business/index.tsx +4 -0
  44. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  45. package/themes/business/src/components/Chat/index.tsx +42 -34
  46. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  47. package/themes/business/src/components/DriverSchedule/index.tsx +71 -0
  48. package/themes/business/src/components/DriverSchedule/styles.tsx +6 -0
  49. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  50. package/themes/business/src/components/MapView/index.tsx +1 -1
  51. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  52. package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
  53. package/themes/business/src/components/OrderDetails/Delivery.tsx +3 -3
  54. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +19 -18
  55. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  56. package/themes/business/src/components/OrdersOption/index.tsx +65 -21
  57. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  58. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  59. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  60. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  61. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  62. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  63. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  64. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  65. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  66. package/themes/business/src/components/PreviousOrders/index.tsx +21 -23
  67. package/themes/business/src/components/ProductItemAccordion/index.tsx +5 -4
  68. package/themes/business/src/components/ReviewCustomer/index.tsx +1 -1
  69. package/themes/business/src/components/ScheduleBlocked/index.tsx +53 -0
  70. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  71. package/themes/business/src/components/UserProfileForm/index.tsx +28 -4
  72. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  73. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  74. package/themes/business/src/components/shared/OModal.tsx +40 -37
  75. package/themes/business/src/types/index.tsx +14 -9
  76. package/themes/business/src/utils/index.tsx +10 -0
  77. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  78. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  79. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  80. package/themes/kiosk/src/components/BusinessMenu/index.tsx +2 -1
  81. package/themes/kiosk/src/components/CartItem/index.tsx +4 -3
  82. package/themes/kiosk/src/components/CategoriesMenu/index.tsx +1 -0
  83. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  84. package/themes/kiosk/src/components/DrawerView/index.tsx +1 -0
  85. package/themes/kiosk/src/components/DrawerView/styles.tsx +2 -2
  86. package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
  87. package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
  88. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  89. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  90. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  91. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  92. package/themes/kiosk/src/types/index.d.ts +2 -0
  93. package/themes/original/index.tsx +16 -0
  94. package/themes/original/src/components/AddressForm/index.tsx +136 -133
  95. package/themes/original/src/components/AddressList/index.tsx +1 -1
  96. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  97. package/themes/original/src/components/BusinessBasicInformation/index.tsx +302 -160
  98. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
  99. package/themes/original/src/components/BusinessController/index.tsx +173 -108
  100. package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -9
  101. package/themes/original/src/components/BusinessItemAccordion/styles.tsx +3 -1
  102. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  103. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  104. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  105. package/themes/original/src/components/BusinessListingSearch/index.tsx +106 -126
  106. package/themes/original/src/components/BusinessListingSearch/styles.tsx +18 -13
  107. package/themes/original/src/components/BusinessProductsList/CategoryDescription/index.tsx +1 -1
  108. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  109. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  110. package/themes/original/src/components/BusinessProductsList/index.tsx +53 -53
  111. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  112. package/themes/original/src/components/BusinessProductsListing/index.tsx +290 -181
  113. package/themes/original/src/components/BusinessProductsListing/styles.tsx +18 -0
  114. package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
  115. package/themes/original/src/components/BusinessTypeFilter/index.tsx +109 -40
  116. package/themes/original/src/components/BusinessTypeFilter/styles.tsx +2 -0
  117. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +561 -0
  118. package/themes/original/src/components/BusinessesListing/{styles.tsx → Layout/Appointment/styles.tsx} +24 -2
  119. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +676 -0
  120. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +137 -0
  121. package/themes/original/src/components/BusinessesListing/index.tsx +100 -495
  122. package/themes/original/src/components/Cart/index.tsx +81 -36
  123. package/themes/original/src/components/Cart/styles.tsx +4 -0
  124. package/themes/original/src/components/CartContent/index.tsx +22 -16
  125. package/themes/original/src/components/Checkout/index.tsx +106 -66
  126. package/themes/original/src/components/Checkout/styles.tsx +0 -1
  127. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  128. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  129. package/themes/original/src/components/Favorite/index.tsx +1 -0
  130. package/themes/original/src/components/Favorite/styles.tsx +1 -0
  131. package/themes/original/src/components/FavoriteList/index.tsx +143 -94
  132. package/themes/original/src/components/GPSButton/index.tsx +20 -19
  133. package/themes/original/src/components/GoogleMap/index.tsx +20 -12
  134. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +8 -3
  135. package/themes/original/src/components/HelpGuide/index.tsx +8 -3
  136. package/themes/original/src/components/HelpOrder/index.tsx +8 -3
  137. package/themes/original/src/components/LoginForm/Otp/index.tsx +3 -2
  138. package/themes/original/src/components/LoginForm/index.tsx +79 -42
  139. package/themes/original/src/components/Messages/index.tsx +17 -17
  140. package/themes/original/src/components/MomentSelector/index.tsx +197 -0
  141. package/themes/original/src/components/MomentSelector/styles.tsx +6 -0
  142. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +243 -0
  143. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/styles.tsx +46 -0
  144. package/themes/original/src/components/MultiCheckout/index.tsx +304 -0
  145. package/themes/original/src/components/MultiCheckout/styles.tsx +59 -0
  146. package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +372 -0
  147. package/themes/original/src/components/MultiOrdersDetails/index.tsx +262 -0
  148. package/themes/original/src/components/MultiOrdersDetails/styles.tsx +50 -0
  149. package/themes/original/src/components/MyOrders/index.tsx +177 -27
  150. package/themes/original/src/components/MyOrders/styles.tsx +8 -1
  151. package/themes/original/src/components/NavBar/index.tsx +11 -5
  152. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  153. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  154. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
  155. package/themes/original/src/components/OrderDetails/index.tsx +187 -49
  156. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  157. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  158. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  159. package/themes/original/src/components/OrderProgress/index.tsx +8 -2
  160. package/themes/original/src/components/OrderSummary/index.tsx +1 -34
  161. package/themes/original/src/components/OrderTypeSelector/index.tsx +84 -36
  162. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  163. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +144 -0
  164. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +6 -0
  165. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +56 -0
  166. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +6 -0
  167. package/themes/original/src/components/OrdersOption/index.tsx +126 -37
  168. package/themes/original/src/components/OrdersOption/styles.tsx +4 -1
  169. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  170. package/themes/original/src/components/PaymentOptions/index.tsx +57 -37
  171. package/themes/original/src/components/PhoneInputNumber/index.tsx +4 -10
  172. package/themes/original/src/components/PlaceSpot/index.tsx +243 -47
  173. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  174. package/themes/original/src/components/ProductForm/index.tsx +712 -655
  175. package/themes/original/src/components/ProductForm/styles.tsx +9 -7
  176. package/themes/original/src/components/ProductItemAccordion/index.tsx +170 -128
  177. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  178. package/themes/original/src/components/ProfessionalFilter/index.tsx +129 -0
  179. package/themes/original/src/components/ProfessionalFilter/styles.tsx +0 -0
  180. package/themes/original/src/components/ProfessionalProfile/index.tsx +309 -0
  181. package/themes/original/src/components/ProfessionalProfile/styles.tsx +46 -0
  182. package/themes/original/src/components/ReviewDriver/index.tsx +6 -6
  183. package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
  184. package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
  185. package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
  186. package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
  187. package/themes/original/src/components/SearchBar/index.tsx +10 -5
  188. package/themes/original/src/components/ServiceForm/index.tsx +631 -0
  189. package/themes/original/src/components/ServiceForm/styles.tsx +50 -0
  190. package/themes/original/src/components/SignupForm/index.tsx +301 -158
  191. package/themes/original/src/components/SingleOrderCard/index.tsx +213 -177
  192. package/themes/original/src/components/SingleProductCard/index.tsx +198 -110
  193. package/themes/original/src/components/SingleProductCard/styles.tsx +2 -2
  194. package/themes/original/src/components/SingleProductReview/index.tsx +30 -3
  195. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  196. package/themes/original/src/components/StripeElementsForm/index.tsx +25 -9
  197. package/themes/original/src/components/StripeElementsForm/naked.tsx +2 -2
  198. package/themes/original/src/components/UpsellingProducts/index.tsx +14 -4
  199. package/themes/original/src/components/UserDetails/index.tsx +32 -18
  200. package/themes/original/src/components/UserFormDetails/index.tsx +107 -73
  201. package/themes/original/src/components/UserProfile/index.tsx +8 -1
  202. package/themes/original/src/components/UserProfileForm/index.tsx +15 -10
  203. package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
  204. package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
  205. package/themes/original/src/components/Wallets/index.tsx +174 -162
  206. package/themes/original/src/components/Wallets/styles.tsx +10 -8
  207. package/themes/original/src/components/shared/OBottomPopup.tsx +47 -14
  208. package/themes/original/src/components/shared/OButton.tsx +10 -3
  209. package/themes/original/src/components/shared/OInput.tsx +3 -2
  210. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  211. package/themes/original/src/types/index.tsx +163 -47
  212. package/themes/original/src/utils/index.tsx +77 -0
  213. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -141,6 +141,7 @@ const CategoriesMenu = (props: any): React.ReactElement => {
141
141
  }}
142
142
  >
143
143
  <Container nopadding nestedScrollEnabled>
144
+ {Platform.OS === 'android' && (<View style={{ paddingTop: 20 }} />)}
144
145
  <NavBar
145
146
  title={categories[curIndexCateg].name}
146
147
  onActionLeft={goToBack}
@@ -50,6 +50,12 @@ const CheckoutUI = (props: any) => {
50
50
  }
51
51
  }, [cart])
52
52
 
53
+ useEffect(() => {
54
+ if (!cartState.loading && cart && !cart?.valid && cart?.status === 2) {
55
+ navigation?.canGoBack() && navigation.goBack()
56
+ }
57
+ }, [cart])
58
+
53
59
  return (
54
60
  <>
55
61
  <PaymentOptions
@@ -53,5 +53,6 @@ const styles = StyleSheet.create({
53
53
  },
54
54
  shadowOpacity: 0.21,
55
55
  shadowRadius: 5,
56
+ elevation: 16
56
57
  }
57
58
  })
@@ -19,12 +19,12 @@ export const WrapperFloatBtn = styled.View`
19
19
  top: 10%;
20
20
  right: ${(props: any) => props.outside ? 11 : 58}%;
21
21
  z-index: 20002;
22
- elevation: 11;
22
+ elevation: 17;
23
23
  `;
24
24
 
25
25
  export const IconControl = styled.TouchableOpacity`
26
26
  background-color: ${(props: any) => props.theme.colors.white};
27
27
  padding: 10px;
28
28
  border-radius: 8px;
29
- elevation: 11;
29
+ elevation: 17;
30
30
  `;
@@ -1,10 +1,15 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import React, { useEffect, useState, useRef } from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
3
  import { useForm, Controller } from 'react-hook-form';
4
4
  import { useTheme } from 'styled-components/native';
5
+ import { TouchableOpacity } from 'react-native-gesture-handler';
6
+ import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
7
+ import Recaptcha from 'react-native-recaptcha-that-works'
8
+ import ReCaptcha from '@fatnlazycat/react-native-recaptcha-v3'
5
9
 
6
10
  import {
7
11
  LoginForm as LoginFormController,
12
+ useConfig,
8
13
  useLanguage,
9
14
  ToastType,
10
15
  useToast,
@@ -13,7 +18,8 @@ import {
13
18
 
14
19
  import {
15
20
  WelcomeTextContainer,
16
- LogoWrapper
21
+ LogoWrapper,
22
+ RecaptchaButton
17
23
  } from './styles';
18
24
 
19
25
  import { OText, OButton, OInput, OIcon } from '../shared';
@@ -26,14 +32,20 @@ const LoginFormUI = (props: LoginParams) => {
26
32
  loginButtonText,
27
33
  formState,
28
34
  handleButtonLoginClick,
29
- useRootPoint
35
+ useRootPoint,
36
+ handleReCaptcha,
37
+ enableReCaptcha
30
38
  } = props;
31
39
 
32
40
  const theme = useTheme()
41
+ const [{ configs }] = useConfig()
33
42
  const [ordering, { setOrdering }] = useApi();
34
43
  const [, { showToast }] = useToast();
35
44
  const [, t] = useLanguage();
36
- const {control, handleSubmit, formState: {errors}} = useForm();
45
+ const [recaptchaConfig, setRecaptchaConfig] = useState<any>({})
46
+ const [recaptchaVerified, setRecaptchaVerified] = useState(false)
47
+ const recaptchaRef = useRef<any>({});
48
+ const { control, handleSubmit, formState: { errors } } = useForm();
37
49
  const [orientationState] = useDeviceOrientation();
38
50
 
39
51
  const [formsStateValues, setFormsStateValues] = useState<any>({ isSubmitted: false })
@@ -60,6 +72,25 @@ const LoginFormUI = (props: LoginParams) => {
60
72
  onChange(value.toLowerCase().replace(/[&,()%";:ç?<>{}\\[\]\s]/g, ''));
61
73
  };
62
74
 
75
+ const handleOpenRecaptcha = () => {
76
+ setRecaptchaVerified(false)
77
+ if (!recaptchaConfig?.siteKey) {
78
+ showToast(ToastType.Error, t('NO_RECAPTCHA_SITE_KEY', 'The config doesn\'t have recaptcha site key'));
79
+ return
80
+ }
81
+ if (!recaptchaConfig?.baseUrl) {
82
+ showToast(ToastType.Error, t('NO_RECAPTCHA_BASE_URL', 'The config doesn\'t have recaptcha base url'));
83
+ return
84
+ }
85
+
86
+ recaptchaRef.current.open()
87
+ }
88
+
89
+ const onRecaptchaVerify = (token: any) => {
90
+ setRecaptchaVerified(true)
91
+ handleReCaptcha && handleReCaptcha({ code: token, version: recaptchaConfig?.version })
92
+ }
93
+
63
94
  const styles = StyleSheet.create({
64
95
  logo: {
65
96
  height: 80,
@@ -87,6 +118,20 @@ const LoginFormUI = (props: LoginParams) => {
87
118
 
88
119
  useEffect(() => {
89
120
  if (!formState.loading && formState.result?.error) {
121
+ if (formState.result?.result?.[0] === 'ERROR_AUTH_VERIFICATION_CODE') {
122
+ setRecaptchaVerified(false)
123
+ setRecaptchaConfig({
124
+ version: 'v2',
125
+ siteKey: configs?.security_recaptcha_site_key?.value || null,
126
+ baseUrl: configs?.security_recaptcha_base_url?.value || null
127
+ })
128
+ showToast(ToastType.Info, t('TRY_AGAIN', 'Please try again'))
129
+ setFormsStateValues({
130
+ ...formsStateValues,
131
+ isSubmitted: false,
132
+ })
133
+ return
134
+ }
90
135
  formState.result?.result && showToast(
91
136
  ToastType.Error,
92
137
  typeof formState.result?.result === 'string'
@@ -122,9 +167,32 @@ const LoginFormUI = (props: LoginParams) => {
122
167
  }
123
168
  }, [errors]);
124
169
 
170
+ useEffect(() => {
171
+ if (configs && Object.keys(configs).length > 0 && enableReCaptcha) {
172
+ if (configs?.security_recaptcha_type?.value === 'v3' &&
173
+ configs?.security_recaptcha_score_v3?.value > 0 &&
174
+ configs?.security_recaptcha_site_key_v3?.value
175
+ ) {
176
+ setRecaptchaConfig({
177
+ version: 'v3',
178
+ siteKey: configs?.security_recaptcha_site_key_v3?.value || null,
179
+ baseUrl: configs?.security_recaptcha_base_url?.value || null
180
+ })
181
+ return
182
+ }
183
+ if (configs?.security_recaptcha_site_key?.value) {
184
+ setRecaptchaConfig({
185
+ version: 'v2',
186
+ siteKey: configs?.security_recaptcha_site_key?.value || null,
187
+ baseUrl: configs?.security_recaptcha_base_url?.value || null
188
+ })
189
+ }
190
+ }
191
+ }, [configs, enableReCaptcha])
192
+
125
193
  const logo = (
126
194
  <LogoWrapper>
127
- <OIcon src={theme.images.logos.logotype} style={styles.logo}/>
195
+ <OIcon src={theme.images.logos.logotype} style={styles.logo} />
128
196
  </LogoWrapper>
129
197
  );
130
198
 
@@ -144,7 +212,7 @@ const LoginFormUI = (props: LoginParams) => {
144
212
  value={value}
145
213
  autoCapitalize='none'
146
214
  autoCorrect={false}
147
- inputStyle={{textAlign: 'center'}}
215
+ inputStyle={{ textAlign: 'center' }}
148
216
  onChange={(e: any) => {
149
217
  onChange(e?.target?.value);
150
218
  setFormsStateValues({
@@ -167,7 +235,7 @@ const LoginFormUI = (props: LoginParams) => {
167
235
  autoCapitalize="none"
168
236
  autoCorrect={false}
169
237
  type="email-address"
170
- inputStyle={{textAlign: 'center'}}
238
+ inputStyle={{ textAlign: 'center' }}
171
239
  onChange={(e: any) => {
172
240
  handleChangeInputEmail(e, onChange);
173
241
  }}
@@ -199,7 +267,7 @@ const LoginFormUI = (props: LoginParams) => {
199
267
  style={styles.inputStyle}
200
268
  value={value}
201
269
  onChange={(val: any) => onChange(val)}
202
- inputStyle={{textAlign: 'center'}}
270
+ inputStyle={{ textAlign: 'center' }}
203
271
  />
204
272
  )}
205
273
  name="password"
@@ -211,7 +279,49 @@ const LoginFormUI = (props: LoginParams) => {
211
279
  }}
212
280
  defaultValue=""
213
281
  />
214
-
282
+ {(recaptchaConfig?.version) && (
283
+ <>
284
+ {recaptchaConfig?.version === 'v3' ? (
285
+ <ReCaptcha
286
+ url={recaptchaConfig?.baseUrl}
287
+ siteKey={recaptchaConfig?.siteKey}
288
+ containerStyle={{ height: 40 }}
289
+ onExecute={onRecaptchaVerify}
290
+ reCaptchaType={1}
291
+ />
292
+ ) : (
293
+ <>
294
+ <TouchableOpacity
295
+ onPress={handleOpenRecaptcha}
296
+ >
297
+ <RecaptchaButton>
298
+ {recaptchaVerified ? (
299
+ <MaterialCommunityIcons
300
+ name="checkbox-marked"
301
+ size={26}
302
+ color={theme.colors.primary}
303
+ />
304
+ ) : (
305
+ <MaterialCommunityIcons
306
+ name="checkbox-blank-outline"
307
+ size={26}
308
+ color={theme.colors.mediumGray}
309
+ />
310
+ )}
311
+ <OText size={14} mLeft={8}>{t('VERIFY_ReCAPTCHA', 'Verify reCAPTCHA')}</OText>
312
+ </RecaptchaButton>
313
+ </TouchableOpacity>
314
+ <Recaptcha
315
+ ref={recaptchaRef}
316
+ siteKey={recaptchaConfig?.siteKey}
317
+ baseUrl={recaptchaConfig?.baseUrl}
318
+ onVerify={onRecaptchaVerify}
319
+ onExpire={() => setRecaptchaVerified(false)}
320
+ />
321
+ </>)
322
+ }
323
+ </>
324
+ )}
215
325
  <OButton
216
326
  onClick={handleSubmit(onSubmit)}
217
327
  text={loginButtonText}
@@ -280,7 +390,7 @@ const LoginFormUI = (props: LoginParams) => {
280
390
  ? 0 : 0,
281
391
  }}
282
392
  >
283
- { welcome }
393
+ {welcome}
284
394
  {orientationState?.orientation === LANDSCAPE && (
285
395
  <View style={{
286
396
  justifyContent: 'flex-end',
@@ -327,6 +437,7 @@ export const LoginForm = (props: any) => {
327
437
  const loginProps = {
328
438
  ...props,
329
439
  UIComponent: LoginFormUI,
440
+ isRecaptchaEnable: true
330
441
  };
331
442
  return <LoginFormController {...loginProps} />;
332
443
  };
@@ -7,3 +7,8 @@ export const LogoWrapper = styled.View`
7
7
  export const WelcomeTextContainer = styled.View`
8
8
  margin-bottom: 30px;
9
9
  `;
10
+ export const RecaptchaButton = styled.View`
11
+ flex-direction: row;
12
+ align-items: center;
13
+ margin-bottom: 10px;
14
+ `
@@ -4,6 +4,7 @@ import { OIcon, OButton, OText } from '../shared'
4
4
  import { ImageStyle, TextStyle, View, Platform, TouchableOpacity } from 'react-native'
5
5
  import { useConfig, useLanguage, useOrder } from 'ordering-components/native'
6
6
  import { useTheme } from 'styled-components/native'
7
+
7
8
  const Wrapper = styled.View`
8
9
  background-color: ${(props: any) => props.theme.colors.white};
9
10
  padding: 10px 0px 20px 0px;
@@ -65,28 +66,27 @@ const NavBar = (props: Props) => {
65
66
 
66
67
  return (
67
68
  <Wrapper style={{ paddingTop: props.paddingTop, ...props.style }}>
68
- {(props?.onActionLeft) && (
69
+ {(props?.onActionLeft || props?.leftImg) && (
69
70
  <OButton
70
- imgLeftSrc={props.leftImg}
71
+ imgLeftSrc={props.leftImg || theme.images.general.arrow_left}
71
72
  imgRightSrc={null}
72
73
  style={{ ...btnBackArrow, ...props.btnStyle }}
73
74
  onClick={props.onActionLeft}
74
- imgLeftStyle={props.imgLeftStyle}
75
- {...(!props.leftImg && { iconProps: { name: 'arrowleft', size: 28, color: props.btnStyle?.color } })}
75
+ imgLeftStyle= {props.imgLeftStyle}
76
76
  />)
77
77
  }
78
78
  <TitleTopWrapper>
79
79
  {props.withIcon
80
80
  ? (
81
- <OIcon
82
- url={props.icon}
83
- style={{
84
- borderColor: theme.colors.lightGray,
85
- borderRadius: 20,
86
- }}
87
- width={60}
88
- height={60}
89
- />
81
+ <OIcon
82
+ url={props.icon}
83
+ style={{
84
+ borderColor: theme.colors.lightGray,
85
+ borderRadius: 20,
86
+ }}
87
+ width={60}
88
+ height={60}
89
+ />
90
90
  )
91
91
  : null
92
92
  }
@@ -134,7 +134,7 @@ const NavBar = (props: Props) => {
134
134
  </View>
135
135
  )}
136
136
 
137
- {props.rightComponent}
137
+ { props.rightComponent }
138
138
  </Wrapper>
139
139
  )
140
140
  }
@@ -95,7 +95,7 @@ interface Props {
95
95
  style?: ViewStyle;
96
96
  bgImage: ImageSourcePropType;
97
97
  innerStyle?: ViewStyle;
98
- icon?: ImageSourcePropType;
98
+ icon: ImageSourcePropType;
99
99
  iconStyle?: ImageStyle;
100
100
  callToActionText: string;
101
101
  callToActionTextStyle?: TextStyle;
@@ -15,8 +15,6 @@ import { Container } from '../../layouts/Container'
15
15
  import NavBar from '../NavBar'
16
16
  import { LANDSCAPE, PORTRAIT, useDeviceOrientation } from '../../../../../src/hooks/DeviceOrientation'
17
17
  import GridContainer from '../../layouts/GridContainer'
18
- import AntDesignIcon from 'react-native-vector-icons/AntDesign'
19
- import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons'
20
18
 
21
19
  const OrderTypeSelectorCardUI = (props: OrderTypeSelectParams) => {
22
20
  const {
@@ -29,7 +27,7 @@ const OrderTypeSelectorCardUI = (props: OrderTypeSelectParams) => {
29
27
  callback
30
28
  } = props
31
29
 
32
- const theme = useTheme();
30
+ const theme = useTheme();
33
31
  const [, t] = useLanguage();
34
32
  const [orientationState] = useDeviceOrientation();
35
33
  const [orderState] = useOrder()
@@ -47,7 +45,7 @@ const OrderTypeSelectorCardUI = (props: OrderTypeSelectParams) => {
47
45
  }
48
46
 
49
47
  useEffect(() => {
50
- if (isCardCliked) {
48
+ if(isCardCliked){
51
49
  callback?.()
52
50
  setIsCardClicked(false)
53
51
  setIsLoadingCard(null)
@@ -85,13 +83,13 @@ const OrderTypeSelectorCardUI = (props: OrderTypeSelectParams) => {
85
83
  style={cardStyle}
86
84
  isDisabled={isCardCliked}
87
85
  isLoading={isLoadingCard === 'Eat In'}
88
- title={t('EAT_IN', 'Eat In')}
86
+ title={t('EAT_IN','Eat In')}
89
87
  description={t('EAT_IN_DESCRIPTION', 'We are very glad to have you here. Bon appetit!')}
90
88
  bgImage={theme.images.general.eatIn}
91
- VectorIcon={() => <MaterialIcon name='pin-outline' size={28} color='white' style={{ marginBottom: 10 }} />}
89
+ icon={theme.images.general.pushPin}
92
90
  callToActionText={t('START_MY_ORDER', 'Start my order')}
93
91
  onClick={() => {
94
- if (_eatIn?.value !== orderState?.options?.type) {
92
+ if(_eatIn?.value !== orderState?.options?.type){
95
93
  handleChangeOrderType(_eatIn?.value);
96
94
  setIsCardClicked(true)
97
95
  setIsLoadingCard('Eat In')
@@ -108,15 +106,15 @@ const OrderTypeSelectorCardUI = (props: OrderTypeSelectParams) => {
108
106
 
109
107
  <OptionCard
110
108
  style={cardStyle}
111
- title={t('TAKE_OUT', 'Take out')}
109
+ title={t('TAKE_OUT','Take out')}
112
110
  isDisabled={isCardCliked}
113
111
  isLoading={isLoadingCard === 'Take out'}
114
112
  description={t('TAKE_OUT_DESCRIPTION', 'You are very welcome anytime you visit us!')}
115
113
  bgImage={theme.images.general.takeOut}
116
- VectorIcon={() => <AntDesignIcon name='shoppingcart' size={28} color='white' style={{ marginBottom: 10 }} />}
114
+ icon={theme.images.general.shoppingCart}
117
115
  callToActionText={t('START_MY_ORDER', 'Start my order')}
118
116
  onClick={() => {
119
- if (_takeOut?.value !== orderState?.options?.type) {
117
+ if(_takeOut?.value !== orderState?.options?.type){
120
118
  handleChangeOrderType(_takeOut?.value);
121
119
  setIsCardClicked(true)
122
120
  setIsLoadingCard('Take out')
@@ -10,8 +10,6 @@ import {
10
10
 
11
11
  import * as React from 'react';
12
12
  import styled from 'styled-components/native';
13
- import AntDesignIcon from 'react-native-vector-icons/AntDesign'
14
- import { Icon, IconProps } from 'react-native-vector-icons/Icon';
15
13
 
16
14
  const StyledButton = styled.View<Props>`
17
15
  background-color: ${(props: any) => props.theme.colors.primary};
@@ -79,19 +77,17 @@ interface Props {
79
77
  isCircle?: boolean;
80
78
  bgColor?: string;
81
79
  borderColor?: string;
82
- iconProps?: IconProps;
83
- IconCustom?: React.FunctionComponent
84
80
  }
85
81
 
86
82
  const OButton = (props: Props): React.ReactElement => {
87
83
  if (props.isDisabled) {
88
84
  return (
89
85
  <View style={props.parentStyle}>
90
- <StyledButtonDisabled style={props.style}>
91
- <StyledTextDisabled style={props.disabledTextStyle ? props.disabledTextStyle : props.textStyle}>
92
- {props.text}
93
- </StyledTextDisabled>
94
- </StyledButtonDisabled>
86
+ <StyledButtonDisabled style={props.style}>
87
+ <StyledTextDisabled style={props.disabledTextStyle ? props.disabledTextStyle : props.textStyle}>
88
+ {props.text}
89
+ </StyledTextDisabled>
90
+ </StyledButtonDisabled>
95
91
  </View>
96
92
  );
97
93
  }
@@ -115,15 +111,6 @@ const OButton = (props: Props): React.ReactElement => {
115
111
  {props.imgLeftSrc ? (
116
112
  <StyledImage style={props.imgLeftStyle} source={props.imgLeftSrc} />
117
113
  ) : null}
118
- {props.iconProps ? (
119
- <>
120
- {props?.IconCustom ? (
121
- <props.IconCustom {...props.iconProps} />
122
- ) : (
123
- <AntDesignIcon {...props.iconProps} />
124
- )}
125
- </>
126
- ) : null}
127
114
  {props.text ? (
128
115
  <StyledText style={props.textStyle}>{props.text}</StyledText>
129
116
  ) : null}
@@ -82,6 +82,8 @@ export interface LoginParams {
82
82
  handleSendVerifyCode?: any;
83
83
  handleCheckPhoneCode?: any;
84
84
  useRootPoint?: any;
85
+ enableReCaptcha?: boolean;
86
+ handleReCaptcha?: (vlaue: any) => void;
85
87
  }
86
88
 
87
89
  export interface ProductItemAccordionParams {
@@ -32,6 +32,7 @@ import { ReviewDriver } from './src/components/ReviewDriver';
32
32
  import { UserProfile } from './src/components/UserProfile';
33
33
  import { MessageListing } from './src/components/MessageListing';
34
34
  import { Messages } from './src/components/Messages';
35
+ import { MyOrders } from './src/components/MyOrders';
35
36
  import { Help } from './src/components/Help';
36
37
  import { HelpAccountAndPayment } from './src/components/HelpAccountAndPayment';
37
38
  import { HelpGuide } from './src/components/HelpGuide';
@@ -47,6 +48,8 @@ import { UpsellingProducts } from './src/components/UpsellingProducts';
47
48
  import { UserVerification } from './src/components/UserVerification';
48
49
  import { BusinessListingSearch } from './src/components/BusinessListingSearch';
49
50
  import { LastOrders } from './src/components/LastOrders';
51
+ import { MultiCheckout } from './src/components/MultiCheckout'
52
+ import { MultiOrdersDetails } from './src/components/MultiOrdersDetails'
50
53
  import NavBar from './src/components/NavBar';
51
54
  import { BusinessTypeFilter } from './src/components/BusinessTypeFilter';
52
55
  import { BusinessController } from './src/components/BusinessController';
@@ -56,6 +59,7 @@ import { PaymentOptions } from './src/components/PaymentOptions';
56
59
  import { DriverTips } from './src/components/DriverTips';
57
60
  import { UserDetails } from './src/components/UserDetails';
58
61
  import { OrderSummary } from './src/components/OrderSummary';
62
+ import { OrderItAgain } from './src/components/OrderItAgain';
59
63
  import { CartStoresListing } from './src/components/CartStoresListing';
60
64
  import { PaymentOptionsWebView } from '../../src/components/PaymentOptionsWebView';
61
65
  import { GoogleMap } from './src/components/GoogleMap';
@@ -67,6 +71,10 @@ import { BusinessItemAccordion } from './src/components/BusinessItemAccordion';
67
71
  import { CouponControl } from './src/components/CouponControl';
68
72
  import { TaxInformation } from './src/components/TaxInformation';
69
73
  import { PlaceSpot } from './src/components/PlaceSpot';
74
+ import { ProfessionalFilter } from './src/components/ProfessionalFilter';
75
+ import { ProfessionalProfile } from './src/components/ProfessionalProfile';
76
+ import { ServiceForm } from './src/components/ServiceForm';
77
+ import { MomentSelector } from './src/components/MomentSelector';
70
78
  import { Cart } from './src/components/Cart';
71
79
  import { LanguageSelector } from './src/components/LanguageSelector';
72
80
  import { PhoneInputNumber } from './src/components/PhoneInputNumber'
@@ -187,6 +195,8 @@ export {
187
195
  HelpAccountAndPayment,
188
196
  HelpGuide,
189
197
  HelpOrder,
198
+ MultiCheckout,
199
+ MultiOrdersDetails,
190
200
  NetworkError,
191
201
  NotFoundSource,
192
202
  OrderTypeSelector,
@@ -210,6 +220,7 @@ export {
210
220
  DriverTips,
211
221
  UserDetails,
212
222
  OrderSummary,
223
+ OrderItAgain,
213
224
  CartStoresListing,
214
225
  PaymentOptionsWebView,
215
226
  GoogleMap,
@@ -221,6 +232,10 @@ export {
221
232
  CouponControl,
222
233
  TaxInformation,
223
234
  PlaceSpot,
235
+ ProfessionalFilter,
236
+ ServiceForm,
237
+ ProfessionalProfile,
238
+ MomentSelector,
224
239
  Cart,
225
240
  LanguageSelector,
226
241
  PhoneInputNumber,
@@ -240,6 +255,7 @@ export {
240
255
  UserFormDetailsUI,
241
256
  WalletTransactionItem,
242
257
  Promotions,
258
+ MyOrders,
243
259
  ORDER_TYPES,
244
260
  USER_TYPE,
245
261