ordering-ui-react-native 0.18.3 → 0.18.4-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 (261) hide show
  1. package/package.json +9 -7
  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/OrderCreating/index.tsx +0 -20
  6. package/src/components/PaymentOptionsWebView/index.tsx +29 -8
  7. package/src/components/PhoneInputNumber/index.tsx +6 -2
  8. package/src/components/StripeMethodForm/index.tsx +136 -102
  9. package/src/components/VerifyPhone/styles.tsx +1 -2
  10. package/src/components/shared/OToast.tsx +3 -2
  11. package/src/types/index.tsx +5 -0
  12. package/src/utils/index.tsx +7 -2
  13. package/themes/business/index.tsx +2 -0
  14. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +36 -26
  15. package/themes/business/src/components/BusinessController/index.tsx +19 -17
  16. package/themes/business/src/components/BusinessProductList/AccordionDropdown.tsx +63 -0
  17. package/themes/business/src/components/BusinessProductList/IterateCategories.tsx +108 -0
  18. package/themes/business/src/components/BusinessProductList/ProductList.tsx +196 -0
  19. package/themes/business/src/components/BusinessProductList/index.tsx +196 -0
  20. package/themes/business/src/components/BusinessProductList/styles.tsx +10 -0
  21. package/themes/business/src/components/Chat/index.tsx +163 -123
  22. package/themes/business/src/components/DriverMap/index.tsx +1 -1
  23. package/themes/business/src/components/DriverSchedule/index.tsx +45 -8
  24. package/themes/business/src/components/FloatingButton/index.tsx +34 -31
  25. package/themes/business/src/components/GoogleMap/index.tsx +58 -57
  26. package/themes/business/src/components/LoginForm/index.tsx +5 -2
  27. package/themes/business/src/components/MapView/index.tsx +14 -10
  28. package/themes/business/src/components/MessagesOption/index.tsx +22 -94
  29. package/themes/business/src/components/NewOrderNotification/index.tsx +123 -96
  30. package/themes/business/src/components/NotFoundSource/index.tsx +2 -2
  31. package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
  32. package/themes/business/src/components/OrderDetails/Delivery.tsx +205 -12
  33. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +64 -36
  34. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +47 -23
  35. package/themes/business/src/components/OrderDetailsLogistic/index.tsx +9 -4
  36. package/themes/business/src/components/OrderMessage/index.tsx +1 -1
  37. package/themes/business/src/components/OrderSummary/index.tsx +114 -123
  38. package/themes/business/src/components/OrdersListManager/index.tsx +7 -2
  39. package/themes/business/src/components/OrdersListManager/utils.tsx +1 -1
  40. package/themes/business/src/components/OrdersOption/index.tsx +43 -32
  41. package/themes/business/src/components/PreviousMessages/FooterMessageComponent.tsx +103 -0
  42. package/themes/business/src/components/PreviousMessages/index.tsx +97 -55
  43. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +21 -29
  44. package/themes/business/src/components/PreviousOrders/OrderList.tsx +93 -0
  45. package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +1 -1
  46. package/themes/business/src/components/PreviousOrders/index.tsx +193 -221
  47. package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
  48. package/themes/business/src/components/ReviewCustomer/index.tsx +3 -1
  49. package/themes/business/src/components/SearchBar/index.tsx +2 -1
  50. package/themes/business/src/components/StoresList/index.tsx +6 -5
  51. package/themes/business/src/components/UserProfileForm/index.tsx +15 -17
  52. package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
  53. package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
  54. package/themes/business/src/types/index.tsx +8 -0
  55. package/themes/business/src/utils/index.tsx +4 -4
  56. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  57. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  58. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  59. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  60. package/themes/kiosk/src/components/Intro/index.tsx +16 -1
  61. package/themes/kiosk/src/components/LoginForm/index.tsx +7 -5
  62. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  63. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  64. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  65. package/themes/kiosk/src/components/PhoneInputNumber/index.tsx +2 -2
  66. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  67. package/themes/original/index.tsx +7 -3
  68. package/themes/original/src/components/AddressDetails/index.tsx +19 -3
  69. package/themes/original/src/components/AddressForm/index.tsx +33 -15
  70. package/themes/original/src/components/AddressForm/styles.tsx +1 -1
  71. package/themes/original/src/components/AddressList/index.tsx +5 -8
  72. package/themes/original/src/components/AddressList/styles.tsx +4 -4
  73. package/themes/original/src/components/AnalyticsSegment/index.tsx +193 -10
  74. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  75. package/themes/original/src/components/AppleLogin/styles.tsx +3 -1
  76. package/themes/original/src/components/BusinessBasicInformation/index.tsx +74 -38
  77. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +11 -13
  78. package/themes/original/src/components/BusinessController/index.tsx +35 -44
  79. package/themes/original/src/components/BusinessController/styles.tsx +12 -5
  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 +140 -85
  83. package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
  84. package/themes/original/src/components/BusinessItemAccordion/index.tsx +25 -26
  85. package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
  86. package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
  87. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +1 -1
  88. package/themes/original/src/components/BusinessListingSearch/index.tsx +133 -438
  89. package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -19
  90. package/themes/original/src/components/BusinessPreorder/index.tsx +11 -9
  91. package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -3
  92. package/themes/original/src/components/BusinessProductsList/index.tsx +15 -7
  93. package/themes/original/src/components/BusinessProductsList/styles.tsx +8 -3
  94. package/themes/original/src/components/BusinessProductsListing/UpsellingRedirect.tsx +1 -1
  95. package/themes/original/src/components/BusinessProductsListing/index.tsx +162 -39
  96. package/themes/original/src/components/BusinessProductsListing/styles.tsx +4 -5
  97. package/themes/original/src/components/BusinessReviews/index.tsx +4 -2
  98. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
  99. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
  100. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +69 -0
  101. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
  102. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
  103. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +37 -404
  104. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
  105. package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
  106. package/themes/original/src/components/Cart/index.tsx +49 -47
  107. package/themes/original/src/components/CartContent/index.tsx +99 -38
  108. package/themes/original/src/components/CartContent/styles.tsx +6 -6
  109. package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
  110. package/themes/original/src/components/Checkout/index.tsx +324 -43
  111. package/themes/original/src/components/Checkout/styles.tsx +17 -0
  112. package/themes/original/src/components/CitiesControl/index.tsx +1 -1
  113. package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
  114. package/themes/original/src/components/CouponControl/index.tsx +10 -3
  115. package/themes/original/src/components/DatePicker/index.tsx +17 -0
  116. package/themes/original/src/components/DatePicker/styles.tsx +20 -0
  117. package/themes/original/src/components/DriverTips/index.tsx +6 -3
  118. package/themes/original/src/components/FacebookLogin/styles.tsx +3 -1
  119. package/themes/original/src/components/Favorite/index.tsx +4 -9
  120. package/themes/original/src/components/Favorite/styles.tsx +0 -2
  121. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  122. package/themes/original/src/components/GPSButton/index.tsx +7 -5
  123. package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
  124. package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +42 -5
  125. package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +3 -1
  126. package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +84 -8
  127. package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
  128. package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
  129. package/themes/original/src/components/GoogleLogin/styles.tsx +1 -1
  130. package/themes/original/src/components/GoogleMap/index.tsx +63 -7
  131. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +1 -1
  132. package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
  133. package/themes/original/src/components/Home/index.tsx +14 -5
  134. package/themes/original/src/components/LastOrder/index.tsx +2 -1
  135. package/themes/original/src/components/LastOrders/index.tsx +2 -1
  136. package/themes/original/src/components/LoginForm/Otp/index.tsx +91 -25
  137. package/themes/original/src/components/LoginForm/index.tsx +64 -34
  138. package/themes/original/src/components/LottieAnimation/index.tsx +88 -63
  139. package/themes/original/src/components/MessageListing/index.tsx +9 -2
  140. package/themes/original/src/components/Messages/index.tsx +15 -4
  141. package/themes/original/src/components/Messages/styles.tsx +1 -1
  142. package/themes/original/src/components/MomentOption/index.tsx +9 -10
  143. package/themes/original/src/components/MomentSelector/index.tsx +1 -1
  144. package/themes/original/src/components/MultiCart/index.tsx +1 -1
  145. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +161 -49
  146. package/themes/original/src/components/MultiCheckout/index.tsx +348 -70
  147. package/themes/original/src/components/MultiCheckout/styles.tsx +3 -1
  148. package/themes/original/src/components/MultiOrdersDetails/index.tsx +2 -2
  149. package/themes/original/src/components/MyOrders/index.tsx +16 -5
  150. package/themes/original/src/components/NavBar/index.tsx +20 -13
  151. package/themes/original/src/components/NetworkError/index.tsx +2 -3
  152. package/themes/original/src/components/NetworkError/styles.tsx +2 -2
  153. package/themes/original/src/components/NotFoundSource/index.tsx +14 -10
  154. package/themes/original/src/components/Notifications/index.tsx +4 -8
  155. package/themes/original/src/components/Notifications/styles.tsx +0 -1
  156. package/themes/original/src/components/OrderDetails/OrderEta.tsx +76 -0
  157. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +22 -6
  158. package/themes/original/src/components/OrderDetails/index.tsx +721 -670
  159. package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
  160. package/themes/original/src/components/OrderItAgain/index.tsx +3 -1
  161. package/themes/original/src/components/OrderProgress/index.tsx +34 -25
  162. package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
  163. package/themes/original/src/components/OrderSummary/index.tsx +62 -57
  164. package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -6
  165. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
  166. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +13 -13
  167. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
  168. package/themes/original/src/components/OrdersOption/index.tsx +44 -21
  169. package/themes/original/src/components/OrdersOption/styles.tsx +2 -2
  170. package/themes/original/src/components/PageBanner/index.tsx +65 -29
  171. package/themes/original/src/components/PageBanner/styles.tsx +0 -3
  172. package/themes/original/src/components/PaymentOptionCard/index.tsx +180 -0
  173. package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
  174. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  175. package/themes/original/src/components/PaymentOptions/index.tsx +100 -34
  176. package/themes/original/src/components/PhoneInputNumber/index.tsx +18 -4
  177. package/themes/original/src/components/ProductForm/ActionButton.tsx +120 -0
  178. package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
  179. package/themes/original/src/components/ProductForm/index.tsx +106 -170
  180. package/themes/original/src/components/ProductForm/styles.tsx +3 -3
  181. package/themes/original/src/components/ProductItemAccordion/index.tsx +13 -6
  182. package/themes/original/src/components/ProductOptionSubOption/index.tsx +49 -20
  183. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +10 -9
  184. package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
  185. package/themes/original/src/components/Promotions/index.tsx +6 -6
  186. package/themes/original/src/components/Promotions/styles.tsx +3 -3
  187. package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
  188. package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
  189. package/themes/original/src/components/ReviewProducts/index.tsx +16 -7
  190. package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
  191. package/themes/original/src/components/ScheduleAccordion/index.tsx +3 -3
  192. package/themes/original/src/components/ServiceForm/index.tsx +2 -2
  193. package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
  194. package/themes/original/src/components/SignupForm/index.tsx +27 -16
  195. package/themes/original/src/components/SingleOrderCard/index.tsx +44 -20
  196. package/themes/original/src/components/SingleOrderCard/styles.tsx +1 -1
  197. package/themes/original/src/components/SingleProductCard/index.tsx +13 -10
  198. package/themes/original/src/components/SingleProductCard/styles.tsx +8 -3
  199. package/themes/original/src/components/SingleProductReview/styles.tsx +1 -1
  200. package/themes/original/src/components/StripeCardsList/index.tsx +61 -5
  201. package/themes/original/src/components/StripeElementsForm/index.tsx +48 -34
  202. package/themes/original/src/components/StripeElementsForm/naked.tsx +12 -1
  203. package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
  204. package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +86 -0
  205. package/themes/original/src/components/UpsellingProducts/index.tsx +16 -205
  206. package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
  207. package/themes/original/src/components/UserDetails/index.tsx +3 -1
  208. package/themes/original/src/components/UserFormDetails/index.tsx +100 -22
  209. package/themes/original/src/components/UserFormDetails/styles.tsx +1 -1
  210. package/themes/original/src/components/UserProfile/index.tsx +8 -26
  211. package/themes/original/src/components/UserProfileForm/index.tsx +30 -31
  212. package/themes/original/src/components/UserVerification/index.tsx +55 -50
  213. package/themes/original/src/components/WalletTransactionItem/index.tsx +2 -2
  214. package/themes/original/src/components/WalletTransactions/index.tsx +3 -3
  215. package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
  216. package/themes/original/src/components/Wallets/index.tsx +48 -60
  217. package/themes/original/src/components/Wallets/styles.tsx +3 -4
  218. package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
  219. package/themes/original/src/components/shared/OButton.tsx +3 -3
  220. package/themes/original/src/components/shared/OInput.tsx +4 -5
  221. package/themes/original/src/components/shared/OModal.tsx +15 -17
  222. package/themes/original/src/layouts/Container.tsx +5 -3
  223. package/themes/original/src/types/index.tsx +26 -7
  224. package/themes/original/src/utils/index.tsx +180 -13
  225. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
  226. package/src/navigators/BottomNavigator.tsx +0 -117
  227. package/src/navigators/CheckoutNavigator.tsx +0 -66
  228. package/src/navigators/HomeNavigator.tsx +0 -202
  229. package/src/navigators/NavigationRef.tsx +0 -7
  230. package/src/navigators/RootNavigator.tsx +0 -269
  231. package/src/pages/Account.tsx +0 -34
  232. package/src/pages/AddressForm.tsx +0 -62
  233. package/src/pages/AddressList.tsx +0 -24
  234. package/src/pages/BusinessProductsList.tsx +0 -81
  235. package/src/pages/BusinessesListing.tsx +0 -43
  236. package/src/pages/CartList.tsx +0 -49
  237. package/src/pages/Checkout.tsx +0 -101
  238. package/src/pages/ForgotPassword.tsx +0 -24
  239. package/src/pages/Help.tsx +0 -23
  240. package/src/pages/HelpAccountAndPayment.tsx +0 -23
  241. package/src/pages/HelpGuide.tsx +0 -23
  242. package/src/pages/HelpOrder.tsx +0 -23
  243. package/src/pages/Home.tsx +0 -36
  244. package/src/pages/IntroductoryTutorial.tsx +0 -170
  245. package/src/pages/Login.tsx +0 -47
  246. package/src/pages/MomentOption.tsx +0 -30
  247. package/src/pages/MultiCheckout.tsx +0 -31
  248. package/src/pages/MultiOrdersDetails.tsx +0 -27
  249. package/src/pages/MyOrders.tsx +0 -40
  250. package/src/pages/NetworkError.tsx +0 -24
  251. package/src/pages/NotFound.tsx +0 -22
  252. package/src/pages/OrderDetails.tsx +0 -25
  253. package/src/pages/ProductDetails.tsx +0 -55
  254. package/src/pages/Profile.tsx +0 -36
  255. package/src/pages/ReviewDriver.tsx +0 -30
  256. package/src/pages/ReviewOrder.tsx +0 -32
  257. package/src/pages/ReviewProducts.tsx +0 -30
  258. package/src/pages/Sessions.tsx +0 -22
  259. package/src/pages/Signup.tsx +0 -53
  260. package/src/pages/SpinnerLoader.tsx +0 -10
  261. package/src/pages/Splash.tsx +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.18.3",
