ordering-ui-react-native 0.16.95 → 0.16.96-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 (210) hide show
  1. package/package.json +5 -5
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/ActiveOrders/styles.tsx +8 -14
  4. package/src/components/BusinessInformation/index.tsx +11 -4
  5. package/src/components/BusinessInformation/styles.tsx +2 -2
  6. package/src/components/BusinessProductsList/index.tsx +1 -1
  7. package/src/components/BusinessesListing/index.tsx +1 -1
  8. package/src/components/OrderCreating/index.tsx +1 -21
  9. package/src/components/OrdersOption/index.tsx +54 -56
  10. package/src/components/PaymentOptionsWebView/index.tsx +119 -120
  11. package/src/components/SingleProductReview/index.tsx +7 -4
  12. package/src/components/VerifyPhone/styles.tsx +1 -2
  13. package/src/components/shared/OToast.tsx +4 -4
  14. package/src/utils/index.tsx +7 -1
  15. package/themes/business/index.tsx +2 -0
  16. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +265 -240
  17. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
  18. package/themes/business/src/components/BusinessController/index.tsx +2 -3
  19. package/themes/business/src/components/Chat/index.tsx +146 -135
  20. package/themes/business/src/components/DriverMap/index.tsx +22 -9
  21. package/themes/business/src/components/GoogleMap/index.tsx +58 -57
  22. package/themes/business/src/components/LoginForm/Otp/index.tsx +120 -0
  23. package/themes/business/src/components/LoginForm/Otp/styles.tsx +7 -0
  24. package/themes/business/src/components/LoginForm/index.tsx +239 -80
  25. package/themes/business/src/components/LoginForm/styles.tsx +10 -0
  26. package/themes/business/src/components/MapView/index.tsx +18 -7
  27. package/themes/business/src/components/NewOrderNotification/index.tsx +33 -43
  28. package/themes/business/src/components/OrderDetails/Delivery.tsx +4 -3
  29. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +96 -50
  30. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +59 -62
  31. package/themes/business/src/components/OrderDetailsLogistic/index.tsx +195 -0
  32. package/themes/business/src/components/OrderDetailsLogistic/styles.tsx +5 -0
  33. package/themes/business/src/components/OrderMessage/index.tsx +18 -17
  34. package/themes/business/src/components/OrdersOption/index.tsx +33 -75
  35. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +1 -1
  36. package/themes/business/src/components/PreviousMessages/index.tsx +16 -18
  37. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +250 -0
  38. package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
  39. package/themes/business/src/components/PreviousOrders/index.tsx +447 -247
  40. package/themes/business/src/components/PreviousOrders/styles.tsx +31 -3
  41. package/themes/business/src/components/ProductItemAccordion/index.tsx +27 -3
  42. package/themes/business/src/components/ReviewCustomer/index.tsx +42 -25
  43. package/themes/business/src/components/StoresList/index.tsx +2 -2
  44. package/themes/business/src/components/shared/OLink.tsx +33 -13
  45. package/themes/business/src/components/shared/OModal.tsx +16 -9
  46. package/themes/business/src/components/shared/OText.tsx +8 -2
  47. package/themes/business/src/types/index.tsx +33 -2
  48. package/themes/business/src/utils/index.tsx +53 -0
  49. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  50. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  51. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  52. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
  53. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  54. package/themes/kiosk/src/components/LoginForm/Otp/index.tsx +92 -0
  55. package/themes/kiosk/src/components/LoginForm/Otp/styles.tsx +7 -0
  56. package/themes/kiosk/src/components/LoginForm/index.tsx +473 -151
  57. package/themes/kiosk/src/components/LoginForm/styles.tsx +14 -1
  58. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  59. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  60. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  61. package/themes/kiosk/src/components/PhoneInputNumber/index.tsx +3 -2
  62. package/themes/kiosk/src/components/PhoneInputNumber/styles.tsx +1 -3
  63. package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
  64. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  65. package/themes/kiosk/src/components/shared/OModal.tsx +14 -11
  66. package/themes/kiosk/src/layouts/Container.tsx +7 -1
  67. package/themes/kiosk/src/types/index.d.ts +13 -0
  68. package/themes/kiosk/src/utils/index.tsx +15 -0
  69. package/themes/original/index.tsx +8 -0
  70. package/themes/original/src/components/AddressDetails/index.tsx +29 -11
  71. package/themes/original/src/components/AddressForm/index.tsx +152 -117
  72. package/themes/original/src/components/AddressList/index.tsx +26 -21
  73. package/themes/original/src/components/AddressList/styles.tsx +4 -2
  74. package/themes/original/src/components/AnalyticsSegment/index.tsx +164 -8
  75. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  76. package/themes/original/src/components/BusinessBasicInformation/index.tsx +125 -82
  77. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +9 -4
  78. package/themes/original/src/components/BusinessController/index.tsx +145 -68
  79. package/themes/original/src/components/BusinessController/styles.tsx +22 -9
  80. package/themes/original/src/components/BusinessFeaturedController/index.tsx +21 -54
  81. package/themes/original/src/components/BusinessFeaturedController/styles.tsx +8 -0
  82. package/themes/original/src/components/BusinessInformation/index.tsx +10 -31
  83. package/themes/original/src/components/BusinessItemAccordion/index.tsx +24 -23
  84. package/themes/original/src/components/BusinessListingSearch/index.tsx +52 -24
  85. package/themes/original/src/components/BusinessPreorder/index.tsx +96 -15
  86. package/themes/original/src/components/BusinessProductsList/index.tsx +20 -11
  87. package/themes/original/src/components/BusinessProductsList/styles.tsx +8 -3
  88. package/themes/original/src/components/BusinessProductsListing/index.tsx +617 -490
  89. package/themes/original/src/components/BusinessProductsListing/styles.tsx +7 -13
  90. package/themes/original/src/components/BusinessReviews/index.tsx +3 -1
  91. package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -3
  92. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
  93. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +98 -78
  94. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -9
  95. package/themes/original/src/components/BusinessesListing/index.tsx +6 -6
  96. package/themes/original/src/components/Cart/index.tsx +87 -43
  97. package/themes/original/src/components/CartContent/index.tsx +77 -15
  98. package/themes/original/src/components/CartContent/styles.tsx +11 -1
  99. package/themes/original/src/components/Checkout/index.tsx +294 -175
  100. package/themes/original/src/components/Checkout/styles.tsx +4 -2
  101. package/themes/original/src/components/CitiesControl/index.tsx +89 -0
  102. package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
  103. package/themes/original/src/components/CouponControl/index.tsx +10 -3
  104. package/themes/original/src/components/DriverTips/index.tsx +52 -37
  105. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  106. package/themes/original/src/components/Favorite/index.tsx +7 -4
  107. package/themes/original/src/components/Favorite/styles.tsx +1 -1
  108. package/themes/original/src/components/FavoriteList/index.tsx +70 -80
  109. package/themes/original/src/components/FloatingButton/index.tsx +1 -2
  110. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  111. package/themes/original/src/components/GPSButton/styles.ts +3 -3
  112. package/themes/original/src/components/GoogleMap/index.tsx +10 -1
  113. package/themes/original/src/components/Help/index.tsx +8 -8
  114. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +11 -22
  115. package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +6 -0
  116. package/themes/original/src/components/HelpGuide/index.tsx +12 -16
  117. package/themes/original/src/components/HelpGuide/styles.tsx +6 -0
  118. package/themes/original/src/components/HelpOrder/index.tsx +12 -25
  119. package/themes/original/src/components/HelpOrder/styles.tsx +8 -1
  120. package/themes/original/src/components/Home/index.tsx +13 -4
  121. package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
  122. package/themes/original/src/components/LastOrder/index.tsx +1 -34
  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 +43 -19
  126. package/themes/original/src/components/LottieAnimation/index.tsx +78 -0
  127. package/themes/original/src/components/MessageListing/index.tsx +16 -42
  128. package/themes/original/src/components/Messages/index.tsx +32 -10
  129. package/themes/original/src/components/MomentOption/index.tsx +195 -88
  130. package/themes/original/src/components/MultiCart/index.tsx +50 -0
  131. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +117 -96
  132. package/themes/original/src/components/MultiCheckout/index.tsx +247 -83
  133. package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +37 -224
  134. package/themes/original/src/components/MultiOrdersDetails/index.tsx +67 -20
  135. package/themes/original/src/components/MultiOrdersDetails/styles.tsx +1 -1
  136. package/themes/original/src/components/MyOrders/index.tsx +66 -17
  137. package/themes/original/src/components/NavBar/index.tsx +6 -11
  138. package/themes/original/src/components/NotFoundSource/index.tsx +1 -1
  139. package/themes/original/src/components/Notifications/index.tsx +144 -0
  140. package/themes/original/src/components/Notifications/styles.tsx +20 -0
  141. package/themes/original/src/components/OrderDetails/OrderEta.tsx +59 -0
  142. package/themes/original/src/components/OrderDetails/index.tsx +110 -221
  143. package/themes/original/src/components/OrderDetails/styles.tsx +10 -1
  144. package/themes/original/src/components/OrderItAgain/index.tsx +47 -43
  145. package/themes/original/src/components/OrderProgress/index.tsx +74 -112
  146. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  147. package/themes/original/src/components/OrderSummary/index.tsx +66 -29
  148. package/themes/original/src/components/OrderTypeSelector/index.tsx +4 -3
  149. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +28 -19
  150. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
  151. package/themes/original/src/components/OrdersOption/index.tsx +76 -83
  152. package/themes/original/src/components/PageBanner/index.tsx +171 -0
  153. package/themes/original/src/components/PageBanner/styles.tsx +11 -0
  154. package/themes/original/src/components/PaymentOptionStripe/styles.tsx +1 -1
  155. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  156. package/themes/original/src/components/PaymentOptions/index.tsx +2 -2
  157. package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
  158. package/themes/original/src/components/PlaceSpot/index.tsx +12 -6
  159. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  160. package/themes/original/src/components/ProductForm/index.tsx +240 -261
  161. package/themes/original/src/components/ProductForm/styles.tsx +4 -7
  162. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  163. package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -10
  164. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +1 -2
  165. package/themes/original/src/components/ProfessionalFilter/SingleProfessionalCard/index.tsx +108 -0
  166. package/themes/original/src/components/ProfessionalFilter/index.tsx +20 -49
  167. package/themes/original/src/components/ProfessionalProfile/index.tsx +54 -14
  168. package/themes/original/src/components/Promotions/index.tsx +234 -220
  169. package/themes/original/src/components/Promotions/styles.tsx +10 -3
  170. package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
  171. package/themes/original/src/components/ReviewOrder/index.tsx +43 -11
  172. package/themes/original/src/components/ReviewOrder/styles.tsx +7 -0
  173. package/themes/original/src/components/ReviewProducts/index.tsx +8 -5
  174. package/themes/original/src/components/ReviewTrigger/index.tsx +27 -9
  175. package/themes/original/src/components/ReviewTrigger/styles.tsx +8 -1
  176. package/themes/original/src/components/ScheduleAccordion/index.tsx +68 -0
  177. package/themes/original/src/components/ScheduleAccordion/styles.tsx +14 -0
  178. package/themes/original/src/components/ServiceForm/index.tsx +377 -270
  179. package/themes/original/src/components/Sessions/index.tsx +11 -8
  180. package/themes/original/src/components/Sessions/styles.tsx +5 -0
  181. package/themes/original/src/components/SignupForm/index.tsx +79 -66
  182. package/themes/original/src/components/SingleOrderCard/index.tsx +126 -57
  183. package/themes/original/src/components/SingleOrderCard/styles.tsx +10 -8
  184. package/themes/original/src/components/SingleProductCard/index.tsx +111 -49
  185. package/themes/original/src/components/SingleProductCard/styles.tsx +27 -13
  186. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  187. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  188. package/themes/original/src/components/StripeCardsList/index.tsx +1 -1
  189. package/themes/original/src/components/StripeElementsForm/index.tsx +4 -1
  190. package/themes/original/src/components/UpsellingProducts/index.tsx +238 -218
  191. package/themes/original/src/components/UpsellingProducts/styles.tsx +12 -1
  192. package/themes/original/src/components/UserDetails/index.tsx +8 -4
  193. package/themes/original/src/components/UserFormDetails/index.tsx +53 -54
  194. package/themes/original/src/components/UserProfile/index.tsx +58 -35
  195. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  196. package/themes/original/src/components/UserProfileForm/index.tsx +21 -28
  197. package/themes/original/src/components/UserProfileForm/styles.tsx +7 -0
  198. package/themes/original/src/components/Wallets/index.tsx +20 -19
  199. package/themes/original/src/components/Wallets/styles.tsx +2 -0
  200. package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
  201. package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
  202. package/themes/original/src/components/shared/OBottomPopup.tsx +1 -1
  203. package/themes/original/src/components/shared/OButton.tsx +6 -2
  204. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  205. package/themes/original/src/components/shared/OInput.tsx +10 -1
  206. package/themes/original/src/components/shared/OModal.tsx +3 -3
  207. package/themes/original/src/layouts/Container.tsx +13 -9
  208. package/themes/original/src/types/index.tsx +45 -7
  209. package/themes/original/src/utils/index.tsx +359 -58
  210. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -1,10 +1,11 @@
