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,70 @@
1
+ import React from 'react';
2
+ import { FlatList, TouchableOpacity, View } from "react-native"
3
+ import { useState } from "react"
4
+ import type { PollCampaignProps, PollProps, PollResponseProps } from '../../types';
5
+ import Colors from '../../constants/colors';
6
+ import { Icons, Text } from '../../Components';
7
+
8
+ type CampaignProgressBarProps = {
9
+ poll_campaign:PollCampaignProps,
10
+ polls:PollProps[],
11
+ poll_responses:PollResponseProps[],
12
+ active_poll:string,
13
+ onPollSelect:(poll:PollProps) => void
14
+ }
15
+
16
+ const CampaignProgressBar = ({ poll_responses, active_poll, polls, onPollSelect}:CampaignProgressBarProps) => {
17
+ const [ progress_width, setProgressWidth ] = useState(0)
18
+
19
+ const getBarColor = (pr:PollResponseProps) => {
20
+ switch(pr.result_ind){
21
+ case 'win': return Colors.utility.success
22
+ case 'lose': return Colors.utility.error
23
+ default: return Colors.utility.warning
24
+ }
25
+ }
26
+
27
+ const renderProgress = (data: {item: PollProps, index:number }) => {
28
+ let width = progress_width / polls.length
29
+ let color = Colors.shades.white
30
+ let response = poll_responses.find(pr => pr.poll_id == data.item.poll_id)
31
+ if(response){ color = getBarColor(response) }
32
+
33
+ const active = active_poll == data.item.poll_id ? true : false
34
+ return (
35
+ <TouchableOpacity
36
+ onPress={() => onPollSelect(data.item)}
37
+ style={{ margin:2, borderWidth:active?2:0, borderColor:Colors.brand.midnight, borderRadius:4, height:20, width: width - 4, backgroundColor:color }}
38
+ />
39
+ )
40
+ }
41
+
42
+ const questions_answered = poll_responses.length
43
+ const questions_unanswered = polls.length - questions_answered
44
+
45
+ return (
46
+ <View style={{ flexDirection:'row', alignItems:'center' }}>
47
+ <View nativeID="questions_answered" style={{ flexDirection:'row', alignItems:'center', margin:5, borderRadius:4, backgroundColor:Colors.highlights.highlight400, padding:5 }}>
48
+ <Icons.UserIcon color={Colors.shades.white} size={12} />
49
+ <Text style={{ marginLeft:5 }} size={12} color={Colors.shades.white} weight='semibold'>{questions_answered}</Text>
50
+ </View>
51
+ <View nativeID="progress_bar" style={{ flex:1 }} onLayout={(ev) => {
52
+ const { width } = ev.nativeEvent.layout;
53
+ setProgressWidth(width)
54
+ }}>
55
+ <FlatList
56
+ data={polls}
57
+ horizontal
58
+ showsHorizontalScrollIndicator={false}
59
+ renderItem={renderProgress}
60
+ />
61
+ </View>
62
+ <View nativeID="questions_answered" style={{ flexDirection:'row', alignItems:'center', margin:5, borderRadius:4, backgroundColor:Colors.utility.warning, padding:5 }}>
63
+ <Icons.ListIcon color={Colors.shades.white} size={12} />
64
+ <Text style={{ marginLeft:5 }} size={12} color={Colors.shades.white} weight='semibold'>{questions_unanswered}</Text>
65
+ </View>
66
+ </View>
67
+ )
68
+ }
69
+
70
+ export default CampaignProgressBar
@@ -0,0 +1,180 @@
1
+ import React from 'react';
2
+ import { FlatList, Image, ScrollView, TouchableOpacity, View } from "react-native"
3
+ import { useEffect, useState } from "react"
4
+ import { PollCampaignApi } from "../api"
5
+ import type { PollCampaignLeaderProps, PollCampaignProps, PollProps, PollResponseProps, PublicPlayerProps } from "../../types"
6
+ import { Button, Icons, Text } from "../../Components"
7
+ import Colors from '../../constants/colors';
8
+
9
+ type CampaignResultProps = {
10
+ poll_campaign:PollCampaignProps,
11
+ polls:PollProps[],
12
+ onShare?:() => void,
13
+ hide_back?:boolean,
14
+ poll_responses:PollResponseProps[],
15
+ onClose: () => void
16
+ }
17
+ const CampaignResult = ({ poll_campaign, polls, poll_responses, hide_back, onClose, onShare } : CampaignResultProps) => {
18
+ const [ leaders_state, setLeadersState ] = useState<{
19
+ loading:boolean,
20
+ offset:number,
21
+ players:PublicPlayerProps[]
22
+ poll_campaign_leaders:PollCampaignLeaderProps[]
23
+ }>({
24
+ loading:false,
25
+ offset:0,
26
+ poll_campaign_leaders:[],
27
+ players: []
28
+ });
29
+ const [ points_expanded, setPointsExpanded ] = useState(false);
30
+
31
+ const { players, poll_campaign_leaders } = leaders_state;
32
+
33
+ useEffect(() => {
34
+ getDataFromServer(poll_campaign.poll_campaign_id, 0)
35
+ },[poll_campaign.poll_campaign_id])
36
+
37
+ const getDataFromServer = async(poll_campaign_id:string, offset:number) => {
38
+ setLeadersState({ ...leaders_state, loading:true })
39
+ const leaders = await PollCampaignApi.getLeadersByCampaignId(poll_campaign_id, offset)
40
+ const player_ids = leaders.map(l => l.player_id);
41
+ const ps = await PollCampaignApi.getPlayersByPlayerIds(player_ids);
42
+ setLeadersState({
43
+ loading:false,
44
+ poll_campaign_leaders: leaders,
45
+ players: ps,
46
+ offset
47
+ })
48
+ }
49
+
50
+ const renderTrophy = (place:number) => {
51
+ switch(place){
52
+ case 1: return <Icons.TrophyIcon color={Colors.incentive.gold} size={16}/>
53
+ case 2: return <Icons.TrophyIcon color={Colors.incentive.silver} size={16}/>
54
+ case 3: return <Icons.TrophyIcon color={Colors.incentive.bronze} size={16}/>
55
+ default: return <></>
56
+ }
57
+ }
58
+
59
+ const renderLeaders = (data: {item:PollCampaignLeaderProps, index:number}) => {
60
+ const player = players.find(p => p.player_id == data.item.player_id);
61
+ if(!player){ return <></> }
62
+ return (
63
+ <View style={{ flexDirection:'row', alignItems:'center', margin:4, padding:10, borderRadius:22, backgroundColor:Colors.shades.white }}>
64
+ <View nativeID="place" style={{ margin:5, height:20, width:20, justifyContent:'center', alignItems:'center', borderRadius:100, borderWidth:1, borderColor:Colors.brand.slate }}>
65
+ <Text size={10} color={Colors.brand.midnight} weight='bold' textAlign="center">{data.index+1}</Text>
66
+ </View>
67
+ <View nativeID="player" style={{ flex:1, flexDirection:'row', alignItems:'center' }}>
68
+ <View nativeID="profile_pic" style={{ marginRight:10 }}>
69
+ <Image
70
+ source={{ uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1689262384/default-avatar_bbkn2t.png' }}
71
+ style={{ height:40, width:40, borderRadius:100 }}
72
+ resizeMode='cover'
73
+ />
74
+ </View>
75
+ <View style={{ flex:1 }} nativeID="name">
76
+ <Text size={14} color={Colors.brand.midnight} weight='bold'>{player.username}</Text>
77
+ <Text style={{ marginTop:3 }} size={12} color={Colors.brand.midnight} weight='regular'>{data.item.winnings.toFixed(2)} Points</Text>
78
+ </View>
79
+ <View>
80
+ {renderTrophy(data.index + 1)}
81
+ </View>
82
+ </View>
83
+ </View>
84
+ )
85
+ }
86
+
87
+
88
+ //const questions_answered = poll_responses.length
89
+ let correct_answers = poll_responses.filter(pr => pr.result_ind == 'win').length
90
+ //let incorrect_answers = poll_responses.filter(pr => pr.result_ind == 'lose').length
91
+ let ungraded_answers = poll_responses.filter(pr => !pr.result_ind).length
92
+ let points_earned = poll_responses.reduce((a,b) => a + b.winnings, 0)
93
+
94
+ return (
95
+ <View style={{ flex:1 }}>
96
+ <ScrollView style={{ flex:1, padding:10, marginBottom:10 }}>
97
+ <TouchableOpacity
98
+ style={{ flexDirection:'row', padding:10, paddingRight:15, paddingLeft:15, borderRadius:22, justifyContent:'center', alignItems:'center', marginBottom:10, backgroundColor:Colors.incentive.gold }}
99
+ onPress={() => {
100
+ if(onShare){ onShare() }
101
+ }}
102
+ >
103
+ <Icons.ShareSocialIcon color={Colors.shades.white} size={14}/>
104
+ <Text style={{ marginLeft:5 }} size={14} color={Colors.shades.white} weight='bold'>Share your results for a chance at a prize!</Text>
105
+ </TouchableOpacity>
106
+ <View nativeID="my_results">
107
+ <Text style={{ margin:10 }} size={16} color={Colors.brand.midnight} weight='bold'>My Results</Text>
108
+ <View style={{borderRadius:22, backgroundColor:Colors.shades.shade100, padding:20}}>
109
+ <View nativeID="completion" style={{ flexDirection: 'row' }}>
110
+ <View nativeID="total_questions" style={{ flex:1 }}>
111
+ <Text size={12} color={Colors.brand.slate} weight='semibold'>TOTAL QUESTIONS</Text>
112
+ <Text style={{ marginTop:5 }} size={16} color={Colors.brand.midnight} weight='bold'>{polls.length} Questions</Text>
113
+ </View>
114
+ <View nativeID="completion_pct" style={{ flex:1 }}>
115
+ <Text size={12} color={Colors.brand.slate} weight='semibold'>COMPLETION</Text>
116
+ <Text style={{ marginTop:5 }} size={16} color={Colors.brand.midnight} weight='bold'>{(((polls.length - ungraded_answers) / polls.length) * 100).toFixed()}%</Text>
117
+ </View>
118
+ </View>
119
+ <View nativeID="performance" style={{ flexDirection: 'row', marginTop:10 }}>
120
+ <View nativeID="total_questions" style={{ flex:1 }}>
121
+ <Text size={12} color={Colors.brand.slate} weight='semibold'>SUCCESS RATE</Text>
122
+ <Text style={{ marginTop:5 }} size={16} color={Colors.brand.midnight} weight='bold'>{((correct_answers / polls.length)*100).toFixed()}%</Text>
123
+ </View>
124
+ <View nativeID="completion_pct" style={{ flex:1 }}>
125
+ <Text size={12} color={Colors.brand.slate} weight='semibold'>POINTS EARNED</Text>
126
+ <Text style={{ marginTop:5 }} size={16} color={Colors.brand.midnight} weight='bold'>{points_earned.toFixed()} Points</Text>
127
+ </View>
128
+ </View>
129
+ <View style={{ borderRadius:22, backgroundColor:Colors.highlights.highlight200Faded, padding:10, marginTop:10 }}>
130
+ <TouchableOpacity style={{ flexDirection:'row', alignItems:'center' }} onPress={() => setPointsExpanded(!points_expanded)}>
131
+ <View style={{ flexDirection:'row', alignItems:'center', flex:1 }}>
132
+ <Icons.AlertIcon color={Colors.brand.midnight} size={14}/>
133
+ <Text style={{ marginLeft:5 }} size={14} color={Colors.brand.midnight} weight='semibold'>How are points calculated?</Text>
134
+ </View>
135
+ <Icons.ChevronIcon direction={points_expanded ? 'up' : 'down'} color={Colors.brand.midnight}/>
136
+ </TouchableOpacity>
137
+ {points_expanded ?
138
+ <>
139
+ <Text size={12} color={Colors.brand.midnight} style={{ marginTop:10 }} weight='regular'>Points are calculated based on the total responses by all participants. Each response is worth 1 point. The responders that selected the winning option will split the total point pool.</Text>
140
+ <Text size={12} color={Colors.brand.midnight} style={{ marginTop:5 }} weight='regular'>Therefore, points earned will not be updated until the question is closed!</Text>
141
+ </>
142
+ :<></>}
143
+ </View>
144
+ </View>
145
+ </View>
146
+ <View nativeID="leader_header" style={{ margin:10, flexDirection:'row', alignItems:'center' }}>
147
+ <Text style={{ flex:1 }} size={16} color={Colors.brand.midnight} weight='bold'>Leaderboard</Text>
148
+ <View style={{ borderRadius:22, padding:10, backgroundColor:Colors.accents.accent100 }}>
149
+ <Text size={14} color={Colors.brand.midnight} weight='regular' textAlign="center">{poll_campaign.total_responders} Participants</Text>
150
+ </View>
151
+ </View>
152
+ <View nativeID="leaderboard" style={{ flex:1, borderTopRightRadius:22, borderTopLeftRadius:22, padding:10, backgroundColor:Colors.shades.shade100}}>
153
+ {poll_campaign.status == 'active' ?
154
+ <Text size={12} color={Colors.utility.warning} textAlign="center">Points change as new responses come in</Text>
155
+ :<></>}
156
+ <FlatList
157
+ data={poll_campaign_leaders}
158
+ renderItem={renderLeaders}
159
+ keyExtractor={((item) => item.player_id.toString())}
160
+ />
161
+ </View>
162
+ </ScrollView>
163
+ {!hide_back ?
164
+ <View nativeID="result_actions" style={{ marginTop:5, padding:10 }}>
165
+ <Button
166
+ title='Go Back'
167
+ title_color={Colors.brand.electric}
168
+ borderWidth={1}
169
+ padding={14}
170
+ borderColor={Colors.brand.electric}
171
+ onPress={() => onClose()}
172
+ borderRadius={22}
173
+ />
174
+ </View>
175
+ :<></>}
176
+ </View>
177
+ )
178
+ }
179
+
180
+ export default CampaignResult
@@ -0,0 +1,96 @@
1
+ import { ActivityIndicator, FlatList, ScrollView, View } from "react-native"
2
+
3
+ import React, { useEffect, useState } from "react"
4
+
5
+ import PollCampaignCard from "./PollCampaignCard";
6
+ import type { PollCampaignProps } from "../../types";
7
+ import { PollCampaignApi } from "../api";
8
+ import { Button, Text } from "../../Components";
9
+ import Colors from "../../constants/colors";
10
+ import moment from "moment-mini";
11
+
12
+ type CampaignSelectorProps = {
13
+ company_short_name:string,
14
+ onCampaignSelect:(poll_campaign: PollCampaignProps) => void;
15
+ }
16
+
17
+ const CampaignSelector = ({ company_short_name, onCampaignSelect } : CampaignSelectorProps ) => {
18
+ const [ data, setData ] = useState<{
19
+ loading:boolean,
20
+ campaign_offset:number,
21
+ poll_campaigns:PollCampaignProps[]
22
+ }>({
23
+ loading:false,
24
+ campaign_offset:0,
25
+ poll_campaigns:[]
26
+ })
27
+ const [ selected_campaign, setSelectedCampaign ] = useState<PollCampaignProps | undefined>(undefined);
28
+ //Poll campaigns from redux store
29
+ const { loading, poll_campaigns } = data;
30
+
31
+ useEffect(() => {
32
+ getPollCampaignFromServer(company_short_name, 0)
33
+ },[company_short_name])
34
+
35
+ const getPollCampaignFromServer = async(code:string, offset:number) => {
36
+ setData({ ...data, loading:false });
37
+ const pcs = await PollCampaignApi.getPollCampaignsByCompanyCode(code, offset, 'active');
38
+ setData({
39
+ ...data,
40
+ campaign_offset:offset,
41
+ poll_campaigns: pcs
42
+ })
43
+ }
44
+
45
+
46
+ const renderPollCampaigns = (data:{ item:PollCampaignProps, index:number }) => {
47
+ const selected = selected_campaign?.poll_campaign_id == data.item.poll_campaign_id ? true : false
48
+ return (
49
+ <View style={{ margin:10, width:125 }}>
50
+ <PollCampaignCard
51
+ selected={selected}
52
+ poll_campaign={data.item}
53
+ onSelect={(poll_campaign) => {
54
+ if(selected){ setSelectedCampaign(undefined) } else { setSelectedCampaign(poll_campaign) }
55
+ }}
56
+ />
57
+ </View>
58
+ )
59
+ }
60
+
61
+ return (
62
+ <View style={{ flex:1, backgroundColor:Colors.shades.white, borderRadius:22 }}>
63
+ <ScrollView style={{ flex:1 }}>
64
+ <Text style={{ padding:10 }} textAlign="center" size={24} color={Colors.brand.midnight} weight='bold'>Select One!</Text>
65
+ <View nativeID="poll_campaigns" style={{ alignItems:'center' }}>
66
+ <FlatList
67
+ numColumns={2}
68
+ data={poll_campaigns.sort((a,b) => moment(b.create_datetime).unix() - moment(a.create_datetime).unix())}
69
+ renderItem={renderPollCampaigns}
70
+ />
71
+ {loading ?
72
+ <View style={{ padding:20 }}>
73
+ <ActivityIndicator style={{ alignSelf:'center' }} size='large' color={Colors.brand.midnight} />
74
+ </View>
75
+ :<></>}
76
+ </View>
77
+ </ScrollView>
78
+ <View style={{ padding:10, borderRadius:22 }}>
79
+ <Button
80
+ padding={10}
81
+ disabled={selected_campaign?false:true}
82
+ title={!selected_campaign?'Select Campaign':`Lets Go!`}
83
+ title_color={Colors.shades.white}
84
+ backgroundColor={selected_campaign ? Colors.brand.midnight : Colors.brand.slate}
85
+ borderRadius={22}
86
+ onPress={() => {
87
+ if(!selected_campaign){ return }
88
+ onCampaignSelect(selected_campaign)
89
+ }}
90
+ />
91
+ </View>
92
+ </View>
93
+ )
94
+ }
95
+
96
+ export default CampaignSelector
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { Image, TouchableOpacity, View } from "react-native"
3
+ import type { PollCampaignProps } from "../../types"
4
+ import { Text } from '../../Components';
5
+ import Colors from '../../constants/colors';
6
+
7
+ type PollCampaignCardProps = {
8
+ poll_campaign: PollCampaignProps,
9
+ selected?:boolean,
10
+ onSelect: (poll_campaign:PollCampaignProps) => void
11
+ }
12
+
13
+ const PollCampaignCard = ({ poll_campaign, onSelect, selected }: PollCampaignCardProps) => {
14
+
15
+ return (
16
+ <TouchableOpacity style={{ flex:1, padding:10, borderRadius:22, backgroundColor:selected?Colors.brand.midnight:Colors.shades.shade100 }}
17
+ onPress={() => onSelect(poll_campaign)}>
18
+ <View nativeID='campaign_details'>
19
+ {poll_campaign.campaign_image?.url?
20
+ <View style={{ justifyContent:'center', alignItems:'center', marginBottom:10 }}>
21
+ <Image
22
+ source={{ uri: poll_campaign.campaign_image.url }}
23
+ style={{ height:35, width:50, borderRadius:8 }}
24
+ />
25
+ </View>
26
+ :<></>}
27
+ <Text textAlign="center" size={12} color={selected?Colors.shades.white:Colors.brand.midnight} weight='bold'>{poll_campaign.name}</Text>
28
+ <Text style={{ marginTop:5 }} textAlign="center" size={10} color={selected?Colors.shades.white:Colors.brand.midnight} weight='bold'>{poll_campaign.campaign_type.toUpperCase()}</Text>
29
+ <Text style={{ marginTop:5 }} textAlign="center" size={10} color={selected?Colors.shades.white:Colors.brand.midnight} weight='regular'>{poll_campaign.total_polls??0} Questions</Text>
30
+ </View>
31
+ </TouchableOpacity>
32
+ )
33
+ }
34
+
35
+ export default PollCampaignCard