be-components 1.4.8 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/lib/commonjs/Competition/api/index.js +15 -0
  2. package/lib/commonjs/Competition/api/index.js.map +1 -1
  3. package/lib/commonjs/Competition/components/CompetitionSeasonCard.js +1 -1
  4. package/lib/commonjs/Competition/components/CompetitionSeasonCard.js.map +1 -1
  5. package/lib/commonjs/Competition/components/SeasonCard.js +61 -0
  6. package/lib/commonjs/Competition/components/SeasonCard.js.map +1 -0
  7. package/lib/commonjs/Competition/index.js +23 -3
  8. package/lib/commonjs/Competition/index.js.map +1 -1
  9. package/lib/commonjs/CompetitionManager/api/index.js +3 -5
  10. package/lib/commonjs/CompetitionManager/api/index.js.map +1 -1
  11. package/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.js +1 -61
  12. package/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.js.map +1 -1
  13. package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js +6 -1
  14. package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
  15. package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js +4 -0
  16. package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js.map +1 -1
  17. package/lib/commonjs/CompetitionManager/components/CreateCompetitionForm.js +37 -3
  18. package/lib/commonjs/CompetitionManager/components/CreateCompetitionForm.js.map +1 -1
  19. package/lib/commonjs/CompetitionSeason/api/index.js +134 -0
  20. package/lib/commonjs/CompetitionSeason/api/index.js.map +1 -0
  21. package/lib/commonjs/CompetitionSeason/components/CompetitionsSection.js +127 -0
  22. package/lib/commonjs/CompetitionSeason/components/CompetitionsSection.js.map +1 -0
  23. package/lib/commonjs/CompetitionSeason/components/EnterSeasonPrompt.js +253 -0
  24. package/lib/commonjs/CompetitionSeason/components/EnterSeasonPrompt.js.map +1 -0
  25. package/lib/commonjs/CompetitionSeason/components/SeasonHeader.js +126 -0
  26. package/lib/commonjs/CompetitionSeason/components/SeasonHeader.js.map +1 -0
  27. package/lib/commonjs/CompetitionSeason/components/SeasonLeaderboard.js +324 -0
  28. package/lib/commonjs/CompetitionSeason/components/SeasonLeaderboard.js.map +1 -0
  29. package/lib/commonjs/CompetitionSeason/components/SeasonSettingsSection.js +175 -0
  30. package/lib/commonjs/CompetitionSeason/components/SeasonSettingsSection.js.map +1 -0
  31. package/lib/commonjs/CompetitionSeason/index.js +278 -0
  32. package/lib/commonjs/CompetitionSeason/index.js.map +1 -0
  33. package/lib/commonjs/CompetitionSeasonManager/api/index.js +182 -0
  34. package/lib/commonjs/CompetitionSeasonManager/api/index.js.map +1 -0
  35. package/lib/commonjs/CompetitionSeasonManager/components/CompetitionSelector.js +2 -0
  36. package/lib/commonjs/CompetitionSeasonManager/components/CompetitionSelector.js.map +1 -0
  37. package/lib/commonjs/CompetitionSeasonManager/components/CompetitionsForm.js +153 -0
  38. package/lib/commonjs/CompetitionSeasonManager/components/CompetitionsForm.js.map +1 -0
  39. package/lib/commonjs/CompetitionSeasonManager/components/CreateSeasonForm.js +388 -0
  40. package/lib/commonjs/CompetitionSeasonManager/components/CreateSeasonForm.js.map +1 -0
  41. package/lib/commonjs/CompetitionSeasonManager/components/SeasonHeader.js +108 -0
  42. package/lib/commonjs/CompetitionSeasonManager/components/SeasonHeader.js.map +1 -0
  43. package/lib/commonjs/CompetitionSeasonManager/components/SeasonInfoForm.js +242 -0
  44. package/lib/commonjs/CompetitionSeasonManager/components/SeasonInfoForm.js.map +1 -0
  45. package/lib/commonjs/CompetitionSeasonManager/components/SeasonSettingsForm.js +352 -0
  46. package/lib/commonjs/CompetitionSeasonManager/components/SeasonSettingsForm.js.map +1 -0
  47. package/lib/commonjs/CompetitionSeasonManager/index.js +190 -0
  48. package/lib/commonjs/CompetitionSeasonManager/index.js.map +1 -0
  49. package/lib/commonjs/Components/Switch.js +3 -0
  50. package/lib/commonjs/Components/Switch.js.map +1 -1
  51. package/lib/commonjs/Engage/index.js +28 -1
  52. package/lib/commonjs/Engage/index.js.map +1 -1
  53. package/lib/commonjs/index.js +14 -0
  54. package/lib/commonjs/index.js.map +1 -1
  55. package/lib/module/Competition/api/index.js +15 -0
  56. package/lib/module/Competition/api/index.js.map +1 -1
  57. package/lib/module/Competition/components/CompetitionSeasonCard.js +1 -1
  58. package/lib/module/Competition/components/CompetitionSeasonCard.js.map +1 -1
  59. package/lib/module/Competition/components/SeasonCard.js +54 -0
  60. package/lib/module/Competition/components/SeasonCard.js.map +1 -0
  61. package/lib/module/Competition/index.js +23 -3
  62. package/lib/module/Competition/index.js.map +1 -1
  63. package/lib/module/CompetitionManager/api/index.js +3 -5
  64. package/lib/module/CompetitionManager/api/index.js.map +1 -1
  65. package/lib/module/CompetitionManager/components/CompetitionInfoForm.js +1 -63
  66. package/lib/module/CompetitionManager/components/CompetitionInfoForm.js.map +1 -1
  67. package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js +6 -1
  68. package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
  69. package/lib/module/CompetitionManager/components/ContestSettingsForm.js +4 -0
  70. package/lib/module/CompetitionManager/components/ContestSettingsForm.js.map +1 -1
  71. package/lib/module/CompetitionManager/components/CreateCompetitionForm.js +37 -3
  72. package/lib/module/CompetitionManager/components/CreateCompetitionForm.js.map +1 -1
  73. package/lib/module/CompetitionSeason/api/index.js +128 -0
  74. package/lib/module/CompetitionSeason/api/index.js.map +1 -0
  75. package/lib/module/CompetitionSeason/components/CompetitionsSection.js +118 -0
  76. package/lib/module/CompetitionSeason/components/CompetitionsSection.js.map +1 -0
  77. package/lib/module/CompetitionSeason/components/EnterSeasonPrompt.js +244 -0
  78. package/lib/module/CompetitionSeason/components/EnterSeasonPrompt.js.map +1 -0
  79. package/lib/module/CompetitionSeason/components/SeasonHeader.js +119 -0
  80. package/lib/module/CompetitionSeason/components/SeasonHeader.js.map +1 -0
  81. package/lib/module/CompetitionSeason/components/SeasonLeaderboard.js +315 -0
  82. package/lib/module/CompetitionSeason/components/SeasonLeaderboard.js.map +1 -0
  83. package/lib/module/CompetitionSeason/components/SeasonSettingsSection.js +166 -0
  84. package/lib/module/CompetitionSeason/components/SeasonSettingsSection.js.map +1 -0
  85. package/lib/module/CompetitionSeason/index.js +269 -0
  86. package/lib/module/CompetitionSeason/index.js.map +1 -0
  87. package/lib/module/CompetitionSeasonManager/api/index.js +176 -0
  88. package/lib/module/CompetitionSeasonManager/api/index.js.map +1 -0
  89. package/lib/module/CompetitionSeasonManager/components/CompetitionSelector.js +2 -0
  90. package/lib/module/CompetitionSeasonManager/components/CompetitionSelector.js.map +1 -0
  91. package/lib/module/CompetitionSeasonManager/components/CompetitionsForm.js +144 -0
  92. package/lib/module/CompetitionSeasonManager/components/CompetitionsForm.js.map +1 -0
  93. package/lib/module/CompetitionSeasonManager/components/CreateSeasonForm.js +379 -0
  94. package/lib/module/CompetitionSeasonManager/components/CreateSeasonForm.js.map +1 -0
  95. package/lib/module/CompetitionSeasonManager/components/SeasonHeader.js +101 -0
  96. package/lib/module/CompetitionSeasonManager/components/SeasonHeader.js.map +1 -0
  97. package/lib/module/CompetitionSeasonManager/components/SeasonInfoForm.js +233 -0
  98. package/lib/module/CompetitionSeasonManager/components/SeasonInfoForm.js.map +1 -0
  99. package/lib/module/CompetitionSeasonManager/components/SeasonSettingsForm.js +343 -0
  100. package/lib/module/CompetitionSeasonManager/components/SeasonSettingsForm.js.map +1 -0
  101. package/lib/module/CompetitionSeasonManager/index.js +181 -0
  102. package/lib/module/CompetitionSeasonManager/index.js.map +1 -0
  103. package/lib/module/Components/Switch.js +3 -0
  104. package/lib/module/Components/Switch.js.map +1 -1
  105. package/lib/module/Engage/index.js +28 -1
  106. package/lib/module/Engage/index.js.map +1 -1
  107. package/lib/module/index.js +3 -1
  108. package/lib/module/index.js.map +1 -1
  109. package/lib/typescript/src/Competition/api/index.d.ts +1 -0
  110. package/lib/typescript/src/Competition/api/index.d.ts.map +1 -1
  111. package/lib/typescript/src/Competition/components/SeasonCard.d.ts +10 -0
  112. package/lib/typescript/src/Competition/components/SeasonCard.d.ts.map +1 -0
  113. package/lib/typescript/src/Competition/index.d.ts +3 -2
  114. package/lib/typescript/src/Competition/index.d.ts.map +1 -1
  115. package/lib/typescript/src/CompetitionManager/api/index.d.ts +1 -1
  116. package/lib/typescript/src/CompetitionManager/api/index.d.ts.map +1 -1
  117. package/lib/typescript/src/CompetitionManager/components/CompetitionInfoForm.d.ts.map +1 -1
  118. package/lib/typescript/src/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
  119. package/lib/typescript/src/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
  120. package/lib/typescript/src/CompetitionManager/components/CreateCompetitionForm.d.ts +3 -2
  121. package/lib/typescript/src/CompetitionManager/components/CreateCompetitionForm.d.ts.map +1 -1
  122. package/lib/typescript/src/CompetitionSeason/api/index.d.ts +41 -0
  123. package/lib/typescript/src/CompetitionSeason/api/index.d.ts.map +1 -0
  124. package/lib/typescript/src/CompetitionSeason/components/CompetitionsSection.d.ts +14 -0
  125. package/lib/typescript/src/CompetitionSeason/components/CompetitionsSection.d.ts.map +1 -0
  126. package/lib/typescript/src/CompetitionSeason/components/EnterSeasonPrompt.d.ts +16 -0
  127. package/lib/typescript/src/CompetitionSeason/components/EnterSeasonPrompt.d.ts.map +1 -0
  128. package/lib/typescript/src/CompetitionSeason/components/SeasonHeader.d.ts +15 -0
  129. package/lib/typescript/src/CompetitionSeason/components/SeasonHeader.d.ts.map +1 -0
  130. package/lib/typescript/src/CompetitionSeason/components/SeasonLeaderboard.d.ts +18 -0
  131. package/lib/typescript/src/CompetitionSeason/components/SeasonLeaderboard.d.ts.map +1 -0
  132. package/lib/typescript/src/CompetitionSeason/components/SeasonSettingsSection.d.ts +12 -0
  133. package/lib/typescript/src/CompetitionSeason/components/SeasonSettingsSection.d.ts.map +1 -0
  134. package/lib/typescript/src/CompetitionSeason/index.d.ts +12 -0
  135. package/lib/typescript/src/CompetitionSeason/index.d.ts.map +1 -0
  136. package/lib/typescript/src/CompetitionSeasonManager/api/index.d.ts +31 -0
  137. package/lib/typescript/src/CompetitionSeasonManager/api/index.d.ts.map +1 -0
  138. package/lib/typescript/src/CompetitionSeasonManager/components/CompetitionSelector.d.ts +1 -0
  139. package/lib/typescript/src/CompetitionSeasonManager/components/CompetitionSelector.d.ts.map +1 -0
  140. package/lib/typescript/src/CompetitionSeasonManager/components/CompetitionsForm.d.ts +12 -0
  141. package/lib/typescript/src/CompetitionSeasonManager/components/CompetitionsForm.d.ts.map +1 -0
  142. package/lib/typescript/src/CompetitionSeasonManager/components/CreateSeasonForm.d.ts +11 -0
  143. package/lib/typescript/src/CompetitionSeasonManager/components/CreateSeasonForm.d.ts.map +1 -0
  144. package/lib/typescript/src/CompetitionSeasonManager/components/SeasonHeader.d.ts +13 -0
  145. package/lib/typescript/src/CompetitionSeasonManager/components/SeasonHeader.d.ts.map +1 -0
  146. package/lib/typescript/src/CompetitionSeasonManager/components/SeasonInfoForm.d.ts +11 -0
  147. package/lib/typescript/src/CompetitionSeasonManager/components/SeasonInfoForm.d.ts.map +1 -0
  148. package/lib/typescript/src/CompetitionSeasonManager/components/SeasonSettingsForm.d.ts +12 -0
  149. package/lib/typescript/src/CompetitionSeasonManager/components/SeasonSettingsForm.d.ts.map +1 -0
  150. package/lib/typescript/src/CompetitionSeasonManager/index.d.ts +8 -0
  151. package/lib/typescript/src/CompetitionSeasonManager/index.d.ts.map +1 -0
  152. package/lib/typescript/src/Components/Switch.d.ts +2 -1
  153. package/lib/typescript/src/Components/Switch.d.ts.map +1 -1
  154. package/lib/typescript/src/Engage/index.d.ts.map +1 -1
  155. package/lib/typescript/src/index.d.ts +3 -1
  156. package/lib/typescript/src/index.d.ts.map +1 -1
  157. package/package.json +1 -1
  158. package/src/Competition/api/index.ts +15 -0
  159. package/src/Competition/components/CompetitionSeasonCard.tsx +1 -1
  160. package/src/Competition/components/SeasonCard.tsx +46 -0
  161. package/src/Competition/index.tsx +45 -27
  162. package/src/CompetitionManager/api/index.ts +2 -5
  163. package/src/CompetitionManager/components/CompetitionInfoForm.tsx +2 -64
  164. package/src/CompetitionManager/components/CompetitionSettingsForm.tsx +10 -3
  165. package/src/CompetitionManager/components/ContestSettingsForm.tsx +8 -2
  166. package/src/CompetitionManager/components/CreateCompetitionForm.tsx +20 -4
  167. package/src/CompetitionSeason/api/index.ts +111 -0
  168. package/src/CompetitionSeason/components/CompetitionsSection.tsx +99 -0
  169. package/src/CompetitionSeason/components/EnterSeasonPrompt.tsx +135 -0
  170. package/src/CompetitionSeason/components/SeasonHeader.tsx +81 -0
  171. package/src/CompetitionSeason/components/SeasonLeaderboard.tsx +205 -0
  172. package/src/CompetitionSeason/components/SeasonSettingsSection.tsx +92 -0
  173. package/src/CompetitionSeason/index.tsx +244 -0
  174. package/src/CompetitionSeasonManager/api/index.ts +127 -0
  175. package/src/CompetitionSeasonManager/components/CompetitionSelector.tsx +2 -0
  176. package/src/CompetitionSeasonManager/components/CompetitionsForm.tsx +113 -0
  177. package/src/CompetitionSeasonManager/components/CreateSeasonForm.tsx +238 -0
  178. package/src/CompetitionSeasonManager/components/SeasonHeader.tsx +75 -0
  179. package/src/CompetitionSeasonManager/components/SeasonInfoForm.tsx +124 -0
  180. package/src/CompetitionSeasonManager/components/SeasonSettingsForm.tsx +185 -0
  181. package/src/CompetitionSeasonManager/index.tsx +151 -0
  182. package/src/Components/Switch.tsx +8 -3
  183. package/src/Engage/index.tsx +20 -0
  184. package/src/index.tsx +4 -1
  185. package/src/types.d.ts +48 -5
  186. package/lib/commonjs/Competition/components/ManageSeasonForm.js +0 -605
  187. package/lib/commonjs/Competition/components/ManageSeasonForm.js.map +0 -1
  188. package/lib/commonjs/Competition/components/SeasonInfoModal.js +0 -400
  189. package/lib/commonjs/Competition/components/SeasonInfoModal.js.map +0 -1
  190. package/lib/module/Competition/components/ManageSeasonForm.js +0 -596
  191. package/lib/module/Competition/components/ManageSeasonForm.js.map +0 -1
  192. package/lib/module/Competition/components/SeasonInfoModal.js +0 -391
  193. package/lib/module/Competition/components/SeasonInfoModal.js.map +0 -1
  194. package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts +0 -10
  195. package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts.map +0 -1
  196. package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts +0 -14
  197. package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts.map +0 -1
  198. package/src/Competition/components/ManageSeasonForm.tsx +0 -271
  199. package/src/Competition/components/SeasonInfoModal.tsx +0 -212
