ordering-ui-react-native 0.19.2-testing → 0.19.3-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 (217) hide show
  1. package/package.json +6 -5
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/BusinessInformation/index.tsx +10 -9
  4. package/src/components/BusinessesListing/index.tsx +1 -1
  5. package/src/components/VerifyPhone/styles.tsx +1 -2
  6. package/src/components/shared/OToast.tsx +3 -2
  7. package/src/utils/index.tsx +2 -2
  8. package/themes/business/index.tsx +2 -0
  9. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -2
  10. package/themes/business/src/components/BusinessController/index.tsx +19 -17
  11. package/themes/business/src/components/BusinessProductList/AccordionDropdown.tsx +63 -0
  12. package/themes/business/src/components/BusinessProductList/IterateCategories.tsx +108 -0
  13. package/themes/business/src/components/BusinessProductList/ProductList.tsx +196 -0
  14. package/themes/business/src/components/BusinessProductList/index.tsx +196 -0
  15. package/themes/business/src/components/BusinessProductList/styles.tsx +10 -0
  16. package/themes/business/src/components/Chat/index.tsx +41 -13
  17. package/themes/business/src/components/DriverMap/index.tsx +4 -2
  18. package/themes/business/src/components/DriverSchedule/index.tsx +5 -5
  19. package/themes/business/src/components/FloatingButton/index.tsx +34 -31
  20. package/themes/business/src/components/MapView/index.tsx +11 -7
  21. package/themes/business/src/components/MessagesOption/index.tsx +22 -94
  22. package/themes/business/src/components/NewOrderNotification/index.tsx +121 -103
  23. package/themes/business/src/components/OrderDetails/Delivery.tsx +19 -10
  24. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +88 -51
  25. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +26 -6
  26. package/themes/business/src/components/OrderDetailsLogistic/index.tsx +6 -1
  27. package/themes/business/src/components/OrderSummary/index.tsx +27 -13
  28. package/themes/business/src/components/OrdersListManager/index.tsx +7 -2
  29. package/themes/business/src/components/OrdersListManager/utils.tsx +1 -1
  30. package/themes/business/src/components/OrdersOption/index.tsx +83 -37
  31. package/themes/business/src/components/PreviousMessages/FooterMessageComponent.tsx +103 -0
  32. package/themes/business/src/components/PreviousMessages/index.tsx +97 -55
  33. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +24 -31
  34. package/themes/business/src/components/PreviousOrders/OrderList.tsx +93 -0
  35. package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +1 -1
  36. package/themes/business/src/components/PreviousOrders/index.tsx +192 -220
  37. package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
  38. package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
  39. package/themes/business/src/components/SearchBar/index.tsx +2 -1
  40. package/themes/business/src/components/StoresList/index.tsx +5 -3
  41. package/themes/business/src/components/UserProfileForm/index.tsx +27 -10
  42. package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
  43. package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
  44. package/themes/business/src/types/index.tsx +10 -0
  45. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  46. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  47. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  48. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  49. package/themes/kiosk/src/components/LoginForm/index.tsx +124 -96
  50. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  51. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  52. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  53. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  54. package/themes/original/index.tsx +7 -3
  55. package/themes/original/src/components/AddressForm/index.tsx +2 -2
  56. package/themes/original/src/components/AddressForm/styles.tsx +1 -1
  57. package/themes/original/src/components/AddressList/index.tsx +4 -7
  58. package/themes/original/src/components/AddressList/styles.tsx +4 -4
  59. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  60. package/themes/original/src/components/BusinessBasicInformation/index.tsx +3 -3
  61. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
  62. package/themes/original/src/components/BusinessController/index.tsx +9 -6
  63. package/themes/original/src/components/BusinessController/styles.tsx +8 -7
  64. package/themes/original/src/components/BusinessInformation/index.tsx +35 -3
  65. package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
  66. package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
  67. package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
  68. package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
  69. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
  70. package/themes/original/src/components/BusinessListingSearch/index.tsx +56 -361
  71. package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
  72. package/themes/original/src/components/BusinessPreorder/index.tsx +3 -4
  73. package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
  74. package/themes/original/src/components/BusinessProductsList/index.tsx +2 -2
  75. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  76. package/themes/original/src/components/BusinessProductsListing/index.tsx +43 -19
  77. package/themes/original/src/components/BusinessProductsListing/styles.tsx +3 -4
  78. package/themes/original/src/components/BusinessReviews/index.tsx +1 -1
  79. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
  80. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
  81. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +69 -0
  82. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
  83. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
  84. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +29 -402
  85. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
  86. package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
  87. package/themes/original/src/components/Cart/index.tsx +27 -8
  88. package/themes/original/src/components/CartContent/index.tsx +61 -39
  89. package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
  90. package/themes/original/src/components/Checkout/index.tsx +199 -55
  91. package/themes/original/src/components/Checkout/styles.tsx +17 -0
  92. package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
  93. package/themes/original/src/components/DatePicker/index.tsx +17 -0
  94. package/themes/original/src/components/DatePicker/styles.tsx +20 -0
  95. package/themes/original/src/components/Favorite/index.tsx +4 -9
  96. package/themes/original/src/components/Favorite/styles.tsx +0 -2
  97. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  98. package/themes/original/src/components/GPSButton/index.tsx +1 -1
  99. package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
  100. package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +36 -3
  101. package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
  102. package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +67 -4
  103. package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
  104. package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +2 -2
  105. package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
  106. package/themes/original/src/components/GoogleMap/index.tsx +50 -5
  107. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
  108. package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
  109. package/themes/original/src/components/Home/index.tsx +1 -1
  110. package/themes/original/src/components/LastOrder/index.tsx +2 -1
  111. package/themes/original/src/components/LastOrders/index.tsx +2 -1
  112. package/themes/original/src/components/LoginForm/Otp/index.tsx +53 -47
  113. package/themes/original/src/components/LoginForm/index.tsx +6 -1
  114. package/themes/original/src/components/Messages/index.tsx +9 -4
  115. package/themes/original/src/components/Messages/styles.tsx +1 -1
  116. package/themes/original/src/components/MomentOption/index.tsx +4 -4
  117. package/themes/original/src/components/MomentSelector/index.tsx +1 -1
  118. package/themes/original/src/components/MultiCart/index.tsx +1 -1
  119. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +13 -4
  120. package/themes/original/src/components/MultiCheckout/index.tsx +184 -51
  121. package/themes/original/src/components/MultiOrdersDetails/index.tsx +1 -1
  122. package/themes/original/src/components/MyOrders/index.tsx +5 -5
  123. package/themes/original/src/components/NavBar/index.tsx +3 -1
  124. package/themes/original/src/components/NetworkError/index.tsx +2 -3
  125. package/themes/original/src/components/NetworkError/styles.tsx +2 -2
  126. package/themes/original/src/components/Notifications/index.tsx +4 -8
  127. package/themes/original/src/components/Notifications/styles.tsx +0 -1
  128. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +7 -3
  129. package/themes/original/src/components/OrderDetails/index.tsx +716 -667
  130. package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
  131. package/themes/original/src/components/OrderProgress/index.tsx +7 -7
  132. package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
  133. package/themes/original/src/components/OrderSummary/index.tsx +5 -3
  134. package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -6
  135. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
  136. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
  137. package/themes/original/src/components/OrdersOption/index.tsx +4 -3
  138. package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
  139. package/themes/original/src/components/PageBanner/index.tsx +3 -0
  140. package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
  141. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  142. package/themes/original/src/components/PaymentOptions/index.tsx +41 -32
  143. package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -1
  144. package/themes/original/src/components/ProductForm/ActionButton.tsx +120 -0
  145. package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
  146. package/themes/original/src/components/ProductForm/index.tsx +81 -167
  147. package/themes/original/src/components/ProductForm/styles.tsx +1 -1
  148. package/themes/original/src/components/ProductItemAccordion/index.tsx +5 -0
  149. package/themes/original/src/components/ProductOptionSubOption/index.tsx +120 -79
  150. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +10 -9
  151. package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
  152. package/themes/original/src/components/Promotions/index.tsx +4 -4
  153. package/themes/original/src/components/Promotions/styles.tsx +0 -2
  154. package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
  155. package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
  156. package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
  157. package/themes/original/src/components/ServiceForm/index.tsx +2 -2
  158. package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
  159. package/themes/original/src/components/SingleOrderCard/index.tsx +4 -3
  160. package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
  161. package/themes/original/src/components/StripeCardsList/index.tsx +53 -7
  162. package/themes/original/src/components/StripeElementsForm/index.tsx +1 -1
  163. package/themes/original/src/components/StripeElementsForm/naked.tsx +12 -1
  164. package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
  165. package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +86 -0
  166. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -199
  167. package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
  168. package/themes/original/src/components/UserFormDetails/index.tsx +53 -7
  169. package/themes/original/src/components/UserProfile/index.tsx +1 -1
  170. package/themes/original/src/components/UserProfileForm/index.tsx +30 -36
  171. package/themes/original/src/components/UserVerification/index.tsx +55 -50
  172. package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
  173. package/themes/original/src/components/Wallets/index.tsx +8 -9
  174. package/themes/original/src/components/Wallets/styles.tsx +1 -1
  175. package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
  176. package/themes/original/src/components/shared/OInput.tsx +1 -4
  177. package/themes/original/src/components/shared/OModal.tsx +12 -14
  178. package/themes/original/src/layouts/Container.tsx +5 -3
  179. package/themes/original/src/types/index.tsx +10 -2
  180. package/themes/original/src/utils/index.tsx +124 -0
  181. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
  182. package/src/navigators/BottomNavigator.tsx +0 -117
  183. package/src/navigators/CheckoutNavigator.tsx +0 -66
  184. package/src/navigators/HomeNavigator.tsx +0 -202
  185. package/src/navigators/NavigationRef.tsx +0 -7
  186. package/src/navigators/RootNavigator.tsx +0 -269
  187. package/src/pages/Account.tsx +0 -34
  188. package/src/pages/AddressForm.tsx +0 -62
  189. package/src/pages/AddressList.tsx +0 -24
  190. package/src/pages/BusinessProductsList.tsx +0 -81
  191. package/src/pages/BusinessesListing.tsx +0 -43
  192. package/src/pages/CartList.tsx +0 -49
  193. package/src/pages/Checkout.tsx +0 -101
  194. package/src/pages/ForgotPassword.tsx +0 -24
  195. package/src/pages/Help.tsx +0 -23
  196. package/src/pages/HelpAccountAndPayment.tsx +0 -23
  197. package/src/pages/HelpGuide.tsx +0 -23
  198. package/src/pages/HelpOrder.tsx +0 -23
  199. package/src/pages/Home.tsx +0 -36
  200. package/src/pages/IntroductoryTutorial.tsx +0 -170
  201. package/src/pages/Login.tsx +0 -47
  202. package/src/pages/MomentOption.tsx +0 -30
  203. package/src/pages/MultiCheckout.tsx +0 -31
  204. package/src/pages/MultiOrdersDetails.tsx +0 -27
  205. package/src/pages/MyOrders.tsx +0 -40
  206. package/src/pages/NetworkError.tsx +0 -24
  207. package/src/pages/NotFound.tsx +0 -22
  208. package/src/pages/OrderDetails.tsx +0 -25
  209. package/src/pages/ProductDetails.tsx +0 -55
  210. package/src/pages/Profile.tsx +0 -36
  211. package/src/pages/ReviewDriver.tsx +0 -30
  212. package/src/pages/ReviewOrder.tsx +0 -32
  213. package/src/pages/ReviewProducts.tsx +0 -30
  214. package/src/pages/Sessions.tsx +0 -22
  215. package/src/pages/Signup.tsx +0 -53
  216. package/src/pages/SpinnerLoader.tsx +0 -10
  217. package/src/pages/Splash.tsx +0 -21
