be-components 0.4.9 → 0.5.1

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 (250) hide show
  1. package/lib/commonjs/ApiOverrides/index.js +12 -3
  2. package/lib/commonjs/ApiOverrides/index.js.map +1 -1
  3. package/lib/commonjs/Checkout/api/index.js +254 -0
  4. package/lib/commonjs/Checkout/api/index.js.map +1 -0
  5. package/lib/commonjs/Checkout/components/AccountSummaryCard.js +274 -0
  6. package/lib/commonjs/Checkout/components/AccountSummaryCard.js.map +1 -0
  7. package/lib/commonjs/Checkout/components/ItemSummaryCard.js +56 -0
  8. package/lib/commonjs/Checkout/components/ItemSummaryCard.js.map +1 -0
  9. package/lib/commonjs/Checkout/components/OrderSummaryCard.js +84 -0
  10. package/lib/commonjs/Checkout/components/OrderSummaryCard.js.map +1 -0
  11. package/lib/commonjs/Checkout/index.js +590 -0
  12. package/lib/commonjs/Checkout/index.js.map +1 -0
  13. package/lib/commonjs/Components/Button.js +11 -3
  14. package/lib/commonjs/Components/Button.js.map +1 -1
  15. package/lib/commonjs/Components/Checkbox.js +6 -2
  16. package/lib/commonjs/Components/Checkbox.js.map +1 -1
  17. package/lib/commonjs/Components/Icons.js +441 -4
  18. package/lib/commonjs/Components/Icons.js.map +1 -1
  19. package/lib/commonjs/Components/Spring.js +6 -5
  20. package/lib/commonjs/Components/Spring.js.map +1 -1
  21. package/lib/commonjs/LocationTracker/LocationStatus.js +95 -0
  22. package/lib/commonjs/LocationTracker/LocationStatus.js.map +1 -0
  23. package/lib/commonjs/LocationTracker/api/index.js +124 -0
  24. package/lib/commonjs/LocationTracker/api/index.js.map +1 -0
  25. package/lib/commonjs/LocationTracker/index.js +207 -0
  26. package/lib/commonjs/LocationTracker/index.js.map +1 -0
  27. package/lib/commonjs/Observer/Observer.js +2 -0
  28. package/lib/commonjs/Observer/Observer.js.map +1 -1
  29. package/lib/commonjs/Wallet/api/index.js +621 -0
  30. package/lib/commonjs/Wallet/api/index.js.map +1 -0
  31. package/lib/commonjs/Wallet/components/ACHAdd.js +63 -0
  32. package/lib/commonjs/Wallet/components/ACHAdd.js.map +1 -0
  33. package/lib/commonjs/Wallet/components/AccountCard.js +137 -0
  34. package/lib/commonjs/Wallet/components/AccountCard.js.map +1 -0
  35. package/lib/commonjs/Wallet/components/AccountLimitManager.js +321 -0
  36. package/lib/commonjs/Wallet/components/AccountLimitManager.js.map +1 -0
  37. package/lib/commonjs/Wallet/components/AccountManager.js +202 -0
  38. package/lib/commonjs/Wallet/components/AccountManager.js.map +1 -0
  39. package/lib/commonjs/Wallet/components/AccountSnoozeManager.js +263 -0
  40. package/lib/commonjs/Wallet/components/AccountSnoozeManager.js.map +1 -0
  41. package/lib/commonjs/Wallet/components/AddressCard.js +56 -0
  42. package/lib/commonjs/Wallet/components/AddressCard.js.map +1 -0
  43. package/lib/commonjs/Wallet/components/AddressManager.js +365 -0
  44. package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -0
  45. package/lib/commonjs/Wallet/components/DepositCard.js +195 -0
  46. package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -0
  47. package/lib/commonjs/Wallet/components/LinkAccountManager.js +167 -0
  48. package/lib/commonjs/Wallet/components/LinkAccountManager.js.map +1 -0
  49. package/lib/commonjs/Wallet/components/ManageAccountCard.js +216 -0
  50. package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -0
  51. package/lib/commonjs/Wallet/components/ManualACHAdd.js +270 -0
  52. package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -0
  53. package/lib/commonjs/Wallet/components/ManualCardAdd.js +337 -0
  54. package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -0
  55. package/lib/commonjs/Wallet/components/MyBalance.js +73 -0
  56. package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -0
  57. package/lib/commonjs/Wallet/components/PayPalOrderCapture.js +68 -0
  58. package/lib/commonjs/Wallet/components/PayPalOrderCapture.js.map +1 -0
  59. package/lib/commonjs/Wallet/components/RemoveAccount.js +108 -0
  60. package/lib/commonjs/Wallet/components/RemoveAccount.js.map +1 -0
  61. package/lib/commonjs/Wallet/components/VerifyACHAccount.js +196 -0
  62. package/lib/commonjs/Wallet/components/VerifyACHAccount.js.map +1 -0
  63. package/lib/commonjs/Wallet/components/WalletSetup.js +316 -0
  64. package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -0
  65. package/lib/commonjs/Wallet/components/WithdrawCard.js +336 -0
  66. package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -0
  67. package/lib/commonjs/Wallet/index.js +221 -0
  68. package/lib/commonjs/Wallet/index.js.map +1 -0
  69. package/lib/commonjs/constants/colors.js +3 -0
  70. package/lib/commonjs/constants/colors.js.map +1 -1
  71. package/lib/commonjs/index.js +21 -0
  72. package/lib/commonjs/index.js.map +1 -1
  73. package/lib/module/ApiOverrides/index.js +12 -3
  74. package/lib/module/ApiOverrides/index.js.map +1 -1
  75. package/lib/module/Checkout/api/index.js +248 -0
  76. package/lib/module/Checkout/api/index.js.map +1 -0
  77. package/lib/module/Checkout/components/AccountSummaryCard.js +267 -0
  78. package/lib/module/Checkout/components/AccountSummaryCard.js.map +1 -0
  79. package/lib/module/Checkout/components/ItemSummaryCard.js +49 -0
  80. package/lib/module/Checkout/components/ItemSummaryCard.js.map +1 -0
  81. package/lib/module/Checkout/components/OrderSummaryCard.js +77 -0
  82. package/lib/module/Checkout/components/OrderSummaryCard.js.map +1 -0
  83. package/lib/module/Checkout/index.js +581 -0
  84. package/lib/module/Checkout/index.js.map +1 -0
  85. package/lib/module/Components/Button.js +11 -3
  86. package/lib/module/Components/Button.js.map +1 -1
  87. package/lib/module/Components/Checkbox.js +6 -2
  88. package/lib/module/Components/Checkbox.js.map +1 -1
  89. package/lib/module/Components/Icons.js +441 -4
  90. package/lib/module/Components/Icons.js.map +1 -1
  91. package/lib/module/Components/Spring.js +6 -5
  92. package/lib/module/Components/Spring.js.map +1 -1
  93. package/lib/module/LocationTracker/LocationStatus.js +88 -0
  94. package/lib/module/LocationTracker/LocationStatus.js.map +1 -0
  95. package/lib/module/LocationTracker/api/index.js +118 -0
  96. package/lib/module/LocationTracker/api/index.js.map +1 -0
  97. package/lib/module/LocationTracker/index.js +200 -0
  98. package/lib/module/LocationTracker/index.js.map +1 -0
  99. package/lib/module/Observer/Observer.js +2 -0
  100. package/lib/module/Observer/Observer.js.map +1 -1
  101. package/lib/module/Wallet/api/index.js +615 -0
  102. package/lib/module/Wallet/api/index.js.map +1 -0
  103. package/lib/module/Wallet/components/ACHAdd.js +56 -0
  104. package/lib/module/Wallet/components/ACHAdd.js.map +1 -0
  105. package/lib/module/Wallet/components/AccountCard.js +130 -0
  106. package/lib/module/Wallet/components/AccountCard.js.map +1 -0
  107. package/lib/module/Wallet/components/AccountLimitManager.js +312 -0
  108. package/lib/module/Wallet/components/AccountLimitManager.js.map +1 -0
  109. package/lib/module/Wallet/components/AccountManager.js +195 -0
  110. package/lib/module/Wallet/components/AccountManager.js.map +1 -0
  111. package/lib/module/Wallet/components/AccountSnoozeManager.js +254 -0
  112. package/lib/module/Wallet/components/AccountSnoozeManager.js.map +1 -0
  113. package/lib/module/Wallet/components/AddressCard.js +49 -0
  114. package/lib/module/Wallet/components/AddressCard.js.map +1 -0
  115. package/lib/module/Wallet/components/AddressManager.js +356 -0
  116. package/lib/module/Wallet/components/AddressManager.js.map +1 -0
  117. package/lib/module/Wallet/components/DepositCard.js +186 -0
  118. package/lib/module/Wallet/components/DepositCard.js.map +1 -0
  119. package/lib/module/Wallet/components/LinkAccountManager.js +158 -0
  120. package/lib/module/Wallet/components/LinkAccountManager.js.map +1 -0
  121. package/lib/module/Wallet/components/ManageAccountCard.js +207 -0
  122. package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -0
  123. package/lib/module/Wallet/components/ManualACHAdd.js +261 -0
  124. package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -0
  125. package/lib/module/Wallet/components/ManualCardAdd.js +328 -0
  126. package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -0
  127. package/lib/module/Wallet/components/MyBalance.js +66 -0
  128. package/lib/module/Wallet/components/MyBalance.js.map +1 -0
  129. package/lib/module/Wallet/components/PayPalOrderCapture.js +61 -0
  130. package/lib/module/Wallet/components/PayPalOrderCapture.js.map +1 -0
  131. package/lib/module/Wallet/components/RemoveAccount.js +100 -0
  132. package/lib/module/Wallet/components/RemoveAccount.js.map +1 -0
  133. package/lib/module/Wallet/components/VerifyACHAccount.js +187 -0
  134. package/lib/module/Wallet/components/VerifyACHAccount.js.map +1 -0
  135. package/lib/module/Wallet/components/WalletSetup.js +307 -0
  136. package/lib/module/Wallet/components/WalletSetup.js.map +1 -0
  137. package/lib/module/Wallet/components/WithdrawCard.js +327 -0
  138. package/lib/module/Wallet/components/WithdrawCard.js.map +1 -0
  139. package/lib/module/Wallet/index.js +212 -0
  140. package/lib/module/Wallet/index.js.map +1 -0
  141. package/lib/module/constants/colors.js +3 -0
  142. package/lib/module/constants/colors.js.map +1 -1
  143. package/lib/module/index.js +4 -1
  144. package/lib/module/index.js.map +1 -1
  145. package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
  146. package/lib/typescript/src/Checkout/api/index.d.ts +49 -0
  147. package/lib/typescript/src/Checkout/api/index.d.ts.map +1 -0
  148. package/lib/typescript/src/Checkout/components/AccountSummaryCard.d.ts +18 -0
  149. package/lib/typescript/src/Checkout/components/AccountSummaryCard.d.ts.map +1 -0
  150. package/lib/typescript/src/Checkout/components/ItemSummaryCard.d.ts +8 -0
  151. package/lib/typescript/src/Checkout/components/ItemSummaryCard.d.ts.map +1 -0
  152. package/lib/typescript/src/Checkout/components/OrderSummaryCard.d.ts +8 -0
  153. package/lib/typescript/src/Checkout/components/OrderSummaryCard.d.ts.map +1 -0
  154. package/lib/typescript/src/Checkout/index.d.ts +12 -0
  155. package/lib/typescript/src/Checkout/index.d.ts.map +1 -0
  156. package/lib/typescript/src/Components/Button.d.ts.map +1 -1
  157. package/lib/typescript/src/Components/Checkbox.d.ts +3 -1
  158. package/lib/typescript/src/Components/Checkbox.d.ts.map +1 -1
  159. package/lib/typescript/src/Components/Icons.d.ts +8 -1
  160. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  161. package/lib/typescript/src/Components/Spring.d.ts.map +1 -1
  162. package/lib/typescript/src/LocationTracker/LocationStatus.d.ts +21 -0
  163. package/lib/typescript/src/LocationTracker/LocationStatus.d.ts.map +1 -0
  164. package/lib/typescript/src/LocationTracker/api/index.d.ts +19 -0
  165. package/lib/typescript/src/LocationTracker/api/index.d.ts.map +1 -0
  166. package/lib/typescript/src/LocationTracker/index.d.ts +22 -0
  167. package/lib/typescript/src/LocationTracker/index.d.ts.map +1 -0
  168. package/lib/typescript/src/Observer/Observer.d.ts.map +1 -1
  169. package/lib/typescript/src/Wallet/api/index.d.ts +94 -0
  170. package/lib/typescript/src/Wallet/api/index.d.ts.map +1 -0
  171. package/lib/typescript/src/Wallet/components/ACHAdd.d.ts +13 -0
  172. package/lib/typescript/src/Wallet/components/ACHAdd.d.ts.map +1 -0
  173. package/lib/typescript/src/Wallet/components/AccountCard.d.ts +10 -0
  174. package/lib/typescript/src/Wallet/components/AccountCard.d.ts.map +1 -0
  175. package/lib/typescript/src/Wallet/components/AccountLimitManager.d.ts +10 -0
  176. package/lib/typescript/src/Wallet/components/AccountLimitManager.d.ts.map +1 -0
  177. package/lib/typescript/src/Wallet/components/AccountManager.d.ts +13 -0
  178. package/lib/typescript/src/Wallet/components/AccountManager.d.ts.map +1 -0
  179. package/lib/typescript/src/Wallet/components/AccountSnoozeManager.d.ts +10 -0
  180. package/lib/typescript/src/Wallet/components/AccountSnoozeManager.d.ts.map +1 -0
  181. package/lib/typescript/src/Wallet/components/AddressCard.d.ts +10 -0
  182. package/lib/typescript/src/Wallet/components/AddressCard.d.ts.map +1 -0
  183. package/lib/typescript/src/Wallet/components/AddressManager.d.ts +23 -0
  184. package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -0
  185. package/lib/typescript/src/Wallet/components/DepositCard.d.ts +14 -0
  186. package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -0
  187. package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts +10 -0
  188. package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts.map +1 -0
  189. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts +17 -0
  190. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -0
  191. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts +11 -0
  192. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -0
  193. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts +11 -0
  194. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -0
  195. package/lib/typescript/src/Wallet/components/MyBalance.d.ts +14 -0
  196. package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -0
  197. package/lib/typescript/src/Wallet/components/PayPalOrderCapture.d.ts +16 -0
  198. package/lib/typescript/src/Wallet/components/PayPalOrderCapture.d.ts.map +1 -0
  199. package/lib/typescript/src/Wallet/components/RemoveAccount.d.ts +10 -0
  200. package/lib/typescript/src/Wallet/components/RemoveAccount.d.ts.map +1 -0
  201. package/lib/typescript/src/Wallet/components/VerifyACHAccount.d.ts +10 -0
  202. package/lib/typescript/src/Wallet/components/VerifyACHAccount.d.ts.map +1 -0
  203. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts +11 -0
  204. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -0
  205. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts +16 -0
  206. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -0
  207. package/lib/typescript/src/Wallet/index.d.ts +10 -0
  208. package/lib/typescript/src/Wallet/index.d.ts.map +1 -0
  209. package/lib/typescript/src/constants/colors.d.ts +3 -0
  210. package/lib/typescript/src/constants/colors.d.ts.map +1 -1
  211. package/lib/typescript/src/index.d.ts +4 -1
  212. package/lib/typescript/src/index.d.ts.map +1 -1
  213. package/package.json +4 -1
  214. package/src/ApiOverrides/index.ts +13 -3
  215. package/src/Checkout/api/index.tsx +199 -0
  216. package/src/Checkout/components/AccountSummaryCard.tsx +169 -0
  217. package/src/Checkout/components/ItemSummaryCard.tsx +34 -0
  218. package/src/Checkout/components/OrderSummaryCard.tsx +40 -0
  219. package/src/Checkout/index.tsx +398 -0
  220. package/src/Components/Button.tsx +5 -4
  221. package/src/Components/Checkbox.tsx +5 -2
  222. package/src/Components/Icons.tsx +196 -3
  223. package/src/Components/Spring.tsx +4 -3
  224. package/src/LocationTracker/LocationStatus.tsx +96 -0
  225. package/src/LocationTracker/api/index.tsx +114 -0
  226. package/src/LocationTracker/index.tsx +130 -0
  227. package/src/Observer/Observer.tsx +2 -1
  228. package/src/Wallet/api/index.ts +461 -0
  229. package/src/Wallet/components/ACHAdd.tsx +49 -0
  230. package/src/Wallet/components/AccountCard.tsx +92 -0
  231. package/src/Wallet/components/AccountLimitManager.tsx +212 -0
  232. package/src/Wallet/components/AccountManager.tsx +103 -0
  233. package/src/Wallet/components/AccountSnoozeManager.tsx +153 -0
  234. package/src/Wallet/components/AddressCard.tsx +31 -0
  235. package/src/Wallet/components/AddressManager.tsx +203 -0
  236. package/src/Wallet/components/DepositCard.tsx +107 -0
  237. package/src/Wallet/components/LinkAccountManager.tsx +119 -0
  238. package/src/Wallet/components/ManageAccountCard.tsx +146 -0
  239. package/src/Wallet/components/ManualACHAdd.tsx +164 -0
  240. package/src/Wallet/components/ManualCardAdd.tsx +185 -0
  241. package/src/Wallet/components/MyBalance.tsx +64 -0
  242. package/src/Wallet/components/PayPalOrderCapture.tsx +59 -0
  243. package/src/Wallet/components/RemoveAccount.tsx +68 -0
  244. package/src/Wallet/components/VerifyACHAccount.tsx +140 -0
  245. package/src/Wallet/components/WalletSetup.tsx +197 -0
  246. package/src/Wallet/components/WithdrawCard.tsx +145 -0
  247. package/src/Wallet/index.tsx +229 -0
  248. package/src/constants/colors.ts +3 -0
  249. package/src/index.tsx +7 -2
  250. package/src/types.d.ts +296 -1
