ordering-ui-react-native 0.16.52 → 0.16.53-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 (209) hide show
  1. package/package.json +6 -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/BusinessInformation/index.tsx +33 -4
  6. package/src/components/BusinessInformation/styles.tsx +2 -2
  7. package/src/components/BusinessProductsList/index.tsx +10 -10
  8. package/src/components/BusinessesListing/index.tsx +1 -1
  9. package/src/components/Checkout/index.tsx +2 -1
  10. package/src/components/LanguageSelector/index.tsx +21 -16
  11. package/src/components/Messages/index.tsx +2 -2
  12. package/src/components/NotificationSetting/index.tsx +85 -0
  13. package/src/components/OrdersOption/index.tsx +54 -56
  14. package/src/components/PaymentOptions/index.tsx +298 -345
  15. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  16. package/src/components/SingleProductReview/index.tsx +7 -4
  17. package/src/components/StripeElementsForm/index.tsx +25 -16
  18. package/src/components/VerifyPhone/styles.tsx +1 -2
  19. package/src/components/shared/OBottomPopup.tsx +6 -2
  20. package/src/components/shared/OToast.tsx +4 -4
  21. package/src/index.tsx +2 -0
  22. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  23. package/src/utils/index.tsx +2 -1
  24. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +260 -238
  25. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
  26. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  27. package/themes/business/src/components/Chat/index.tsx +40 -32
  28. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  29. package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
  30. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  31. package/themes/business/src/components/MapView/index.tsx +12 -1
  32. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  33. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
  34. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +40 -30
  35. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +3 -3
  36. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  37. package/themes/business/src/components/OrdersOption/index.tsx +76 -77
  38. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  39. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  40. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  41. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  42. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  43. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  44. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  45. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  46. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  47. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +250 -0
  48. package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
  49. package/themes/business/src/components/PreviousOrders/index.tsx +440 -245
  50. package/themes/business/src/components/PreviousOrders/styles.tsx +31 -3
  51. package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
  52. package/themes/business/src/components/ReviewCustomer/index.tsx +39 -15
  53. package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
  54. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  55. package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
  56. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  57. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  58. package/themes/business/src/components/shared/OLink.tsx +24 -12
  59. package/themes/business/src/components/shared/OText.tsx +3 -2
  60. package/themes/business/src/types/index.tsx +25 -11
  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 +8 -6
  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 +192 -91
  83. package/themes/original/src/components/BusinessController/styles.tsx +14 -9
  84. package/themes/original/src/components/BusinessInformation/index.tsx +10 -31
  85. package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
  86. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  87. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  88. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  89. package/themes/original/src/components/BusinessListingSearch/index.tsx +85 -137
  90. package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
  91. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  92. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  93. package/themes/original/src/components/BusinessProductsList/index.tsx +59 -61
  94. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  95. package/themes/original/src/components/BusinessProductsListing/index.tsx +179 -83
  96. package/themes/original/src/components/BusinessProductsListing/styles.tsx +19 -12
  97. package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
  98. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +28 -29
  99. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +299 -148
  100. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +47 -11
  101. package/themes/original/src/components/BusinessesListing/index.tsx +51 -71
  102. package/themes/original/src/components/Cart/index.tsx +82 -15
  103. package/themes/original/src/components/Cart/styles.tsx +4 -0
  104. package/themes/original/src/components/CartContent/index.tsx +27 -17
  105. package/themes/original/src/components/CartContent/styles.tsx +1 -1
  106. package/themes/original/src/components/Checkout/index.tsx +114 -118
  107. package/themes/original/src/components/Checkout/styles.tsx +4 -3
  108. package/themes/original/src/components/CitiesControl/index.tsx +89 -0
  109. package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
  110. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  111. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  112. package/themes/original/src/components/FavoriteList/index.tsx +69 -45
  113. package/themes/original/src/components/FloatingButton/index.tsx +13 -11
  114. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  115. package/themes/original/src/components/GPSButton/index.tsx +20 -19
  116. package/themes/original/src/components/GPSButton/styles.ts +3 -3
  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 +89 -73
  124. package/themes/original/src/components/LoginForm/Otp/styles.tsx +0 -1
  125. package/themes/original/src/components/LoginForm/index.tsx +98 -41
  126. package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
  127. package/themes/original/src/components/Messages/index.tsx +35 -20
  128. package/themes/original/src/components/MomentOption/index.tsx +8 -6
  129. package/themes/original/src/components/MultiCart/index.tsx +63 -0
  130. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -93
  131. package/themes/original/src/components/MultiCheckout/index.tsx +10 -2
  132. package/themes/original/src/components/MultiOrdersDetails/index.tsx +34 -16
  133. package/themes/original/src/components/MyOrders/index.tsx +88 -24
  134. package/themes/original/src/components/NavBar/index.tsx +11 -5
  135. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  136. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  137. package/themes/original/src/components/Notifications/index.tsx +148 -0
  138. package/themes/original/src/components/Notifications/styles.tsx +20 -0
  139. package/themes/original/src/components/OrderDetails/index.tsx +162 -50
  140. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  141. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  142. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  143. package/themes/original/src/components/OrderProgress/index.tsx +77 -66
  144. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  145. package/themes/original/src/components/OrderSummary/index.tsx +2 -35
  146. package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
  147. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  148. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +94 -98
  149. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
  150. package/themes/original/src/components/OrdersOption/index.tsx +91 -53
  151. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  152. package/themes/original/src/components/PaymentOptions/index.tsx +1 -2
  153. package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
  154. package/themes/original/src/components/PlaceSpot/index.tsx +249 -47
  155. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  156. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  157. package/themes/original/src/components/ProductForm/index.tsx +365 -384
  158. package/themes/original/src/components/ProductForm/styles.tsx +7 -12
  159. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  160. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  161. package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
  162. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -1
  163. package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
  164. package/themes/original/src/components/ProfessionalProfile/index.tsx +19 -8
  165. package/themes/original/src/components/Promotions/index.tsx +232 -219
  166. package/themes/original/src/components/Promotions/styles.tsx +7 -2
  167. package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
  168. package/themes/original/src/components/ReviewOrder/index.tsx +120 -108
  169. package/themes/original/src/components/ReviewOrder/styles.tsx +5 -7
  170. package/themes/original/src/components/ReviewProducts/index.tsx +8 -5
  171. package/themes/original/src/components/ReviewTrigger/index.tsx +136 -0
  172. package/themes/original/src/components/{Reviews/ReviewOrder → ReviewTrigger}/styles.tsx +10 -22
  173. package/themes/original/src/components/ScheduleAccordion/index.tsx +68 -0
  174. package/themes/original/src/components/ScheduleAccordion/styles.tsx +14 -0
  175. package/themes/original/src/components/ServiceForm/index.tsx +330 -266
  176. package/themes/original/src/components/SignupForm/index.tsx +134 -89
  177. package/themes/original/src/components/SingleOrderCard/index.tsx +219 -129
  178. package/themes/original/src/components/SingleOrderCard/styles.tsx +10 -8
  179. package/themes/original/src/components/SingleProductCard/index.tsx +180 -104
  180. package/themes/original/src/components/SingleProductCard/styles.tsx +3 -10
  181. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  182. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  183. package/themes/original/src/components/StripeElementsForm/index.tsx +13 -2
  184. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
  185. package/themes/original/src/components/UserDetails/index.tsx +5 -3
  186. package/themes/original/src/components/UserFormDetails/index.tsx +6 -48
  187. package/themes/original/src/components/UserProfile/index.tsx +58 -35
  188. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  189. package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
  190. package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
  191. package/themes/original/src/components/Wallets/index.tsx +176 -164
  192. package/themes/original/src/components/Wallets/styles.tsx +12 -8
  193. package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
  194. package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
  195. package/themes/original/src/components/shared/OBottomPopup.tsx +36 -22
  196. package/themes/original/src/components/shared/OButton.tsx +10 -3
  197. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  198. package/themes/original/src/components/shared/OInput.tsx +10 -1
  199. package/themes/original/src/layouts/Container.tsx +13 -9
  200. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  201. package/themes/original/src/types/index.tsx +65 -13
  202. package/themes/original/src/utils/index.tsx +103 -58
  203. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
  204. package/themes/original/src/components/Reviews/ReviewDriver/index.tsx +0 -301
  205. package/themes/original/src/components/Reviews/ReviewDriver/styles.tsx +0 -39
  206. package/themes/original/src/components/Reviews/ReviewOrder/index.tsx +0 -326
  207. package/themes/original/src/components/Reviews/ReviewProducts/index.tsx +0 -101
  208. package/themes/original/src/components/Reviews/ReviewProducts/styles.tsx +0 -17
  209. package/themes/original/src/components/Reviews/index.tsx +0 -9
