be-components 3.6.1 → 3.6.2

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 (172) hide show
  1. package/lib/commonjs/Checkout/components/AccountSummaryCard.js +52 -57
  2. package/lib/commonjs/Checkout/components/AccountSummaryCard.js.map +1 -1
  3. package/lib/commonjs/Checkout/components/ItemSummaryCard.js +8 -11
  4. package/lib/commonjs/Checkout/components/ItemSummaryCard.js.map +1 -1
  5. package/lib/commonjs/Checkout/components/OrderSummaryCard.js +21 -25
  6. package/lib/commonjs/Checkout/components/OrderSummaryCard.js.map +1 -1
  7. package/lib/commonjs/Checkout/components/PayPalHtml.js +32 -0
  8. package/lib/commonjs/Checkout/components/PayPalHtml.js.map +1 -0
  9. package/lib/commonjs/Checkout/components/PayPalWebview.js +125 -0
  10. package/lib/commonjs/Checkout/components/PayPalWebview.js.map +1 -0
  11. package/lib/commonjs/Checkout/components/ShippingSummaryCard.js +11 -15
  12. package/lib/commonjs/Checkout/components/ShippingSummaryCard.js.map +1 -1
  13. package/lib/commonjs/Checkout/index.js +92 -146
  14. package/lib/commonjs/Checkout/index.js.map +1 -1
  15. package/lib/commonjs/Components/Checkbox.js +7 -5
  16. package/lib/commonjs/Components/Checkbox.js.map +1 -1
  17. package/lib/commonjs/Components/Icons.js +9 -9
  18. package/lib/commonjs/Components/Icons.js.map +1 -1
  19. package/lib/commonjs/Wallet/components/ACHAddCard.js +233 -194
  20. package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -1
  21. package/lib/commonjs/Wallet/components/AddressCard.js +19 -17
  22. package/lib/commonjs/Wallet/components/AddressCard.js.map +1 -1
  23. package/lib/commonjs/Wallet/components/AddressManager.js +64 -92
  24. package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -1
  25. package/lib/commonjs/Wallet/components/FundAccountCard.js +106 -95
  26. package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -1
  27. package/lib/commonjs/Wallet/components/LinkAccountManager.js +80 -106
  28. package/lib/commonjs/Wallet/components/LinkAccountManager.js.map +1 -1
  29. package/lib/commonjs/Wallet/components/ManualACHAdd.js +155 -151
  30. package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
  31. package/lib/commonjs/Wallet/components/ManualCardAdd.js +207 -204
  32. package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
  33. package/lib/commonjs/Wallet/components/MyBalance.js +73 -66
  34. package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
  35. package/lib/commonjs/Wallet/components/WalletSetup.js +286 -246
  36. package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
  37. package/lib/commonjs/Wallet/index.js +1 -0
  38. package/lib/commonjs/Wallet/index.js.map +1 -1
  39. package/lib/module/Checkout/components/AccountSummaryCard.js +25 -30
  40. package/lib/module/Checkout/components/AccountSummaryCard.js.map +1 -1
  41. package/lib/module/Checkout/components/ItemSummaryCard.js +4 -7
  42. package/lib/module/Checkout/components/ItemSummaryCard.js.map +1 -1
  43. package/lib/module/Checkout/components/OrderSummaryCard.js +9 -13
  44. package/lib/module/Checkout/components/OrderSummaryCard.js.map +1 -1
  45. package/lib/module/Checkout/components/PayPalHtml.js +25 -0
  46. package/lib/module/Checkout/components/PayPalHtml.js.map +1 -0
  47. package/lib/module/Checkout/components/PayPalWebview.js +118 -0
  48. package/lib/module/Checkout/components/PayPalWebview.js.map +1 -0
  49. package/lib/module/Checkout/components/ShippingSummaryCard.js +5 -9
  50. package/lib/module/Checkout/components/ShippingSummaryCard.js.map +1 -1
  51. package/lib/module/Checkout/index.js +58 -112
  52. package/lib/module/Checkout/index.js.map +1 -1
  53. package/lib/module/Components/Checkbox.js +6 -4
  54. package/lib/module/Components/Checkbox.js.map +1 -1
  55. package/lib/module/Components/Icons.js +10 -10
  56. package/lib/module/Components/Icons.js.map +1 -1
  57. package/lib/module/Wallet/components/ACHAddCard.js +233 -194
  58. package/lib/module/Wallet/components/ACHAddCard.js.map +1 -1
  59. package/lib/module/Wallet/components/AddressCard.js +14 -12
  60. package/lib/module/Wallet/components/AddressCard.js.map +1 -1
  61. package/lib/module/Wallet/components/AddressManager.js +29 -57
  62. package/lib/module/Wallet/components/AddressManager.js.map +1 -1
  63. package/lib/module/Wallet/components/FundAccountCard.js +71 -60
  64. package/lib/module/Wallet/components/FundAccountCard.js.map +1 -1
  65. package/lib/module/Wallet/components/LinkAccountManager.js +55 -81
  66. package/lib/module/Wallet/components/LinkAccountManager.js.map +1 -1
  67. package/lib/module/Wallet/components/ManualACHAdd.js +146 -141
  68. package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
  69. package/lib/module/Wallet/components/ManualCardAdd.js +204 -201
  70. package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
  71. package/lib/module/Wallet/components/MyBalance.js +45 -38
  72. package/lib/module/Wallet/components/MyBalance.js.map +1 -1
  73. package/lib/module/Wallet/components/WalletSetup.js +287 -247
  74. package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
  75. package/lib/module/Wallet/index.js +1 -0
  76. package/lib/module/Wallet/index.js.map +1 -1
  77. package/lib/typescript/lib/commonjs/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
  78. package/lib/typescript/lib/commonjs/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
  79. package/lib/typescript/lib/commonjs/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
  80. package/lib/typescript/lib/commonjs/Checkout/components/PayPalHtml.d.ts +3 -0
  81. package/lib/typescript/lib/commonjs/Checkout/components/PayPalHtml.d.ts.map +1 -0
  82. package/lib/typescript/lib/commonjs/Checkout/components/PayPalWebview.d.ts +4 -0
  83. package/lib/typescript/lib/commonjs/Checkout/components/PayPalWebview.d.ts.map +1 -0
  84. package/lib/typescript/lib/commonjs/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
  85. package/lib/typescript/lib/commonjs/Checkout/index.d.ts.map +1 -1
  86. package/lib/typescript/lib/commonjs/Components/Checkbox.d.ts.map +1 -1
  87. package/lib/typescript/lib/commonjs/Wallet/components/ACHAddCard.d.ts.map +1 -1
  88. package/lib/typescript/lib/commonjs/Wallet/components/AddressCard.d.ts.map +1 -1
  89. package/lib/typescript/lib/commonjs/Wallet/components/AddressManager.d.ts.map +1 -1
  90. package/lib/typescript/lib/commonjs/Wallet/components/FundAccountCard.d.ts.map +1 -1
  91. package/lib/typescript/lib/commonjs/Wallet/components/LinkAccountManager.d.ts.map +1 -1
  92. package/lib/typescript/lib/commonjs/Wallet/components/ManualACHAdd.d.ts.map +1 -1
  93. package/lib/typescript/lib/commonjs/Wallet/components/ManualCardAdd.d.ts.map +1 -1
  94. package/lib/typescript/lib/commonjs/Wallet/components/MyBalance.d.ts.map +1 -1
  95. package/lib/typescript/lib/commonjs/Wallet/components/WalletSetup.d.ts.map +1 -1
  96. package/lib/typescript/lib/commonjs/Wallet/index.d.ts.map +1 -1
  97. package/lib/typescript/lib/module/Checkout/components/AccountSummaryCard.d.ts +1 -2
  98. package/lib/typescript/lib/module/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
  99. package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts +1 -2
  100. package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
  101. package/lib/typescript/lib/module/Checkout/components/OrderSummaryCard.d.ts +1 -2
  102. package/lib/typescript/lib/module/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
  103. package/lib/typescript/lib/module/Checkout/components/PayPalHtml.d.ts +2 -0
  104. package/lib/typescript/lib/module/Checkout/components/PayPalHtml.d.ts.map +1 -0
  105. package/lib/typescript/lib/module/Checkout/components/PayPalWebview.d.ts +5 -0
  106. package/lib/typescript/lib/module/Checkout/components/PayPalWebview.d.ts.map +1 -0
  107. package/lib/typescript/lib/module/Checkout/components/ShippingSummaryCard.d.ts +1 -2
  108. package/lib/typescript/lib/module/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
  109. package/lib/typescript/lib/module/Checkout/index.d.ts +1 -2
  110. package/lib/typescript/lib/module/Checkout/index.d.ts.map +1 -1
  111. package/lib/typescript/lib/module/Components/Checkbox.d.ts +1 -2
  112. package/lib/typescript/lib/module/Components/Checkbox.d.ts.map +1 -1
  113. package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
  114. package/lib/typescript/lib/module/Wallet/components/ACHAddCard.d.ts +1 -2
  115. package/lib/typescript/lib/module/Wallet/components/ACHAddCard.d.ts.map +1 -1
  116. package/lib/typescript/lib/module/Wallet/components/AddressCard.d.ts +1 -2
  117. package/lib/typescript/lib/module/Wallet/components/AddressCard.d.ts.map +1 -1
  118. package/lib/typescript/lib/module/Wallet/components/AddressManager.d.ts +1 -2
  119. package/lib/typescript/lib/module/Wallet/components/AddressManager.d.ts.map +1 -1
  120. package/lib/typescript/lib/module/Wallet/components/FundAccountCard.d.ts +1 -2
  121. package/lib/typescript/lib/module/Wallet/components/FundAccountCard.d.ts.map +1 -1
  122. package/lib/typescript/lib/module/Wallet/components/LinkAccountManager.d.ts +1 -2
  123. package/lib/typescript/lib/module/Wallet/components/LinkAccountManager.d.ts.map +1 -1
  124. package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts +1 -2
  125. package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts.map +1 -1
  126. package/lib/typescript/lib/module/Wallet/components/ManualCardAdd.d.ts +1 -2
  127. package/lib/typescript/lib/module/Wallet/components/ManualCardAdd.d.ts.map +1 -1
  128. package/lib/typescript/lib/module/Wallet/components/MyBalance.d.ts +1 -2
  129. package/lib/typescript/lib/module/Wallet/components/MyBalance.d.ts.map +1 -1
  130. package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts +1 -2
  131. package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts.map +1 -1
  132. package/lib/typescript/lib/module/Wallet/index.d.ts.map +1 -1
  133. package/lib/typescript/src/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
  134. package/lib/typescript/src/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
  135. package/lib/typescript/src/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
  136. package/lib/typescript/src/Checkout/components/PayPalHtml.d.ts +2 -0
  137. package/lib/typescript/src/Checkout/components/PayPalHtml.d.ts.map +1 -0
  138. package/lib/typescript/src/Checkout/components/PayPalWebview.d.ts +4 -0
  139. package/lib/typescript/src/Checkout/components/PayPalWebview.d.ts.map +1 -0
  140. package/lib/typescript/src/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
  141. package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
  142. package/lib/typescript/src/Components/Checkbox.d.ts.map +1 -1
  143. package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -1
  144. package/lib/typescript/src/Wallet/components/AddressCard.d.ts.map +1 -1
  145. package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -1
  146. package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -1
  147. package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts.map +1 -1
  148. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
  149. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -1
  150. package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
  151. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
  152. package/package.json +2 -1
  153. package/src/Checkout/components/AccountSummaryCard.tsx +25 -27
  154. package/src/Checkout/components/ItemSummaryCard.tsx +4 -6
  155. package/src/Checkout/components/OrderSummaryCard.tsx +9 -11
  156. package/src/Checkout/components/PayPalHtml.ts +26 -0
  157. package/src/Checkout/components/PayPalOrderCapture.tsx +1 -1
  158. package/src/Checkout/components/PayPalWebview.tsx +118 -0
  159. package/src/Checkout/components/ShippingSummaryCard.tsx +5 -8
  160. package/src/Checkout/index.tsx +68 -96
  161. package/src/Components/Checkbox.tsx +7 -6
  162. package/src/Components/Icons.tsx +10 -10
  163. package/src/Wallet/components/ACHAddCard.tsx +90 -60
  164. package/src/Wallet/components/AddressCard.tsx +11 -11
  165. package/src/Wallet/components/AddressManager.tsx +33 -44
  166. package/src/Wallet/components/FundAccountCard.tsx +52 -51
  167. package/src/Wallet/components/LinkAccountManager.tsx +49 -59
  168. package/src/Wallet/components/ManualACHAdd.tsx +99 -79
  169. package/src/Wallet/components/ManualCardAdd.tsx +119 -95
  170. package/src/Wallet/components/MyBalance.tsx +38 -40
  171. package/src/Wallet/components/WalletSetup.tsx +138 -113
  172. package/src/Wallet/index.tsx +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"AddressManager.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/AddressManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAMpF,KAAK,mBAAmB,GAAG;IACvB,MAAM,CAAC,EAAC,aAAa,CAAA;IACrB,QAAQ,CAAC,EAAE;QACP,OAAO,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAC,MAAM,CAAC;QACd,WAAW,EAAC,GAAG,CAAC;QAChB,eAAe,EAAC,GAAG,EAAE,CAAC;QACtB,cAAc,CAAC,EAAC,kBAAkB,CAAC;QACnC,MAAM,CAAC,EAAC,MAAM,CAAC;QACf,QAAQ,CAAC,EAAC,aAAa,CAAA;KAC1B,CAAA;IACD,gBAAgB,EAAC,kBAAkB,EAAE,CAAC;IACtC,YAAY,EAAC,CAAC,OAAO,EAAC,kBAAkB,KAAK,IAAI,CAAC;IAClD,eAAe,CAAC,EAAC,CAAC,OAAO,EAAC,kBAAkB,KAAK,IAAI,CAAC;IACtD,QAAQ,EAAE,CAAC,OAAO,EAAC,kBAAkB,KAAK,IAAI,CAAA;IAC9C,QAAQ,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AAED,QAAA,MAAM,cAAc,sFAAsF,mBAAmB,sBA8K5H,CAAA;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"AddressManager.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/AddressManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAMpF,KAAK,mBAAmB,GAAG;IACvB,MAAM,CAAC,EAAC,aAAa,CAAA;IACrB,QAAQ,CAAC,EAAE;QACP,OAAO,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAC,MAAM,CAAC;QACd,WAAW,EAAC,GAAG,CAAC;QAChB,eAAe,EAAC,GAAG,EAAE,CAAC;QACtB,cAAc,CAAC,EAAC,kBAAkB,CAAC;QACnC,MAAM,CAAC,EAAC,MAAM,CAAC;QACf,QAAQ,CAAC,EAAC,aAAa,CAAA;KAC1B,CAAA;IACD,gBAAgB,EAAC,kBAAkB,EAAE,CAAC;IACtC,YAAY,EAAC,CAAC,OAAO,EAAC,kBAAkB,KAAK,IAAI,CAAC;IAClD,eAAe,CAAC,EAAC,CAAC,OAAO,EAAC,kBAAkB,KAAK,IAAI,CAAC;IACtD,QAAQ,EAAE,CAAC,OAAO,EAAC,kBAAkB,KAAK,IAAI,CAAA;IAC9C,QAAQ,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AAED,QAAA,MAAM,cAAc,sFAAsF,mBAAmB,sBAmK5H,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"FundAccountCard.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/FundAccountCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,mBAAmB,EAAE,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKxJ,KAAK,oBAAoB,GAAG;IACxB,MAAM,EAAC,aAAa,CAAC;IACrB,QAAQ,EAAC,YAAY,EAAE,CAAC;IACxB,YAAY,EAAE;QACV,YAAY,CAAC,EAAC,gBAAgB,CAAC;QAC/B,QAAQ,CAAC,EAAC,iBAAiB,CAAC;QAC5B,KAAK,CAAC,EAAC,UAAU,CAAC;QAClB,eAAe,CAAC,EAAC,mBAAmB,CAAC;QACrC,aAAa,CAAC,EAAC,iBAAiB,CAAA;KACnC,CAAA;IACD,WAAW,CAAC,EAAC,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,MAAM,EAAC,CAAC,OAAO,CAAC,EAAC,YAAY,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,CAAC,OAAO,EAAC,YAAY,KAAK,IAAI,CAAC;IAChD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB,CAAA;AAED,QAAA,MAAM,eAAe,mGAAmG,oBAAoB,sBAiI3I,CAAA;AAED,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"FundAccountCard.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/FundAccountCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,mBAAmB,EAAE,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKxJ,KAAK,oBAAoB,GAAG;IACxB,MAAM,EAAC,aAAa,CAAC;IACrB,QAAQ,EAAC,YAAY,EAAE,CAAC;IACxB,YAAY,EAAE;QACV,YAAY,CAAC,EAAC,gBAAgB,CAAC;QAC/B,QAAQ,CAAC,EAAC,iBAAiB,CAAC;QAC5B,KAAK,CAAC,EAAC,UAAU,CAAC;QAClB,eAAe,CAAC,EAAC,mBAAmB,CAAC;QACrC,aAAa,CAAC,EAAC,iBAAiB,CAAA;KACnC,CAAA;IACD,WAAW,CAAC,EAAC,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,MAAM,EAAC,CAAC,OAAO,CAAC,EAAC,YAAY,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,CAAC,OAAO,EAAC,YAAY,KAAK,IAAI,CAAC;IAChD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB,CAAA;AAED,QAAA,MAAM,eAAe,mGAAmG,oBAAoB,sBAkI3I,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"LinkAccountManager.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/LinkAccountManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAKpE,KAAK,uBAAuB,GAAG;IAC3B,sBAAsB,EAAC,YAAY,CAAC;IACpC,gBAAgB,EAAC,kBAAkB,EAAE,CAAC;IACtC,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,CAAC,OAAO,EAAC,YAAY,KAAK,IAAI,CAAA;CAC7C,CAAA;AAED,QAAA,MAAM,kBAAkB,uEAAwE,uBAAuB,sBAiMtH,CAAA;AAED,eAAe,kBAAkB,CAAA"}
