be-components 3.6.0 → 3.6.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 (160) hide show
  1. package/lib/commonjs/Components/Pagination.js +37 -0
  2. package/lib/commonjs/Components/Pagination.js.map +1 -0
  3. package/lib/commonjs/Wallet/components/AccountCard.js +27 -28
  4. package/lib/commonjs/Wallet/components/AccountCard.js.map +1 -1
  5. package/lib/commonjs/Wallet/components/AccountLimitManager.js +60 -95
  6. package/lib/commonjs/Wallet/components/AccountLimitManager.js.map +1 -1
  7. package/lib/commonjs/Wallet/components/AccountManager.js +209 -158
  8. package/lib/commonjs/Wallet/components/AccountManager.js.map +1 -1
  9. package/lib/commonjs/Wallet/components/AccountSnoozeManager.js +53 -66
  10. package/lib/commonjs/Wallet/components/AccountSnoozeManager.js.map +1 -1
  11. package/lib/commonjs/Wallet/components/DepositCard.js +93 -99
  12. package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -1
  13. package/lib/commonjs/Wallet/components/ItemOrderCard.js +26 -29
  14. package/lib/commonjs/Wallet/components/ItemOrderCard.js.map +1 -1
  15. package/lib/commonjs/Wallet/components/ItemOrderDetailCard.js +43 -46
  16. package/lib/commonjs/Wallet/components/ItemOrderDetailCard.js.map +1 -1
  17. package/lib/commonjs/Wallet/components/ManageAccountCard.js +85 -60
  18. package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -1
  19. package/lib/commonjs/Wallet/components/OrderManager.js +61 -58
  20. package/lib/commonjs/Wallet/components/OrderManager.js.map +1 -1
  21. package/lib/commonjs/Wallet/components/RemoveAccount.js +22 -23
  22. package/lib/commonjs/Wallet/components/RemoveAccount.js.map +1 -1
  23. package/lib/commonjs/Wallet/components/WalletActionSelector.js +130 -133
  24. package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -1
  25. package/lib/commonjs/Wallet/components/WalletSettings.js +382 -547
  26. package/lib/commonjs/Wallet/components/WalletSettings.js.map +1 -1
  27. package/lib/commonjs/Wallet/components/WalletSetup.js +85 -107
  28. package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
  29. package/lib/commonjs/Wallet/components/WithdrawCard.js +91 -111
  30. package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -1
  31. package/lib/commonjs/Wallet/index.js +22 -24
  32. package/lib/commonjs/Wallet/index.js.map +1 -1
  33. package/lib/commonjs/constants/styles.js +1 -1
  34. package/lib/commonjs/constants/styles.js.map +1 -1
  35. package/lib/commonjs/constants/useColors.js +1 -1
  36. package/lib/commonjs/constants/useColors.js.map +1 -1
  37. package/lib/module/Components/Pagination.js +30 -0
  38. package/lib/module/Components/Pagination.js.map +1 -0
  39. package/lib/module/Wallet/components/AccountCard.js +23 -24
  40. package/lib/module/Wallet/components/AccountCard.js.map +1 -1
  41. package/lib/module/Wallet/components/AccountLimitManager.js +43 -77
  42. package/lib/module/Wallet/components/AccountLimitManager.js.map +1 -1
  43. package/lib/module/Wallet/components/AccountManager.js +206 -155
  44. package/lib/module/Wallet/components/AccountManager.js.map +1 -1
  45. package/lib/module/Wallet/components/AccountSnoozeManager.js +35 -48
  46. package/lib/module/Wallet/components/AccountSnoozeManager.js.map +1 -1
  47. package/lib/module/Wallet/components/DepositCard.js +62 -67
  48. package/lib/module/Wallet/components/DepositCard.js.map +1 -1
  49. package/lib/module/Wallet/components/ItemOrderCard.js +17 -20
  50. package/lib/module/Wallet/components/ItemOrderCard.js.map +1 -1
  51. package/lib/module/Wallet/components/ItemOrderDetailCard.js +28 -31
  52. package/lib/module/Wallet/components/ItemOrderDetailCard.js.map +1 -1
  53. package/lib/module/Wallet/components/ManageAccountCard.js +80 -55
  54. package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -1
  55. package/lib/module/Wallet/components/OrderManager.js +59 -56
  56. package/lib/module/Wallet/components/OrderManager.js.map +1 -1
  57. package/lib/module/Wallet/components/RemoveAccount.js +16 -16
  58. package/lib/module/Wallet/components/RemoveAccount.js.map +1 -1
  59. package/lib/module/Wallet/components/WalletActionSelector.js +102 -104
  60. package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -1
  61. package/lib/module/Wallet/components/WalletSettings.js +381 -545
  62. package/lib/module/Wallet/components/WalletSettings.js.map +1 -1
  63. package/lib/module/Wallet/components/WalletSetup.js +42 -64
  64. package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
  65. package/lib/module/Wallet/components/WithdrawCard.js +52 -71
  66. package/lib/module/Wallet/components/WithdrawCard.js.map +1 -1
  67. package/lib/module/Wallet/index.js +15 -17
  68. package/lib/module/Wallet/index.js.map +1 -1
  69. package/lib/module/constants/styles.js +1 -1
  70. package/lib/module/constants/styles.js.map +1 -1
  71. package/lib/module/constants/useColors.js +1 -1
  72. package/lib/module/constants/useColors.js.map +1 -1
  73. package/lib/typescript/lib/commonjs/Components/Pagination.d.ts +11 -0
  74. package/lib/typescript/lib/commonjs/Components/Pagination.d.ts.map +1 -0
  75. package/lib/typescript/lib/commonjs/Wallet/components/AccountCard.d.ts.map +1 -1
  76. package/lib/typescript/lib/commonjs/Wallet/components/AccountLimitManager.d.ts.map +1 -1
  77. package/lib/typescript/lib/commonjs/Wallet/components/AccountManager.d.ts.map +1 -1
  78. package/lib/typescript/lib/commonjs/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
  79. package/lib/typescript/lib/commonjs/Wallet/components/DepositCard.d.ts.map +1 -1
  80. package/lib/typescript/lib/commonjs/Wallet/components/ItemOrderCard.d.ts.map +1 -1
  81. package/lib/typescript/lib/commonjs/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
  82. package/lib/typescript/lib/commonjs/Wallet/components/ManageAccountCard.d.ts.map +1 -1
  83. package/lib/typescript/lib/commonjs/Wallet/components/OrderManager.d.ts.map +1 -1
  84. package/lib/typescript/lib/commonjs/Wallet/components/RemoveAccount.d.ts.map +1 -1
  85. package/lib/typescript/lib/commonjs/Wallet/components/WalletActionSelector.d.ts.map +1 -1
  86. package/lib/typescript/lib/commonjs/Wallet/components/WalletSettings.d.ts +1 -2
  87. package/lib/typescript/lib/commonjs/Wallet/components/WalletSettings.d.ts.map +1 -1
  88. package/lib/typescript/lib/commonjs/Wallet/components/WalletSetup.d.ts.map +1 -1
  89. package/lib/typescript/lib/commonjs/Wallet/components/WithdrawCard.d.ts.map +1 -1
  90. package/lib/typescript/lib/commonjs/Wallet/index.d.ts.map +1 -1
  91. package/lib/typescript/lib/commonjs/constants/styles.d.ts +1 -1
  92. package/lib/typescript/lib/module/Components/Pagination.d.ts +11 -0
  93. package/lib/typescript/lib/module/Components/Pagination.d.ts.map +1 -0
  94. package/lib/typescript/lib/module/Wallet/components/AccountCard.d.ts +1 -2
  95. package/lib/typescript/lib/module/Wallet/components/AccountCard.d.ts.map +1 -1
  96. package/lib/typescript/lib/module/Wallet/components/AccountLimitManager.d.ts +1 -2
  97. package/lib/typescript/lib/module/Wallet/components/AccountLimitManager.d.ts.map +1 -1
  98. package/lib/typescript/lib/module/Wallet/components/AccountManager.d.ts +1 -2
  99. package/lib/typescript/lib/module/Wallet/components/AccountManager.d.ts.map +1 -1
  100. package/lib/typescript/lib/module/Wallet/components/AccountSnoozeManager.d.ts +1 -2
  101. package/lib/typescript/lib/module/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
  102. package/lib/typescript/lib/module/Wallet/components/DepositCard.d.ts +2 -2
  103. package/lib/typescript/lib/module/Wallet/components/DepositCard.d.ts.map +1 -1
  104. package/lib/typescript/lib/module/Wallet/components/ItemOrderCard.d.ts +1 -2
  105. package/lib/typescript/lib/module/Wallet/components/ItemOrderCard.d.ts.map +1 -1
  106. package/lib/typescript/lib/module/Wallet/components/ItemOrderDetailCard.d.ts +1 -2
  107. package/lib/typescript/lib/module/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
  108. package/lib/typescript/lib/module/Wallet/components/ManageAccountCard.d.ts +1 -2
  109. package/lib/typescript/lib/module/Wallet/components/ManageAccountCard.d.ts.map +1 -1
  110. package/lib/typescript/lib/module/Wallet/components/OrderManager.d.ts +1 -2
  111. package/lib/typescript/lib/module/Wallet/components/OrderManager.d.ts.map +1 -1
  112. package/lib/typescript/lib/module/Wallet/components/RemoveAccount.d.ts +1 -2
  113. package/lib/typescript/lib/module/Wallet/components/RemoveAccount.d.ts.map +1 -1
  114. package/lib/typescript/lib/module/Wallet/components/WalletActionSelector.d.ts +1 -2
  115. package/lib/typescript/lib/module/Wallet/components/WalletActionSelector.d.ts.map +1 -1
  116. package/lib/typescript/lib/module/Wallet/components/WalletSettings.d.ts +2 -4
  117. package/lib/typescript/lib/module/Wallet/components/WalletSettings.d.ts.map +1 -1
  118. package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts +2 -2
  119. package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts.map +1 -1
  120. package/lib/typescript/lib/module/Wallet/components/WithdrawCard.d.ts +2 -2
  121. package/lib/typescript/lib/module/Wallet/components/WithdrawCard.d.ts.map +1 -1
  122. package/lib/typescript/lib/module/Wallet/index.d.ts +1 -2
  123. package/lib/typescript/lib/module/Wallet/index.d.ts.map +1 -1
  124. package/lib/typescript/src/Components/Pagination.d.ts +12 -0
  125. package/lib/typescript/src/Components/Pagination.d.ts.map +1 -0
  126. package/lib/typescript/src/Wallet/components/AccountCard.d.ts.map +1 -1
  127. package/lib/typescript/src/Wallet/components/AccountLimitManager.d.ts.map +1 -1
  128. package/lib/typescript/src/Wallet/components/AccountManager.d.ts.map +1 -1
  129. package/lib/typescript/src/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
  130. package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -1
  131. package/lib/typescript/src/Wallet/components/ItemOrderCard.d.ts.map +1 -1
  132. package/lib/typescript/src/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
  133. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -1
  134. package/lib/typescript/src/Wallet/components/OrderManager.d.ts.map +1 -1
  135. package/lib/typescript/src/Wallet/components/RemoveAccount.d.ts.map +1 -1
  136. package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -1
  137. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts +1 -1
  138. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts.map +1 -1
  139. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
  140. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -1
  141. package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
  142. package/package.json +1 -1
  143. package/src/Components/Pagination.tsx +33 -0
  144. package/src/Wallet/components/AccountCard.tsx +22 -21
  145. package/src/Wallet/components/AccountLimitManager.tsx +36 -54
  146. package/src/Wallet/components/AccountManager.tsx +95 -61
  147. package/src/Wallet/components/AccountSnoozeManager.tsx +39 -37
  148. package/src/Wallet/components/DepositCard.tsx +55 -53
  149. package/src/Wallet/components/ItemOrderCard.tsx +13 -12
  150. package/src/Wallet/components/ItemOrderDetailCard.tsx +23 -22
  151. package/src/Wallet/components/ManageAccountCard.tsx +78 -47
  152. package/src/Wallet/components/OrderManager.tsx +47 -37
  153. package/src/Wallet/components/RemoveAccount.tsx +12 -15
  154. package/src/Wallet/components/WalletActionSelector.tsx +70 -69
  155. package/src/Wallet/components/WalletSettings.tsx +137 -139
  156. package/src/Wallet/components/WalletSetup.tsx +41 -51
  157. package/src/Wallet/components/WithdrawCard.tsx +56 -56
  158. package/src/Wallet/index.tsx +16 -15
  159. package/src/constants/styles.ts +1 -1
  160. package/src/constants/useColors.tsx +1 -1
