ordering-ui-react-native 0.16.41 → 0.16.42-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 (199) 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/Messages/index.tsx +2 -2
  13. package/src/components/NotificationSetting/index.tsx +85 -0
  14. package/src/components/OrdersOption/index.tsx +54 -56
  15. package/src/components/PaymentOptions/index.tsx +298 -345
  16. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  17. package/src/components/ReviewDriver/index.tsx +1 -1
  18. package/src/components/ReviewOrder/index.tsx +1 -1
  19. package/src/components/ReviewProducts/index.tsx +11 -0
  20. package/src/components/SingleProductReview/index.tsx +8 -5
  21. package/src/components/StripeElementsForm/index.tsx +25 -16
  22. package/src/components/VerifyPhone/styles.tsx +1 -2
  23. package/src/components/shared/OBottomPopup.tsx +6 -2
  24. package/src/index.tsx +2 -0
  25. package/src/pages/BusinessesListing.tsx +7 -6
  26. package/src/pages/OrderDetails.tsx +1 -1
  27. package/src/pages/ReviewDriver.tsx +2 -2
  28. package/src/pages/ReviewOrder.tsx +2 -2
  29. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  30. package/src/utils/index.tsx +2 -1
  31. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  32. package/themes/business/src/components/Chat/index.tsx +40 -32
  33. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  34. package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
  35. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  36. package/themes/business/src/components/MapView/index.tsx +12 -1
  37. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  38. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
  39. package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
  40. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -19
  41. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  42. package/themes/business/src/components/OrdersOption/index.tsx +65 -21
  43. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  44. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  45. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  46. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  47. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  48. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  49. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  50. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  51. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  52. package/themes/business/src/components/PreviousOrders/index.tsx +22 -24
  53. package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
  54. package/themes/business/src/components/ReviewCustomer/index.tsx +27 -13
  55. package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
  56. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  57. package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
  58. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  59. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  60. package/themes/business/src/types/index.tsx +15 -9
  61. package/themes/business/src/utils/index.tsx +10 -0
  62. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  63. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  64. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  65. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
  66. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  67. package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
  68. package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
  69. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  70. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  71. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  72. package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
  73. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  74. package/themes/kiosk/src/types/index.d.ts +2 -0
  75. package/themes/original/index.tsx +4 -0
  76. package/themes/original/src/components/AddressDetails/index.tsx +10 -8
  77. package/themes/original/src/components/AddressForm/index.tsx +157 -140
  78. package/themes/original/src/components/AddressList/index.tsx +1 -1
  79. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  80. package/themes/original/src/components/BusinessBasicInformation/index.tsx +218 -147
  81. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +2 -2
  82. package/themes/original/src/components/BusinessController/index.tsx +216 -113
  83. package/themes/original/src/components/BusinessController/styles.tsx +1 -8
  84. package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
  85. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  86. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  87. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  88. package/themes/original/src/components/BusinessListingSearch/index.tsx +109 -139
  89. package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
  90. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  91. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  92. package/themes/original/src/components/BusinessProductsList/index.tsx +59 -60
  93. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  94. package/themes/original/src/components/BusinessProductsListing/index.tsx +210 -115
  95. package/themes/original/src/components/BusinessProductsListing/styles.tsx +18 -11
  96. package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
  97. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +37 -25
  98. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -4
  99. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +260 -109
  100. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +47 -10
  101. package/themes/original/src/components/BusinessesListing/index.tsx +95 -7
  102. package/themes/original/src/components/Cart/index.tsx +53 -15
  103. package/themes/original/src/components/Cart/styles.tsx +4 -0
  104. package/themes/original/src/components/CartContent/index.tsx +22 -16
  105. package/themes/original/src/components/Checkout/index.tsx +114 -118
  106. package/themes/original/src/components/Checkout/styles.tsx +4 -3
  107. package/themes/original/src/components/CitiesControl/index.tsx +89 -0
  108. package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
  109. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  110. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  111. package/themes/original/src/components/FavoriteList/index.tsx +19 -0
  112. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  113. package/themes/original/src/components/GPSButton/index.tsx +20 -19
  114. package/themes/original/src/components/GPSButton/styles.ts +3 -3
  115. package/themes/original/src/components/GoogleMap/index.tsx +20 -12
  116. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +25 -10
  117. package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +4 -0
  118. package/themes/original/src/components/HelpGuide/index.tsx +9 -8
  119. package/themes/original/src/components/HelpOrder/index.tsx +9 -8
  120. package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
  121. package/themes/original/src/components/LoginForm/Otp/index.tsx +95 -73
  122. package/themes/original/src/components/LoginForm/index.tsx +98 -41
  123. package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
  124. package/themes/original/src/components/Messages/index.tsx +20 -20
  125. package/themes/original/src/components/MomentOption/index.tsx +8 -6
  126. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -92
  127. package/themes/original/src/components/MultiCheckout/index.tsx +6 -0
  128. package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
  129. package/themes/original/src/components/MyOrders/index.tsx +88 -22
  130. package/themes/original/src/components/NavBar/index.tsx +15 -9
  131. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  132. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  133. package/themes/original/src/components/Notifications/index.tsx +148 -0
  134. package/themes/original/src/components/Notifications/styles.tsx +17 -0
  135. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
  136. package/themes/original/src/components/OrderDetails/index.tsx +200 -37
  137. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  138. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  139. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  140. package/themes/original/src/components/OrderProgress/index.tsx +77 -66
  141. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  142. package/themes/original/src/components/OrderSummary/index.tsx +2 -35
  143. package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
  144. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  145. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +97 -106
  146. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
  147. package/themes/original/src/components/OrdersOption/index.tsx +71 -55
  148. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  149. package/themes/original/src/components/PaymentOptions/index.tsx +1 -2
  150. package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
  151. package/themes/original/src/components/PlaceSpot/index.tsx +249 -47
  152. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  153. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  154. package/themes/original/src/components/ProductForm/index.tsx +639 -664
  155. package/themes/original/src/components/ProductForm/styles.tsx +10 -11
  156. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  157. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  158. package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
  159. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -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/Promotions/index.tsx +232 -219
  163. package/themes/original/src/components/Promotions/styles.tsx +7 -2
  164. package/themes/original/src/components/ReviewDriver/index.tsx +7 -7
  165. package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
  166. package/themes/original/src/components/ReviewProducts/index.tsx +2 -2
  167. package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
  168. package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
  169. package/themes/original/src/components/SearchBar/index.tsx +5 -3
  170. package/themes/original/src/components/ServiceForm/index.tsx +410 -258
  171. package/themes/original/src/components/SignupForm/index.tsx +160 -113
  172. package/themes/original/src/components/SingleOrderCard/index.tsx +229 -181
  173. package/themes/original/src/components/SingleOrderCard/styles.tsx +0 -7
  174. package/themes/original/src/components/SingleProductCard/index.tsx +198 -112
  175. package/themes/original/src/components/SingleProductCard/styles.tsx +3 -10
  176. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  177. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  178. package/themes/original/src/components/StripeElementsForm/index.tsx +13 -2
  179. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
  180. package/themes/original/src/components/UserDetails/index.tsx +5 -3
  181. package/themes/original/src/components/UserFormDetails/index.tsx +6 -48
  182. package/themes/original/src/components/UserProfile/index.tsx +56 -31
  183. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  184. package/themes/original/src/components/UserProfileForm/index.tsx +10 -10
  185. package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
  186. package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
  187. package/themes/original/src/components/Wallets/index.tsx +176 -164
  188. package/themes/original/src/components/Wallets/styles.tsx +12 -8
  189. package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
  190. package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
  191. package/themes/original/src/components/shared/OBottomPopup.tsx +48 -15
  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 +13 -3
  195. package/themes/original/src/layouts/Container.tsx +13 -9
  196. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  197. package/themes/original/src/types/index.tsx +82 -28
  198. package/themes/original/src/utils/index.tsx +103 -58
  199. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -1,5 +1,6 @@
