ordering-ui-react-native 0.15.57 → 0.15.58-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 (182) hide show
  1. package/package.json +5 -3
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/AddressForm/index.tsx +18 -2
  4. package/src/components/BusinessController/index.tsx +16 -8
  5. package/src/components/BusinessTypeFilter/index.tsx +3 -1
  6. package/src/components/BusinessesListing/index.tsx +1 -1
  7. package/src/components/Checkout/index.tsx +23 -2
  8. package/src/components/DriverTips/index.tsx +11 -6
  9. package/src/components/LanguageSelector/index.tsx +7 -2
  10. package/src/components/LoginForm/index.tsx +120 -30
  11. package/src/components/LoginForm/styles.tsx +6 -0
  12. package/src/components/OrderDetails/index.tsx +7 -21
  13. package/src/components/PaymentOptions/index.tsx +67 -50
  14. package/src/components/PaymentOptionsWebView/index.tsx +123 -124
  15. package/src/components/SignupForm/index.tsx +145 -61
  16. package/src/components/SingleProductCard/index.tsx +16 -4
  17. package/src/components/StripeMethodForm/index.tsx +1 -2
  18. package/src/components/UpsellingProducts/index.tsx +1 -1
  19. package/src/components/UserProfileForm/index.tsx +63 -6
  20. package/src/components/UserProfileForm/styles.tsx +8 -0
  21. package/src/components/VerifyPhone/styles.tsx +1 -2
  22. package/src/components/shared/OModal.tsx +1 -1
  23. package/src/hooks/useCountdownTimer.tsx +26 -0
  24. package/src/navigators/CheckoutNavigator.tsx +6 -0
  25. package/src/navigators/HomeNavigator.tsx +12 -0
  26. package/src/pages/BusinessesListing.tsx +1 -1
  27. package/src/pages/MultiCheckout.tsx +31 -0
  28. package/src/pages/MultiOrdersDetails.tsx +27 -0
  29. package/src/pages/Sessions.tsx +22 -0
  30. package/src/theme.json +0 -1
  31. package/src/types/index.tsx +18 -11
  32. package/src/utils/index.tsx +68 -1
  33. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +103 -15
  34. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -0
  35. package/themes/business/src/components/Chat/index.tsx +42 -90
  36. package/themes/business/src/components/DriverMap/index.tsx +6 -5
  37. package/themes/business/src/components/LoginForm/index.tsx +89 -2
  38. package/themes/business/src/components/LoginForm/styles.tsx +6 -0
  39. package/themes/business/src/components/LogoutButton/index.tsx +1 -1
  40. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -13
  41. package/themes/business/src/components/OrderDetails/Business.tsx +2 -2
  42. package/themes/business/src/components/OrderDetails/Delivery.tsx +28 -11
  43. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +41 -7
  44. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +6 -0
  45. package/themes/business/src/components/OrdersListManager/index.tsx +1 -1
  46. package/themes/business/src/components/OrdersOption/index.tsx +5 -2
  47. package/themes/business/src/components/PreviousOrders/index.tsx +2 -2
  48. package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
  49. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  50. package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
  51. package/themes/business/src/components/shared/OModal.tsx +1 -1
  52. package/themes/business/src/types/index.tsx +6 -1
  53. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  54. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  55. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  56. package/themes/kiosk/src/components/BusinessMenu/index.tsx +39 -28
  57. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -3
  58. package/themes/kiosk/src/components/Cart/index.tsx +11 -12
  59. package/themes/kiosk/src/components/CartBottomSheet/index.tsx +9 -2
  60. package/themes/kiosk/src/components/CartContent/index.tsx +0 -11
  61. package/themes/kiosk/src/components/CartItem/index.tsx +4 -3
  62. package/themes/kiosk/src/components/CategoriesMenu/index.tsx +107 -62
  63. package/themes/kiosk/src/components/Checkout/index.tsx +40 -22
  64. package/themes/kiosk/src/components/CustomerName/index.tsx +0 -6
  65. package/themes/kiosk/src/components/DrawerView/index.tsx +1 -0
  66. package/themes/kiosk/src/components/DrawerView/styles.tsx +2 -2
  67. package/themes/kiosk/src/components/NavBar/index.tsx +29 -20
  68. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  69. package/themes/kiosk/src/components/OrderDetails/index.tsx +32 -27
  70. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +9 -11
  71. package/themes/kiosk/src/components/PaymentOptions/index.tsx +56 -54
  72. package/themes/kiosk/src/components/ProductForm/index.tsx +7 -8
  73. package/themes/kiosk/src/components/ProductItemAccordion/index.tsx +2 -2
  74. package/themes/kiosk/src/components/ProductOption/index.tsx +1 -1
  75. package/themes/kiosk/src/components/ProductOptionSubOption/index.tsx +3 -1
  76. package/themes/kiosk/src/components/UpsellingProducts/index.tsx +16 -5
  77. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  78. package/themes/kiosk/src/types/index.d.ts +1 -0
  79. package/themes/original/index.tsx +22 -8
  80. package/themes/original/src/components/ActiveOrders/index.tsx +15 -132
  81. package/themes/original/src/components/ActiveOrders/styles.tsx +0 -54
  82. package/themes/original/src/components/AddressForm/index.tsx +7 -6
  83. package/themes/original/src/components/AddressList/index.tsx +30 -18
  84. package/themes/original/src/components/AppleLogin/index.tsx +9 -13
  85. package/themes/original/src/components/BusinessBasicInformation/index.tsx +136 -45
  86. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +4 -0
  87. package/themes/original/src/components/BusinessController/index.tsx +48 -11
  88. package/themes/original/src/components/BusinessController/styles.tsx +27 -0
  89. package/themes/original/src/components/BusinessFeaturedController/index.tsx +20 -1
  90. package/themes/original/src/components/BusinessFeaturedController/styles.tsx +23 -0
  91. package/themes/original/src/components/BusinessItemAccordion/index.tsx +8 -5
  92. package/themes/original/src/components/BusinessItemAccordion/styles.tsx +3 -1
  93. package/themes/original/src/components/BusinessListingSearch/index.tsx +196 -58
  94. package/themes/original/src/components/BusinessListingSearch/styles.tsx +22 -2
  95. package/themes/original/src/components/BusinessPreorder/index.tsx +1 -1
  96. package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -2
  97. package/themes/original/src/components/BusinessProductsList/CategoryDescription/index.tsx +44 -0
  98. package/themes/original/src/components/BusinessProductsList/index.tsx +51 -53
  99. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  100. package/themes/original/src/components/BusinessProductsListing/index.tsx +105 -22
  101. package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -0
  102. package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
  103. package/themes/original/src/components/BusinessTypeFilter/index.tsx +1 -2
  104. package/themes/original/src/components/BusinessesListing/index.tsx +126 -65
  105. package/themes/original/src/components/BusinessesListing/styles.tsx +11 -3
  106. package/themes/original/src/components/Cart/index.tsx +60 -41
  107. package/themes/original/src/components/Checkout/index.tsx +48 -32
  108. package/themes/original/src/components/DriverTips/index.tsx +17 -12
  109. package/themes/original/src/components/Favorite/index.tsx +92 -0
  110. package/themes/original/src/components/Favorite/styles.tsx +22 -0
  111. package/themes/original/src/components/FavoriteList/index.tsx +298 -0
  112. package/themes/original/src/components/FavoriteList/styles.tsx +5 -0
  113. package/themes/original/src/components/ForgotPasswordForm/index.tsx +84 -4
  114. package/themes/original/src/components/GPSButton/index.tsx +15 -8
  115. package/themes/original/src/components/GoogleMap/index.tsx +11 -11
  116. package/themes/original/src/components/Help/index.tsx +21 -4
  117. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +18 -1
  118. package/themes/original/src/components/LastOrders/index.tsx +12 -1
  119. package/themes/original/src/components/LoginForm/Otp/index.tsx +91 -0
  120. package/themes/original/src/components/LoginForm/Otp/styles.tsx +7 -0
  121. package/themes/original/src/components/LoginForm/index.tsx +332 -164
  122. package/themes/original/src/components/LoginForm/styles.tsx +1 -3
  123. package/themes/original/src/components/MessageListing/index.tsx +10 -1
  124. package/themes/original/src/components/Messages/index.tsx +1 -1
  125. package/themes/original/src/components/MomentOption/index.tsx +10 -1
  126. package/themes/original/src/components/MomentOption/styles.tsx +1 -1
  127. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +243 -0
  128. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/styles.tsx +46 -0
  129. package/themes/original/src/components/MultiCheckout/index.tsx +298 -0
  130. package/themes/original/src/components/MultiCheckout/styles.tsx +59 -0
  131. package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +372 -0
  132. package/themes/original/src/components/MultiOrdersDetails/index.tsx +258 -0
  133. package/themes/original/src/components/MultiOrdersDetails/styles.tsx +50 -0
  134. package/themes/original/src/components/MyOrders/index.tsx +120 -32
  135. package/themes/original/src/components/MyOrders/styles.tsx +8 -1
  136. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
  137. package/themes/original/src/components/OrderDetails/index.tsx +135 -49
  138. package/themes/original/src/components/OrderDetails/styles.tsx +1 -2
  139. package/themes/original/src/components/OrderSummary/index.tsx +2 -2
  140. package/themes/original/src/components/OrderTypeSelector/index.tsx +4 -2
  141. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +153 -0
  142. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +6 -0
  143. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +53 -0
  144. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +6 -0
  145. package/themes/original/src/components/OrdersOption/index.tsx +130 -38
  146. package/themes/original/src/components/OrdersOption/styles.tsx +4 -1
  147. package/themes/original/src/components/PaymentOptionCash/index.tsx +2 -2
  148. package/themes/original/src/components/PaymentOptionWallet/index.tsx +17 -23
  149. package/themes/original/src/components/PaymentOptionWallet/styles.tsx +1 -1
  150. package/themes/original/src/components/PaymentOptions/index.tsx +57 -36
  151. package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
  152. package/themes/original/src/components/PreviousOrders/index.tsx +18 -147
  153. package/themes/original/src/components/ProductForm/index.tsx +70 -62
  154. package/themes/original/src/components/ProductForm/styles.tsx +0 -1
  155. package/themes/original/src/components/ProductItemAccordion/index.tsx +2 -2
  156. package/themes/original/src/components/ProductOptionSubOption/index.tsx +18 -12
  157. package/themes/original/src/components/Promotions/index.tsx +151 -133
  158. package/themes/original/src/components/Promotions/styles.tsx +3 -23
  159. package/themes/original/src/components/SearchBar/index.tsx +10 -4
  160. package/themes/original/src/components/Sessions/index.tsx +160 -0
  161. package/themes/original/src/components/Sessions/styles.tsx +15 -0
  162. package/themes/original/src/components/SignupForm/index.tsx +237 -126
  163. package/themes/original/src/components/SingleOrderCard/index.tsx +282 -0
  164. package/themes/original/src/components/SingleOrderCard/styles.tsx +54 -0
  165. package/themes/original/src/components/SingleProductCard/index.tsx +59 -17
  166. package/themes/original/src/components/StripeElementsForm/index.tsx +16 -8
  167. package/themes/original/src/components/StripeElementsForm/naked.tsx +2 -2
  168. package/themes/original/src/components/UpsellingProducts/index.tsx +86 -74
  169. package/themes/original/src/components/UserDetails/index.tsx +5 -96
  170. package/themes/original/src/components/UserFormDetails/index.tsx +25 -26
  171. package/themes/original/src/components/UserProfile/index.tsx +52 -5
  172. package/themes/original/src/components/UserProfileForm/index.tsx +20 -18
  173. package/themes/original/src/components/UserVerification/index.tsx +178 -192
  174. package/themes/original/src/components/VerifyPhone/index.tsx +10 -7
  175. package/themes/original/src/components/VerifyPhone/styles.tsx +2 -1
  176. package/themes/original/src/components/Wallets/index.tsx +76 -9
  177. package/themes/original/src/components/Wallets/styles.tsx +21 -0
  178. package/themes/original/src/components/shared/OModal.tsx +4 -2
  179. package/themes/original/src/types/index.tsx +189 -35
  180. package/themes/original/src/utils/index.tsx +85 -2
  181. package/themes/single-business/src/components/OrderTypeSelector/index.tsx +1 -1
  182. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