1
1
  import React, { useState, useEffect } from 'react'
2
- import { useLanguage } from 'ordering-components/native'
3
- import { OText, OButton, OInput } from '../shared'
2
+ import { useLanguage, useUtils } from 'ordering-components/native'
3
+ import { OText, OButton, OInput, OIcon } from '../shared'
4
4
  import { StyleSheet, TouchableOpacity, View } from 'react-native'
5
5
  import AntDesignIcons from 'react-native-vector-icons/AntDesign'
6
6
  import { useTheme } from 'styled-components/native'
7
7
  import { SingleProductReviewParams } from '../../types'
8
+ import FastImage from 'react-native-fast-image'
8
9
 
9
10
  import {
10
11
  ProductContainer,
@@ -12,6 +13,7 @@ import {
12
13
  LikeHandsActionContainer,
13
14
  LikeHandsButton,
14
15
  CommentsButtonGroup,
16
+ LogoWrapper
15
17
  } from './styles'
16
18
 
17
19
  export const SingleProductReview = (props: SingleProductReviewParams) => {
@@ -23,6 +25,7 @@ export const SingleProductReview = (props: SingleProductReviewParams) => {
23
25
 
24
26
  const [, t] = useLanguage()
25
27
  const theme = useTheme()
28
+ const [{ optimizeImage }] = useUtils()
26
29
 
27
30
  const styles = StyleSheet.create({
28
31
  inputTextArea: {
@@ -37,7 +40,7 @@ export const SingleProductReview = (props: SingleProductReviewParams) => {
37
40
  flexDirection: 'row',
38
41
  justifyContent: 'center',
39
42
  marginVertical: 10,
40
- },
43
+ }
41
44
  })
42
45
 
43
46
  const [comments, setComments] = useState<Array<any>>([])
@@ -129,7 +132,7 @@ export const SingleProductReview = (props: SingleProductReviewParams) => {
129
132
  style={{ height: 35, paddingLeft: 5, paddingRight: 5, marginHorizontal: 3, marginVertical: 10 }}
130
133
  imgRightSrc={isSelectedComment(commentItem.key) ? theme.images.general.close : null}
131
134
  imgRightStyle={{ tintColor: theme.colors.white, right: 5, margin: 5 }}
132
- onClick={() => handleChangeComment(commentItem) }
135
+ onClick={() => handleChangeComment(commentItem)}
133
136
  />
134
137
  ))}
135
138
  </CommentsButtonGroup>
@@ -2,7 +2,7 @@ import styled from 'styled-components/native';
2
2
 
3
3
  export const Container = styled.View`
4
4
  width: 100%;
5
- padding: 0 43px;
5
+ padding: 0 30px;
6
6
  `
7
7
 
8
8
  export const CountDownContainer = styled.View`
@@ -20,7 +20,6 @@ export const ResendSection = styled.View`
20
20
  display: flex;
21
21
  flex-direction: row;
22
22
  justify-content: center;
23
- flex-wrap: wrap;
24
23
  `
25
24
 
26
25
  export const WrappCountdown = styled.View`
@@ -1,11 +1,11 @@
1
1
  import * as React from "react";
2
- import { Animated, StyleSheet, Text, View } from "react-native";
2
+ import { Animated, StyleSheet, Text, View, Platform } from "react-native";
3
3
  import { ToastType, useToast, useLanguage } from "ordering-components/native";
4
4
  import { useTheme } from 'styled-components/native';
5
5
  import { getTraduction } from '../../utils'
6
6
 
7
7
  const fadeDuration = 300;
8
- const bottomPosition = 20;
8
+ const topPosition = Platform.OS === 'ios' ? 40 : 20
9
9
 
10
10
  export const Toast = (props: any) => {
11
11
  const [toastConfig, { hideToast }] = useToast();
@@ -54,7 +54,7 @@ export const Toast = (props: any) => {
54
54
  backgroundColor = theme.colors.toastInfo || '#6BA4FF';
55
55
  break;
56
56
  case ToastType.Error:
57
- backgroundColor = theme.colors.toastError || '#D83520' ;
57
+ backgroundColor = theme.colors.toastError || '#D83520';
58
58
  break;
59
59
  case ToastType.Success:
60
60
  backgroundColor = theme.colors.toastSuccess || '#90C68E';
@@ -65,7 +65,7 @@ export const Toast = (props: any) => {
65
65
  <Animated.View
66
66
  style={[
67
67
  styles.container,
68
- { bottom: bottomPosition, opacity },
68
+ { top: topPosition, opacity },
69
69
  ]}
70
70
  >
71
71
  <View style={[styles.toast, { backgroundColor }]}>
@@ -34,7 +34,8 @@ export const getTraduction = (key: string, t: any) => {
34
34
  ERROR_ADD_PRODUCT_VERY_FAR_FOR_DELIVERY: 'Error adding product, very far for delivery',
35
35
  ERROR_PRODUCT_NOT_FOUND: 'Error with the product',
36
36
  ERROR_ADD_BUSINESS_INVALID: 'An error occurred with the business',
37
- ERROR_INVALID_OFFER: 'The offer doesn\'t exist'
37
+ ERROR_INVALID_OFFER: 'The offer doesn\'t exist',
38
+ ERROR_ADD_PRODUCT_BEFORE_ADDRESS: 'You must have an address'
38
39
  }
39
40
 
40
41
  return keyList[key] ? t(key, keyList[key]) : t(key)
@@ -153,6 +154,11 @@ export const transformCountryCode = (countryCode : number) => {
153
154
  return code?.countryCode
154
155
  }
155
156
 
157
+ export const verifyCountryCode = (countryCode : string) => {
158
+ const code = CODES.find((code : any) => code.countryCode === (countryCode || '').toUpperCase())
159
+ return code?.countryCode
160
+ }
161
+
156
162
  /**
157
163
  * Function to check if a number is decimal or not
158
164
  * @param {*} value number to check if decimal or not
@@ -41,6 +41,7 @@ import { MapViewUI as MapView } from './src/components/MapView'
41
41
  import { NewOrderNotification } from './src/components/NewOrderNotification';
42
42
  import { DriverSchedule } from './src/components/DriverSchedule';
43
43
  import { ScheduleBlocked } from './src/components/ScheduleBlocked';
44
+ import { OrderDetailsLogistic } from './src/components/OrderDetailsLogistic'
44
45
  //OComponents
45
46
  import {
46
47
  OText,
@@ -110,6 +111,7 @@ export {
110
111
  VerifyPhone,
111
112
  DriverSchedule,
112
113
  ScheduleBlocked,
114
+ OrderDetailsLogistic,
113
115
  //OComponents
114
116
  OAlert,
115
117
  OButton,