@@ -1,16 +1,19 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { FlatList, View, ActivityIndicator, ScrollView } from 'react-native';
2
+ import { FlatList, ActivityIndicator } from 'react-native';
3
3
  import { ItemOrderApi } from '../api';
4
4
  import type { ItemOrderProps, ItemProps } from '../../types';
5
5
  import ItemOrderCard from './ItemOrderCard';
6
- import { Button, Text } from '../../Components';
7
- import Colors from '../../constants/colors';
6
+ import { useColors } from '../../constants/useColors';
7
+ import { Button, Text, View } from '../../Components/Themed';
8
+ import Pagination from '../../Components/Pagination';
8
9
 
9
10
  type OrderManagerProps = {
10
11
  onClose: () => void
11
12
  }
12
-
13
+ const order_sections = [ 'header', 'orders' ]
13
14
  const OrderManager = ({ onClose }:OrderManagerProps) => {
15
+ const Colors = useColors();
16
+
14
17
  const [ loading, setLoading ] = useState(false);
15
18
  const [ data, setData ] = useState<{
16
19
  offset: number,
@@ -47,47 +50,54 @@ const OrderManager = ({ onClose }:OrderManagerProps) => {
47
50
  )
48
51
  }
49
52
 
53
+ const renderSections = (data: {item:string, index:number}) => {
54
+ switch(data.item){
55
+ case 'header':
56
+ return (
57
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:15 }}>
58
+ <View transparent style={{flex:1}}>
59
+ <Text size={20} theme='h1'>MY ORDER HISTORY</Text>
60
+ <Text style={{ marginTop:5}} theme='description'>Review your order history below. Select an item to see the transaction details.</Text>
61
+ </View>
62
+ </View>
63
+ )
64
+ case 'orders':
65
+ return (
66
+ <View>
67
+ {loading ?
68
+ <ActivityIndicator size='large' color={Colors.text.h1} />
69
+ :<></>}
70
+ <FlatList
71
+ data={item_orders}
72
+ renderItem={renderItemOrders}
73
+ keyExtractor={(item) => item.item_order_id.toString()}
74
+ />
75
+ </View>
76
+ )
77
+ default: return <></>
78
+ }
79
+ }
50
80
 
