be-components 0.7.2 → 0.7.4

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 (432) hide show
  1. package/lib/commonjs/ApiOverrides/index.js +18 -0
  2. package/lib/commonjs/ApiOverrides/index.js.map +1 -1
  3. package/lib/commonjs/Authenticator/index.js.map +1 -1
  4. package/lib/commonjs/Checkout/api/index.js.map +1 -1
  5. package/lib/commonjs/Checkout/index.js.map +1 -1
  6. package/lib/commonjs/Competition/api/index.js +655 -0
  7. package/lib/commonjs/Competition/api/index.js.map +1 -0
  8. package/lib/commonjs/Competition/components/AthleteMarketCard.js +168 -0
  9. package/lib/commonjs/Competition/components/AthleteMarketCard.js.map +1 -0
  10. package/lib/commonjs/Competition/components/CompetitionCard.js +180 -0
  11. package/lib/commonjs/Competition/components/CompetitionCard.js.map +1 -0
  12. package/lib/commonjs/Competition/components/CompetitionInfoCard.js +264 -0
  13. package/lib/commonjs/Competition/components/CompetitionInfoCard.js.map +1 -0
  14. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js +281 -0
  15. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js.map +1 -0
  16. package/lib/commonjs/Competition/components/CompetitionPlay.js +1269 -0
  17. package/lib/commonjs/Competition/components/CompetitionPlay.js.map +1 -0
  18. package/lib/commonjs/Competition/components/CompetitionSeasonCard.js +111 -0
  19. package/lib/commonjs/Competition/components/CompetitionSeasonCard.js.map +1 -0
  20. package/lib/commonjs/Competition/components/CompetitionSelector.js +122 -0
  21. package/lib/commonjs/Competition/components/CompetitionSelector.js.map +1 -0
  22. package/lib/commonjs/Competition/components/CompetitionTypeCard.js +380 -0
  23. package/lib/commonjs/Competition/components/CompetitionTypeCard.js.map +1 -0
  24. package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js +237 -0
  25. package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js.map +1 -0
  26. package/lib/commonjs/Competition/components/LeaderPicks.js +322 -0
  27. package/lib/commonjs/Competition/components/LeaderPicks.js.map +1 -0
  28. package/lib/commonjs/Competition/components/ManageSeasonForm.js +605 -0
  29. package/lib/commonjs/Competition/components/ManageSeasonForm.js.map +1 -0
  30. package/lib/commonjs/Competition/components/MarketsCard.js +148 -0
  31. package/lib/commonjs/Competition/components/MarketsCard.js.map +1 -0
  32. package/lib/commonjs/Competition/components/MatchMarketCard.js +199 -0
  33. package/lib/commonjs/Competition/components/MatchMarketCard.js.map +1 -0
  34. package/lib/commonjs/Competition/components/NavOutPrompt.js +159 -0
  35. package/lib/commonjs/Competition/components/NavOutPrompt.js.map +1 -0
  36. package/lib/commonjs/Competition/components/SeasonInfoModal.js +400 -0
  37. package/lib/commonjs/Competition/components/SeasonInfoModal.js.map +1 -0
  38. package/lib/commonjs/Competition/components/TeamEventCard.js +217 -0
  39. package/lib/commonjs/Competition/components/TeamEventCard.js.map +1 -0
  40. package/lib/commonjs/Competition/components/WagerPickForm.js +278 -0
  41. package/lib/commonjs/Competition/components/WagerPickForm.js.map +1 -0
  42. package/lib/commonjs/Competition/index.js +42 -0
  43. package/lib/commonjs/Competition/index.js.map +1 -0
  44. package/lib/commonjs/Components/Icons.js.map +1 -1
  45. package/lib/commonjs/Components/Jerseys.js +713 -0
  46. package/lib/commonjs/Components/Jerseys.js.map +1 -0
  47. package/lib/commonjs/Components/LinearDiagnal.js +1 -1
  48. package/lib/commonjs/Components/LinearDiagnal.js.map +1 -1
  49. package/lib/commonjs/Components/Switch.js +81 -0
  50. package/lib/commonjs/Components/Switch.js.map +1 -0
  51. package/lib/commonjs/Components/index.js +14 -0
  52. package/lib/commonjs/Components/index.js.map +1 -1
  53. package/lib/commonjs/Observer/api/index.js +3 -0
  54. package/lib/commonjs/Observer/api/index.js.map +1 -1
  55. package/lib/commonjs/Poll/api/index.js +240 -0
  56. package/lib/commonjs/Poll/api/index.js.map +1 -0
  57. package/lib/commonjs/Poll/components/CampaignPlay.js +553 -0
  58. package/lib/commonjs/Poll/components/CampaignPlay.js.map +1 -0
  59. package/lib/commonjs/Poll/components/CampaignProgressBar.js +118 -0
  60. package/lib/commonjs/Poll/components/CampaignProgressBar.js.map +1 -0
  61. package/lib/commonjs/Poll/components/CampaignResult.js +382 -0
  62. package/lib/commonjs/Poll/components/CampaignResult.js.map +1 -0
  63. package/lib/commonjs/Poll/components/CampaignSelector.js +124 -0
  64. package/lib/commonjs/Poll/components/CampaignSelector.js.map +1 -0
  65. package/lib/commonjs/Poll/components/PollCampaignCard.js +66 -0
  66. package/lib/commonjs/Poll/components/PollCampaignCard.js.map +1 -0
  67. package/lib/commonjs/Poll/components/PollCard.js +480 -0
  68. package/lib/commonjs/Poll/components/PollCard.js.map +1 -0
  69. package/lib/commonjs/Poll/components/PollOptionCard.js +158 -0
  70. package/lib/commonjs/Poll/components/PollOptionCard.js.map +1 -0
  71. package/lib/commonjs/Poll/components/PollSelectCard.js +189 -0
  72. package/lib/commonjs/Poll/components/PollSelectCard.js.map +1 -0
  73. package/lib/commonjs/Poll/components/ResponseTimer.js +48 -0
  74. package/lib/commonjs/Poll/components/ResponseTimer.js.map +1 -0
  75. package/lib/commonjs/Poll/components/WidgetHeader.js +83 -0
  76. package/lib/commonjs/Poll/components/WidgetHeader.js.map +1 -0
  77. package/lib/commonjs/Poll/index.js +31 -0
  78. package/lib/commonjs/Poll/index.js.map +1 -0
  79. package/lib/commonjs/ProfileManager/Components/BasicInfoManager.js.map +1 -1
  80. package/lib/commonjs/ProfileManager/Components/BasicStatus.js.map +1 -1
  81. package/lib/commonjs/ProfileManager/Components/CodeRedeem.js +3 -1
  82. package/lib/commonjs/ProfileManager/Components/CodeRedeem.js.map +1 -1
  83. package/lib/commonjs/ProfileManager/Components/DOBManager.js.map +1 -1
  84. package/lib/commonjs/ProfileManager/Components/EmailManager.js.map +1 -1
  85. package/lib/commonjs/ProfileManager/Components/PasswordManager.js.map +1 -1
  86. package/lib/commonjs/ProfileManager/Components/PhoneManager.js.map +1 -1
  87. package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  88. package/lib/commonjs/ProfileManager/Components/ProfileWelcome.js.map +1 -1
  89. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js +5 -0
  90. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js.map +1 -1
  91. package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
  92. package/lib/commonjs/ProfileManager/index.js +2 -0
  93. package/lib/commonjs/ProfileManager/index.js.map +1 -1
  94. package/lib/commonjs/Wallet/api/index.js +4 -1
  95. package/lib/commonjs/Wallet/api/index.js.map +1 -1
  96. package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -1
  97. package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -1
  98. package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -1
  99. package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -1
  100. package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -1
  101. package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
  102. package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
  103. package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
  104. package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -1
  105. package/lib/commonjs/Wallet/components/WalletSettings.js.map +1 -1
  106. package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
  107. package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -1
  108. package/lib/commonjs/Wallet/index.js.map +1 -1
  109. package/lib/commonjs/index.js +14 -0
  110. package/lib/commonjs/index.js.map +1 -1
  111. package/lib/module/ApiOverrides/index.js +18 -0
  112. package/lib/module/ApiOverrides/index.js.map +1 -1
  113. package/lib/module/Authenticator/index.js.map +1 -1
  114. package/lib/module/Checkout/api/index.js.map +1 -1
  115. package/lib/module/Checkout/index.js.map +1 -1
  116. package/lib/module/Competition/api/index.js +649 -0
  117. package/lib/module/Competition/api/index.js.map +1 -0
  118. package/lib/module/Competition/components/AthleteMarketCard.js +161 -0
  119. package/lib/module/Competition/components/AthleteMarketCard.js.map +1 -0
  120. package/lib/module/Competition/components/CompetitionCard.js +173 -0
  121. package/lib/module/Competition/components/CompetitionCard.js.map +1 -0
  122. package/lib/module/Competition/components/CompetitionInfoCard.js +257 -0
  123. package/lib/module/Competition/components/CompetitionInfoCard.js.map +1 -0
  124. package/lib/module/Competition/components/CompetitionLeaderboard.js +272 -0
  125. package/lib/module/Competition/components/CompetitionLeaderboard.js.map +1 -0
  126. package/lib/module/Competition/components/CompetitionPlay.js +1260 -0
  127. package/lib/module/Competition/components/CompetitionPlay.js.map +1 -0
  128. package/lib/module/Competition/components/CompetitionSeasonCard.js +104 -0
  129. package/lib/module/Competition/components/CompetitionSeasonCard.js.map +1 -0
  130. package/lib/module/Competition/components/CompetitionSelector.js +113 -0
  131. package/lib/module/Competition/components/CompetitionSelector.js.map +1 -0
  132. package/lib/module/Competition/components/CompetitionTypeCard.js +371 -0
  133. package/lib/module/Competition/components/CompetitionTypeCard.js.map +1 -0
  134. package/lib/module/Competition/components/EnterCompetitionPrompt.js +228 -0
  135. package/lib/module/Competition/components/EnterCompetitionPrompt.js.map +1 -0
  136. package/lib/module/Competition/components/LeaderPicks.js +313 -0
  137. package/lib/module/Competition/components/LeaderPicks.js.map +1 -0
  138. package/lib/module/Competition/components/ManageSeasonForm.js +596 -0
  139. package/lib/module/Competition/components/ManageSeasonForm.js.map +1 -0
  140. package/lib/module/Competition/components/MarketsCard.js +139 -0
  141. package/lib/module/Competition/components/MarketsCard.js.map +1 -0
  142. package/lib/module/Competition/components/MatchMarketCard.js +192 -0
  143. package/lib/module/Competition/components/MatchMarketCard.js.map +1 -0
  144. package/lib/module/Competition/components/NavOutPrompt.js +152 -0
  145. package/lib/module/Competition/components/NavOutPrompt.js.map +1 -0
  146. package/lib/module/Competition/components/SeasonInfoModal.js +391 -0
  147. package/lib/module/Competition/components/SeasonInfoModal.js.map +1 -0
  148. package/lib/module/Competition/components/TeamEventCard.js +210 -0
  149. package/lib/module/Competition/components/TeamEventCard.js.map +1 -0
  150. package/lib/module/Competition/components/WagerPickForm.js +269 -0
  151. package/lib/module/Competition/components/WagerPickForm.js.map +1 -0
  152. package/lib/module/Competition/index.js +33 -0
  153. package/lib/module/Competition/index.js.map +1 -0
  154. package/lib/module/Components/Icons.js.map +1 -1
  155. package/lib/module/Components/Jerseys.js +705 -0
  156. package/lib/module/Components/Jerseys.js.map +1 -0
  157. package/lib/module/Components/LinearDiagnal.js +2 -3
  158. package/lib/module/Components/LinearDiagnal.js.map +1 -1
  159. package/lib/module/Components/Switch.js +74 -0
  160. package/lib/module/Components/Switch.js.map +1 -0
  161. package/lib/module/Components/index.js +3 -1
  162. package/lib/module/Components/index.js.map +1 -1
  163. package/lib/module/Observer/api/index.js +3 -0
  164. package/lib/module/Observer/api/index.js.map +1 -1
  165. package/lib/module/Poll/api/index.js +234 -0
  166. package/lib/module/Poll/api/index.js.map +1 -0
  167. package/lib/module/Poll/components/CampaignPlay.js +545 -0
  168. package/lib/module/Poll/components/CampaignPlay.js.map +1 -0
  169. package/lib/module/Poll/components/CampaignProgressBar.js +110 -0
  170. package/lib/module/Poll/components/CampaignProgressBar.js.map +1 -0
  171. package/lib/module/Poll/components/CampaignResult.js +374 -0
  172. package/lib/module/Poll/components/CampaignResult.js.map +1 -0
  173. package/lib/module/Poll/components/CampaignSelector.js +115 -0
  174. package/lib/module/Poll/components/CampaignSelector.js.map +1 -0
  175. package/lib/module/Poll/components/PollCampaignCard.js +59 -0
  176. package/lib/module/Poll/components/PollCampaignCard.js.map +1 -0
  177. package/lib/module/Poll/components/PollCard.js +472 -0
  178. package/lib/module/Poll/components/PollCard.js.map +1 -0
  179. package/lib/module/Poll/components/PollOptionCard.js +149 -0
  180. package/lib/module/Poll/components/PollOptionCard.js.map +1 -0
  181. package/lib/module/Poll/components/PollSelectCard.js +182 -0
  182. package/lib/module/Poll/components/PollSelectCard.js.map +1 -0
  183. package/lib/module/Poll/components/ResponseTimer.js +39 -0
  184. package/lib/module/Poll/components/ResponseTimer.js.map +1 -0
  185. package/lib/module/Poll/components/WidgetHeader.js +76 -0
  186. package/lib/module/Poll/components/WidgetHeader.js.map +1 -0
  187. package/lib/module/Poll/index.js +22 -0
  188. package/lib/module/Poll/index.js.map +1 -0
  189. package/lib/module/ProfileManager/Components/BasicInfoManager.js.map +1 -1
  190. package/lib/module/ProfileManager/Components/BasicStatus.js.map +1 -1
  191. package/lib/module/ProfileManager/Components/CodeRedeem.js +3 -1
  192. package/lib/module/ProfileManager/Components/CodeRedeem.js.map +1 -1
  193. package/lib/module/ProfileManager/Components/DOBManager.js.map +1 -1
  194. package/lib/module/ProfileManager/Components/EmailManager.js.map +1 -1
  195. package/lib/module/ProfileManager/Components/PasswordManager.js.map +1 -1
  196. package/lib/module/ProfileManager/Components/PhoneManager.js.map +1 -1
  197. package/lib/module/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  198. package/lib/module/ProfileManager/Components/ProfileWelcome.js.map +1 -1
  199. package/lib/module/ProfileManager/Components/ProfileWizard.js +5 -0
  200. package/lib/module/ProfileManager/Components/ProfileWizard.js.map +1 -1
  201. package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
  202. package/lib/module/ProfileManager/index.js +2 -0
  203. package/lib/module/ProfileManager/index.js.map +1 -1
  204. package/lib/module/Wallet/api/index.js +4 -1
  205. package/lib/module/Wallet/api/index.js.map +1 -1
  206. package/lib/module/Wallet/components/ACHAddCard.js.map +1 -1
  207. package/lib/module/Wallet/components/AddressManager.js.map +1 -1
  208. package/lib/module/Wallet/components/DepositCard.js.map +1 -1
  209. package/lib/module/Wallet/components/FundAccountCard.js.map +1 -1
  210. package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -1
  211. package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
  212. package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
  213. package/lib/module/Wallet/components/MyBalance.js.map +1 -1
  214. package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -1
  215. package/lib/module/Wallet/components/WalletSettings.js.map +1 -1
  216. package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
  217. package/lib/module/Wallet/components/WithdrawCard.js.map +1 -1
  218. package/lib/module/Wallet/index.js.map +1 -1
  219. package/lib/module/index.js +3 -1
  220. package/lib/module/index.js.map +1 -1
  221. package/lib/typescript/src/ApiOverrides/index.d.ts +1 -0
  222. package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
  223. package/lib/typescript/src/Authenticator/api/index.d.ts +2 -2
  224. package/lib/typescript/src/Authenticator/api/index.d.ts.map +1 -1
  225. package/lib/typescript/src/Authenticator/index.d.ts.map +1 -1
  226. package/lib/typescript/src/Checkout/api/index.d.ts +1 -2
  227. package/lib/typescript/src/Checkout/api/index.d.ts.map +1 -1
  228. package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
  229. package/lib/typescript/src/Competition/api/index.d.ts +128 -0
  230. package/lib/typescript/src/Competition/api/index.d.ts.map +1 -0
  231. package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts +19 -0
  232. package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts.map +1 -0
  233. package/lib/typescript/src/Competition/components/CompetitionCard.d.ts +12 -0
  234. package/lib/typescript/src/Competition/components/CompetitionCard.d.ts.map +1 -0
  235. package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts +16 -0
  236. package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts.map +1 -0
  237. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts +14 -0
  238. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts.map +1 -0
  239. package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts +20 -0
  240. package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts.map +1 -0
  241. package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts +10 -0
  242. package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts.map +1 -0
  243. package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts +11 -0
  244. package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts.map +1 -0
  245. package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts +14 -0
  246. package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts.map +1 -0
  247. package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts +16 -0
  248. package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts.map +1 -0
  249. package/lib/typescript/src/Competition/components/LeaderPicks.d.ts +22 -0
  250. package/lib/typescript/src/Competition/components/LeaderPicks.d.ts.map +1 -0
  251. package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts +10 -0
  252. package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts.map +1 -0
  253. package/lib/typescript/src/Competition/components/MarketsCard.d.ts +15 -0
  254. package/lib/typescript/src/Competition/components/MarketsCard.d.ts.map +1 -0
  255. package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts +21 -0
  256. package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts.map +1 -0
  257. package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts +23 -0
  258. package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts.map +1 -0
  259. package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts +14 -0
  260. package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts.map +1 -0
  261. package/lib/typescript/src/Competition/components/TeamEventCard.d.ts +17 -0
  262. package/lib/typescript/src/Competition/components/TeamEventCard.d.ts.map +1 -0
  263. package/lib/typescript/src/Competition/components/WagerPickForm.d.ts +15 -0
  264. package/lib/typescript/src/Competition/components/WagerPickForm.d.ts.map +1 -0
  265. package/lib/typescript/src/Competition/index.d.ts +11 -0
  266. package/lib/typescript/src/Competition/index.d.ts.map +1 -0
  267. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  268. package/lib/typescript/src/Components/Jerseys.d.ts +16 -0
  269. package/lib/typescript/src/Components/Jerseys.d.ts.map +1 -0
  270. package/lib/typescript/src/Components/LinearDiagnal.d.ts.map +1 -1
  271. package/lib/typescript/src/Components/Switch.d.ts +9 -0
  272. package/lib/typescript/src/Components/Switch.d.ts.map +1 -0
  273. package/lib/typescript/src/Components/index.d.ts +3 -1
  274. package/lib/typescript/src/Components/index.d.ts.map +1 -1
  275. package/lib/typescript/src/Observer/api/index.d.ts.map +1 -1
  276. package/lib/typescript/src/Poll/api/index.d.ts +61 -0
  277. package/lib/typescript/src/Poll/api/index.d.ts.map +1 -0
  278. package/lib/typescript/src/Poll/components/CampaignPlay.d.ts +14 -0
  279. package/lib/typescript/src/Poll/components/CampaignPlay.d.ts.map +1 -0
  280. package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts +12 -0
  281. package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts.map +1 -0
  282. package/lib/typescript/src/Poll/components/CampaignResult.d.ts +13 -0
  283. package/lib/typescript/src/Poll/components/CampaignResult.d.ts.map +1 -0
  284. package/lib/typescript/src/Poll/components/CampaignSelector.d.ts +9 -0
  285. package/lib/typescript/src/Poll/components/CampaignSelector.d.ts.map +1 -0
  286. package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts +10 -0
  287. package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts.map +1 -0
  288. package/lib/typescript/src/Poll/components/PollCard.d.ts +16 -0
  289. package/lib/typescript/src/Poll/components/PollCard.d.ts.map +1 -0
  290. package/lib/typescript/src/Poll/components/PollOptionCard.d.ts +14 -0
  291. package/lib/typescript/src/Poll/components/PollOptionCard.d.ts.map +1 -0
  292. package/lib/typescript/src/Poll/components/PollSelectCard.d.ts +16 -0
  293. package/lib/typescript/src/Poll/components/PollSelectCard.d.ts.map +1 -0
  294. package/lib/typescript/src/Poll/components/ResponseTimer.d.ts +9 -0
  295. package/lib/typescript/src/Poll/components/ResponseTimer.d.ts.map +1 -0
  296. package/lib/typescript/src/Poll/components/WidgetHeader.d.ts +13 -0
  297. package/lib/typescript/src/Poll/components/WidgetHeader.d.ts.map +1 -0
  298. package/lib/typescript/src/Poll/index.d.ts +7 -0
  299. package/lib/typescript/src/Poll/index.d.ts.map +1 -0
  300. package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts +1 -1
  301. package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
  302. package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts +1 -2
  303. package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
  304. package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts +9 -2
  305. package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
  306. package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts +1 -1
  307. package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts.map +1 -1
  308. package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts +1 -1
  309. package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts.map +1 -1
  310. package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts +1 -1
  311. package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
  312. package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts +1 -1
  313. package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
  314. package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts +1 -1
  315. package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
  316. package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts +1 -2
  317. package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
  318. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts +10 -3
  319. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
  320. package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts +2 -2
  321. package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
  322. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts +1 -2
  323. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  324. package/lib/typescript/src/ProfileManager/api/index.d.ts +2 -2
  325. package/lib/typescript/src/ProfileManager/api/index.d.ts.map +1 -1
  326. package/lib/typescript/src/ProfileManager/index.d.ts +9 -2
  327. package/lib/typescript/src/ProfileManager/index.d.ts.map +1 -1
  328. package/lib/typescript/src/Wallet/api/index.d.ts +2 -3
  329. package/lib/typescript/src/Wallet/api/index.d.ts.map +1 -1
  330. package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts +1 -2
  331. package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -1
  332. package/lib/typescript/src/Wallet/components/AddressManager.d.ts +1 -2
  333. package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -1
  334. package/lib/typescript/src/Wallet/components/DepositCard.d.ts +1 -2
  335. package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -1
  336. package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts +1 -2
  337. package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -1
  338. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts +1 -2
  339. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -1
  340. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts +1 -2
  341. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
  342. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts +1 -2
  343. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -1
  344. package/lib/typescript/src/Wallet/components/MyBalance.d.ts +1 -2
  345. package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
  346. package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts +1 -2
  347. package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -1
  348. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts +1 -2
  349. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts.map +1 -1
  350. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts +1 -2
  351. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
  352. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts +1 -2
  353. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -1
  354. package/lib/typescript/src/Wallet/index.d.ts +1 -2
  355. package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
  356. package/lib/typescript/src/index.d.ts +3 -1
  357. package/lib/typescript/src/index.d.ts.map +1 -1
  358. package/package.json +1 -1
  359. package/src/ApiOverrides/index.ts +19 -0
  360. package/src/Authenticator/api/index.ts +2 -2
  361. package/src/Authenticator/api/types.d.ts +1 -25
  362. package/src/Authenticator/index.tsx +2 -1
  363. package/src/Checkout/api/index.tsx +1 -2
  364. package/src/Checkout/index.tsx +1 -2
  365. package/src/Competition/api/index.ts +568 -0
  366. package/src/Competition/components/AthleteMarketCard.tsx +116 -0
  367. package/src/Competition/components/CompetitionCard.tsx +82 -0
  368. package/src/Competition/components/CompetitionInfoCard.tsx +149 -0
  369. package/src/Competition/components/CompetitionLeaderboard.tsx +183 -0
  370. package/src/Competition/components/CompetitionPlay.tsx +936 -0
  371. package/src/Competition/components/CompetitionSeasonCard.tsx +48 -0
  372. package/src/Competition/components/CompetitionSelector.tsx +91 -0
  373. package/src/Competition/components/CompetitionTypeCard.tsx +211 -0
  374. package/src/Competition/components/EnterCompetitionPrompt.tsx +127 -0
  375. package/src/Competition/components/LeaderPicks.tsx +214 -0
  376. package/src/Competition/components/ManageSeasonForm.tsx +271 -0
  377. package/src/Competition/components/MarketsCard.tsx +108 -0
  378. package/src/Competition/components/MatchMarketCard.tsx +126 -0
  379. package/src/Competition/components/NavOutPrompt.tsx +87 -0
  380. package/src/Competition/components/SeasonInfoModal.tsx +212 -0
  381. package/src/Competition/components/TeamEventCard.tsx +136 -0
  382. package/src/Competition/components/WagerPickForm.tsx +114 -0
  383. package/src/Competition/index.tsx +36 -0
  384. package/src/Components/Icons.tsx +0 -2
  385. package/src/Components/Jerseys.tsx +268 -0
  386. package/src/Components/LinearDiagnal.tsx +2 -3
  387. package/src/Components/Switch.tsx +55 -0
  388. package/src/Components/index.tsx +5 -1
  389. package/src/Observer/api/index.ts +1 -0
  390. package/src/Poll/api/index.ts +178 -0
  391. package/src/Poll/components/CampaignPlay.tsx +407 -0
  392. package/src/Poll/components/CampaignProgressBar.tsx +70 -0
  393. package/src/Poll/components/CampaignResult.tsx +180 -0
  394. package/src/Poll/components/CampaignSelector.tsx +96 -0
  395. package/src/Poll/components/PollCampaignCard.tsx +35 -0
  396. package/src/Poll/components/PollCard.tsx +335 -0
  397. package/src/Poll/components/PollOptionCard.tsx +110 -0
  398. package/src/Poll/components/PollSelectCard.tsx +106 -0
  399. package/src/Poll/components/ResponseTimer.tsx +37 -0
  400. package/src/Poll/components/WidgetHeader.tsx +46 -0
  401. package/src/Poll/index.tsx +25 -0
  402. package/src/ProfileManager/Components/BasicInfoManager.tsx +1 -1
  403. package/src/ProfileManager/Components/BasicStatus.tsx +1 -2
  404. package/src/ProfileManager/Components/CodeRedeem.tsx +10 -3
  405. package/src/ProfileManager/Components/DOBManager.tsx +1 -1
  406. package/src/ProfileManager/Components/EmailManager.tsx +1 -1
  407. package/src/ProfileManager/Components/PasswordManager.tsx +2 -1
  408. package/src/ProfileManager/Components/PhoneManager.tsx +1 -1
  409. package/src/ProfileManager/Components/ProfilePicManager.tsx +1 -1
  410. package/src/ProfileManager/Components/ProfileWelcome.tsx +1 -2
  411. package/src/ProfileManager/Components/ProfileWizard.tsx +14 -3
  412. package/src/ProfileManager/Components/SettingsManager.tsx +2 -2
  413. package/src/ProfileManager/Components/VouchCard.tsx +1 -2
  414. package/src/ProfileManager/api/index.ts +2 -2
  415. package/src/ProfileManager/api/types.d.ts +0 -35
  416. package/src/ProfileManager/index.tsx +11 -3
  417. package/src/Wallet/api/index.ts +6 -4
  418. package/src/Wallet/components/ACHAddCard.tsx +1 -2
  419. package/src/Wallet/components/AddressManager.tsx +1 -2
  420. package/src/Wallet/components/DepositCard.tsx +1 -2
  421. package/src/Wallet/components/FundAccountCard.tsx +1 -2
  422. package/src/Wallet/components/ManageAccountCard.tsx +1 -2
  423. package/src/Wallet/components/ManualACHAdd.tsx +1 -2
  424. package/src/Wallet/components/ManualCardAdd.tsx +1 -2
  425. package/src/Wallet/components/MyBalance.tsx +1 -2
  426. package/src/Wallet/components/WalletActionSelector.tsx +1 -2
  427. package/src/Wallet/components/WalletSettings.tsx +1 -2
  428. package/src/Wallet/components/WalletSetup.tsx +1 -2
  429. package/src/Wallet/components/WithdrawCard.tsx +1 -2
  430. package/src/Wallet/index.tsx +1 -2
  431. package/src/index.tsx +5 -2
  432. package/src/types.d.ts +483 -0
