tf-checkout-react-native 1.0.0

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 (285) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +168 -0
  3. package/android/build.gradle +42 -0
  4. package/android/src/main/AndroidManifest.xml +2 -0
  5. package/android/src/main/java/com/theticketfairy/tfcheckoutreactnative/TFCheckoutRNModule.kt +13 -0
  6. package/android/src/main/java/com/theticketfairy/tfcheckoutreactnative/TFCheckoutRNPackage.kt +19 -0
  7. package/ios/TFCheckoutRNModule-Bridging-Header.h +5 -0
  8. package/ios/TFCheckoutRNModule.m +11 -0
  9. package/ios/TFCheckoutRNModule.swift +21 -0
  10. package/ios/TFCheckoutRNModule.xcodeproj/project.pbxproj +314 -0
  11. package/lib/api/ApiClient.d.ts +62 -0
  12. package/lib/api/ApiClient.js +490 -0
  13. package/lib/api/ApiClient.js.map +1 -0
  14. package/lib/api/Constants.d.ts +7 -0
  15. package/lib/api/Constants.js +7 -0
  16. package/lib/api/Constants.js.map +1 -0
  17. package/lib/api/types.d.ts +164 -0
  18. package/lib/api/types.js +3 -0
  19. package/lib/api/types.js.map +1 -0
  20. package/lib/components/button/Button.d.ts +3 -0
  21. package/lib/components/button/Button.js +13 -0
  22. package/lib/components/button/Button.js.map +1 -0
  23. package/lib/components/button/styles.d.ts +27 -0
  24. package/lib/components/button/styles.js +29 -0
  25. package/lib/components/button/styles.js.map +1 -0
  26. package/lib/components/button/types.d.ts +14 -0
  27. package/lib/components/button/types.js +2 -0
  28. package/lib/components/button/types.js.map +1 -0
  29. package/lib/components/checkbox/Checkbox.d.ts +3 -0
  30. package/lib/components/checkbox/Checkbox.js +14 -0
  31. package/lib/components/checkbox/Checkbox.js.map +1 -0
  32. package/lib/components/checkbox/styles.d.ts +38 -0
  33. package/lib/components/checkbox/styles.js +40 -0
  34. package/lib/components/checkbox/styles.js.map +1 -0
  35. package/lib/components/checkbox/types.d.ts +18 -0
  36. package/lib/components/checkbox/types.js +2 -0
  37. package/lib/components/checkbox/types.js.map +1 -0
  38. package/lib/components/datePicker/DatePicker.d.ts +3 -0
  39. package/lib/components/datePicker/DatePicker.js +30 -0
  40. package/lib/components/datePicker/DatePicker.js.map +1 -0
  41. package/lib/components/datePicker/styles.d.ts +18 -0
  42. package/lib/components/datePicker/styles.js +20 -0
  43. package/lib/components/datePicker/styles.js.map +1 -0
  44. package/lib/components/datePicker/types.d.ts +8 -0
  45. package/lib/components/datePicker/types.js +2 -0
  46. package/lib/components/datePicker/types.js.map +1 -0
  47. package/lib/components/dropdown/Dropdown.d.ts +3 -0
  48. package/lib/components/dropdown/Dropdown.js +40 -0
  49. package/lib/components/dropdown/Dropdown.js.map +1 -0
  50. package/lib/components/dropdown/DropdownListItem.d.ts +3 -0
  51. package/lib/components/dropdown/DropdownListItem.js +12 -0
  52. package/lib/components/dropdown/DropdownListItem.js.map +1 -0
  53. package/lib/components/dropdown/styles.d.ts +72 -0
  54. package/lib/components/dropdown/styles.js +75 -0
  55. package/lib/components/dropdown/styles.js.map +1 -0
  56. package/lib/components/dropdown/types.d.ts +24 -0
  57. package/lib/components/dropdown/types.js +2 -0
  58. package/lib/components/dropdown/types.js.map +1 -0
  59. package/lib/components/formField/FormField.d.ts +3 -0
  60. package/lib/components/formField/FormField.js +35 -0
  61. package/lib/components/formField/FormField.js.map +1 -0
  62. package/lib/components/formField/styles.d.ts +34 -0
  63. package/lib/components/formField/styles.js +36 -0
  64. package/lib/components/formField/styles.js.map +1 -0
  65. package/lib/components/formField/types.d.ts +34 -0
  66. package/lib/components/formField/types.js +2 -0
  67. package/lib/components/formField/types.js.map +1 -0
  68. package/lib/components/index.d.ts +12 -0
  69. package/lib/components/index.js +13 -0
  70. package/lib/components/index.js.map +1 -0
  71. package/lib/components/input/Input.d.ts +3 -0
  72. package/lib/components/input/Input.js +13 -0
  73. package/lib/components/input/Input.js.map +1 -0
  74. package/lib/components/input/styles.d.ts +41 -0
  75. package/lib/components/input/styles.js +46 -0
  76. package/lib/components/input/styles.js.map +1 -0
  77. package/lib/components/input/types.d.ts +22 -0
  78. package/lib/components/input/types.js +2 -0
  79. package/lib/components/input/types.js.map +1 -0
  80. package/lib/components/loading/Loading.d.ts +3 -0
  81. package/lib/components/loading/Loading.js +14 -0
  82. package/lib/components/loading/Loading.js.map +1 -0
  83. package/lib/components/loading/styles.d.ts +29 -0
  84. package/lib/components/loading/styles.js +31 -0
  85. package/lib/components/loading/styles.js.map +1 -0
  86. package/lib/components/loading/types.d.ts +14 -0
  87. package/lib/components/loading/types.js +2 -0
  88. package/lib/components/loading/types.js.map +1 -0
  89. package/lib/components/loggedIn/LoggedIn.d.ts +4 -0
  90. package/lib/components/loggedIn/LoggedIn.js +21 -0
  91. package/lib/components/loggedIn/LoggedIn.js.map +1 -0
  92. package/lib/components/loggedIn/styles.d.ts +8 -0
  93. package/lib/components/loggedIn/styles.js +9 -0
  94. package/lib/components/loggedIn/styles.js.map +1 -0
  95. package/lib/components/loggedIn/types.d.ts +11 -0
  96. package/lib/components/loggedIn/types.js +2 -0
  97. package/lib/components/loggedIn/types.js.map +1 -0
  98. package/lib/components/login/Login.d.ts +3 -0
  99. package/lib/components/login/Login.js +68 -0
  100. package/lib/components/login/Login.js.map +1 -0
  101. package/lib/components/login/LoginView.d.ts +3 -0
  102. package/lib/components/login/LoginView.js +121 -0
  103. package/lib/components/login/LoginView.js.map +1 -0
  104. package/lib/components/login/styles.d.ts +50 -0
  105. package/lib/components/login/styles.js +52 -0
  106. package/lib/components/login/styles.js.map +1 -0
  107. package/lib/components/login/types.d.ts +63 -0
  108. package/lib/components/login/types.js +2 -0
  109. package/lib/components/login/types.js.map +1 -0
  110. package/lib/components/promoCode/PromoCode.d.ts +3 -0
  111. package/lib/components/promoCode/PromoCode.js +66 -0
  112. package/lib/components/promoCode/PromoCode.js.map +1 -0
  113. package/lib/components/promoCode/styles.d.ts +56 -0
  114. package/lib/components/promoCode/styles.js +58 -0
  115. package/lib/components/promoCode/styles.js.map +1 -0
  116. package/lib/components/promoCode/types.d.ts +33 -0
  117. package/lib/components/promoCode/types.js +2 -0
  118. package/lib/components/promoCode/types.js.map +1 -0
  119. package/lib/components/separator/Separator.d.ts +3 -0
  120. package/lib/components/separator/Separator.js +13 -0
  121. package/lib/components/separator/Separator.js.map +1 -0
  122. package/lib/components/separator/types.d.ts +8 -0
  123. package/lib/components/separator/types.js +2 -0
  124. package/lib/components/separator/types.js.map +1 -0
  125. package/lib/components/waitingList/WaitingList.d.ts +3 -0
  126. package/lib/components/waitingList/WaitingList.js +51 -0
  127. package/lib/components/waitingList/WaitingList.js.map +1 -0
  128. package/lib/components/waitingList/WaitingListView.d.ts +3 -0
  129. package/lib/components/waitingList/WaitingListView.js +19 -0
  130. package/lib/components/waitingList/WaitingListView.js.map +1 -0
  131. package/lib/components/waitingList/styles.d.ts +8 -0
  132. package/lib/components/waitingList/styles.js +9 -0
  133. package/lib/components/waitingList/styles.js.map +1 -0
  134. package/lib/components/waitingList/types.d.ts +49 -0
  135. package/lib/components/waitingList/types.js +2 -0
  136. package/lib/components/waitingList/types.js.map +1 -0
  137. package/lib/containers/billingInfo/BillingInfo.d.ts +3 -0
  138. package/lib/containers/billingInfo/BillingInfo.js +627 -0
  139. package/lib/containers/billingInfo/BillingInfo.js.map +1 -0
  140. package/lib/containers/billingInfo/BillingInfoData.d.ts +6 -0
  141. package/lib/containers/billingInfo/BillingInfoData.js +79 -0
  142. package/lib/containers/billingInfo/BillingInfoData.js.map +1 -0
  143. package/lib/containers/billingInfo/BillingInfoView.d.ts +3 -0
  144. package/lib/containers/billingInfo/BillingInfoView.js +23 -0
  145. package/lib/containers/billingInfo/BillingInfoView.js.map +1 -0
  146. package/lib/containers/billingInfo/styles.d.ts +20 -0
  147. package/lib/containers/billingInfo/styles.js +21 -0
  148. package/lib/containers/billingInfo/styles.js.map +1 -0
  149. package/lib/containers/billingInfo/types.d.ts +103 -0
  150. package/lib/containers/billingInfo/types.js +2 -0
  151. package/lib/containers/billingInfo/types.js.map +1 -0
  152. package/lib/containers/checkout/Checkout.d.ts +3 -0
  153. package/lib/containers/checkout/Checkout.js +162 -0
  154. package/lib/containers/checkout/Checkout.js.map +1 -0
  155. package/lib/containers/checkout/CheckoutData.d.ts +2 -0
  156. package/lib/containers/checkout/CheckoutData.js +28 -0
  157. package/lib/containers/checkout/CheckoutData.js.map +1 -0
  158. package/lib/containers/checkout/CheckoutView.d.ts +3 -0
  159. package/lib/containers/checkout/CheckoutView.js +34 -0
  160. package/lib/containers/checkout/CheckoutView.js.map +1 -0
  161. package/lib/containers/checkout/components/Conditions.d.ts +3 -0
  162. package/lib/containers/checkout/components/Conditions.js +11 -0
  163. package/lib/containers/checkout/components/Conditions.js.map +1 -0
  164. package/lib/containers/checkout/components/OrderReview.d.ts +3 -0
  165. package/lib/containers/checkout/components/OrderReview.js +10 -0
  166. package/lib/containers/checkout/components/OrderReview.js.map +1 -0
  167. package/lib/containers/checkout/components/styles.d.ts +25 -0
  168. package/lib/containers/checkout/components/styles.js +27 -0
  169. package/lib/containers/checkout/components/styles.js.map +1 -0
  170. package/lib/containers/checkout/styles.d.ts +29 -0
  171. package/lib/containers/checkout/styles.js +31 -0
  172. package/lib/containers/checkout/styles.js.map +1 -0
  173. package/lib/containers/checkout/types.d.ts +41 -0
  174. package/lib/containers/checkout/types.js +2 -0
  175. package/lib/containers/checkout/types.js.map +1 -0
  176. package/lib/containers/index.d.ts +6 -0
  177. package/lib/containers/index.js +7 -0
  178. package/lib/containers/index.js.map +1 -0
  179. package/lib/containers/myOrderDetails/MyOrderDetails.d.ts +4 -0
  180. package/lib/containers/myOrderDetails/MyOrderDetails.js +11 -0
  181. package/lib/containers/myOrderDetails/MyOrderDetails.js.map +1 -0
  182. package/lib/containers/myOrderDetails/MyOrderDetailsView.d.ts +4 -0
  183. package/lib/containers/myOrderDetails/MyOrderDetailsView.js +60 -0
  184. package/lib/containers/myOrderDetails/MyOrderDetailsView.js.map +1 -0
  185. package/lib/containers/myOrderDetails/styles.d.ts +0 -0
  186. package/lib/containers/myOrderDetails/styles.js +2 -0
  187. package/lib/containers/myOrderDetails/styles.js.map +1 -0
  188. package/lib/containers/myOrderDetails/types.d.ts +11 -0
  189. package/lib/containers/myOrderDetails/types.js +2 -0
  190. package/lib/containers/myOrderDetails/types.js.map +1 -0
  191. package/lib/containers/myOrders/MyOrders.d.ts +9 -0
  192. package/lib/containers/myOrders/MyOrders.js +62 -0
  193. package/lib/containers/myOrders/MyOrders.js.map +1 -0
  194. package/lib/containers/myOrders/MyOrdersView.d.ts +3 -0
  195. package/lib/containers/myOrders/MyOrdersView.js +30 -0
  196. package/lib/containers/myOrders/MyOrdersView.js.map +1 -0
  197. package/lib/containers/myOrders/components/OrderListItem.d.ts +4 -0
  198. package/lib/containers/myOrders/components/OrderListItem.js +29 -0
  199. package/lib/containers/myOrders/components/OrderListItem.js.map +1 -0
  200. package/lib/containers/myOrders/components/styles.d.ts +51 -0
  201. package/lib/containers/myOrders/components/styles.js +50 -0
  202. package/lib/containers/myOrders/components/styles.js.map +1 -0
  203. package/lib/containers/myOrders/components/types.d.ts +25 -0
  204. package/lib/containers/myOrders/components/types.js +2 -0
  205. package/lib/containers/myOrders/components/types.js.map +1 -0
  206. package/lib/containers/myOrders/styles.d.ts +21 -0
  207. package/lib/containers/myOrders/styles.js +23 -0
  208. package/lib/containers/myOrders/styles.js.map +1 -0
  209. package/lib/containers/myOrders/types.d.ts +27 -0
  210. package/lib/containers/myOrders/types.js +2 -0
  211. package/lib/containers/myOrders/types.js.map +1 -0
  212. package/lib/containers/purchaseConfirmation/PurchaseConfirmation.d.ts +3 -0
  213. package/lib/containers/purchaseConfirmation/PurchaseConfirmation.js +17 -0
  214. package/lib/containers/purchaseConfirmation/PurchaseConfirmation.js.map +1 -0
  215. package/lib/containers/purchaseConfirmation/PurchaseConfirmationView.d.ts +3 -0
  216. package/lib/containers/purchaseConfirmation/PurchaseConfirmationView.js +15 -0
  217. package/lib/containers/purchaseConfirmation/PurchaseConfirmationView.js.map +1 -0
  218. package/lib/containers/purchaseConfirmation/styles.d.ts +73 -0
  219. package/lib/containers/purchaseConfirmation/styles.js +75 -0
  220. package/lib/containers/purchaseConfirmation/styles.js.map +1 -0
  221. package/lib/containers/purchaseConfirmation/types.d.ts +50 -0
  222. package/lib/containers/purchaseConfirmation/types.js +2 -0
  223. package/lib/containers/purchaseConfirmation/types.js.map +1 -0
  224. package/lib/containers/tickets/Tickets.d.ts +3 -0
  225. package/lib/containers/tickets/Tickets.js +143 -0
  226. package/lib/containers/tickets/Tickets.js.map +1 -0
  227. package/lib/containers/tickets/TicketsView.d.ts +3 -0
  228. package/lib/containers/tickets/TicketsView.js +35 -0
  229. package/lib/containers/tickets/TicketsView.js.map +1 -0
  230. package/lib/containers/tickets/components/TicketListItem.d.ts +3 -0
  231. package/lib/containers/tickets/components/TicketListItem.js +46 -0
  232. package/lib/containers/tickets/components/TicketListItem.js.map +1 -0
  233. package/lib/containers/tickets/components/styles.d.ts +50 -0
  234. package/lib/containers/tickets/components/styles.js +53 -0
  235. package/lib/containers/tickets/components/styles.js.map +1 -0
  236. package/lib/containers/tickets/components/types.d.ts +25 -0
  237. package/lib/containers/tickets/components/types.js +2 -0
  238. package/lib/containers/tickets/components/types.js.map +1 -0
  239. package/lib/containers/tickets/styles.d.ts +19 -0
  240. package/lib/containers/tickets/styles.js +21 -0
  241. package/lib/containers/tickets/styles.js.map +1 -0
  242. package/lib/containers/tickets/types.d.ts +69 -0
  243. package/lib/containers/tickets/types.js +2 -0
  244. package/lib/containers/tickets/types.js.map +1 -0
  245. package/lib/helpers/Debounced.d.ts +1 -0
  246. package/lib/helpers/Debounced.js +24 -0
  247. package/lib/helpers/Debounced.js.map +1 -0
  248. package/lib/helpers/LocalStorage.d.ts +16 -0
  249. package/lib/helpers/LocalStorage.js +58 -0
  250. package/lib/helpers/LocalStorage.js.map +1 -0
  251. package/lib/helpers/StringsHelper.d.ts +1 -0
  252. package/lib/helpers/StringsHelper.js +7 -0
  253. package/lib/helpers/StringsHelper.js.map +1 -0
  254. package/lib/helpers/Validators.d.ts +5 -0
  255. package/lib/helpers/Validators.js +36 -0
  256. package/lib/helpers/Validators.js.map +1 -0
  257. package/lib/index.d.ts +6 -0
  258. package/lib/index.js +6 -0
  259. package/lib/index.js.map +1 -0
  260. package/lib/res/colors.d.ts +12 -0
  261. package/lib/res/colors.js +27 -0
  262. package/lib/res/colors.js.map +1 -0
  263. package/lib/res/icons.d.ts +7 -0
  264. package/lib/res/icons.js +7 -0
  265. package/lib/res/icons.js.map +1 -0
  266. package/lib/res/images.d.ts +4 -0
  267. package/lib/res/images.js +4 -0
  268. package/lib/res/images.js.map +1 -0
  269. package/lib/res/index.d.ts +23 -0
  270. package/lib/res/index.js +10 -0
  271. package/lib/res/index.js.map +1 -0
  272. package/lib/types/IEvent.d.ts +64 -0
  273. package/lib/types/IEvent.js +2 -0
  274. package/lib/types/IEvent.js.map +1 -0
  275. package/lib/types/ITicket.d.ts +44 -0
  276. package/lib/types/ITicket.js +2 -0
  277. package/lib/types/ITicket.js.map +1 -0
  278. package/lib/types/IUserProfile.d.ts +24 -0
  279. package/lib/types/IUserProfile.js +2 -0
  280. package/lib/types/IUserProfile.js.map +1 -0
  281. package/lib/types/index.d.ts +3 -0
  282. package/lib/types/index.js +4 -0
  283. package/lib/types/index.js.map +1 -0
  284. package/package.json +80 -0
  285. package/tf-checkout-react-native.podspec +19 -0