@@ -41,3 +41,24 @@ export const OTabs = styled.View`
41
41
  export const OTab = styled.View`
42
42
  padding-horizontal: 10px;
43
43
  `;
44
+
45
+ export const LoyaltyContent = styled.View`
46
+ width: 100%;
47
+ margin-bottom: 20px;
48
+ `
49
+
50
+ export const LoyaltyWrapp = styled.View`
51
+ flex-direction: column;
52
+ justify-content: center;
53
+ align-items: center;
54
+ `
55
+
56
+ export const LoyaltyImg = styled.ImageBackground`
57
+ position: relative;
58
+ height: 150px;
59
+ width: 100%;
60
+ display: flex;
61
+ flex-direction: column;
62
+ justify-content: center;
63
+ align-items: center;
64
+ `
@@ -21,6 +21,7 @@ interface Props {
21
21
  isNotDecoration?: boolean;
22
22
  styleCloseButton?: any,
23
23
  isAvoidKeyBoardView?: boolean;
24
+ styleContainerCloseButton?: any;
24
25
  }
25
26
  const KeyboardView = styled.KeyboardAvoidingView`
26
27
  flex-grow: 1;
@@ -45,6 +46,7 @@ const OModal = (props: Props): React.ReactElement => {
45
46
  isNotDecoration,
46
47
  style,
47
48
  styleCloseButton,
49
+ styleContainerCloseButton,
48
50
  isAvoidKeyBoardView
49
51
  } = props
