be-components 0.7.3 → 0.7.5

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 (450) 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/Components/AuthStrategyIdentifier.js +113 -0
  4. package/lib/commonjs/Authenticator/Components/AuthStrategyIdentifier.js.map +1 -0
  5. package/lib/commonjs/Authenticator/Components/StrategyForm.js +238 -71
  6. package/lib/commonjs/Authenticator/Components/StrategyForm.js.map +1 -1
  7. package/lib/commonjs/Authenticator/index.js +7 -4
  8. package/lib/commonjs/Authenticator/index.js.map +1 -1
  9. package/lib/commonjs/Checkout/api/index.js.map +1 -1
  10. package/lib/commonjs/Checkout/index.js.map +1 -1
  11. package/lib/commonjs/Competition/api/index.js +655 -0
  12. package/lib/commonjs/Competition/api/index.js.map +1 -0
  13. package/lib/commonjs/Competition/components/AthleteMarketCard.js +168 -0
  14. package/lib/commonjs/Competition/components/AthleteMarketCard.js.map +1 -0
  15. package/lib/commonjs/Competition/components/CompetitionCard.js +180 -0
  16. package/lib/commonjs/Competition/components/CompetitionCard.js.map +1 -0
  17. package/lib/commonjs/Competition/components/CompetitionInfoCard.js +264 -0
  18. package/lib/commonjs/Competition/components/CompetitionInfoCard.js.map +1 -0
  19. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js +281 -0
  20. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js.map +1 -0
  21. package/lib/commonjs/Competition/components/CompetitionPlay.js +1269 -0
  22. package/lib/commonjs/Competition/components/CompetitionPlay.js.map +1 -0
  23. package/lib/commonjs/Competition/components/CompetitionSeasonCard.js +111 -0
  24. package/lib/commonjs/Competition/components/CompetitionSeasonCard.js.map +1 -0
  25. package/lib/commonjs/Competition/components/CompetitionSelector.js +122 -0
  26. package/lib/commonjs/Competition/components/CompetitionSelector.js.map +1 -0
  27. package/lib/commonjs/Competition/components/CompetitionTypeCard.js +380 -0
  28. package/lib/commonjs/Competition/components/CompetitionTypeCard.js.map +1 -0
  29. package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js +237 -0
  30. package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js.map +1 -0
  31. package/lib/commonjs/Competition/components/LeaderPicks.js +322 -0
  32. package/lib/commonjs/Competition/components/LeaderPicks.js.map +1 -0
  33. package/lib/commonjs/Competition/components/ManageSeasonForm.js +605 -0
  34. package/lib/commonjs/Competition/components/ManageSeasonForm.js.map +1 -0
  35. package/lib/commonjs/Competition/components/MarketsCard.js +148 -0
  36. package/lib/commonjs/Competition/components/MarketsCard.js.map +1 -0
  37. package/lib/commonjs/Competition/components/MatchMarketCard.js +199 -0
  38. package/lib/commonjs/Competition/components/MatchMarketCard.js.map +1 -0
  39. package/lib/commonjs/Competition/components/NavOutPrompt.js +159 -0
  40. package/lib/commonjs/Competition/components/NavOutPrompt.js.map +1 -0
  41. package/lib/commonjs/Competition/components/SeasonInfoModal.js +400 -0
  42. package/lib/commonjs/Competition/components/SeasonInfoModal.js.map +1 -0
  43. package/lib/commonjs/Competition/components/TeamEventCard.js +217 -0
  44. package/lib/commonjs/Competition/components/TeamEventCard.js.map +1 -0
  45. package/lib/commonjs/Competition/components/WagerPickForm.js +278 -0
  46. package/lib/commonjs/Competition/components/WagerPickForm.js.map +1 -0
  47. package/lib/commonjs/Competition/index.js +42 -0
  48. package/lib/commonjs/Competition/index.js.map +1 -0
  49. package/lib/commonjs/Components/Icons.js.map +1 -1
  50. package/lib/commonjs/Components/Jerseys.js +713 -0
  51. package/lib/commonjs/Components/Jerseys.js.map +1 -0
  52. package/lib/commonjs/Components/LinearDiagnal.js +1 -1
  53. package/lib/commonjs/Components/LinearDiagnal.js.map +1 -1
  54. package/lib/commonjs/Components/Switch.js +81 -0
  55. package/lib/commonjs/Components/Switch.js.map +1 -0
  56. package/lib/commonjs/Components/index.js +14 -0
  57. package/lib/commonjs/Components/index.js.map +1 -1
  58. package/lib/commonjs/Poll/api/index.js +277 -0
  59. package/lib/commonjs/Poll/api/index.js.map +1 -0
  60. package/lib/commonjs/Poll/components/CampaignPlay.js +553 -0
  61. package/lib/commonjs/Poll/components/CampaignPlay.js.map +1 -0
  62. package/lib/commonjs/Poll/components/CampaignProgressBar.js +118 -0
  63. package/lib/commonjs/Poll/components/CampaignProgressBar.js.map +1 -0
  64. package/lib/commonjs/Poll/components/CampaignResult.js +382 -0
  65. package/lib/commonjs/Poll/components/CampaignResult.js.map +1 -0
  66. package/lib/commonjs/Poll/components/CampaignSelector.js +124 -0
  67. package/lib/commonjs/Poll/components/CampaignSelector.js.map +1 -0
  68. package/lib/commonjs/Poll/components/PollCampaignCard.js +66 -0
  69. package/lib/commonjs/Poll/components/PollCampaignCard.js.map +1 -0
  70. package/lib/commonjs/Poll/components/PollCard.js +480 -0
  71. package/lib/commonjs/Poll/components/PollCard.js.map +1 -0
  72. package/lib/commonjs/Poll/components/PollOptionCard.js +158 -0
  73. package/lib/commonjs/Poll/components/PollOptionCard.js.map +1 -0
  74. package/lib/commonjs/Poll/components/PollSelectCard.js +189 -0
  75. package/lib/commonjs/Poll/components/PollSelectCard.js.map +1 -0
  76. package/lib/commonjs/Poll/components/ResponseTimer.js +48 -0
  77. package/lib/commonjs/Poll/components/ResponseTimer.js.map +1 -0
  78. package/lib/commonjs/Poll/components/WidgetHeader.js +83 -0
  79. package/lib/commonjs/Poll/components/WidgetHeader.js.map +1 -0
  80. package/lib/commonjs/Poll/flashmarket/index.js +354 -0
  81. package/lib/commonjs/Poll/flashmarket/index.js.map +1 -0
  82. package/lib/commonjs/Poll/index.js +46 -0
  83. package/lib/commonjs/Poll/index.js.map +1 -0
  84. package/lib/commonjs/ProfileManager/Components/BasicInfoManager.js.map +1 -1
  85. package/lib/commonjs/ProfileManager/Components/BasicStatus.js.map +1 -1
  86. package/lib/commonjs/ProfileManager/Components/CodeRedeem.js +3 -1
  87. package/lib/commonjs/ProfileManager/Components/CodeRedeem.js.map +1 -1
  88. package/lib/commonjs/ProfileManager/Components/DOBManager.js.map +1 -1
  89. package/lib/commonjs/ProfileManager/Components/EmailManager.js.map +1 -1
  90. package/lib/commonjs/ProfileManager/Components/PasswordManager.js.map +1 -1
  91. package/lib/commonjs/ProfileManager/Components/PhoneManager.js.map +1 -1
  92. package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  93. package/lib/commonjs/ProfileManager/Components/ProfileWelcome.js.map +1 -1
  94. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js +5 -0
  95. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js.map +1 -1
  96. package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
  97. package/lib/commonjs/ProfileManager/index.js +2 -0
  98. package/lib/commonjs/ProfileManager/index.js.map +1 -1
  99. package/lib/commonjs/Wallet/api/index.js +4 -1
  100. package/lib/commonjs/Wallet/api/index.js.map +1 -1
  101. package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -1
  102. package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -1
  103. package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -1
  104. package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -1
  105. package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -1
  106. package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
  107. package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
  108. package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
  109. package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -1
  110. package/lib/commonjs/Wallet/components/WalletSettings.js.map +1 -1
  111. package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
  112. package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -1
  113. package/lib/commonjs/Wallet/index.js.map +1 -1
  114. package/lib/commonjs/index.js +14 -0
  115. package/lib/commonjs/index.js.map +1 -1
  116. package/lib/module/ApiOverrides/index.js +18 -0
  117. package/lib/module/ApiOverrides/index.js.map +1 -1
  118. package/lib/module/Authenticator/Components/AuthStrategyIdentifier.js +106 -0
  119. package/lib/module/Authenticator/Components/AuthStrategyIdentifier.js.map +1 -0
  120. package/lib/module/Authenticator/Components/StrategyForm.js +239 -72
  121. package/lib/module/Authenticator/Components/StrategyForm.js.map +1 -1
  122. package/lib/module/Authenticator/index.js +7 -4
  123. package/lib/module/Authenticator/index.js.map +1 -1
  124. package/lib/module/Checkout/api/index.js.map +1 -1
  125. package/lib/module/Checkout/index.js.map +1 -1
  126. package/lib/module/Competition/api/index.js +649 -0
  127. package/lib/module/Competition/api/index.js.map +1 -0
  128. package/lib/module/Competition/components/AthleteMarketCard.js +161 -0
  129. package/lib/module/Competition/components/AthleteMarketCard.js.map +1 -0
  130. package/lib/module/Competition/components/CompetitionCard.js +173 -0
  131. package/lib/module/Competition/components/CompetitionCard.js.map +1 -0
  132. package/lib/module/Competition/components/CompetitionInfoCard.js +257 -0
  133. package/lib/module/Competition/components/CompetitionInfoCard.js.map +1 -0
  134. package/lib/module/Competition/components/CompetitionLeaderboard.js +272 -0
  135. package/lib/module/Competition/components/CompetitionLeaderboard.js.map +1 -0
  136. package/lib/module/Competition/components/CompetitionPlay.js +1260 -0
  137. package/lib/module/Competition/components/CompetitionPlay.js.map +1 -0
  138. package/lib/module/Competition/components/CompetitionSeasonCard.js +104 -0
  139. package/lib/module/Competition/components/CompetitionSeasonCard.js.map +1 -0
  140. package/lib/module/Competition/components/CompetitionSelector.js +113 -0
  141. package/lib/module/Competition/components/CompetitionSelector.js.map +1 -0
  142. package/lib/module/Competition/components/CompetitionTypeCard.js +371 -0
  143. package/lib/module/Competition/components/CompetitionTypeCard.js.map +1 -0
  144. package/lib/module/Competition/components/EnterCompetitionPrompt.js +228 -0
  145. package/lib/module/Competition/components/EnterCompetitionPrompt.js.map +1 -0
  146. package/lib/module/Competition/components/LeaderPicks.js +313 -0
  147. package/lib/module/Competition/components/LeaderPicks.js.map +1 -0
  148. package/lib/module/Competition/components/ManageSeasonForm.js +596 -0
  149. package/lib/module/Competition/components/ManageSeasonForm.js.map +1 -0
  150. package/lib/module/Competition/components/MarketsCard.js +139 -0
  151. package/lib/module/Competition/components/MarketsCard.js.map +1 -0
  152. package/lib/module/Competition/components/MatchMarketCard.js +192 -0
  153. package/lib/module/Competition/components/MatchMarketCard.js.map +1 -0
  154. package/lib/module/Competition/components/NavOutPrompt.js +152 -0
  155. package/lib/module/Competition/components/NavOutPrompt.js.map +1 -0
  156. package/lib/module/Competition/components/SeasonInfoModal.js +391 -0
  157. package/lib/module/Competition/components/SeasonInfoModal.js.map +1 -0
  158. package/lib/module/Competition/components/TeamEventCard.js +210 -0
  159. package/lib/module/Competition/components/TeamEventCard.js.map +1 -0
  160. package/lib/module/Competition/components/WagerPickForm.js +269 -0
  161. package/lib/module/Competition/components/WagerPickForm.js.map +1 -0
  162. package/lib/module/Competition/index.js +33 -0
  163. package/lib/module/Competition/index.js.map +1 -0
  164. package/lib/module/Components/Icons.js.map +1 -1
  165. package/lib/module/Components/Jerseys.js +705 -0
  166. package/lib/module/Components/Jerseys.js.map +1 -0
  167. package/lib/module/Components/LinearDiagnal.js +2 -3
  168. package/lib/module/Components/LinearDiagnal.js.map +1 -1
  169. package/lib/module/Components/Switch.js +74 -0
  170. package/lib/module/Components/Switch.js.map +1 -0
  171. package/lib/module/Components/index.js +3 -1
  172. package/lib/module/Components/index.js.map +1 -1
  173. package/lib/module/Poll/api/index.js +271 -0
  174. package/lib/module/Poll/api/index.js.map +1 -0
  175. package/lib/module/Poll/components/CampaignPlay.js +545 -0
  176. package/lib/module/Poll/components/CampaignPlay.js.map +1 -0
  177. package/lib/module/Poll/components/CampaignProgressBar.js +110 -0
  178. package/lib/module/Poll/components/CampaignProgressBar.js.map +1 -0
  179. package/lib/module/Poll/components/CampaignResult.js +374 -0
  180. package/lib/module/Poll/components/CampaignResult.js.map +1 -0
  181. package/lib/module/Poll/components/CampaignSelector.js +115 -0
  182. package/lib/module/Poll/components/CampaignSelector.js.map +1 -0
  183. package/lib/module/Poll/components/PollCampaignCard.js +59 -0
  184. package/lib/module/Poll/components/PollCampaignCard.js.map +1 -0
  185. package/lib/module/Poll/components/PollCard.js +472 -0
  186. package/lib/module/Poll/components/PollCard.js.map +1 -0
  187. package/lib/module/Poll/components/PollOptionCard.js +149 -0
  188. package/lib/module/Poll/components/PollOptionCard.js.map +1 -0
  189. package/lib/module/Poll/components/PollSelectCard.js +182 -0
  190. package/lib/module/Poll/components/PollSelectCard.js.map +1 -0
  191. package/lib/module/Poll/components/ResponseTimer.js +39 -0
  192. package/lib/module/Poll/components/ResponseTimer.js.map +1 -0
  193. package/lib/module/Poll/components/WidgetHeader.js +76 -0
  194. package/lib/module/Poll/components/WidgetHeader.js.map +1 -0
  195. package/lib/module/Poll/flashmarket/index.js +345 -0
  196. package/lib/module/Poll/flashmarket/index.js.map +1 -0
  197. package/lib/module/Poll/index.js +37 -0
  198. package/lib/module/Poll/index.js.map +1 -0
  199. package/lib/module/ProfileManager/Components/BasicInfoManager.js.map +1 -1
  200. package/lib/module/ProfileManager/Components/BasicStatus.js.map +1 -1
  201. package/lib/module/ProfileManager/Components/CodeRedeem.js +3 -1
  202. package/lib/module/ProfileManager/Components/CodeRedeem.js.map +1 -1
  203. package/lib/module/ProfileManager/Components/DOBManager.js.map +1 -1
  204. package/lib/module/ProfileManager/Components/EmailManager.js.map +1 -1
  205. package/lib/module/ProfileManager/Components/PasswordManager.js.map +1 -1
  206. package/lib/module/ProfileManager/Components/PhoneManager.js.map +1 -1
  207. package/lib/module/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  208. package/lib/module/ProfileManager/Components/ProfileWelcome.js.map +1 -1
  209. package/lib/module/ProfileManager/Components/ProfileWizard.js +5 -0
  210. package/lib/module/ProfileManager/Components/ProfileWizard.js.map +1 -1
  211. package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
  212. package/lib/module/ProfileManager/index.js +2 -0
  213. package/lib/module/ProfileManager/index.js.map +1 -1
  214. package/lib/module/Wallet/api/index.js +4 -1
  215. package/lib/module/Wallet/api/index.js.map +1 -1
  216. package/lib/module/Wallet/components/ACHAddCard.js.map +1 -1
  217. package/lib/module/Wallet/components/AddressManager.js.map +1 -1
  218. package/lib/module/Wallet/components/DepositCard.js.map +1 -1
  219. package/lib/module/Wallet/components/FundAccountCard.js.map +1 -1
  220. package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -1
  221. package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
  222. package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
  223. package/lib/module/Wallet/components/MyBalance.js.map +1 -1
  224. package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -1
  225. package/lib/module/Wallet/components/WalletSettings.js.map +1 -1
  226. package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
  227. package/lib/module/Wallet/components/WithdrawCard.js.map +1 -1
  228. package/lib/module/Wallet/index.js.map +1 -1
  229. package/lib/module/index.js +3 -1
  230. package/lib/module/index.js.map +1 -1
  231. package/lib/typescript/src/ApiOverrides/index.d.ts +1 -0
  232. package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
  233. package/lib/typescript/src/Authenticator/Components/AuthStrategyIdentifier.d.ts +11 -0
  234. package/lib/typescript/src/Authenticator/Components/AuthStrategyIdentifier.d.ts.map +1 -0
  235. package/lib/typescript/src/Authenticator/Components/StrategyForm.d.ts +4 -1
  236. package/lib/typescript/src/Authenticator/Components/StrategyForm.d.ts.map +1 -1
  237. package/lib/typescript/src/Authenticator/api/index.d.ts +2 -2
  238. package/lib/typescript/src/Authenticator/api/index.d.ts.map +1 -1
  239. package/lib/typescript/src/Authenticator/index.d.ts +2 -1
  240. package/lib/typescript/src/Authenticator/index.d.ts.map +1 -1
  241. package/lib/typescript/src/Checkout/api/index.d.ts +1 -2
  242. package/lib/typescript/src/Checkout/api/index.d.ts.map +1 -1
  243. package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
  244. package/lib/typescript/src/Competition/api/index.d.ts +128 -0
  245. package/lib/typescript/src/Competition/api/index.d.ts.map +1 -0
  246. package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts +19 -0
  247. package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts.map +1 -0
  248. package/lib/typescript/src/Competition/components/CompetitionCard.d.ts +12 -0
  249. package/lib/typescript/src/Competition/components/CompetitionCard.d.ts.map +1 -0
  250. package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts +16 -0
  251. package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts.map +1 -0
  252. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts +14 -0
  253. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts.map +1 -0
  254. package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts +20 -0
  255. package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts.map +1 -0
  256. package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts +10 -0
  257. package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts.map +1 -0
  258. package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts +11 -0
  259. package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts.map +1 -0
  260. package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts +14 -0
  261. package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts.map +1 -0
  262. package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts +16 -0
  263. package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts.map +1 -0
  264. package/lib/typescript/src/Competition/components/LeaderPicks.d.ts +22 -0
  265. package/lib/typescript/src/Competition/components/LeaderPicks.d.ts.map +1 -0
  266. package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts +10 -0
  267. package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts.map +1 -0
  268. package/lib/typescript/src/Competition/components/MarketsCard.d.ts +15 -0
  269. package/lib/typescript/src/Competition/components/MarketsCard.d.ts.map +1 -0
  270. package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts +21 -0
  271. package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts.map +1 -0
  272. package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts +23 -0
  273. package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts.map +1 -0
  274. package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts +14 -0
  275. package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts.map +1 -0
  276. package/lib/typescript/src/Competition/components/TeamEventCard.d.ts +17 -0
  277. package/lib/typescript/src/Competition/components/TeamEventCard.d.ts.map +1 -0
  278. package/lib/typescript/src/Competition/components/WagerPickForm.d.ts +15 -0
  279. package/lib/typescript/src/Competition/components/WagerPickForm.d.ts.map +1 -0
  280. package/lib/typescript/src/Competition/index.d.ts +11 -0
  281. package/lib/typescript/src/Competition/index.d.ts.map +1 -0
  282. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  283. package/lib/typescript/src/Components/Jerseys.d.ts +16 -0
  284. package/lib/typescript/src/Components/Jerseys.d.ts.map +1 -0
  285. package/lib/typescript/src/Components/LinearDiagnal.d.ts.map +1 -1
  286. package/lib/typescript/src/Components/Switch.d.ts +9 -0
  287. package/lib/typescript/src/Components/Switch.d.ts.map +1 -0
  288. package/lib/typescript/src/Components/index.d.ts +3 -1
  289. package/lib/typescript/src/Components/index.d.ts.map +1 -1
  290. package/lib/typescript/src/Poll/api/index.d.ts +65 -0
  291. package/lib/typescript/src/Poll/api/index.d.ts.map +1 -0
  292. package/lib/typescript/src/Poll/components/CampaignPlay.d.ts +14 -0
  293. package/lib/typescript/src/Poll/components/CampaignPlay.d.ts.map +1 -0
  294. package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts +12 -0
  295. package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts.map +1 -0
  296. package/lib/typescript/src/Poll/components/CampaignResult.d.ts +13 -0
  297. package/lib/typescript/src/Poll/components/CampaignResult.d.ts.map +1 -0
  298. package/lib/typescript/src/Poll/components/CampaignSelector.d.ts +9 -0
  299. package/lib/typescript/src/Poll/components/CampaignSelector.d.ts.map +1 -0
  300. package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts +10 -0
  301. package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts.map +1 -0
  302. package/lib/typescript/src/Poll/components/PollCard.d.ts +16 -0
  303. package/lib/typescript/src/Poll/components/PollCard.d.ts.map +1 -0
  304. package/lib/typescript/src/Poll/components/PollOptionCard.d.ts +14 -0
  305. package/lib/typescript/src/Poll/components/PollOptionCard.d.ts.map +1 -0
  306. package/lib/typescript/src/Poll/components/PollSelectCard.d.ts +16 -0
  307. package/lib/typescript/src/Poll/components/PollSelectCard.d.ts.map +1 -0
  308. package/lib/typescript/src/Poll/components/ResponseTimer.d.ts +9 -0
  309. package/lib/typescript/src/Poll/components/ResponseTimer.d.ts.map +1 -0
  310. package/lib/typescript/src/Poll/components/WidgetHeader.d.ts +13 -0
  311. package/lib/typescript/src/Poll/components/WidgetHeader.d.ts.map +1 -0
  312. package/lib/typescript/src/Poll/flashmarket/index.d.ts +10 -0
  313. package/lib/typescript/src/Poll/flashmarket/index.d.ts.map +1 -0
  314. package/lib/typescript/src/Poll/index.d.ts +13 -0
  315. package/lib/typescript/src/Poll/index.d.ts.map +1 -0
  316. package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts +1 -1
  317. package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
  318. package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts +1 -2
  319. package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
  320. package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts +9 -2
  321. package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
  322. package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts +1 -1
  323. package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts.map +1 -1
  324. package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts +1 -1
  325. package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts.map +1 -1
  326. package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts +1 -1
  327. package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
  328. package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts +1 -1
  329. package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
  330. package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts +1 -1
  331. package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
  332. package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts +1 -2
  333. package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
  334. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts +10 -3
  335. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
  336. package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts +2 -2
  337. package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
  338. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts +1 -2
  339. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  340. package/lib/typescript/src/ProfileManager/api/index.d.ts +2 -2
  341. package/lib/typescript/src/ProfileManager/api/index.d.ts.map +1 -1
  342. package/lib/typescript/src/ProfileManager/index.d.ts +9 -2
  343. package/lib/typescript/src/ProfileManager/index.d.ts.map +1 -1
  344. package/lib/typescript/src/Wallet/api/index.d.ts +2 -3
  345. package/lib/typescript/src/Wallet/api/index.d.ts.map +1 -1
  346. package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts +1 -2
  347. package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -1
  348. package/lib/typescript/src/Wallet/components/AddressManager.d.ts +1 -2
  349. package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -1
  350. package/lib/typescript/src/Wallet/components/DepositCard.d.ts +1 -2
  351. package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -1
  352. package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts +1 -2
  353. package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -1
  354. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts +1 -2
  355. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -1
  356. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts +1 -2
  357. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
  358. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts +1 -2
  359. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -1
  360. package/lib/typescript/src/Wallet/components/MyBalance.d.ts +1 -2
  361. package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
  362. package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts +1 -2
  363. package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -1
  364. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts +1 -2
  365. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts.map +1 -1
  366. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts +1 -2
  367. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
  368. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts +1 -2
  369. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -1
  370. package/lib/typescript/src/Wallet/index.d.ts +1 -2
  371. package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
  372. package/lib/typescript/src/index.d.ts +3 -1
  373. package/lib/typescript/src/index.d.ts.map +1 -1
  374. package/package.json +1 -1
  375. package/src/ApiOverrides/index.ts +19 -0
  376. package/src/Authenticator/Components/AuthStrategyIdentifier.tsx +72 -0
  377. package/src/Authenticator/Components/StrategyForm.tsx +208 -53
  378. package/src/Authenticator/api/index.ts +2 -2
  379. package/src/Authenticator/api/types.d.ts +3 -26
  380. package/src/Authenticator/index.tsx +10 -4
  381. package/src/Checkout/api/index.tsx +1 -2
  382. package/src/Checkout/index.tsx +1 -2
  383. package/src/Competition/api/index.ts +568 -0
  384. package/src/Competition/components/AthleteMarketCard.tsx +116 -0
  385. package/src/Competition/components/CompetitionCard.tsx +82 -0
  386. package/src/Competition/components/CompetitionInfoCard.tsx +149 -0
  387. package/src/Competition/components/CompetitionLeaderboard.tsx +183 -0
  388. package/src/Competition/components/CompetitionPlay.tsx +936 -0
  389. package/src/Competition/components/CompetitionSeasonCard.tsx +48 -0
  390. package/src/Competition/components/CompetitionSelector.tsx +91 -0
  391. package/src/Competition/components/CompetitionTypeCard.tsx +211 -0
  392. package/src/Competition/components/EnterCompetitionPrompt.tsx +127 -0
  393. package/src/Competition/components/LeaderPicks.tsx +214 -0
  394. package/src/Competition/components/ManageSeasonForm.tsx +271 -0
  395. package/src/Competition/components/MarketsCard.tsx +108 -0
  396. package/src/Competition/components/MatchMarketCard.tsx +126 -0
  397. package/src/Competition/components/NavOutPrompt.tsx +87 -0
  398. package/src/Competition/components/SeasonInfoModal.tsx +212 -0
  399. package/src/Competition/components/TeamEventCard.tsx +136 -0
  400. package/src/Competition/components/WagerPickForm.tsx +114 -0
  401. package/src/Competition/index.tsx +36 -0
  402. package/src/Components/Icons.tsx +0 -2
  403. package/src/Components/Jerseys.tsx +268 -0
  404. package/src/Components/LinearDiagnal.tsx +2 -3
  405. package/src/Components/Switch.tsx +55 -0
  406. package/src/Components/index.tsx +5 -1
  407. package/src/Poll/api/index.ts +212 -0
  408. package/src/Poll/components/CampaignPlay.tsx +407 -0
  409. package/src/Poll/components/CampaignProgressBar.tsx +70 -0
  410. package/src/Poll/components/CampaignResult.tsx +180 -0
  411. package/src/Poll/components/CampaignSelector.tsx +96 -0
  412. package/src/Poll/components/PollCampaignCard.tsx +35 -0
  413. package/src/Poll/components/PollCard.tsx +335 -0
  414. package/src/Poll/components/PollOptionCard.tsx +110 -0
  415. package/src/Poll/components/PollSelectCard.tsx +106 -0
  416. package/src/Poll/components/ResponseTimer.tsx +37 -0
  417. package/src/Poll/components/WidgetHeader.tsx +46 -0
  418. package/src/Poll/flashmarket/index.tsx +231 -0
  419. package/src/Poll/index.tsx +45 -0
  420. package/src/ProfileManager/Components/BasicInfoManager.tsx +1 -1
  421. package/src/ProfileManager/Components/BasicStatus.tsx +1 -2
  422. package/src/ProfileManager/Components/CodeRedeem.tsx +10 -3
  423. package/src/ProfileManager/Components/DOBManager.tsx +1 -1
  424. package/src/ProfileManager/Components/EmailManager.tsx +1 -1
  425. package/src/ProfileManager/Components/PasswordManager.tsx +2 -1
  426. package/src/ProfileManager/Components/PhoneManager.tsx +1 -1
  427. package/src/ProfileManager/Components/ProfilePicManager.tsx +1 -1
  428. package/src/ProfileManager/Components/ProfileWelcome.tsx +1 -2
  429. package/src/ProfileManager/Components/ProfileWizard.tsx +14 -3
  430. package/src/ProfileManager/Components/SettingsManager.tsx +2 -2
  431. package/src/ProfileManager/Components/VouchCard.tsx +1 -2
  432. package/src/ProfileManager/api/index.ts +2 -2
  433. package/src/ProfileManager/api/types.d.ts +0 -35
  434. package/src/ProfileManager/index.tsx +11 -3
  435. package/src/Wallet/api/index.ts +6 -4
  436. package/src/Wallet/components/ACHAddCard.tsx +1 -2
  437. package/src/Wallet/components/AddressManager.tsx +1 -2
  438. package/src/Wallet/components/DepositCard.tsx +1 -2
  439. package/src/Wallet/components/FundAccountCard.tsx +1 -2
  440. package/src/Wallet/components/ManageAccountCard.tsx +1 -2
  441. package/src/Wallet/components/ManualACHAdd.tsx +1 -2
  442. package/src/Wallet/components/ManualCardAdd.tsx +1 -2
  443. package/src/Wallet/components/MyBalance.tsx +1 -2
  444. package/src/Wallet/components/WalletActionSelector.tsx +1 -2
  445. package/src/Wallet/components/WalletSettings.tsx +1 -2
  446. package/src/Wallet/components/WalletSetup.tsx +1 -2
  447. package/src/Wallet/components/WithdrawCard.tsx +1 -2
  448. package/src/Wallet/index.tsx +1 -2
  449. package/src/index.tsx +5 -2
  450. package/src/types.d.ts +486 -1
