ordering-ui-react-native 0.16.23 → 0.16.24-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 (198) 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 +33 -4
  9. package/src/components/BusinessInformation/styles.tsx +2 -2
  10. package/src/components/BusinessProductsList/index.tsx +10 -10
  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 +2 -20
  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/pages/BusinessesListing.tsx +7 -6
  32. package/src/pages/OrderDetails.tsx +1 -1
  33. package/src/pages/ReviewDriver.tsx +2 -2
  34. package/src/pages/ReviewOrder.tsx +2 -2
  35. package/src/theme.json +0 -1
  36. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  37. package/src/types/index.tsx +13 -9
  38. package/src/utils/index.tsx +0 -1
  39. package/themes/business/index.tsx +4 -0
  40. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  41. package/themes/business/src/components/Chat/index.tsx +42 -34
  42. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  43. package/themes/business/src/components/DriverSchedule/index.tsx +71 -0
  44. package/themes/business/src/components/DriverSchedule/styles.tsx +6 -0
  45. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  46. package/themes/business/src/components/MapView/index.tsx +12 -1
  47. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  48. package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
  49. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -19
  50. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  51. package/themes/business/src/components/OrdersOption/index.tsx +65 -21
  52. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  53. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  54. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  55. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  56. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  57. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  58. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  59. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  60. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  61. package/themes/business/src/components/PreviousOrders/index.tsx +21 -23
  62. package/themes/business/src/components/ProductItemAccordion/index.tsx +5 -4
  63. package/themes/business/src/components/ReviewCustomer/index.tsx +1 -1
  64. package/themes/business/src/components/ScheduleBlocked/index.tsx +53 -0
  65. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  66. package/themes/business/src/components/UserProfileForm/index.tsx +28 -4
  67. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  68. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  69. package/themes/business/src/components/shared/OModal.tsx +40 -37
  70. package/themes/business/src/types/index.tsx +15 -9
  71. package/themes/business/src/utils/index.tsx +10 -0
  72. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  73. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  74. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  75. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  76. package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
  77. package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
  78. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  79. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  80. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  81. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  82. package/themes/kiosk/src/types/index.d.ts +2 -0
  83. package/themes/original/index.tsx +12 -0
  84. package/themes/original/src/components/AddressForm/index.tsx +139 -135
  85. package/themes/original/src/components/AddressList/index.tsx +1 -1
  86. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  87. package/themes/original/src/components/BusinessBasicInformation/index.tsx +311 -161
  88. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
  89. package/themes/original/src/components/BusinessController/index.tsx +175 -110
  90. package/themes/original/src/components/BusinessItemAccordion/index.tsx +8 -6
  91. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  92. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  93. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  94. package/themes/original/src/components/BusinessListingSearch/index.tsx +101 -125
  95. package/themes/original/src/components/BusinessListingSearch/styles.tsx +18 -13
  96. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  97. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  98. package/themes/original/src/components/BusinessProductsList/index.tsx +49 -52
  99. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  100. package/themes/original/src/components/BusinessProductsListing/index.tsx +287 -175
  101. package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -8
  102. package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
  103. package/themes/original/src/components/BusinessTypeFilter/index.tsx +109 -40
  104. package/themes/original/src/components/BusinessTypeFilter/styles.tsx +2 -0
  105. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +561 -0
  106. package/themes/original/src/components/BusinessesListing/{styles.tsx → Layout/Appointment/styles.tsx} +24 -10
  107. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +676 -0
  108. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +137 -0
  109. package/themes/original/src/components/BusinessesListing/index.tsx +105 -519
  110. package/themes/original/src/components/Cart/index.tsx +42 -10
  111. package/themes/original/src/components/Cart/styles.tsx +4 -0
  112. package/themes/original/src/components/CartContent/index.tsx +22 -16
  113. package/themes/original/src/components/Checkout/index.tsx +105 -65
  114. package/themes/original/src/components/Checkout/styles.tsx +0 -1
  115. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  116. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  117. package/themes/original/src/components/Favorite/index.tsx +1 -0
  118. package/themes/original/src/components/FavoriteList/index.tsx +32 -2
  119. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  120. package/themes/original/src/components/GPSButton/index.tsx +20 -19
  121. package/themes/original/src/components/GoogleMap/index.tsx +20 -12
  122. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +8 -3
  123. package/themes/original/src/components/HelpGuide/index.tsx +8 -3
  124. package/themes/original/src/components/HelpOrder/index.tsx +8 -3
  125. package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
  126. package/themes/original/src/components/LoginForm/Otp/index.tsx +3 -2
  127. package/themes/original/src/components/LoginForm/index.tsx +82 -44
  128. package/themes/original/src/components/Messages/index.tsx +17 -17
  129. package/themes/original/src/components/MomentSelector/index.tsx +197 -0
  130. package/themes/original/src/components/MomentSelector/styles.tsx +6 -0
  131. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -92
  132. package/themes/original/src/components/MultiCheckout/index.tsx +6 -0
  133. package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
  134. package/themes/original/src/components/MyOrders/index.tsx +70 -6
  135. package/themes/original/src/components/NavBar/index.tsx +15 -9
  136. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  137. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  138. package/themes/original/src/components/Notifications/index.tsx +148 -0
  139. package/themes/original/src/components/Notifications/styles.tsx +17 -0
  140. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
  141. package/themes/original/src/components/OrderDetails/index.tsx +190 -35
  142. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  143. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  144. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  145. package/themes/original/src/components/OrderProgress/index.tsx +8 -2
  146. package/themes/original/src/components/OrderSummary/index.tsx +1 -34
  147. package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
  148. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  149. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +100 -106
  150. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +17 -12
  151. package/themes/original/src/components/OrdersOption/index.tsx +71 -55
  152. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  153. package/themes/original/src/components/PaymentOptions/index.tsx +42 -24
  154. package/themes/original/src/components/PhoneInputNumber/index.tsx +4 -10
  155. package/themes/original/src/components/PlaceSpot/index.tsx +243 -47
  156. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  157. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  158. package/themes/original/src/components/ProductForm/index.tsx +710 -653
  159. package/themes/original/src/components/ProductForm/styles.tsx +9 -7
  160. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  161. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  162. package/themes/original/src/components/ProfessionalFilter/index.tsx +129 -0
  163. package/themes/original/src/components/ProfessionalFilter/styles.tsx +0 -0
  164. package/themes/original/src/components/ProfessionalProfile/index.tsx +309 -0
  165. package/themes/original/src/components/ProfessionalProfile/styles.tsx +46 -0
  166. package/themes/original/src/components/ReviewDriver/index.tsx +6 -6
  167. package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
  168. package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
  169. package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
  170. package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
  171. package/themes/original/src/components/SearchBar/index.tsx +5 -3
  172. package/themes/original/src/components/ServiceForm/index.tsx +631 -0
  173. package/themes/original/src/components/ServiceForm/styles.tsx +50 -0
  174. package/themes/original/src/components/SignupForm/index.tsx +350 -206
  175. package/themes/original/src/components/SingleOrderCard/index.tsx +214 -179
  176. package/themes/original/src/components/SingleProductCard/index.tsx +198 -104
  177. package/themes/original/src/components/SingleProductCard/styles.tsx +2 -2
  178. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  179. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  180. package/themes/original/src/components/StripeElementsForm/index.tsx +15 -7
  181. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
  182. package/themes/original/src/components/UserDetails/index.tsx +31 -17
  183. package/themes/original/src/components/UserFormDetails/index.tsx +74 -81
  184. package/themes/original/src/components/UserProfile/index.tsx +54 -29
  185. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  186. package/themes/original/src/components/UserProfileForm/index.tsx +15 -10
  187. package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
  188. package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
  189. package/themes/original/src/components/Wallets/index.tsx +174 -162
  190. package/themes/original/src/components/Wallets/styles.tsx +10 -8
  191. package/themes/original/src/components/shared/OBottomPopup.tsx +47 -14
  192. package/themes/original/src/components/shared/OButton.tsx +10 -3
  193. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  194. package/themes/original/src/components/shared/OInput.tsx +3 -2
  195. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  196. package/themes/original/src/types/index.tsx +122 -30
  197. package/themes/original/src/utils/index.tsx +77 -0
  198. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -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,