@@ -0,0 +1,244 @@
1
+ import { TouchableOpacity, View } from "react-native";
2
+ import React, { useEffect, useState } from "react";
3
+ import Colors from "../../constants/colors";
4
+ import { Button, Icons, Text } from "../../Components";
5
+ import { view_styles } from "../../constants/styles";
6
+ import moment from "moment-mini";
7
+ import { SeasonHelpers } from "../api";
8
+ const EnterSeasonPrompt = ({
9
+ player,
10
+ player_balance,
11
+ competition_season,
12
+ competition_type,
13
+ competition_result_type,
14
+ width,
15
+ onCancel,
16
+ onEnter,
17
+ onVerify
18
+ }) => {
19
+ const [use_promo_balance, setUsePromoBalance] = useState(false);
20
+ useEffect(() => {
21
+ if (!player) {
22
+ return;
23
+ }
24
+ }, []);
25
+ const requires_verification = player && parseInt(competition_season?.ticket_price ?? 0) > 0 && competition_season?.market_type == 'FOR_MONEY' && player?.vouched_status != 'verified' ? true : false;
26
+ const cl = competition_season.market_type == 'FOR_MONEY' ? '$' : 'E';
27
+ const {
28
+ season_payout,
29
+ competition_payout
30
+ } = SeasonHelpers.getPayoutAmounts(competition_season);
31
+ return /*#__PURE__*/React.createElement(View, {
32
+ style: {
33
+ width,
34
+ backgroundColor: Colors.shades.white,
35
+ borderTopRightRadius: 22,
36
+ borderTopLeftRadius: 22,
37
+ paddingTop: 22
38
+ }
39
+ }, /*#__PURE__*/React.createElement(View, {
40
+ nativeID: "competition_info"
41
+ }, /*#__PURE__*/React.createElement(Text, {
42
+ size: 16,
43
+ color: Colors.brand.midnight,
44
+ weight: "bold",
45
+ textAlign: "center"
46
+ }, "Season Details"), competition_type ? /*#__PURE__*/React.createElement(View, {
47
+ style: {
48
+ flexDirection: 'row',
49
+ justifyContent: 'center',
50
+ margin: 10
51
+ }
52
+ }, /*#__PURE__*/React.createElement(View, {
53
+ style: {
54
+ padding: 10,
55
+ marginRight: 4,
56
+ backgroundColor: Colors.brand.midnight
57
+ }
58
+ }, /*#__PURE__*/React.createElement(Text, {
59
+ size: 12,
60
+ color: Colors.shades.white,
61
+ weight: "semibold"
62
+ }, competition_type.type_label)), /*#__PURE__*/React.createElement(View, {
63
+ style: {
64
+ flexDirection: 'row',
65
+ alignItems: 'center',
66
+ padding: 10,
67
+ marginLeft: 4,
68
+ backgroundColor: Colors.shades.white,
69
+ borderRadius: 4,
70
+ ...view_styles.float
71
+ }
72
+ }, /*#__PURE__*/React.createElement(Text, {
73
+ style: {
74
+ marginRight: 5
75
+ },
76
+ size: 12,
77
+ color: Colors.brand.midnight,
78
+ weight: "semibold"
79
+ }, competition_season.invite_only ? 'Private' : 'Public'), competition_season.invite_only ? /*#__PURE__*/React.createElement(Icons.EyeOffIcon, {
80
+ color: Colors.brand.midnight,
81
+ size: 14
82
+ }) : /*#__PURE__*/React.createElement(Icons.EyeOnIcon, {
83
+ color: Colors.brand.midnight,
84
+ size: 14
85
+ }))) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(Text, {
86
+ size: 14,
87
+ color: Colors.brand.midnight,
88
+ weight: "bold",
89
+ textAlign: "center"
90
+ }, competition_season.season_name)), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
91
+ style: {
92
+ marginTop: 5
93
+ },
94
+ size: 14,
95
+ color: Colors.brand.midnight,
96
+ weight: "regular",
97
+ textAlign: "center"
98
+ }, moment(competition_season.scheduled_datetime).format('MMM DD - hh:mm a')), competition_season.season_description ? /*#__PURE__*/React.createElement(Text, {
99
+ style: {
100
+ marginTop: 5
101
+ },
102
+ size: 14,
103
+ color: Colors.brand.midnight,
104
+ weight: "regular",
105
+ textAlign: "center"
106
+ }, competition_season.season_description) : /*#__PURE__*/React.createElement(React.Fragment, null), competition_result_type ? /*#__PURE__*/React.createElement(Text, {
107
+ style: {
108
+ marginTop: 5
109
+ },
110
+ size: 14,
111
+ color: Colors.brand.midnight,
112
+ weight: "regular",
113
+ textAlign: "center"
114
+ }, competition_result_type.label) : /*#__PURE__*/React.createElement(React.Fragment, null), competition_type?.type == 'pick' ? /*#__PURE__*/React.createElement(Text, {
115
+ style: {
116
+ marginTop: 5
117
+ },
118
+ size: 14,
119
+ color: Colors.brand.midnight,
120
+ weight: "regular",
121
+ textAlign: "center"
122
+ }, "Picks: ", competition_season.max_picks) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(Text, {
123
+ style: {
124
+ marginTop: 5
125
+ },
126
+ size: 14,
127
+ color: Colors.brand.midnight,
128
+ weight: "regular",
129
+ textAlign: "center"
130
+ }, "Potential Season Winnings: ", cl, season_payout.toFixed(2)), /*#__PURE__*/React.createElement(Text, {
131
+ style: {
132
+ marginTop: 5
133
+ },
134
+ size: 14,
135
+ color: Colors.brand.midnight,
136
+ weight: "regular",
137
+ textAlign: "center"
138
+ }, "Potential Competition Winnings: ", cl, competition_payout.toFixed(2)), /*#__PURE__*/React.createElement(Text, {
139
+ style: {
140
+ marginTop: 5
141
+ },
142
+ size: 14,
143
+ color: Colors.brand.midnight,
144
+ weight: "regular",
145
+ textAlign: "center"
146
+ }, "Ticket Price: ", cl, competition_season.ticket_price.toFixed(2)), /*#__PURE__*/React.createElement(Text, {
147
+ style: {
148
+ marginTop: 5
149
+ },
150
+ size: 14,
151
+ color: Colors.brand.midnight,
152
+ weight: "regular",
153
+ textAlign: "center"
154
+ }, "Entries: ", competition_season.tickets_sold, "/", competition_season.tickets_available)), /*#__PURE__*/React.createElement(View, {
155
+ nativeID: "pick_actions",
156
+ style: {
157
+ flexDirection: 'row',
158
+ padding: 10
159
+ }
160
+ }, /*#__PURE__*/React.createElement(Button, {
161
+ style: {
162
+ flex: 1,
163
+ marginRight: 3
164
+ },
165
+ borderRadius: 4,
166
+ borderWidth: 1,
167
+ borderColor: Colors.brand.electric,
168
+ padding: 10,
169
+ title: "Cancel",
170
+ title_color: Colors.brand.electric,
171
+ onPress: () => onCancel()
172
+ }), requires_verification ? /*#__PURE__*/React.createElement(Button, {
173
+ borderRadius: 4,
174
+ style: {
175
+ flex: 2,
176
+ marginLeft: 2
177
+ },
178
+ backgroundColor: Colors.utility.warning,
179
+ padding: 10,
180
+ title: `Verify My Account`,
181
+ title_color: Colors.shades.white,
182
+ onPress: () => onVerify()
183
+ }) : /*#__PURE__*/React.createElement(Button, {
184
+ borderRadius: 4,
185
+ style: {
186
+ flex: 2,
187
+ marginLeft: 2
188
+ },
189
+ backgroundColor: Colors.utility.success,
190
+ padding: 10,
191
+ title: `Enter Season${competition_season.ticket_price == 0 ? `` : ` ${cl}${competition_season.ticket_price}`}`,
192
+ title_color: Colors.shades.white,
193
+ onPress: () => {
194
+ if (player_balance && competition_season.market_type == 'FOR_MONEY' && player_balance.balance < parseFloat(competition_season.ticket_price)) {
195
+ return alert('Not enough balance to enter. Please make a deposit before continuing');
196
+ }
197
+ onEnter(use_promo_balance);
198
+ }
199
+ })), player_balance && player_balance.promo_balance > 0 ? /*#__PURE__*/React.createElement(TouchableOpacity, {
200
+ style: {
201
+ backgroundColor: Colors.incentive.gold,
202
+ padding: 10,
203
+ flexDirection: 'row',
204
+ alignItems: 'center'
205
+ },
206
+ onPress: () => {
207
+ if (use_promo_balance) {
208
+ //Remove promo balance and open_amt
209
+ setUsePromoBalance(false);
210
+ } else {
211
+ setUsePromoBalance(true);
212
+ }
213
+ }
214
+ }, /*#__PURE__*/React.createElement(View, {
215
+ style: {
216
+ marginRight: 10,
217
+ height: 30,
218
+ width: 30,
219
+ borderWidth: 1,
220
+ borderColor: Colors.brand.midnight,
221
+ justifyContent: 'center',
222
+ alignItems: 'center'
223
+ }
224
+ }, use_promo_balance ? /*#__PURE__*/React.createElement(View, {
225
+ style: {
226
+ height: 20,
227
+ width: 20,
228
+ backgroundColor: Colors.brand.midnight
229
+ }
230
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null)), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
231
+ size: 14,
232
+ weight: "bold",
233
+ color: Colors.shades.white
234
+ }, "$", player_balance?.promo_balance, " Promotion Available"), /*#__PURE__*/React.createElement(Text, {
235
+ style: {
236
+ marginTop: 2
237
+ },
238
+ size: 12,
239
+ color: Colors.shades.white,
240
+ weight: "regular"
241
+ }, "Press / Click here to use promo balance"))) : /*#__PURE__*/React.createElement(React.Fragment, null));
242
+ };
243
+ export default EnterSeasonPrompt;
244
+ //# sourceMappingURL=EnterSeasonPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TouchableOpacity","View","React","useEffect","useState","Colors","Button","Icons","Text","view_styles","moment","SeasonHelpers","EnterSeasonPrompt","player","player_balance","competition_season","competition_type","competition_result_type","width","onCancel","onEnter","onVerify","use_promo_balance","setUsePromoBalance","requires_verification","parseInt","ticket_price","market_type","vouched_status","cl","season_payout","competition_payout","getPayoutAmounts","createElement","style","backgroundColor","shades","white","borderTopRightRadius","borderTopLeftRadius","paddingTop","nativeID","size","color","brand","midnight","weight","textAlign","flexDirection","justifyContent","margin","padding","marginRight","type_label","alignItems","marginLeft","borderRadius","float","invite_only","EyeOffIcon","EyeOnIcon","Fragment","season_name","marginTop","scheduled_datetime","format","season_description","label","type","max_picks","toFixed","tickets_sold","tickets_available","flex","borderWidth","borderColor","electric","title","title_color","onPress","utility","warning","success","balance","parseFloat","alert","promo_balance","incentive","gold","height"],"sourceRoot":"../../../../src","sources":["CompetitionSeason/components/EnterSeasonPrompt.tsx"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAErD,OAAOC,KAA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AAM,CAAC+B,MAAM,CAACC;EAAM,GAAC,GAAC,EAACvB,cAAc,EAAEwE,aAAa,EAAC,sBAA0B,CAAC,eACrHpF,KAAA,CAAA+B,aAAA,CAACzB,IAAI;IAAC0B,KAAK,EAAE;MAAE6B,SAAS,EAAC;IAAC,CAAE;IAACrB,IAAI,EAAE,EAAG;IAACC,KAAK,EAAEtC,MAAM,CAAC+B,MAAM,CAACC,KAAM;IAACS,MAAM,EAAC;EAAS,GAAC,yCAA6C,CAC/H,CAEI,CAAC,gBAClB5C,KAAA,CAAA+B,aAAA,CAAA/B,KAAA,CAAA2D,QAAA,MAAI,CACH,CAAC;AAEf,CAAC;AAED,eAAejD,iBAAiB","ignoreList":[]}
@@ -0,0 +1,119 @@
1
+ import React from 'react';
2
+ import { View, TouchableOpacity, Image } from 'react-native';
3
+ import Colors from '../../constants/colors';
4
+ import { Button, Icons, Text } from '../../Components';
5
+ import { SeasonHelpers } from '../api';
6
+ import moment from 'moment-mini';
7
+ const SeasonHeader = ({
8
+ action_loading,
9
+ authenticated_season_player,
10
+ competition_season,
11
+ competitions,
12
+ onShareSeason,
13
+ onJoin,
14
+ onLeave
15
+ }) => {
16
+ const can_join = SeasonHelpers.canJoin(competition_season, competitions);
17
+ const can_leave = true;
18
+ return /*#__PURE__*/React.createElement(View, {
19
+ style: {
20
+ backgroundColor: Colors.shades.white
21
+ }
22
+ }, /*#__PURE__*/React.createElement(View, {
23
+ nativeID: "competition_header",
24
+ style: {
25
+ flexDirection: 'row',
26
+ alignItems: 'center',
27
+ padding: 20,
28
+ borderBottomWidth: 1,
29
+ borderColor: Colors.shades.shade600
30
+ }
31
+ }, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Image, {
32
+ source: {
33
+ uri: competition_season.image?.url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1649737862/be_logo_jte2ux.webp'
34
+ },
35
+ style: {
36
+ height: 50,
37
+ width: 50,
38
+ borderRadius: 4
39
+ },
40
+ resizeMode: "cover"
41
+ })), /*#__PURE__*/React.createElement(View, {
42
+ style: {
43
+ flex: 1,
44
+ marginLeft: 10
45
+ }
46
+ }, /*#__PURE__*/React.createElement(Text, {
47
+ theme: "header"
48
+ }, competition_season.season_name), /*#__PURE__*/React.createElement(Text, {
49
+ style: {
50
+ marginTop: 4
51
+ },
52
+ theme: "header_2>"
53
+ }, competition_season.season_description)), /*#__PURE__*/React.createElement(TouchableOpacity, {
54
+ style: {
55
+ paddingLeft: 10
56
+ },
57
+ onPress: () => onShareSeason(competition_season)
58
+ }, /*#__PURE__*/React.createElement(Icons.ShareIcon, {
59
+ color: Colors.brand.midnight,
60
+ size: 14
61
+ }))), /*#__PURE__*/React.createElement(View, {
62
+ style: {
63
+ flexDirection: 'row',
64
+ padding: 10,
65
+ backgroundColor: Colors.shades.shade100
66
+ }
67
+ }, /*#__PURE__*/React.createElement(View, {
68
+ style: {
69
+ flex: 1
70
+ }
71
+ }, /*#__PURE__*/React.createElement(Text, {
72
+ size: 12,
73
+ color: Colors.brand.midnight,
74
+ weight: "regular"
75
+ }, competition_season.status == 'closed' ? 'COMPLETED' : competition_season.status == 'pending' ? 'UNDER CONSTRUCTION' : can_join ? 'JOIN' : 'IN PROGRESS'), competition_season.status == 'pending' ? /*#__PURE__*/React.createElement(Text, {
76
+ style: {
77
+ marginTop: 5
78
+ },
79
+ size: 12,
80
+ color: Colors.brand.midnight,
81
+ weight: "bold"
82
+ }, "The admin is still working on this season") : can_join ? /*#__PURE__*/React.createElement(Text, {
83
+ style: {
84
+ marginTop: 5
85
+ },
86
+ size: 12,
87
+ color: Colors.brand.midnight,
88
+ weight: "bold"
89
+ }, competition_season.allow_late_buy_in ? 'anytime during the season' : `until ${moment(competition_season.scheduled_datetime).format('MMM DD hh:mm a')}`) : /*#__PURE__*/React.createElement(Text, {
90
+ style: {
91
+ marginTop: 5
92
+ },
93
+ size: 12,
94
+ color: Colors.brand.midnight,
95
+ weight: "bold"
96
+ }, moment(competition_season.scheduled_datetime).format('MMM DD hh:mm a'))), !authenticated_season_player ? /*#__PURE__*/React.createElement(Button, {
97
+ title: "JOIN",
98
+ disabled: action_loading,
99
+ style: {
100
+ opacity: action_loading ? 0.5 : 1
101
+ },
102
+ loading: action_loading,
103
+ title_color: Colors.shades.white,
104
+ backgroundColor: Colors.utility.success,
105
+ onPress: () => onJoin(competition_season)
106
+ }) : /*#__PURE__*/React.createElement(Button, {
107
+ title: "LEAVE",
108
+ backgroundColor: Colors.utility.error,
109
+ loading: action_loading,
110
+ title_color: Colors.shades.white,
111
+ style: {
112
+ opacity: can_leave && !action_loading ? 1 : 0.5
113
+ },
114
+ disabled: !can_leave || action_loading,
115
+ onPress: () => onLeave(authenticated_season_player.competition_season_player_id)
116
+ })));
117
+ };
118
+ export default SeasonHeader;
119
+ //# sourceMappingURL=SeasonHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","TouchableOpacity","Image","Colors","Button","Icons","Text","SeasonHelpers","moment","SeasonHeader","action_loading","authenticated_season_player","competition_season","competitions","onShareSeason","onJoin","onLeave","can_join","canJoin","can_leave","createElement","style","backgroundColor","shades","white","nativeID","flexDirection","alignItems","padding","borderBottomWidth","borderColor","shade600","source","uri","image","url","height","width","borderRadius","resizeMode","flex","marginLeft","theme","season_name","marginTop","season_description","paddingLeft","onPress","ShareIcon","color","brand","midnight","size","shade100","weight","status","allow_late_buy_in","scheduled_datetime","format","title","disabled","opacity","loading","title_color","utility","success","error","competition_season_player_id"],"sourceRoot":"../../../../src","sources":["CompetitionSeason/components/SeasonHeader.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ,cAAc;AAC5D,OAAOC,MAAM,MAAM,wBAAwB;AAE3C,SAASC,MAAM,EAAEC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB;AACtD,SAASC,aAAa,QAAQ,QAAQ;AACtC,OAAOC,MAAM,MAAM,aAAa;AAah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