@@ -0,0 +1,214 @@
1
+ import React, { useEffect, useState } from "react"
2
+ import { FlatList, Image, ScrollView, TouchableOpacity, View } from "react-native"
3
+ import TeamEventCard from "./TeamEventCard"
4
+
5
+ import AthleteMarketCard from "./AthleteMarketCard"
6
+ import MatchMarketCard from "./MatchMarketCard"
7
+ import type { AthleteProps, CompetitionMatchMarketProps, CompetitionMatchProps, CompetitionProps, CompetitionRecordProps, CompetitionResultProps, CompetitionTypeProps, EventProps, MarketProps, MatchProps, PlayerPickProps, PublicPlayerProps, TeamProps, TournamentProps } from "../../types"
8
+ import { CompetitionResultApi, PlayerPicksApi } from "../api"
9
+ import Colors from "../../constants/colors"
10
+ import { Button, Text } from "../../Components"
11
+
12
+
13
+ type LeaderPicksProps = {
14
+ competition:CompetitionProps,
15
+ markets:MarketProps[],
16
+ events:EventProps[],
17
+ matches:MatchProps[],
18
+ tournaments:TournamentProps[],
19
+ athletes:AthleteProps[],
20
+ teams:TeamProps[],
21
+ competition_type:CompetitionTypeProps,
22
+ competition_matches:CompetitionMatchProps[],
23
+ competition_match_markets:CompetitionMatchMarketProps[],
24
+ height: number,
25
+ leader:PublicPlayerProps,
26
+ onNext?:() => void
27
+ onPrevious?:() => void,
28
+ onClose:() => void
29
+ }
30
+ const LeaderPicks = ({ markets, events, matches, athletes, competition, competition_type, competition_matches, competition_match_markets, leader, height, onClose, onNext, onPrevious }:LeaderPicksProps) => {
31
+ const [ data, setData ] = useState<{
32
+ loading:boolean,
33
+ player_picks: PlayerPickProps[],
34
+ result?: CompetitionResultProps,
35
+ record?:CompetitionRecordProps
36
+ }>({
37
+ loading:false,
38
+ player_picks: []
39
+ });
40
+
41
+ const { player_picks, result, record } = data;
42
+
43
+ let filtered_matches = competition_matches.filter(cm => player_picks.map(pp => pp.competition_match_id.toString()).includes(cm.competition_match_id))
44
+
45
+ useEffect(() => {
46
+ if(!competition || !leader){ return }
47
+ getPlayerPicksFromServer(competition.competition_id, leader.player_id, 0)
48
+ },[competition, leader.player_id])
49
+
50
+ const getPlayerPicksFromServer = async(competition_id:string, player_id:string, offset:number) => {
51
+ setData({ ...data, loading:true });
52
+ const pps = await PlayerPicksApi.getPlayerPicksByCompetition(competition_id, player_id, offset)
53
+ const { competition_records, competition_results } = await CompetitionResultApi.getResultsByCompetition(competition_id, 0, player_id)
54
+ setData({
55
+ ...data,
56
+ loading:false,
57
+ player_picks: pps,
58
+ result: competition_results.find(cr => cr.player_id == player_id),
59
+ record: competition_records.find(cr => cr.player_id == player_id)
60
+ });
61
+ }
62
+
63
+ const renderEvents = (data:{ item:CompetitionMatchProps, index:number }) => {
64
+ const match_markets = competition_match_markets.filter(cmm => cmm.competition_match_id == data.item.competition_match_id);
65
+ const event_picks = player_picks.filter(pp => pp.competition_match_id == data.item.competition_match_id)
66
+
67
+ switch(data.item.event_type){
68
+ case 'team':
69
+ const event = events.find(e => e.event_id == data.item.event_id)
70
+ if(!event){ return <></> }
71
+ if(!data.item.side_type_override){
72
+ return (
73
+ <View style={{ margin:5, padding:10, borderWidth:1, borderColor:Colors.shades.shade600, borderRadius:8, backgroundColor:Colors.shades.white }}>
74
+ <TeamEventCard
75
+ competition={competition}
76
+ competition_type={competition_type}
77
+ event={event}
78
+ markets={markets}
79
+ player_picks={event_picks}
80
+ mode='view'
81
+ onPick={() => console.log('')}
82
+ competition_match={data.item}
83
+ competition_match_markets={match_markets}
84
+ />
85
+ </View>
86
+ )
87
+ }
88
+ switch(data.item.side_type_override){
89
+ case 'athlete':
90
+ const athlete = athletes.find(a => a.athlete_id == data.item.side_id_override);
91
+ if(!athlete){ return <></> }
92
+ return (
93
+ <View style={{ margin:5, padding:10, borderWidth:1, borderColor:Colors.shades.shade600, borderRadius:8, backgroundColor:Colors.shades.white }}>
94
+ <AthleteMarketCard
95
+ event={event}
96
+ athlete={athlete}
97
+ competition={competition}
98
+ competition_type={competition_type}
99
+ markets={markets}
100
+ competition_match={data.item}
101
+ mode='view'
102
+ orientation='horizontal'
103
+ onPick={() => console.log('')}
104
+ competition_match_markets={match_markets}
105
+ player_picks={event_picks}
106
+ />
107
+ </View>
108
+ )
109
+ default: return <></>
110
+ }
111
+
112
+ case 'match':
113
+ const match = matches.find(m => m.match_id == data.item.event_id)
114
+ if(!match){ return <></> }
115
+ let home_athlete = athletes.find(a => a.athlete_id == match.participants[0])
116
+ let away_athlete = athletes.find(a => a.athlete_id == match.participants[1])
117
+ return (
118
+ <View style={{ margin:5, padding:10, borderWidth:1, borderColor:Colors.shades.shade600, borderRadius:8, backgroundColor:Colors.shades.white }}>
119
+ <MatchMarketCard
120
+ match={match}
121
+ competition={competition}
122
+ competition_type={competition_type}
123
+ home_athlete={home_athlete}
124
+ away_athlete={away_athlete}
125
+ markets={markets}
126
+ competition_match={data.item}
127
+ mode='view'
128
+ onPick={() => console.log('')}
129
+ competition_match_markets={match_markets}
130
+ player_picks={event_picks}
131
+ />
132
+ </View>
133
+ )
134
+
135
+ default: return <></>
136
+ }
137
+
138
+
139
+
140
+ }
141
+
142
+ const cl = competition?.market_type == 'FOR_MONEY' ? '$' : 'E'
143
+
144
+ return (
145
+ <View style={{ flex:1, height, backgroundColor:Colors.shades.white }}>
146
+ {record && result ?
147
+ <View nativeID="leader_header">
148
+ <View style={{ backgroundColor:Colors.brand.midnight, padding:10, marginBottom:10, paddingTop:20 }}>
149
+ <Text size={18} color={Colors.shades.white} weight='bold' textAlign="center">Leaderboard Picks</Text>
150
+ <View style={{ flexDirection:'row', marginTop:15, marginBottom:10, alignItems:'center', borderRadius:22, backgroundColor:Colors.shades.white, padding:8, paddingLeft:15, paddingRight:15}}>
151
+ <View nativeID="place" style={{ padding:5 }}>
152
+ <Text size={12} color={Colors.brand.midnight} weight="bold">{result.place}</Text>
153
+ </View>
154
+ <View nativeID="image" style={{ paddingLeft:10, paddingRight:10 }}>
155
+ <Image
156
+ source={{ uri: leader.profile_pic }}
157
+ style={{ height:30, width:30, borderRadius:100 }}
158
+ resizeMode="cover"
159
+ />
160
+ </View>
161
+ <View nativeID="details" style={{ flex:1 }}>
162
+ <Text size={12} color={Colors.brand.midnight} weight='semibold'>{leader.username}</Text>
163
+ {competition_type?.type == 'wager' ?
164
+ <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>{record.earnings.toFixed(2)} Earned ({record.remaining_stakes.toFixed(2)} at risk)</Text>
165
+ :
166
+ <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>{record.wins} - {record.losses} - {record.draws} ({record.remaining_picks} Remaining)</Text>
167
+ }
168
+ </View>
169
+ <View nativeID="winnings">
170
+ <Text size={12} color={Colors.brand.slate} weight='regular'>{cl}{result.winnings.toFixed(2)}</Text>
171
+ </View>
172
+ </View>
173
+ {onNext && onPrevious ?
174
+ <View nativeID="nav" style={{ flexDirection:'row', alignItems:'center', margin:10, marginBottom:0 }}>
175
+ <TouchableOpacity style={{ flex:1 }}>
176
+ <Text size={14} color={Colors.shades.white} weight='regular'>Previous</Text>
177
+ </TouchableOpacity>
178
+ <TouchableOpacity style={{ flex:1 }}>
179
+ <Text size={14} color={Colors.shades.white} weight='regular' textAlign="right">Next</Text>
180
+ </TouchableOpacity>
181
+ </View>
182
+ :<></>}
183
+ </View>
184
+ </View>
185
+ :<></>}
186
+
187
+ <ScrollView style={{flex:1, backgroundColor:Colors.shades.white}} nativeID="leader_picks">
188
+ <Text style={{ margin:10 }} color={Colors.brand.midnight} textAlign="center" weight='bold' size={18}>{leader.username} Picks</Text>
189
+ <Text style={{ margin:10 }} color={Colors.brand.slate} textAlign="center" weight='bold' size={14}>Locked picks will appear after event is live</Text>
190
+ <View nativeID="picks" style={{ marginTop:10 }}>
191
+ <FlatList
192
+ scrollEnabled
193
+ data={filtered_matches}
194
+ renderItem={renderEvents}
195
+ keyExtractor={(item) => item.competition_match_id.toString()}
196
+ />
197
+ </View>
198
+ </ScrollView>
199
+ <View nativeID="action_row" style={{ padding:10 }}>
200
+ <Button
201
+ title="Close"
202
+ title_color={Colors.brand.electric}
203
+ borderWidth={1}
204
+ borderColor={Colors.brand.electric}
205
+ borderRadius={22}
206
+ title_size={14}
207
+ onPress={() => onClose()}
208
+ />
209
+ </View>
210
+ </View>
211
+ )
212
+ }
213
+
214
+ export default LeaderPicks
@@ -0,0 +1,271 @@
1
+ import { FlatList, Image, ScrollView, TextInput, TouchableOpacity, View } from "react-native"
2
+ import React, { useEffect, useState } from "react"
3
+ import type { CompetitionSeasonProps } from "../../types"
4
+ import { CompetitionHelpers, CompetitionSeasonApi } from "../api"
5
+ import { Button, Switch, Text } from "../../Components"
6
+ import Colors from "../../constants/colors"
7
+ import ImageUploader from "../../Components/ImageUploader"
8
+
9
+
10
+ type ManageSeasonFormProps = {
11
+ competition_season?:CompetitionSeasonProps
12
+ width: number,
13
+ onComplete: (status:'done'|'cancel') => void
14
+ }
15
+
16
+ const ManageSeasonForm = ({ competition_season, width, onComplete }:ManageSeasonFormProps) => {
17
+ const [ loading, setLoading ] = useState(false);
18
+ const [ show_templates, setShowTemplates ] = useState(true);
19
+ const [ season_templates, setSeasonTemplates ] = useState<CompetitionSeasonProps[]>([]);
20
+ const [ draft_season, setDraftSeason ] = useState(CompetitionHelpers.getEmptyCompetitionSeason())
21
+ const [ payout_allocation_label, setPayoutAllocationLabel ] = useState('0')
22
+
23
+ useEffect(() => {
24
+ loadTemplates()
25
+ if(!competition_season){ return }
26
+ setDraftSeason(competition_season);
27
+ setShowTemplates(false);
28
+ },[competition_season])
29
+
30
+ const loadTemplates = async() => {
31
+ let templates = await CompetitionSeasonApi.getCompetitionSeasonTemplates()
32
+ setSeasonTemplates(templates)
33
+ }
34
+
35
+ const handleSelectTemplate = (s:CompetitionSeasonProps) => {
36
+ setDraftSeason({ ...s, competition_season_id: '', season_name:'', season_description:'', following_season_id: s.competition_season_id })
37
+ setPayoutAllocationLabel((s.payout_allocation*100).toFixed())
38
+ }
39
+
40
+ const handleChangeAllocation = (text:string) => {
41
+ let non_str_num = parseFloat(text)
42
+ if(isNaN(non_str_num)){ return }
43
+ if(text == ''){
44
+ setPayoutAllocationLabel('')
45
+ return setDraftSeason({ ...draft_season, payout_allocation: 0 })
46
+ }
47
+ let allocation = parseFloat(text)
48
+ setPayoutAllocationLabel(text)
49
+ setDraftSeason({ ...draft_season, payout_allocation: allocation / 100 })
50
+ }
51
+
52
+ const handleSubmit = async() => {
53
+ if(!CompetitionHelpers.isSeasonValid(draft_season)){ return alert('Please complete all required firlst') }
54
+ setLoading(true);
55
+ await CompetitionSeasonApi.createCompetitionSeason(draft_season)
56
+ setLoading(false);
57
+ onComplete('done')
58
+ }
59
+
60
+ const renderTemplates = (data: { item:CompetitionSeasonProps, index:number }) => {
61
+ const selected = draft_season.following_season_id == data.item.competition_season_id ? true : false
62
+ return (
63
+ <TouchableOpacity
64
+ onPress={() => handleSelectTemplate(data.item)}
65
+ style={{ flexDirection:'row', borderRadius:8, backgroundColor:selected?Colors.brand.electric:'transparent', alignItems:'center', margin:3, padding:5, borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }}>
66
+ <View>
67
+ <Image
68
+ source={{uri: data.item.image?.url}}
69
+ style={{ height:50, width:75 }}
70
+ resizeMode="cover"
71
+ />
72
+ </View>
73
+ <View style={{ flex:1, marginLeft:5 }}>
74
+ <Text size={12} color={selected?Colors.shades.white:Colors.brand.midnight} weight='bold'>{data.item.season_name}</Text>
75
+ <Text size={12} color={selected?Colors.shades.white:Colors.brand.midnight} weight='regular'>{data.item.season_description}</Text>
76
+ </View>
77
+
78
+ </TouchableOpacity>
79
+ )
80
+ }
81
+
82
+ let valid = CompetitionHelpers.isSeasonValid(draft_season)
83
+
84
+ return (
85
+ <View style={{ flex:1, backgroundColor:Colors.shades.white, padding:10 }}>
86
+ <View nativeID="form_header" style={{ padding:10 }}>
87
+ <Text size={14} color={Colors.brand.midnight} weight='bold' textAlign='center'>{competition_season ? draft_season.season_name : 'Create New Season'}</Text>
88
+ </View>
89
+ <ScrollView style={{ flex:1 }}>
90
+ <View nativeID="season_template">
91
+ <View nativeID="competition_details">
92
+ <View nativeID="details_header" style={{ padding:10, paddingBottom:0 }}>
93
+ <Text size={16} color={Colors.brand.midnight} weight='bold'>Season Template</Text>
94
+ <Text style={{ marginTop:3 }} size={14} color={Colors.brand.midnight} weight='regular'>Select a template for this season or do it on your own</Text>
95
+ </View>
96
+ </View>
97
+ <View nativeID="template_options" style={{ margin:10, padding:10, borderRadius:4, backgroundColor:Colors.shades.shade100 }}>
98
+ <View nativeID="template" style={{ flexDirection:'row', alignItems:'flex-start' }}>
99
+ <View nativeID="description" style={{ flex:1, marginRight:5 }}>
100
+ <Text size={14} color={Colors.brand.midnight} weight='bold'>Use a Template</Text>
101
+ {show_templates ?
102
+ <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>All competitions will be auto-created with appropriate events and participants will be notified.</Text>
103
+ :
104
+ <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>You (the admin) will be responsible for creating each competition under this season.</Text>
105
+ }
106
+ </View>
107
+
108
+ <Switch value={show_templates} switch_type='on_off' onChange={(value) => {
109
+ if(!value){
110
+ //Need to reset init season
111
+ setDraftSeason(CompetitionHelpers.getEmptyCompetitionSeason())
112
+ }
113
+ setShowTemplates(!show_templates)}
114
+ }/>
115
+ </View>
116
+ {show_templates ?
117
+ <View style={{ marginTop:10 }}>
118
+ <Text size={14} color={Colors.brand.midnight} weight='bold'>Template Options</Text>
119
+ <View nativeID="template_options" style={{ marginTop:5, backgroundColor:Colors.shades.white, borderRadius:4, padding:10 }}>
120
+ <FlatList
121
+ data={season_templates}
122
+ renderItem={renderTemplates}
123
+ keyExtractor={(item) => item.competition_season_id.toString()}
124
+ />
125
+ </View>
126
+ </View>
127
+ :<></>}
128
+ </View>
129
+ </View>
130
+ {!show_templates || (show_templates && draft_season.following_season_id) ?
131
+ <View nativeID="form_options">
132
+ <View nativeID="competition_details">
133
+ <View nativeID="details_header" style={{ padding:10, paddingBottom:0 }}>
134
+ <Text size={16} color={Colors.brand.midnight} weight='bold'>Season Details</Text>
135
+ <Text style={{ marginTop:3 }} size={14} color={Colors.brand.midnight} weight='regular'>Name and describe this season</Text>
136
+ </View>
137
+ <View nativeID="details_input" style={{ margin:10, padding:10, borderRadius:4, backgroundColor:Colors.shades.shade100 }}>
138
+ <View nativeID="season_name">
139
+ <Text style={{ padding:10 }} size={14} color={Colors.brand.slate} weight='regular'>Name</Text>
140
+ <TextInput
141
+ style={{ borderRadius:4, backgroundColor:Colors.shades.white, padding:10, fontFamily:'barlow-regular', fontSize:14, color:Colors.brand.midnight }}
142
+ placeholder="Season Name..."
143
+ placeholderTextColor={Colors.brand.slate}
144
+ value={draft_season.season_name}
145
+ onChangeText={(text) => setDraftSeason({ ...draft_season, season_name: text })}
146
+ />
147
+ </View>
148
+ <View nativeID="season_description">
149
+ <Text style={{ padding:10 }} size={14} color={Colors.brand.slate} weight='regular'>Description</Text>
150
+ <TextInput
151
+ style={{ borderRadius:4, backgroundColor:Colors.shades.white, padding:10, fontFamily:'barlow-regular', fontSize:14, color:Colors.brand.midnight }}
152
+ placeholder="Optional..."
153
+ placeholderTextColor={Colors.brand.slate}
154
+ value={draft_season.season_description}
155
+ onChangeText={(text) => setDraftSeason({ ...draft_season, season_description: text })}
156
+ />
157
+ </View>
158
+ </View>
159
+ </View>
160
+ <View nativeID="competition_image">
161
+ <View nativeID="image_header" style={{ flexDirection:'row', alignItems:'center', padding:10, paddingBottom:0 }}>
162
+ <View style={{ flex:1 }}>
163
+ <Text size={16} color={Colors.brand.midnight} weight='bold'>Season Image</Text>
164
+ <Text style={{ marginTop:3 }} size={14} color={Colors.brand.midnight} weight='regular'>Give an image to the season (2w X 1h)</Text>
165
+ </View>
166
+ <ImageUploader
167
+ public_id={`${Math.floor(Math.random() * (1000000 - 0 + 1) + 1)}_season_image`}
168
+ onFinishUpload={(obj) => setDraftSeason({ ...draft_season, image: { url: obj.secure_url, ...obj } })}
169
+ >
170
+ <Text size={14} color={Colors.brand.electric}>Edit Image</Text>
171
+ </ImageUploader>
172
+ </View>
173
+ <View nativeID="season_image" style={{ justifyContent:'center', alignItems:'center', margin:5 }}>
174
+ <Image
175
+ source={{ uri: draft_season?.image?.url }}
176
+ style={{ width:width*0.75, height: width*0.75/2 }}
177
+ resizeMode="cover"
178
+ />
179
+ </View>
180
+ </View>
181
+ <View nativeID="season_options">
182
+ <View nativeID="options_header" style={{ flexDirection:'row', alignItems:'center', padding:10, paddingBottom:0 }}>
183
+ <View style={{ flex:1 }}>
184
+ <Text size={16} color={Colors.brand.midnight} weight='bold'>Season Configurations</Text>
185
+ <Text style={{ marginTop:3 }} size={14} color={Colors.brand.midnight} weight='regular'>Determines how the competition will operate and payout</Text>
186
+ </View>
187
+ </View>
188
+ <View nativeID="options_input" style={{ margin:10, padding:10, borderRadius:4, backgroundColor:Colors.shades.shade100 }}>
189
+ <View nativeID="single_buy_in" style={{ flexDirection:'row', alignItems:'flex-start' }}>
190
+ <View nativeID="description" style={{ flex:1, marginRight:5 }}>
191
+ <Text size={14} color={Colors.brand.midnight} weight='bold'>One Buy In</Text>
192
+ {draft_season.single_buy_in ?
193
+ <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>Once a player has purchased a ticket, they will be automatically entered into any competition created under this season.</Text>
194
+ :
195
+ <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>Players will be required to buy-in to each competition created under this season.</Text>
196
+ }
197
+ </View>
198
+ <Switch value={draft_season.single_buy_in} switch_type='on_off' onChange={() => setDraftSeason({ ...draft_season, single_buy_in: !draft_season.single_buy_in })}/>
199
+ </View>
200
+ <View nativeID="single_buy_in" style={{ flexDirection:'row', alignItems:'flex-start', marginTop:15 }}>
201
+ <View nativeID="description" style={{ flex:1, marginRight:5 }}>
202
+ <Text size={14} color={Colors.brand.midnight} weight='bold'>Allow Late Buy In</Text>
203
+ {draft_season.allow_late_buy_in ?
204
+ <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>A player can enter this season at any time (even if the first competition has completed)</Text>
205
+ :
206
+ <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>A player must enter the first competition under the season to participate.</Text>
207
+ }
208
+ </View>
209
+ <Switch value={draft_season.allow_late_buy_in} switch_type='on_off' onChange={() => setDraftSeason({ ...draft_season, allow_late_buy_in: !draft_season.allow_late_buy_in })}/>
210
+ </View>
211
+ </View>
212
+ </View>
213
+ <View nativeID="season_payout_details">
214
+ <View nativeID="payout_header" style={{ flexDirection:'row', alignItems:'center', padding:10, paddingBottom:0 }}>
215
+ <View style={{ flex:1 }}>
216
+ <Text size={16} color={Colors.brand.midnight} weight='bold'>Season Payout</Text>
217
+ <Text style={{ marginTop:3 }} size={14} color={Colors.brand.midnight} weight='regular'>How would you like the funds in the season to payout?</Text>
218
+ </View>
219
+ </View>
220
+ <View nativeID="payout_input" style={{ margin:10, padding:10, borderRadius:4, backgroundColor:Colors.shades.shade100 }}>
221
+ <View nativeID="payout_allocation" style={{ flexDirection:'row', alignItems:'flex-start' }}>
222
+ <View nativeID="description" style={{ flex:1, marginRight:5 }}>
223
+ <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>How much of the total pot will be paid out to the season vs each competition</Text>
224
+ </View>
225
+ <TextInput
226
+ value={payout_allocation_label}
227
+ onChangeText={(text) => handleChangeAllocation(text)}
228
+ style={{ padding:10, borderRadius:4, width: width * 0.2, backgroundColor:Colors.shades.white, textAlign:'center', color:Colors.brand.midnight, fontFamily:'barlow-bold' }}
229
+
230
+ />
231
+ </View>
232
+ <View style={{ flexDirection:'row', marginTop:10 }}>
233
+ <View style={{ flex:1, padding:10, backgroundColor:Colors.shades.shade600, borderRadius:4, marginRight:5 }}>
234
+ <Text size={12} color={Colors.brand.midnight} textAlign="center">Each Competition</Text>
235
+ <Text style={{ marginTop:5 }} size={14} color={Colors.brand.midnight} weight='bold' textAlign="center">{((1 - draft_season.payout_allocation) * 100).toFixed()}%</Text>
236
+ </View>
237
+ <View style={{ flex:1, padding:10, backgroundColor:Colors.shades.shade600, borderRadius:4, marginLeft:5 }}>
238
+ <Text size={12} color={Colors.brand.midnight} textAlign="center">Season</Text>
239
+ <Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='bold' textAlign="center">{((draft_season.payout_allocation) * 100).toFixed()}%</Text>
240
+ </View>
241
+ </View>
242
+ </View>
243
+ </View>
244
+ </View>
245
+ :<></>}
246
+ </ScrollView>
247
+ <View nativeID="action_row" style={{ flexDirection:'row', padding:10 }}>
248
+ <Button
249
+ style={{ flex:1, marginRight:3 }}
250
+ title="Cancel"
251
+ onPress={() => onComplete('cancel')}
252
+ title_color={Colors.brand.electric}
253
+ borderWidth={1}
254
+ padding={15}
255
+ borderColor={Colors.brand.electric}
256
+ />
257
+ <Button
258
+ disabled={!valid || loading}
259
+ style={{ flex:2, marginLeft:3, opacity:valid&&!loading?1:0.5 }}
260
+ title={draft_season.competition_season_id ? 'Edit Season' : 'Create Season'}
261
+ onPress={() => handleSubmit()}
262
+ title_color={Colors.shades.white}
263
+ padding={15}
264
+ backgroundColor={Colors.utility.success}
265
+ />
266
+ </View>
267
+ </View>
268
+ )
269
+ }
270
+
271
+ export default ManageSeasonForm
@@ -0,0 +1,108 @@
1
+ import React, { useState } from "react"
2
+ import { ActivityIndicator, FlatList, TouchableOpacity, View } from "react-native"
3
+ import type { CompetitionMatchMarketProps, MarketProps, PlayerPickProps } from "../../types"
4
+ import Colors from "../../constants/colors"
5
+ import { Icons, Text } from "../../Components"
6
+ import { CompetitionHelpers } from "../api"
7
+
8
+
9
+ type MarketsCardProps = {
10
+ competition_match_markets:CompetitionMatchMarketProps[]
11
+ markets:MarketProps[],
12
+ player_picks: PlayerPickProps[]
13
+ mode: 'view'|'play'
14
+ orientation?: 'vertical'|'horizontal'
15
+ disabled?:boolean;
16
+ locked?:boolean;
17
+ onMarketSelect:(cmm:CompetitionMatchMarketProps, player_pick?:PlayerPickProps) => void
18
+ }
19
+ const MarketsCard = ({ competition_match_markets, markets, orientation, onMarketSelect, player_picks, locked, disabled, mode }:MarketsCardProps) => {
20
+ const [ markets_width, setMarketsWidth ] = useState(0)
21
+
22
+ let unique_market_ids = [ ...new Set(competition_match_markets.map(cmm => cmm.market_id))]
23
+ const getPickColor = (player_pick:PlayerPickProps) => {
24
+ if(locked){ return Colors.shades.shade600 }
25
+ switch(player_pick.result_ind){
26
+ case 'win': return Colors.utility.success
27
+ case 'lose': return Colors.utility.error
28
+ case 'draw': return Colors.brand.slate
29
+ default: return Colors.highlights.highlight200
30
+ }
31
+ }
32
+
33
+ const renderMarkets = (data:{item:string, index:number}) => {
34
+ const market = markets.find(m => m.market_id == data.item)
35
+ const match_markets = competition_match_markets.filter(cmm => cmm.market_id == data.item)
36
+ if(!market){ return <></> }
37
+
38
+ const market_width = orientation == "horizontal" ? markets_width : markets_width / unique_market_ids.length
39
+
40
+ return (
41
+ <View style={{ flex:1, flexDirection:orientation == 'horizontal'?'row':'column', width: market_width }}>
42
+ {orientation == 'horizontal' ?
43
+ <></>
44
+ :
45
+ <Text size={12} color={Colors.shades.black} weight='regular' textAlign="center">{market.type.toUpperCase()}</Text>
46
+ }
47
+ {match_markets.sort((a) => {
48
+ if(a.side == market.trade_side){ return 1 } else { return -1}
49
+ }).map(mm => {
50
+ const player_pick = player_picks.find(pp => pp.market_id == data.item && pp.side == mm.side)
51
+ return (
52
+ <TouchableOpacity
53
+ delayPressIn={0}
54
+ disabled={locked || mode == 'view' || disabled}
55
+ onPress={() => onMarketSelect(mm, player_pick)}
56
+ style={{
57
+ flex:1, marginTop:3, justifyContent:'center', padding:7.5,
58
+ backgroundColor: player_pick ? getPickColor(player_pick) : Colors.shades.shade600,
59
+ borderRadius:4,
60
+ margin:3,
61
+ opacity: disabled ? 0.5 : 1
62
+ }}>
63
+ {market.var_1_required ?
64
+ <Text size={12} color={player_pick&&!locked?Colors.shades.white:Colors.shades.black} textAlign="center">{mm.side=='over'?'O ':mm.side=='under'?'U ':''}{CompetitionHelpers.getVar1Label(mm.var_1, market)}</Text>
65
+ :market.show_side_option ?
66
+ <Text size={12} color={player_pick&&!locked?Colors.shades.white:Colors.shades.black} textAlign="center">{mm.side.toUpperCase()}</Text>
67
+ :<></>}
68
+ <Text size={12} color={player_pick&&!locked?Colors.shades.white:Colors.shades.black} textAlign="center" weight='bold'>{CompetitionHelpers.getOddsLabel(mm.odds)}</Text>
69
+ {locked ?
70
+ <View style={{ position:'absolute', backgroundColor:Colors.shades.shade600, borderRadius:4, top:0, bottom:0, right:0, left:0, justifyContent:'center', alignItems:'center' }}>
71
+ <Icons.LockClosedIcon size={14} color={Colors.shades.black} />
72
+ </View>
73
+ :<></>}
74
+ </TouchableOpacity>
75
+ )
76
+ })}
77
+ </View>
78
+ )
79
+ }
80
+ return (
81
+ <View style={{ flex:1 }} onLayout={(ev) => {
82
+ const { width } = ev.nativeEvent.layout;
83
+ setMarketsWidth(width)
84
+ }}>
85
+ {markets_width > 0 ?
86
+ <View>
87
+ {unique_market_ids.length > 0 ?
88
+ <FlatList
89
+ horizontal
90
+ data={unique_market_ids}
91
+ renderItem={renderMarkets}
92
+ />
93
+ :
94
+ <View style={{ height:100, justifyContent:'center', alignItems:'center' }}>
95
+ <Icons.LockClosedIcon color={Colors.brand.midnight} size={32}/>
96
+ </View>
97
+ }
98
+ </View>
99
+ :
100
+ <View style={{ height:100, justifyContent:'center', alignItems:'center' }}>
101
+ <ActivityIndicator size={'large'} color={Colors.brand.midnight}/>
102
+ </View>
103
+ }
104
+ </View>
105
+ )
106
+ }
107
+
108
+ export default MarketsCard