51
81
  return (
52
82
  <View style={{ flex:1 }}>
53
- <View style={{ padding:20 }}>
54
- <Text size={26} color={Colors.brand.midnight} weight='bold'>ORDER HISTORY</Text>
55
- <Text style={{ marginTop:10 }} size={16} color={Colors.brand.midnight} weight='regular'>Review your order history below. Select an item to see the transaction details.</Text>
56
- </View>
57
- <ScrollView style={{ flex:1, padding:10 }}>
58
- {loading ?
59
- <ActivityIndicator size='large' color={Colors.brand.midnight} />
60
- :<></>}
83
+ <View style={{ flex:1 }}>
61
84
  <FlatList
62
- data={item_orders}
63
- renderItem={renderItemOrders}
64
- keyExtractor={(item) => item.item_order_id.toString()}
65
- />
66
- </ScrollView>
67
- <View style={{ flexDirection:'row', alignItems:'center', padding:20, paddingBottom:0 }}>
68
- <Button
69
- style={{ opacity: offset > 0 ? 1 : 0.5 }}
70
- title='PREV'
71
- disabled={offset == 0 ? true : false}
72
- title_color={Colors.brand.electric}
73
- backgroundColor='transparent'
74
- onPress={() => getDataFromServer(offset - 1)}
75
- />
76
- <View style={{ flex:1 }} />
77
- <Button
78
- title='NEXT'
79
- title_color={Colors.brand.electric}
80
- backgroundColor='transparent'
81
- onPress={() => getDataFromServer(offset + 1)}
85
+ data={order_sections}
86
+ key={`order_history_sections`}
87
+ keyExtractor={(item) => item}
88
+ renderItem={renderSections}
82
89
  />
83
90
  </View>
84
- <View style={{ padding:20 }}>
91
+ <Pagination
92
+ onNext={() => getDataFromServer(offset + 1)}
93
+ onPrevious={() => getDataFromServer(offset - 1)}
94
+ offset={offset}
95
+ />
96
+ <View type='footer' style={{ flexDirection:'row', padding:20 }}>
85
97
  <Button
86
98
  title='BACK'
87
- title_color={Colors.brand.electric}
88
- borderWidth={1}
89
- borderColor={Colors.brand.electric}
90
- padding={15}
99
+ type='close'
100
+ style={{ flex:1 }}
91
101
  onPress={() => onClose()}
92
102
  />
93
103
  </View>
@@ -1,9 +1,9 @@
1
1
  import React, { useState } from 'react';
2
- import { TouchableOpacity, View } from 'react-native';
3
2
  import type { AccountProps } from '../../types';
4
- import { Button, Icons, Text } from '../../Components';
5
- import Colors from '../../constants/colors';
3
+ import { Icons } from '../../Components';
6
4
  import { WalletApi } from '../api';
5
+ import { Button, Text, View } from '../../Components/Themed';
6
+ import { useColors } from '../../constants/useColors';
7
7
 
8
8
  type UnlinkAccountCardProps = {
9
9
  account:AccountProps,
@@ -12,6 +12,7 @@ type UnlinkAccountCardProps = {
12
12
  }
13
13
 
14
14
  const RemoveAccountCard = ({ account, onCancel, onRemove }:UnlinkAccountCardProps) => {
15
+ const Colors = useColors();
15
16
  const [ loading, setLoading ] = useState(false);
16
17
  const [ disclaimer, setDisclaimer ] = useState(false);
17
18
 
@@ -30,23 +31,21 @@ const RemoveAccountCard = ({ account, onCancel, onRemove }:UnlinkAccountCardProp
30
31
 
31
32
  return (
32
33
  <View style={{ flex:1 }}>
33
- <View nativeID='snooze_disclaimer' style={{ flex:1, margin:10 }}>
34
- <TouchableOpacity style={{ flexDirection:'row', padding:5 }} onPress={() => setDisclaimer(!disclaimer)}>
35
- <View style={{ justifyContent:'center', marginRight:10, alignItems:'center', height:25, width:25, borderRadius:4, backgroundColor: disclaimer ? Colors.brand.midnight : 'transparent', borderWidth:1, borderColor:Colors.brand.midnight }}>
34
+ <View nativeID='snooze_disclaimer' style={{ flex:1, margin:10, justifyContent:'flex-end' }}>
35
+ <Button style={{ flexDirection:'row', padding:5 }} onPress={() => setDisclaimer(!disclaimer)}>
36
+ <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 }}>
36
37
  {disclaimer ?
37
- <Icons.CheckIcon size={14} color={Colors.shades.white} />
38
+ <Icons.CheckIcon size={14} color={Colors.text.h1} />
38
39
  :<></>}
39
40
  </View>
40
- <Text size={14} color={Colors.brand.midnight} weight='regular'>I confirm my request to remove my account. I understand that this will take up to 24 hours to come into effect. I understand that I will no longer be able to use this account to transact.</Text>
41
- </TouchableOpacity>
41
+ <Text style={{flex:1}} size={14} theme='description'>I confirm my request to remove my account. I understand that this will take up to 24 hours to come into effect. I understand that I will no longer be able to use this account to transact.</Text>
42
+ </Button>
42
43
  </View>
43
44
  <View nativeID='action_row' style={{ flexDirection:'row', padding:20 }}>
44
45
  <Button
45
46
  style={{ flex:1, marginRight:5, opacity: 1 }}
46
47
  title={'CANCEL'}
47
- title_color={Colors.shades.white}
48
- backgroundColor={Colors.brand.electric}
49
- padding={15}
48
+ type='close'
50
49
  onPress={() => onCancel()}
51
50
  />
52
51
  <Button
@@ -54,9 +53,7 @@ const RemoveAccountCard = ({ account, onCancel, onRemove }:UnlinkAccountCardProp
54
53
  disabled={!disclaimer}
55
54
  loading={loading}
56
55
  title={'REMOVE ACCOUNT'}
57
- title_color={Colors.shades.white}
58
- backgroundColor={Colors.utility.error}
59
- padding={15}
56
+ type='error'
60
57
  onPress={() => handleRemove()}
61
58
  />
62
59
  </View>
@@ -1,10 +1,11 @@
1
1
 
2
2
  import React, { useState } from 'react';
3
- import { View, FlatList, ScrollView, TouchableOpacity, Image } from "react-native"
4
- import { Button, Icons, Text } from '../../Components';
5
- import Colors from '../../constants/colors';
3
+ import { FlatList, TouchableOpacity, Image } from "react-native"
4
+ import { Icons } from '../../Components';
6
5
  import type { AccountProps, MyPlayerProps, PlayerBalanceProps } from '../../types';
7
6
  import { WalletHelpers } from '../api';
7
+ import { Button, Text, View } from '../../Components/Themed';
8
+ import { useColors } from '../../constants/useColors';
8
9
 
9
10
  type WalletActionSelectorProps ={
10
11
  player:MyPlayerProps,
@@ -16,38 +17,41 @@ type WalletActionSelectorProps ={
16
17
  onStartWalkthrough:(walkthrough:any, account?:AccountProps) => void
17
18
  }
18
19
 
19
- const sections = [
20
- {
21
- section: 'accounts', label:'Account Actions', actions : [
22
- {
23
- action :'my_accounts', label: "View My Accounts", icon:<Icons.ListIcon color={Colors.brand.midnight} size={12}/>, description: 'Manage your connected accounts. Transact, snooze, set limits or remove an existing account.'
24
- },
25
- {
26
- action :'wallet_settings', label: "View My Settings", icon:<Icons.SettingsIcon color={Colors.brand.midnight} size={20}/>, description: 'View your current settings including your deposit and withdraw limits.'
27
- },
28
-
29
- ]
30
- },
31
- {
32
- section: 'transact', label:'Transact', actions : [
33
- {
34
- action :'order_history', label: "View Order History", icon:<Icons.TransactionIcon size={20} color={Colors.brand.midnight} />, description: 'View and manage past orders made on BettorEdge'
35
- },
36
- {
37
- action :'deposit', label: "Make A Deposit", icon:<Icons.DepositIcon size={20} color={Colors.brand.midnight} />, description: 'Fund your BettorEdge real-money balance by making a deposit from an existing account or new one.'
38
- },
39
- {
40
- action :'withdraw', label: "Make A Withdrawal", icon:<Icons.WithdrawIcon size={20} color={Colors.brand.midnight} />, description: 'Move funds from your BettorEdge real-money balance to a connected ACH account.'
41
- },
42
-
43
- ]
44
- }
45
- ]
20
+
46
21
 
47
22
  const WalletActionSelector = ({ player, walkthrough_steps, player_balance, accounts, onClose, onActionSelect, onStartWalkthrough }: WalletActionSelectorProps) => {
23
+ const Colors = useColors();
48
24
  const [ show_steps, setShowSteps ] = useState(false);
49
25
  const [ width, setWidth ] = useState(0);
50
26
 
27
+ const sections = [
28
+ {
29
+ section: 'accounts', label:'Account Actions', actions : [
30
+ {
31
+ action :'my_accounts', label: "View My Accounts", icon:<Icons.ListIcon color={Colors.text.h1} size={12}/>, description: 'Manage your connected accounts. Transact, snooze, set limits or remove an existing account.'
32
+ },
33
+ {
34
+ action :'wallet_settings', label: "View My Settings", icon:<Icons.SettingsIcon color={Colors.text.h1} size={20}/>, description: 'View your current settings including your deposit and withdraw limits.'
35
+ },
36
+
37
+ ]
38
+ },
39
+ {
40
+ section: 'transact', label:'Transact', actions : [
41
+ {
42
+ action :'order_history', label: "View Order History", icon:<Icons.TransactionIcon size={20} color={Colors.text.h1} />, description: 'View and manage past orders made on BettorEdge'
43
+ },
44
+ {
45
+ action :'deposit', label: "Make A Deposit", icon:<Icons.DepositIcon size={20} color={Colors.text.h1} />, description: 'Fund your BettorEdge real-money balance by making a deposit from an existing account or new one.'
46
+ },
47
+ {
48
+ action :'withdraw', label: "Make A Withdrawal", icon:<Icons.WithdrawIcon size={20} color={Colors.text.h1} />, description: 'Move funds from your BettorEdge real-money balance to a connected ACH account.'
49
+ },
50
+
51
+ ]
52
+ }
53
+ ]
54
+
51
55
  const handleActionSelect = (action:any) => {
52
56
  switch(action.action){
53
57
  case 'deposit':
@@ -64,7 +68,7 @@ const WalletActionSelector = ({ player, walkthrough_steps, player_balance, accou
64
68
 
65
69
  const renderActions = (data:{ item:any, index:number }) => {
66
70
  return (
67
- <TouchableOpacity style={{ padding:10, flexDirection:'row', alignItems:'center', borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }}
71
+ <Button style={{ padding:10, flexDirection:'row', alignItems:'center', borderBottomWidth:1, borderBottomColor:Colors.borders.light }}
68
72
  onPress={() => handleActionSelect(data.item)}>
69
73
 
70
74
  <View style={{ flex:1, marginRight:10 }}>
@@ -72,19 +76,21 @@ const WalletActionSelector = ({ player, walkthrough_steps, player_balance, accou
72
76
  {data.item.icon?
73
77
  data.item.icon
74
78
  :<></>}
75
- <Text style={{ marginLeft:5 }} size={16} color={Colors.brand.midnight} weight='bold'>{data.item.label}</Text>
79
+ <Text style={{ marginLeft:5 }} size={16} theme='h1'>{data.item.label}</Text>
76
80
  </View>
77
- <Text style={{ padding:5 }} size={14} color={Colors.brand.midnight} weight='regular'>{data.item.description}</Text>
81
+ <Text style={{ padding:5 }} size={14} theme='description'>{data.item.description}</Text>
78
82
  </View>
79
- <Icons.ChevronIcon direction='right' color={Colors.brand.midnight} size={12} />
80
- </TouchableOpacity>
83
+ <Icons.ChevronIcon direction='right' color={Colors.text.h1} size={12} />
84
+ </Button>
81
85
  )
82
86
  }
83
87
 
84
88
  const renderSections = (data: { item:any, index:number }) => {
85
89
  return (
86
- <View style={{ padding:5 }}>
87
- <Text size={16} color={Colors.brand.midnight} weight='regular'>{data.item.label.toUpperCase()}</Text>
90
+ <View style={{ marginTop:10 }}>
91
+ <View type='header' style={{ padding:15 }}>
92
+ <Text theme='h1'>{data.item.label.toUpperCase()}</Text>
93
+ </View>
88
94
  <View style={{ padding:5 }}>
89
95
  <FlatList
90
96
  key='actions'
@@ -99,7 +105,6 @@ const WalletActionSelector = ({ player, walkthrough_steps, player_balance, accou
99
105
  }
100
106
 
101
107
  const handleStepSelect = (step:any, index:number) => {
102
- console.log(step)
103
108
  switch(step.step){
104
109
  case 'deposit':
105
110
  let default_account = accounts.find(a => a.default_account)
@@ -115,11 +120,11 @@ const WalletActionSelector = ({ player, walkthrough_steps, player_balance, accou
115
120
  const renderSteps = (data: { item:any, index:number }) => {
116
121
  return (
117
122
  <TouchableOpacity
118
- style={{ margin:5, padding:10, flexDirection:'row', alignItems:'center', borderWidth:1, borderColor:Colors.shades.shade600, borderRadius:8 }}
123
+ style={{ margin:5, padding:10, flexDirection:'row', alignItems:'center', borderWidth:1, borderColor:Colors.borders.light, borderRadius:8 }}
119
124
  onPress={() => handleStepSelect(data.item, data.index)}>
120
- <Icons.CheckCirlceIcon size={14} color={data.item.complete?Colors.utility.success:Colors.brand.slate}/>
121
- <Text style={{ flex:1, marginLeft:10 }} size={14} color={Colors.brand.midnight}>{data.item.label}</Text>
122
- <Icons.ChevronIcon direction='right' size={8} color={Colors.brand.midnight} />
125
+ <Icons.CheckCirlceIcon size={14} color={data.item.complete?Colors.text.success:Colors.text.success}/>
126
+ <Text style={{ flex:1, marginLeft:10 }} theme='description'>{data.item.label}</Text>
127
+ <Icons.ChevronIcon direction='right' size={8} color={Colors.text.h1} />
123
128
  </TouchableOpacity>
124
129
  )
125
130
  }
@@ -131,48 +136,47 @@ const WalletActionSelector = ({ player, walkthrough_steps, player_balance, accou
131
136
  const { width } = ev.nativeEvent.layout
132
137
  setWidth(width)
133
138
  }}>
134
- <View style={{ padding:10, flexDirection:'row', alignItems:'center' }}>
139
+ <View type='header' style={{ padding:10, flexDirection:'row', alignItems:'center' }}>
135
140
  <Image
136
141
  source={{ uri: player.profile_pic }}
137
142
  style={{ height:60, width:60, borderRadius:4 }}
138
143
  resizeMode='cover'
139
144
  />
140
- <View style={{ flex:1, marginLeft:5 }}>
141
- <Text size={20} color={Colors.brand.midnight} weight='bold'>Wallet Balances</Text>
142
- <View style={{ flexDirection:'row' }}>
143
- <View style={{ margin:3, backgroundColor:Colors.brand.cobalt, padding:5, borderRadius:8 }}>
144
- <Text size={14} color={Colors.shades.white} weight='bold'>${WalletHelpers.formatBalance(player_balance.balance)}</Text>
145
+ <View transparent style={{ flex:1, marginLeft:15 }}>
146
+ <Text size={20} theme='h1'>My Wallet Balances</Text>
147
+ <View transparent style={{ flexDirection:'row', marginTop:5 }}>
148
+ <View float style={{ margin:3, padding:8, borderRadius:8 }}>
149
+ <Text size={14} theme='h1'>${WalletHelpers.formatBalance(player_balance.balance)}</Text>
145
150
  </View>
146
- <View style={{ margin:3, backgroundColor:Colors.brand.cobalt, padding:5, borderRadius:8 }}>
147
- <Text size={14} color={Colors.shades.white} weight='bold'>P{WalletHelpers.formatBalance(player_balance.promo_balance)}</Text>
151
+ <View float style={{ margin:3, padding:8, borderRadius:8 }}>
152
+ <Text size={14} theme='h1'>P{WalletHelpers.formatBalance(player_balance.promo_balance)}</Text>
148
153
  </View>
149
- <View style={{ margin:3, backgroundColor:Colors.brand.cyan, padding:5, borderRadius:8 }}>
150
- <Text size={14} color={Colors.shades.white} weight='bold'>E{WalletHelpers.formatBalance(player_balance.free_market_balance)}</Text>
154
+ <View float style={{ margin:3, padding:8, borderRadius:8 }}>
155
+ <Text size={14} theme='h1'>E{WalletHelpers.formatBalance(player_balance.free_market_balance)}</Text>
151
156
  </View>
152
157
  </View>
153
158
  </View>
154
159
  </View>
155
- <ScrollView style={{ flex:1 }}>
156
-
160
+ <View style={{ flex:1 }}>
157
161
  {pct_complete < 1 ?
158
- <View style={{ backgroundColor:Colors.shades.white, padding:10 }}>
162
+ <View style={{ padding:10 }}>
159
163
  <View>
160
164
  <TouchableOpacity style={{ flexDirection:'row', alignItems:'center', padding:10 }} onPress={() => setShowSteps(!show_steps)}>
161
165
  <View style={{ flex:1, marginRight:10 }}>
162
- <Text color={Colors.brand.midnight} size={14} weight='bold'>Setup your wallet</Text>
163
- <Text style={{ marginTop:3 }} color={Colors.brand.slate} size={14} weight='regular'>Complete all the steps below to have full access to move funds in and out of BettorEdge</Text>
166
+ <Text theme='h1'>Setup your wallet</Text>
167
+ <Text style={{ marginTop:3 }} theme='description'>Complete all the steps below to have full access to move funds in and out of BettorEdge</Text>
164
168
  </View>
165
- <Icons.ChevronIcon direction={show_steps ? 'up' : 'down'} color={Colors.brand.midnight} size={10} />
169
+ <Icons.ChevronIcon direction={show_steps ? 'up' : 'down'} color={Colors.text.h1} size={10} />
166
170
  </TouchableOpacity>
167
171
  <View style={{ flexDirection:'row', justifyContent:'center', alignItems:'center', }}>
168
172
  <Text size={14} weight='bold'>{(pct_complete * 100).toFixed()}%</Text>
169
- <View style={{ marginLeft:20, height:10, width:width - 100, backgroundColor:Colors.brand.slate, borderRadius:15 }}>
170
- <View style={{ position:'absolute', top:0, left:0, bottom:0, width: (width-100)*pct_complete, backgroundColor:Colors.utility.success, borderRadius:15 }} />
173
+ <View style={{ marginLeft:20, height:10, width:width - 100, borderRadius:15 }}>
174
+ <View style={{ position:'absolute', top:0, left:0, bottom:0, width: (width-100)*pct_complete, backgroundColor:Colors.text.success, borderRadius:15 }} />
171
175
  </View>
172
176
  </View>
173
177
  </View>
174
178
  {show_steps ?
175
- <View style={{marginTop:5, borderTopWidth:1, borderColor:Colors.shades.shade600 }}>
179
+ <View style={{marginTop:5, borderTopWidth:1, borderColor:Colors.borders.light }}>
176
180
  <FlatList
177
181
  data={walkthrough_steps}
178
182
  renderItem={renderSteps}
@@ -182,7 +186,7 @@ const WalletActionSelector = ({ player, walkthrough_steps, player_balance, accou
182
186
  :<></>}
183
187
  </View>
184
188
  :<></>}
185
- <View style={{ padding:10 }}>
189
+ <View type='body' style={{ marginTop:5 }}>
186
190
  <FlatList
187
191
  key={'wallet_sections'}
188
192
  data={sections}
@@ -190,18 +194,15 @@ const WalletActionSelector = ({ player, walkthrough_steps, player_balance, accou
190
194
  keyExtractor={(item) => item.section}
191
195
  />
192
196
  </View>
193
- </ScrollView>
194
- <View nativeID='action_row' style={{ padding:20 }}>
197
+ </View>
198
+ <View nativeID='action_row' style={{ flexDirection:'row', alignItems:'center', padding:20 }}>
195
199
  <Button
196
200
  title='CLOSE'
197
- title_color={Colors.brand.electric}
198
- borderWidth={1}
199
- borderColor={Colors.brand.electric}
200
- padding={15}
201
+ style={{ flex:1 }}
202
+ type='close'
201
203
  onPress={() => onClose()}
202
204
  />
203
205
  </View>
204
-
205
206
  </View>
206
207
  )
207
208
  }