1
1
  import React, { useCallback, useEffect, useRef, useState } from 'react';
2
2
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
3
+ import { IOScrollView } from 'react-native-intersection-observer'
3
4
  import Geolocation from '@react-native-community/geolocation'
4
5
  import { getTrackingStatus, requestTrackingPermission } from 'react-native-tracking-transparency'
5
6
  import {
@@ -21,6 +22,7 @@ import {
21
22
  } from 'ordering-components/native';
22
23
  import { useTheme } from 'styled-components/native';
23
24
  import Ionicons from 'react-native-vector-icons/Ionicons'
25
+ import IconAntDesign from 'react-native-vector-icons/AntDesign';
24
26
 
25
27
  import {
26
28
  Search,
@@ -32,7 +34,7 @@ import {
32
34
  FeaturedWrapper,
33
35
  OrderProgressWrapper,
34
36
  FarAwayMessage,
35
- SearchBarWrapper,
37
+ SearchBarWrapper,
36
38
  MomentWrapper,
37
39
  FilterWrapper,
38
40
  ServiceWrapper,
@@ -70,8 +72,8 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
70
72
  isGuestUser,
71
73
  handleUpdateBusinessList,
72
74
  priceLevelSelected,
73
- handleChangePriceLevel,
74
- businessTypeSelected
75
+ handleChangePriceLevel,
76
+ businessTypeSelected
75
77
  } = props;
76
78
  const theme = useTheme();
77
79
  const isFocused = useIsFocused();
@@ -104,8 +106,8 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
104
106
  },
105
107
  searchInput: {
106
108
  fontSize: 12,
107
- // backgroundColor: theme.colors.white,
108
- paddingLeft: 10,
109
+ paddingLeft: 0,
110
+ paddingRight: 17,
109
111
  paddingTop: 7
110
112
  },
111
113
  iconStyle: {
@@ -269,7 +271,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
269
271
  }, [businessesList?.businesses?.length])