@@ -0,0 +1,126 @@
1
+ import React from 'react';
2
+ import { ActivityIndicator, FlatList, View } from "react-native"
3
+ import MarketsCard from "./MarketsCard"
4
+ import moment from 'moment-mini';
5
+ import type { AthleteProps, CompetitionMatchMarketProps, CompetitionMatchProps, CompetitionProps, CompetitionTypeProps, MarketProps, MatchProps, PlayerPickProps, TeamProps } from '../../types';
6
+ import { CompetitionHelpers } from '../api';
7
+ import { Text } from '../../Components';
8
+ import Colors from '../../constants/colors';
9
+ import LinearDiagnal from '../../Components/LinearDiagnal';
10
+ import { AthleteImage } from '../../Components/Jerseys';
11
+
12
+
13
+ type MatchMarketCardProps = {
14
+ match:MatchProps,
15
+ competition:CompetitionProps,
16
+ competition_type:CompetitionTypeProps,
17
+ home_athlete?:AthleteProps,
18
+ away_athlete?:AthleteProps,
19
+ home_team?:TeamProps,
20
+ away_team?:TeamProps,
21
+ markets:MarketProps[]
22
+ onPick:(pp:PlayerPickProps, event_title:string, event_start:string) => void
23
+ mode: 'view'|'play'
24
+ loading?:boolean,
25
+ //orientation:'horizontal'|'vertical',
26
+ player_picks:PlayerPickProps[],
27
+ competition_match:CompetitionMatchProps,
28
+ competition_match_markets:CompetitionMatchMarketProps[]
29
+ }
30
+ const MatchMarketCard = ({ match, home_athlete, away_athlete, competition_type, markets, competition_match, player_picks, competition_match_markets, mode, onPick, loading }:MatchMarketCardProps) => {
31
+ const wager_picks = player_picks.filter(pp => pp.stake > 0)
32
+ const market = markets.find(m => m.market_id == competition_match.market_id_override)
33
+
34
+ const handleMarketSelect = async(mm:CompetitionMatchMarketProps, player_pick?:PlayerPickProps) => {
35
+ if(!match){ return }
36
+ if(match.participant_type != 'athlete'){ return alert('Not set up for team based matches') }
37
+ let market = markets.find(m => m.market_id == mm.market_id)
38
+ if(!match || !competition_type || !market || !away_athlete || !home_athlete){ return alert('Unable to process') }
39
+ if(moment(match.scheduled_datetime).isBefore(moment())){ return alert('This event has already started') }
40
+ if(player_pick){
41
+ return onPick(player_pick, match.match_title, match.scheduled_datetime)
42
+ //await CompetitionStoreActions.removePlayerPick(player_pick.player_pick_id)
43
+ } else {
44
+ let pp = CompetitionHelpers.createPickFromMatchMarket(competition_match.competition_id, mm)
45
+ let pick_title = CompetitionHelpers.getPickTitleForMatch(pp, market)
46
+ return onPick({ ...pp, pick_title }, match.match_title, match.scheduled_datetime)
47
+ }
48
+ }
49
+
50
+
51
+ const renderWagerPicks = (data: { item:PlayerPickProps, index:number }) => {
52
+ const locked = mode == 'view' && moment().isBefore(moment(match.scheduled_datetime)) ? true : false
53
+ return (
54
+ <View style={{ flexDirection:'row', marginTop:5 }}>
55
+ <Text style={{ flex:1 }} size={12} color={Colors.highlights.highlight200}>{locked?'WAGER LOCKED':data.item.pick_title}</Text>
56
+ <Text style={{ flex:1 }} size={12} color={Colors.highlights.highlight200} textAlign="right">{locked?'':`${data.item.stake.toFixed(2)} to win ${data.item.potential_winnings.toFixed(2)}`}</Text>
57
+ </View>
58
+ )
59
+ }
60
+
61
+ if(!match || !away_athlete || !home_athlete){ return <></> }
62
+
63
+ return (
64
+ <View style={{ flex:1 }}>
65
+ <View style={{ flexDirection:'row', alignItems:'center', borderTopRightRadius:8, borderTopLeftRadius:8, padding:10, backgroundColor:Colors.shades.shade100 }}>
66
+ <Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='bold'>{match.match_title}</Text>
67
+ <Text size={12} color={Colors.brand.midnight} weight='regular'>{match.status == 'not_started'?moment(match.scheduled_datetime).format('MM/DD hh:mm a'):match.status}</Text>
68
+ </View>
69
+ {market ?
70
+ <LinearDiagnal
71
+ label={market.stat_label ?? market.type}
72
+ label_size={10}
73
+ style={{ padding:5 }}
74
+ left_color={Colors.incentive.gold}
75
+ right_color={'#ebd197'}
76
+ />
77
+ :<></>}
78
+ <View style={{ flex:1, padding:10 }}>
79
+ {match.participant_type == 'athlete' ?
80
+ <View nativeID="event_details" style={{ flex:1, flexDirection:'row', alignItems:'center' }}>
81
+ <View nativeID="away_athlete" style={{ flex:1 }}>
82
+ <AthleteImage size={24} athlete={away_athlete}/>
83
+ <Text style={{ padding:10 }} size={14} color={Colors.brand.midnight} weight='bold' textAlign="center">{away_athlete.first_name} {away_athlete.last_name}</Text>
84
+ </View>
85
+ <Text size={14} color={Colors.brand.midnight} style={{ padding:20 }} weight='bold'>VS</Text>
86
+ <View nativeID="away_athlete" style={{ flex:1 }}>
87
+ <AthleteImage size={24} athlete={home_athlete}/>
88
+ <Text style={{ padding:10 }} size={14} color={Colors.brand.midnight} weight='bold' textAlign="center">{home_athlete.first_name} {home_athlete.last_name}</Text>
89
+ </View>
90
+ </View>
91
+ :<></>}
92
+ <View nativeID="market_details">
93
+ <MarketsCard
94
+ player_picks={player_picks}
95
+ mode={mode}
96
+ markets={markets}
97
+ orientation="horizontal"
98
+ disabled={moment().isAfter(moment(match.scheduled_datetime))?true:false}
99
+ locked={mode == 'view' && moment().isBefore(moment(match.scheduled_datetime)) ? true : false}
100
+ competition_match_markets={competition_match_markets}
101
+ onMarketSelect={(mm, player_pick) => handleMarketSelect(mm, player_pick)}
102
+ />
103
+ {loading ?
104
+ <View style={{ position:'absolute', top:0, right:0, left:0, bottom:0, justifyContent:'center', alignItems:'center' }}>
105
+ <ActivityIndicator
106
+ size='large'
107
+ color={Colors.brand.midnight}
108
+ />
109
+ </View>
110
+ :<></>}
111
+ </View>
112
+ </View>
113
+ {wager_picks.length > 0 ?
114
+ <View nativeID="wager_picks">
115
+ <FlatList
116
+ data={wager_picks}
117
+ renderItem={renderWagerPicks}
118
+ keyExtractor={(item) => item.player_pick_id.toString()}
119
+ />
120
+ </View>
121
+ :<></>}
122
+ </View>
123
+ )
124
+ }
125
+
126
+ export default MatchMarketCard
@@ -0,0 +1,87 @@
1
+ import React from 'react';
2
+ import { Image, TouchableOpacity, View } from "react-native"
3
+ import type { CodeRequestProps, PlayerReferralProps, PromoProps, PublicPlayerProps, RewardOptionProps } from '../../types';
4
+ import { Button, Icons, Text } from '../../Components';
5
+ import Colors from '../../constants/colors';
6
+ import { CompetitionHelpers } from '../api';
7
+
8
+
9
+
10
+ type NavOutPromptProps = {
11
+ image_url?:string,
12
+ title:string
13
+ code_details: {
14
+ promo?:PromoProps,
15
+ code_request?: CodeRequestProps,
16
+ player_referral?:PlayerReferralProps,
17
+ referrer?:PublicPlayerProps,
18
+ reward_option?:RewardOptionProps
19
+ },
20
+ body:string,
21
+ max_width?:number
22
+ hide_accept?:boolean,
23
+ accept_title?:string,
24
+ cancel_title?:string,
25
+ onCancel:() => void,
26
+ onAccept: () => void
27
+ }
28
+
29
+ const NavOutPrompt = ({ image_url, code_details, accept_title, cancel_title, title, hide_accept, body, onCancel, onAccept, max_width }:NavOutPromptProps) => {
30
+
31
+ const { code_request, promo, referrer } = code_details;
32
+
33
+ return (
34
+ <View style={{ minWidth:350, borderRadius:8, maxWidth:max_width, backgroundColor:Colors.shades.white, minHeight:350 }}>
35
+ <View nativeID="title" style={{ padding:10, backgroundColor:Colors.shades.shade100, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
36
+ <Text size={18} color={Colors.brand.midnight} textAlign="center" weight='bold'>{title}</Text>
37
+ </View>
38
+ <View nativeID="body_image" style={{ flex:1, padding:20 }}>
39
+ <View nativeID="image" style={{ justifyContent:'center', alignItems:'center' }}>
40
+ <Image
41
+ source={{ uri: image_url }}
42
+ style={{ height:150, width:150, borderRadius:8 }}
43
+ resizeMode="cover"
44
+ />
45
+ </View>
46
+ <View style={{ padding:10 }}>
47
+ <Text size={14} color={Colors.brand.midnight} weight='semibold' textAlign="center">{body}</Text>
48
+ </View>
49
+ </View>
50
+ {code_request && !['closed','fulfilled'].includes(code_request.status) && promo ?
51
+ <TouchableOpacity style={{ margin:5, flexDirection:'row', backgroundColor:Colors.shades.white, borderRadius:8, shadowColor: "rgba(0, 0, 0, 0.06)", shadowOffset: { width: 0, height: 10 }, shadowRadius: 10, shadowOpacity: 1 }}
52
+ onPress={() => onAccept()}>
53
+ <View style={{ padding:10, justifyContent:'center' }}>
54
+ <Icons.GiftIcon size={30} color={Colors.incentive.gold} />
55
+ </View>
56
+ <View style={{flex:1, backgroundColor:Colors.incentive.gold_faded, padding:10 }}>
57
+ <Text style={{ paddingBottom:10, borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }} size={16} color={Colors.brand.midnight} weight='bold'>@{referrer?.username} has a gift for you</Text>
58
+ <Text style={{ paddingTop:5 }} size={12} color={Colors.brand.midnight} weight='semibold'>{CompetitionHelpers.getReferralDescription(promo)}</Text>
59
+ </View>
60
+ </TouchableOpacity>
61
+ :<></>}
62
+ <View nativeID="action_row" style={{ borderTopWidth:1, borderColor:Colors.shades.shade600, padding:10, flexDirection:'row' }}>
63
+ <Button
64
+ title={cancel_title ?? 'No Thanks'}
65
+ style={{ flex:1, margin:2 }}
66
+ title_color={Colors.brand.midnight}
67
+ borderRadius={8}
68
+ borderWidth={1}
69
+ borderColor={Colors.brand.midnight}
70
+ onPress={() => onCancel()}
71
+ />
72
+ {!hide_accept ?
73
+ <Button
74
+ style={{flex:1, margin:2}}
75
+ title={accept_title ?? 'Submit'}
76
+ title_color={Colors.shades.white}
77
+ borderRadius={8}
78
+ backgroundColor={Colors.utility.success}
79
+ onPress={() => onAccept()}
80
+ />
81
+ :<></>}
82
+ </View>
83
+ </View>
84
+ )
85
+ }
86
+
87
+ export default NavOutPrompt
@@ -0,0 +1,212 @@
1
+ import React, { useEffect, useState } from "react"
2
+ import { FlatList, Image, ScrollView, TouchableOpacity, View, ActivityIndicator } from "react-native"
3
+ import CompetitionCard from "./CompetitionCard"
4
+ import type { CompetitionProps, CompetitionResultTypeProps, CompetitionSeasonProps, CompetitionTypeProps, PublicPlayerProps } from "../../types"
5
+ import { CompetitionApi, CompetitionSeasonApi } from "../api"
6
+ import { Button, Text } from "../../Components"
7
+ import Colors from "../../constants/colors"
8
+ import moment from "moment-mini"
9
+
10
+ type SeasonInfoModalProps = {
11
+ competition_season:CompetitionSeasonProps,
12
+ competition_types:CompetitionTypeProps[],
13
+ competition_result_types:CompetitionResultTypeProps[],
14
+ width:number,
15
+ height:number,
16
+ onSelectCompetition: (competition:CompetitionProps) => void,
17
+ onClose:() => void
18
+ }
19
+
20
+ const SeasonInfoModal = ({ competition_season, competition_types, competition_result_types, width, height, onClose, onSelectCompetition }:SeasonInfoModalProps) => {
21
+ const [ loading, setLoading ] = useState(false);
22
+ const [ active_view, setActiveView ] = useState('info');
23
+ const [ leaderboard, setLeaderboard ] = useState<{
24
+ players: PublicPlayerProps[],
25
+ leaders: any[]
26
+ }>({
27
+ players: [],
28
+ leaders: []
29
+ });
30
+ const [ competitions, setCompetitions ] = useState<CompetitionProps[]>([])
31
+
32
+ const { leaders, players } = leaderboard;
33
+
34
+ useEffect(() => {
35
+ if(!competition_season){ return }
36
+ getSeasonCompetitions(competition_season.competition_season_id)
37
+ },[competition_season])
38
+
39
+ useEffect(() => {
40
+ switch(active_view){
41
+ case 'competitions':
42
+ getSeasonCompetitions(competition_season.competition_season_id)
43
+ return
44
+ case 'leaderboard':
45
+ getSeasonLeaderboard(competition_season.competition_season_id);
46
+ return
47
+ default: return
48
+ }
49
+ },[active_view])
50
+
51
+ const getSeasonCompetitions = async(competition_season_id:string) => {
52
+ setLoading(true);
53
+ try {
54
+ let season_competitions = await CompetitionApi.getCompetitionsBySeasonId(competition_season_id)
55
+ setCompetitions(season_competitions)
56
+ } catch (e) {
57
+ console.log(e)
58
+ }
59
+ setLoading(false)
60
+ }
61
+
62
+ const getSeasonLeaderboard = async(competition_season_id:string) => {
63
+ setLoading(true);
64
+ try {
65
+ let season_leaderboard = await CompetitionSeasonApi.getLeaderboardBySeasonId(competition_season_id)
66
+ const player_ids:string[] = season_leaderboard.map((sl:any) => sl.player_id)
67
+ const leader_players = await CompetitionApi.getPlayersByPlayerIds(player_ids);
68
+ setLeaderboard({
69
+ leaders: season_leaderboard,
70
+ players: leader_players
71
+ })
72
+ } catch (e) {
73
+ console.log(e)
74
+ }
75
+ setLoading(false)
76
+ }
77
+
78
+ const renderCompetitions = (data: { item:CompetitionProps, index:number }) => {
79
+ const competition_type = competition_types.find(ct => ct.competition_type_id == data.item.competition_type_id);
80
+ const competition_result_type = competition_result_types.find(ct => ct.competition_result_type_id == data.item.competition_result_type_id);
81
+ if(!competition_type || !competition_result_type){ return <></> }
82
+ return (
83
+ <View style={{ margin:5 }}>
84
+ <CompetitionCard
85
+ competition={data.item}
86
+ competition_result_type={competition_result_type}
87
+ competition_type={competition_type}
88
+ onSelect={() => onSelectCompetition(data.item)}
89
+ />
90
+ </View>
91
+ )
92
+ }
93
+
94
+ const renderLeaders = (data: { item:any, index:number }) => {
95
+ const player = players.find(p => p.player_id == data.item.player_id)
96
+ if(!player){ return <></> }
97
+ return (
98
+ <View
99
+ style={{ flexDirection:'row', margin:5, alignItems:'center', borderRadius:22, backgroundColor:Colors.shades.white, padding:8, paddingLeft:15, paddingRight:15}}>
100
+ <View nativeID="place" style={{ padding:5 }}>
101
+ <Text size={12} color={Colors.brand.midnight} weight="bold">{data.item.place}</Text>
102
+ </View>
103
+ <View nativeID="image" style={{ paddingLeft:10, paddingRight:10 }}>
104
+ <Image
105
+ source={{ uri: player.profile_pic }}
106
+ style={{ height:30, width:30, borderRadius:100 }}
107
+ resizeMode="cover"
108
+ />
109
+ </View>
110
+ <View nativeID="details" style={{ flex:1 }}>
111
+ <Text size={12} color={Colors.brand.midnight} weight='semibold'>{player.username}</Text>
112
+
113
+ <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>{data.item.wins} - {data.item.losses} - {data.item.draws} ({data.item.earnings.toFixed(2)} Earnings)</Text>
114
+ </View>
115
+ <View nativeID="winnings">
116
+ <Text size={12} color={Colors.brand.slate} weight='regular'>Hey</Text>
117
+ </View>
118
+ </View>
119
+ )
120
+ }
121
+
122
+ if(!competition_season){ return }
123
+ const cl = competition_season.market_type == 'FOR_MONEY' ? '$' : 'E'
124
+ return (
125
+ <View style={{ height, width, backgroundColor:Colors.shades.white }}>
126
+ <ScrollView style={{ flex:1 }}>
127
+ {loading ?
128
+ <ActivityIndicator style={{ padding:20, alignSelf:'center' }} color={Colors.brand.midnight} size='large' />
129
+ :<></>}
130
+ <View nativeID="season_header" style={{ justifyContent:'center', alignItems:'center' }}>
131
+ <Image
132
+ source={{ uri: competition_season.image?.url }}
133
+ style={{ width: width*0.75, height: (width*0.75) / 2 }}
134
+ resizeMode='cover'
135
+ />
136
+ <View style={{ margin:10 }}>
137
+ <Text size={14} color={Colors.brand.midnight} weight='bold' textAlign="center">{competition_season.season_name}</Text>
138
+ <Text style={{ marginTop:5 }} size={14} color={Colors.brand.midnight} weight='regular' textAlign="center">{competition_season.season_description}</Text>
139
+ </View>
140
+ </View>
141
+ <View style={{ margin:10, flexDirection:'row', padding:2, backgroundColor:Colors.shades.shade100, borderRadius:22 }}>
142
+ <TouchableOpacity
143
+ onPress={() => setActiveView('leaderboard')}
144
+ style={{ flex:1, padding:10, borderRadius:22, backgroundColor:active_view=='leaderboard'?Colors.shades.white:undefined }}>
145
+ <Text size={14} color={Colors.brand.midnight} weight={active_view=='leaderboard'?'bold':'regular'} textAlign="center">Leaderboard</Text>
146
+ </TouchableOpacity>
147
+ <TouchableOpacity
148
+ onPress={() => setActiveView('info')}
149
+ style={{ flex:1, padding:10, borderRadius:22, backgroundColor:active_view=='info'?Colors.shades.white:undefined }}>
150
+ <Text size={14} color={Colors.brand.midnight} weight={active_view=='info'?'bold':'regular'} textAlign="center">Info</Text>
151
+ </TouchableOpacity>
152
+ <TouchableOpacity
153
+ onPress={() => setActiveView('competitions')}
154
+ style={{ flex:1, padding:10, borderRadius:22, backgroundColor:active_view=='competitions'?Colors.shades.white:undefined }}>
155
+ <Text size={14} color={Colors.brand.midnight} weight={active_view=='competitions'?'bold':'regular'} textAlign="center">Competitions</Text>
156
+ </TouchableOpacity>
157
+ </View>
158
+ {active_view == 'info'?
159
+ <View nativeID="season_info" style={{ padding:20 }}>
160
+ <View style={{ flexDirection:'row' }}>
161
+ <Text style={{ flex:1 }} size={12} color={Colors.brand.midnight} weight='regular'>Season Type</Text>
162
+ <Text style={{ flex:1 }} size={12} color={Colors.brand.midnight} weight='bold' textAlign="right">{competition_season.single_buy_in?'One Time Entry':'Each Competition Entry'}</Text>
163
+ </View>
164
+ <View style={{ flexDirection:'row', marginTop:10 }}>
165
+ <Text style={{ flex:1 }} size={12} color={Colors.brand.midnight} weight='regular'>Late Entry</Text>
166
+ <Text style={{ flex:1 }} size={12} color={Colors.brand.midnight} weight='bold' textAlign="right">{competition_season.allow_late_buy_in?'Allowed':'Not Allowed'}</Text>
167
+ </View>
168
+ <View style={{ flexDirection:'row', marginTop:10 }}>
169
+ <Text style={{ flex:1 }} size={12} color={Colors.brand.midnight} weight='regular'>Season Allocation</Text>
170
+ <Text style={{ flex:1 }} size={12} color={Colors.brand.midnight} weight='bold' textAlign="right">{(competition_season.payout_allocation*100).toFixed(2)}%</Text>
171
+ </View>
172
+ <View style={{ flexDirection:'row', marginTop:10 }}>
173
+ <Text style={{ flex:1 }} size={12} color={Colors.brand.midnight} weight='regular'>Each Competition Allocation</Text>
174
+ <Text style={{ flex:1 }} size={12} color={Colors.brand.midnight} weight='bold' textAlign="right">{((1-competition_season.payout_allocation)*100).toFixed(2)}%</Text>
175
+ </View>
176
+ <View style={{ flexDirection:'row', marginTop:10 }}>
177
+ <Text style={{ flex:1 }} size={12} color={Colors.brand.midnight} weight='regular'>Current Season Pot</Text>
178
+ <Text style={{ flex:1 }} size={12} color={Colors.brand.midnight} weight='bold' textAlign="right">{cl}{competition_season.payout_amt.toFixed(2)}</Text>
179
+ </View>
180
+ </View>
181
+ :active_view == 'competitions' ?
182
+ <View nativeID="season_competitions" style={{ padding:10 }}>
183
+ <FlatList
184
+ data={competitions.sort((a,b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix())}
185
+ renderItem={renderCompetitions}
186
+ keyExtractor={(item) => item.competition_id.toString()}
187
+ />
188
+ </View>
189
+ :active_view == 'leaderboard' ?
190
+ <View nativeID="season_leaderboard" style={{ padding:10, backgroundColor:Colors.shades.shade100 }}>
191
+ <FlatList
192
+ data={leaders.sort((a,b) => b.wins - a.wins)}
193
+ renderItem={renderLeaders}
194
+ keyExtractor={(item) => item.player_id.toString()}
195
+ />
196
+ </View>
197
+ :<></>}
198
+ </ScrollView>
199
+ <View nativeID="action_row" style={{ padding:10 }}>
200
+ <Button
201
+ borderColor={Colors.brand.electric}
202
+ title="Close"
203
+ title_color={Colors.brand.electric}
204
+ borderWidth={1}
205
+ borderRadius={22}
206
+ onPress={() => onClose()}
207
+ />
208
+ </View>
209
+ </View>
210
+ )
211
+ }
212
+ export default SeasonInfoModal
@@ -0,0 +1,136 @@
1
+ import React from 'react';
2
+ import { ActivityIndicator, FlatList, Image, View } from "react-native"
3
+ import type { CompetitionMatchMarketProps, CompetitionMatchProps, CompetitionProps, CompetitionTypeProps, EventProps, MarketProps, PlayerPickProps } from "../../types"
4
+
5
+ import MarketsCard from './MarketsCard';
6
+ import { Text } from '../../Components';
7
+ import Colors from '../../constants/colors';
8
+ import moment from 'moment-mini';
9
+ import { CompetitionHelpers, FINALIZED_STATUSES } from '../api';
10
+
11
+ type TeamEventCardProps = {
12
+ competition:CompetitionProps,
13
+ competition_type:CompetitionTypeProps,
14
+ markets:MarketProps[],
15
+ event:EventProps,
16
+ onPick:(pp:PlayerPickProps, event_title:string, event_start:string) => void
17
+ mode: 'view'|'play'
18
+ loading?:boolean,
19
+ player_picks:PlayerPickProps[],
20
+ competition_match:CompetitionMatchProps,
21
+ competition_match_markets:CompetitionMatchMarketProps[]
22
+ }
23
+
24
+ const TeamEventCard = ({ loading, event, markets, competition_type, competition_match, competition_match_markets, player_picks, mode, onPick }:TeamEventCardProps) => {
25
+
26
+ const wager_picks = player_picks.filter(pp => pp.stake > 0)
27
+
28
+ const handleMarketSelect = async(mm:CompetitionMatchMarketProps, player_pick?:PlayerPickProps) => {
29
+ let market = markets.find(m => m.market_id == mm.market_id)
30
+ if(!event || !competition_type || !market){ return alert('Unable to process') }
31
+ if(moment(event.scheduled_datetime).isBefore(moment())){ return alert('This event has already started') }
32
+ if(FINALIZED_STATUSES.includes(event.status)){ return alert('This event is not eligible for picks') }
33
+ if(player_pick){
34
+ return onPick(player_pick, event.event_title, event.scheduled_datetime)
35
+ //await CompetitionStoreActions.removePlayerPick(player_pick.player_pick_id)
36
+ } else {
37
+ let pp = CompetitionHelpers.createPickFromMatchMarket(competition_match.competition_id, mm)
38
+ let pick_title = CompetitionHelpers.getPickTitleForTeamEvent(pp, market, event)
39
+ return onPick({ ...pp, pick_title }, event.event_title, event.scheduled_datetime)
40
+ }
41
+ }
42
+
43
+
44
+ const renderWagerPicks = (data: { item:PlayerPickProps, index:number }) => {
45
+ let locked = mode == 'view' && moment().isBefore(moment(event.scheduled_datetime)) ? true : false
46
+ return (
47
+ <View style={{ flexDirection:'row', marginTop:5 }}>
48
+ <Text style={{ flex:1 }} size={12} color={Colors.highlights.highlight200}>{locked?'WAGER LOCKED':data.item.pick_title}</Text>
49
+ <Text style={{ flex:1 }} size={12} color={Colors.highlights.highlight200} textAlign="right">{locked?'':`${data.item.stake.toFixed(2)} to win ${data.item.potential_winnings.toFixed(2)}`}</Text>
50
+ </View>
51
+ )
52
+ }
53
+
54
+ if(!event){ return <></> }
55
+ return (
56
+ <View style={{ padding:5 }}>
57
+ <View style={{ flexDirection:'row' }}>
58
+ <View nativeID="event_details" style={{ flex:1 }}>
59
+ <View />
60
+ <View nativeID="away_team" style={{ flex:1, flexDirection:'row', alignItems:'center', paddingRight:5 }}>
61
+ <View style={{ flex:1, marginRight:5 }}>
62
+ <View style={{ flexDirection:'row', alignItems:'flex-start' }}>
63
+ {event?.away?.rank ?
64
+ <Text style={{ marginRight:4 }} size={12} color={Colors.brand.cyan} weight='bold'>{event.away.rank}</Text>
65
+ :<></>}
66
+ {event?.away?.image?.url?
67
+ <Image
68
+ source={{ uri: event.away.image.url }}
69
+ style={{ height:18, width:18, marginRight:5 }}
70
+ resizeMode="cover"
71
+ />
72
+ :<></>}
73
+ <Text size={12} color={Colors.shades.black} weight='semibold'>{event.away?.market_name} {event.away?.name}</Text>
74
+ </View>
75
+ {event?.away_sub_title ?
76
+ <Text size={12} color={Colors.shades.black} weight='regular'>{event?.away_sub_title}</Text>
77
+ :<></>}
78
+ </View>
79
+ <Text size={12} color={Colors.shades.black} weight='bold'>{event.away_team_score}</Text>
80
+ </View>
81
+ <View nativeID="home_team" style={{ flex:1, flexDirection:'row', alignItems:'center', paddingRight:5 }}>
82
+ <View style={{ flex:1, marginRight:5 }}>
83
+ <View style={{ flexDirection:'row', alignItems:'flex-start' }}>
84
+ {event?.home?.rank ?
85
+ <Text style={{ marginRight:4 }} size={12} color={Colors.brand.cyan} weight='bold'>{event.home.rank}</Text>
86
+ :<></>}
87
+ {event?.home?.image?.url?
88
+ <Image
89
+ source={{ uri: event.home.image.url }}
90
+ style={{ height:18, width:18, marginRight:5 }}
91
+ resizeMode="cover"
92
+ />
93
+ :<></>}
94
+ <Text size={12} color={Colors.shades.black} weight='semibold'>{event.home?.market_name} {event.home?.name}</Text>
95
+ </View>
96
+ {event?.home_sub_title ?
97
+ <Text size={12} color={Colors.shades.black} weight='regular'>{event?.home_sub_title}</Text>
98
+ :<></>}
99
+ </View>
100
+ <Text size={12} color={Colors.shades.black} weight='bold'>{event.home_team_score}</Text>
101
+ </View>
102
+ </View>
103
+ <View nativeID="market_details" style={{ flex:1 }}>
104
+ <MarketsCard
105
+ player_picks={player_picks}
106
+ markets={markets}
107
+ mode={mode}
108
+ disabled={moment().isAfter(moment(event.scheduled_datetime)) || FINALIZED_STATUSES.includes(event.status) ? true : false}
109
+ locked={mode == 'view' && moment().isBefore(moment(event.scheduled_datetime)) ? true : false}
110
+ competition_match_markets={competition_match_markets}
111
+ onMarketSelect={(mm, player_pick) => handleMarketSelect(mm, player_pick)}
112
+ />
113
+ {loading ?
114
+ <View style={{ position:'absolute', top:0, right:0, left:0, bottom:0, justifyContent:'center', alignItems:'center' }}>
115
+ <ActivityIndicator
116
+ size='large'
117
+ color={Colors.brand.midnight}
118
+ />
119
+ </View>
120
+ :<></>}
121
+ </View>
122
+ </View>
123
+ {wager_picks.length > 0 ?
124
+ <View nativeID="wager_picks">
125
+ <FlatList
126
+ data={wager_picks}
127
+ renderItem={renderWagerPicks}
128
+ keyExtractor={(item) => item.player_pick_id.toString()}
129
+ />
130
+ </View>
131
+ :<></>}
132
+ </View>
133
+ )
134
+ }
135
+
136
+ export default TeamEventCard