3
+ "version": "0.18.4-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -49,8 +49,8 @@
49
49
  "@react-navigation/material-bottom-tabs": "^5.3.14",
50
50
  "@react-navigation/native": "^5.7.6",
51
51
  "@react-navigation/stack": "^5.9.3",
52
- "@segment/analytics-react-native": "^2.1.11",
53
- "@segment/sovran-react-native": "^0.2.6",
52
+ "@segment/analytics-react-native": "2.1.11",
53
+ "@segment/sovran-react-native": "0.2.6",
54
54
  "@sentry/react-native": "^2.6.0",
55
55
  "@stripe/stripe-react-native": "^0.2.0",
56
56
  "@types/react-native-loading-spinner-overlay": "^0.5.2",
@@ -58,7 +58,7 @@
58
58
  "@types/styled-components": "^5.1.3",
59
59
  "axios": "^0.21.0",
60
60
  "moment": "^2.29.1",
61
- "ordering-components": "github:Ordering-Inc/ordering-components#development",
61
+ "ordering-components": "github:Ordering-Inc/ordering-components#release",
62
62
  "patch-package": "^6.4.7",
63
63
  "postinstall-postinstall": "^2.1.0",
64
64
  "prop-types": "^15.7.2",
@@ -76,6 +76,7 @@
76
76
  "react-native-color-matrix-image-filters": "^5.2.10",