270
272
 
271
273
  return (
272
- <ScrollView style={styles.container} onScroll={(e) => handleScroll(e)} showsVerticalScrollIndicator={false}
274
+ <IOScrollView style={styles.container} onScroll={(e) => handleScroll(e)} showsVerticalScrollIndicator={false}
273
275
  refreshControl={
274
276
  <RefreshControl
275
277
  refreshing={refreshing}
@@ -282,7 +284,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
282
284
  style={{ paddingTop: top + 20 }}>
283
285
  {!auth && (
284
286
  <TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
285
- <OIcon src={theme.images.general.arrow_left} width={20} style={{ tintColor: theme.colors.white }} />
287
+ <IconAntDesign name='arrowleft' size={26} />
286
288
  </TouchableOpacity>
287
289
  )}
288
290
  <Search>
@@ -319,7 +321,15 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
319
321
  </MomentWrapper>
320
322
  <View style={styles.wrapperOrderOptions}>
321
323
  <WrapMomentOption onPress={() => navigation.navigate('OrderTypes', { configTypes: configTypes, setOrderTypeValue })}>
322
- <OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textSecondary}>{t(getTypesText(orderTypeValue || orderState?.options?.type || 1), 'Delivery')}</OText>
324
+ <OText
325
+ size={12}
326
+ numberOfLines={1}
327
+ ellipsizeMode={'tail'}
328
+ color={theme.colors.textSecondary}
329
+ style={{ textAlign: 'left' }}
330
+ >
331
+ {t(getTypesText(orderTypeValue || orderState?.options?.type || 1), 'Delivery')}
332
+ </OText>
323
333
  <OIcon
324
334
  src={theme.images.general.arrow_down}
325
335
  width={10}
@@ -327,22 +337,23 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
327
337
  />
328
338
  </WrapMomentOption>
329
339
  {!businessId && (
330
- <SearchBarWrapper>
331
- <SearchBar
332
- onSearch={handleChangeSearch}
333
- searchValue={searchValue}
334
- lazyLoad
335
- isCancelXButtonShow={!!searchValue}
336
- borderStyle={styles.borderStyle}
337
- onCancel={() => handleChangeSearch('')}
338
- placeholder={t('SEARCH', 'Search')}
339
- height={80}
340
- isAppointment
341
- isDisabled={!businessTypes}
342
- inputStyle={{ ...styles.searchInput, ...Platform.OS === 'ios' ? {} : { paddingBottom: 4 } }}
343
- onSubmitEditing={() => { configs?.advanced_business_search_enabled?.value === '1' && navigation.navigate('BusinessSearch', { businessTypes, defaultTerm: searchValue }) }}
344
- />
345
- </SearchBarWrapper>
340
+ <SearchBarWrapper>
341
+ <SearchBar
342
+ onSearch={handleChangeSearch}
343
+ searchValue={searchValue}
344
+ lazyLoad
345
+ isCancelXButtonShow={!!searchValue}
346
+ borderStyle={styles.borderStyle}
347
+ onCancel={() => handleChangeSearch('')}
348
+ placeholder={t('SEARCH', 'Search')}
349
+ height={80}
350
+ isAppointment
351
+ isDisabled={!businessTypes || configs?.advanced_business_search_enabled?.value === '1'}
352
+ inputStyle={{ ...styles.searchInput, ...Platform.OS === 'ios' ? {} : { paddingBottom: 4 } }}
353
+ onPress={() => { configs?.advanced_business_search_enabled?.value === '1' && navigation.navigate('BusinessSearch', { businessTypes }) }}
354
+ onSubmitEditing={() => { configs?.advanced_business_search_enabled?.value === '1' && navigation.navigate('BusinessSearch', { businessTypes, defaultTerm: searchValue }) }}
355
+ />
356
+ </SearchBarWrapper>
346
357
  )}
347
358
  </View>
348
359
  </OrderControlContainer>
@@ -463,6 +474,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
463
474
  (business: any, i: number) => (
464
475
  <BusinessController
465
476
  key={`${business.id}_` + i}
477
+ enableIntersection
466
478
  business={business}
467
479
  isBusinessOpen={business.open}
468
480
  handleCustomClick={handleBusinessClick}
@@ -534,7 +546,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
534
546
  </>
535
547
  )}