@@ -109,8 +108,8 @@ const AddressFormUI = (props: AddressFormParams) => {
109
108
  zIndex: 1002,
110
109
  },
111
110
  wrapperNavbar: Platform.OS === 'ios'
112
- ? { paddingVertical: 0, paddingHorizontal: 40 }
113
- : { paddingVertical: 20, paddingHorizontal: 40 }
111
+ ? { paddingVertical: 0, paddingHorizontal: 40 }
112
+ : { paddingVertical: 20, paddingHorizontal: 40 }
114
113
  });
115
114
 
116
115
  const [, t] = useLanguage();
@@ -156,7 +155,7 @@ const AddressFormUI = (props: AddressFormParams) => {
156
155
  const maxLimitLocation =
157
156
  configState?.configs?.meters_to_change_address?.value;
158
157
 
159
- const continueAsGuest = () => navigation.navigate('BusinessList');
158
+ const continueAsGuest = () => navigation.navigate('BusinessList', { isGuestUser: true });
160
159
  const goToBack = () => navigation?.canGoBack() && navigation.goBack();
161
160
 
162
161
  const getAddressFormatted = (address: any) => {
@@ -203,6 +202,7 @@ const AddressFormUI = (props: AddressFormParams) => {
203
202
  saveAddress(data.address);
204
203
  if (isGuestUser) {
205
204
  continueAsGuest();
205
+ return;
206
206
  }
207
207
  if (!isGuestUser && !auth) {
208
208
  !isFromProductsList
@@ -589,42 +589,37 @@ const AddressFormUI = (props: AddressFormParams) => {
589
589
  borderColor: theme.colors.border,
590
590
  flexGrow: 1,
591
591
  fontSize: 15,
592
- paddingHorizontal: 16,
592
+ paddingLeft: 16,
593
+ paddingRight: 32,
593
594
  minHeight: 50,
594
595
  fontFamily: 'Poppins-Regular',
595
- marginBottom: 24,
596
+ marginBottom: 24
596
597
  },
597
598
  }}
598
599
  />
599
600
  )}