@@ -1,8 +1,5 @@
1
1
  import styled, { css } from 'styled-components/native'
2
2
 
3
- export const ContainerSafeAreaView = styled.SafeAreaView`
4
- `
5
-
6
3
  export const WrapHeader = styled.View`
7
4
  position: relative;
8
5
  `
@@ -14,7 +11,6 @@ export const TopHeader = styled.View`
14
11
  z-index: 1;
15
12
  height: 60px;
16
13
  min-height: 60px;
17
- margin-top: ${(props : any) => props.isIos ? '0' : '40px'};
18
14
  `
19
15
  export const AddressInput = styled.TouchableOpacity`
20
16
  flex: 1;
@@ -28,7 +24,7 @@ export const WrapSearchBar = styled.View`
28
24
  flex: 1;
29
25
  `
30
26
  export const WrapContent = styled.View`
31
- padding: 10px 40px;
27
+ padding-vertical: 10px;
32
28
  `
33
29
 
34
30
  export const BusinessProductsListingContainer = styled.ScrollView`
@@ -41,18 +37,16 @@ export const BusinessProductsListingContainer = styled.ScrollView`
41
37
  export const FiltProductsContainer = styled.ScrollView`
42
38
  position: absolute;
43
39
  width: 100%;
44
- z-index: 2000;
45
- top: ${(props : any) => props.isIos ? '40px': '80px'};
46
- margin-top: 20px;
40
+ z-index: 20000;
47
41
  `
48
42
 
49
43
  export const BackgroundGray = styled.View`