77
77
  "react-native-country-picker-modal": "^2.0.0",
78
78
  "react-native-credit-card-input": "^0.4.1",
79
+ "react-native-date-picker": "^4.2.13",
79
80
  "react-native-device-info": "^8.7.1",
80
81
  "react-native-document-picker": "^5.2.0",
81
82
  "react-native-elements": "^3.0.0-alpha.1",
@@ -83,6 +84,7 @@
83
84
  "react-native-fbsdk-next": "^7.0.1",
84
85
  "react-native-geocoding": "^0.5.0",
85
86
  "react-native-gesture-handler": "^1.8.0",
87
+ "react-native-get-random-values": "1.8.0",
86
88
  "react-native-gifted-chat": "^0.16.3",
87
89
  "react-native-google-places-autocomplete": "^2.1.3",
88
90
  "react-native-html-to-pdf": "^0.10.0",
@@ -114,7 +116,7 @@
114
116
  "react-native-tracking-transparency": "^0.1.1",
115
117
  "react-native-uuid": "^2.0.1",
116
118
  "react-native-vector-icons": "^7.1.0",
117
- "react-native-webview": "^11.22.7",
119
+ "react-native-webview": "^11.6.4",
118
120
  "react-native-youtube-iframe": "^2.2.2",
119
121
  "rn-placeholder": "^3.0.3",