600
601
  />
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
602
 
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
- )} */}
603
+ {(
604
+ ((!isEditing && !isGuestUser) ||
605
+ (isEditing && !isGuestUser)) ||
606
+ (isGuestUser)) &&
607
+ (
608
+ <View style={styles.pinIcon}>
609
+ <GPSButton
610
+ apiKey={googleMapsApiKey}
611
+ handleGPS={(data: any, detail: any) => {
612
+ handleChangeAddress(data, detail);
613
+ setValue('address', data.address);
614
+ if (googleInput?.current) {
615
+ googleInput?.current?.setAddressText(data.address);
616
+ }
617
+ }}
618
+ IconButton={<OIcon src={theme.images.general.pin} width={16} />}
619
+ />
620
+ </View>
621
+ )}
622
+ </AutocompleteInput>
628
623
 
629
624
  {(locationChange || formState.changes?.location) && (
630
625
  <View
@@ -648,129 +643,138 @@ const AddressFormUI = (props: AddressFormParams) => {
648
643
  )}
649
644
 
650
645
  <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
- />
646
+ {showField && showField('internal_number') && (
647
+ <Controller
648
+ control={control}
649
+ name="internal_number"
650
+ rules={{
651
+ required:
652
+ isRequiredField && isRequiredField('internal_number')
653
+ ? t(
654
+ `VALIDATION_ERROR_INTERNAL_NUMBER_REQUIRED`,
655
+ `The field internal number is required`,
656
+ )
657
+ : null,
658
+ }}
659
+ defaultValue={
660
+ address?.internal_number ||
661
+ formState.changes?.internal_number ||
662
+ addressState?.address?.internal_number ||
663
+ ''
664
+ }
665
+ render={() => (
666
+ <OInput
667
+ name="internal_number"
668
+ placeholder={t('INTERNAL_NUMBER', 'Internal number')}
669
+ onChange={(text: string) => {
670
+ handleChangeInput(text);
671
+ setValue('internal_number', text);
672
+ }}
673
+ value={
674
+ address?.internal_number ||
675
+ formState.changes?.internal_number ||
676
+ addressState?.address?.internal_number ||
677
+ ''
678
+ }
679
+ style={{
680
+ ...styles.inputsStyle,
681
+ marginRight: showField('internal_number') && showField('zipcode') ? 24 : 0
682
+ }}
683
+ forwardRef={internalNumberRef}
684
+ returnKeyType="next"
685
+ onSubmitEditing={() => zipCodeRef?.current?.focus?.()}
686
+ blurOnSubmit={false}
687
+ />
688
+ )}
689
+ />
690
+ )}
691
+
692
+ {showField && showField('zipcode') && (
693
+ <Controller
694
+ control={control}
695
+ name="zipcode"
696
+ rules={{
697
+ required:
698
+ isRequiredField && isRequiredField('zipcode')
699
+ ? t(
700
+ `VALIDATION_ERROR_ZIP_CODE_REQUIRED`,
701
+ `The field Zip Code is required`,
702
+ )
703
+ : null,
704
+ }}
705
+ defaultValue={
706
+ address?.zipcode ||
707
+ formState.changes?.zipcode ||
708
+ addressState.address.zipcode ||
709
+ ''
710
+ }
711
+ render={() => (
712
+ <OInput
713
+ name="zipcode"
714
+ placeholder={t('ZIP_CODE', 'Zip code')}
715
+ onChange={(text: string) => {
716
+ handleChangeInput(text);
717
+ setValue('zipcode', text);
718
+ }}
719
+ value={
720
+ address?.zipcode ||
721
+ formState.changes?.zipcode ||
722
+ addressState.address.zipcode ||
723
+ ''
724
+ }
725
+ style={styles.inputsStyle}
726
+ forwardRef={zipCodeRef}
727
+ returnKeyType="next"
728
+ onSubmitEditing={() => addressNotesRef?.current?.focus?.()}
729
+ blurOnSubmit={false}
730
+ />
731
+ )}
732
+ />
733
+ )}
734
+ </View>
691
735
 
736
+ {showField && showField('address_notes') && (
692
737
  <Controller
693
738
  control={control}
694
- name="zipcode"
739
+ name="address_notes"
695
740
  rules={{
696
741
  required:
697
- isRequiredField && isRequiredField('zipcode')
742
+ isRequiredField && isRequiredField('address_notes')
698
743
  ? t(
699
- `VALIDATION_ERROR_ZIP_CODE_REQUIRED`,
700
- `The field Zip Code is required`,
744
+ `VALIDATION_ERROR_ADDRESS_NOTES_REQUIRED`,
745
+ `The field address notes is required`,
701
746
  )
702
747
  : null,
703
748
  }}
704
749
  defaultValue={
705
- address?.zipcode ||
706
- formState.changes?.zipcode ||
707
- addressState.address.zipcode ||
750
+ address?.address_notes ||
751
+ formState.changes?.address_notes ||
752
+ addressState.address.address_notes ||
708
753
  ''
709
754
  }
710
755
  render={() => (
711
756
  <OInput
712
- name="zipcode"
713
- placeholder={t('ZIP_CODE', 'Zip code')}
714
- onChange={(text: string) => {
757
+ name="address_notes"
758
+ placeholder={t('ADDRESS_NOTES', 'Address notes')}
759
+ onChange={(text: any) => {
715
760
  handleChangeInput(text);
716
- setValue('zipcode', text);
761
+ setValue('address_notes', text);
717
762
  }}
718
763
  value={
719
- address?.zipcode ||
720
- formState.changes?.zipcode ||
721
- addressState.address.zipcode ||
764
+ address?.address_notes ||
765
+ formState.changes?.address_notes ||
766
+ addressState.address.address_notes ||
722
767
  ''
723
768
  }
724
- style={styles.inputsStyle}
725
- forwardRef={zipCodeRef}
726
- returnKeyType="next"
727
- onSubmitEditing={() => addressNotesRef?.current?.focus?.()}
728
- blurOnSubmit={false}
769
+ multiline
770
+ style={styles.textAreaStyles}
771
+ returnKeyType="done"
772
+ forwardRef={addressNotesRef}
773
+ blurOnSubmit
729
774
  />
730
775
  )}
731
776
  />
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
- />
777
+ )}
774
778
  </FormInput>
775
779
  <IconsContainer>
776
780
  {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 =>