be-components 3.6.0 → 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.
- package/lib/commonjs/Checkout/components/AccountSummaryCard.js +52 -57
- package/lib/commonjs/Checkout/components/AccountSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/components/ItemSummaryCard.js +8 -11
- package/lib/commonjs/Checkout/components/ItemSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/components/OrderSummaryCard.js +21 -25
- package/lib/commonjs/Checkout/components/OrderSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/components/PayPalHtml.js +32 -0
- package/lib/commonjs/Checkout/components/PayPalHtml.js.map +1 -0
- package/lib/commonjs/Checkout/components/PayPalWebview.js +125 -0
- package/lib/commonjs/Checkout/components/PayPalWebview.js.map +1 -0
- package/lib/commonjs/Checkout/components/ShippingSummaryCard.js +11 -15
- package/lib/commonjs/Checkout/components/ShippingSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/index.js +92 -146
- package/lib/commonjs/Checkout/index.js.map +1 -1
- package/lib/commonjs/Components/Checkbox.js +7 -5
- package/lib/commonjs/Components/Checkbox.js.map +1 -1
- package/lib/commonjs/Components/Icons.js +9 -9
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Components/Pagination.js +37 -0
- package/lib/commonjs/Components/Pagination.js.map +1 -0
- package/lib/commonjs/Wallet/components/ACHAddCard.js +233 -194
- package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AccountCard.js +27 -28
- package/lib/commonjs/Wallet/components/AccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AccountLimitManager.js +60 -95
- package/lib/commonjs/Wallet/components/AccountLimitManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/AccountManager.js +209 -158
- package/lib/commonjs/Wallet/components/AccountManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/AccountSnoozeManager.js +53 -66
- package/lib/commonjs/Wallet/components/AccountSnoozeManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/AddressCard.js +19 -17
- package/lib/commonjs/Wallet/components/AddressCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AddressManager.js +64 -92
- package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/DepositCard.js +93 -99
- package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/FundAccountCard.js +106 -95
- package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/ItemOrderCard.js +26 -29
- package/lib/commonjs/Wallet/components/ItemOrderCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/ItemOrderDetailCard.js +43 -46
- package/lib/commonjs/Wallet/components/ItemOrderDetailCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/LinkAccountManager.js +80 -106
- package/lib/commonjs/Wallet/components/LinkAccountManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManageAccountCard.js +85 -60
- package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualACHAdd.js +155 -151
- package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualCardAdd.js +207 -204
- package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/MyBalance.js +73 -66
- package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
- package/lib/commonjs/Wallet/components/OrderManager.js +61 -58
- package/lib/commonjs/Wallet/components/OrderManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/RemoveAccount.js +22 -23
- package/lib/commonjs/Wallet/components/RemoveAccount.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletActionSelector.js +130 -133
- package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletSettings.js +382 -547
- package/lib/commonjs/Wallet/components/WalletSettings.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletSetup.js +307 -289
- package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/commonjs/Wallet/components/WithdrawCard.js +91 -111
- package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -1
- package/lib/commonjs/Wallet/index.js +23 -24
- package/lib/commonjs/Wallet/index.js.map +1 -1
- package/lib/commonjs/constants/styles.js +1 -1
- package/lib/commonjs/constants/styles.js.map +1 -1
- package/lib/commonjs/constants/useColors.js +1 -1
- package/lib/commonjs/constants/useColors.js.map +1 -1
- package/lib/module/Checkout/components/AccountSummaryCard.js +25 -30
- package/lib/module/Checkout/components/AccountSummaryCard.js.map +1 -1
- package/lib/module/Checkout/components/ItemSummaryCard.js +4 -7
- package/lib/module/Checkout/components/ItemSummaryCard.js.map +1 -1
- package/lib/module/Checkout/components/OrderSummaryCard.js +9 -13
- package/lib/module/Checkout/components/OrderSummaryCard.js.map +1 -1
- package/lib/module/Checkout/components/PayPalHtml.js +25 -0
- package/lib/module/Checkout/components/PayPalHtml.js.map +1 -0
- package/lib/module/Checkout/components/PayPalWebview.js +118 -0
- package/lib/module/Checkout/components/PayPalWebview.js.map +1 -0
- package/lib/module/Checkout/components/ShippingSummaryCard.js +5 -9
- package/lib/module/Checkout/components/ShippingSummaryCard.js.map +1 -1
- package/lib/module/Checkout/index.js +58 -112
- package/lib/module/Checkout/index.js.map +1 -1
- package/lib/module/Components/Checkbox.js +6 -4
- package/lib/module/Components/Checkbox.js.map +1 -1
- package/lib/module/Components/Icons.js +10 -10
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Components/Pagination.js +30 -0
- package/lib/module/Components/Pagination.js.map +1 -0
- package/lib/module/Wallet/components/ACHAddCard.js +233 -194
- package/lib/module/Wallet/components/ACHAddCard.js.map +1 -1
- package/lib/module/Wallet/components/AccountCard.js +23 -24
- package/lib/module/Wallet/components/AccountCard.js.map +1 -1
- package/lib/module/Wallet/components/AccountLimitManager.js +43 -77
- package/lib/module/Wallet/components/AccountLimitManager.js.map +1 -1
- package/lib/module/Wallet/components/AccountManager.js +206 -155
- package/lib/module/Wallet/components/AccountManager.js.map +1 -1
- package/lib/module/Wallet/components/AccountSnoozeManager.js +35 -48
- package/lib/module/Wallet/components/AccountSnoozeManager.js.map +1 -1
- package/lib/module/Wallet/components/AddressCard.js +14 -12
- package/lib/module/Wallet/components/AddressCard.js.map +1 -1
- package/lib/module/Wallet/components/AddressManager.js +29 -57
- package/lib/module/Wallet/components/AddressManager.js.map +1 -1
- package/lib/module/Wallet/components/DepositCard.js +62 -67
- package/lib/module/Wallet/components/DepositCard.js.map +1 -1
- package/lib/module/Wallet/components/FundAccountCard.js +71 -60
- package/lib/module/Wallet/components/FundAccountCard.js.map +1 -1
- package/lib/module/Wallet/components/ItemOrderCard.js +17 -20
- package/lib/module/Wallet/components/ItemOrderCard.js.map +1 -1
- package/lib/module/Wallet/components/ItemOrderDetailCard.js +28 -31
- package/lib/module/Wallet/components/ItemOrderDetailCard.js.map +1 -1
- package/lib/module/Wallet/components/LinkAccountManager.js +55 -81
- package/lib/module/Wallet/components/LinkAccountManager.js.map +1 -1
- package/lib/module/Wallet/components/ManageAccountCard.js +80 -55
- package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -1
- package/lib/module/Wallet/components/ManualACHAdd.js +146 -141
- package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/module/Wallet/components/ManualCardAdd.js +204 -201
- package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/module/Wallet/components/MyBalance.js +45 -38
- package/lib/module/Wallet/components/MyBalance.js.map +1 -1
- package/lib/module/Wallet/components/OrderManager.js +59 -56
- package/lib/module/Wallet/components/OrderManager.js.map +1 -1
- package/lib/module/Wallet/components/RemoveAccount.js +16 -16
- package/lib/module/Wallet/components/RemoveAccount.js.map +1 -1
- package/lib/module/Wallet/components/WalletActionSelector.js +102 -104
- package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -1
- package/lib/module/Wallet/components/WalletSettings.js +381 -545
- package/lib/module/Wallet/components/WalletSettings.js.map +1 -1
- package/lib/module/Wallet/components/WalletSetup.js +297 -279
- package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/module/Wallet/components/WithdrawCard.js +52 -71
- package/lib/module/Wallet/components/WithdrawCard.js.map +1 -1
- package/lib/module/Wallet/index.js +16 -17
- package/lib/module/Wallet/index.js.map +1 -1
- package/lib/module/constants/styles.js +1 -1
- package/lib/module/constants/styles.js.map +1 -1
- package/lib/module/constants/useColors.js +1 -1
- package/lib/module/constants/useColors.js.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalHtml.d.ts +3 -0
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalHtml.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalWebview.d.ts +4 -0
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalWebview.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Checkbox.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Pagination.d.ts +11 -0
- package/lib/typescript/lib/commonjs/Components/Pagination.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Wallet/components/ACHAddCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AccountLimitManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AccountManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AddressCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AddressManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/DepositCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/FundAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ItemOrderCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ManageAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ManualCardAdd.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/OrderManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/RemoveAccount.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WalletActionSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WalletSettings.d.ts +1 -2
- package/lib/typescript/lib/commonjs/Wallet/components/WalletSettings.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WithdrawCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/constants/styles.d.ts +1 -1
- package/lib/typescript/lib/module/Checkout/components/AccountSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/OrderSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/PayPalHtml.d.ts +2 -0
- package/lib/typescript/lib/module/Checkout/components/PayPalHtml.d.ts.map +1 -0
- package/lib/typescript/lib/module/Checkout/components/PayPalWebview.d.ts +5 -0
- package/lib/typescript/lib/module/Checkout/components/PayPalWebview.d.ts.map +1 -0
- package/lib/typescript/lib/module/Checkout/components/ShippingSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/index.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Checkbox.d.ts +1 -2
- package/lib/typescript/lib/module/Components/Checkbox.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Pagination.d.ts +11 -0
- package/lib/typescript/lib/module/Components/Pagination.d.ts.map +1 -0
- package/lib/typescript/lib/module/Wallet/components/ACHAddCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ACHAddCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AccountCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AccountLimitManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AccountLimitManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AccountManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AccountManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AccountSnoozeManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AddressCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AddressCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AddressManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AddressManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/DepositCard.d.ts +2 -2
- package/lib/typescript/lib/module/Wallet/components/DepositCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/FundAccountCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/FundAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ItemOrderCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ItemOrderCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ItemOrderDetailCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/LinkAccountManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ManageAccountCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ManageAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ManualCardAdd.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ManualCardAdd.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/MyBalance.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/OrderManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/OrderManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/RemoveAccount.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/RemoveAccount.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WalletActionSelector.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/WalletActionSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WalletSettings.d.ts +2 -4
- package/lib/typescript/lib/module/Wallet/components/WalletSettings.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WithdrawCard.d.ts +2 -2
- package/lib/typescript/lib/module/Wallet/components/WithdrawCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/index.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/PayPalHtml.d.ts +2 -0
- package/lib/typescript/src/Checkout/components/PayPalHtml.d.ts.map +1 -0
- package/lib/typescript/src/Checkout/components/PayPalWebview.d.ts +4 -0
- package/lib/typescript/src/Checkout/components/PayPalWebview.d.ts.map +1 -0
- package/lib/typescript/src/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/src/Components/Checkbox.d.ts.map +1 -1
- package/lib/typescript/src/Components/Pagination.d.ts +12 -0
- package/lib/typescript/src/Components/Pagination.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AccountLimitManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AccountManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AddressCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ItemOrderCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/OrderManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/RemoveAccount.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletSettings.d.ts +1 -1
- package/lib/typescript/src/Wallet/components/WalletSettings.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/Checkout/components/AccountSummaryCard.tsx +25 -27
- package/src/Checkout/components/ItemSummaryCard.tsx +4 -6
- package/src/Checkout/components/OrderSummaryCard.tsx +9 -11
- package/src/Checkout/components/PayPalHtml.ts +26 -0
- package/src/Checkout/components/PayPalOrderCapture.tsx +1 -1
- package/src/Checkout/components/PayPalWebview.tsx +118 -0
- package/src/Checkout/components/ShippingSummaryCard.tsx +5 -8
- package/src/Checkout/index.tsx +68 -96
- package/src/Components/Checkbox.tsx +7 -6
- package/src/Components/Icons.tsx +10 -10
- package/src/Components/Pagination.tsx +33 -0
- package/src/Wallet/components/ACHAddCard.tsx +90 -60
- package/src/Wallet/components/AccountCard.tsx +22 -21
- package/src/Wallet/components/AccountLimitManager.tsx +36 -54
- package/src/Wallet/components/AccountManager.tsx +95 -61
- package/src/Wallet/components/AccountSnoozeManager.tsx +39 -37
- package/src/Wallet/components/AddressCard.tsx +11 -11
- package/src/Wallet/components/AddressManager.tsx +33 -44
- package/src/Wallet/components/DepositCard.tsx +55 -53
- package/src/Wallet/components/FundAccountCard.tsx +52 -51
- package/src/Wallet/components/ItemOrderCard.tsx +13 -12
- package/src/Wallet/components/ItemOrderDetailCard.tsx +23 -22
- package/src/Wallet/components/LinkAccountManager.tsx +49 -59
- package/src/Wallet/components/ManageAccountCard.tsx +78 -47
- package/src/Wallet/components/ManualACHAdd.tsx +99 -79
- package/src/Wallet/components/ManualCardAdd.tsx +119 -95
- package/src/Wallet/components/MyBalance.tsx +38 -40
- package/src/Wallet/components/OrderManager.tsx +47 -37
- package/src/Wallet/components/RemoveAccount.tsx +12 -15
- package/src/Wallet/components/WalletActionSelector.tsx +70 -69
- package/src/Wallet/components/WalletSettings.tsx +137 -139
- package/src/Wallet/components/WalletSetup.tsx +150 -135
- package/src/Wallet/components/WithdrawCard.tsx +56 -56
- package/src/Wallet/index.tsx +23 -22
- package/src/constants/styles.ts +1 -1
- package/src/constants/useColors.tsx +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FlatList,
|
|
2
|
+
import { FlatList, Image } from 'react-native';
|
|
3
3
|
import type { AccountProps } from '../../types';
|
|
4
4
|
import AccountCard from './AccountCard';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
5
|
+
import { Icons } from '../../Components';
|
|
6
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
7
|
+
import { useColors } from '../../constants/useColors';
|
|
7
8
|
|
|
8
9
|
type AccountManagerProps = {
|
|
9
10
|
accounts:AccountProps[],
|
|
@@ -13,15 +14,16 @@ type AccountManagerProps = {
|
|
|
13
14
|
onSelectManualCard: () => void,
|
|
14
15
|
onSelectInstantBankTransfer: () => void
|
|
15
16
|
}
|
|
17
|
+
const screen_sections = ['header','my_accounts','new_account']
|
|
16
18
|
|
|
17
19
|
const AccountManager = ({ accounts, onSelectAccount, onSelectManualACH, onSelectManualCard, onSelectInstantBankTransfer , onClose}:AccountManagerProps) => {
|
|
18
|
-
|
|
20
|
+
const Colors = useColors();
|
|
19
21
|
const my_accounts = accounts.filter(a => !a.ibt_placeholder && !['bettoredge'].includes(a.account_type))
|
|
20
22
|
//const ibt_placeholder = accounts.find(a => a.ibt_placeholder);
|
|
21
23
|
|
|
22
24
|
const renderAccounts = (data:{item:AccountProps, index:number}) => {
|
|
23
25
|
return (
|
|
24
|
-
<View style={{ margin:5 }}>
|
|
26
|
+
<View transparent style={{ margin:5 }}>
|
|
25
27
|
<AccountCard
|
|
26
28
|
account={data.item}
|
|
27
29
|
onSelectAccount={(account) => onSelectAccount(account)}
|
|
@@ -30,70 +32,102 @@ const AccountManager = ({ accounts, onSelectAccount, onSelectManualACH, onSelec
|
|
|
30
32
|
)
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<View style={{ padding:10 }}>
|
|
42
|
-
<Text size={16} color={Colors.brand.midnight} weight='bold'>MY ACCOUNTS</Text>
|
|
43
|
-
<View style={{ marginTop:10 }}>
|
|
44
|
-
<FlatList
|
|
45
|
-
data={my_accounts}
|
|
46
|
-
renderItem={renderAccounts}
|
|
47
|
-
keyExtractor={(item) => item.account_id.toString()}
|
|
48
|
-
/>
|
|
49
|
-
</View>
|
|
50
|
-
</View>
|
|
51
|
-
:<></>}
|
|
52
|
-
<View style={{ padding:10, marginTop:20 }}>
|
|
53
|
-
<Text size={16} color={Colors.brand.midnight} weight='bold'>ADD NEW ACCOUNT</Text>
|
|
54
|
-
<TouchableOpacity style={{ marginTop:10, padding:3, flexDirection:'row', alignItems:'center', borderRadius:30, backgroundColor:Colors.shades.white }}
|
|
55
|
-
onPress={() => onSelectInstantBankTransfer()}>
|
|
56
|
-
<View style={{ height:50, width:110, borderRadius:100, justifyContent:'center', alignItems:'center', borderWidth:1, borderColor:Colors.brand.cobalt }}>
|
|
57
|
-
<Image
|
|
58
|
-
source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1695821528/1630344814441_wjq98b.png' }}
|
|
59
|
-
style={{ width:50, height:30 }}
|
|
60
|
-
resizeMode='cover'
|
|
61
|
-
/>
|
|
62
|
-
</View>
|
|
63
|
-
<View style={{ flex:1, marginLeft:5 }}>
|
|
64
|
-
<Text size={10} color={Colors.utility.success} weight='bold'>RECOMMENDED</Text>
|
|
65
|
-
<Text size={14} color={Colors.brand.cobalt} textAlign='left' weight='bold'>INSTANT BANK TRANSFER</Text>
|
|
35
|
+
const renderSections = (data:{item:string, index:number}) => {
|
|
36
|
+
switch(data.item){
|
|
37
|
+
case 'header':
|
|
38
|
+
return (
|
|
39
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:15 }}>
|
|
40
|
+
<View transparent style={{flex:1}}>
|
|
41
|
+
<Text size={20} theme='h1'>MANAGE MY ACCOUNTS</Text>
|
|
42
|
+
<Text style={{ marginTop:5}} theme='description'>Below are the accounts we have on file for you. Please select one to manage or transact!</Text>
|
|
66
43
|
</View>
|
|
67
|
-
</
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
44
|
+
</View>
|
|
45
|
+
)
|
|
46
|
+
case 'my_accounts':
|
|
47
|
+
return (
|
|
48
|
+
<View style={{ marginTop:10 }}>
|
|
49
|
+
<View type='header' style={{ padding:20, flexDirection:'row', alignItems:'center' }}>
|
|
50
|
+
<View transparent style={{ flex:1 }}>
|
|
51
|
+
<Text theme='h1'>MY ACCOUNTS</Text>
|
|
52
|
+
<Text style={{ marginTop:3 }} theme='description'>Accounts already linked or ways to transact immediately</Text>
|
|
53
|
+
</View>
|
|
75
54
|
</View>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
55
|
+
<View type='body' style={{ padding:20 }}>
|
|
56
|
+
<FlatList
|
|
57
|
+
data={my_accounts}
|
|
58
|
+
renderItem={renderAccounts}
|
|
59
|
+
keyExtractor={(item) => item.account_id.toString()}
|
|
60
|
+
/>
|
|
81
61
|
</View>
|
|
82
|
-
|
|
83
|
-
|
|
62
|
+
</View>
|
|
63
|
+
)
|
|
64
|
+
case 'new_account':
|
|
65
|
+
return (
|
|
66
|
+
<View>
|
|
67
|
+
<View type='header' style={{ padding:20, flexDirection:'row', alignItems:'center' }}>
|
|
68
|
+
<View transparent style={{ flex:1 }}>
|
|
69
|
+
<Text theme='h1' color={Colors.text.success}>ADD NEW ACCOUNT</Text>
|
|
70
|
+
<Text style={{ marginTop:3 }} theme='description'>Link a new account and use to transact</Text>
|
|
71
|
+
</View>
|
|
84
72
|
</View>
|
|
85
|
-
|
|
73
|
+
<View type='body' style={{ padding:20 }}>
|
|
74
|
+
<Button float style={{ marginTop:10, padding:5, flexDirection:'row', alignItems:'center' }}
|
|
75
|
+
onPress={() => onSelectInstantBankTransfer()}>
|
|
76
|
+
<View style={{ height:50, width:80, borderRadius:8, justifyContent:'center', alignItems:'center', borderWidth:1, borderColor:Colors.absolutes.brand.cobalt }}>
|
|
77
|
+
<Image
|
|
78
|
+
source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1695821528/1630344814441_wjq98b.png' }}
|
|
79
|
+
style={{ width:50, height:30 }}
|
|
80
|
+
resizeMode='cover'
|
|
81
|
+
/>
|
|
82
|
+
</View>
|
|
83
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
84
|
+
<Text size={10} color={Colors.text.success} weight='bold'>RECOMMENDED</Text>
|
|
85
|
+
<Text size={14} theme='h1' textAlign='left'>INSTANT BANK TRANSFER</Text>
|
|
86
|
+
</View>
|
|
87
|
+
</Button>
|
|
88
|
+
<Button float style={{ marginTop:10, padding:5, flexDirection:'row', alignItems:'center' }}
|
|
89
|
+
onPress={() => onSelectManualACH()}>
|
|
90
|
+
<View float style={{ height:50, width:50, justifyContent:'center', alignItems:'center' }}>
|
|
91
|
+
<Icons.BankIcon size={22} color={Colors.text.h1} />
|
|
92
|
+
</View>
|
|
93
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
94
|
+
<Text size={14} theme='h2' textAlign='left'>ADD MANUAL ACH ACCOUNT</Text>
|
|
95
|
+
</View>
|
|
96
|
+
</Button>
|
|
97
|
+
<Button float style={{ marginTop:10, padding:5, flexDirection:'row', alignItems:'center' }}
|
|
98
|
+
onPress={() => onSelectManualCard()}>
|
|
99
|
+
<View float style={{ height:50, width:50, justifyContent:'center', alignItems:'center'}}>
|
|
100
|
+
<Icons.CreditCardIcon size={22} color={Colors.text.highlight} />
|
|
101
|
+
</View>
|
|
102
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
103
|
+
<Text size={14} theme='h2' textAlign='left'>ADD NEW CARD ACCOUNT</Text>
|
|
104
|
+
</View>
|
|
105
|
+
</Button>
|
|
106
|
+
</View>
|
|
86
107
|
|
|
87
108
|
</View>
|
|
88
|
-
|
|
89
|
-
|
|
109
|
+
)
|
|
110
|
+
default: return <></>
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<View style={{ flex:1 }}>
|
|
116
|
+
|
|
117
|
+
<View style={{ flex:1 }}>
|
|
118
|
+
<FlatList
|
|
119
|
+
key='account_sections'
|
|
120
|
+
data={screen_sections}
|
|
121
|
+
renderItem={renderSections}
|
|
122
|
+
keyExtractor={(item) => item}
|
|
123
|
+
/>
|
|
124
|
+
|
|
125
|
+
</View>
|
|
126
|
+
<View type='footer' style={{ flexDirection:'row', padding:20 }}>
|
|
90
127
|
<Button
|
|
91
|
-
style={{ flex:1
|
|
128
|
+
style={{ flex:1 }}
|
|
92
129
|
title={'BACK'}
|
|
93
|
-
|
|
94
|
-
borderWidth={1}
|
|
95
|
-
borderColor={Colors.brand.electric}
|
|
96
|
-
padding={15}
|
|
130
|
+
type='close'
|
|
97
131
|
onPress={() => onClose()}
|
|
98
132
|
/>
|
|
99
133
|
</View>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { FlatList
|
|
2
|
+
import { FlatList } from 'react-native';
|
|
3
3
|
import type { AccountProps, AccountSnoozeProps } from '../../types';
|
|
4
4
|
import { WalletApi } from '../api';
|
|
5
|
-
import {
|
|
6
|
-
import Colors from '../../constants/colors';
|
|
5
|
+
import { Icons } from '../../Components';
|
|
7
6
|
import moment from 'moment-mini';
|
|
7
|
+
import { useColors } from '../../constants/useColors';
|
|
8
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
8
9
|
|
|
9
10
|
const duration_options = [1,7,14,30]
|
|
10
11
|
|
|
@@ -15,6 +16,7 @@ type AccountSnoozeManagerProps = {
|
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
const AccountSnoozeManager = ({ account, onCancel, onSnooze } : AccountSnoozeManagerProps) => {
|
|
19
|
+
const Colors = useColors();
|
|
18
20
|
const [ loading, setLoading ] = useState(false);
|
|
19
21
|
const [ dropdown_visible, setDropdownVisible ] = useState(false);
|
|
20
22
|
const [ disclaimer, setDisclaimer ] = useState(false);
|
|
@@ -66,58 +68,56 @@ const AccountSnoozeManager = ({ account, onCancel, onSnooze } : AccountSnoozeMan
|
|
|
66
68
|
|
|
67
69
|
const renderOptions = (data: { item:number, index:number }) => {
|
|
68
70
|
return (
|
|
69
|
-
<
|
|
71
|
+
<Button style={{ padding:10, borderBottomWidth:1, borderColor:Colors.borders.light }} onPress={() => {
|
|
70
72
|
setActiveDuration(data.item);
|
|
71
73
|
setDropdownVisible(false);
|
|
72
74
|
}}>
|
|
73
|
-
<Text
|
|
74
|
-
</
|
|
75
|
+
<Text theme='h2' size={14}>{data.item} days</Text>
|
|
76
|
+
</Button>
|
|
75
77
|
)
|
|
76
78
|
}
|
|
77
79
|
const valid = active_duration ? true : false;
|
|
78
80
|
return (
|
|
79
81
|
<View style={{ flex:1 }}>
|
|
80
82
|
<View style={{ padding:20 }}>
|
|
81
|
-
<Text size={30}
|
|
82
|
-
<Text style={{ marginTop:15 }} size={16}
|
|
83
|
+
<Text size={30} theme='h2'>Snooze Account</Text>
|
|
84
|
+
<Text style={{ marginTop:15 }} size={16} theme='description'>Take a break from the real money features of BettorEdge using this account.</Text>
|
|
83
85
|
</View>
|
|
84
|
-
<
|
|
85
|
-
<Text size={16}
|
|
86
|
-
<
|
|
86
|
+
<View style={{ flex:1, padding:16}}>
|
|
87
|
+
<Text size={16} theme='h2'>Amount</Text>
|
|
88
|
+
<Button
|
|
89
|
+
float
|
|
87
90
|
onPress={() => setDropdownVisible(!dropdown_visible)}
|
|
88
|
-
style={{marginTop:8, flexDirection:'row', alignItems:'center', justifyContent:'space-between', padding:15
|
|
89
|
-
<Text
|
|
90
|
-
<Icons.ChevronIcon direction='down' color={Colors.
|
|
91
|
-
</
|
|
91
|
+
style={{marginTop:8, flexDirection:'row', alignItems:'center', justifyContent:'space-between', padding:15 }}>
|
|
92
|
+
<Text theme='h2'>{active_duration?`${active_duration} Days`:'Select Duration'}</Text>
|
|
93
|
+
<Icons.ChevronIcon direction='down' color={Colors.text.h1} size={8} />
|
|
94
|
+
</Button>
|
|
92
95
|
{dropdown_visible ?
|
|
93
|
-
<View style={{ borderBottomRightRadius:8, borderBottomLeftRadius:8, padding:10, borderWidth:1, borderTopWidth:1, borderColor:Colors.
|
|
96
|
+
<View style={{ borderBottomRightRadius:8, borderBottomLeftRadius:8, padding:10, borderWidth:1, borderTopWidth:1, borderColor:Colors.borders.light }}>
|
|
94
97
|
<FlatList
|
|
95
98
|
data={duration_options}
|
|
96
99
|
renderItem={renderOptions}
|
|
97
100
|
/>
|
|
98
101
|
</View>
|
|
99
102
|
:<></>}
|
|
100
|
-
</
|
|
103
|
+
</View>
|
|
101
104
|
{ valid ?
|
|
102
105
|
<View nativeID='snooze_disclaimer' style={{ margin:10 }}>
|
|
103
|
-
<
|
|
104
|
-
<View style={{ justifyContent:'center', marginRight:10, alignItems:'center', height:25, width:25, borderRadius:4, backgroundColor: disclaimer ? Colors.
|
|
106
|
+
<Button style={{ flexDirection:'row', padding:5 }} onPress={() => setDisclaimer(!disclaimer)}>
|
|
107
|
+
<View style={{ justifyContent:'center', marginRight:10, alignItems:'center', height:25, width:25, borderRadius:4, backgroundColor: disclaimer ? Colors.text.h1 : 'transparent', borderWidth:1, borderColor:Colors.text.h1 }}>
|
|
105
108
|
{disclaimer ?
|
|
106
|
-
<Icons.CheckIcon color={Colors.
|
|
109
|
+
<Icons.CheckIcon color={Colors.text.h1} size={14} />
|
|
107
110
|
:<></>}
|
|
108
111
|
</View>
|
|
109
|
-
<Text size={14}
|
|
110
|
-
</
|
|
112
|
+
<Text size={14} theme='description'>I confirm I wwould like to snooze my account for {active_duration} days. This cannot be undone!</Text>
|
|
113
|
+
</Button>
|
|
111
114
|
</View>
|
|
112
115
|
:<></>}
|
|
113
116
|
<View nativeID='action_row' style={{ flexDirection:'row', padding:20 }}>
|
|
114
117
|
<Button
|
|
115
118
|
style={{ flex:1, marginRight:5, opacity: 1 }}
|
|
116
119
|
title={'CLOSE'}
|
|
117
|
-
|
|
118
|
-
borderColor={Colors.brand.electric}
|
|
119
|
-
borderWidth={1}
|
|
120
|
-
padding={15}
|
|
120
|
+
type='close'
|
|
121
121
|
onPress={() => onCancel()}
|
|
122
122
|
/>
|
|
123
123
|
<Button
|
|
@@ -125,24 +125,26 @@ const AccountSnoozeManager = ({ account, onCancel, onSnooze } : AccountSnoozeMan
|
|
|
125
125
|
title={'SAVE SNOOZE'}
|
|
126
126
|
disabled={!valid||!disclaimer}
|
|
127
127
|
loading={loading}
|
|
128
|
-
|
|
129
|
-
backgroundColor={Colors.brand.electric}
|
|
130
|
-
padding={15}
|
|
128
|
+
type='success'
|
|
131
129
|
onPress={() => handleSetSnooze()}
|
|
132
130
|
/>
|
|
133
131
|
</View>
|
|
134
132
|
|
|
135
133
|
{account_snooze ?
|
|
136
|
-
<View style={{ position:'absolute', top:0, right:0, left:0, bottom:0,
|
|
137
|
-
<View style={{
|
|
138
|
-
<View style={{ padding:10,
|
|
139
|
-
<Icons.SnoozeIcon size={24} color={Colors.
|
|
134
|
+
<View type='blur' style={{ position:'absolute', top:0, right:0, left:0, bottom:0, justifyContent:'center', alignItems:'center' }}>
|
|
135
|
+
<View style={{ borderRadius:8, padding:20}}>
|
|
136
|
+
<View float style={{ padding:10, borderRadius:8, alignSelf:'center' }}>
|
|
137
|
+
<Icons.SnoozeIcon size={24} color={Colors.text.h1} />
|
|
140
138
|
</View>
|
|
141
139
|
<Text style={{ padding:10 }} size={18} weight='bold' textAlign='center'>Account is Snoozing</Text>
|
|
142
|
-
<Text size={14}
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
140
|
+
<Text size={14} theme='h1' textAlign='center'>Snooze ends {moment(account_snooze.end_datetime).fromNow()}</Text>
|
|
141
|
+
<Button
|
|
142
|
+
type='close'
|
|
143
|
+
style={{ marginTop:10 }}
|
|
144
|
+
onPress={() => onCancel()}
|
|
145
|
+
>
|
|
146
|
+
<Text size={14} theme='action' textAlign='center'>Go Back</Text>
|
|
147
|
+
</Button>
|
|
146
148
|
</View>
|
|
147
149
|
</View>
|
|
148
150
|
:<></>}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TouchableOpacity, View } from 'react-native';
|
|
3
2
|
import type { PlayerAddressProps } from '../../types';
|
|
4
|
-
import { Button, Text } from '../../Components';
|
|
5
|
-
import
|
|
3
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
4
|
+
import { useColors } from '../../constants/useColors';
|
|
6
5
|
|
|
7
6
|
type AddressCardProps = {
|
|
8
7
|
address:PlayerAddressProps,
|
|
@@ -12,18 +11,19 @@ type AddressCardProps = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
const AddressCard = ({ hide_delete, address, onSelect, onDelete }:AddressCardProps) => {
|
|
14
|
+
const Colors = useColors();
|
|
15
15
|
return (
|
|
16
|
-
<View nativeID='address_info' style={{ padding:10, flexDirection:'row', alignItems:'center', borderWidth:1, borderColor:Colors.
|
|
17
|
-
<
|
|
18
|
-
<Text
|
|
19
|
-
<Text style={{ marginTop:4 }} size={14}
|
|
20
|
-
<Text style={{ marginTop:2 }} size={14}
|
|
21
|
-
</
|
|
16
|
+
<View nativeID='address_info' style={{ padding:10, flexDirection:'row', alignItems:'center', borderWidth:1, borderColor:Colors.borders.light, borderRadius:8 }} >
|
|
17
|
+
<Button style={{ flex:1, padding:5 }} onPress={() => onSelect(address)}>
|
|
18
|
+
<Text theme='h1' size={16}>{address.name}</Text>
|
|
19
|
+
<Text style={{ marginTop:4 }} size={14} theme='description'>{address.street}</Text>
|
|
20
|
+
<Text style={{ marginTop:2 }} size={14} theme='description'>{address.city} {address.state} {address.zip}</Text>
|
|
21
|
+
</Button>
|
|
22
22
|
{!hide_delete ?
|
|
23
23
|
<Button
|
|
24
24
|
title='DELETE'
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
style={{ padding:10 }}
|
|
26
|
+
type='error'
|
|
27
27
|
onPress={() => onDelete(address)}
|
|
28
28
|
/>
|
|
29
29
|
:<></>}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { FlatList
|
|
2
|
+
import { FlatList } from 'react-native';
|
|
3
3
|
import type { LocationProps, MyPlayerProps, PlayerAddressProps } from '../../types';
|
|
4
4
|
import { WalletApi, WalletHelpers } from '../api';
|
|
5
5
|
import AddressCard from './AddressCard';
|
|
6
|
-
import { Button, Text, TextInput } from '../../Components';
|
|
7
|
-
import
|
|
6
|
+
import { Button, Text, TextInput, View } from '../../Components/Themed';
|
|
7
|
+
import { useColors } from '../../constants/useColors';
|
|
8
8
|
|
|
9
9
|
type AddressManaertProps = {
|
|
10
10
|
player?:MyPlayerProps
|
|
@@ -25,12 +25,12 @@ type AddressManaertProps = {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const AddressManager = ({ location, player_addresses, onSelect, onCancel, onAddAddress, onRemoveAddress }:AddressManaertProps) => {
|
|
28
|
+
const Colors = useColors();
|
|
28
29
|
const [ loading, setLoading ] = useState(false);
|
|
29
30
|
const [ draft_address, setDraftAddress ] = useState<PlayerAddressProps|undefined>(undefined)
|
|
30
31
|
|
|
31
32
|
const address_errors = WalletHelpers.isAddressValid(draft_address)
|
|
32
33
|
|
|
33
|
-
|
|
34
34
|
const handleCreateAddress = async() => {
|
|
35
35
|
if(!draft_address){ return } //
|
|
36
36
|
if(loading){ return } //Prevent button mashing
|
|
@@ -77,27 +77,26 @@ const AddressManager = ({ location, player_addresses, onSelect, onCancel, onAddA
|
|
|
77
77
|
return (
|
|
78
78
|
<View style={{ flex:1, minHeight:600 }}>
|
|
79
79
|
<View style={{ padding:20 }}>
|
|
80
|
-
<Text size={30}
|
|
81
|
-
<Text style={{ marginTop:15 }} size={16}
|
|
80
|
+
<Text size={30} theme='h1'>CREATE NEW ADDRESS</Text>
|
|
81
|
+
<Text style={{ marginTop:15 }} size={16} theme='description'>Use the form below to create a new address.</Text>
|
|
82
82
|
</View>
|
|
83
|
-
<
|
|
84
|
-
<View nativeID='address_name' style={{
|
|
85
|
-
<Text size={16}
|
|
86
|
-
<Text style={{ margin:3 }} size={12}
|
|
83
|
+
<View style={{ flex:1, padding:20 }}>
|
|
84
|
+
<View nativeID='address_name' style={{ borderRadius:4, margin:5, padding:10 }}>
|
|
85
|
+
<Text size={16} theme='h1' textAlign='center'>Address Name / Label</Text>
|
|
86
|
+
<Text style={{ margin:3 }} size={12} theme='description' textAlign='center'>Give address a name (i.e., Home) to make it easily identifiable.</Text>
|
|
87
87
|
<TextInput
|
|
88
88
|
value={draft_address.name}
|
|
89
89
|
placeholder='My Home'
|
|
90
|
-
placeholderTextColor={Colors.brand.slate}
|
|
91
90
|
onChangeText={(e) => setDraftAddress({ ...draft_address, name: e })}
|
|
92
91
|
/>
|
|
93
92
|
{location?.player_address ?
|
|
94
|
-
<
|
|
95
|
-
<Text size={14} textAlign='center' weight='regular'
|
|
96
|
-
</
|
|
93
|
+
<Button style={{ marginTop:5, padding:10 }} onPress={() => tryAutoFill()}>
|
|
94
|
+
<Text size={14} textAlign='center' weight='regular' theme='action'>Autofill with Location</Text>
|
|
95
|
+
</Button>
|
|
97
96
|
:<></>}
|
|
98
97
|
</View>
|
|
99
98
|
<View nativeID='address_street' style={{ flexDirection:'row', alignItems:'center', margin:5 }}>
|
|
100
|
-
<Text style={{ flex:1/4 }} size={14}
|
|
99
|
+
<Text style={{ flex:1/4 }} size={14} theme='description'>Street</Text>
|
|
101
100
|
<TextInput
|
|
102
101
|
style={{ flex:1 }}
|
|
103
102
|
value={draft_address.street}
|
|
@@ -105,7 +104,7 @@ const AddressManager = ({ location, player_addresses, onSelect, onCancel, onAddA
|
|
|
105
104
|
/>
|
|
106
105
|
</View>
|
|
107
106
|
<View nativeID='address_city' style={{ flexDirection:'row', alignItems:'center', margin:5 }}>
|
|
108
|
-
<Text style={{ flex:1/4 }} size={14}
|
|
107
|
+
<Text style={{ flex:1/4 }} size={14} theme='description'>City</Text>
|
|
109
108
|
<TextInput
|
|
110
109
|
style={{ flex:1 }}
|
|
111
110
|
value={draft_address.city}
|
|
@@ -113,43 +112,36 @@ const AddressManager = ({ location, player_addresses, onSelect, onCancel, onAddA
|
|
|
113
112
|
/>
|
|
114
113
|
</View>
|
|
115
114
|
<View nativeID='address_state' style={{ flexDirection:'row', alignItems:'center', margin:5 }}>
|
|
116
|
-
<Text style={{ flex:1/4 }} size={14}
|
|
115
|
+
<Text style={{ flex:1/4 }} size={14} theme='description'>State</Text>
|
|
117
116
|
<TextInput
|
|
118
117
|
value={draft_address.state}
|
|
119
118
|
placeholder='MN'
|
|
120
119
|
style={{ flex:1 }}
|
|
121
|
-
placeholderTextColor={Colors.shades.shade600}
|
|
122
120
|
onChangeText={(e) => setDraftAddress({ ...draft_address, state: e })}
|
|
123
121
|
/>
|
|
124
122
|
</View>
|
|
125
|
-
<Text size={12} color={Colors.
|
|
123
|
+
<Text size={12} color={Colors.text.warning} textAlign='right'>Two letter codes only accepted</Text>
|
|
126
124
|
<View nativeID='address_zip' style={{ flexDirection:'row', alignItems:'center', margin:5 }}>
|
|
127
|
-
<Text style={{ flex:1/4 }} size={14}
|
|
125
|
+
<Text style={{ flex:1/4 }} size={14} theme='description'>Zip</Text>
|
|
128
126
|
<TextInput
|
|
129
127
|
style={{ flex:1 }}
|
|
130
128
|
value={draft_address.zip}
|
|
131
129
|
onChangeText={(e) => setDraftAddress({ ...draft_address, zip: e })}
|
|
132
130
|
/>
|
|
133
131
|
</View>
|
|
134
|
-
</
|
|
132
|
+
</View>
|
|
135
133
|
<View style={{ flexDirection:'row', padding:20 }}>
|
|
136
134
|
<Button
|
|
137
135
|
style={{ flex:1, marginRight:5, opacity: 1 }}
|
|
138
136
|
title={'CANCEL'}
|
|
139
|
-
|
|
140
|
-
borderWidth={1}
|
|
141
|
-
borderColor={Colors.brand.electric}
|
|
142
|
-
padding={15}
|
|
137
|
+
type='error'
|
|
143
138
|
onPress={() => setDraftAddress(undefined)}
|
|
144
139
|
/>
|
|
145
140
|
<Button
|
|
146
141
|
style={{ flex:3, opacity:address_errors.length == 0 && !loading ? 1 : 0.5 }}
|
|
147
142
|
title={'CREATE'}
|
|
148
143
|
disabled={address_errors.length > 0 || loading ? true : false}
|
|
149
|
-
|
|
150
|
-
loading={loading}
|
|
151
|
-
backgroundColor={Colors.utility.success}
|
|
152
|
-
padding={15}
|
|
144
|
+
type='success'
|
|
153
145
|
onPress={() => handleCreateAddress()}
|
|
154
146
|
/>
|
|
155
147
|
</View>
|
|
@@ -162,16 +154,18 @@ const AddressManager = ({ location, player_addresses, onSelect, onCancel, onAddA
|
|
|
162
154
|
return (
|
|
163
155
|
<View style={{ flex:1, minHeight:600 }}>
|
|
164
156
|
<View style={{ padding:20 }}>
|
|
165
|
-
<Text size={30}
|
|
166
|
-
<Text style={{ marginTop:15 }} size={16}
|
|
157
|
+
<Text size={30} theme='h1'>MY ADDRESSES</Text>
|
|
158
|
+
<Text style={{ marginTop:15 }} size={16} theme='description'>Below are the addresses we have on file. Manage or add a new one below</Text>
|
|
167
159
|
</View>
|
|
168
160
|
{player_addresses.length == 0 ?
|
|
169
|
-
<View style={{ flex:1, padding:10, borderRadius:8, margin:10,
|
|
170
|
-
<Text size={18}
|
|
171
|
-
<Text style={{ marginTop:10 }} size={14}
|
|
172
|
-
<
|
|
173
|
-
|
|
174
|
-
|
|
161
|
+
<View float style={{ flex:1, padding:10, borderRadius:8, margin:10, justifyContent:'center', alignItems:'center' }}>
|
|
162
|
+
<Text size={18} theme='h1' textAlign='center'>Uh Oh!</Text>
|
|
163
|
+
<Text style={{ marginTop:10 }} size={14} theme='description' textAlign='center'>It looks like you dont have any saved addresses</Text>
|
|
164
|
+
<Button
|
|
165
|
+
style={{ marginTop:20, padding:10, borderRadius:4 }}
|
|
166
|
+
type='success'
|
|
167
|
+
title='Create New Address'
|
|
168
|
+
onPress={() => setDraftAddress(WalletHelpers.getEmptyAddress())}/>
|
|
175
169
|
</View>
|
|
176
170
|
:<></>}
|
|
177
171
|
<View style={{ flex:1, padding:20 }}>
|
|
@@ -181,18 +175,13 @@ const AddressManager = ({ location, player_addresses, onSelect, onCancel, onAddA
|
|
|
181
175
|
<Button
|
|
182
176
|
style={{ flex:1, marginRight:5, opacity: 1 }}
|
|
183
177
|
title={'CLOSE'}
|
|
184
|
-
|
|
185
|
-
borderWidth={1}
|
|
186
|
-
borderColor={Colors.brand.electric}
|
|
187
|
-
padding={15}
|
|
178
|
+
type='close'
|
|
188
179
|
onPress={() => onCancel()}
|
|
189
180
|
/>
|
|
190
181
|
<Button
|
|
191
182
|
style={{ flex:3 }}
|
|
192
183
|
title={'NEW ADDRESS'}
|
|
193
|
-
|
|
194
|
-
backgroundColor={Colors.brand.electric}
|
|
195
|
-
padding={15}
|
|
184
|
+
type='success'
|
|
196
185
|
onPress={() => setDraftAddress(WalletHelpers.getEmptyAddress())}
|
|
197
186
|
/>
|
|
198
187
|
</View>
|