@@ -288,43 +288,37 @@ const ProfileUI = (props: ProfileParams) => {
288
288
  showCall={false}
289
289
  btnStyle={{ paddingLeft: 0 }}
290
290
  />
291
- <KeyboardAvoidingView
292
- behavior={Platform.OS == 'ios' ? 'padding' : 'height'}
293
- enabled={Platform.OS === 'ios' ? true : false}
294
- style={{ flex: 1, flexDirection: 'column', justifyContent: 'center' }}
295
- >
296
- <CenterView>
297
- <View style={styles.photo}>
298
- {user?.photo ? (
299
- <FastImage
300
- style={{ height: 80, width: 80, borderRadius: 8 }}
301
- source={{
302
- uri: user?.photo,
303
- priority: FastImage.priority.normal,
304
- }}
305
- resizeMode={FastImage.resizeMode.cover}
306
- />
307
- ) : (
308
- <Ionicons name='person-outline' size={50} />
309
- )}
310
- </View>
311
- <OIconButton
312
- icon={theme.images.general.camera}
313
- borderColor={theme.colors.clear}
314
- iconStyle={{ width: 20, height: 20 }}
315
- style={{ maxWidth: 40, position: 'absolute', alignSelf: 'center', backgroundColor: '#000', opacity: 0.5 }}
316
- onClick={() => handleImagePicker()}
317
- />
318
- </CenterView>
319
- <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginVertical: 32, zIndex: 10 }} />
320
- <Spinner visible={formState?.loading || verifyPhoneState?.loading} />
321
- <UserFormDetailsUI
322
- {...props}
323
- isProfile
324
- isEdit
325
- setWillVerifyOtpState={setWillVerifyOtpState}
291
+ <CenterView>
292
+ <View style={styles.photo}>
293
+ {user?.photo ? (
294
+ <FastImage
295
+ style={{ height: 80, width: 80, borderRadius: 8 }}
296
+ source={{
297
+ uri: user?.photo,
298
+ priority: FastImage.priority.normal,
299
+ }}
300
+ resizeMode={FastImage.resizeMode.cover}
301
+ />
302
+ ) : (
303
+ <Ionicons name='person-outline' size={50} />
304
+ )}
305
+ </View>
306
+ <OIconButton
307
+ icon={theme.images.general.camera}
308
+ borderColor={theme.colors.clear}
309
+ iconStyle={{ width: 20, height: 20 }}
310
+ style={{ maxWidth: 40, position: 'absolute', alignSelf: 'center', backgroundColor: '#000', opacity: 0.5 }}
311
+ onClick={() => handleImagePicker()}
326
312
  />