120
122
  "styled-components": "^5.1.1",
@@ -126,8 +128,8 @@
126
128
  "@babel/core": "^7.11.6",
127
129
  "@babel/runtime": "^7.11.2",
128
130
  "@react-native-community/eslint-config": "^2.0.0",
129
- "@types/react": "^18.0.14",
130
- "@types/react-dom": "^18.0.5",
131
+ "@types/react": "^18.0.15",
132
+ "@types/react-dom": "^18.0.6",
131
133
  "@types/react-native": "^0.63.25",
132
134
  "@types/react-native-calendar-picker": "^7.0.2",
133
135
  "babel-jest": "^26.3.0",
@@ -7,7 +7,8 @@
7
7
  */
8
8
 
9
9
  import * as React from 'react';
10
- import { LogBox } from 'react-native';
10
+ import { LogBox, Platform } from 'react-native';
11
+ import * as Sentry from "@sentry/react-native";
11
12
  import { OrderingProvider } from 'ordering-components/native';
12
13
  import RNBootSplash from "react-native-bootsplash";
13
14
 
@@ -22,6 +23,47 @@ import theme from './theme.json';
22
23
  import AppContainer from './AppContainer';
23
24
  import { FacebookPixel } from './components/FacebookPixel';
24
25
 
26
+ Sentry.init({
27
+ environment: Platform.OS === 'ios' ? 'ios' : 'android',
28
+ dsn: 'https://e5e1115dc93b49109f4ab65f2098bef9@o460529.ingest.sentry.io/5722123',
29
+ release: 'ordering-ui-native@' + process.env.npm_package_version,
30
+ ignoreErrors: [
31
+ 'is not defined',
32
+ 'is not a function',
33
+ 'can\'t find variable',
34
+ 'objects are not valid',
35
+ 'element type is invalid',
36
+ 'requiring module',
37
+ 'has not been registered',
38
+ 'failed to connect to debugger!',
39
+ 'rendered more hooks than',
40
+ 'rendered fewer hooks than',
41
+ 'should have a queue',
42
+ 'the OS most likely terminated',
43
+ 'Connection timed out',
44
+ 'java.io.EOFException',
45
+ 'Abort',
46
+ 'Segfault',
47
+ 'Failed to allocate a',
48
+ 'Application Not Responding',
49
+ 'connection no longer valid',
50
+ 'IllegalInstruction',
51
+ 'React.Children.only expected to receive a single React element child.',
52
+ 'unrecognized selector sent to instance'
53
+ ],
54
+ tracesSampleRate: 0.2,
55
+ // Release health
56
+ enableAutoSessionTracking: true,
57
+ // Sessions close after app is 10 seconds in the background.
58
+ sessionTrackingIntervalMillis: 10000,
59
+
60
+ integrations: [
61
+ new Sentry.ReactNativeTracing({
62
+ routingInstrumentation: reactNavigationV5Instrumentation,
63
+ })
64
+ ]
65
+ });
66
+
25
67
  LogBox.ignoreLogs([
26
68
  'Sending \`onAnimatedValueUpdate` with no listeners registered.',
27
69
  'Non-serializable values were found in the navigation state.',
@@ -19,6 +19,8 @@ import { BusinessBasicInformation } from '../BusinessBasicInformation'
19
19
  import { BusinessInformationParams } from '../../types'
20
20
  import { GoogleMap } from '../GoogleMap'
21
21
  import { useTheme } from 'styled-components/native';
22
+ import moment from 'moment';
23
+
22
24
  const BusinessInformationUI = (props: BusinessInformationParams) => {
23
25
  const {
24
26
  businessState,
@@ -38,14 +40,13 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
38
40
  t('FRIDAY_ABBREVIATION', 'Fri'),
39
41
  t('SATURDAY_ABBREVIATION', 'Sat')
40
42
  ]
41
- const is12hours = configs?.format_time?.value?.includes('12')
42
43
 
43
- const scheduleFormatted = ({ hour, minute } : { hour : number | string, minute : number | string}) => {
44
- const checkTime = (val: number | string) => (val < 10 ? `0${val}` : val);
45
- const zz = hour === 0 ? t('AM', 'AM') : hour >= 12 ? t('PM', 'PM') : t('AM', 'AM');
46
- const h = parseInt(`${hour}`);
47
- return is12hours ? `${h === 0 ? 12 : h > 12 ? h - 12 : h}:${checkTime(minute)} ${zz}` : `${checkTime(hour)}:${checkTime(minute)}`;
48
- }
44
+ const formatTime = configs?.general_hour_format?.value
45
+
46
+ const checkTime = (val: number) => (val < 10 ? `0${val}` : val);
47
+ const timeFormated = (time: any) => {
48
+ return moment(`1900-01-01 ${checkTime(time.hour)}:${checkTime(time.minute)}`).format(formatTime)
49
+ }
49
50
 
50
51
  return (
51
52
  <BusinessInformationContainer>
@@ -105,13 +106,13 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
105
106
  {schedule.enabled ? (
106
107
  schedule.lapses.map( (time: any, k: number) => (
107
108
  <React.Fragment key={k}>
108
- <OText>{scheduleFormatted(time.open)}</OText>
109
+ <OText>{timeFormated(time.open)}</OText>
109
110
  <OText mBottom={10} style={{
110
111
  padding: 3,
111
112
  borderBottomColor: theme.colors.primary,
112
113
  borderBottomWidth: 1
113
114
  }}
114
- >{scheduleFormatted(time.close)}</OText>
115
+ >{timeFormated(time.close)}</OText>
115
116
  </React.Fragment>
116
117
  ))) : ( <OText>{t('CLOSED', 'Closed')}</OText>)}
117
118
  </ScheduleBlock>
@@ -191,7 +191,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
191
191
  {isFarAway && (
192
192
  <FarAwayMessage style={styles.farAwayMsg}>
193
193
  <Ionicons name='md-warning-outline' style={styles.iconStyle} />
194
- <OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'You are far from this address')}</OText>
194
+ <OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'Your are far from this address')}</OText>
195
195
  </FarAwayMessage>
196
196
  )}
