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,182 @@
1
+ import React from 'react';
2
+ import { TouchableOpacity, View } from "react-native";
3
+ import Colors from "../../constants/colors";
4
+ import { Icons, Text } from "../../Components";
5
+ const PollSelectCard = ({
6
+ index,
7
+ poll,
8
+ disabled,
9
+ selected,
10
+ poll_campaign,
11
+ poll_response,
12
+ show_response,
13
+ response_option,
14
+ onSelect
15
+ }) => {
16
+ const getResultColor = () => {
17
+ switch (poll_response?.result_ind) {
18
+ case 'win':
19
+ return Colors.utility.success;
20
+ case 'lose':
21
+ return Colors.utility.error;
22
+ case 'draw':
23
+ return Colors.utility.warning;
24
+ default:
25
+ return Colors.brand.slate;
26
+ }
27
+ };
28
+ const getStatusColor = () => {
29
+ switch (poll.status) {
30
+ case 'closed':
31
+ return Colors.highlights.highlight300Faded;
32
+ case 'active':
33
+ return Colors.highlights.highlight400Faded;
34
+ default:
35
+ return Colors.highlights.highlight500Faded;
36
+ }
37
+ };
38
+ const getResultIcon = () => {
39
+ let color = getResultColor();
40
+ switch (poll_response?.result_ind) {
41
+ case 'win':
42
+ return /*#__PURE__*/React.createElement(Icons.CheckIcon, {
43
+ color: color,
44
+ size: 16
45
+ });
46
+ case 'lose':
47
+ return /*#__PURE__*/React.createElement(Icons.CloseIcon, {
48
+ color: color,
49
+ size: 12
50
+ });
51
+ default:
52
+ if (poll.status == 'closed') {
53
+ return /*#__PURE__*/React.createElement(Icons.CloseIcon, {
54
+ color: color,
55
+ size: 10
56
+ });
57
+ }
58
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
59
+ }
60
+ };
61
+ const getStatusIcon = () => {
62
+ //let color = getResultColor()
63
+ switch (poll.status) {
64
+ case 'closed':
65
+ return /*#__PURE__*/React.createElement(Icons.LockClosedIcon, {
66
+ color: Colors.brand.midnight,
67
+ size: 14
68
+ });
69
+ case 'active':
70
+ return /*#__PURE__*/React.createElement(Icons.InProgressIcon, {
71
+ color: Colors.brand.midnight,
72
+ size: 14
73
+ });
74
+ default:
75
+ return /*#__PURE__*/React.createElement(Icons.PausedIcon, {
76
+ color: Colors.brand.midnight,
77
+ size: 14
78
+ });
79
+ }
80
+ };
81
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
82
+ disabled: disabled,
83
+ style: {
84
+ padding: 10,
85
+ borderRadius: 22,
86
+ backgroundColor: selected ? Colors.highlights.highlight500Faded : undefined,
87
+ flexDirection: 'row'
88
+ },
89
+ onPress: () => onSelect(poll)
90
+ }, /*#__PURE__*/React.createElement(View, {
91
+ style: {
92
+ height: 20,
93
+ width: 20,
94
+ borderRadius: 100,
95
+ backgroundColor: Colors.shades.white,
96
+ marginRight: 10,
97
+ justifyContent: 'center'
98
+ }
99
+ }, /*#__PURE__*/React.createElement(Text, {
100
+ size: 12,
101
+ color: Colors.brand.midnight,
102
+ weight: "bold",
103
+ textAlign: "center"
104
+ }, (index + 1).toString())), /*#__PURE__*/React.createElement(View, {
105
+ style: {
106
+ flex: 1
107
+ }
108
+ }, poll_campaign.campaign_type == 'trivia' && !poll_response && poll.status != 'closed' ? /*#__PURE__*/React.createElement(Text, {
109
+ size: 14,
110
+ color: Colors.brand.midnight,
111
+ weight: "bold"
112
+ }, poll.hidden_clue ? `Hint: ${poll.hidden_clue}` : `Question Hidden`) : /*#__PURE__*/React.createElement(Text, {
113
+ size: 14,
114
+ color: Colors.brand.midnight,
115
+ weight: "bold"
116
+ }, poll.poll_question), poll.status == 'closed' || show_response ? /*#__PURE__*/React.createElement(View, {
117
+ style: {
118
+ marginTop: 10,
119
+ flexDirection: 'row'
120
+ }
121
+ }, response_option && poll.poll_type == 'select' ? /*#__PURE__*/React.createElement(Text, {
122
+ style: {
123
+ flex: 1
124
+ },
125
+ size: 12,
126
+ color: Colors.brand.slate
127
+ }, "My Answer: ", /*#__PURE__*/React.createElement(Text, {
128
+ size: 12,
129
+ color: Colors.brand.midnight,
130
+ weight: "semibold"
131
+ }, response_option.option_name)) : response_option && poll.poll_type == 'input' ? /*#__PURE__*/React.createElement(Text, {
132
+ style: {
133
+ flex: 1
134
+ },
135
+ size: 12,
136
+ color: Colors.brand.slate
137
+ }, "My Answer: ", /*#__PURE__*/React.createElement(Text, {
138
+ size: 12,
139
+ color: Colors.brand.midnight,
140
+ weight: "semibold"
141
+ }, poll_response?.input_value)) : poll.status == 'closed' || poll_response?.timed_out ? /*#__PURE__*/React.createElement(Text, {
142
+ style: {
143
+ flex: 1
144
+ },
145
+ size: 12,
146
+ color: Colors.brand.midnight,
147
+ weight: "light"
148
+ }, "TIMED OUT") : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
149
+ style: {
150
+ marginLeft: 5
151
+ }
152
+ }, getResultIcon())) : /*#__PURE__*/React.createElement(View, {
153
+ style: {
154
+ flexDirection: 'row',
155
+ alignItems: 'center'
156
+ }
157
+ }, /*#__PURE__*/React.createElement(Text, {
158
+ style: {
159
+ flex: 1
160
+ },
161
+ size: 12,
162
+ color: Colors.brand.midnight,
163
+ weight: "light"
164
+ }, poll.poll_type == 'select' ? 'Multiple Choice' : 'Type Answer'), /*#__PURE__*/React.createElement(View, {
165
+ style: {
166
+ flexDirection: 'row',
167
+ alignItems: 'center',
168
+ padding: 10,
169
+ backgroundColor: getStatusColor(),
170
+ borderRadius: 22
171
+ }
172
+ }, getStatusIcon(), poll.seconds_allowed && poll.status != 'closed' ? /*#__PURE__*/React.createElement(Text, {
173
+ style: {
174
+ marginLeft: 5
175
+ },
176
+ size: 12,
177
+ color: Colors.brand.midnight,
178
+ weight: "bold"
179
+ }, poll.seconds_allowed, " Sec") : /*#__PURE__*/React.createElement(React.Fragment, null)))));
180
+ };
181
+ export default PollSelectCard;
182
+ //# sourceMappingURL=PollSelectCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","TouchableOpacity","View","Colors","Icons","Text","PollSelectCard","index","poll","disabled","selected","poll_campaign","poll_response","show_response","response_option","onSelect","getResultColor","result_ind","utility","success","error","warning","brand","slate","getStatusColor","status","highlights","highlight300Faded","highlight400Faded","highlight500Faded","getResultIcon","color","createElement","CheckIcon","size","CloseIcon","Fragment","getStatusIcon","LockClosedIcon","midnight","InProgressIcon","PausedIcon","style","padding","borderRadius","backgroundColor","undefined","flexDirection","onPress","height","width","shades","white","marginRight","justifyContent","weight","textAlign","toString","flex","campaign_type","hidden_clue","poll_question","marginTop","poll_type","option_name","input_value","timed_out","marginLeft","alignItems","seconds_allowed"],"sourceRoot":"../../../../src","sources":["Poll/components/PollSelectCard.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAErD,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,SAASC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB;AAc9C,MAAMC,cAAc,GAAGA,CAAC;EAAEC,KAAK;EAAEC,IAAI;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC,aAAa;EAAEC,aAAa;EAAEC,aAAa;EAAEC,eAAe;EAAEC;AAA6B,CAAC,KAAK;EAExJ,MAAMC,cAAc,GAAGA,CAAA,KAAM;IACzB,QAAOJ,aAAa,EAAEK,UAAU;MAC5B,KAAK,KAAK;QAAE,OAAOd,MAAM,CAACe,OAAO,CAACC,OAAO;MACzC,KAAK,MAAM;QAAE,OAAOhB,MAAM,CAACe,OAAO,CAACE,KAAK;MACxC,KAAK,MAAM;QAAE,OAAOjB,MAAM,CAACe,OAAO,CAACG,OAAO;MAC1C;QAAS,OAAOlB,MAAM,CAACmB,KAAK,CAACC,KAAK;IACtC;EACJ,CAAC;EAED,MAAMC,cAAc,GAAGA,CAAA,KAAM;IACzB,QAAOhB,IAAI,CAACiB,MAAM;MACd,KAAK,QAAQ;QAAE,OAAOtB,MAAM,CAACuB,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AAO,EAAC,EAAE;MAAEE,eAAe,EAACrB,cAAc,CAAC,CAAC;MAAEoB,YAAY,EAAC;IAAG;EAAE,GACpHP,aAAa,CAAC,CAAC,EACf7B,IAAI,CAAC6D,eAAe,IAAI7D,IAAI,CAACiB,MAAM,IAAI,QAAQ,gBAChDzB,KAAA,CAAAgC,aAAA,CAAC3B,IAAI;IAACqC,KAAK,EAAE;MAAEyB,UAAU,EAAC;IAAE,CAAE;IAACjC,IAAI,EAAE,EAAG;IAACH,KAAK,EAAE5B,MAAM,CAACmB,KAAK,CAACiB,QAAS;IAACgB,MAAM,EAAC;EAAM,GAAE/C,IAAI,CAAC6D,eAAe,EAAC,MAAU,CAAC,gBACrHrE,KAAA,CAAAgC,aAAA,CAAAhC,KAAA,CAAAoC,QAAA,MAAI,CACH,CACJ,CAEJ,CACQ,CAAC;AAEvB,CAAC;AAED,eAAe9B,cAAc","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import { View } from "react-native";
3
+ import { Text } from "../../Components";
4
+ import Colors from "../../constants/colors";
5
+ const ResponseTimer = ({
6
+ seconds,
7
+ onTimesUp
8
+ }) => {
9
+ const [seconds_remaining, setSecondsRemaining] = useState(seconds);
10
+ const [times_up, setTimesUp] = useState(false);
11
+ useEffect(() => {
12
+ if (seconds_remaining > 0) {
13
+ setTimeout(() => setSecondsRemaining(seconds_remaining - 1), 1000);
14
+ } else {
15
+ setTimesUp(true);
16
+ }
17
+ }, [seconds_remaining]);
18
+ useEffect(() => {
19
+ if (!times_up) {
20
+ return;
21
+ }
22
+ onTimesUp();
23
+ }, [times_up]);
24
+ return /*#__PURE__*/React.createElement(View, {
25
+ style: {
26
+ width: 50,
27
+ padding: 10,
28
+ borderRadius: 22,
29
+ backgroundColor: seconds_remaining < 5 ? Colors.utility.error : seconds_remaining < 10 ? Colors.utility.warning : Colors.utility.success
30
+ }
31
+ }, /*#__PURE__*/React.createElement(Text, {
32
+ textAlign: "center",
33
+ size: 14,
34
+ color: Colors.shades.white,
35
+ weight: "bold"
36
+ }, seconds_remaining));
37
+ };
38
+ export default ResponseTimer;
39
+ //# sourceMappingURL=ResponseTimer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useState","View","Text","Colors","ResponseTimer","seconds","onTimesUp","seconds_remaining","setSecondsRemaining","times_up","setTimesUp","setTimeout","createElement","style","width","padding","borderRadius","backgroundColor","utility","error","warning","success","textAlign","size","color","shades","white","weight"],"sourceRoot":"../../../../src","sources":["Poll/components/ResponseTimer.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,IAAI,QAAQ,kBAAkB;AACvC,OAAOC,MAAM,MAAM,wBAAwB;AAO3C,MAAMC,aAAa,GAAGA,CAAC;EAAEC,OAAO;EAAEC;AAA6B,CAAC,KAAK;EACjE,MAAM,CAAEC,iBAAiB,EAAEC,mBAAmB,CAAE,GAAGR,QAAQ,CAACK,OAAO,CAAC;EACpE,MAAM,CAAEI,QAAQ,EAAEC,UAAU,CAAE,GAAGV,QAAQ,CAAC,KAAK,CAAC;EAEhDD,SAAS,CAAC,MAAM;IACZ,IAAGQ,iBAAiB,GAAG,CAAC,EAAC;MACrBI,UAAU,CAAC,MAAMH,mBAAmB,CAACD,iBAAiB,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC;IACtE,CAAC,MAAM;MACHG,UAAU,CAAC,IAAI,CAAC;IACpB;EACJ,CAAC,EAAC,CAACH,iBAAiB,CAAC,CAAC;EAGtBR,SAAS,CAAC,MAAM;IACZ,IAAG,CAACU,QAAQ,EAAC;MAAE;IAAO;IACtBH,SAAS,CAAC,CAAC;EACf,CAAC,EAAC,CAACG,QAAQ,CAAC,CAAC;EAEb,oBACIX,KAAA,CAAAc,aAAA,CAACX,IAAI;IAACY,KAAK,EAAE;MAAEC,KAAK,EAAC,EAAE;MAAEC,OAAO,EAAC,EAAE;MAAEC,YAAY,EAAC,EAAE;MAAEC,eAAe,EAACV,iBAAiB,GAAG,CAAC,GAAGJ,MAAM,CAACe,OAAO,CAACC,KAAK,GAAGZ,iBAAiB,GAAG,EAAE,GAAGJ,MAAM,CAACe,OAAO,CAACE,OAAO,GAAIjB,MAAM,CAACe,OAAO,CAACG;IAAQ;EAAE,gBAC7LvB,KAAA,CAAAc,aAAA,CAACV,IAAI;IAACoB,SAAS,EAAC,QAAQ;IAACC,IAAI,EAAE,EAAG;IAACC,KAAK,EAAErB,MAAM,CAACsB,MAAM,CAACC,KAAM;IAACC,MAAM,EAAC;EAAM,GAAEpB,iBAAwB,CACpG,CAAC;AAEf,CAAC;AAED,eAAeH,aAAa","ignoreList":[]}
@@ -0,0 +1,76 @@
1
+ import React from 'react';
2
+ import { Image, TouchableOpacity, View } from "react-native";
3
+ import { Icons, Text } from '../../Components';
4
+ import Colors from '../../constants/colors';
5
+ const WidgetHeader = ({
6
+ back_visible,
7
+ title,
8
+ sub_title,
9
+ image,
10
+ onBack
11
+ }) => {
12
+ return /*#__PURE__*/React.createElement(View, {
13
+ style: {
14
+ flexDirection: 'row'
15
+ }
16
+ }, back_visible ? /*#__PURE__*/React.createElement(TouchableOpacity, {
17
+ style: {
18
+ justifyContent: 'center',
19
+ alignItems: 'center',
20
+ flex: 1
21
+ },
22
+ onPress: () => onBack()
23
+ }, /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
24
+ direction: "left",
25
+ color: Colors.shades.white,
26
+ size: 12
27
+ })) : /*#__PURE__*/React.createElement(View, {
28
+ style: {
29
+ flex: 1
30
+ }
31
+ }), /*#__PURE__*/React.createElement(View, {
32
+ nativeID: "header",
33
+ style: {
34
+ flex: 8
35
+ }
36
+ }, /*#__PURE__*/React.createElement(View, {
37
+ nativeID: "company",
38
+ style: {
39
+ padding: 20
40
+ }
41
+ }, /*#__PURE__*/React.createElement(Text, {
42
+ size: 18,
43
+ color: Colors.shades.white,
44
+ weight: "bold",
45
+ textAlign: "center"
46
+ }, title), sub_title ? /*#__PURE__*/React.createElement(Text, {
47
+ style: {
48
+ marginTop: 3
49
+ },
50
+ size: 12,
51
+ color: Colors.shades.white,
52
+ weight: "regular",
53
+ textAlign: "center"
54
+ }, sub_title) : /*#__PURE__*/React.createElement(React.Fragment, null))), image ? /*#__PURE__*/React.createElement(View, {
55
+ style: {
56
+ flex: 1,
57
+ justifyContent: 'center',
58
+ alignItems: 'center'
59
+ }
60
+ }, /*#__PURE__*/React.createElement(Image, {
61
+ source: {
62
+ uri: image.url
63
+ },
64
+ style: {
65
+ height: 30,
66
+ width: 30
67
+ },
68
+ resizeMode: "contain"
69
+ })) : /*#__PURE__*/React.createElement(View, {
70
+ style: {
71
+ flex: 1
72
+ }
73
+ }));
74
+ };
75
+ export default WidgetHeader;
76
+ //# sourceMappingURL=WidgetHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Image","TouchableOpacity","View","Icons","Text","Colors","WidgetHeader","back_visible","title","sub_title","image","onBack","createElement","style","flexDirection","justifyContent","alignItems","flex","onPress","ChevronIcon","direction","color","shades","white","size","nativeID","padding","weight","textAlign","marginTop","Fragment","source","uri","url","height","width","resizeMode"],"sourceRoot":"../../../../src","sources":["Poll/components/WidgetHeader.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAC5D,SAASC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB;AAC9C,OAAOC,MAAM,MAAM,wBAAwB;AAU3C,MAAMC,YAAY,GAAGA,CAAC;EAAEC,YAAY;EAAEC,KAAK;EAAEC,SAAS;EAAEC,KAAK;EAAEC;AAAyB,CAAC,KAAK;EAE1F,oBACIZ,KAAA,CAAAa,aAAA,CAACV,IAAI;IAACW,KAAK,EAAE;MAAEC,aAAa,EAAC;IAAM;EAAE,GAC5BP,YAAY,gBACbR,KAAA,CAAAa,aAAA,CA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,CAACV,IAAI;IAACW,KAAK,EAAE;MAAEI,IAAI,EAAC,CAAC;MAAEF,cAAc,EAAC,QAAQ;MAAEC,UAAU,EAAC;IAAS;EAAE,gBAClEjB,KAAA,CAAAa,aAAA,CAACZ,KAAK;IACF+B,MAAM,EAAE;MAAEC,GAAG,EAAEtB,KAAK,CAACuB;IAAI,CAAE;IAC3BpB,KAAK,EAAE;MAAEqB,MAAM,EAAC,EAAE;MAAEC,KAAK,EAAC;IAAG,CAAE;IAC/BC,UAAU,EAAC;EAAS,CACnB,CACH,CAAC,gBAEPrC,KAAA,CAAAa,aAAA,CAACV,IAAI;IAACW,KAAK,EAAE;MAAEI,IAAI,EAAC;IAAE;EAAE,CAAE,CAExB,CAAC;AAEnB,CAAC;AAED,eAAeX,YAAY","ignoreList":[]}
@@ -0,0 +1,345 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { ActivityIndicator, View, Image, TouchableOpacity } from "react-native";
3
+ import Colors from '../../constants/colors';
4
+ import { Spring, Text, TextInput } from '../../Components';
5
+ import { PollApi, PollCampaignApi, PollResponseApi, PollResponseHelpers } from '../api';
6
+ import { view_styles } from '../../constants/styles';
7
+ import AsyncStorage from '@react-native-async-storage/async-storage';
8
+ const MAX_IMAGE_SIZE = 125;
9
+ const MAX_OPTION_WIDTH = 200;
10
+ const FlashMarket = ({
11
+ poll_id,
12
+ player_id,
13
+ onRequestAuthenticate
14
+ }) => {
15
+ const [flash_size, setFlashSize] = useState({
16
+ height: 0,
17
+ width: 0
18
+ });
19
+ const [data, setData] = useState({
20
+ loading: false,
21
+ poll_options: [],
22
+ poll_summaries: [],
23
+ show_complete: false
24
+ });
25
+ const {
26
+ loading,
27
+ poll,
28
+ poll_options,
29
+ poll_summaries,
30
+ poll_response
31
+ } = data;
32
+ let visible_options = poll_options;
33
+ if (poll_response && poll_response.status == 'pending') {
34
+ visible_options = poll_options.filter(po => po.poll_option_id == poll_response.poll_option_id);
35
+ }
36
+ let image_size = flash_size.width * 0.2;
37
+ if (image_size > MAX_IMAGE_SIZE) {
38
+ image_size = MAX_IMAGE_SIZE;
39
+ }
40
+ let option_width = flash_size.width * 0.8 / 2 - 25;
41
+ if (option_width > MAX_OPTION_WIDTH) {
42
+ option_width = MAX_OPTION_WIDTH;
43
+ }
44
+ useEffect(() => {
45
+ getDataFromServer(poll_id);
46
+ }, [poll_id]);
47
+ const getDataFromServer = async poll_id => {
48
+ setData({
49
+ ...data,
50
+ loading: true
51
+ });
52
+ const resp = await PollApi.getPollById(poll_id);
53
+ const pc = await PollCampaignApi.getPollCampaignById(resp.poll.poll_campaign_id);
54
+ let my_response = undefined;
55
+ //First if there is a player_id - lets grab from the server first
56
+ if (player_id) {
57
+ my_response = await PollResponseApi.getResponseByPollId(poll_id);
58
+ }
59
+ if (!my_response) {
60
+ //If no-response - check cache
61
+ let cached_response = await AsyncStorage.getItem(`response:${poll_id}`);
62
+ if (cached_response) {
63
+ my_response = JSON.parse(cached_response);
64
+ }
65
+ }
66
+ setData({
67
+ loading: false,
68
+ poll_campaign: pc,
69
+ poll: resp.poll,
70
+ poll_options: resp.poll_options,
71
+ poll_summaries: resp.poll_summaries,
72
+ poll_response: my_response,
73
+ show_complete: my_response && my_response?.status != 'pending' ? true : false
74
+ });
75
+ };
76
+ const handleSelectOption = async po => {
77
+ if (!poll) {
78
+ return;
79
+ }
80
+ if (poll_response && poll_response.status != 'pending') {
81
+ return setData({
82
+ ...data,
83
+ show_complete: true
84
+ });
85
+ }
86
+ let cached_response = await AsyncStorage.getItem(`response:${poll_id}`);
87
+ if (cached_response) {
88
+ if (JSON.parse(cached_response).poll_option_id == po.poll_option_id) {
89
+ await AsyncStorage.removeItem(`response:${poll_id}`);
90
+ return setData({
91
+ ...data,
92
+ poll_response: undefined
93
+ });
94
+ }
95
+ }
96
+ let stake = poll_response?.stake ?? poll.minimum_stake;
97
+ let draft_response = {
98
+ poll_id: poll.poll_id,
99
+ poll_option_id: po.poll_option_id,
100
+ stake: stake,
101
+ market_type: 'FREE',
102
+ poll_response_id: '',
103
+ player_id: '',
104
+ winnings: 0,
105
+ response_body: {},
106
+ status: 'pending',
107
+ create_datetime: '',
108
+ last_update_datetime: ''
109
+ };
110
+ await AsyncStorage.setItem(`response:${poll_id}`, JSON.stringify(draft_response));
111
+ setData({
112
+ ...data,
113
+ poll_response: draft_response
114
+ });
115
+ };
116
+ const handleSubmit = async () => {
117
+ if (!poll_response) {
118
+ return;
119
+ }
120
+ if (poll_response.status != 'pending') {
121
+ return;
122
+ }
123
+ if (!player_id) {
124
+ return onRequestAuthenticate();
125
+ }
126
+ let stake_number = parseFloat(poll_response.stake);
127
+ if (isNaN(stake_number)) {
128
+ return;
129
+ }
130
+ const new_resp = await PollResponseApi.createPollResponse({
131
+ ...poll_response,
132
+ stake: stake_number
133
+ });
134
+ const updated_ps = PollResponseHelpers.updateSummariesWithResponse(new_resp, poll_summaries);
135
+ setData({
136
+ ...data,
137
+ poll_response: new_resp,
138
+ poll_summaries: updated_ps,
139
+ show_complete: true
140
+ });
141
+ await AsyncStorage.removeItem(`response:${poll_id}`);
142
+ };
143
+
144
+ //const selected_option = poll_options.find(po => po.poll_option_id == poll_response?.poll_option_id)
145
+ //const selected_summary = poll_summaries.find(ps => ps.poll_option_id == poll_response?.poll_option_id)
146
+ //const correct_option = poll_options.find(po => po.result_ind == 'win');
147
+ //const correct_summary = poll_summaries.find(ps => ps.poll_option_id == correct_option?.poll_option_id);
148
+
149
+ const renderPollOptions = data => {
150
+ const selected = data.item.poll_option_id == poll_response?.poll_option_id ? true : false;
151
+ const poll_summary = poll_summaries.find(ps => ps.poll_option_id == data.item.poll_option_id);
152
+ const color = PollResponseHelpers.getOptionColor(data.item, poll_response);
153
+ return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(TouchableOpacity
154
+ //disabled={poll_response && poll_response.status != 'pending' ? true : false}
155
+ , {
156
+ style: {
157
+ flexDirection: 'row',
158
+ width: option_width,
159
+ alignItems: 'center',
160
+ margin: 5,
161
+ borderRadius: 22,
162
+ padding: 10,
163
+ borderWidth: selected ? 1 : 0,
164
+ borderColor: Colors.brand.midnight,
165
+ backgroundColor: color,
166
+ ...view_styles.float
167
+ },
168
+ onPress: () => handleSelectOption(data.item)
169
+ }, data.show_summary && poll_summary ? /*#__PURE__*/React.createElement(View, {
170
+ style: {
171
+ position: 'absolute',
172
+ top: 0,
173
+ left: 0,
174
+ bottom: 0,
175
+ borderRadius: 22,
176
+ backgroundColor: color,
177
+ opacity: 0.6,
178
+ width: option_width * poll_summary.pct
179
+ }
180
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(Text, {
181
+ style: {
182
+ flex: 1
183
+ },
184
+ size: 14,
185
+ color: Colors.brand.midnight,
186
+ weight: 'bold',
187
+ textAlign: data.show_summary ? 'left' : 'center'
188
+ }, data.item.option_name), data.show_summary && poll_summary ? /*#__PURE__*/React.createElement(Text, {
189
+ style: {
190
+ marginLeft: 10,
191
+ padding: 5,
192
+ borderRadius: selected ? 100 : 0,
193
+ backgroundColor: selected ? Colors.shades.white : undefined,
194
+ ...view_styles.float
195
+ },
196
+ size: 12,
197
+ color: Colors.brand.midnight,
198
+ weight: "bold"
199
+ }, (poll_summary.pct * 100).toFixed(), "%") : /*#__PURE__*/React.createElement(React.Fragment, null)));
200
+ };
201
+ if (loading || !poll) {
202
+ return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(ActivityIndicator, {
203
+ size: 'large',
204
+ color: Colors.brand.midnight
205
+ }));
206
+ }
207
+ return /*#__PURE__*/React.createElement(View, {
208
+ style: {
209
+ flex: 1
210
+ }
211
+ }, /*#__PURE__*/React.createElement(View, {
212
+ style: {
213
+ backgroundColor: Colors.shades.white,
214
+ flexDirection: 'row'
215
+ },
216
+ onLayout: ev => {
217
+ const {
218
+ height,
219
+ width
220
+ } = ev.nativeEvent.layout;
221
+ setFlashSize({
222
+ height,
223
+ width
224
+ });
225
+ }
226
+ }, !poll_response || poll_response.status != 'pending' ? /*#__PURE__*/React.createElement(View, {
227
+ style: {
228
+ padding: 10
229
+ }
230
+ }, /*#__PURE__*/React.createElement(Image, {
231
+ source: {
232
+ uri: poll.poll_image?.url ?? 'https://res.cloudinary.com/hoabts6mc/image/upload/v1718979933/question_mark_ro0ac5.webp'
233
+ },
234
+ style: {
235
+ height: image_size,
236
+ width: image_size
237
+ },
238
+ resizeMode: "cover"
239
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(View, {
240
+ style: {
241
+ flex: 1
242
+ },
243
+ nativeID: "question"
244
+ }, /*#__PURE__*/React.createElement(View, {
245
+ style: {
246
+ padding: 10,
247
+ borderBottomWidth: 1,
248
+ borderBottomColor: Colors.shades.shade600
249
+ }
250
+ }, /*#__PURE__*/React.createElement(Text, {
251
+ size: 16,
252
+ color: Colors.brand.midnight,
253
+ weight: "bold"
254
+ }, poll.poll_question)), /*#__PURE__*/React.createElement(View, {
255
+ nativeID: "poll_options",
256
+ style: {
257
+ flex: 1,
258
+ padding: 5,
259
+ flexDirection: 'row',
260
+ flexWrap: 'wrap',
261
+ justifyContent: 'center',
262
+ alignItems: 'center'
263
+ }
264
+ }, visible_options.sort((a, b) => a.priority - b.priority).map((po, i) => {
265
+ return renderPollOptions({
266
+ item: po,
267
+ index: i,
268
+ show_summary: poll_response && poll_response.status != 'pending' ? true : false
269
+ });
270
+ }))), poll_response?.status == 'pending' ? /*#__PURE__*/React.createElement(Spring, {
271
+ slide: "horizontal",
272
+ to: 0,
273
+ from: 100
274
+ }, /*#__PURE__*/React.createElement(View, {
275
+ style: {
276
+ justifyContent: 'space-between',
277
+ backgroundColor: Colors.shades.shade600
278
+ }
279
+ }, /*#__PURE__*/React.createElement(View, {
280
+ style: {
281
+ padding: 10,
282
+ borderBottomWidth: 1,
283
+ borderBottomColor: Colors.shades.shade100
284
+ }
285
+ }, /*#__PURE__*/React.createElement(Text, {
286
+ size: 16,
287
+ color: Colors.brand.midnight,
288
+ textAlign: "center",
289
+ weight: "bold"
290
+ }, poll.confidence_allowed ? 'HOW MUCH?' : 'ARE YOU SURE?')), poll.confidence_allowed ? /*#__PURE__*/React.createElement(View, {
291
+ style: {
292
+ flex: 1,
293
+ padding: 5
294
+ }
295
+ }, /*#__PURE__*/React.createElement(View, {
296
+ style: {
297
+ flexDirection: 'row',
298
+ backgroundColor: Colors.shades.white,
299
+ borderRadius: 22
300
+ }
301
+ }, /*#__PURE__*/React.createElement(Text, {
302
+ style: {
303
+ padding: 10
304
+ }
305
+ }, poll.market_type == 'FOR_MONEY' ? '$' : 'E'), /*#__PURE__*/React.createElement(TextInput, {
306
+ style: {
307
+ padding: 10,
308
+ borderWidth: 0,
309
+ borderTopLeftRadius: 0,
310
+ borderBottomLeftRadius: 0,
311
+ backgroundColor: 'transparent',
312
+ width: flash_size.width * 0.22
313
+ },
314
+ autoFocus: true,
315
+ value: poll_response.stake,
316
+ onChangeText: text => setData({
317
+ ...data,
318
+ poll_response: {
319
+ ...poll_response,
320
+ stake: text
321
+ }
322
+ })
323
+ }))) : /*#__PURE__*/React.createElement(View, {
324
+ style: {
325
+ flex: 1
326
+ }
327
+ }), /*#__PURE__*/React.createElement(TouchableOpacity, {
328
+ style: {
329
+ marginTop: 10,
330
+ backgroundColor: Colors.utility.success,
331
+ padding: 10,
332
+ paddingLeft: 20,
333
+ paddingRight: 20,
334
+ justifyContent: 'center',
335
+ alignItems: 'center'
336
+ },
337
+ onPress: () => handleSubmit()
338
+ }, /*#__PURE__*/React.createElement(Text, {
339
+ weight: "bold",
340
+ size: 14,
341
+ color: Colors.shades.white
342
+ }, "SUBMIT")))) : /*#__PURE__*/React.createElement(React.Fragment, null)));
343
+ };
344
+ export default FlashMarket;
345
+ //# sourceMappingURL=index.js.map