ordering-ui-react-native 0.16.35 → 0.16.36-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 (196) hide show
  1. package/package.json +7 -5
  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/BusinessBasicInformation/index.tsx +11 -19
  6. package/src/components/BusinessInformation/index.tsx +33 -4
  7. package/src/components/BusinessInformation/styles.tsx +2 -2
  8. package/src/components/BusinessProductsList/index.tsx +10 -10
  9. package/src/components/BusinessesListing/index.tsx +1 -1
  10. package/src/components/Checkout/index.tsx +2 -1
  11. package/src/components/LanguageSelector/index.tsx +21 -16
  12. package/src/components/LoginForm/index.tsx +15 -0
  13. package/src/components/Messages/index.tsx +2 -2
  14. package/src/components/NotificationSetting/index.tsx +85 -0
  15. package/src/components/OrderDetails/index.tsx +2 -20
  16. package/src/components/OrdersOption/index.tsx +54 -56
  17. package/src/components/PaymentOptions/index.tsx +335 -365
  18. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  19. package/src/components/ReviewDriver/index.tsx +1 -1
  20. package/src/components/ReviewOrder/index.tsx +2 -1
  21. package/src/components/ReviewProducts/index.tsx +11 -0
  22. package/src/components/SignupForm/index.tsx +15 -0
  23. package/src/components/SingleProductReview/index.tsx +8 -5
  24. package/src/components/StripeElementsForm/index.tsx +25 -16
  25. package/src/components/VerifyPhone/styles.tsx +1 -2
  26. package/src/components/shared/OBottomPopup.tsx +6 -2
  27. package/src/index.tsx +2 -0
  28. package/src/pages/BusinessesListing.tsx +7 -6
  29. package/src/pages/OrderDetails.tsx +1 -1
  30. package/src/pages/ReviewDriver.tsx +2 -2
  31. package/src/pages/ReviewOrder.tsx +2 -2
  32. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  33. package/src/utils/index.tsx +2 -1
  34. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  35. package/themes/business/src/components/Chat/index.tsx +38 -30
  36. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  37. package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
  38. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  39. package/themes/business/src/components/MapView/index.tsx +12 -1
  40. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  41. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
  42. package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
  43. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -19
  44. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  45. package/themes/business/src/components/OrdersOption/index.tsx +65 -21
  46. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  47. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  48. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  49. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  50. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  51. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  52. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  53. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  54. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  55. package/themes/business/src/components/PreviousOrders/index.tsx +21 -23
  56. package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
  57. package/themes/business/src/components/ReviewCustomer/index.tsx +27 -13
  58. package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
  59. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  60. package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
  61. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  62. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  63. package/themes/business/src/types/index.tsx +15 -9
  64. package/themes/business/src/utils/index.tsx +10 -0
  65. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  66. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  67. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  68. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
  69. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  70. package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
  71. package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
  72. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  73. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  74. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  75. package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
  76. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  77. package/themes/kiosk/src/types/index.d.ts +2 -0
  78. package/themes/original/index.tsx +4 -0
  79. package/themes/original/src/components/AddressDetails/index.tsx +2 -2
  80. package/themes/original/src/components/AddressForm/index.tsx +151 -140
  81. package/themes/original/src/components/AddressList/index.tsx +1 -1
  82. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  83. package/themes/original/src/components/BusinessBasicInformation/index.tsx +324 -162
  84. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
  85. package/themes/original/src/components/BusinessController/index.tsx +190 -113
  86. package/themes/original/src/components/BusinessController/styles.tsx +0 -7
  87. package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
  88. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  89. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  90. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  91. package/themes/original/src/components/BusinessListingSearch/index.tsx +80 -128
  92. package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
  93. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  94. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  95. package/themes/original/src/components/BusinessProductsList/index.tsx +49 -52
  96. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  97. package/themes/original/src/components/BusinessProductsListing/index.tsx +179 -104
  98. package/themes/original/src/components/BusinessProductsListing/styles.tsx +18 -11
  99. package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
  100. package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
  101. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +37 -25
  102. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -4
  103. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +278 -104
  104. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +47 -10
  105. package/themes/original/src/components/BusinessesListing/index.tsx +95 -7
  106. package/themes/original/src/components/Cart/index.tsx +54 -16
  107. package/themes/original/src/components/Cart/styles.tsx +4 -0
  108. package/themes/original/src/components/CartContent/index.tsx +22 -16
  109. package/themes/original/src/components/Checkout/index.tsx +109 -64
  110. package/themes/original/src/components/Checkout/styles.tsx +0 -1
  111. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  112. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  113. package/themes/original/src/components/Favorite/index.tsx +1 -0
  114. package/themes/original/src/components/FavoriteList/index.tsx +32 -2
  115. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  116. package/themes/original/src/components/GPSButton/index.tsx +20 -19
  117. package/themes/original/src/components/GoogleMap/index.tsx +20 -12
  118. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +25 -10
  119. package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +4 -0
  120. package/themes/original/src/components/HelpGuide/index.tsx +9 -8
  121. package/themes/original/src/components/HelpOrder/index.tsx +9 -8
  122. package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
  123. package/themes/original/src/components/LoginForm/Otp/index.tsx +95 -72
  124. package/themes/original/src/components/LoginForm/index.tsx +107 -50
  125. package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
  126. package/themes/original/src/components/Messages/index.tsx +17 -17
  127. package/themes/original/src/components/MomentOption/index.tsx +8 -6
  128. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -92
  129. package/themes/original/src/components/MultiCheckout/index.tsx +6 -0
  130. package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
  131. package/themes/original/src/components/MyOrders/index.tsx +70 -6
  132. package/themes/original/src/components/NavBar/index.tsx +15 -9
  133. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  134. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  135. package/themes/original/src/components/Notifications/index.tsx +148 -0
  136. package/themes/original/src/components/Notifications/styles.tsx +17 -0
  137. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
  138. package/themes/original/src/components/OrderDetails/index.tsx +200 -37
  139. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  140. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  141. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  142. package/themes/original/src/components/OrderProgress/index.tsx +77 -66
  143. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  144. package/themes/original/src/components/OrderSummary/index.tsx +3 -36
  145. package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
  146. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  147. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +97 -106
  148. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
  149. package/themes/original/src/components/OrdersOption/index.tsx +71 -55
  150. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  151. package/themes/original/src/components/PaymentOptions/index.tsx +41 -23
  152. package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
  153. package/themes/original/src/components/PlaceSpot/index.tsx +243 -47
  154. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  155. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  156. package/themes/original/src/components/ProductForm/index.tsx +635 -664
  157. package/themes/original/src/components/ProductForm/styles.tsx +9 -8
  158. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  159. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  160. package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
  161. package/themes/original/src/components/ProfessionalProfile/index.tsx +26 -14
  162. package/themes/original/src/components/ReviewDriver/index.tsx +7 -7
  163. package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
  164. package/themes/original/src/components/ReviewProducts/index.tsx +2 -2
  165. package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
  166. package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
  167. package/themes/original/src/components/SearchBar/index.tsx +5 -3
  168. package/themes/original/src/components/ServiceForm/index.tsx +410 -258
  169. package/themes/original/src/components/SignupForm/index.tsx +362 -210
  170. package/themes/original/src/components/SingleOrderCard/index.tsx +229 -181
  171. package/themes/original/src/components/SingleOrderCard/styles.tsx +0 -7
  172. package/themes/original/src/components/SingleProductCard/index.tsx +200 -110
  173. package/themes/original/src/components/SingleProductCard/styles.tsx +2 -10
  174. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  175. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  176. package/themes/original/src/components/StripeElementsForm/index.tsx +18 -7
  177. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
  178. package/themes/original/src/components/UserDetails/index.tsx +11 -2
  179. package/themes/original/src/components/UserFormDetails/index.tsx +67 -77
  180. package/themes/original/src/components/UserProfile/index.tsx +56 -31
  181. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  182. package/themes/original/src/components/UserProfileForm/index.tsx +10 -10
  183. package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
  184. package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
  185. package/themes/original/src/components/Wallets/index.tsx +176 -164
  186. package/themes/original/src/components/Wallets/styles.tsx +12 -8
  187. package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
  188. package/themes/original/src/components/shared/OBottomPopup.tsx +48 -15
  189. package/themes/original/src/components/shared/OButton.tsx +10 -3
  190. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  191. package/themes/original/src/components/shared/OInput.tsx +13 -3
  192. package/themes/original/src/layouts/Container.tsx +13 -9
  193. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  194. package/themes/original/src/types/index.tsx +91 -30
  195. package/themes/original/src/utils/index.tsx +121 -10
  196. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -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 {
@@ -51,6 +51,7 @@ import { LastOrders } from './src/components/LastOrders';
51
51
  import { MultiCheckout } from './src/components/MultiCheckout'
52
52
  import { MultiOrdersDetails } from './src/components/MultiOrdersDetails'
53
53
  import NavBar from './src/components/NavBar';
54
+ import { NotificationsList } from './src/components/Notifications'
54
55
  import { BusinessTypeFilter } from './src/components/BusinessTypeFilter';
55
56
  import { BusinessController } from './src/components/BusinessController';
56
57
  import { BusinessFeaturedController } from './src/components/BusinessFeaturedController';
@@ -59,6 +60,7 @@ import { PaymentOptions } from './src/components/PaymentOptions';
59
60
  import { DriverTips } from './src/components/DriverTips';
60
61
  import { UserDetails } from './src/components/UserDetails';
61
62
  import { OrderSummary } from './src/components/OrderSummary';
63
+ import { OrderItAgain } from './src/components/OrderItAgain';
62
64
  import { CartStoresListing } from './src/components/CartStoresListing';
63
65
  import { PaymentOptionsWebView } from '../../src/components/PaymentOptionsWebView';
64
66
  import { GoogleMap } from './src/components/GoogleMap';
@@ -182,6 +184,7 @@ export {
182
184
  OrderDetails,
183
185
  OrderProgress,
184
186
  BusinessPreorder,
187
+ NotificationsList,
185
188
  UserProfileForm,
186
189
  ReviewOrder,
187
190
  ReviewProducts,
@@ -219,6 +222,7 @@ export {
219
222
  DriverTips,
220
223
  UserDetails,
221
224
  OrderSummary,
225
+ OrderItAgain,
222
226
  CartStoresListing,
223
227
  PaymentOptionsWebView,
224
228
  GoogleMap,
@@ -28,7 +28,7 @@ const AddressDetailsUI = (props: any) => {
28
28
  size={16}
29
29
  lineHeight={24}
30
30
  color={theme.colors.textNormal}
31
- weight={'500'}>
31
+ >
32
32
  {t('DELIVERY_ADDRESS', 'Delivery address')}
33
33
  </OText>
34
34
  </ADHeader>
@@ -57,7 +57,7 @@ const AddressDetailsUI = (props: any) => {
57
57
  }>
58
58
  <OText
59
59
  size={12}
60
- color={theme.colors.textSecondary}
60
+ color={theme.colors.primary}
61
61
  style={{ textDecorationLine: 'underline' }}>
62
62
  {t('CHANGE', 'Change')}
63
63
  </OText>
@@ -5,7 +5,6 @@ import {
5
5
  TouchableOpacity,
6
6
  Keyboard,
7
7
  TouchableWithoutFeedback,
8
- KeyboardAvoidingView,
9
8
  Platform,
10
9
  } from 'react-native';
11
10
  import {
@@ -22,7 +21,7 @@ import Spinner from 'react-native-loading-spinner-overlay';
22
21
  import { useForm, Controller } from 'react-hook-form';
23
22
  import Geocoder from 'react-native-geocoding';
24
23
 
25
- import { OInput, OButton, OText, OModal, OIcon } from '../shared';
24
+ import { OInput, OButton, OModal, OIcon } from '../shared';
26
25
  import { AddressFormParams } from '../../types';
27
26
  import { getTraduction } from '../../utils';
28
27
  import { useTheme } from 'styled-components/native';
@@ -57,9 +56,9 @@ const AddressFormUI = (props: AddressFormParams) => {
57
56
  addressState,
58
57
  addressesList,
59
58
  saveAddress,
60
- userCustomerSetup,
61
59
  isGuestUser,
62
60
  isRequiredField,
61
+ showField,
63
62
  isFromProductsList,
64
63
  hasAddressDefault,
65
64
  afterSignup,
@@ -84,7 +83,6 @@ const AddressFormUI = (props: AddressFormParams) => {
84
83
  backgroundColor: theme.colors.clear
85
84
  },
86
85
  inputsStyle: {
87
- borderColor: theme.colors.border,
88
86
  borderRadius: 10,
89
87
  marginBottom: 20,
90
88
  height: 50,
@@ -93,7 +91,6 @@ const AddressFormUI = (props: AddressFormParams) => {
93
91
  flex: 1,
94
92
  },
95
93
  textAreaStyles: {
96
- borderColor: theme.colors.border,
97
94
  borderRadius: 10,
98
95
  marginBottom: 20,
99
96
  height: 104,
@@ -109,8 +106,8 @@ const AddressFormUI = (props: AddressFormParams) => {
109
106
  zIndex: 1002,
110
107
  },
111
108
  wrapperNavbar: Platform.OS === 'ios'
112
- ? { paddingVertical: 0, paddingHorizontal: 40 }
113
- : { paddingVertical: 20, paddingHorizontal: 40 }
109
+ ? { paddingVertical: 0, paddingHorizontal: 40 }
110
+ : { paddingVertical: 20, paddingHorizontal: 40 }
114
111
  });
115
112
 
116
113
  const [, t] = useLanguage();
@@ -141,6 +138,7 @@ const AddressFormUI = (props: AddressFormParams) => {
141
138
  const [isKeyboardShow, setIsKeyboardShow] = useState(false);
142
139
  const [isSignUpEffect, setIsSignUpEffect] = useState(false);
143
140
  const [hasEditing, setAddressEditing] = useState(false);
141
+ const [autoCompleteInputFocused, setAutoCompleteInputFocused] = useState(false)
144
142
 
145
143
  const googleInput: any = useRef(null);
146
144
  const internalNumberRef: any = useRef(null);
@@ -155,8 +153,8 @@ const AddressFormUI = (props: AddressFormParams) => {
155
153
  'true';
156
154
  const maxLimitLocation =
157
155
  configState?.configs?.meters_to_change_address?.value;
158
-
159
- const continueAsGuest = () => navigation.navigate('BusinessList');
156
+ const countryCode = configState?.configs?.country_autocomplete?.value
157
+ const continueAsGuest = () => navigation.navigate('BusinessList', { isGuestUser: true });
160
158
  const goToBack = () => navigation?.canGoBack() && navigation.goBack();
161
159
 
162
160
  const getAddressFormatted = (address: any) => {
@@ -203,6 +201,7 @@ const AddressFormUI = (props: AddressFormParams) => {
203
201
  saveAddress(data.address);
204
202
  if (isGuestUser) {
205
203
  continueAsGuest();
204
+ return;
206
205
  }
207
206
  if (!isGuestUser && !auth) {
208
207
  !isFromProductsList
@@ -544,7 +543,10 @@ const AddressFormUI = (props: AddressFormParams) => {
544
543
  onPress={(data, details: any) => {
545
544
  handleChangeAddress(data, details);
546
545
  }}
547
- query={{ key: googleMapsApiKey }}
546
+ query={{
547
+ key: googleMapsApiKey,
548
+ components: countryCode && countryCode !== '*' ? `country:${countryCode}` : ''
549
+ }}
548
550
  fetchDetails
549
551
  ref={googleInput}
550
552
  textInputProps={{
@@ -563,6 +565,8 @@ const AddressFormUI = (props: AddressFormParams) => {
563
565
  autoCorrect: false,
564
566
  blurOnSubmit: false,
565
567
  returnKeyType: 'next',
568
+ onFocus: () => setAutoCompleteInputFocused(true),
569
+ onBlur: () => setAutoCompleteInputFocused(false)
566
570
  }}
567
571
  onFail={(error) =>
568
572
  setAlertState({
@@ -586,45 +590,40 @@ const AddressFormUI = (props: AddressFormParams) => {
586
590
  textInput: {
587
591
  borderWidth: 1,
588
592
  borderRadius: 7.6,
589
- borderColor: theme.colors.border,
593
+ borderColor: autoCompleteInputFocused ? theme.colors.primary : theme.colors.border,
590
594
  flexGrow: 1,
591
595
  fontSize: 15,
592
- paddingHorizontal: 16,
596
+ paddingLeft: 16,
597
+ paddingRight: 32,
593
598
  minHeight: 50,
594
599
  fontFamily: 'Poppins-Regular',
595
- marginBottom: 24,
600
+ marginBottom: 24
596
601
  },
597
602
  }}
598
603
  />
599
604
  )}
600
605
  />
601
- {hasEditing ? (
602
- <View style={styles.pinIcon}>
603
- <GPSButton
604
- apiKey={googleMapsApiKey}
605
- handleGPS={(data: any, detail: any) => {
606
- handleChangeAddress(data, detail);
607
- setValue(data.address);
608
- if (googleInput?.current) {
609
- googleInput?.current?.setAddressText( data.address );
610
- }
611
- }}
612
- IconButton={<OIcon src={theme.images.general.pin} width={16} />}
613
- />
614
- </View>
615
- ) : null}
616
- </AutocompleteInput>
617
606
 
618
- {/* {!isKeyboardShow && (addressState?.address?.location || formState?.changes?.location) && (
619
- <TouchableOpacity onPress={handleToggleMap} style={{ marginBottom: 10 }}>
620
- <OText
621
- color={theme.colors.primary}
622
- style={{ textAlign: 'center' }}
623
- >
624
- {t('VIEW_MAP', 'View map to modify the exact location')}
625
- </OText>
626
- </TouchableOpacity>
627
- )} */}
607
+ {(
608
+ ((!isEditing && !isGuestUser) ||
609
+ (isEditing && !isGuestUser)) ||
610
+ (isGuestUser)) &&
611
+ (
612
+ <View style={styles.pinIcon}>
613
+ <GPSButton
614
+ apiKey={googleMapsApiKey}
615
+ handleGPS={(data: any, detail: any) => {
616
+ handleChangeAddress(data, detail);
617
+ setValue('address', data.address);
618
+ if (googleInput?.current) {
619
+ googleInput?.current?.setAddressText(data.address);
620
+ }
621
+ }}
622
+ IconButton={<OIcon src={theme.images.general.pin} width={16} />}
623
+ />
624
+ </View>
625
+ )}
626
+ </AutocompleteInput>
628
627
 
629
628
  {(locationChange || formState.changes?.location) && (
630
629
  <View
@@ -648,129 +647,141 @@ const AddressFormUI = (props: AddressFormParams) => {
648
647
  )}
649
648
 
650
649
  <View style={{ flexDirection: 'row', flexBasis: '50%' }}>
651
- <Controller
652
- control={control}
653
- name="internal_number"
654
- rules={{
655
- required:
656
- isRequiredField && isRequiredField('internal_number')
657
- ? t(
658
- `VALIDATION_ERROR_INTERNAL_NUMBER_REQUIRED`,
659
- `The field internal number is required`,
660
- )
661
- : null,
662
- }}
663
- defaultValue={
664
- address?.internal_number ||
665
- formState.changes?.internal_number ||
666
- addressState?.address?.internal_number ||
667
- ''
668
- }
669
- render={() => (
670
- <OInput
671
- name="internal_number"
672
- placeholder={t('INTERNAL_NUMBER', 'Internal number')}
673
- onChange={(text: string) => {
674
- handleChangeInput(text);
675
- setValue('internal_number', text);
676
- }}
677
- value={
678
- address?.internal_number ||
679
- formState.changes?.internal_number ||
680
- addressState?.address?.internal_number ||
681
- ''
682
- }
683
- style={{ ...styles.inputsStyle, marginRight: 24 }}
684
- forwardRef={internalNumberRef}
685
- returnKeyType="next"
686
- onSubmitEditing={() => zipCodeRef?.current?.focus?.()}
687
- blurOnSubmit={false}
688
- />
689
- )}
690
- />
650
+ {showField && showField('internal_number') && (
651
+ <Controller
652
+ control={control}
653
+ name="internal_number"
654
+ rules={{
655
+ required:
656
+ isRequiredField && isRequiredField('internal_number')
657
+ ? t(
658
+ `VALIDATION_ERROR_INTERNAL_NUMBER_REQUIRED`,
659
+ `The field internal number is required`,
660
+ )
661
+ : null,
662
+ }}
663
+ defaultValue={
664
+ address?.internal_number ||
665
+ formState.changes?.internal_number ||
666
+ addressState?.address?.internal_number ||
667
+ ''
668
+ }
669
+ render={() => (
670
+ <OInput
671
+ name="internal_number"
672
+ placeholder={t('INTERNAL_NUMBER', 'Internal number')}
673
+ onChange={(text: string) => {
674
+ handleChangeInput(text);
675
+ setValue('internal_number', text);
676
+ }}
677
+ value={
678
+ address?.internal_number ||
679
+ formState.changes?.internal_number ||
680
+ addressState?.address?.internal_number ||
681
+ ''
682
+ }
683
+ isFocusHighlight
684
+ style={{
685
+ ...styles.inputsStyle,
686
+ marginRight: showField('internal_number') && showField('zipcode') ? 24 : 0
687
+ }}
688
+ forwardRef={internalNumberRef}
689
+ returnKeyType="next"
690
+ onSubmitEditing={() => zipCodeRef?.current?.focus?.()}
691
+ blurOnSubmit={false}
692
+ />
693
+ )}
694
+ />
695
+ )}
691
696
 
697
+ {showField && showField('zipcode') && (
698
+ <Controller
699
+ control={control}
700
+ name="zipcode"
701
+ rules={{
702
+ required:
703
+ isRequiredField && isRequiredField('zipcode')
704
+ ? t(
705
+ `VALIDATION_ERROR_ZIP_CODE_REQUIRED`,
706
+ `The field Zip Code is required`,
707
+ )
708
+ : null,
709
+ }}
710
+ defaultValue={
711
+ address?.zipcode ||
712
+ formState.changes?.zipcode ||
713
+ addressState.address.zipcode ||
714
+ ''
715
+ }
716
+ render={() => (
717
+ <OInput
718
+ name="zipcode"
719
+ placeholder={t('ZIP_CODE', 'Zip code')}
720
+ onChange={(text: string) => {
721
+ handleChangeInput(text);
722
+ setValue('zipcode', text);
723
+ }}
724
+ value={
725
+ address?.zipcode ||
726
+ formState.changes?.zipcode ||
727
+ addressState.address.zipcode ||
728
+ ''
729
+ }
730
+ isFocusHighlight
731
+ style={styles.inputsStyle}
732
+ forwardRef={zipCodeRef}
733
+ returnKeyType="next"
734
+ onSubmitEditing={() => addressNotesRef?.current?.focus?.()}
735
+ blurOnSubmit={false}
736
+ />
737
+ )}
738
+ />
739
+ )}
740
+ </View>
741
+
742
+ {showField && showField('address_notes') && (
692
743
  <Controller
693
744
  control={control}
694
- name="zipcode"
745
+ name="address_notes"
695
746
  rules={{
696
747
  required:
697
- isRequiredField && isRequiredField('zipcode')
748
+ isRequiredField && isRequiredField('address_notes')
698
749
  ? t(
699
- `VALIDATION_ERROR_ZIP_CODE_REQUIRED`,
700
- `The field Zip Code is required`,
750
+ `VALIDATION_ERROR_ADDRESS_NOTES_REQUIRED`,
751
+ `The field address notes is required`,
701
752
  )
702
753
  : null,
703
754
  }}
704
755
  defaultValue={
705
- address?.zipcode ||
706
- formState.changes?.zipcode ||
707
- addressState.address.zipcode ||
756
+ address?.address_notes ||
757
+ formState.changes?.address_notes ||
758
+ addressState.address.address_notes ||
708
759
  ''
709
760
  }
710
761
  render={() => (
711
762
  <OInput
712
- name="zipcode"
713
- placeholder={t('ZIP_CODE', 'Zip code')}
714
- onChange={(text: string) => {
763
+ name="address_notes"
764
+ placeholder={t('ADDRESS_NOTES', 'Address notes')}
765
+ onChange={(text: any) => {
715
766
  handleChangeInput(text);
716
- setValue('zipcode', text);
767
+ setValue('address_notes', text);
717
768
  }}
718
769
  value={
719
- address?.zipcode ||
720
- formState.changes?.zipcode ||
721
- addressState.address.zipcode ||
770
+ address?.address_notes ||
771
+ formState.changes?.address_notes ||
772
+ addressState.address.address_notes ||
722
773
  ''
723
774
  }
724
- style={styles.inputsStyle}
725
- forwardRef={zipCodeRef}
726
- returnKeyType="next"
727
- onSubmitEditing={() => addressNotesRef?.current?.focus?.()}
728
- blurOnSubmit={false}
775
+ multiline
776
+ isFocusHighlight
777
+ style={styles.textAreaStyles}
778
+ returnKeyType="done"
779
+ forwardRef={addressNotesRef}
780
+ blurOnSubmit
729
781
  />
730
782
  )}
731
783
  />
732
- </View>
733
-
734
- <Controller
735
- control={control}
736
- name="address_notes"
737
- rules={{
738
- required:
739
- isRequiredField && isRequiredField('address_notes')
740
- ? t(
741
- `VALIDATION_ERROR_ADDRESS_NOTES_REQUIRED`,
742
- `The field address notes is required`,
743
- )
744
- : null,
745
- }}
746
- defaultValue={
747
- address?.address_notes ||
748
- formState.changes?.address_notes ||
749
- addressState.address.address_notes ||
750
- ''
751
- }
752
- render={() => (
753
- <OInput
754
- name="address_notes"
755
- placeholder={t('ADDRESS_NOTES', 'Address notes')}
756
- onChange={(text: any) => {
757
- handleChangeInput(text);
758
- setValue('address_notes', text);
759
- }}
760
- value={
761
- address?.address_notes ||
762
- formState.changes?.address_notes ||
763
- addressState.address.address_notes ||
764
- ''
765
- }
766
- multiline
767
- style={styles.textAreaStyles}
768
- returnKeyType="done"
769
- forwardRef={addressNotesRef}
770
- blurOnSubmit
771
- />
772
- )}
773
- />
784
+ )}
774
785
  </FormInput>
775
786
  <IconsContainer>
776
787
  {tagsName.map((tag) => (
@@ -56,7 +56,7 @@ const AddressListUI = (props: AddressListParams) => {
56
56
  }
57
57
 
58
58
  const uniqueAddressesList = (addressList.addresses && addressList.addresses.filter(
59
- (address: any, i: number, self: any) =>
59
+ (address: any, i: number, self: any) => address.address &&
60
60
  i === self.findIndex((obj: any) => (
61
61
  address.address === obj.address &&
62
62
  address.address_notes === obj.address_notes &&
@@ -21,7 +21,7 @@ export const AppleLogin = (props: any) => {
21
21
  const [{ configs }] = useConfig();
22
22
  const [credentialStateForUser, updateCredentialStateForUser] = useState<any>(-1);
23
23
 
24
- let user : any= null
24
+ let user: any = null
25
25
 
26
26
  const buttonText = auth
27
27
  ? t('CONTINUE_WITH_APPLE', 'Logout with Apple')
@@ -53,7 +53,7 @@ export const AppleLogin = (props: any) => {
53
53
  }
54
54
  }
55
55
 
56
- const fetchAndUpdateCredentialState = async (updateCredentialStateForUser : any) => {
56
+ const fetchAndUpdateCredentialState = async (updateCredentialStateForUser: any) => {
57
57
  if (user === null) {
58
58
  updateCredentialStateForUser('N/A');
59
59
  } else {
@@ -66,7 +66,7 @@ export const AppleLogin = (props: any) => {
66
66
  }
67
67
  }
68
68
 
69
- const onIOSButtonPress = async (updateCredentialStateForUser : any) => {
69
+ const onIOSButtonPress = async (updateCredentialStateForUser: any) => {
70
70
  try {
71
71
  const appleAuthRequestResponse = await appleAuth.performRequest({
72
72
  requestedOperation: appleAuth.Operation.LOGIN,
@@ -79,7 +79,7 @@ export const AppleLogin = (props: any) => {
79
79
  identityToken,
80
80
  authorizationCode
81
81
  } = appleAuthRequestResponse;
82
-
82
+
83
83
  user = newUser;
84
84
 
85
85
  fetchAndUpdateCredentialState(updateCredentialStateForUser).catch(error =>