50
44
  flex: 1;
51
- height: 100%;
45
+ height: ${(props: any) => props.isIos ? '80%' : '100%'};
52
46
  background-color: rgba(0,0,0,0.5);
53
- position: absolute;
54
- margin-top: 100px;
55
- z-index: 100;
47
+ position: absolute;
48
+ margin-top: 100px;
49
+ z-index: 10000;
56
50
  width: 100%;
57
51
  `
58
52
 
@@ -60,3 +54,16 @@ export const ProfessionalFilterWrapper = styled.View`
60
54
  padding-left: 40px;
61
55
  margin-bottom: 35px;
62
56
  `
57
+
58
+ export const NearBusiness = styled.View`
59
+ width: 100%;
60
+ padding-left: 20px;
61
+ max-height: 80px;
62
+ `
63
+
64
+ export const TopActions = styled.TouchableOpacity`
65
+ height: 60px;
66
+ justify-content: center;
67
+ padding-horizontal: 30px;
68
+ width: 100px;
69
+ `;
@@ -38,6 +38,7 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
38
38
 
39
39
  const theme = useTheme();
40
40
  const [isOpenAllCategories, setIsOpenAllCategories] = useState(false)
41
+ const defaultImage = (name : string) => theme.images?.categories?.[name.toLowerCase().replace(' ', '')]
41
42
 
42
43
  useEffect(() => {
43
44
  if(typesState?.types?.length > 0){
@@ -197,9 +198,9 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
197
198
  isOpenAllCategories && setIsOpenAllCategories(false)
198
199
  }}
199
200
  >
200
- {item.image ? (
201
+ {(defaultImage(item.name) || item.image) ? (
201
202
  <OIcon
202
- url={item.image}
203
+ url={typeof item.name === 'number' ? item.image || defaultImage(item.name) : defaultImage(item.name) || item.image}
203
204
  style={styles.logo}
204
205
  />
205
206
  ) : (
@@ -22,6 +22,7 @@ import {
22
22
  } from 'ordering-components/native';
23
23
  import { useTheme } from 'styled-components/native';
24
24
  import Ionicons from 'react-native-vector-icons/Ionicons'
25
+ import IconAntDesign from 'react-native-vector-icons/AntDesign';
25
26
 
26
27
  import {
27
28
  Search,
@@ -270,7 +271,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
270
271
  }, [businessesList?.businesses?.length])
271
272
 
272
273
  return (
273
- <ScrollView style={styles.container} onScroll={(e) => handleScroll(e)} showsVerticalScrollIndicator={false}
274
+ <IOScrollView style={styles.container} onScroll={(e) => handleScroll(e)} showsVerticalScrollIndicator={false}
274
275
  refreshControl={
275
276
  <RefreshControl
276
277
  refreshing={refreshing}
@@ -283,7 +284,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
283
284
  style={{ paddingTop: top + 20 }}>
284
285
  {!auth && (
285
286
  <TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
286
- <OIcon src={theme.images.general.arrow_left} width={20} style={{ tintColor: theme.colors.white }} />
287
+ <IconAntDesign name='arrowleft' size={26} />
287
288
  </TouchableOpacity>
288
289
  )}
289
290
  <Search>
@@ -469,32 +470,30 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
469
470
  )}
470
471
  />
471
472
  )}
472
- <IOScrollView>
473
- {businessesList.businesses?.map(
474
- (business: any, i: number) => (
475
- <BusinessController
476
- key={`${business.id}_` + i}
477
- enableIntersection
478
- business={business}
479
- isBusinessOpen={business.open}
480
- handleCustomClick={handleBusinessClick}
481
- orderType={orderState?.options?.type}
482
- navigation={navigation}
483
- businessHeader={business?.header}
484
- businessFeatured={business?.featured}
485
- businessLogo={business?.logo}
486
- businessReviews={business?.reviews}
487
- businessDeliveryPrice={business?.delivery_price}
488
- businessDeliveryTime={business?.delivery_time}
489
- businessPickupTime={business?.pickup_time}
490
- businessDistance={business?.distance}
491
- handleUpdateBusinessList={handleUpdateBusinessList}
492
- favoriteIds={favoriteIds}
493
- setFavoriteIds={setFavoriteIds}
494
- />
495
- )
496
- )}
497
- </IOScrollView>
473
+ {businessesList.businesses?.map(
474
+ (business: any, i: number) => (
475
+ <BusinessController
476
+ key={`${business.id}_` + i}
477
+ enableIntersection
478
+ business={business}
479
+ isBusinessOpen={business.open}
480
+ handleCustomClick={handleBusinessClick}
481
+ orderType={orderState?.options?.type}
482
+ navigation={navigation}
483
+ businessHeader={business?.header}
484
+ businessFeatured={business?.featured}
485
+ businessLogo={business?.logo}
486
+ businessReviews={business?.reviews}
487
+ businessDeliveryPrice={business?.delivery_price}
488
+ businessDeliveryTime={business?.delivery_time}
489
+ businessPickupTime={business?.pickup_time}
490
+ businessDistance={business?.distance}
491
+ handleUpdateBusinessList={handleUpdateBusinessList}
492
+ favoriteIds={favoriteIds}
493
+ setFavoriteIds={setFavoriteIds}
494
+ />
495
+ )
496
+ )}
498
497
  {businessesList.loading && (
499
498
  <>
500
499
  {[
@@ -547,7 +546,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
547
546
  </>
548
547
  )}
549
548
  </ListWrapper>
550
- </ScrollView>
549
+ </IOScrollView>
551
550
  );
552
551
  };
553
552