197
197
  </OrderControlContainer>
@@ -131,26 +131,6 @@ export const OrderCreating = (props: any) => {
131
131
  <OText size={14}>{address}</OText>
132
132
  </LocationWrapper>
133
133
  )}
134
- {cart && !orderState?.options?.moment && (
135
- <DeliveryWrapper>
136
- <DeliveryContentWrapper>
137
- <SimpleIcon
138
- name='clock'
139
- size={20}
140
- color={theme.colors.primary}
141
- style={{ marginRight: 10 }}
142
- />
143
- <OText size={14}>
144
- {orderState?.options?.type === 1
145
- ? t('DELIVERY_TIME', 'Delivery Time')
146
- : t('PICK_UP', 'Pick Time')}
147
- </OText>
148
- </DeliveryContentWrapper>
149
- <View>
150
- <OText size={14} weight='700'>{parseDeliveryTime()}</OText>
151
- </View>
152
- </DeliveryWrapper>
153
- )}
154
134
  {cardData?.card?.brand && (
155
135
  <View style={{ flexDirection: 'row', marginBottom: 27 }}>
156
136
  {getIconCard(cardData?.card?.brand, 20)}
@@ -9,7 +9,8 @@ import {
9
9
  useToast,
10
10
  useApi,
11
11
  useLanguage,
12
- useConfig
12
+ useConfig,
13
+ useOrder
13
14
  } from 'ordering-components/native';
14
15
 
15
16
  import { OText } from '../shared';
@@ -24,7 +25,9 @@ interface PaymentOptionsWebViewParams {
24
25
  webviewPaymethod?: any,
25
26
  setShowGateway?: any,
26
27
  setOpenOrderCreating?: any,
27
- locationId?: any
28
+ locationId?: any,
29
+ additionalParams?: any
30
+ title?: string
28
31
  }
29
32
  export const PaymentOptionsWebView = (props: PaymentOptionsWebViewParams) => {
30
33
  const {
@@ -37,7 +40,9 @@ export const PaymentOptionsWebView = (props: PaymentOptionsWebViewParams) => {
37
40
  webviewPaymethod,
38
41
  setShowGateway,
39
42
  setOpenOrderCreating,
40
- locationId
43
+ locationId,
44
+ title,
45
+ additionalParams = {}
41
46
  } = props
42
47
 
43
48
  const webviewRef = useRef<any>(null)
@@ -45,7 +50,7 @@ export const PaymentOptionsWebView = (props: PaymentOptionsWebViewParams) => {
45
50
  const [ordering] = useApi()
46
51
  const [{ configs }] = useConfig();
47
52
  const [, t] = useLanguage();
48
-
53
+ const [, { confirmCart }] = useOrder()
49
54
 
50
55
  const [progClr, setProgClr] = useState('#424242');
51
56
  const [prog, setProg] = useState(true);
@@ -55,9 +60,23 @@ export const PaymentOptionsWebView = (props: PaymentOptionsWebViewParams) => {
55
60
  setShowGateway({ open: false, closedByUser: true })
56
61
  }
57
62
 
58
- const onMessage = (e: any) => {
63
+ const onMessage = async (e: any) => {
59
64
  if (e?.nativeEvent?.data && e?.nativeEvent?.data !== 'undefined') {
60
65
  let payment = JSON.parse(e.nativeEvent.data);
66
+ if (payment?.response && payment?.responsetext && payment.orderid) {
67
+ const credomaticData = {
68
+ credomatic: {
69
+ ...payment
70
+ }
71
+ }
72
+ const confirmCartRes = await confirmCart(payment.orderid, credomaticData)
73
+ if (confirmCartRes.error) {
74
+ showToast(ToastType.Error, confirmCartRes.error.message)
75
+ }
76
+ if (confirmCartRes.result.order?.uuid) {
77
+ onNavigationRedirect?.('OrderDetails', { orderId: confirmCartRes.result.order.uuid, isFromCheckout: true })
78
+ }
79
+ }
61
80
 
62
81
  if (payment === 'api error' || payment === 'Cancelled by user') {
63
82
  setShowGateway({ closedByUser: true, open: false })
@@ -95,7 +114,7 @@ export const PaymentOptionsWebView = (props: PaymentOptionsWebViewParams) => {
95
114
  marginBottom: 5,
96
115
  marginTop: 10
97
116
  }}>
98
- {webviewPaymethod?.gateway === 'paypal' ? (t('PAYPAL_GATEWAY', 'PayPal GateWay')) : (t('SQUARE_PAYMENT', 'Square payment'))}
117
+ {title || (webviewPaymethod?.gateway === 'paypal' ? (t('PAYPAL_GATEWAY', 'PayPal GateWay')) : (t('SQUARE_PAYMENT', 'Square payment')))}
99
118
  </OText>
100
119
  <View style={{ padding: 20, opacity: prog ? 1 : 0, backgroundColor: 'white' }}>
101
120
  <ActivityIndicator size={24} color={progClr} />
@@ -110,6 +129,7 @@ export const PaymentOptionsWebView = (props: PaymentOptionsWebViewParams) => {
110
129
  cacheMode='LOAD_NO_CACHE'
111
130
  style={{ flex: 1 }}
112
131
  onShouldStartLoadWithRequest={() => true}
132
+ originWhitelist={["*"]}
113
133
  onLoadStart={() => {
114
134
  setProg(true);
115
135
  setProgClr('#424242');
@@ -139,7 +159,8 @@ export const PaymentOptionsWebView = (props: PaymentOptionsWebViewParams) => {
139
159
  currency: configs?.stripe_currency?.value || currency,
140
160
  userToken: token,
141
161
  clientId: webviewPaymethod?.credentials?.client_id,
142
- ...messageParams
162
+ ...messageParams,
163
+ ...additionalParams
143
164
  }
144
165
  }
145
166
  setProg(false);
@@ -148,4 +169,4 @@ export const PaymentOptionsWebView = (props: PaymentOptionsWebViewParams) => {
148
169
  />
149
170
  </View>
150
171
  )
151
- }
172
+ }
@@ -7,7 +7,7 @@ import { Wrapper } from './styles'
7
7
 
8
8
  import { PhoneInputParams } from '../../types';
9
9
  import { OText } from '../shared';
10
- import {transformCountryCode} from '../../utils'
10
+ import {transformCountryCode, verifyCountryCode} from '../../utils'
11
11
  import {I18nManager} from 'react-native'
12
12
  import { useTheme } from 'styled-components/native';
13
13
 
@@ -88,7 +88,11 @@ export const PhoneInputNumber = (props: PhoneInputParams) => {
88
88
  <PhoneInput
89
89
  ref={phoneInput}
90
90
  defaultValue={userphoneNumber || defaultValue}
91
- defaultCode={defaultCode ? transformCountryCode(defaultCode) : configs?.default_country_code?.value}
91
+ defaultCode={defaultCode ?
92
+ !isNaN(defaultCode)
93
+ ? transformCountryCode(defaultCode)
94
+ : verifyCountryCode(defaultCode)
95
+ : verifyCountryCode(configs?.default_country_code?.value)}
92
96
  onChangeFormattedText={(text : string) => handleChangeNumber(text)}
93
97
  withDarkTheme
94
98
  textInputStyle={{textAlign: I18nManager.isRTL ? 'right' : 'left'}}
@@ -1,11 +1,10 @@
1
- import React, { useState, useEffect } from 'react'
2
- import { useLanguage, useConfig } from 'ordering-components/native'
3
- import { useGooglePay, ApplePayButton, useApplePay } from '@stripe/stripe-react-native'
4
- import { OButton, OText } from '../shared';
5
- import { Platform, View } from 'react-native';
1
+ import React, { useEffect } from 'react'
2
+ import { useLanguage, useConfig, useOrder } from 'ordering-components/native'
3
+ import { useGooglePay, useApplePay } from '@stripe/stripe-react-native'
4
+ import { Platform } from 'react-native';
6
5
  import { StripeMethodFormParams } from '../../types';
7
- import Spinner from 'react-native-loading-spinner-overlay';
8
6
  import { android_app_id } from '../../config.json'
7
+
9
8
  export const StripeMethodForm = (props: StripeMethodFormParams) => {
10
9
  const {
11
10
  cart,
@@ -13,68 +12,114 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
13
12
  onCancel,
14
13
  setErrors,
15
14
  paymethod,
16
- devMode
15
+ devMode,
16
+ setMethodPaySupported,
17
+ placeByMethodPay,
18
+ methodPaySupported,
19
+ setPlaceByMethodPay,
20
+ cartTotal
17
21
  } = props
18
22
  const { initGooglePay, createGooglePayPaymentMethod, loading } = useGooglePay();
19
23
  const { presentApplePay, isApplePaySupported } = useApplePay();
20
- const [initialized, setInitialized] = useState(false);
21
- const [loadingGooglePayment, setLoadingGooglePayment] = useState(false)
24
+ const [{ loading: loadingCart }] = useOrder()
22
25
  const [, t] = useLanguage()
23
- const [configs] = useConfig()
26
+ const [{ configs }] = useConfig()
27
+ const applePay = ['global_apple_pay', 'apple_pay']
28
+ const googlePay = ['global_google_pay', 'google_pay']
24
29
 
25
30
  useEffect(() => {
26
- if (paymethod !== 'google_pay' || !initGooglePay) return
27
31
  if (Platform.OS === 'ios') {
28
- setErrors(t('GOOGLE_PAY_NOT_SUPPORTED', 'Google pay not supported'))
29
32
  return
30
33
  }
31
- const initialize = async () => {
32
- try {
33
- const { error } = await initGooglePay({
34
- testEnv: devMode,
35
- merchantName: android_app_id,
36
- countryCode: 'US',
37
- billingAddressConfig: {
38
- format: 'FULL',
39
- isPhoneNumberRequired: true,
40
- isRequired: false,
41
- },
42
- existingPaymentMethodRequired: false,
43
- isEmailRequired: true,
44
- });
45
-
46
- if (error) {
47
- setErrors(error.code + ' - ' + error.message);
48
- return;
49
- }
50
- setInitialized(true);
51
- } catch (err: any) {
52
- setErrors('Catch ' + err?.message)
53
- }
34
+ if (!loadingCart) {
35
+ setMethodPaySupported({
36
+ enabled: true,
37
+ loading: false
38
+ })
39
+ setPlaceByMethodPay(false)
40
+ setErrors('')
54
41
  }
55
- initialize();
56
- }, [initGooglePay]);
42
+ }, [paymethod, loadingCart]);
57
43
 
58
44
  useEffect(() => {
59
- if (paymethod !== 'apple_pay') return
45
+ if (applePay.includes(paymethod) && !paymethod) return
60
46
  if (Platform.OS === 'android') {
61
- setErrors(t('APPLE_PAY_NOT_SUPPORTED', 'Apple pay not supported'))
47
+ setPlaceByMethodPay(false)
48
+ setMethodPaySupported({
49
+ ...methodPaySupported,
50
+ loading: false
51
+ })
62
52
  return
63
53
  }
64
- }, [])
54
+ }, [paymethod])
55
+
56
+ const initialize = async () => {
57
+ try {
58
+ setMethodPaySupported({
59
+ ...methodPaySupported,
60
+ loading: true
61
+ })
62
+ const { error } = await initGooglePay({
63
+ testEnv: devMode,
64
+ merchantName: android_app_id,
65
+ countryCode: 'US',
66
+ billingAddressConfig: {
67
+ format: 'FULL',
68
+ isPhoneNumberRequired: true,
69
+ isRequired: false,
70
+ },
71
+ existingPaymentMethodRequired: false,
72
+ isEmailRequired: true,
73
+ });
74
+
75
+ if (error) {
76
+ setErrors(error.code + ' - ' + error.message);
77
+ setMethodPaySupported({
78
+ enabled: false,
79
+ loading: false
80
+ })
81
+ setPlaceByMethodPay(false)
82
+ return true;
83
+ }
84
+ setMethodPaySupported({
85
+ enabled: true,
86
+ loading: false
87
+ })
88
+ setPlaceByMethodPay(false)
89
+ setErrors('')
90
+ } catch (err: any) {
91
+ setErrors('Catch ' + err?.message)
92
+ setMethodPaySupported({
93
+ enabled: false,
94
+ loading: false
95
+ })
96
+ setPlaceByMethodPay(false)
97
+ }
98
+ }
65
99
 
66
100
  const createPaymentMethod = async () => {
67
- setLoadingGooglePayment(true)
101
+ setMethodPaySupported({
102
+ ...methodPaySupported,
103
+ loading: true
104
+ })
105
+ const initializeError = await initialize()
106
+ if (initializeError) return
68
107
  const { error, paymentMethod } = await createGooglePayPaymentMethod({
69
- amount: cart?.balance ?? cart?.total,
108
+ amount: cartTotal ?? cart?.balance ?? cart?.total,
70
109
  currencyCode: configs?.stripe_currency?.value ?? 'USD',
71
110
  });
72
111
  if (error) {
73
112
  setErrors(error.code + ' - ' + error.message);
74
- setLoadingGooglePayment(false)
75
- return;
113
+ setMethodPaySupported({
114
+ enabled: true,
115
+ loading: false
116
+ })
76
117
  } else if (paymentMethod) {
77
- handleSource({
118
+ setMethodPaySupported({
119
+ enabled: true,
120
+ loading: false
121
+ })
122
+ const source = {
78
123
  ...paymentMethod?.Card,
79
124
  id: paymentMethod.id,
80
125
  type: paymentMethod.type,
@@ -83,39 +128,49 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
83
128
  brand: paymentMethod.Card.brand,
84
129
  last4: paymentMethod.Card.last4
85
130
  }
86
- })
131
+ }
132
+ handleSource(cartTotal ? JSON.stringify(source) : source)
87
133
  onCancel()
88
- setLoadingGooglePayment(false)
89
134
  }
135
+ setPlaceByMethodPay(false)
90
136
  };
91
137
 
92
138
  const pay = async () => {
139
+ setMethodPaySupported({
140
+ ...methodPaySupported,
141
+ loading: true
142
+ })
93
143
  if (!isApplePaySupported) {
94
144
  setErrors(t('APPLE_PAY_NOT_SUPPORTED', 'Apple pay not supported'))
145
+ setMethodPaySupported({
146
+ enabled: false,
147
+ loading: false
148
+ })
149
+ setPlaceByMethodPay(false)
95
150
  return
96
151
  }
97
152
 
98
153
  const { error, paymentMethod } = await presentApplePay({
99
- cartItems: cart?.products?.map((product: any) => ({ label: product?.name, amount: product?.price?.toString?.() })),
154
+ cartItems: [{
155
+ label: t('CART', 'Cart'),
156
+ amount: cartTotal?.toString?.() ?? cart?.balance?.toString() ?? cart?.total?.toString?.(),
157
+ paymentType: 'Immediate'
158
+ }],
100
159
  country: 'US',
101
160
  currency: configs?.stripe_currency?.value ?? 'USD',
102
- shippingMethods: [
103
- {
104
- amount: cart?.balance?.toString() ?? cart?.total?.toString?.(),
105
- identifier: 'standard',
106
- label: 'Courier',
107
- detail: 'Delivery',
108
- type: 'final',
109
- },
110
- ],
111
-
112
- requiredShippingAddressFields: ['emailAddress', 'phoneNumber'],
113
- requiredBillingContactFields: ['phoneNumber', 'name'],
114
161
  });
115
162
  if (error) {
116
163
  setErrors(error.code + ' - ' + error.message);
164
+ setMethodPaySupported({
165
+ enabled: true,
166
+ loading: false
167
+ })
117
168
  } else if (paymentMethod) {
118
- handleSource({
169
+ setMethodPaySupported({
170
+ enabled: true,
171
+ loading: false
172
+ })
173
+ const source = {
119
174
  ...paymentMethod?.Card,
120
175
  id: paymentMethod.id,
121
176
  type: paymentMethod.type,
@@ -124,50 +179,29 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
124
179
  brand: paymentMethod.Card.brand,
125
180
  last4: paymentMethod.Card.last4
126
181
  }
127
- })
182
+ }
183
+ handleSource(cartTotal ? JSON.stringify(source) : source)
128
184
  }
185
+ setPlaceByMethodPay(false)
129
186
  }
130
187
 
188
+ useEffect(() => {
189
+ if (isApplePaySupported && applePay.includes(paymethod)) {
190
+ setMethodPaySupported({
191
+ enabled: true,
192
+ loading: false
193
+ })
194
+ setErrors('')
195
+ }
196
+ }, [isApplePaySupported, paymethod])
197
+
198
+ useEffect(() => {
199
+ if (placeByMethodPay) {
200
+ applePay.includes(paymethod) ? pay() : createPaymentMethod()
201
+ }
202
+ }, [placeByMethodPay])
203
+
131
204
  return (
132
- <>
133
- {paymethod === 'google_pay' ? (
134
- <View>
135
- <OButton
136
- textStyle={{
137
- color: '#fff'
138
- }}
139
- imgRightSrc={null}
140
- onClick={createPaymentMethod}
141
- isDisabled={loading || !initialized}
142
- text={t('PAY_WITH_GOOGLE_PAY', 'Pay with Google Pay')}
143
- isLoading={loading || !initialized}
144
- style={{ marginTop: 20 }}
145
- />
146
- </View>
147
- ) : (
148
- <View>
149
- {isApplePaySupported ? (
150
- <>
151
- <OText>{t('APPLE_PAY_PAYMENT', 'Apple pay payment')}</OText>
152
- <ApplePayButton
153
- onPress={pay}
154
- type="plain"
155
- buttonStyle="black"
156
- borderRadius={4}
157
- style={{
158
- width: '100%',
159
- height: 50,
160
- }}
161
- />
162
- </>
163
- ) : (
164
- <OText>{t('APPLE_PAY_NOT_SUPPORTED', 'Apple pay not supported')}</OText>
165
- )}
166
- </View>
167
- )}
168
- <Spinner
169
- visible={loadingGooglePayment}
170
- />
171
- </>
205
+ <></>
172
206
  )
173
207
  }
@@ -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,17 +1,18 @@
1
1
  import * as React from "react";
2
- import { Animated, StyleSheet, Text, View, Platform } from "react-native";
2
+ import { Animated, StyleSheet, Text, View } from "react-native";
3
+ import { useSafeAreaInsets } from 'react-native-safe-area-context'
3
4
  import { ToastType, useToast, useLanguage } from "ordering-components/native";
4
5
  import { useTheme } from 'styled-components/native';
5
6
  import { getTraduction } from '../../utils'
6
7
 
7
8
  const fadeDuration = 300;
8
- const topPosition = Platform.OS === 'ios' ? 40 : 20
9
9
 
10
10
  export const Toast = (props: any) => {
11
11
  const [toastConfig, { hideToast }] = useToast();
12
12
  const [, t] = useLanguage()
13
13
  const opacity = React.useRef(new Animated.Value(0)).current;
14
14
  const theme = useTheme();
15
+ const { top: topPosition } = useSafeAreaInsets();
15
16
 
16
17
  const fadeIn = React.useCallback(() => {
17
18
  Animated.timing(opacity, {
@@ -490,4 +490,9 @@ export interface StripeMethodFormParams {
490
490
  setErrors: (error: string) => void;
491
491
  paymethod: string;
492
492
  devMode?: boolean;
493
+ setMethodPaySupported?: any
494
+ placeByMethodPay?: any
495
+ methodPaySupported?: any,
496
+ setPlaceByMethodPay?: any,
497
+ cartTotal?: number
493
498
  }