50
52
 
@@ -55,7 +57,7 @@ const OModal = (props: Props): React.ReactElement => {
55
57
  {!entireModal ? (
56
58
  <View style={styles.centeredView}>
57
59
  <View style={titleSectionStyle ? titleSectionStyle : styles.titleSection}>
58
- <TouchableOpacity style={styles.wrapperIcon} onPress={onClose}>
60
+ <TouchableOpacity style={{...styles.wrapperIcon, ...styleContainerCloseButton}} onPress={onClose}>
59
61
  <OIcon
60
62
  src={theme.images.general.close}
61
63
  width={16}
@@ -91,7 +93,7 @@ const OModal = (props: Props): React.ReactElement => {
91
93
  animationType="slide"
92
94
  transparent={isTransparent}
93
95
  visible={open}
94
- onRequestClose={() => onClose()}
96
+ onRequestClose={() => onClose && onClose()}
95
97
  style={{ height: '100%', flex: 1, position: 'absolute', ...style, zIndex: 9999 }}
96
98
  >
97
99
  {isAvoidKeyBoardView ? (
@@ -18,7 +18,13 @@ export interface LoginParams {
18
18
  handleCheckPhoneCode?: any;
19
19
  notificationState?: any;
20
20
  handleReCaptcha?: any;
21
- enableReCaptcha?: any;
21
+ enableReCaptcha?: any;
22
+ otpType?: string,
23
+ setOtpType: (type: string) => void,
24
+ generateOtpCode: (values?: any) => void,
25
+ useLoginOtpEmail?: boolean,
26
+ useLoginOtpCellphone?: boolean,
27
+ useLoginOtp?: boolean
22
28
  }
23
29
  export interface ProfileParams {
24
30
  navigation?: any;
@@ -39,6 +45,8 @@ export interface ProfileParams {
39
45
  verifyPhoneState?: any;
40
46
  setCheckPhoneCodeState?: any;
41
47
  isVerifiedPhone?: any;
48
+ handleRemoveAccount?: any;
49
+ removeAccountState?: any;
42
50
  }
43
51
 
44
52
  export interface AddressListParams {
@@ -57,6 +65,7 @@ export interface AddressListParams {
57
65
  isFromProductsList?: boolean;
58
66
  afterSignup?: boolean;
59
67
  isFromCheckout?: boolean
68
+ loadAddresses: () => void
60
69
  }
61
70
 
62
71
  export interface AddressFormParams {
@@ -101,9 +110,20 @@ export interface SignupParams {
101
110
  handleSendVerifyCode?: any;
102
111
  handleCheckPhoneCode?: any;
103
112
  notificationState?: any;
113
+ signUpTab?: string;
114
+ useSignUpFullDetails?: boolean;
115
+ useSignUpOtpEmail?: boolean;
116
+ useSignUpOtpCellphone?: boolean;
117
+ willVerifyOtpState?: boolean;
118
+ numOtpInputs?: number;
104
119
  handleChangePromotions: () => void;
120
+ handleChangeInput?: (in1: any, in2: any) => void;
105
121
  enableReCaptcha?: boolean;
106
- handleReCaptcha?: () => void;
122
+ generateOtpCode?: (in1?: any) => void;
123
+ handleReCaptcha?: (token?: any) => void;
124
+ setSignUpTab?: (in1: string) => void;
125
+ setWillVerifyOtpState?: (in1: boolean) => void;
126
+ setOtpState?: (in1: string) => void;
107
127
  }
108
128
 
109
129
  export interface PhoneInputParams {
@@ -144,13 +164,21 @@ export interface BusinessesListingParams {
144
164
  defaultBusinessType?: any;
145
165
  franchiseId?: any;
146
166
  businessId?: any;
167
+ isGuestUser?: any;
168
+ handleUpdateBusinessList?: any;
169
+ priceLevelSelected?: any;
170
+ handleChangePriceLevel?: any;
171
+ businessTypeSelected?: any;
147
172
  }
148
173
  export interface HighestRatedBusinessesParams {
149
174
  businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
150
175
  onBusinessClick?: void;
151
176
  navigation?: any;
152
177
  isLoading?: boolean;
153
- getBusinesses: (newFetch: boolean) => void
178
+ getBusinesses: (newFetch: boolean) => void,
179
+ favoriteIds?: any,
180
+ setFavoriteIds?: any,
181
+ handleUpdateBusinessList?: any
154
182
  }
155
183
  export interface BusinessTypeFilterParams {
156
184
  businessTypes?: Array<any>;
@@ -159,10 +187,11 @@ export interface BusinessTypeFilterParams {
159
187
  defaultBusinessType?: string | null;
160
188
  images?: any
161
189
  typesState?: any
162
- setBusinessTypes?: any
190
+ setBusinessTypes?: any,
191
+ isAppoint?: boolean | undefined
163
192
  }
164
193
  export interface BusinessControllerParams {
165
- key?: number;
194
+ key?: string | number;
166
195
  business?: any;
167
196
  handleCustomClick?: any;
168
197
  orderType?: any;
@@ -179,7 +208,12 @@ export interface BusinessControllerParams {
179
208
  businessDeliveryPrice?: number,
180
209
  businessDeliveryTime?: string,
181
210
  businessPickupTime?: string,
182
- businessDistance?: number
211
+ businessDistance?: number,
212
+ favoriteIds?: number[],
213
+ handleFavoriteBusiness?: any,
214
+ setFavoriteIds?: any;
215
+ handleUpdateBusinessList?: any;
216
+ enableIntersection?: boolean;
183
217
  }
184
218
  export interface BusinessProductsListingParams {
185
219
  navigation?: any;
@@ -195,10 +229,16 @@ export interface BusinessProductsListingParams {
195
229
  header?: any;
196
230
  logo?: any;
197
231
  productModal?: any;
232
+ alertState?: { open: boolean, content: any[] };
233
+ setAlertState?: any;
234
+ multiRemoveProducts?: (in1: any, in2: any) => {};
198
235
  getNextProducts?: () => {};
199
236
  handleChangeCategory: (value: any) => {};
200
237
  setProductLogin?: () => {};
201
238
  updateProductModal?: (value: any) => {};
239
+ handleUpdateProducts?: any;
240
+ professionalSelected?: any;
241
+ handleChangeProfessionalSelected?: any;
202
242
  }
203
243
  export interface BusinessBasicInformationParams {
204
244
  navigation?: any;
@@ -243,17 +283,23 @@ export interface BusinessProductsListParams {
243
283
  setCategoriesLayout?: any,
244
284
  currentCart?: any,
245
285
  setSubcategoriesSelected?: any,
246
- subcategoriesSelected?: any,
247
- onClickCategory?: any,
248
- lazyLoadProductsRecommended?: boolean
286
+ subcategoriesSelected?: any,
287
+ onClickCategory?: any,
288
+ lazyLoadProductsRecommended?: boolean,
289
+ isFiltMode?: boolean,
290
+ handleUpdateProducts?: any
249
291
  }
250
292
  export interface SingleProductCardParams {
251
- businessId: any,
293
+ businessId: any;
252
294
  product: any;
253
295
  isSoldOut: boolean;
254
296
  onProductClick: any;
255
297
  productAddedToCartLength: number;
256
- style?: ViewStyle
298
+ style?: ViewStyle;
299
+ categoryState?: any;
300
+ handleFavoriteProduct?: any;
301
+ handleUpdateProducts?: any;
302
+ enableIntersection?: boolean;
257
303
  }
258
304
  export interface BusinessInformationParams {
259
305
  navigation?: any,
@@ -287,6 +333,7 @@ export interface OrdersOptionParams {
287
333
  orderList?: any,
288
334
  franchiseId?: any,
289
335
  activeOrders?: boolean,
336
+ pastOrders?: boolean,
290
337
  pagination?: any,
291
338
  titleContent?: string,
292
339
  customArray?: Array<any>,
@@ -297,11 +344,23 @@ export interface OrdersOptionParams {
297
344
  loadOrders?: any,
298
345
  setOrderList?: any,
299
346
  preOrders?: boolean,
347
+ reorderState?: any,
348
+ handleReorder?: (orderId: number) => {},
300
349
  setOrdersLength?: ({ activeOrdersLength, previousOrdersLength }: { activeOrdersLength: number, previousOrdersLength: number }) => void,
301
350
  ordersLength: { activeOrdersLength: number, previousOrdersLength: number },
302
351
  setSelectedOrderId?: any,
303
352
  setOpenMessges?: any,
304
- loadMoreStatus?: boolean
353
+ loadMoreStatus?: boolean,
354
+ refreshOrders?: boolean,
355
+ setRefreshOrders?: (value: boolean) => void,
356
+ handleUpdateOrderList?: (orderId: number, changes: any) => {},
357
+ isBusiness?: boolean,
358
+ isProducts?: boolean,
359
+ businessOrderIds?: any,
360
+ products?: any,
361
+ businessesSearchList?: any,
362
+ hideOrders?: boolean,
363
+ BusinessControllerSkeletons?: any,
305
364
  }
306
365
  export interface ActiveOrdersParams {
307
366
  orders?: any,
@@ -314,7 +373,8 @@ export interface ActiveOrdersParams {
314
373
  loadMoreOrders?: () => {},
315
374
  onNavigationRedirect?: (route: string, params?: any) => {},
316
375
  isMessageView?: boolean,
317
- handleClickOrder?: any
376
+ handleClickOrder?: any,
377
+ handleUpdateOrderList?: (orderId: number, changes: any) => {}
318
378
  }
319
379
  export interface PreviousOrdersParams {
320
380
  orders?: any,
@@ -323,8 +383,9 @@ export interface PreviousOrdersParams {
323
383
  orderID?: number
324
384
  reorderLoading?: boolean,
325
385
  loadMoreOrders?: () => {},
326
- handleReorder: (order: any) => {},
386
+ handleReorder?: (orderId: number) => {},
327
387
  onNavigationRedirect?: (route: string, params?: any) => {}
388
+ handleUpdateOrderList?: (orderId: number, changes: any) => {}
328
389
  }
329
390
  export interface OrderDetailsParams {
330
391
  navigation?: any,
@@ -356,25 +417,28 @@ export interface ProductItemAccordionParams {
356
417
  isFromCheckout?: any
357
418
  }
358
419
  export interface ReviewOrderParams {
359
- order?: { id: number, businessId: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
360
- stars?: any,
361
- handleChangeInput?: any,
362
- handleChangeRating?: any,
363
- handleSendReview?: any,
364
- formState?: any,
365
- navigation?: any,
366
- setIsReviewed?: (isReviewed: boolean) => {},
367
- handleReviewState?: any,
368
- setStars?: any,
369
- onNavigationRedirect?: any
420
+ order?: { id: number, business_id: number, business_name?: string, delivery_datetime?: string, logo: string, driver: any, products: Array<any>, review: any, user_review: any };
421
+ stars?: any;
422
+ handleChangeInput?: any;
423
+ handleChangeRating?: any;
424
+ handleSendReview?: any;
425
+ formState?: any;
426
+ navigation?: any;
427
+ setIsReviewed?: (isReviewed: boolean) => void;
428
+ handleReviewState?: any;
429
+ setStars?: any;
430
+ onNavigationRedirect?: any;
431
+ closeReviewOrder?: () => void;
432
+ skipReview?: () => void;
370
433
  }
371
434
  export interface ReviewProductParams {
372
435
  navigation?: any,
373
436
  onNavigationRedirect?: any,
374
- order?: { orderId: number, businessId: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
437
+ order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
375
438
  formState?: any,
376
439
  handleChangeFormState?: any,
377
- handleSendProductReview?: any
440
+ handleSendProductReview?: any;
441
+ closeReviewProduct?: () => void;
378
442
  }
379
443
  export interface SingleProductReviewParams {
380
444
  product: any,
@@ -384,12 +448,13 @@ export interface SingleProductReviewParams {
384
448
  export interface ReviewDriverParams {
385
449
  navigation?: any,
386
450
  onNavigationRedirect?: any,
387
- order?: { orderId: number, businessId: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
451
+ order?: { orderId: number, business_id: number, logo: string, driver: any, products: Array<any>, review: any, user_review: any },
388
452
  formState?: any,
389
453
  setIsDriverReviewed?: (isReviewed: boolean) => {},
390
454
  dirverReviews?: any,
391
455
  setDriverReviews?: any,
392
- handleSendDriverReview?: any
456
+ handleSendDriverReview?: any;
457
+ closeReviewDriver?: () => void;
393
458
  }
394
459
  export interface MessagesParams {
395
460
  type?: string,
@@ -487,6 +552,7 @@ export interface OrderTypeSelectParams {
487
552
  defaultValue?: number;
488
553
  configTypes?: Array<any>;
489
554
  orderTypes: Array<any>;
555
+ setOrderTypeValue?: (value: number) => any
490
556
  }
491
557
  export interface UpsellingProductsParams {
492
558
  isCustomMode?: boolean;
@@ -560,7 +626,11 @@ export interface BusinessSearchParams {
560
626
  filters: any,
561
627
  businessTypes: Array<number>,
562
628
  setFilters: (filters: any) => void,
563
- lazySearch?: boolean
629
+ lazySearch?: boolean,
630
+ brandList?: any;
631
+ onNavigationRedirect?: any,
632
+ handleUpdateProducts: any,
633
+ handleUpdateBusinessList?: any;
564
634
  }
565
635
 
566
636
  export interface NoNetworkParams {
@@ -578,9 +648,93 @@ export interface PlaceSpotParams {
578
648
 
579
649
  export interface PromotionParams {
580
650
  navigation: any,
581
- offersState: any,
582
- handleSearchValue: any,
583
- searchValue: string,
584
- offerSelected: any,
585
- setOfferSelected: any,
651
+ offersState: any,
652
+ handleSearchValue: any,
653
+ searchValue: string,
654
+ offerSelected: any,
655
+ setOfferSelected: any,
656
+ loadOffers: any
657
+ }
658
+ export interface SessionsParams {
659
+ navigation: any,
660
+ sessionsList: any,
661
+ actionState: any,
662
+ handleDeleteSession: any,
663
+ handleDeleteAllSessions: any
664
+ }
665
+
666
+ export interface otpParams {
667
+ willVerifyOtpState: boolean,
668
+ setWillVerifyOtpState: (val: boolean) => void,
669
+ onSubmit: () => void,
670
+ handleLoginOtp: (code: string) => void,
671
+ setAlertState: any;
672
+ pinCount: number;
673
+ }
674
+
675
+ export interface FavoriteParams {
676
+ favoriteList: any,
677
+ handleUpdateFavoriteList: (id: number, changes: any) => {},
678
+ pagination: any,
679
+ getFavoriteList: (value: number) => {},
680
+ navigation?: any,
681
+ onNavigationRedirect?: (route: string, params?: any) => {},
682
+ reorderState?: any,
683
+ handleReorder?: (orderId: number) => {},
684
+ isOrder?: boolean,
685
+ isProduct?: boolean,
686
+ isBusiness?: boolean
687
+ }
688
+
689
+ export interface SingleOrderCardParams {
690
+ order: any,
691
+ reorderLoading: any,
692
+ handleReorder?: (value: any) => {},
693
+ getOrderStatus: any,
694
+ handleFavoriteOrder?: (value: boolean) => {},
695
+ onNavigationRedirect?: (route: string, params?: any) => {},
696
+ pastOrders: any,
697
+ isMessageView?: any,
698
+ handleClickOrder: (value: any) => {}
699
+ }
700
+
701
+ export interface PreviousBusinessOrderedParams {
702
+ navigation?: any,
703
+ businessesList?: any,
704
+ setBusinessLoading?: any,
705
+ businessId?: number,
706
+ onNavigationRedirect?: any,
707
+ isBusinessesSearchList?: any,
708
+ businessLoading?: boolean
709
+ }
710
+
711
+ export interface ServiceFormParams {
712
+ navigation?: any,
713
+ professionalSelected: any,
714
+ product: any,
715
+ handleSave: (value?: any) => {}
716
+ productCart?: any
717
+ isSoldOut: boolean,
718
+ maxProductQuantity: any,
719
+ businessSlug?: string,
720
+ onClose: any,
721
+ professionalList: any
722
+ }
723
+
724
+ export interface ProfessionalFilterParams {
725
+ professionals?: any,
726
+ professionalSelected?: any,
727
+ handleChangeProfessionalSelected: any
728
+ }
729
+
730
+ export interface ProfessionalProfileParams {
731
+ professional: any,
732
+ handleChangeProfessionalSelected: any,
733
+ onClose: any
734
+ }
735
+
736
+ export interface PreviousProductsOrderedParams {
737
+ products?: any,
738
+ onProductClick?: any,
739
+ isBusinessesSearchList?: boolean
586
740
  }
@@ -33,12 +33,79 @@ export const getTraduction = (key: string) => {
33
33
  ERROR_PLACE_PAY_WITH_CARD1: 'An error occurred while trying to pay by card',
34
34
  ERROR_PLACE_PAY_WITH_PAYPAL_CAPTURE: 'An error occurred while trying to pay by PayPal',
35
35
  ERROR_ADD_PRODUCT_VERY_FAR_FOR_DELIVERY: 'Error adding product, very far for delivery',
36
- ERROR_PRODUCT_NOT_FOUND: 'Error with the product'
36
+ ERROR_PRODUCT_NOT_FOUND: 'Error with the product',
37
+ ERROR_INVALID_OFFER: 'The offer doesn\'t exist'
37
38
  }
38
39
 
39
40
  return keyList[key] ? t(key, keyList[key]) : t(key)
40
41
  }
41
42
 
43
+ /**
44
+ * Change local moment variables
45
+ */
46
+ export const setLocalMoment = (moment : any, t : any) => {
47
+ moment.locale('custom', {
48
+ months: [
49
+ t('MONTH1','January'),
50
+ t('MONTH2','February'),
51
+ t('MONTH3','March'),
52
+ t('MONTH4','April'),
53
+ t('MONTH5','May'),
54
+ t('MONTH6','June'),
55
+ t('MONTH7','July'),
56
+ t('MONTH8','August'),
57
+ t('MONTH9','September'),
58
+ t('MONTH10','October'),
59
+ t('MONTH11','November'),
60
+ t('MONTH12','December')
61
+ ],
62
+ monthsShort: [
63
+ t('MONTHSHORT1','Jan'),
64
+ t('MONTHSHORT2','Feb'),
65
+ t('MONTHSHORT3','Mar'),
66
+ t('MONTHSHORT4','Apr'),
67
+ t('MONTHSHORT5','May'),
68
+ t('MONTHSHORT6','Jun'),
69
+ t('MONTHSHORT7','Jul'),
70
+ t('MONTHSHORT8','Aug'),
71
+ t('MONTHSHORT9','Sep'),
72
+ t('MONTHSHORT10','Oct'),
73
+ t('MONTHSHORT11','Nov'),
74
+ t('MONTHSHORT12','Dec')
75
+ ],
76
+ weekdays: [
77
+ t('DAY7','Sunday'),
78
+ t('DAY1','Monday'),
79
+ t('DAY2','Tuesday'),
80
+ t('DAY3','Wednesday'),
81
+ t('DAY4','Thursday'),
82
+ t('DAY5','Friday'),
83
+ t('DAY6','Saturday')
84
+ ],
85
+ weekdaysShort: [
86
+ t('DAYSHORT7','Sun'),
87
+ t('DAYSHORT1','Mon'),
88
+ t('DAYSHORT2','Tue'),
89
+ t('DAYSHORT3','Wed'),
90
+ t('DAYSHORT4','Thu'),
91
+ t('DAYSHORT5','Fri'),
92
+ t('DAYSHORT6','Sat')
93
+ ],
94
+ weekdaysMin: [
95
+ t('DAYMIN7','Su'),
96
+ t('DAYMIN1','Mo'),
97
+ t('DAYMIN2','Tu'),
98
+ t('DAYMIN3','We'),
99
+ t('DAYMIN4','Th'),
100
+ t('DAYMIN5','Fr'),
101
+ t('DAYMIN6','Sa')
102
+ ],
103
+ meridiem : function (hours : any) {
104
+ return hours < 12 ? t('AM', 'AM') : t('PM','PM');
105
+ }
106
+ })
107
+ }
108
+
42
109
  /**
43
110
  * Function to convert delivery time in minutes
44
111
  * @param {string} time business delivery time
@@ -211,4 +278,20 @@ export const formatUrlVideo = (url : string) => {
211
278
  const match = url.match(regExp)
212
279
  const id = (match && match[7].length === 11) ? match[7] : false
213
280
  return `https://www.youtube-nocookie.com/embed/${id}`
214
- }
281
+ }
282
+
283
+ export const formatSeconds = (seconds : number) => {
284
+ // Hours, minutes and seconds
285
+ var hrs = ~~(seconds / 3600)
286
+ var mins = ~~((seconds % 3600) / 60)
287
+ var secs = ~~seconds % 60
288
+
289
+ // Output like '1:01' or '4:03:59' or '123:03:59'
290
+ var ret = ''
291
+ if (hrs > 0) {
292
+ ret += '' + hrs + ':' + (mins < 10 ? '0' : '')
293
+ }
294
+ ret += '' + mins + ':' + (secs < 10 ? '0' : '')
295
+ ret += '' + secs
296
+ return ret
297
+ }
@@ -58,7 +58,7 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
58
58
  btnStyle={{ paddingLeft: 0 }}
59
59
  paddingTop={0}
60
60
  style={{ paddingBottom: 0 }}
61
- title={t('HOW_WILL_YOUR_ORDER_TYPE', 'How will your order type?')}
61
+ title={t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will your order type?')}
62
62
  titleAlign={'center'}
63
63
  titleStyle={{ fontSize: 14 }}
64
64
  />
@@ -144,7 +144,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
144
144
  {isFarAway && (
145
145
  <FarAwayMessage style={styles.farAwayMsg}>
146
146
  <Ionicons name='md-warning-outline' style={styles.iconStyle} />
147
- <OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'You are far from this address')}</OText>
147
+ <OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'Your are far from this address')}</OText>
148
148
  </FarAwayMessage>
149
149
  )}
150
150
  <View style={styles.wrapperOrderOptions}>