1
+ {"version":3,"file":"LinkAccountManager.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/LinkAccountManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAMpE,KAAK,uBAAuB,GAAG;IAC3B,sBAAsB,EAAC,YAAY,CAAC;IACpC,gBAAgB,EAAC,kBAAkB,EAAE,CAAC;IACtC,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,CAAC,OAAO,EAAC,YAAY,KAAK,IAAI,CAAA;CAC7C,CAAA;AAED,QAAA,MAAM,kBAAkB,uEAAwE,uBAAuB,sBAuLtH,CAAA;AAED,eAAe,kBAAkB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ManualACHAdd.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/ManualACHAdd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG/D,KAAK,iBAAiB,GAAG;IACrB,MAAM,EAAC,aAAa,CAAC;IACrB,YAAY,EAAC,CAAC,OAAO,EAAC,YAAY,KAAK,IAAI,CAAC;IAC5C,QAAQ,EAAC,MAAM,IAAI,CAAA;CACtB,CAAA;AACD,QAAA,MAAM,YAAY,uCAAuC,iBAAiB,sBAmJzE,CAAA;AAED,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"ManualACHAdd.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/ManualACHAdd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM/D,KAAK,iBAAiB,GAAG;IACrB,MAAM,EAAC,aAAa,CAAC;IACrB,YAAY,EAAC,CAAC,OAAO,EAAC,YAAY,KAAK,IAAI,CAAC;IAC5C,QAAQ,EAAC,MAAM,IAAI,CAAA;CACtB,CAAA;AAGD,QAAA,MAAM,YAAY,uCAAuC,iBAAiB,sBAoKzE,CAAA;AAED,eAAe,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ManualCardAdd.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/ManualCardAdd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG/D,KAAK,kBAAkB,GAAG;IACtB,MAAM,EAAC,aAAa,CAAC;IACrB,YAAY,EAAC,CAAC,IAAI,EAAC,YAAY,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAC,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,QAAA,MAAM,aAAa,uCAAuC,kBAAkB,sBAkK3E,CAAA;AAOD,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"ManualCardAdd.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/ManualCardAdd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM/D,KAAK,kBAAkB,GAAG;IACtB,MAAM,EAAC,aAAa,CAAC;IACrB,YAAY,EAAC,CAAC,IAAI,EAAC,YAAY,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAC,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,QAAA,MAAM,aAAa,uCAAuC,kBAAkB,sBA4L3E,CAAA;AAID,eAAe,aAAa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MyBalance.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/MyBalance.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAKnF,KAAK,cAAc,GAAG;IAClB,MAAM,EAAC,aAAa,CAAC;IACrB,cAAc,EAAC,kBAAkB,CAAC;IAClC,eAAe,CAAC,EAAC,YAAY,CAAC;IAC9B,WAAW,CAAC,EAAC,OAAO,CAAC;IACrB,OAAO,EAAC,MAAM,IAAI,CAAC;IACnB,MAAM,EAAC,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,QAAA,MAAM,SAAS,wCAAwC,cAAc,sBAiEpE,CAAA;AAED,eAAe,SAAS,CAAA"}
1
+ {"version":3,"file":"MyBalance.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/MyBalance.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAKnF,KAAK,cAAc,GAAG;IAClB,MAAM,EAAC,aAAa,CAAC;IACrB,cAAc,EAAC,kBAAkB,CAAC;IAClC,eAAe,CAAC,EAAC,YAAY,CAAC;IAC9B,WAAW,CAAC,EAAC,OAAO,CAAC;IACrB,OAAO,EAAC,MAAM,IAAI,CAAC;IACnB,MAAM,EAAC,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,QAAA,MAAM,SAAS,wCAAwC,cAAc,sBAgEpE,CAAA;AAED,eAAe,SAAS,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"WalletSetup.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/WalletSetup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAQtE,KAAK,gBAAgB,GAAG;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,mBAAmB,CAAC;IACrC,gBAAgB,EAAC,CAAC,EAAE,EAAC,mBAAmB,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAC,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAC,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,WAAW,2DAA2D,gBAAgB,sBAmO3F,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"WalletSetup.d.ts","sourceRoot":"","sources":["../../../../../src/Wallet/components/WalletSetup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAOtE,KAAK,gBAAgB,GAAG;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,mBAAmB,CAAC;IACrC,gBAAgB,EAAC,CAAC,EAAE,EAAC,mBAAmB,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAC,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAC,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,WAAW,2DAA2D,gBAAgB,sBA6P3F,CAAA;AAED,eAAe,WAAW,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "be-components",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "Components for BettorEdge Apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -195,6 +195,7 @@
195
195
  "react-native-uuid": "^2.0.3",
196
196
  "react-native-web-linear-gradient": "^1.1.2",
197
197
  "react-native-web-swiper": "^2.2.4",
198
+ "react-native-webview": "13.12.5",
198
199
  "us-bank-account-validator": "^1.0.0",
199
200
  "uuid": "^9.0.1"
200
201
  },
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
- import { View, TouchableOpacity, Image } from "react-native";
3
- import { Button, Checkbox, Icons, Text, TextInput } from '../../Components';
2
+ import { Image } from "react-native";
3
+ import { Checkbox, Icons } from '../../Components';
4
4
  import type { AccountProps, ItemProps, PlayerAddressProps } from '../../types';
5
- import Colors from '../../constants/colors';
6
5
  import { CheckoutApi, CheckoutHelpers } from '../api';
7
6
  import moment from 'moment-mini';
7
+ import { Button, Text, TextInput, View } from '../../Components/Themed';
8
+ import { useColors } from '../../constants/useColors';
8
9
 
9
10
  type AccountSummaryCardProps = {
10
11
  selected_account?:AccountProps,
@@ -20,7 +21,7 @@ type AccountSummaryCardProps = {
20
21
  onSelectAccount:(account:AccountProps) => void
21
22
  }
22
23
  const AccountSummaryCard = ({ accounts, cvv, items, selected_account, billing_address_required, player_address, onRequestNewAccount, onCVVChange, onAccountsUpdate, onSelectAccount, onChangeAddress }:AccountSummaryCardProps) => {
23
-
24
+ const Colors = useColors();
24
25
  const my_accounts = CheckoutHelpers.filterMyPurchaseAccounts(accounts, items);
25
26
 
26
27
 
@@ -41,30 +42,30 @@ const AccountSummaryCard = ({ accounts, cvv, items, selected_account, billing_ad
41
42
  if(account.ach_detail?.payment_provider == 'nuvei'){
42
43
  return (
43
44
  <View style={{ flexDirection:'row', alignItems:'center', padding:4 }}>
44
- <Icons.BankInstantIcon size={22} color={Colors.brand.midnight}/>
45
- <Text style={{ marginLeft:3 }} size={12} color={Colors.brand.midnight} weight='semibold'>{account.ach_detail?.bank_name}</Text>
45
+ <Icons.BankInstantIcon size={22} color={Colors.text.h1}/>
46
+ <Text style={{ marginLeft:3 }} size={12} theme='h2'>{account.ach_detail?.bank_name}</Text>
46
47
  </View>
47
48
  )
48
49
  }
49
50
  return (
50
51
  <View style={{ flexDirection:'row', alignItems:'center', padding:4 }}>
51
- <Icons.BankIcon size={22} color={Colors.brand.midnight}/>
52
- <Text style={{ marginLeft:3 }} size={12} color={Colors.brand.midnight} weight='semibold'>{account.ach_detail?.bank_name}</Text>
52
+ <Icons.BankIcon size={22} color={Colors.text.h1}/>
53
+ <Text style={{ marginLeft:3 }} size={12} theme='h2'>{account.ach_detail?.bank_name}</Text>
53
54
  </View>
54
55
  )
55
56
  case 'card':
56
57
  return renderCardIcon(account.card_detail?.card_brand)
57
58
  case 'paypal':
58
59
  return (
59
- <View style={{ flexDirection:'row', alignItems:'center', padding:4, backgroundColor:Colors.company.paypal }}>
60
- <Icons.PayPalIcon size={50} color={Colors.brand.midnight}/>
60
+ <View style={{ flexDirection:'row', alignItems:'center', padding:4, backgroundColor:Colors.absolutes.company.paypal }}>
61
+ <Icons.PayPalIcon size={50} color={Colors.text.h1}/>
61
62
  </View>
62
63
  )
63
64
  case 'bettoredge':
64
65
  return (
65
66
  <View style={{ flexDirection:'row', alignItems:'center', padding:4 }}>
66
- <Icons.BettorEdgeIcon size={10} color={Colors.brand.midnight}/>
67
- <Text style={{ marginLeft:5 }} size={14} color={Colors.brand.midnight} weight='semibold'>Wallet</Text>
67
+ <Icons.BettorEdgeIcon size={10} color={Colors.text.h1}/>
68
+ <Text style={{ marginLeft:5 }} size={14} theme='h2'>Wallet</Text>
68
69
  </View>
69
70
  )
70
71
  default: return <></>
@@ -83,7 +84,7 @@ const AccountSummaryCard = ({ accounts, cvv, items, selected_account, billing_ad
83
84
  case 'discover':
84
85
  return <Icons.DiscoverCardIcon size={50} />
85
86
  default:
86
- return <Icons.CreditCardIcon size={50} color={Colors.brand.midnight}/>
87
+ return <Icons.CreditCardIcon size={50} color={Colors.text.h1}/>
87
88
  }
88
89
  }
89
90
 
@@ -91,11 +92,11 @@ const AccountSummaryCard = ({ accounts, cvv, items, selected_account, billing_ad
91
92
  const renderAccounts = (data: { item:AccountProps, index:number }) => {
92
93
  const selected = data.item.account_id == selected_account?.account_id ? true : false
93
94
  return (
94
- <TouchableOpacity
95
- style={{ margin:3, flexDirection:'row', backgroundColor:selected?Colors.highlights.highlight400Faded:'transparent', borderWidth:selected?2:1, borderColor:selected?Colors.brand.electric:Colors.shades.shade600, borderRadius:4 }}
95
+ <Button
96
+ style={{ margin:3, padding:3, flexDirection:'row', borderWidth:selected?2:1, borderColor:selected?Colors.text.success:Colors.borders.light, borderRadius:4 }}
96
97
  onPress={() => onSelectAccount(data.item)}>
97
98
  {getLabel(data.item)}
98
- </TouchableOpacity>
99
+ </Button>
99
100
  )
100
101
  }
101
102
 
@@ -107,11 +108,10 @@ const AccountSummaryCard = ({ accounts, cvv, items, selected_account, billing_ad
107
108
  return (
108
109
  <View style={{ padding:5 }}>
109
110
  <View style={{ padding:5, paddingTop:10, paddingBottom:10, flexDirection:'row', alignItems:'center' }}>
110
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='semibold'>Select Account</Text>
111
+ <Text style={{ flex:1 }} size={14} theme='h2'>Select Account</Text>
111
112
  <Button
112
113
  title='Add New Account'
113
- title_color={Colors.brand.electric}
114
- backgroundColor='transparent'
114
+ type='text'
115
115
  onPress={() => onRequestNewAccount()}
116
116
  />
117
117
  </View>
@@ -126,11 +126,11 @@ const AccountSummaryCard = ({ accounts, cvv, items, selected_account, billing_ad
126
126
  <View style={{ flex:1, marginRight:5 }}>
127
127
  <Text size={14} weight='bold'>{selected_account.account_label}</Text>
128
128
  {selected_account.account_type == 'card' && selected_account.card_detail ?
129
- <Text style={{ marginTop:3 }} size={12} color={Colors.brand.slate}>EXP: {moment(selected_account.card_detail.expiration_date).format('MM/YYYY')}</Text>
129
+ <Text style={{ marginTop:3 }} size={12} color={Colors.text.descriptionLight}>EXP: {moment(selected_account.card_detail.expiration_date).format('MM/YYYY')}</Text>
130
130
  :<></>}
131
131
  </View>
132
132
  <View style={{ flexDirection:'row', alignItems:'center' }}>
133
- <Text style={{ marginRight:5 }} size={14} color={Colors.brand.midnight}>Default</Text>
133
+ <Text style={{ marginRight:5 }} size={14} theme='description'>Default</Text>
134
134
  <Checkbox
135
135
  checked={selected_account.default_account ? true : false}
136
136
  onSelect={() => handleUpdateDefault(selected_account.account_id)}
@@ -140,10 +140,9 @@ const AccountSummaryCard = ({ accounts, cvv, items, selected_account, billing_ad
140
140
  </View>
141
141
  {selected_account.account_type == 'card' ?
142
142
  <View style={{ flexDirection:'row', alignItems:'center', marginTop:10 }}>
143
- <Text style={{ flex:1 }} color={Colors.brand.midnight} size={12}>Enter CVV</Text>
143
+ <Text style={{ flex:1 }} theme='description' size={12}>Enter CVV</Text>
144
144
  <TextInput
145
145
  style={{ textAlign:'center', width:100, padding:10, borderRadius:4 }}
146
- placeholderTextColor={Colors.brand.slate}
147
146
  placeholder='123'
148
147
  value={cvv}
149
148
  onChangeText={(text) => onCVVChange(text)}
@@ -154,14 +153,13 @@ const AccountSummaryCard = ({ accounts, cvv, items, selected_account, billing_ad
154
153
  <View style={{ marginTop:15, flexDirection:'row', alignItems:'center' }}>
155
154
  {player_address ?
156
155
  <View style={{ flex:1 }}>
157
- <Text size={12} color={Colors.brand.midnight}>{player_address.street}</Text>
158
- <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight}>{player_address.city}, {player_address.state} {player_address.zip}</Text>
156
+ <Text size={12} theme='description'>{player_address.street}</Text>
157
+ <Text style={{ marginTop:3 }} size={12} theme='description'>{player_address.city}, {player_address.state} {player_address.zip}</Text>
159
158
  </View>
160
159
  :<View style={{flex:1}} />}
161
160
  <Button
162
161
  title={player_address ? 'CHANGE':'ADD BILLING ADDRESS'}
163
- title_color={Colors.brand.electric}
164
- padding={5}
162
+ type='text'
165
163
  onPress={() => onChangeAddress()}
166
164
  />
167
165
  </View>
@@ -1,14 +1,12 @@
1
1
  import React from 'react';
2
- import { Image, View } from "react-native";
2
+ import { Image } from "react-native";
3
3
  import type { ItemProps } from "../../types";
4
- import { Text } from '../../Components';
5
- import Colors from '../../constants/colors';
4
+ import { Text, View } from '../../Components/Themed';
6
5
 
7
6
  type ItemSummaryCardProps = {
8
7
  items:ItemProps[]
9
8
  }
10
9
  const ItemSummaryCard = ({ items }:ItemSummaryCardProps) => {
11
-
12
10
  const default_item = items[0]
13
11
 
14
12
  if(!default_item){ return <></> }
@@ -23,8 +21,8 @@ const ItemSummaryCard = ({ items }:ItemSummaryCardProps) => {
23
21
  />
24
22
  </View>
25
23
  <View style={{ flex:1 }}>
26
- <Text size={16} color={Colors.brand.midnight} weight='bold'>{default_item.name}</Text>
27
- <Text style={{ marginTop:5 }} size={14} color={Colors.brand.midnight} weight='regular'>{default_item.description}</Text>
24
+ <Text size={16} theme='h1'>{default_item.name}</Text>
25
+ <Text style={{ marginTop:5 }} size={14} theme='description'>{default_item.description}</Text>
28
26
  </View>
29
27
  </View>
30
28
  </View>
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
- import { View } from "react-native";
3
2
  import type { ItemOrderProps } from "../../types";
4
- import Colors from '../../constants/colors';
5
- import { Text } from '../../Components';
3
+ import { Text, View } from '../../Components/Themed';
6
4
 
7
5
 
8
6
  type OrderSummaryCardProps = {
@@ -14,24 +12,24 @@ const OrderSummaryCard = ({ item_order }:OrderSummaryCardProps) => {
14
12
  return (
15
13
  <View>
16
14
  <View style={{ flexDirection:'row', padding:5, paddingRight:10, paddingLeft:10 }}>
17
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight}>Subtotal</Text>
18
- <Text size={14} color={Colors.brand.midnight}>${item_order.amount}</Text>
15
+ <Text style={{ flex:1 }} size={14} theme='description'>Subtotal</Text>
16
+ <Text size={14} theme='description'>${item_order.amount}</Text>
19
17
  </View>
20
18
  {item_order.fee_1 ?
21
19
  <View style={{ flexDirection:'row', padding:5, paddingRight:10, paddingLeft:10 }}>
22
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight}>{item_order.fee_1}</Text>
23
- <Text size={14} color={Colors.brand.midnight}>${item_order.fee_1_amount}</Text>
20
+ <Text style={{ flex:1 }} size={14} theme='description'>{item_order.fee_1}</Text>
21
+ <Text size={14} theme='description'>${item_order.fee_1_amount}</Text>
24
22
  </View>
25
23
  :<></>}
26
24
  {item_order.fee_2 ?
27
25
  <View style={{ flexDirection:'row', padding:5, paddingRight:10, paddingLeft:10 }}>
28
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight}>{item_order.fee_2}</Text>
29
- <Text size={14} color={Colors.brand.midnight}>${item_order.fee_2_amount}</Text>
26
+ <Text style={{ flex:1 }} size={14} theme='description'>{item_order.fee_2}</Text>
27
+ <Text size={14} theme='description'>${item_order.fee_2_amount}</Text>
30
28
  </View>
31
29
  :<></>}
32
30
  <View style={{ flexDirection:'row', padding:5, paddingRight:10, paddingLeft:10 }}>
33
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='bold'>Total</Text>
34
- <Text size={14} color={Colors.brand.midnight} weight='bold'>${item_order.total_amount}</Text>
31
+ <Text style={{ flex:1 }} size={14} theme='h1'>Total</Text>
32
+ <Text size={14} theme='h1'>${item_order.total_amount}</Text>
35
33
  </View>
36
34
  </View>
37
35
  )
@@ -0,0 +1,26 @@
1
+ export const PaypalHtml = (client_id:string) => {
2
+ return (
3
+ `
4
+ <!DOCTYPE html>
5
+ <html>
6
+ <head>
7
+ <meta charset="UTF-8" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
+ <title>PayPal JS SDK Standard Integration</title>
10
+ <link
11
+ rel="stylesheet"
12
+ type="text/css"
13
+ href="https://www.paypalobjects.com/webstatic/en_US/developer/docs/css/cardfields.css"
14
+ />
15
+ </head>
16
+ <body>
17
+ <div id="paypal-button-container" class="paypal-button-container"></div>
18
+ <p id="result-message"></p>
19
+
20
+ <script src="https://www.paypal.com/sdk/js?client-id=%${client_id}%&buyer-country=US&currency=USD&components=buttons&enable-funding=venmo"></script>
21
+ <script src="app.js"></script>
22
+ </body>
23
+ </html>
24
+ `
25
+ )
26
+ }
@@ -40,7 +40,7 @@ const PayPalOrderCapture = ({ draft_item_order, region, coordinates, items, payp
40
40
  onCancel()
41
41
 
42
42
  }
43
-
43
+
44
44
  let height = 55
45
45
  if(button_height && button_height > 24 && button_height < 56){ height = button_height }
46
46
 
@@ -0,0 +1,118 @@
1
+ import React from 'react';
2
+ import WebView from "react-native-webview";
3
+
4
+
5
+ const PayPalWebView = ({}) => {
6
+ const htmlContent = `
7
+ <!DOCTYPE html>
8
+ <html>
9
+
10
+ <head>
11
+ <title>Hey</title>
12
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
13
+ <script src="https://www.paypal.com/sdk/js?client-id=AUZbVk4xEx5hlDu52ogVyUr4LhPF7eIYWrvxqEh_ebiAlbdg8HUvCZHnNgnW9_gmkI2lx4nX095STlAr&currency=USD"></script>
14
+ <style>
15
+ html,
16
+ body {
17
+ margin: 0;
18
+ padding: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ display: flex;
22
+ justify-content: center;
23
+ align-items: center;
24
+ background-color: #f5f5f5;
25
+ }
26
+
27
+ #paypal-button-container {
28
+ pointer-events: auto
29
+ z-index: 999;
30
+ /* Make sure PayPal button is on top */
31
+ }
32
+ </style>
33
+ </head>
34
+
35
+ <body>
36
+ <div id="paypal-button-container"></div>
37
+ <script>
38
+ const sendMessage = () => {
39
+ if (window.ReactNativeWebView) {
40
+ window.ReactNativeWebView.postMessage(JSON.stringify({title:'hello'}));
41
+ } else {
42
+ setTimeout(sendMessage, 500); // Try again after 500ms
43
+ }
44
+ };
45
+ sendMessage();
46
+ paypal.Buttons({
47
+ fundingSource: paypal.FUNDING.PAYPAL,
48
+ style: {
49
+ layout: 'vertical',
50
+ color: 'gold',
51
+ shape: 'rect',
52
+ label: 'pay',
53
+ height: 50
54
+ },
55
+ createOrder: function(data, actions) {
56
+ console.log('CREATING ORDER!!!!!')
57
+ return actions.order.create({
58
+ purchase_units: [{
59
+ amount: {
60
+ value: '100'
61
+ }
62
+ }]
63
+ });
64
+ },
65
+ onApprove: function(data, actions) {
66
+ return actions.order.capture().then(function(details) {
67
+ window.ReactNativeWebView.postMessage(JSON.stringify({ event: "success", details }));
68
+ });
69
+ },
70
+ onError: function(err) {
71
+ window.ReactNativeWebView.postMessage(JSON.stringify({ event: "error", error: err }));
72
+ }
73
+ }).render('#paypal-button-container');
74
+ </script>
75
+ </body>
76
+
77
+ </html>
78
+ `;
79
+
80
+
81
+ /*
82
+ const onSuccess = (data:any) => {
83
+ console.log(data)
84
+ }
85
+
86
+ const onError = (data:any) => {
87
+ console.log(data)
88
+ }
89
+ */
90
+
91
+ const handleMessage = (event:any) => {
92
+ console.log(event)
93
+ /*
94
+ const data = JSON.parse(event.nativeEvent.data);
95
+ if (data.event === "success") {
96
+ onSuccess(data.details);
97
+ } else if (data.event === "error") {
98
+ onError(data.error);
99
+ }
100
+ */
101
+ };
102
+ return (
103
+ <WebView
104
+ style={{ flex:1, borderRadius:8 }}
105
+ source={{ html: htmlContent }}
106
+ javaScriptEnabled={true}
107
+ //userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
108
+ //userAgent={device.userAgent}
109
+ domStorageEnabled={true}
110
+ onError={(error) => console.error(error)}
111
+ onLoadEnd={() => console.log('Page loaded')}
112
+ onMessage={handleMessage}
113
+
114
+ />
115
+ )
116
+ }
117
+
118
+ export default PayPalWebView
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
- import { View } from 'react-native';
3
- import { Button, Text } from '../../Components';
4
2
  import type { PlayerAddressProps } from '../../types';
5
- import Colors from '../../constants/colors';
3
+ import { Button, Text, View } from '../../Components/Themed';
6
4
 
7
5
  type ShippingSummaryCardProps = {
8
6
  onChangeAddress: () => void,
@@ -14,18 +12,17 @@ const ShippingSummaryCard = ({ player_address, onChangeAddress }:ShippingSummary
14
12
  return (
15
13
  <View>
16
14
  <View style={{ padding:5, flexDirection:'row', alignItems:'center' }}>
17
- <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='semibold'>Shipping Address</Text>
15
+ <Text style={{ flex:1 }} size={14} theme='h1'>Shipping Address</Text>
18
16
  <Button
19
17
  title={player_address ? 'Change' : 'Select Address'}
20
- title_color={Colors.brand.electric}
21
- backgroundColor='transparent'
18
+ type='text'
22
19
  onPress={() => onChangeAddress()}
23
20
  />
24
21
  </View>
25
22
  {player_address ?
26
23
  <View style={{ padding:5, marginTop:10 }}>
27
- <Text size={12} color={Colors.brand.midnight}>{player_address.street}</Text>
28
- <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight}>{player_address.city}, {player_address.state} {player_address.zip}</Text>
24
+ <Text size={12} theme='description'>{player_address.street}</Text>
25
+ <Text style={{ marginTop:3 }} size={12} theme='description'>{player_address.city}, {player_address.state} {player_address.zip}</Text>
29
26
  </View>
30
27
  :<></>}
31
28
  </View>