327
- </KeyboardAvoidingView>
313
+ </CenterView>
314
+ <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginVertical: 32, zIndex: 10 }} />
315
+ <Spinner visible={formState?.loading || verifyPhoneState?.loading} />
316
+ <UserFormDetailsUI
317
+ {...props}
318
+ isProfile
319
+ isEdit
320
+ setWillVerifyOtpState={setWillVerifyOtpState}
321
+ />
328
322
  </Container>
329
323
  <OModal
330
324
  open={isModalVisible}
@@ -195,38 +195,39 @@ const UserVerificationUI = (props: any) => {
195
195
  }
196
196
 
197
197
  useEffect(() => {
198
- let _timer = TIME_COUNTDOWN - 1;
199
- let minutes = 0;
200
- let seconds = 0;
201
- const interval = setInterval(() => {
202
- minutes = _timer / 60;
203
- seconds = _timer % 60;
204
-
205
- minutes = minutes < 10 ? 0 + minutes : minutes;
206
- seconds = seconds < 10 ? 0 + seconds : seconds;
207
-
208
- const formatMinutes = parseInt(minutes.toString()) < 10
209
- ? `0${parseInt(minutes.toString())}`
210
- : parseInt(minutes.toString());
211
-
212
- const formatseconds = parseInt(seconds.toString()) < 10
213
- ? `0${parseInt(seconds.toString())}`
214
- : parseInt(seconds.toString());
215
-
216
- setTimer(`${formatMinutes}:${formatseconds}`);
217
-
218
- if (--_timer < 0) {
219
- clearInterval(interval);
220
- }
221
-
222
- if (timer === `${TIME_COUNTDOWN / 60}:00` && isSendCodeAgain) {
223
- setIsSendCodeAgain(false)
224
- clearInterval(interval);
225
- }
226
- }, 1000);
227
-
228
- return () => clearInterval(interval)
229
- }, [isSendCodeAgain])
198
+ if (verificationState.phone) {
199
+ let _timer = TIME_COUNTDOWN - 1;
200
+ let minutes = 0;
201
+ let seconds = 0;
202
+ const interval = setInterval(() => {
203
+ minutes = _timer / 60;
204
+ seconds = _timer % 60;
205
+
206
+ minutes = minutes < 10 ? 0 + minutes : minutes;
207
+ seconds = seconds < 10 ? 0 + seconds : seconds;
208
+
209
+ const formatMinutes = parseInt(minutes.toString()) < 10
210
+ ? `0${parseInt(minutes.toString())}`
211
+ : parseInt(minutes.toString());
212
+
213
+ const formatseconds = parseInt(seconds.toString()) < 10
214
+ ? `0${parseInt(seconds.toString())}`
215
+ : parseInt(seconds.toString());
216
+
217
+ setTimer(`${formatMinutes}:${formatseconds}`);
218
+
219
+ if (--_timer < 0) {
220
+ clearInterval(interval);
221
+ }
222
+
223
+ if (timer === `${TIME_COUNTDOWN / 60}:00` && isSendCodeAgain) {
224
+ setIsSendCodeAgain(false)
225
+ clearInterval(interval);
226
+ }
227
+ }, 1000);
228
+ return () => clearInterval(interval)
229
+ }
230
+ }, [isSendCodeAgain, verificationState.phone])
230
231
 