@@ -0,0 +1,79 @@
1
+ import _forEach from 'lodash/forEach';
2
+ import Constants from '../../api/Constants';
3
+ export const formDataInitialState = {
4
+ firstName: '',
5
+ lastName: '',
6
+ email: '',
7
+ confirmEmail: '',
8
+ password: '',
9
+ confirmPassword: '',
10
+ phone: '',
11
+ street: '',
12
+ city: '',
13
+ country: undefined,
14
+ zipCode: '',
15
+ state: undefined,
16
+ isSubToNewsletter: false,
17
+ ticketHoldersFields: [],
18
+ isSubToMarketing: false,
19
+ birthday: undefined,
20
+ errors: {
21
+ firstName: '',
22
+ lastName: '',
23
+ email: '',
24
+ confirmEmail: '',
25
+ password: '',
26
+ confirmPassword: '',
27
+ phone: '',
28
+ street: '',
29
+ city: '',
30
+ zipCode: '',
31
+ },
32
+ };
33
+ export const getCheckoutBody = (values, loggedInData, isAgeRequired = false) => {
34
+ var _a, _b;
35
+ const parsedTicketHolders = values.ticketHoldersFields.map((th) => {
36
+ return {
37
+ email: th.email,
38
+ first_name: th.firstName,
39
+ last_name: th.lastName,
40
+ phone: th.phone,
41
+ };
42
+ });
43
+ const body = {
44
+ attributes: {
45
+ city: values.city,
46
+ confirm_email: values.confirmEmail,
47
+ country: (_a = values.country) === null || _a === void 0 ? void 0 : _a.value,
48
+ email: values.email,
49
+ first_name: values.firstName,
50
+ last_name: values.lastName,
51
+ password: values.password,
52
+ phone: values.phone,
53
+ state: (_b = values.state) === null || _b === void 0 ? void 0 : _b.value,
54
+ street_address: values.street,
55
+ zip: values.zipCode,
56
+ ticket_holders: parsedTicketHolders,
57
+ ttf_opt_in: values.isSubToNewsletter,
58
+ brand_opt_in: values.isSubToMarketing,
59
+ },
60
+ };
61
+ if (isAgeRequired && values.birthday) {
62
+ body.attributes.dob_day = values.birthday.getDate();
63
+ body.attributes.dob_month = values.birthday.getMonth() + 1;
64
+ body.attributes.dob_year = values.birthday.getFullYear();
65
+ }
66
+ return body;
67
+ };
68
+ export const getRegisterFormData = (checkoutBody) => {
69
+ const bodyFormData = new FormData();
70
+ _forEach(checkoutBody.attributes, (item, key) => {
71
+ bodyFormData.append(key, item);
72
+ });
73
+ bodyFormData.append('password_confirmation', checkoutBody.attributes.password);
74
+ bodyFormData.append('client_id', Constants.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf');
75
+ bodyFormData.append('client_secret', Constants.CLIENT_SECRET ||
76
+ 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9');
77
+ return bodyFormData;
78
+ };
79
+ //# sourceMappingURL=BillingInfoData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"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,CAAC,CAAC,CAAA;IAEF,YAAY,CAAC,MAAM,CAAC,uBAAuB,EAAE,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC9E,YAAY,CAAC,MAAM,CACjB,WAAW,EACX,SAAS,CAAC,SAAS,IAAI,kCAAkC,CAC1D,CAAA;IACD,YAAY,CAAC,MAAM,CACjB,eAAe,EACf,SAAS,CAAC,aAAa;QACrB,kDAAkD,CACrD,CAAA;IAED,OAAO,YAAY,CAAA;AACrB,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { IBillingInfoViewProps } from './types';
2
+ declare const BillingInfoView: ({ formFields, isLoading, onSubmit, onLoginSuccessful, onLoginFail, isDataValid, isLoginDialogVisible, showLoginDialog, hideLoginDialog, loginMessage, userProfile, isSubmitLoading, onLogoutSuccess, texts, styles, }: IBillingInfoViewProps) => JSX.Element;
3
+ export default BillingInfoView;
@@ -0,0 +1,23 @@
1
+ import _map from 'lodash/map';
2
+ import React, { useCallback } from 'react';
3
+ import { View } from 'react-native';
4
+ import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
5
+ import { Button, FormField, Loading, Login } from '../../components';
6
+ import s from './styles';
7
+ const BillingInfoView = ({ formFields, isLoading, onSubmit, onLoginSuccessful, onLoginFail, isDataValid, isLoginDialogVisible, showLoginDialog, hideLoginDialog, loginMessage, userProfile, isSubmitLoading, onLogoutSuccess, texts, styles, }) => {
8
+ var _a;
9
+ const renderFormFields = useCallback(() => {
10
+ return _map(formFields, (item, index) => (React.createElement(FormField, { ...item, key: `formField.${index}.${item.id}` })));
11
+ }, [formFields]);
12
+ return (React.createElement(KeyboardAwareScrollView, { extraScrollHeight: 32 },
13
+ React.createElement(View, { style: s.container },
14
+ React.createElement(Login, { onLoginSuccessful: onLoginSuccessful, onLoginFailure: () => { }, isLoginDialogVisible: isLoginDialogVisible, showLoginDialog: showLoginDialog, hideLoginDialog: hideLoginDialog, message: loginMessage, userProfileProp: userProfile, onLogoutSuccess: onLogoutSuccess, texts: texts === null || texts === void 0 ? void 0 : texts.loginTexts, styles: styles === null || styles === void 0 ? void 0 : styles.loginStyles }),
15
+ renderFormFields(),
16
+ React.createElement(Button, { onPress: onSubmit, text: (texts === null || texts === void 0 ? void 0 : texts.checkoutButton) || 'CHECKOUT', isDisabled: !isDataValid, isLoading: isSubmitLoading, styles: {
17
+ ...styles === null || styles === void 0 ? void 0 : styles.loginButton,
18
+ container: [s.submitButton, (_a = styles === null || styles === void 0 ? void 0 : styles.loginButton) === null || _a === void 0 ? void 0 : _a.container],
19
+ } }),
20
+ isLoading && React.createElement(Loading, null))));
21
+ };
22
+ export default BillingInfoView;
23
+ //# sourceMappingURL=BillingInfoView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BillingInfoView.js","sourceRoot":"","sources":["../../../src/containers/billingInfo/BillingInfoView.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,YAAY,CAAA;AAC7B,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAA;AAEjF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACpE,OAAO,CAAC,MAAM,UAAU,CAAA;AAGxB,MAAM,eAAe,GAAG,CAAC,EACvB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,WAAW,EACX,eAAe,EACf,eAAe,EACf,KAAK,EACL,MAAM,GACgB,EAAE,EAAE;;IAC1B,MAAM,gBAAgB,GAAG,WAAW,CAAC,GAAG,EAAE;QACxC,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACvC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
+ };
6
+ input: {
7
+ marginBottom: number;
8
+ };
9
+ submitButton: {
10
+ marginVertical: number;
11
+ };
12
+ customCheckboxText: {
13
+ paddingRight: number;
14
+ };
15
+ privacyPolicyLink: {
16
+ textDecorationLine: "underline";
17
+ color: string;
18
+ };
19
+ };
20
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import { StyleSheet } from 'react-native';
2
+ export default StyleSheet.create({
3
+ container: {
4
+ marginHorizontal: 24,
5
+ marginBottom: 50,
6
+ },
7
+ input: {
8
+ marginBottom: 16,
9
+ },
10
+ submitButton: {
11
+ marginVertical: 32,
12
+ },
13
+ customCheckboxText: {
14
+ paddingRight: 32,
15
+ },
16
+ privacyPolicyLink: {
17
+ textDecorationLine: 'underline',
18
+ color: 'blue',
19
+ },
20
+ });
21
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/containers/billingInfo/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,eAAe,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,gBAAgB,EAAE,EAAE;QACpB,YAAY,EAAE,EAAE;KACjB;IACD,KAAK,EAAE;QACL,YAAY,EAAE,EAAE;KACjB;IACD,YAAY,EAAE;QACZ,cAAc,EAAE,EAAE;KACnB;IACD,kBAAkB,EAAE;QAClB,YAAY,EAAE,EAAE;KACjB;IACD,iBAAiB,EAAE;QACjB,kBAAkB,EAAE,WAAW;QAC/B,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAA"}
@@ -0,0 +1,103 @@
1
+ import { StyleProp, TextStyle } from 'react-native';
2
+ import { IButtonStyles } from '../../components/button/types';
3
+ import { ICheckboxStyles } from '../../components/checkbox/types';
4
+ import { IDropdownItem, IDropdownStyles } from '../../components/dropdown/types';
5
+ import { IFormFieldProps } from '../../components/formField/types';
6
+ import { IInputStyles } from '../../components/input/types';
7
+ import { ILoginViewStyles, ILoginViewTexts } from '../../components/login/types';
8
+ import { IUserProfile } from '../../types';
9
+ import { IAddToCartSuccess } from '../tickets/types';
10
+ export interface ITokens {
11
+ accessToken: string;
12
+ refreshToken: string;
13
+ }
14
+ export interface IOnCheckoutSuccess {
15
+ id: string;
16
+ hash: string;
17
+ total: string;
18
+ status: string;
19
+ }
20
+ export interface IBillingInfoProps {
21
+ cartProps: IAddToCartSuccess;
22
+ onRegisterSuccess?: (tokens: ITokens) => void;
23
+ onRegisterFail?: (error: string) => void;
24
+ onCheckoutSuccess: (data: IOnCheckoutSuccess) => void;
25
+ onCheckoutFail?: (error: string) => void;
26
+ onLoginSuccess: (data: any) => void;
27
+ onLoginFail?: (error: string) => void;
28
+ onFetchUserProfileSuccess?: (data: any) => void;
29
+ onFetchUserProfileFail?: (error: any) => void;
30
+ onFetchCartError?: (error: string) => void;
31
+ styles?: IBillingInfoViewStyles;
32
+ texts?: IBillingInfoViewTexts;
33
+ customCheckboxText?: StyleProp<TextStyle>;
34
+ privacyPolicyLinkStyle?: StyleProp<TextStyle>;
35
+ }
36
+ export interface ITicketHolderField {
37
+ firstName: string;
38
+ lastName: string;
39
+ email: string;
40
+ phone: string;
41
+ }
42
+ export interface IBillingInfoFormData {
43
+ firstName: string;
44
+ lastName: string;
45
+ email: string;
46
+ confirmEmail: string;
47
+ password: string;
48
+ confirmPassword: string;
49
+ phone: string;
50
+ street: string;
51
+ city: string;
52
+ country?: IDropdownItem;
53
+ state?: IDropdownItem;
54
+ zipCode: string;
55
+ isSubToNewsletter: boolean;
56
+ isSubToMarketing: boolean;
57
+ ticketHoldersFields: ITicketHolderField[];
58
+ birthday?: Date;
59
+ errors: {
60
+ firstName: string;
61
+ lastName: string;
62
+ email: string;
63
+ confirmEmail: string;
64
+ password: string;
65
+ confirmPassword: string;
66
+ phone: string;
67
+ street: string;
68
+ city: string;
69
+ zipCode: string;
70
+ };
71
+ }
72
+ export interface IBillingInfoViewStyles {
73
+ loginStyles?: ILoginViewStyles;
74
+ loginButton?: IButtonStyles;
75
+ inputStyles?: IInputStyles;
76
+ dropdownStyles?: IDropdownStyles;
77
+ checkboxStyles?: ICheckboxStyles;
78
+ titles?: StyleProp<TextStyle>;
79
+ headers?: StyleProp<TextStyle>;
80
+ texts?: StyleProp<TextStyle>;
81
+ }
82
+ export interface IBillingInfoViewTexts {
83
+ loginTexts?: ILoginViewTexts;
84
+ loginButton?: string;
85
+ checkoutButton?: string;
86
+ }
87
+ export interface IBillingInfoViewProps {
88
+ formFields: IFormFieldProps[];
89
+ isLoading: boolean;
90
+ onSubmit: () => void;
91
+ onLoginSuccessful: (userProfile: IUserProfile, accessToken: string) => void;
92
+ onLoginFail?: (error: string) => void;
93
+ isDataValid: boolean;
94
+ isLoginDialogVisible: boolean;
95
+ showLoginDialog: () => void;
96
+ hideLoginDialog: () => void;
97
+ loginMessage?: string;
98
+ userProfile?: IUserProfile;
99
+ isSubmitLoading?: boolean;
100
+ onLogoutSuccess?: () => void;
101
+ styles?: IBillingInfoViewStyles;
102
+ texts?: IBillingInfoViewTexts;
103
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/containers/billingInfo/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { ICheckoutProps } from './types';
2
+ declare const Checkout: ({ eventId, hash, onFetchOrderReviewFail, onFetchOrderReviewSuccess, onFetchEventConditionsFail, onFetchEventConditionsSuccess, onCheckoutCompletedFail, onCheckoutCompletedSuccess, onPaymentError, onPaymentSuccess, onStripeInitializeError, }: ICheckoutProps) => JSX.Element;
3
+ export default Checkout;
@@ -0,0 +1,162 @@
1
+ import { initStripe, useConfirmPayment, } from '@stripe/stripe-react-native';
2
+ import _every from 'lodash/every';
3
+ import _forEach from 'lodash/forEach';
4
+ import _map from 'lodash/map';
5
+ import _mapKeys from 'lodash/mapKeys';
6
+ import React, { useEffect, useState } from 'react';
7
+ import { Alert } from 'react-native';
8
+ import { fetchEventConditions, fetchOrderReview, postOnPaymentSuccess, } from '../../api/ApiClient';
9
+ import { priceWithCurrency } from '../../helpers/StringsHelper';
10
+ import { orderReviewItems } from './CheckoutData';
11
+ import CheckoutView from './CheckoutView';
12
+ const Checkout = ({ eventId, hash, onFetchOrderReviewFail, onFetchOrderReviewSuccess, onFetchEventConditionsFail, onFetchEventConditionsSuccess, onCheckoutCompletedFail, onCheckoutCompletedSuccess, onPaymentError, onPaymentSuccess, onStripeInitializeError, }) => {
13
+ const { confirmPayment, loading } = useConfirmPayment();
14
+ const [isLoading, setIsLoading] = useState(true);
15
+ const [orderReview, setOrderReview] = useState();
16
+ const [conditionsTexts, setConditionsTexts] = useState([]);
17
+ const [conditionsValues, setConditionsValues] = useState([]);
18
+ const [orderInfo, setOrderInfo] = useState(orderReviewItems);
19
+ const [paymentInfo, setPaymentInfo] = useState();
20
+ const [isStripeReady, setIsStripeReady] = useState(false);
21
+ //#region Handlers
22
+ const handleOnChangePaymentInfo = (details) => {
23
+ console.log('handleOnChangePaymentInfo', details);
24
+ setPaymentInfo(details);
25
+ };
26
+ const handleOnCheckCondition = (index) => {
27
+ const tConditionsValues = [...conditionsValues];
28
+ tConditionsValues[index] = !conditionsValues[index];
29
+ setConditionsValues(tConditionsValues);
30
+ };
31
+ const handleOnPressPay = async () => {
32
+ if (!orderReview || !paymentInfo) {
33
+ return;
34
+ }
35
+ const { addressData } = orderReview;
36
+ const { error: confirmPaymentError, paymentIntent } = await confirmPayment(orderReview.paymentData.stripeClientSecret, {
37
+ type: 'Card',
38
+ billingDetails: {
39
+ addressCity: addressData.city,
40
+ addressLine1: addressData.line1,
41
+ addressState: addressData.state,
42
+ addressPostalCode: addressData.postalCode,
43
+ name: `${orderReview.billingData.firstName} ${orderReview.billingData.lastName}`,
44
+ },
45
+ });
46
+ console.log('Payment intent - Data', paymentIntent);
47
+ console.log('Payment intent - Error', confirmPaymentError);
48
+ if (confirmPaymentError || !paymentInfo) {
49
+ if (onCheckoutCompletedFail) {
50
+ onCheckoutCompletedFail((confirmPaymentError === null || confirmPaymentError === void 0 ? void 0 : confirmPaymentError.message) || 'Missing Payment Info');
51
+ }
52
+ return Alert.alert('', 'Missing Payment Info');
53
+ }
54
+ if (onCheckoutCompletedSuccess) {
55
+ onCheckoutCompletedSuccess(paymentIntent);
56
+ }
57
+ const { data: onPaymentSuccessData, error: onPaymentSuccessError } = await postOnPaymentSuccess(hash);
58
+ if (onPaymentSuccessError) {
59
+ if (onPaymentError) {
60
+ onPaymentError(onPaymentSuccessError);
61
+ }
62
+ return Alert.alert('', onPaymentSuccessError);
63
+ }
64
+ if (onPaymentSuccess) {
65
+ onPaymentSuccess(onPaymentSuccessData);
66
+ }
67
+ };
68
+ //#endregion
69
+ const getConditions = () => _map(conditionsTexts, (conditionTxt, index) => {
70
+ return {
71
+ id: `condition${index}`,
72
+ fieldType: 'checkbox',
73
+ checkboxProps: {
74
+ isActive: conditionsValues[index],
75
+ text: conditionTxt,
76
+ onPress: () => handleOnCheckCondition(index),
77
+ },
78
+ };
79
+ });
80
+ //#region useEffects
81
+ useEffect(() => {
82
+ const fetchEventConditionsAsync = async () => {
83
+ const { error: conditionsError, data: conditionsData } = await fetchEventConditions(eventId.toString());
84
+ if (conditionsError) {
85
+ console.log('conditionsError', conditionsError);
86
+ Alert.alert('', conditionsError);
87
+ if (onFetchEventConditionsFail) {
88
+ onFetchEventConditionsFail(conditionsError);
89
+ }
90
+ return;
91
+ }
92
+ setConditionsValues(_map(conditionsData, () => false));
93
+ setConditionsTexts(conditionsData);
94
+ if (onFetchEventConditionsSuccess) {
95
+ onFetchEventConditionsSuccess(conditionsData);
96
+ }
97
+ };
98
+ const fetchOrderReviewAsync = async () => {
99
+ const { data: orderReviewData, error: orderReviewError } = await fetchOrderReview(hash);
100
+ console.log('orderReviewResponse - data', orderReviewData);
101
+ console.log('orderReviewResponse - error', orderReviewError);
102
+ if (orderReviewError || !orderReviewData) {
103
+ Alert.alert('', orderReviewError);
104
+ if (onFetchOrderReviewFail) {
105
+ onFetchOrderReviewFail(orderReviewError || 'Error while getting Order Review');
106
+ }
107
+ return;
108
+ }
109
+ const tOrderInfo = [...orderInfo];
110
+ const currency = orderReviewData.reviewData.currency;
111
+ _forEach(tOrderInfo, (item) => {
112
+ _mapKeys(orderReviewData.reviewData, (value, key) => {
113
+ if (item.id === key) {
114
+ if (key === 'price' || key === 'total') {
115
+ item.value = priceWithCurrency(value, currency);
116
+ }
117
+ else {
118
+ item.value = value;
119
+ }
120
+ }
121
+ });
122
+ });
123
+ setOrderInfo(tOrderInfo);
124
+ setOrderReview(orderReviewData);
125
+ console.log('Order Review Data', orderReviewData.paymentData);
126
+ if (!orderReviewData.paymentData.stripePublishableKey) {
127
+ if (onStripeInitializeError) {
128
+ onStripeInitializeError('Stripe is not configured for this event');
129
+ }
130
+ return Alert.alert('Stripe is not configured for this event', 'Please contact support.');
131
+ }
132
+ try {
133
+ await initStripe({
134
+ publishableKey: orderReviewData.paymentData.stripePublishableKey,
135
+ stripeAccountId: orderReviewData.paymentData.stripeConnectedAccount,
136
+ });
137
+ setIsStripeReady(true);
138
+ }
139
+ catch (stripeError) {
140
+ if (onStripeInitializeError) {
141
+ onStripeInitializeError('Error initializing Stripe');
142
+ }
143
+ }
144
+ };
145
+ const fetchInitialData = async () => {
146
+ setIsLoading(true);
147
+ await fetchEventConditionsAsync();
148
+ await fetchOrderReviewAsync();
149
+ setIsLoading(false);
150
+ };
151
+ fetchInitialData();
152
+ // eslint-disable-next-line react-hooks/exhaustive-deps
153
+ }, []);
154
+ //#endregion
155
+ const getIsDataValid = () => {
156
+ const paymentValid = paymentInfo === null || paymentInfo === void 0 ? void 0 : paymentInfo.complete;
157
+ return paymentValid && _every(conditionsValues, (item) => item === true);
158
+ };
159
+ return (React.createElement(CheckoutView, { orderReviewDataItems: orderInfo, onPressPay: handleOnPressPay, conditions: getConditions(), onFormComplete: handleOnChangePaymentInfo, isLoading: isLoading || loading, isDataValid: !getIsDataValid(), isStripeReady: isStripeReady }));
160
+ };
161
+ export default Checkout;
162
+ //# sourceMappingURL=Checkout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkout.js","sourceRoot":"","sources":["../../../src/containers/checkout/Checkout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,iBAAiB,GAClB,MAAM,6BAA6B,CAAA;AACpC,OAAO,MAAM,MAAM,cAAc,CAAA;AACjC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,IAAI,MAAM,YAAY,CAAA;AAC7B,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAGzC,MAAM,QAAQ,GAAG,CAAC,EAChB,OAAO,EACP,IAAI,EACJ,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,0BAA0B,EAC1B,cAAc,EACd,gBAAgB,EAChB,uBAAuB,GACR,EAAE,EAAE;IACnB,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACvD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;IAChD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,EAAgB,CAAA;IAC9D,MAAM,CAAC,eAAe,EAAE,kBA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;gBACpB,IAAI,uBAAuB,EAAE;oBAC3B,uBAAuB,CAAC,2BAA2B,CAAC,CAAA;iBACrD;aACF;QACH,CAAC,CAAA;QAED,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE;YAClC,YAAY,CAAC,IAAI,CAAC,CAAA;YAClB,MAAM,yBAAyB,EAAE,CAAA;YACjC,MAAM,qBAAqB,EAAE,CAAA;YAC7B,YAAY,CAAC,KAAK,CAAC,CAAA;QACrB,CAAC,CAAA;QAED,gBAAgB,EAAE,CAAA;QAClB,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAA;IACN,YAAY;IAEZ,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,MAAM,YAAY,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,QAAQ,CAAA;QAC1C,OAAO,YAAY,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;IAC1E,CAAC,CAAA;IAED,OAAO,CACL,oBAAC,YAAY,IACX,oBAAoB,EAAE,SAAS,EAC/B,UAAU,EAAE,gBAAgB,EAC5B,UAAU,EAAE,aAAa,EAAE,EAC3B,cAAc,EAAE,yBAAyB,EACzC,SAAS,EAAE,SAAS,IAAI,OAAO,EAC/B,WAAW,EAAE,CAAC,cAAc,EAAE,EAC9B,aAAa,EAAE,aAAa,GAC5B,CACH,CAAA;AACH,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { IOrderItem } from './types';
2
+ export declare const orderReviewItems: IOrderItem[];
@@ -0,0 +1,28 @@
1
+ export const orderReviewItems = [
2
+ {
3
+ id: 'event',
4
+ title: 'EVENT',
5
+ value: '',
6
+ },
7
+ {
8
+ id: 'price',
9
+ title: 'PRICE PER TICKET',
10
+ value: '',
11
+ },
12
+ {
13
+ id: 'ticketType',
14
+ title: 'TICKET TYPE',
15
+ value: 'First RELEASE',
16
+ },
17
+ {
18
+ id: 'total',
19
+ title: 'TOTAL',
20
+ value: '',
21
+ },
22
+ {
23
+ id: 'numberOfTickets',
24
+ title: 'NUMBER OF TICKETS',
25
+ value: '',
26
+ },
27
+ ];
28
+ //# sourceMappingURL=CheckoutData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckoutData.js","sourceRoot":"","sources":["../../../src/containers/checkout/CheckoutData.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,EAAE;KACV;IACD;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,kBAAkB;QACzB,KAAK,EAAE,EAAE;KACV;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,eAAe;KACvB;IACD;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,EAAE;KACV;IACD;QACE,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,mBAAmB;QAC1B,KAAK,EAAE,EAAE;KACV;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { ICheckoutViewProps } from './types';
2
+ declare const CheckoutView: ({ texts, styles, orderReviewDataItems, onPressPay, conditions, onFormComplete, isDataValid, isLoading, isStripeReady, }: ICheckoutViewProps) => JSX.Element;
3
+ export default CheckoutView;
@@ -0,0 +1,34 @@
1
+ import { CardForm } from '@stripe/stripe-react-native';
2
+ import React from 'react';
3
+ import { Text, View } from 'react-native';
4
+ import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
5
+ import { Button, Loading } from '../../components';
6
+ import Conditions from './components/Conditions';
7
+ import OrderReview from './components/OrderReview';
8
+ import s from './styles';
9
+ const CheckoutView = ({ texts, styles, orderReviewDataItems, onPressPay, conditions, onFormComplete, isDataValid, isLoading, isStripeReady, }) => {
10
+ const title = (texts === null || texts === void 0 ? void 0 : texts.title) ? texts.title : 'GET YOUR TICKETS';
11
+ const subTitle = (texts === null || texts === void 0 ? void 0 : texts.subTitle) ? texts.subTitle : 'Order review';
12
+ const handleOnPressPay = () => {
13
+ onPressPay();
14
+ };
15
+ const handleOnFormComplete = (cardDetails) => {
16
+ onFormComplete(cardDetails);
17
+ };
18
+ console.log('Is stripe Ready', isStripeReady);
19
+ return (React.createElement(KeyboardAwareScrollView, { extraScrollHeight: 32 },
20
+ React.createElement(View, null,
21
+ React.createElement(View, null,
22
+ React.createElement(Text, { style: [s.title] }, title),
23
+ React.createElement(Text, null, subTitle)),
24
+ React.createElement(OrderReview, { orderItems: orderReviewDataItems }),
25
+ React.createElement(Text, null, "Please provide your payment information"),
26
+ isStripeReady && (React.createElement(CardForm, { onFormComplete: handleOnFormComplete, style: s.card })),
27
+ React.createElement(Conditions, { ...conditions }),
28
+ React.createElement(Button, { text: 'PAY', onPress: handleOnPressPay, isDisabled: isDataValid, styles: {
29
+ container: s.payButton,
30
+ } })),
31
+ isLoading && React.createElement(Loading, null)));
32
+ };
33
+ export default CheckoutView;
34
+ //# sourceMappingURL=CheckoutView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckoutView.js","sourceRoot":"","sources":["../../../src/containers/checkout/CheckoutView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAgB,MAAM,6BAA6B,CAAA;AACpE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAA;AAEjF,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,UAAU,MAAM,yBAAyB,CAAA;AAChD,OAAO,WAAW,MAAM,0BAA0B,CAAA;AAClD,OAAO,CAAC,MAAM,UAAU,CAAA;AAGxB,MAAM,YAAY,GAAG,CAAC,EAC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,EAAE,CAAC,CAAC,SAAS;iBACvB,GACD,CACG;QACN,SAAS,IAAI,oBAAC,OAAO,OAAG,CACD,CAC3B,CAAA;AACH,CAAC,CAAA;AAED,eAAe,YAAY,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { IFormFieldProps } from '../../../components/formField/types';
2
+ declare const Conditions: (props: IFormFieldProps[]) => JSX.Element;
3
+ export default Conditions;
@@ -0,0 +1,11 @@
1
+ import _map from 'lodash/map';
2
+ import React from 'react';
3
+ import { View } from 'react-native';
4
+ import { Checkbox } from '../../../components';
5
+ import { ConditionsStyles as s } from './styles';
6
+ const ConditionItem = ({ id, checkboxProps }) => (React.createElement(Checkbox, { key: id, text: checkboxProps.text, isActive: checkboxProps.isActive, onPress: () => checkboxProps.onPress(id) }));
7
+ const Conditions = (props) => {
8
+ return React.createElement(View, { style: s.rootContainer }, _map(props, ConditionItem));
9
+ };
10
+ export default Conditions;
11
+ //# sourceMappingURL=Conditions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Conditions.js","sourceRoot":"","sources":["../../../../src/containers/checkout/components/Conditions.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,YAAY,CAAA;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,OAAO,EAAE,gBAAgB,IAAI,CAAC,EAAE,MAAM,UAAU,CAAA;AAEhD,MAAM,aAAa,GAAG,CAAC,EAAE,EAAE,EAAE,aAAa,EAAmB,EAAE,EAAE,CAAC,CAChE,oBAAC,QAAQ,IACP,GAAG,EAAE,EAAE,EACP,IAAI,EAAE,aAAc,CAAC,IAAI,EACzB,QAAQ,EAAE,aAAc,CAAC,QAAQ,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAc,CAAC,OAAO,CAAC,EAAG,CAAC,GAC1C,CACH,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,KAAwB,EAAE,EAAE;IAC9C,OAAO,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,aAAa,IAAG,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,CAAQ,CAAA;AAC1E,CAAC,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { IOrderReviewProps } from '../types';
2
+ declare const OrderReview: ({ orderItems }: IOrderReviewProps) => JSX.Element;
3
+ export default OrderReview;
@@ -0,0 +1,10 @@
1
+ import _map from 'lodash/map';
2
+ import React from 'react';
3
+ import { Text, View } from 'react-native';
4
+ import { OrderReviewStyles as s } from './styles';
5
+ const OrderItem = ({ title, value }) => (React.createElement(View, { style: s.orderItemContainer, key: `orderReview.${title}` },
6
+ React.createElement(Text, { style: s.orderItemTitle }, title),
7
+ React.createElement(Text, { style: s.orderItemValue, allowFontScaling: true }, value)));
8
+ const OrderReview = ({ orderItems }) => (React.createElement(View, { style: s.rootContainer }, _map(orderItems, OrderItem)));
9
+ export default OrderReview;
10
+ //# sourceMappingURL=OrderReview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderReview.js","sourceRoot":"","sources":["../../../../src/containers/checkout/components/OrderReview.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,YAAY,CAAA;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAGzC,OAAO,EAAE,iBAAiB,IAAI,CAAC,EAAE,MAAM,UAAU,CAAA;AAEjD,MAAM,SAAS,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAc,EAAE,EAAE,CAAC,CAClD,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,kBAAkB,EAAE,GAAG,EAAE,eAAe,KAAK,EAAE;IAC5D,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,cAAc,IAAG,KAAK,CAAQ;IAC7C,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,cAAc,EAAE,gBAAgB,EAAE,IAAI,IAClD,KAAK,CACD,CACF,CACR,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,EAAE,UAAU,EAAqB,EAAE,EAAE,CAAC,CACzD,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,aAAa,IAAG,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAQ,CACnE,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -0,0 +1,25 @@
1
+ export declare const OrderReviewStyles: {
2
+ rootContainer: {
3
+ marginHorizontal: number;
4
+ marginVertical: number;
5
+ paddingVertical: number;
6
+ flex: number;
7
+ flexWrap: "wrap";
8
+ };
9
+ orderItemContainer: {
10
+ paddingVertical: number;
11
+ width: string;
12
+ };
13
+ orderItemTitle: {
14
+ fontWeight: "800";
15
+ fontSize: number;
16
+ };
17
+ orderItemValue: {
18
+ lineHeight: number;
19
+ };
20
+ };
21
+ export declare const ConditionsStyles: {
22
+ rootContainer: {
23
+ marginVertical: number;
24
+ };
25
+ };
@@ -0,0 +1,27 @@
1
+ import { StyleSheet } from 'react-native';
2
+ export const OrderReviewStyles = StyleSheet.create({
3
+ rootContainer: {
4
+ marginHorizontal: 0,
5
+ marginVertical: 24,
6
+ paddingVertical: 12,
7
+ flex: 1,
8
+ flexWrap: 'wrap',
9
+ },
10
+ orderItemContainer: {
11
+ paddingVertical: 4,
12
+ width: '50%',
13
+ },
14
+ orderItemTitle: {
15
+ fontWeight: '800',
16
+ fontSize: 16,
17
+ },
18
+ orderItemValue: {
19
+ lineHeight: 20,
20
+ },
21
+ });
22
+ export const ConditionsStyles = StyleSheet.create({
23
+ rootContainer: {
24
+ marginVertical: 16,
25
+ },
26
+ });
27
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/containers/checkout/components/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC,MAAM,CAAC;IACjD,aAAa,EAAE;QACb,gBAAgB,EAAE,CAAC;QACnB,cAAc,EAAE,EAAE;QAClB,eAAe,EAAE,EAAE;QACnB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,MAAM;KACjB;IACD,kBAAkB,EAAE;QAClB,eAAe,EAAE,CAAC;QAClB,KAAK,EAAE,KAAK;KACb;IACD,cAAc,EAAE;QACd,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,EAAE;KACb;IACD,cAAc,EAAE;QACd,UAAU,EAAE,EAAE;KACf;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC;IAChD,aAAa,EAAE;QACb,cAAc,EAAE,EAAE;KACnB;CACF,CAAC,CAAA"}