536
548
  </ListWrapper>
537
- </ScrollView>
549
+ </IOScrollView>
538
550
  );
539
551
  };
540
552
 
@@ -43,8 +43,9 @@ export const WrapMomentOption = styled.TouchableOpacity`
43
43
  font-size: 12px;
44
44
  max-width: 240px;
45
45
  height: 26px;
46
+ width: 130px;
46
47
  align-items: center;
47
- justify-content: center;
48
+ justify-content: space-between;
48
49
  padding-horizontal: 8px;
49
50
  flex-direction: row;
50
51
  margin-end: 12px;
@@ -84,7 +85,7 @@ export const FarAwayMessage = styled.View`
84
85
  `
85
86
 
86
87
  export const SearchBarWrapper = styled.View`
87
- width: 100px;
88
+ width: 130px;
88
89
  `
89
90
 
90
91
  export const MomentWrapper = styled.View`
@@ -97,10 +98,10 @@ export const FilterWrapper = styled.View`
97
98
  `
98
99
 
99
100
  export const ServiceWrapper = styled.View`
100
- padding-left: 40px;
101
+ padding-horizontal: 40px;
101
102
  `
102
103
 
103
104
  export const PriceWrapper = styled.View`
104
- padding-left: 40px;
105
+ padding-horizontal: 40px;
105
106
  margin-top: 30px;
106
107
  `