231
232
  useEffect(() => {
232
233
  if (otpState?.length === CODE_LENGTH) {
@@ -292,7 +293,7 @@ const UserVerificationUI = (props: any) => {
292
293
 
293
294
  useEffect(() => {
294
295
  setupUserPhoneNumber()
295
- }, [user])
296
+ }, [user?.cellphone, user?.country_phone_code])
296
297
 
297
298
  return (
298
299
  <SafeAreaView style={{ flex: 1 }}>
@@ -401,6 +402,7 @@ const UserVerificationUI = (props: any) => {
401
402
  textStyle={{ color: theme.colors.textNormal, fontSize: 12, padding: 0 }}
402
403
  noDropIcon
403
404
  isDisabled
405
+ updateStateWithSubmit
404
406
  />
405
407
  </InputWrapper>
406
408
  </>
@@ -460,28 +462,31 @@ const UserVerificationUI = (props: any) => {
460
462
  )}
461
463
 
462
464
  </Container>
463
- <ButtonsActions>
464
- <View style={{ width: '100%' }}>
465
- <OButton
466
- onClick={(verificationState.email || verificationState.phone)
467
- ? () => setVerificationState({ email: false, phone: false })
468
- : () => handleSendOtp(isPhoneVerifyRequired && !isEmailVerifyRequired ? 'phone' : '')
469
- }
470
- text={(verificationState.email || verificationState.phone) ? t('CANCEL', 'Cancel') : t('SEND_CODE', 'Send code')}
471
- bgColor={(verificationState.email || verificationState.phone) ? theme.colors.secundary : theme.colors.primary}
472
- borderColor={(verificationState.email || verificationState.phone) ? theme.colors.secundary : theme.colors.primary}
473
- textStyle={{ color: (verificationState.email || verificationState.phone) ? 'black' : 'white' }}
474
- imgRightSrc={null}
475
- isLoading={verifyEmailState?.loadingSendCode || verifyEmailState?.loadingCheckCode || verifyPhoneState?.loadingSendCode || verifyPhoneState?.loadingCheckCode}
476
- style={(verificationState.email || verificationState.phone) ? style.btnStyle : { borderRadius: 7.6 }}
477
- />
478
- </View>
479
- </ButtonsActions>
465
+ {!!phoneState?.cellphone && (
466
+ <ButtonsActions>
467
+ <View style={{ width: '100%' }}>
468
+ <OButton
469
+ onClick={(verificationState.email || verificationState.phone)
470
+ ? () => setVerificationState({ email: false, phone: false })
471
+ : () => handleSendOtp(isPhoneVerifyRequired && !isEmailVerifyRequired ? 'phone' : '')
472
+ }
473
+ text={(verificationState.email || verificationState.phone) ? t('CANCEL', 'Cancel') : t('SEND_CODE', 'Send code')}
474
+ bgColor={(verificationState.email || verificationState.phone) ? theme.colors.secundary : theme.colors.primary}
475
+ borderColor={(verificationState.email || verificationState.phone) ? theme.colors.secundary : theme.colors.primary}
476
+ textStyle={{ color: (verificationState.email || verificationState.phone) ? 'black' : 'white' }}
477
+ imgRightSrc={null}
478
+ isLoading={verifyEmailState?.loadingSendCode || verifyEmailState?.loadingCheckCode || verifyPhoneState?.loadingSendCode || verifyPhoneState?.loadingCheckCode}
479
+ style={(verificationState.email || verificationState.phone) ? style.btnStyle : { borderRadius: 7.6 }}
480
+ />
481
+ </View>
482
+ </ButtonsActions>
483
+ )}
480
484
  <View style={{ paddingHorizontal: 20, paddingBottom: 80 }}>
481
485
  <UserDetails
482
486
  user={user}
483
487
  isEdit
484
488
  isVerifiedPhone
489
+ dontToggleEditMode
485
490
  />
486
491
  </View>
487
492
  </ScrollView>
@@ -3,6 +3,7 @@ import styled from 'styled-components/native'
3
3
  export const Container = styled.View`
4
4
  display: flex;
5
5
  flex-direction: column;
6
+ width: 100%;
6
7
  `
7
8
 
8
9
  export const TransactionsWrapper = styled.View`
@@ -73,7 +73,7 @@ const WalletsUI = (props: any) => {
73
73
  const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
74
74
  const [openHistory, setOpenHistory] = useState(false)
75
75
  const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
76
- const hideWalletsTheme = theme?.bar_menu?.components?.wallets?.hidden
76
+ const hideWalletsTheme = theme?.bar_menu?.components?.wallet?.hidden === true
77
77
 
78
78
  const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
79
79
 
@@ -120,18 +120,16 @@ const WalletsUI = (props: any) => {
120
120
 
121
121
  return (
122
122
  <>
123
- <Container
124
- pdng={Platform.OS === 'ios' ? '10px' : '0'}
125
- >
123
+ <Container>
126
124
  <Header>
127
125
  <View style={{
128
126
  ...{
129
127
  width: '100%',
130
128
  display: 'flex',
131
- flexDirection: hideWalletsTheme ? 'column' : 'row',
132
- justifyContent: hideWalletsTheme ? 'flex-start' : 'space-between',
133
- alignItems: hideWalletsTheme ? 'flex-start' : 'center',
134
- marginTop: hideWalletsTheme ? 0 : 10,
129
+ flexDirection: !hideWalletsTheme ? 'column' : 'row',
130
+ justifyContent: !hideWalletsTheme ? 'flex-start' : 'space-between',
131
+ alignItems: !hideWalletsTheme ? 'flex-start' : 'center',
132
+ marginTop: !hideWalletsTheme ? Platform.OS === 'ios' ? 20 : 30 : 10,
135
133
  },
136
134
  }}>
137
135
  <NavBar
@@ -141,6 +139,7 @@ const WalletsUI = (props: any) => {
141
139
  showCall={false}
142
140
  paddingTop={10}
143
141
  btnStyle={{ paddingLeft: 0 }}
142
+ isVertical={!hideWalletsTheme}
144
143
  hideArrowLeft={!hideWalletsTheme}
145
144
  />
146
145
  {isChewLayout && !openHistory && (
@@ -151,7 +150,7 @@ const WalletsUI = (props: any) => {
151
150
  imgRightSrc={null}
152
151
  textStyle={{ fontSize: 12, color: theme.colors.disabled }}
153
152
  onClick={() => setOpenHistory(true)}
154
- style={{ borderRadius: 8, height: 40, width: hideWalletsTheme ? '100%' : 150, marginTop: hideWalletsTheme ? 10 : 0 }}
153
+ style={{ borderRadius: 8, height: 40, width: !hideWalletsTheme ? '100%' : 150, marginTop: !hideWalletsTheme ? 10 : 0 }}
155
154
  />
156
155
  )}
157
156
  </View>
@@ -3,7 +3,7 @@ import styled from 'styled-components/native'
3
3
  export const Container = styled.View`
4
4
  padding-horizontal: 20px;
5
5
  padding-bottom: 20px;
6
- padding-top: ${(props: any) => props.pdng};
6
+ padding-top: ${(props: any) => props.pdng || 0};
7
7
  `
8
8
  export const Header = styled.View`
9
9
  flex-direction: row;
@@ -13,7 +13,7 @@ const HeaderTitle = (props: any) => {
13
13
  weight={Platform.OS === 'ios' ? '600' : 'bold'}
14
14
  style={style ?? {
15
15
  marginTop: Platform.OS === 'android' ? 50 : 30,
16
- paddingHorizontal: props.ph ?? 40,
16
+ paddingHorizontal: props.ph ?? 20,
17
17
  textTransform: 'capitalize',
18
18
  color: props.titleColor || theme.colors.textNormal,
19
19
  }}
@@ -3,7 +3,7 @@ import { ImageSourcePropType, ImageStyle, ViewStyle, TextInputProps, TextStyle }
3
3
  import styled from 'styled-components/native';
4
4
  import OIcon from './OIcon';
5
5
  import MaterialIcon from 'react-native-vector-icons/MaterialIcons'
6
- import { useTheme, css } from 'styled-components/native';
6
+ import { useTheme } from 'styled-components/native';
7
7
 
8
8
  const Input = styled.TextInput`
9
9
  flex-grow: 1;
@@ -53,9 +53,6 @@ const Wrapper = styled.Pressable`
53
53
  align-items: center;
54
54
  justify-content: center;
55
55
  width: 100%;
56
- ${(props: any) => props.theme?.general?.components?.inputs?.borderRadius && css`
57
- border-radius: ${props?.theme?.general?.components?.inputs?.borderRadius};
58
- `}
59
56
  `;
60
57
 
61
58
  const OInput = (props: Props): React.ReactElement => {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Modal, StyleSheet, Text, SafeAreaView, View, TouchableOpacity, Platform } from "react-native";
3
- import { OIcon } from '.';
4
- import styled, { useTheme } from 'styled-components/native';
3
+ import styled from 'styled-components/native';
4
+ import AntDesignIcon from 'react-native-vector-icons/AntDesign'
5
5
 
6
6
  interface Props {
7
7
  open?: boolean;
@@ -50,17 +50,15 @@ const OModal = (props: Props): React.ReactElement => {
50
50
  isAvoidKeyBoardView
51
51
  } = props
52
52
 
53
- const theme = useTheme();
54
-
55
53
  const renderSafeAreaView = () => (
56
54
  <SafeAreaView style={styles.container}>
57
55
  {!entireModal ? (
58
56
  <View style={styles.centeredView}>
59
57
  <View style={titleSectionStyle ? titleSectionStyle : styles.titleSection}>
60
- <TouchableOpacity style={{...styles.wrapperIcon, ...styleContainerCloseButton}} onPress={onClose}>
61
- <OIcon
62
- src={theme.images.general.close}
63
- width={16}
58
+ <TouchableOpacity style={{ ...styles.wrapperIcon, ...styleContainerCloseButton }} onPress={onClose}>
59
+ <AntDesignIcon
60
+ name='close'
61
+ size={26}
64
62
  style={isNotDecoration && (styleCloseButton || styles.cancelBtn)}
65
63
  />
66
64
  </TouchableOpacity>
@@ -73,9 +71,9 @@ const OModal = (props: Props): React.ReactElement => {
73
71
  {!customClose && (
74
72
  <View style={titleSectionStyle ? titleSectionStyle : styles.titleSection}>
75
73
  <TouchableOpacity style={styles.wrapperIcon} onPress={onClose}>
76
- <OIcon
77
- src={theme.images.general.close}
78
- width={16}
74
+ <AntDesignIcon
75
+ name='close'
76
+ size={26}
79
77
  style={styleCloseButton || styles.cancelBtn}
80
78
  />
81
79
  </TouchableOpacity>
@@ -93,7 +91,7 @@ const OModal = (props: Props): React.ReactElement => {
93
91
  animationType="slide"
94
92
  transparent={isTransparent}
95
93
  visible={open}
96
- onRequestClose={() => onClose && onClose()}
94
+ onRequestClose={() => onClose && onClose()}
97
95
  style={{ height: '100%', flex: 1, position: 'absolute', ...style, zIndex: 9999 }}
98
96
  >
99
97
  {isAvoidKeyBoardView ? (
@@ -125,8 +123,8 @@ const styles = StyleSheet.create({
125
123
  flex: 1,
126
124
  justifyContent: 'space-between',
127
125
  alignItems: 'flex-start',
128
- paddingLeft: 40,
129
- paddingRight: 40,
126
+ paddingLeft: 20,
127
+ paddingRight: 20,
130
128
  marginBottom: 40
131
129
  },
132
130
  cancelBtn: {
@@ -4,9 +4,11 @@ import styled, { css, useTheme } from 'styled-components/native';
4
4
  import { Platform, View } from 'react-native';
5
5
 
6
6
  const ContainerStyled = styled.ScrollView`
7
- flex: 1;
7
+ ${(props: any) => !props.disableFlex && css`
8
+ flex: 1
9
+ `}
8
10
  ${(props: any) => !props.noPadding && css`
9
- padding: ${Platform.OS === 'ios' ? '0px 40px' : '20px 40px'};
11
+ padding: ${Platform.OS === 'ios' ? '0px 20px' : '20px 20px'};
10
12
  `}
11
13
  background-color: ${(props: any) => props.theme.colors.backgroundPage};
12
14
  `;
@@ -17,7 +19,7 @@ export const Container = (props: any) => {
17
19
  return (
18
20
  <View
19
21
  style={{
20
- flex: 1,
22
+ flex: props.disableFlex ? undefined : 1,
21
23
  paddingTop: props.pt ?? insets.top,
22
24
  backgroundColor: theme.colors.backgroundPage
23
25
  }}
@@ -147,6 +147,7 @@ export interface PhoneInputParams {
147
147
  isDisabled?: any;
148
148
  isStartValidation?: any;
149
149
  changeCountry?: any;
150
+ updateStateWithSubmit?: boolean
150
151
  }
151
152
 
152
153
  export interface LanguageSelectorParams {
@@ -256,6 +257,7 @@ export interface BusinessProductsListingParams {
256
257
  onBusinessClick?: any;
257
258
  onNavigationRedirect?: any;
258
259
  businessSingleId?: number | string
260
+ fromMulti?: boolean
259
261
  }
260
262
  export interface BusinessBasicInformationParams {
261
263
  navigation?: any;
@@ -392,6 +394,7 @@ export interface OrdersOptionParams {
392
394
  BusinessControllerSkeletons?: any,
393
395
  businessPaginationProps?: any,
394
396
  businesses?: any
397
+ businessId?: any;
395
398
  }
396
399
  export interface ActiveOrdersParams {
397
400
  orders?: any,
@@ -435,6 +438,7 @@ export interface OrderDetailsParams {
435
438
  onNavigationRedirect?: any,
436
439
  reorderState?: any,
437
440
  handleReorder?: any,
441
+ hideViaText?: boolean,
438
442
  }
439
443
  export interface ProductItemAccordionParams {
440
444
  key?: any;
@@ -579,7 +583,7 @@ export interface BusinessPreorderParams {
579
583
  handleBusinessClick: (value: any) => {};
580
584
  getActualSchedule?: any;
581
585
  cateringPreorder?: boolean;
582
- preorderLeadTime?: number
586
+ preorderLeadTime?: number
583
587
  }
584
588
  export interface BusinessMenuListParams {
585
589
  menu: any;
@@ -630,7 +634,9 @@ export interface GoogleMapsParams {
630
634
  locations?: Array<any>,
631
635
  setSaveLocation?: (val: boolean) => void,
632
636
  handleToggleMap?: () => void,
633
- isIntGeoCoder: boolean
637
+ isIntGeoCoder: boolean,
638
+ businessZones?: any
639
+ delta?: number
634
640
  }
635
641
 
636
642
  export interface HelpParams {
@@ -728,6 +734,8 @@ export interface otpParams {
728
734
  pinCount: number;
729
735
  otpError: any,
730
736
  setOtpError: any
737
+ isCheckingCode: boolean
738
+ setCheckingCode: (value: boolean) => void
731
739
  }
732
740
 
733
741
  export interface FavoriteParams {
@@ -4,6 +4,7 @@ import FontAwesome from 'react-native-vector-icons/FontAwesome';
4
4
  import { CODES } from 'ordering-components/native'
5
5
  import { ORDER_TYPES } from '../config/constants';
6
6
  import { useTheme } from 'styled-components/native';
7
+ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
7
8
 
8
9
  const [languageState, t] = useLanguage();
9
10
  const theme = useTheme()
@@ -575,6 +576,119 @@ export const getOrderStatus = (s: string) => {
575
576
  return objectStatus && objectStatus;
576
577
  }
577
578
 
579
+ export const getOrderStatuPickUp = (s: any) => {
580
+ const status = parseInt(s);
581
+ const orderStatus = [
582
+ {
583
+ key: 0,
584
+ value: t('PENDING', 'Pending'),
585
+ slug: 'PENDING',
586
+ percentage: 0.1,
587
+ image: theme.images.order.status0,
588
+ },
589
+ {
590
+ key: 1,
591
+ value: t('COMPLETED', 'Completed'),
592
+ slug: 'COMPLETED',
593
+ percentage: 1,
594
+ image: theme.images.order.status1,
595
+ },
596
+ {
597
+ key: 2,
598
+ value: t('REJECTED', 'Rejected'),
599
+ slug: 'REJECTED',
600
+ percentage: 0,
601
+ image: theme.images.order.status2,
602
+ },
603
+ {
604
+ key: 4,
605
+ value: t('PREPARATION_COMPLETED', 'Preparation Completed'),
606
+ slug: 'PREPARATION_COMPLETED',
607
+ percentage: 0.5,
608
+ image: theme.images.order.status4,
609
+ },
610
+ {
611
+ key: 5,
612
+ value: t('REJECTED_BY_BUSINESS', 'Rejected by business'),
613
+ slug: 'REJECTED_BY_BUSINESS',
614
+ percentage: 0,
615
+ image: theme.images.order.status5,
616
+ },
617
+ {
618
+ key: 7,
619
+ value: t('ACCEPTED_BY_BUSINESS', 'Accepted by business'),
620
+ slug: 'ACCEPTED_BY_BUSINESS',
621
+ percentage: 0.3,
622
+ image: theme.images.order.status7,
623
+ },
624
+ {
625
+ key: 13,
626
+ value: t('PREORDER', 'PreOrder'),
627
+ slug: 'PREORDER',
628
+ percentage: 0,
629
+ image: theme.images.order.status13,
630
+ },
631
+ {
632
+ key: 14,
633
+ value: t('ORDER_NOT_READY', 'Order not ready'),
634
+ slug: 'ORDER_NOT_READY',
635
+ percentage: 0.3,
636
+ image: theme.images.order.status13,
637
+ },
638
+ {
639
+ key: 15,
640
+ value: t(
641
+ 'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER',
642
+ 'Order picked up completed by customer',
643
+ ),
644
+ slug: 'ORDER_PICKEDUP_COMPLETED_BY_CUSTOMER',
645
+ percentage: 1,
646
+ image: theme.images.order.status1,
647
+ },
648
+ {
649
+ key: 16,
650
+ value: t('CANCELLED_BY_CUSTOMER', 'Cancelled by customer'),
651
+ slug: 'CANCELLED_BY_CUSTOMER',
652
+ percentage: 0,
653
+ image: theme.images.order.status2,
654
+ },
655
+ {
656
+ key: 17,
657
+ value: t(
658
+ 'ORDER_NOT_PICKEDUP_BY_CUSTOMER',
659
+ 'Order not picked up by customer',
660
+ ),
661
+ slug: 'ORDER_NOT_PICKEDUP_BY_CUSTOMER',
662
+ percentage: 0,
663
+ image: theme.images.order.status2,
664
+ },
665
+ {
666
+ key: 20,
667
+ value: t(
668
+ 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS',
669
+ 'Customer almost arrived to business',
670
+ ),
671
+ slug: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS',
672
+ percentage: 0.7,
673
+ image: theme.images.order.status7,
674
+ },
675
+ {
676
+ key: 21,
677
+ value: t(
678
+ 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
679
+ 'Customer arrived to business',
680
+ ),
681
+ slug: 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
682
+ percentage: 0.9,
683
+ image: theme.images.order.status7,
684
+ }
685
+ ];
686
+
687
+ const objectStatus = orderStatus.find((o) => o.key === status);
688
+
689
+ return objectStatus && objectStatus;
690
+ }
691
+
578
692
  /**
579
693
  * Function to get brightness of color.
580
694
  */
@@ -612,3 +726,13 @@ export const lightenDarkenColor = (color: any) => {
612
726
  return false
613
727
  }
614
728
  }
729
+
730
+ export const vibrateApp = (impact ?: string) => {
731
+ const options = {
732
+ enableVibrateFallback: true,
733
+ ignoreAndroidSystemSettings: false
734
+ };
735
+
736
+ ReactNativeHapticFeedback.trigger(impact || "impactLight", options);
737
+
738
+ }
@@ -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}>