@@ -0,0 +1,77 @@
1
+ import React from 'react';
2
+ import { View } from "react-native";
3
+ import Colors from '../../constants/colors';
4
+ import { Text } from '../../Components';
5
+ const OrderSummaryCard = ({
6
+ item_order
7
+ }) => {
8
+ return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
9
+ style: {
10
+ flexDirection: 'row',
11
+ padding: 5,
12
+ paddingRight: 10,
13
+ paddingLeft: 10
14
+ }
15
+ }, /*#__PURE__*/React.createElement(Text, {
16
+ style: {
17
+ flex: 1
18
+ },
19
+ size: 14,
20
+ color: Colors.brand.midnight
21
+ }, "Subtotal"), /*#__PURE__*/React.createElement(Text, {
22
+ size: 14,
23
+ color: Colors.brand.midnight
24
+ }, "$", item_order.amount)), item_order.fee_1 ? /*#__PURE__*/React.createElement(View, {
25
+ style: {
26
+ flexDirection: 'row',
27
+ padding: 5,
28
+ paddingRight: 10,
29
+ paddingLeft: 10
30
+ }
31
+ }, /*#__PURE__*/React.createElement(Text, {
32
+ style: {
33
+ flex: 1
34
+ },
35
+ size: 14,
36
+ color: Colors.brand.midnight
37
+ }, item_order.fee_1), /*#__PURE__*/React.createElement(Text, {
38
+ size: 14,
39
+ color: Colors.brand.midnight
40
+ }, "$", item_order.fee_1_amount)) : /*#__PURE__*/React.createElement(React.Fragment, null), item_order.fee_2 ? /*#__PURE__*/React.createElement(View, {
41
+ style: {
42
+ flexDirection: 'row',
43
+ padding: 5,
44
+ paddingRight: 10,
45
+ paddingLeft: 10
46
+ }
47
+ }, /*#__PURE__*/React.createElement(Text, {
48
+ style: {
49
+ flex: 1
50
+ },
51
+ size: 14,
52
+ color: Colors.brand.midnight
53
+ }, item_order.fee_2), /*#__PURE__*/React.createElement(Text, {
54
+ size: 14,
55
+ color: Colors.brand.midnight
56
+ }, "$", item_order.fee_2_amount)) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
57
+ style: {
58
+ flexDirection: 'row',
59
+ padding: 5,
60
+ paddingRight: 10,
61
+ paddingLeft: 10
62
+ }
63
+ }, /*#__PURE__*/React.createElement(Text, {
64
+ style: {
65
+ flex: 1
66
+ },
67
+ size: 14,
68
+ color: Colors.brand.midnight,
69
+ weight: "bold"
70
+ }, "Total"), /*#__PURE__*/React.createElement(Text, {
71
+ size: 14,
72
+ color: Colors.brand.midnight,
73
+ weight: "bold"
74
+ }, "$", item_order.total_amount)));
75
+ };
76
+ export default OrderSummaryCard;
77
+ //# sourceMappingURL=OrderSummaryCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","Colors","Text","OrderSummaryCard","item_order","createElement","style","flexDirection","padding","paddingRight","paddingLeft","flex","size","color","brand","midnight","amount","fee_1","fee_1_amount","Fragment","fee_2","fee_2_amount","weight","total_amount"],"sourceRoot":"../../../../src","sources":["Checkout/components/OrderSummaryCard.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,SAASC,IAAI,QAAQ,kBAAkB;AAOvC,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC;AAAiC,CAAC,KAAK;EAE/D,oBACIL,KAAA,CAAAM,aAAA,CAACL,IAAI,qBACDD,KAAA,CAAAM,aAAA,CAACL,IAAI;IAACM,KAAK,EAAE;MAAEC,aAAa,EAAC,KAAK;MAAEC,OAAO,EAAC,CAAC;MAAEC,YAAY,EAAC,EAAE;MAAEC,WAAW,EAAC;IAAG;EAAE,gBAC7EX,KAAA,CAAAM,aAAA,CAACH,IAAI;IAACI,KAAK,EAAE;MAAEK,IAAI,EAAC;IAAE,CAAE;IAACC,IAAI,EAAE,EAAG;IAACC,KAAK,EAAEZ,MAAM,CAACa,KAAK,CAACC;EAAS,GAAC,UAAc,CAAC,eAChFhB,KAAA,CAAAM,aAAA,CAACH,IAAI;IAACU,IAAI,EAAE,EAAG;IAACC,KAAK,EAAEZ,MAAM,CAACa,KAAK,CAACC;EAAS,GAAC,GAAC,EAACX,UAAU,CAACY,MAAa,CACtE,CAAC,EACNZ,UAAU,CAACa,KAAK,gBACjBlB,KAAA,CAAAM,aAAA,CAACL,IAAI;IAACM,KAAK,EAAE;MAAEC,aAAa,EAAC,KAAK;MAAEC,OAAO,EAAC,CAAC;MAAEC,YAAY,EAAC,EAAE;MAAEC,WAAW,EAAC;IAAG;EAAE,gBAC7EX,KAAA,CAAAM,aAAA,CAACH,IAAI;IAACI,KAAK,EAAE;MAAEK,IAAI,EAAC;IAAE,CAAE;IAACC,IAAI,EAAE,EAAG;IAACC,KAAK,EAAEZ,MAAM,CAACa,KAAK,CAACC;EAAS,GAAEX,UAAU,CAACa,KAAY,CAAC,eAC1FlB,KAAA,CAAAM,aAAA,CAACH,IAAI;IAACU,IAAI,EAAE,EAAG;IAACC,KAAK,EAAEZ,MAAM,CAACa,KAAK,CAACC;EAAS,GAAC,GAAC,EAACX,UAAU,CAACc,YAAmB,CAC5E,CAAC,gBACNnB,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAoB,QAAA,MAAI,CAAC,EACLf,UAAU,CAACgB,KAAK,gBACjBrB,KAAA,CAAAM,aAAA,CAACL,IAAI;IAACM,KAAK,EAAE;MAAEC,aAAa,EAAC,KAAK;MAAEC,OAAO,EAAC,CAAC;MAAEC,YAAY,EAAC,EAAE;MAAEC,WAAW,EAAC;IAAG;EAAE,gBAC7EX,KAAA,CAAAM,aAAA,CAACH,IAAI;IAACI,KAAK,EAAE;MAAEK,IAAI,EAAC;IAAE,CAAE;IAACC,IAAI,EAAE,EAAG;IAACC,KAAK,EAAEZ,MAAM,CAACa,KAAK,CAACC;EAAS,GAAEX,UAAU,CAACgB,KAAY,CAAC,eAC1FrB,KAAA,CAAAM,aAAA,CAACH,IAAI;IAACU,IAAI,EAAE,EAAG;IAACC,KAAK,EAAEZ,MAAM,CAACa,KAAK,CAACC;EAAS,GAAC,GAAC,EAACX,UAAU,CAACiB,YAAmB,CAC5E,CAAC,gBACNtB,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAoB,QAAA,MAAI,CAAC,eACNpB,KAAA,CAAAM,aAAA,CAACL,IAAI;IAACM,KAAK,EAAE;MAAEC,aAAa,EAAC,KAAK;MAAEC,OAAO,EAAC,CAAC;MAAEC,YAAY,EAAC,EAAE;MAAEC,WAAW,EAAC;IAAG;EAAE,gBAC7EX,KAAA,CAAAM,aAAA,CAACH,IAAI;IAACI,KAAK,EAAE;MAAEK,IAAI,EAAC;IAAE,CAAE;IAACC,IAAI,EAAE,EAAG;IAACC,KAAK,EAAEZ,MAAM,CAACa,KAAK,CAACC,QAAS;IAACO,MAAM,EAAC;EAAM,GAAC,OAAW,CAAC,eAC3FvB,KAAA,CAAAM,aAAA,CAACH,IAAI;IAACU,IAAI,EAAE,EAAG;IAACC,KAAK,EAAEZ,MAAM,CAACa,KAAK,CAACC,QAAS;IAACO,MAAM,EAAC;EAAM,GAAC,GAAC,EAAClB,UAAU,CAACmB,YAAmB,CAC1F,CACJ,CAAC;AAEf,CAAC;AAED,eAAepB,gBAAgB","ignoreList":[]}
@@ -0,0 +1,581 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { View, StyleSheet, Linking } from "react-native";
3
+ import { Button, Icons, Text } from '../Components';
4
+ import { CheckoutApi, CheckoutHelpers } from './api';
5
+ import ItemSummaryCard from './components/ItemSummaryCard';
6
+ import OrderSummaryCard from './components/OrderSummaryCard';
7
+ import AccountSummaryCard from './components/AccountSummaryCard';
8
+ import Colors from '../constants/colors';
9
+ import AddressManager from '../Wallet/components/AddressManager';
10
+ import { PayPalScriptProvider } from '@paypal/react-paypal-js';
11
+ import PayPalOrderCapture from '../Wallet/components/PayPalOrderCapture';
12
+ import SpringView from '../Components/Spring';
13
+ import { usePlayerLocation } from '../LocationTracker/LocationStatus';
14
+ import LocationTracker from '../LocationTracker';
15
+ import { view_styles } from '../constants/styles';
16
+ import { WalletApi } from '../Wallet/api';
17
+ const Checkout = ({
18
+ item_order,
19
+ account_id,
20
+ onCancel,
21
+ onCompleteOrder,
22
+ onRequestNewAccount
23
+ }) => {
24
+ const [loading, setLoading] = useState(false);
25
+ const [completing, setCompleting] = useState(false);
26
+ const [show_addresses, setShowAddresses] = useState(false);
27
+ const [cvv, setCVV] = useState();
28
+ const [show_location, setShowLocation] = useState(false);
29
+ const {
30
+ permission,
31
+ location,
32
+ getLocation,
33
+ checkPermissions
34
+ } = usePlayerLocation();
35
+ const [checkout_data, setCheckoutData] = useState({
36
+ loaded: false,
37
+ items: [],
38
+ player_addresses: [],
39
+ accounts: []
40
+ });
41
+ const [checkout, setCheckout] = useState({});
42
+ const [draft_order, setDraftOrder] = useState();
43
+ const {
44
+ player,
45
+ accounts,
46
+ items,
47
+ player_addresses,
48
+ selected_account,
49
+ billing_address
50
+ } = checkout_data;
51
+ const {
52
+ ip_item_order,
53
+ ip_transaction
54
+ } = checkout;
55
+
56
+ //const shipping_address_required = CheckoutHelpers.isShippingRequired(items);
57
+ const billing_address_required = CheckoutHelpers.isBillingAddressRequired(items, selected_account);
58
+
59
+ //const isLocationRequired = CheckoutHelpers.isLocationRequired(items);
60
+
61
+ useEffect(() => {
62
+ CheckoutApi.setEnvironment();
63
+ WalletApi.setEnvironment();
64
+ if (!item_order) {
65
+ return setDraftOrder(undefined);
66
+ }
67
+ getDetailsFromServer(item_order, account_id);
68
+ }, [item_order]);
69
+ useEffect(() => {
70
+ if (!permission.checked) {
71
+ return;
72
+ }
73
+ if (permission.permission != 'granted') {
74
+ return setShowLocation(true);
75
+ }
76
+ }, [permission]);
77
+
78
+ /**
79
+ * Get all necessary checkout data from the server
80
+ * @param item_order
81
+ * @param account_id
82
+ */
83
+ const getDetailsFromServer = async (item_order, account_id) => {
84
+ checkPermissions({
85
+ auto_on_granted: true
86
+ });
87
+ const player = await CheckoutApi.getMyDetails();
88
+ const order_items = await CheckoutApi.getItemsByIds(item_order.items.map(i => i.item_id));
89
+ const accounts = await CheckoutApi.getMyAccounts();
90
+ let eligible_accounts = CheckoutHelpers.filterMyPurchaseAccounts(accounts, order_items);
91
+ const addresses = await CheckoutApi.getMyAddresses();
92
+ let a = eligible_accounts.find(a => a.account_id == account_id);
93
+ if (!a) {
94
+ a = eligible_accounts.find(a => a.default_account);
95
+ }
96
+ let ba = addresses.find(addy => addy.player_address_id == a?.default_billing_address_id);
97
+ if (a) {
98
+ item_order = CheckoutHelpers.genItemOrder(item_order, order_items, a);
99
+ }
100
+ setDraftOrder(item_order);
101
+ setCheckoutData({
102
+ loaded: true,
103
+ player,
104
+ selected_account: a,
105
+ player_addresses: addresses,
106
+ billing_address: ba,
107
+ items: order_items,
108
+ accounts: accounts
109
+ });
110
+ };
111
+ const order_errors = !draft_order ? [] : CheckoutHelpers.isOrderValid(draft_order, items, selected_account, cvv, billing_address, undefined, location.location, location.coordinates);
112
+ const handleConfirm = async () => {
113
+ if (!draft_order || order_errors.length > 0) {
114
+ return;
115
+ }
116
+ setLoading(true);
117
+ const draft_transaction = CheckoutHelpers.genTransactionFromItemOrder(draft_order, items, selected_account?.account_id, cvv);
118
+ const resp = await CheckoutApi.createOrder({
119
+ ...draft_order,
120
+ region: location.region,
121
+ location: location.coordinates
122
+ }, {
123
+ ...draft_transaction,
124
+ billing_address_id: billing_address?.player_address_id
125
+ });
126
+ setCheckout({
127
+ ip_item_order: resp.item_order,
128
+ ip_transaction: resp.transaction
129
+ });
130
+ };
131
+ const handleCancel = async () => {
132
+ if (!ip_transaction) {
133
+ return onCancel();
134
+ }
135
+ await CheckoutApi.cancelTransaction(ip_transaction.transaction_id);
136
+ setCheckout({});
137
+ onCancel();
138
+ };
139
+ const checkTransactionStatus = async () => {
140
+ if (!ip_transaction) {
141
+ return;
142
+ }
143
+ const resp = await CheckoutApi.getTransactionById(ip_transaction.transaction_id);
144
+ setCheckout({
145
+ ...checkout,
146
+ ip_transaction: resp.transaction
147
+ });
148
+ if (resp.transaction.status == 'redirect') {
149
+ setTimeout(() => {
150
+ console.log('checking tran status');
151
+ checkTransactionStatus();
152
+ }, 2000);
153
+ }
154
+ };
155
+ const handleChangeAccount = async account => {
156
+ let new_address = player_addresses.find(pa => pa.player_address_id == account.default_billing_address_id);
157
+ setCheckoutData({
158
+ ...checkout_data,
159
+ selected_account: account,
160
+ billing_address: new_address ? new_address : billing_address
161
+ });
162
+ if (draft_order) {
163
+ let new_draft_order = CheckoutHelpers.genItemOrder(draft_order, items, account);
164
+ setDraftOrder(new_draft_order);
165
+ }
166
+ };
167
+ const handleChangeBillingAddress = async address => {
168
+ if (selected_account) {
169
+ await CheckoutApi.updateAccountDefaultAddress(selected_account.account_id, address.player_address_id);
170
+ }
171
+ setCheckoutData({
172
+ ...checkout_data,
173
+ billing_address: address,
174
+ player_addresses: player_addresses.filter(pa => pa.player_address_id != address.player_address_id).concat(address)
175
+ });
176
+ setShowAddresses(false);
177
+ };
178
+ const handleRedirect = async () => {
179
+ if (!ip_transaction?.redirect_url) {
180
+ return;
181
+ }
182
+ if (completing) {
183
+ return;
184
+ }
185
+ setCompleting(true);
186
+ Linking.openURL(ip_transaction.redirect_url);
187
+ setTimeout(() => {
188
+ console.log('checking tran status!');
189
+ checkTransactionStatus();
190
+ }, 5000);
191
+ };
192
+ if (!draft_order || !player) {
193
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
194
+ }
195
+ return /*#__PURE__*/React.createElement(View, {
196
+ style: {
197
+ flex: 1
198
+ }
199
+ }, /*#__PURE__*/React.createElement(View, {
200
+ style: {
201
+ flex: 1
202
+ }
203
+ }, /*#__PURE__*/React.createElement(View, {
204
+ nativeID: "items",
205
+ style: {
206
+ ...local_styles.section,
207
+ borderBottomWidth: 1,
208
+ borderBottomColor: Colors.shades.shade600
209
+ }
210
+ }, /*#__PURE__*/React.createElement(ItemSummaryCard, {
211
+ items: items
212
+ })), /*#__PURE__*/React.createElement(View, {
213
+ nativeID: "order_summary",
214
+ style: {
215
+ ...local_styles.section,
216
+ borderBottomWidth: 1,
217
+ borderBottomColor: Colors.shades.shade600
218
+ }
219
+ }, /*#__PURE__*/React.createElement(OrderSummaryCard, {
220
+ item_order: draft_order
221
+ })), /*#__PURE__*/React.createElement(View, {
222
+ nativeID: "account_summary",
223
+ style: {
224
+ ...local_styles.section,
225
+ borderBottomWidth: 1,
226
+ borderBottomColor: Colors.shades.shade600
227
+ }
228
+ }, /*#__PURE__*/React.createElement(AccountSummaryCard, {
229
+ accounts: accounts,
230
+ items: items,
231
+ selected_account: selected_account,
232
+ player_address: billing_address,
233
+ billing_address_required: billing_address_required,
234
+ cvv: cvv,
235
+ onRequestNewAccount: onRequestNewAccount,
236
+ onCVVChange: new_cvv => setCVV(new_cvv),
237
+ onAccountsUpdate: accts => {
238
+ setCheckoutData({
239
+ ...checkout_data,
240
+ selected_account: accts.find(a => a.account_id == selected_account?.account_id),
241
+ accounts: accounts.filter(a => !accts.find(na => na.account_id == a.account_id)).concat(accts)
242
+ });
243
+ },
244
+ onChangeAddress: () => setShowAddresses(true),
245
+ onSelectAccount: account => handleChangeAccount(account)
246
+ }))), order_errors.length > 0 ? /*#__PURE__*/React.createElement(View, {
247
+ style: {
248
+ margin: 10,
249
+ borderRadius: 4,
250
+ padding: 10,
251
+ backgroundColor: Colors.shades.white,
252
+ ...view_styles.float
253
+ }
254
+ }, /*#__PURE__*/React.createElement(Text, {
255
+ style: {
256
+ marginBottom: 5
257
+ },
258
+ size: 14,
259
+ color: Colors.brand.midnight,
260
+ weight: "semibold"
261
+ }, "Please fix the following before continuing"), order_errors.map(e => {
262
+ return /*#__PURE__*/React.createElement(Text, {
263
+ style: {
264
+ padding: 4
265
+ },
266
+ size: 12,
267
+ color: Colors.utility.warning,
268
+ weight: "bold"
269
+ }, e);
270
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(PayPalScriptProvider, {
271
+ options: {
272
+ clientId: CheckoutApi.getPayPalClientId()
273
+ }
274
+ }, /*#__PURE__*/React.createElement(View, {
275
+ style: {
276
+ padding: 20
277
+ }
278
+ }, !ip_transaction ? /*#__PURE__*/React.createElement(View, {
279
+ nativeID: "action_row",
280
+ style: {
281
+ flexDirection: 'row',
282
+ alignItems: 'center'
283
+ }
284
+ }, /*#__PURE__*/React.createElement(Button, {
285
+ style: {
286
+ flex: 1,
287
+ marginRight: 5,
288
+ opacity: loading ? 0.5 : 1
289
+ },
290
+ title: "CANCEL",
291
+ disabled: loading,
292
+ title_color: Colors.utility.error,
293
+ borderWidth: 1,
294
+ borderColor: Colors.utility.error,
295
+ padding: 15,
296
+ onPress: () => handleCancel()
297
+ }), selected_account?.account_type == 'paypal' ? /*#__PURE__*/React.createElement(PayPalOrderCapture, {
298
+ draft_item_order: draft_order,
299
+ paypal_account: selected_account,
300
+ region: location.region,
301
+ coordinates: location.coordinates,
302
+ button_height: 48,
303
+ items: items,
304
+ order_valid: order_errors.length == 0 ? true : false,
305
+ onOrderUpdate: (item_order, transaction) => setCheckout({
306
+ ip_item_order: item_order,
307
+ ip_transaction: transaction
308
+ }),
309
+ onCancel: () => console.log('DONE!')
310
+ }) : /*#__PURE__*/React.createElement(Button, {
311
+ style: {
312
+ flex: 3,
313
+ opacity: loading || order_errors.length > 0 ? 0.5 : 1
314
+ },
315
+ loading: loading || location.loading,
316
+ disabled: loading || order_errors.length > 0,
317
+ title: location.loading ? 'VERIFYING LOCATION' : 'CONFIRM & CONTINUE',
318
+ title_color: Colors.shades.white,
319
+ backgroundColor: Colors.brand.electric,
320
+ padding: 15,
321
+ onPress: () => handleConfirm()
322
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null))), show_addresses ? /*#__PURE__*/React.createElement(View, {
323
+ style: {
324
+ position: 'absolute',
325
+ top: 0,
326
+ bottom: 0,
327
+ left: 0,
328
+ right: 0,
329
+ backgroundColor: Colors.shades.black_faded,
330
+ justifyContent: 'flex-end'
331
+ }
332
+ }, /*#__PURE__*/React.createElement(SpringView, {
333
+ to: 0,
334
+ from: 500,
335
+ slide: "vertical",
336
+ style: {
337
+ backgroundColor: Colors.shades.white,
338
+ borderTopRightRadius: 40,
339
+ borderTopLeftRadius: 40
340
+ }
341
+ }, /*#__PURE__*/React.createElement(AddressManager, {
342
+ player: player,
343
+ player_addresses: player_addresses,
344
+ location: location,
345
+ onCancel: () => setShowAddresses(false),
346
+ onRemoveAddress: addy => {
347
+ let selected_addy = billing_address && billing_address.player_address_id == addy.player_address_id ? undefined : billing_address;
348
+ setCheckoutData({
349
+ ...checkout_data,
350
+ billing_address: selected_addy,
351
+ player_addresses: player_addresses.filter(pa => pa.player_address_id != addy.player_address_id)
352
+ });
353
+ },
354
+ onAddAddress: addy => handleChangeBillingAddress(addy),
355
+ onSelect: addy => handleChangeBillingAddress(addy)
356
+ }))) : /*#__PURE__*/React.createElement(React.Fragment, null), ip_item_order && ip_transaction ? /*#__PURE__*/React.createElement(View, {
357
+ style: {
358
+ position: 'absolute',
359
+ top: 0,
360
+ left: 0,
361
+ right: 0,
362
+ bottom: 0,
363
+ backgroundColor: Colors.shades.black_faded,
364
+ justifyContent: 'flex-end'
365
+ }
366
+ }, /*#__PURE__*/React.createElement(SpringView, {
367
+ slide: "vertical",
368
+ from: 500,
369
+ to: 0,
370
+ style: {
371
+ borderTopRightRadius: 40,
372
+ borderTopLeftRadius: 40,
373
+ backgroundColor: Colors.shades.white
374
+ }
375
+ }, ip_transaction.status == 'posted' ? /*#__PURE__*/React.createElement(View, {
376
+ style: {
377
+ flex: 1,
378
+ padding: 10,
379
+ paddingTop: 30,
380
+ paddingBottom: 30,
381
+ justifyContent: 'center',
382
+ alignItems: 'center'
383
+ }
384
+ }, /*#__PURE__*/React.createElement(Icons.TransactionSuccessIcon, {
385
+ size: 150
386
+ }), /*#__PURE__*/React.createElement(View, {
387
+ style: {
388
+ padding: 20,
389
+ borderRadius: 8,
390
+ borderWidth: 1,
391
+ borderColor: Colors.utility.success,
392
+ marginTop: 20
393
+ }
394
+ }, /*#__PURE__*/React.createElement(Text, {
395
+ size: 20,
396
+ color: Colors.utility.success,
397
+ weight: "bold",
398
+ textAlign: "center"
399
+ }, "Order Successful"), /*#__PURE__*/React.createElement(Text, {
400
+ style: {
401
+ marginTop: 10
402
+ },
403
+ size: 16,
404
+ color: Colors.brand.cobalt,
405
+ weight: "regular",
406
+ textAlign: "center"
407
+ }, "Your order was successfully processed. An email confirmation has been sent. Please select close below to continue."))) : ip_transaction.status == 'failed' ? /*#__PURE__*/React.createElement(View, {
408
+ style: {
409
+ flex: 1,
410
+ padding: 10,
411
+ paddingTop: 30,
412
+ paddingBottom: 30,
413
+ justifyContent: 'center',
414
+ alignItems: 'center'
415
+ }
416
+ }, /*#__PURE__*/React.createElement(Icons.TransactionErrorIcon, {
417
+ size: 150
418
+ }), /*#__PURE__*/React.createElement(View, {
419
+ style: {
420
+ padding: 20,
421
+ borderRadius: 8,
422
+ borderWidth: 1,
423
+ borderColor: Colors.utility.error,
424
+ marginTop: 20
425
+ }
426
+ }, /*#__PURE__*/React.createElement(Text, {
427
+ size: 20,
428
+ color: Colors.utility.error,
429
+ weight: "bold",
430
+ textAlign: "center"
431
+ }, "Order Failed"), /*#__PURE__*/React.createElement(Text, {
432
+ style: {
433
+ marginTop: 10
434
+ },
435
+ size: 16,
436
+ color: Colors.brand.cobalt,
437
+ weight: "regular",
438
+ textAlign: "center"
439
+ }, "Sorry, we were unable to process your order at this time. Please try again or reach out to support for help."))) : ip_transaction.status == 'cancelled' ? /*#__PURE__*/React.createElement(View, {
440
+ style: {
441
+ flex: 1,
442
+ padding: 10,
443
+ paddingTop: 30,
444
+ paddingBottom: 30,
445
+ justifyContent: 'center',
446
+ alignItems: 'center'
447
+ }
448
+ }, /*#__PURE__*/React.createElement(Icons.TransactionErrorIcon, {
449
+ size: 150
450
+ }), /*#__PURE__*/React.createElement(View, {
451
+ style: {
452
+ padding: 20,
453
+ borderRadius: 8,
454
+ borderWidth: 1,
455
+ borderColor: Colors.utility.error,
456
+ marginTop: 20
457
+ }
458
+ }, /*#__PURE__*/React.createElement(Text, {
459
+ size: 20,
460
+ color: Colors.utility.error,
461
+ weight: "bold",
462
+ textAlign: "center"
463
+ }, "Order Cancelled"), /*#__PURE__*/React.createElement(Text, {
464
+ style: {
465
+ marginTop: 10
466
+ },
467
+ size: 16,
468
+ color: Colors.brand.cobalt,
469
+ weight: "regular",
470
+ textAlign: "center"
471
+ }, "Your order was cancelled. Please try again."))) : ip_transaction.status == 'redirect' ? /*#__PURE__*/React.createElement(View, {
472
+ style: {
473
+ flex: 1,
474
+ padding: 10,
475
+ paddingTop: 30,
476
+ paddingBottom: 30,
477
+ justifyContent: 'center',
478
+ alignItems: 'center'
479
+ }
480
+ }, /*#__PURE__*/React.createElement(Icons.IBTFLowIcon, {
481
+ size: 300
482
+ }), /*#__PURE__*/React.createElement(View, {
483
+ style: {
484
+ padding: 20,
485
+ borderRadius: 8,
486
+ borderWidth: 1,
487
+ borderColor: Colors.shades.shade600,
488
+ marginTop: 20
489
+ }
490
+ }, /*#__PURE__*/React.createElement(Text, {
491
+ size: 20,
492
+ color: Colors.brand.cobalt,
493
+ weight: "bold",
494
+ textAlign: "center"
495
+ }, "Finish With Plaid"), /*#__PURE__*/React.createElement(Text, {
496
+ style: {
497
+ marginTop: 10
498
+ },
499
+ size: 16,
500
+ color: Colors.brand.cobalt,
501
+ weight: "regular",
502
+ textAlign: "center"
503
+ }, "Select Complete Order below to complete the transaction through Plaid"))) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
504
+ nativeID: "action_row",
505
+ style: {
506
+ flexDirection: 'row',
507
+ padding: 20
508
+ }
509
+ }, ip_transaction.status == 'redirect' || ip_transaction.status == 'pending' ? /*#__PURE__*/React.createElement(Button, {
510
+ style: {
511
+ flex: 1,
512
+ marginRight: 5,
513
+ opacity: 1
514
+ },
515
+ title: "CANCEL"
516
+ //disabled={loading}
517
+ ,
518
+ title_color: Colors.utility.error,
519
+ borderWidth: 1,
520
+ borderColor: Colors.utility.error,
521
+ padding: 15,
522
+ onPress: () => handleCancel()
523
+ }) : /*#__PURE__*/React.createElement(Button, {
524
+ style: {
525
+ flex: 1,
526
+ opacity: 1
527
+ },
528
+ title: "CLOSE"
529
+ //disabled={loading}
530
+ ,
531
+ title_color: Colors.utility.error,
532
+ borderWidth: 1,
533
+ borderColor: Colors.utility.error,
534
+ padding: 15,
535
+ onPress: () => onCompleteOrder(ip_item_order, ip_transaction)
536
+ }), ip_transaction.status == 'redirect' ? /*#__PURE__*/React.createElement(Button, {
537
+ style: {
538
+ flex: 3,
539
+ opacity: completing ? 0.5 : 1
540
+ },
541
+ loading: completing,
542
+ disabled: completing,
543
+ title: "COMPLETE ORDER",
544
+ title_color: Colors.shades.white,
545
+ backgroundColor: Colors.brand.electric,
546
+ padding: 15,
547
+ onPress: () => handleRedirect()
548
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null)))) : /*#__PURE__*/React.createElement(React.Fragment, null), show_location ? /*#__PURE__*/React.createElement(View, {
549
+ style: {
550
+ position: 'absolute',
551
+ top: 0,
552
+ bottom: 0,
553
+ left: 0,
554
+ right: 0,
555
+ backgroundColor: Colors.shades.black_faded,
556
+ justifyContent: 'flex-end'
557
+ }
558
+ }, /*#__PURE__*/React.createElement(SpringView, {
559
+ to: 0,
560
+ from: 500,
561
+ slide: "vertical",
562
+ style: {
563
+ backgroundColor: Colors.shades.white,
564
+ borderTopRightRadius: 40,
565
+ borderTopLeftRadius: 40
566
+ }
567
+ }, /*#__PURE__*/React.createElement(LocationTracker, {
568
+ location: location,
569
+ permission: permission,
570
+ onGetLocation: getLocation,
571
+ onClose: () => setShowLocation(false)
572
+ }))) : /*#__PURE__*/React.createElement(React.Fragment, null));
573
+ };
574
+ const local_styles = StyleSheet.create({
575
+ section: {
576
+ padding: 10,
577
+ margin: 5
578
+ }
579
+ });
580
+ export default Checkout;
581
+ //# sourceMappingURL=index.js.map