be-components 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (432) hide show
  1. package/lib/commonjs/ApiOverrides/index.js +18 -0
  2. package/lib/commonjs/ApiOverrides/index.js.map +1 -1
  3. package/lib/commonjs/Authenticator/index.js.map +1 -1
  4. package/lib/commonjs/Checkout/api/index.js.map +1 -1
  5. package/lib/commonjs/Checkout/index.js.map +1 -1
  6. package/lib/commonjs/Competition/api/index.js +655 -0
  7. package/lib/commonjs/Competition/api/index.js.map +1 -0
  8. package/lib/commonjs/Competition/components/AthleteMarketCard.js +168 -0
  9. package/lib/commonjs/Competition/components/AthleteMarketCard.js.map +1 -0
  10. package/lib/commonjs/Competition/components/CompetitionCard.js +180 -0
  11. package/lib/commonjs/Competition/components/CompetitionCard.js.map +1 -0
  12. package/lib/commonjs/Competition/components/CompetitionInfoCard.js +264 -0
  13. package/lib/commonjs/Competition/components/CompetitionInfoCard.js.map +1 -0
  14. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js +281 -0
  15. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js.map +1 -0
  16. package/lib/commonjs/Competition/components/CompetitionPlay.js +1269 -0
  17. package/lib/commonjs/Competition/components/CompetitionPlay.js.map +1 -0
  18. package/lib/commonjs/Competition/components/CompetitionSeasonCard.js +111 -0
  19. package/lib/commonjs/Competition/components/CompetitionSeasonCard.js.map +1 -0
  20. package/lib/commonjs/Competition/components/CompetitionSelector.js +122 -0
  21. package/lib/commonjs/Competition/components/CompetitionSelector.js.map +1 -0
  22. package/lib/commonjs/Competition/components/CompetitionTypeCard.js +380 -0
  23. package/lib/commonjs/Competition/components/CompetitionTypeCard.js.map +1 -0
  24. package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js +237 -0
  25. package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js.map +1 -0
  26. package/lib/commonjs/Competition/components/LeaderPicks.js +322 -0
  27. package/lib/commonjs/Competition/components/LeaderPicks.js.map +1 -0
  28. package/lib/commonjs/Competition/components/ManageSeasonForm.js +605 -0
  29. package/lib/commonjs/Competition/components/ManageSeasonForm.js.map +1 -0
  30. package/lib/commonjs/Competition/components/MarketsCard.js +148 -0
  31. package/lib/commonjs/Competition/components/MarketsCard.js.map +1 -0
  32. package/lib/commonjs/Competition/components/MatchMarketCard.js +199 -0
  33. package/lib/commonjs/Competition/components/MatchMarketCard.js.map +1 -0
  34. package/lib/commonjs/Competition/components/NavOutPrompt.js +159 -0
  35. package/lib/commonjs/Competition/components/NavOutPrompt.js.map +1 -0
  36. package/lib/commonjs/Competition/components/SeasonInfoModal.js +400 -0
  37. package/lib/commonjs/Competition/components/SeasonInfoModal.js.map +1 -0
  38. package/lib/commonjs/Competition/components/TeamEventCard.js +217 -0
  39. package/lib/commonjs/Competition/components/TeamEventCard.js.map +1 -0
  40. package/lib/commonjs/Competition/components/WagerPickForm.js +278 -0
  41. package/lib/commonjs/Competition/components/WagerPickForm.js.map +1 -0
  42. package/lib/commonjs/Competition/index.js +42 -0
  43. package/lib/commonjs/Competition/index.js.map +1 -0
  44. package/lib/commonjs/Components/Icons.js.map +1 -1
  45. package/lib/commonjs/Components/Jerseys.js +713 -0
  46. package/lib/commonjs/Components/Jerseys.js.map +1 -0
  47. package/lib/commonjs/Components/LinearDiagnal.js +1 -1
  48. package/lib/commonjs/Components/LinearDiagnal.js.map +1 -1
  49. package/lib/commonjs/Components/Switch.js +81 -0
  50. package/lib/commonjs/Components/Switch.js.map +1 -0
  51. package/lib/commonjs/Components/index.js +14 -0
  52. package/lib/commonjs/Components/index.js.map +1 -1
  53. package/lib/commonjs/Observer/api/index.js +3 -0
  54. package/lib/commonjs/Observer/api/index.js.map +1 -1
  55. package/lib/commonjs/Poll/api/index.js +240 -0
  56. package/lib/commonjs/Poll/api/index.js.map +1 -0
  57. package/lib/commonjs/Poll/components/CampaignPlay.js +553 -0
  58. package/lib/commonjs/Poll/components/CampaignPlay.js.map +1 -0
  59. package/lib/commonjs/Poll/components/CampaignProgressBar.js +118 -0
  60. package/lib/commonjs/Poll/components/CampaignProgressBar.js.map +1 -0
  61. package/lib/commonjs/Poll/components/CampaignResult.js +382 -0
  62. package/lib/commonjs/Poll/components/CampaignResult.js.map +1 -0
  63. package/lib/commonjs/Poll/components/CampaignSelector.js +124 -0
  64. package/lib/commonjs/Poll/components/CampaignSelector.js.map +1 -0
  65. package/lib/commonjs/Poll/components/PollCampaignCard.js +66 -0
  66. package/lib/commonjs/Poll/components/PollCampaignCard.js.map +1 -0
  67. package/lib/commonjs/Poll/components/PollCard.js +480 -0
  68. package/lib/commonjs/Poll/components/PollCard.js.map +1 -0
  69. package/lib/commonjs/Poll/components/PollOptionCard.js +158 -0
  70. package/lib/commonjs/Poll/components/PollOptionCard.js.map +1 -0
  71. package/lib/commonjs/Poll/components/PollSelectCard.js +189 -0
  72. package/lib/commonjs/Poll/components/PollSelectCard.js.map +1 -0
  73. package/lib/commonjs/Poll/components/ResponseTimer.js +48 -0
  74. package/lib/commonjs/Poll/components/ResponseTimer.js.map +1 -0
  75. package/lib/commonjs/Poll/components/WidgetHeader.js +83 -0
  76. package/lib/commonjs/Poll/components/WidgetHeader.js.map +1 -0
  77. package/lib/commonjs/Poll/index.js +31 -0
  78. package/lib/commonjs/Poll/index.js.map +1 -0
  79. package/lib/commonjs/ProfileManager/Components/BasicInfoManager.js.map +1 -1
  80. package/lib/commonjs/ProfileManager/Components/BasicStatus.js.map +1 -1
  81. package/lib/commonjs/ProfileManager/Components/CodeRedeem.js +3 -1
  82. package/lib/commonjs/ProfileManager/Components/CodeRedeem.js.map +1 -1
  83. package/lib/commonjs/ProfileManager/Components/DOBManager.js.map +1 -1
  84. package/lib/commonjs/ProfileManager/Components/EmailManager.js.map +1 -1
  85. package/lib/commonjs/ProfileManager/Components/PasswordManager.js.map +1 -1
  86. package/lib/commonjs/ProfileManager/Components/PhoneManager.js.map +1 -1
  87. package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  88. package/lib/commonjs/ProfileManager/Components/ProfileWelcome.js.map +1 -1
  89. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js +5 -0
  90. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js.map +1 -1
  91. package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
  92. package/lib/commonjs/ProfileManager/index.js +2 -0
  93. package/lib/commonjs/ProfileManager/index.js.map +1 -1
  94. package/lib/commonjs/Wallet/api/index.js +4 -1
  95. package/lib/commonjs/Wallet/api/index.js.map +1 -1
  96. package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -1
  97. package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -1
  98. package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -1
  99. package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -1
  100. package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -1
  101. package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
  102. package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
  103. package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
  104. package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -1
  105. package/lib/commonjs/Wallet/components/WalletSettings.js.map +1 -1
  106. package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
  107. package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -1
  108. package/lib/commonjs/Wallet/index.js.map +1 -1
  109. package/lib/commonjs/index.js +14 -0
  110. package/lib/commonjs/index.js.map +1 -1
  111. package/lib/module/ApiOverrides/index.js +18 -0
  112. package/lib/module/ApiOverrides/index.js.map +1 -1
  113. package/lib/module/Authenticator/index.js.map +1 -1
  114. package/lib/module/Checkout/api/index.js.map +1 -1
  115. package/lib/module/Checkout/index.js.map +1 -1
  116. package/lib/module/Competition/api/index.js +649 -0
  117. package/lib/module/Competition/api/index.js.map +1 -0
  118. package/lib/module/Competition/components/AthleteMarketCard.js +161 -0
  119. package/lib/module/Competition/components/AthleteMarketCard.js.map +1 -0
  120. package/lib/module/Competition/components/CompetitionCard.js +173 -0
  121. package/lib/module/Competition/components/CompetitionCard.js.map +1 -0
  122. package/lib/module/Competition/components/CompetitionInfoCard.js +257 -0
  123. package/lib/module/Competition/components/CompetitionInfoCard.js.map +1 -0
  124. package/lib/module/Competition/components/CompetitionLeaderboard.js +272 -0
  125. package/lib/module/Competition/components/CompetitionLeaderboard.js.map +1 -0
  126. package/lib/module/Competition/components/CompetitionPlay.js +1260 -0
  127. package/lib/module/Competition/components/CompetitionPlay.js.map +1 -0
  128. package/lib/module/Competition/components/CompetitionSeasonCard.js +104 -0
  129. package/lib/module/Competition/components/CompetitionSeasonCard.js.map +1 -0
  130. package/lib/module/Competition/components/CompetitionSelector.js +113 -0
  131. package/lib/module/Competition/components/CompetitionSelector.js.map +1 -0
  132. package/lib/module/Competition/components/CompetitionTypeCard.js +371 -0
  133. package/lib/module/Competition/components/CompetitionTypeCard.js.map +1 -0
  134. package/lib/module/Competition/components/EnterCompetitionPrompt.js +228 -0
  135. package/lib/module/Competition/components/EnterCompetitionPrompt.js.map +1 -0
  136. package/lib/module/Competition/components/LeaderPicks.js +313 -0
  137. package/lib/module/Competition/components/LeaderPicks.js.map +1 -0
  138. package/lib/module/Competition/components/ManageSeasonForm.js +596 -0
  139. package/lib/module/Competition/components/ManageSeasonForm.js.map +1 -0
  140. package/lib/module/Competition/components/MarketsCard.js +139 -0
  141. package/lib/module/Competition/components/MarketsCard.js.map +1 -0
  142. package/lib/module/Competition/components/MatchMarketCard.js +192 -0
  143. package/lib/module/Competition/components/MatchMarketCard.js.map +1 -0
  144. package/lib/module/Competition/components/NavOutPrompt.js +152 -0
  145. package/lib/module/Competition/components/NavOutPrompt.js.map +1 -0
  146. package/lib/module/Competition/components/SeasonInfoModal.js +391 -0
  147. package/lib/module/Competition/components/SeasonInfoModal.js.map +1 -0
  148. package/lib/module/Competition/components/TeamEventCard.js +210 -0
  149. package/lib/module/Competition/components/TeamEventCard.js.map +1 -0
  150. package/lib/module/Competition/components/WagerPickForm.js +269 -0
  151. package/lib/module/Competition/components/WagerPickForm.js.map +1 -0
  152. package/lib/module/Competition/index.js +33 -0
  153. package/lib/module/Competition/index.js.map +1 -0
  154. package/lib/module/Components/Icons.js.map +1 -1
  155. package/lib/module/Components/Jerseys.js +705 -0
  156. package/lib/module/Components/Jerseys.js.map +1 -0
  157. package/lib/module/Components/LinearDiagnal.js +2 -3
  158. package/lib/module/Components/LinearDiagnal.js.map +1 -1
  159. package/lib/module/Components/Switch.js +74 -0
  160. package/lib/module/Components/Switch.js.map +1 -0
  161. package/lib/module/Components/index.js +3 -1
  162. package/lib/module/Components/index.js.map +1 -1
  163. package/lib/module/Observer/api/index.js +3 -0
  164. package/lib/module/Observer/api/index.js.map +1 -1
  165. package/lib/module/Poll/api/index.js +234 -0
  166. package/lib/module/Poll/api/index.js.map +1 -0
  167. package/lib/module/Poll/components/CampaignPlay.js +545 -0
  168. package/lib/module/Poll/components/CampaignPlay.js.map +1 -0
  169. package/lib/module/Poll/components/CampaignProgressBar.js +110 -0
  170. package/lib/module/Poll/components/CampaignProgressBar.js.map +1 -0
  171. package/lib/module/Poll/components/CampaignResult.js +374 -0
  172. package/lib/module/Poll/components/CampaignResult.js.map +1 -0
  173. package/lib/module/Poll/components/CampaignSelector.js +115 -0
  174. package/lib/module/Poll/components/CampaignSelector.js.map +1 -0
  175. package/lib/module/Poll/components/PollCampaignCard.js +59 -0
  176. package/lib/module/Poll/components/PollCampaignCard.js.map +1 -0
  177. package/lib/module/Poll/components/PollCard.js +472 -0
  178. package/lib/module/Poll/components/PollCard.js.map +1 -0
  179. package/lib/module/Poll/components/PollOptionCard.js +149 -0
  180. package/lib/module/Poll/components/PollOptionCard.js.map +1 -0
  181. package/lib/module/Poll/components/PollSelectCard.js +182 -0
  182. package/lib/module/Poll/components/PollSelectCard.js.map +1 -0
  183. package/lib/module/Poll/components/ResponseTimer.js +39 -0
  184. package/lib/module/Poll/components/ResponseTimer.js.map +1 -0
  185. package/lib/module/Poll/components/WidgetHeader.js +76 -0
  186. package/lib/module/Poll/components/WidgetHeader.js.map +1 -0
  187. package/lib/module/Poll/index.js +22 -0
  188. package/lib/module/Poll/index.js.map +1 -0
  189. package/lib/module/ProfileManager/Components/BasicInfoManager.js.map +1 -1
  190. package/lib/module/ProfileManager/Components/BasicStatus.js.map +1 -1
  191. package/lib/module/ProfileManager/Components/CodeRedeem.js +3 -1
  192. package/lib/module/ProfileManager/Components/CodeRedeem.js.map +1 -1
  193. package/lib/module/ProfileManager/Components/DOBManager.js.map +1 -1
  194. package/lib/module/ProfileManager/Components/EmailManager.js.map +1 -1
  195. package/lib/module/ProfileManager/Components/PasswordManager.js.map +1 -1
  196. package/lib/module/ProfileManager/Components/PhoneManager.js.map +1 -1
  197. package/lib/module/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  198. package/lib/module/ProfileManager/Components/ProfileWelcome.js.map +1 -1
  199. package/lib/module/ProfileManager/Components/ProfileWizard.js +5 -0
  200. package/lib/module/ProfileManager/Components/ProfileWizard.js.map +1 -1
  201. package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
  202. package/lib/module/ProfileManager/index.js +2 -0
  203. package/lib/module/ProfileManager/index.js.map +1 -1
  204. package/lib/module/Wallet/api/index.js +4 -1
  205. package/lib/module/Wallet/api/index.js.map +1 -1
  206. package/lib/module/Wallet/components/ACHAddCard.js.map +1 -1
  207. package/lib/module/Wallet/components/AddressManager.js.map +1 -1
  208. package/lib/module/Wallet/components/DepositCard.js.map +1 -1
  209. package/lib/module/Wallet/components/FundAccountCard.js.map +1 -1
  210. package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -1
  211. package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
  212. package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
  213. package/lib/module/Wallet/components/MyBalance.js.map +1 -1
  214. package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -1
  215. package/lib/module/Wallet/components/WalletSettings.js.map +1 -1
  216. package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
  217. package/lib/module/Wallet/components/WithdrawCard.js.map +1 -1
  218. package/lib/module/Wallet/index.js.map +1 -1
  219. package/lib/module/index.js +3 -1
  220. package/lib/module/index.js.map +1 -1
  221. package/lib/typescript/src/ApiOverrides/index.d.ts +1 -0
  222. package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
  223. package/lib/typescript/src/Authenticator/api/index.d.ts +2 -2
  224. package/lib/typescript/src/Authenticator/api/index.d.ts.map +1 -1
  225. package/lib/typescript/src/Authenticator/index.d.ts.map +1 -1
  226. package/lib/typescript/src/Checkout/api/index.d.ts +1 -2
  227. package/lib/typescript/src/Checkout/api/index.d.ts.map +1 -1
  228. package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
  229. package/lib/typescript/src/Competition/api/index.d.ts +128 -0
  230. package/lib/typescript/src/Competition/api/index.d.ts.map +1 -0
  231. package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts +19 -0
  232. package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts.map +1 -0
  233. package/lib/typescript/src/Competition/components/CompetitionCard.d.ts +12 -0
  234. package/lib/typescript/src/Competition/components/CompetitionCard.d.ts.map +1 -0
  235. package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts +16 -0
  236. package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts.map +1 -0
  237. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts +14 -0
  238. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts.map +1 -0
  239. package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts +20 -0
  240. package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts.map +1 -0
  241. package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts +10 -0
  242. package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts.map +1 -0
  243. package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts +11 -0
  244. package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts.map +1 -0
  245. package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts +14 -0
  246. package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts.map +1 -0
  247. package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts +16 -0
  248. package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts.map +1 -0
  249. package/lib/typescript/src/Competition/components/LeaderPicks.d.ts +22 -0
  250. package/lib/typescript/src/Competition/components/LeaderPicks.d.ts.map +1 -0
  251. package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts +10 -0
  252. package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts.map +1 -0
  253. package/lib/typescript/src/Competition/components/MarketsCard.d.ts +15 -0
  254. package/lib/typescript/src/Competition/components/MarketsCard.d.ts.map +1 -0
  255. package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts +21 -0
  256. package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts.map +1 -0
  257. package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts +23 -0
  258. package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts.map +1 -0
  259. package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts +14 -0
  260. package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts.map +1 -0
  261. package/lib/typescript/src/Competition/components/TeamEventCard.d.ts +17 -0
  262. package/lib/typescript/src/Competition/components/TeamEventCard.d.ts.map +1 -0
  263. package/lib/typescript/src/Competition/components/WagerPickForm.d.ts +15 -0
  264. package/lib/typescript/src/Competition/components/WagerPickForm.d.ts.map +1 -0
  265. package/lib/typescript/src/Competition/index.d.ts +11 -0
  266. package/lib/typescript/src/Competition/index.d.ts.map +1 -0
  267. package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
  268. package/lib/typescript/src/Components/Jerseys.d.ts +16 -0
  269. package/lib/typescript/src/Components/Jerseys.d.ts.map +1 -0
  270. package/lib/typescript/src/Components/LinearDiagnal.d.ts.map +1 -1
  271. package/lib/typescript/src/Components/Switch.d.ts +9 -0
  272. package/lib/typescript/src/Components/Switch.d.ts.map +1 -0
  273. package/lib/typescript/src/Components/index.d.ts +3 -1
  274. package/lib/typescript/src/Components/index.d.ts.map +1 -1
  275. package/lib/typescript/src/Observer/api/index.d.ts.map +1 -1
  276. package/lib/typescript/src/Poll/api/index.d.ts +61 -0
  277. package/lib/typescript/src/Poll/api/index.d.ts.map +1 -0
  278. package/lib/typescript/src/Poll/components/CampaignPlay.d.ts +14 -0
  279. package/lib/typescript/src/Poll/components/CampaignPlay.d.ts.map +1 -0
  280. package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts +12 -0
  281. package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts.map +1 -0
  282. package/lib/typescript/src/Poll/components/CampaignResult.d.ts +13 -0
  283. package/lib/typescript/src/Poll/components/CampaignResult.d.ts.map +1 -0
  284. package/lib/typescript/src/Poll/components/CampaignSelector.d.ts +9 -0
  285. package/lib/typescript/src/Poll/components/CampaignSelector.d.ts.map +1 -0
  286. package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts +10 -0
  287. package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts.map +1 -0
  288. package/lib/typescript/src/Poll/components/PollCard.d.ts +16 -0
  289. package/lib/typescript/src/Poll/components/PollCard.d.ts.map +1 -0
  290. package/lib/typescript/src/Poll/components/PollOptionCard.d.ts +14 -0
  291. package/lib/typescript/src/Poll/components/PollOptionCard.d.ts.map +1 -0
  292. package/lib/typescript/src/Poll/components/PollSelectCard.d.ts +16 -0
  293. package/lib/typescript/src/Poll/components/PollSelectCard.d.ts.map +1 -0
  294. package/lib/typescript/src/Poll/components/ResponseTimer.d.ts +9 -0
  295. package/lib/typescript/src/Poll/components/ResponseTimer.d.ts.map +1 -0
  296. package/lib/typescript/src/Poll/components/WidgetHeader.d.ts +13 -0
  297. package/lib/typescript/src/Poll/components/WidgetHeader.d.ts.map +1 -0
  298. package/lib/typescript/src/Poll/index.d.ts +7 -0
  299. package/lib/typescript/src/Poll/index.d.ts.map +1 -0
  300. package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts +1 -1
  301. package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
  302. package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts +1 -2
  303. package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
  304. package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts +9 -2
  305. package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
  306. package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts +1 -1
  307. package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts.map +1 -1
  308. package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts +1 -1
  309. package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts.map +1 -1
  310. package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts +1 -1
  311. package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
  312. package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts +1 -1
  313. package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
  314. package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts +1 -1
  315. package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
  316. package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts +1 -2
  317. package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
  318. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts +10 -3
  319. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
  320. package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts +2 -2
  321. package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
  322. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts +1 -2
  323. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  324. package/lib/typescript/src/ProfileManager/api/index.d.ts +2 -2
  325. package/lib/typescript/src/ProfileManager/api/index.d.ts.map +1 -1
  326. package/lib/typescript/src/ProfileManager/index.d.ts +9 -2
  327. package/lib/typescript/src/ProfileManager/index.d.ts.map +1 -1
  328. package/lib/typescript/src/Wallet/api/index.d.ts +2 -3
  329. package/lib/typescript/src/Wallet/api/index.d.ts.map +1 -1
  330. package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts +1 -2
  331. package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -1
  332. package/lib/typescript/src/Wallet/components/AddressManager.d.ts +1 -2
  333. package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -1
  334. package/lib/typescript/src/Wallet/components/DepositCard.d.ts +1 -2
  335. package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -1
  336. package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts +1 -2
  337. package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -1
  338. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts +1 -2
  339. package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -1
  340. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts +1 -2
  341. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
  342. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts +1 -2
  343. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -1
  344. package/lib/typescript/src/Wallet/components/MyBalance.d.ts +1 -2
  345. package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
  346. package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts +1 -2
  347. package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -1
  348. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts +1 -2
  349. package/lib/typescript/src/Wallet/components/WalletSettings.d.ts.map +1 -1
  350. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts +1 -2
  351. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
  352. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts +1 -2
  353. package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -1
  354. package/lib/typescript/src/Wallet/index.d.ts +1 -2
  355. package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
  356. package/lib/typescript/src/index.d.ts +3 -1
  357. package/lib/typescript/src/index.d.ts.map +1 -1
  358. package/package.json +1 -1
  359. package/src/ApiOverrides/index.ts +19 -0
  360. package/src/Authenticator/api/index.ts +2 -2
  361. package/src/Authenticator/api/types.d.ts +1 -25
  362. package/src/Authenticator/index.tsx +2 -1
  363. package/src/Checkout/api/index.tsx +1 -2
  364. package/src/Checkout/index.tsx +1 -2
  365. package/src/Competition/api/index.ts +568 -0
  366. package/src/Competition/components/AthleteMarketCard.tsx +116 -0
  367. package/src/Competition/components/CompetitionCard.tsx +82 -0
  368. package/src/Competition/components/CompetitionInfoCard.tsx +149 -0
  369. package/src/Competition/components/CompetitionLeaderboard.tsx +183 -0
  370. package/src/Competition/components/CompetitionPlay.tsx +936 -0
  371. package/src/Competition/components/CompetitionSeasonCard.tsx +48 -0
  372. package/src/Competition/components/CompetitionSelector.tsx +91 -0
  373. package/src/Competition/components/CompetitionTypeCard.tsx +211 -0
  374. package/src/Competition/components/EnterCompetitionPrompt.tsx +127 -0
  375. package/src/Competition/components/LeaderPicks.tsx +214 -0
  376. package/src/Competition/components/ManageSeasonForm.tsx +271 -0
  377. package/src/Competition/components/MarketsCard.tsx +108 -0
  378. package/src/Competition/components/MatchMarketCard.tsx +126 -0
  379. package/src/Competition/components/NavOutPrompt.tsx +87 -0
  380. package/src/Competition/components/SeasonInfoModal.tsx +212 -0
  381. package/src/Competition/components/TeamEventCard.tsx +136 -0
  382. package/src/Competition/components/WagerPickForm.tsx +114 -0
  383. package/src/Competition/index.tsx +36 -0
  384. package/src/Components/Icons.tsx +0 -2
  385. package/src/Components/Jerseys.tsx +268 -0
  386. package/src/Components/LinearDiagnal.tsx +2 -3
  387. package/src/Components/Switch.tsx +55 -0
  388. package/src/Components/index.tsx +5 -1
  389. package/src/Observer/api/index.ts +1 -0
  390. package/src/Poll/api/index.ts +178 -0
  391. package/src/Poll/components/CampaignPlay.tsx +407 -0
  392. package/src/Poll/components/CampaignProgressBar.tsx +70 -0
  393. package/src/Poll/components/CampaignResult.tsx +180 -0
  394. package/src/Poll/components/CampaignSelector.tsx +96 -0
  395. package/src/Poll/components/PollCampaignCard.tsx +35 -0
  396. package/src/Poll/components/PollCard.tsx +335 -0
  397. package/src/Poll/components/PollOptionCard.tsx +110 -0
  398. package/src/Poll/components/PollSelectCard.tsx +106 -0
  399. package/src/Poll/components/ResponseTimer.tsx +37 -0
  400. package/src/Poll/components/WidgetHeader.tsx +46 -0
  401. package/src/Poll/index.tsx +25 -0
  402. package/src/ProfileManager/Components/BasicInfoManager.tsx +1 -1
  403. package/src/ProfileManager/Components/BasicStatus.tsx +1 -2
  404. package/src/ProfileManager/Components/CodeRedeem.tsx +10 -3
  405. package/src/ProfileManager/Components/DOBManager.tsx +1 -1
  406. package/src/ProfileManager/Components/EmailManager.tsx +1 -1
  407. package/src/ProfileManager/Components/PasswordManager.tsx +2 -1
  408. package/src/ProfileManager/Components/PhoneManager.tsx +1 -1
  409. package/src/ProfileManager/Components/ProfilePicManager.tsx +1 -1
  410. package/src/ProfileManager/Components/ProfileWelcome.tsx +1 -2
  411. package/src/ProfileManager/Components/ProfileWizard.tsx +14 -3
  412. package/src/ProfileManager/Components/SettingsManager.tsx +2 -2
  413. package/src/ProfileManager/Components/VouchCard.tsx +1 -2
  414. package/src/ProfileManager/api/index.ts +2 -2
  415. package/src/ProfileManager/api/types.d.ts +0 -35
  416. package/src/ProfileManager/index.tsx +11 -3
  417. package/src/Wallet/api/index.ts +6 -4
  418. package/src/Wallet/components/ACHAddCard.tsx +1 -2
  419. package/src/Wallet/components/AddressManager.tsx +1 -2
  420. package/src/Wallet/components/DepositCard.tsx +1 -2
  421. package/src/Wallet/components/FundAccountCard.tsx +1 -2
  422. package/src/Wallet/components/ManageAccountCard.tsx +1 -2
  423. package/src/Wallet/components/ManualACHAdd.tsx +1 -2
  424. package/src/Wallet/components/ManualCardAdd.tsx +1 -2
  425. package/src/Wallet/components/MyBalance.tsx +1 -2
  426. package/src/Wallet/components/WalletActionSelector.tsx +1 -2
  427. package/src/Wallet/components/WalletSettings.tsx +1 -2
  428. package/src/Wallet/components/WalletSetup.tsx +1 -2
  429. package/src/Wallet/components/WithdrawCard.tsx +1 -2
  430. package/src/Wallet/index.tsx +1 -2
  431. package/src/index.tsx +5 -2
  432. package/src/types.d.ts +483 -0
@@ -0,0 +1,545 @@
1
+ import React from 'react';
2
+ import { useEffect, useState } from 'react';
3
+ import { ActivityIndicator, FlatList, Image, ScrollView, TouchableOpacity, View } from 'react-native';
4
+ import Colors from '../../constants/colors';
5
+ import PollCard from './PollCard';
6
+ import CampaignProgressBar from './CampaignProgressBar';
7
+ import CampaignResult from './CampaignResult';
8
+ import PollSelectCard from './PollSelectCard';
9
+ import { PollApi, PollCampaignApi, PollCampaignHelpers, PollResponseApi } from '../api';
10
+ import { Button, Icons, Text } from '../../Components';
11
+ const CampaignPlay = ({
12
+ player_id,
13
+ poll_campaign_id,
14
+ onActiveViewChange,
15
+ onRequestAuthenticate,
16
+ onFinished,
17
+ init_view,
18
+ init_poll_id
19
+ }) => {
20
+ //const [ show_authenticate, setShowAuthenticate ] = useState(false);
21
+ const [campaign_data, setCampaignData] = useState({
22
+ polls: [],
23
+ my_responses: []
24
+ });
25
+ const [loading, setLoading] = useState(false);
26
+ //const [ shareImage, setImage ] = useState<any>(undefined)
27
+ const [share_in_process] = useState(false);
28
+ const [play_width, setPlayWidth] = useState(0);
29
+ const [show_live, setShowLive] = useState(false);
30
+ const [active_poll, setActivePoll] = useState(undefined);
31
+ const [active_view, setActiveView] = useState('select_poll');
32
+ const {
33
+ poll_campaign,
34
+ polls,
35
+ my_responses
36
+ } = campaign_data;
37
+ polls.filter(p => p.poll_campaign_id == poll_campaign_id && ['pending', 'active', 'paused', 'closed'].includes(p.status)).sort((a, b) => {
38
+ if (a.priority && b.priority) {
39
+ return a.priority - b.priority;
40
+ } else {
41
+ return parseInt(b.poll_id) - parseInt(a.poll_id);
42
+ }
43
+ });
44
+ const playable_polls = polls.filter(p => ['closed', 'active'].includes(p.status));
45
+ const active_polls = polls.filter(p => p.status == 'active');
46
+ const pending_polls = polls.filter(p => ['pending', 'paused'].includes(p.status));
47
+ const closed_polls = polls.filter(p => p.status == 'closed');
48
+ const poll_responses = my_responses.filter(pr => polls.map(p => p.poll_id.toString()).includes(pr.poll_id.toString()));
49
+ const campaign_complete = PollCampaignHelpers.isCampaignComplete(polls, poll_responses, poll_campaign);
50
+ const active_responded = poll_responses.find(pr => pr.poll_id == active_poll?.poll_id) ? true : false;
51
+ let active_index = playable_polls.findIndex(p => p.poll_id == active_poll?.poll_id);
52
+
53
+ //const progressRef = useRef()
54
+
55
+ useEffect(() => {
56
+ getCampaignDetailsFromServer(poll_campaign_id);
57
+ }, [poll_campaign_id]);
58
+ useEffect(() => {
59
+ if (onActiveViewChange) {
60
+ return onActiveViewChange(active_view);
61
+ }
62
+ }, [active_view]);
63
+ useEffect(() => {
64
+ if (!share_in_process) {
65
+ return;
66
+ }
67
+ /*
68
+ html2canvas(progressRef.current).then(function(canvas:any) {
69
+ var myImage = canvas.toDataURL("image/png");
70
+ setImage(myImage)
71
+ //share(myImage)
72
+ });
73
+ */
74
+ }, [share_in_process]);
75
+ useEffect(() => {
76
+ if (polls.length == 0) {
77
+ return;
78
+ }
79
+ if (!init_poll_id || init_poll_id == 'undefined') {
80
+ return;
81
+ }
82
+ if (init_view != 'result') {
83
+ return;
84
+ }
85
+ let init_poll = polls.find(p => p.poll_id == init_poll_id);
86
+ if (!init_poll) {
87
+ return;
88
+ }
89
+ setActivePoll(init_poll);
90
+ setActiveView('respond_poll');
91
+ }, [polls.length]);
92
+ const getCampaignDetailsFromServer = async poll_campaign_id => {
93
+ setLoading(true);
94
+ const pc = await PollCampaignApi.getPollCampaignById(poll_campaign_id);
95
+ const ps_resp = await PollApi.getPollsByCampaignId(poll_campaign_id);
96
+ const pr = await PollResponseApi.getMyCampaignResponses(poll_campaign_id);
97
+ setCampaignData({
98
+ poll_campaign: pc,
99
+ my_responses: pr,
100
+ polls: ps_resp.polls
101
+ });
102
+ setLoading(false);
103
+ };
104
+
105
+ /*
106
+ const getImage = async() => {
107
+ if(!progressRef?.current){ return alert('Nothing to capture') }
108
+ setShareInProcess(true)
109
+ }
110
+ */
111
+
112
+ /*
113
+ const share = async(newImage:string) => {
114
+ if(!player){ return }
115
+ if(!company){ return alert('no company')}
116
+ let text = '';
117
+ let url = `https://share.mybe.app/polls/${company.short_name}?poll_campaign_id=${poll_campaign.poll_campaign_id}`
118
+ setShareInProcess(false)
119
+ if(!newImage){ return alert('No image!') }
120
+ if(!navigator?.share){ return alert('Browser does not support sharing')}
121
+ const blob = await (await fetch(newImage)).blob();
122
+ const filesArray = [
123
+ new File([blob], `${player.player_id}_poll.png`, { type:blob.type } )
124
+ ]
125
+ navigator.share({ text, files:filesArray, url }).then(() => {
126
+ //segEventTrack({ event: 'Shared Position', properties: { be_type:route.params.be_type, result:shareablePosition.result_ind } })
127
+ }).catch((e) => console.log(e))
128
+ }
129
+ */
130
+
131
+ /*
132
+ const nativeShare = () => {
133
+ if(!navigator?.share){ return alert('Your browser does not support native sharing') }
134
+ if(!company){ return alert('no company')}
135
+ let text = ``
136
+ let total = playable_polls.length
137
+ let total_resolved = playable_polls.filter(pp => pp.winning_option_id || pp.winning_value).length
138
+ let wins = 0
139
+ playable_polls.sort((a,b) => a.priority - b.priority).map(pp => {
140
+ let resp = poll_responses.find(pr => pr.poll_id == pp.poll_id)
141
+ if(!resp && (!pp.winning_option_id || !pp.winning_value)){ return }
142
+ if(!resp){ text += `🕚`; return }
143
+ if(!resp.result_ind){ text += '🕚'; return }
144
+ if(resp.result_ind == 'win'){ wins += 1; text += '✅'; return }
145
+ if(resp.result_ind == 'lose'){ text += '❌'; return }
146
+ text += '🕚'
147
+ return
148
+ })
149
+ let message = `I just went ${wins} out of ${total} in ${poll_campaign.name}! \n${text}`
150
+ if(total_resolved < total){ message = `I just completed the ${poll_campaign.name}!` }
151
+ let link = window.location.href
152
+ //let link = `https://share.mybe.app/polls/${company.short_name}?poll_campaign_id=${poll_campaign.poll_campaign_id}`
153
+ navigator.share({
154
+ text:`${message}`,
155
+ url: link
156
+ }).then(() => {
157
+ //segEventTrack({ event: 'Shared Position', properties: { be_type:route.params.be_type, result:shareablePosition.result_ind } })
158
+ }).catch((e) => console.log(e))
159
+ }
160
+ */
161
+
162
+ const handleNavPoll = poll => {
163
+ if (active_poll?.seconds_allowed) {
164
+ let responded = poll_responses.find(pr => pr.poll_id == active_poll.poll_id);
165
+ if (!responded) {
166
+ return;
167
+ }
168
+ }
169
+ if (init_view == 'result') {
170
+ return;
171
+ } //Dont navigate if init view is a result only
172
+ if (active_view != 'respond_poll') {
173
+ setActiveView('respond_poll');
174
+ }
175
+ return setActivePoll(poll);
176
+ };
177
+ const handleSkip = () => {
178
+ if (active_index == polls.length - 1) {
179
+ return setActivePoll(polls[0]);
180
+ }
181
+ return setActivePoll(polls[active_index + 1]);
182
+ };
183
+ const renderPolls = data => {
184
+ if (!poll_campaign) {
185
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
186
+ }
187
+ const selected = active_poll?.poll_id == data.item.poll_id ? true : false;
188
+ const poll_response = poll_responses.find(pr => pr.poll_id == data.item.poll_id);
189
+ const response_option = data.item.poll_options?.find(po => po.poll_option_id == poll_response?.poll_option_id);
190
+ return /*#__PURE__*/React.createElement(PollSelectCard, {
191
+ index: data.index,
192
+ poll_campaign: poll_campaign,
193
+ disabled: data.item.status == 'pending' ? true : false,
194
+ poll: data.item,
195
+ selected: selected,
196
+ response_option: response_option,
197
+ show_response: poll_response ? true : false,
198
+ poll_response: poll_response,
199
+ onSelect: poll => {
200
+ if (poll.status == 'pending') {
201
+ return alert('Poll is not yet active!');
202
+ }
203
+ if (selected) {
204
+ setActivePoll(undefined);
205
+ } else {
206
+ setActivePoll(poll);
207
+ }
208
+ }
209
+ });
210
+ };
211
+ if (!poll_campaign || loading) {
212
+ return /*#__PURE__*/React.createElement(View, {
213
+ style: {
214
+ padding: 20
215
+ }
216
+ }, /*#__PURE__*/React.createElement(ActivityIndicator, {
217
+ style: {
218
+ alignSelf: 'center'
219
+ },
220
+ size: "large",
221
+ color: Colors.brand.midnight
222
+ }));
223
+ }
224
+ return /*#__PURE__*/React.createElement(View, {
225
+ style: {
226
+ flex: 1,
227
+ backgroundColor: Colors.shades.white
228
+ },
229
+ onLayout: ev => {
230
+ const {
231
+ width
232
+ } = ev.nativeEvent.layout;
233
+ setPlayWidth(width);
234
+ }
235
+ }, /*#__PURE__*/React.createElement(View, {
236
+ style: {
237
+ backgroundColor: Colors.shades.shade600,
238
+ padding: 10
239
+ }
240
+ }, /*#__PURE__*/React.createElement(View, {
241
+ style: {
242
+ flexDirection: 'row'
243
+ }
244
+ }, /*#__PURE__*/React.createElement(Image, {
245
+ source: {
246
+ uri: poll_campaign.campaign_image?.url
247
+ },
248
+ style: {
249
+ height: play_width * 0.15,
250
+ width: play_width * 0.25,
251
+ borderRadius: 8
252
+ },
253
+ resizeMode: "cover"
254
+ }), /*#__PURE__*/React.createElement(View, {
255
+ style: {
256
+ flex: 1,
257
+ marginLeft: 10,
258
+ marginRight: 10,
259
+ justifyContent: 'center'
260
+ }
261
+ }, /*#__PURE__*/React.createElement(Text, {
262
+ size: 14,
263
+ color: Colors.brand.midnight,
264
+ weight: "bold"
265
+ }, poll_campaign.name), /*#__PURE__*/React.createElement(Text, {
266
+ style: {
267
+ marginTop: 3
268
+ },
269
+ size: 12,
270
+ color: Colors.brand.midnight,
271
+ weight: "regular"
272
+ }, poll_campaign.total_responses, " Responses")), /*#__PURE__*/React.createElement(View, {
273
+ style: {
274
+ flexDirection: 'row'
275
+ }
276
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
277
+ style: {
278
+ padding: 10
279
+ },
280
+ onPress: () => console.log('NATIVE SHARE')
281
+ }, /*#__PURE__*/React.createElement(Icons.ShareIcon, {
282
+ color: Colors.brand.midnight,
283
+ size: 12
284
+ })), poll_campaign.stream ? /*#__PURE__*/React.createElement(TouchableOpacity, {
285
+ style: {
286
+ padding: 10
287
+ },
288
+ onPress: () => setShowLive(!show_live)
289
+ }, show_live ? /*#__PURE__*/React.createElement(Icons.CloseIcon, {
290
+ color: Colors.utility.error,
291
+ size: 14
292
+ }) : /*#__PURE__*/React.createElement(Icons.TVIcon, {
293
+ color: Colors.brand.midnight,
294
+ size: 14
295
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null))), poll_campaign.stream ? /*#__PURE__*/React.createElement(View, {
296
+ nativeID: "campaign_stream",
297
+ style: {
298
+ marginTop: show_live ? 5 : 0,
299
+ height: show_live ? undefined : 0,
300
+ overflow: 'hidden',
301
+ justifyContent: 'center',
302
+ alignItems: 'center'
303
+ }
304
+ }, /*#__PURE__*/React.createElement(Text, null, "STREAM!")) : /*#__PURE__*/React.createElement(React.Fragment, null)), /*#__PURE__*/React.createElement(View, {
305
+ style: {
306
+ flex: 1
307
+ }
308
+ }, /*#__PURE__*/React.createElement(View, {
309
+ nativeID: "progress",
310
+ style: {
311
+ padding: 10,
312
+ backgroundColor: Colors.shades.shade600
313
+ }
314
+ }, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(CampaignProgressBar, {
315
+ polls: playable_polls,
316
+ onPollSelect: poll => handleNavPoll(poll),
317
+ poll_responses: poll_responses,
318
+ active_poll: active_poll ? active_poll.poll_id : playable_polls[0]?.poll_id ?? '',
319
+ poll_campaign: poll_campaign
320
+ }))), active_view == 'select_poll' ? /*#__PURE__*/React.createElement(View, {
321
+ nativeID: "pre_start",
322
+ style: {
323
+ flex: 1
324
+ }
325
+ }, /*#__PURE__*/React.createElement(ScrollView, {
326
+ style: {
327
+ flex: 1
328
+ }
329
+ }, /*#__PURE__*/React.createElement(View, {
330
+ style: {
331
+ padding: 10
332
+ }
333
+ }, active_polls.length > 0 ? /*#__PURE__*/React.createElement(View, {
334
+ nativeID: "active_questions"
335
+ }, /*#__PURE__*/React.createElement(View, {
336
+ style: {
337
+ flexDirection: 'row',
338
+ alignItems: 'center'
339
+ }
340
+ }, /*#__PURE__*/React.createElement(Text, {
341
+ size: 14,
342
+ color: Colors.brand.midnight,
343
+ weight: "bold"
344
+ }, "Active Questions"), /*#__PURE__*/React.createElement(View, {
345
+ style: {
346
+ marginLeft: 5,
347
+ borderRadius: 4,
348
+ padding: 4,
349
+ backgroundColor: Colors.utility.success
350
+ }
351
+ }, /*#__PURE__*/React.createElement(Text, {
352
+ style: {
353
+ alignSelf: 'center'
354
+ },
355
+ size: 10,
356
+ color: Colors.shades.white,
357
+ weight: "semibold",
358
+ textAlign: "center"
359
+ }, active_polls.length))), /*#__PURE__*/React.createElement(View, {
360
+ nativeID: "active_questions_list",
361
+ style: {
362
+ marginTop: 10,
363
+ backgroundColor: Colors.shades.shade100,
364
+ borderRadius: 22
365
+ }
366
+ }, /*#__PURE__*/React.createElement(FlatList, {
367
+ data: active_polls,
368
+ renderItem: renderPolls
369
+ }))) : /*#__PURE__*/React.createElement(React.Fragment, null), false && pending_polls.length > 0 ? /*#__PURE__*/React.createElement(View, {
370
+ nativeID: "pending_questions",
371
+ style: {
372
+ marginTop: 10
373
+ }
374
+ }, /*#__PURE__*/React.createElement(View, {
375
+ style: {
376
+ flexDirection: 'row',
377
+ alignItems: 'center'
378
+ }
379
+ }, /*#__PURE__*/React.createElement(Text, {
380
+ size: 14,
381
+ color: Colors.brand.midnight,
382
+ weight: "bold"
383
+ }, "Pending Questions"), /*#__PURE__*/React.createElement(View, {
384
+ style: {
385
+ marginLeft: 5,
386
+ borderRadius: 4,
387
+ padding: 4,
388
+ backgroundColor: Colors.brand.slate
389
+ }
390
+ }, /*#__PURE__*/React.createElement(Text, {
391
+ style: {
392
+ alignSelf: 'center'
393
+ },
394
+ size: 10,
395
+ color: Colors.shades.white,
396
+ weight: "semibold",
397
+ textAlign: "center"
398
+ }, pending_polls.length))), false ? /*#__PURE__*/React.createElement(View, {
399
+ nativeID: "pending_questions_list",
400
+ style: {
401
+ marginTop: 10,
402
+ backgroundColor: Colors.brand.slate,
403
+ borderRadius: 22
404
+ }
405
+ }, /*#__PURE__*/React.createElement(FlatList, {
406
+ data: pending_polls,
407
+ renderItem: renderPolls
408
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null)) : /*#__PURE__*/React.createElement(React.Fragment, null), closed_polls.length > 0 ? /*#__PURE__*/React.createElement(View, {
409
+ nativeID: "closed_questions",
410
+ style: {
411
+ marginTop: 10
412
+ }
413
+ }, /*#__PURE__*/React.createElement(View, {
414
+ style: {
415
+ flexDirection: 'row',
416
+ alignItems: 'center'
417
+ }
418
+ }, /*#__PURE__*/React.createElement(Text, {
419
+ size: 14,
420
+ color: Colors.brand.midnight,
421
+ weight: "bold"
422
+ }, "Closed Questions"), /*#__PURE__*/React.createElement(View, {
423
+ style: {
424
+ marginLeft: 5,
425
+ borderRadius: 4,
426
+ padding: 4,
427
+ backgroundColor: Colors.utility.success
428
+ }
429
+ }, /*#__PURE__*/React.createElement(Text, {
430
+ style: {
431
+ alignSelf: 'center'
432
+ },
433
+ size: 10,
434
+ color: Colors.shades.white,
435
+ weight: "semibold",
436
+ textAlign: "center"
437
+ }, closed_polls.length))), /*#__PURE__*/React.createElement(View, {
438
+ nativeID: "closed_questions_list",
439
+ style: {
440
+ marginTop: 10,
441
+ backgroundColor: Colors.shades.shade100,
442
+ borderRadius: 22
443
+ }
444
+ }, /*#__PURE__*/React.createElement(FlatList, {
445
+ data: closed_polls,
446
+ renderItem: renderPolls
447
+ }))) : /*#__PURE__*/React.createElement(React.Fragment, null))), /*#__PURE__*/React.createElement(View, {
448
+ style: {
449
+ flexDirection: 'row',
450
+ padding: 10,
451
+ borderRadius: 22
452
+ }
453
+ }, /*#__PURE__*/React.createElement(Button, {
454
+ style: {
455
+ flex: 1,
456
+ marginRight: 4
457
+ },
458
+ title: "Exit",
459
+ backgroundColor: Colors.utility.error,
460
+ title_size: 12,
461
+ padding: 14,
462
+ title_color: Colors.shades.white,
463
+ borderRadius: 22,
464
+ onPress: () => onFinished()
465
+ }), /*#__PURE__*/React.createElement(Button, {
466
+ style: {
467
+ flex: 2
468
+ },
469
+ title_size: 12,
470
+ padding: 14,
471
+ disabled: active_poll ? false : true,
472
+ title: active_poll ? active_responded || active_poll.status != 'active' ? 'View Question' : 'Respond' : 'Select Question',
473
+ title_color: Colors.shades.white,
474
+ backgroundColor: active_poll ? Colors.utility.success : Colors.brand.slate,
475
+ borderRadius: 22,
476
+ onPress: () => {
477
+ if (!player_id) {
478
+ return onRequestAuthenticate();
479
+ }
480
+ setActiveView('respond_poll');
481
+ }
482
+ })), /*#__PURE__*/React.createElement(View, {
483
+ style: {
484
+ flexDirection: 'row',
485
+ padding: 10,
486
+ backgroundColor: Colors.shades.shade100,
487
+ borderBottomLeftRadius: 22,
488
+ borderBottomRightRadius: 22
489
+ }
490
+ }, campaign_complete && active_view == 'select_poll' ? /*#__PURE__*/React.createElement(Button, {
491
+ icon_name: "trophy",
492
+ icon_side: "left",
493
+ title: "Results",
494
+ title_size: 12,
495
+ backgroundColor: Colors.incentive.gold,
496
+ title_color: Colors.shades.white,
497
+ borderRadius: 22,
498
+ onPress: () => setActiveView('campaign_results')
499
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null))) : active_view == 'respond_poll' && active_poll ? /*#__PURE__*/React.createElement(View, {
500
+ nativeID: "respond_poll",
501
+ style: {
502
+ flex: 1
503
+ }
504
+ }, /*#__PURE__*/React.createElement(PollCard, {
505
+ poll: active_poll,
506
+ view: init_view == 'result' ? 'result' : 'play',
507
+ question_number: active_index + 1,
508
+ onShowAuthenticate: () => {
509
+ console.log('show authenticate!!');
510
+ },
511
+ onResponse: response => {
512
+ setCampaignData({
513
+ ...campaign_data,
514
+ my_responses: my_responses.filter(r => r.poll_response_id != response.poll_response_id).concat(response)
515
+ });
516
+ },
517
+ total_questions: playable_polls.length,
518
+ onSkip: () => handleSkip(),
519
+ onSeeResults: () => {
520
+ if (campaign_complete) {
521
+ return setActiveView('campaign_results');
522
+ }
523
+ return handleSkip();
524
+ },
525
+ onCancel: () => {
526
+ setActivePoll(undefined);
527
+ setActiveView('select_poll');
528
+ }
529
+ })) : active_view == 'campaign_results' ? /*#__PURE__*/React.createElement(View, {
530
+ nativeID: "campaign_results",
531
+ style: {
532
+ flex: 1
533
+ }
534
+ }, /*#__PURE__*/React.createElement(CampaignResult, {
535
+ poll_campaign: poll_campaign,
536
+ polls: polls
537
+ //hide_back={init_view && init_view !='undefined' ? true : false}
538
+ ,
539
+ onShare: () => console.log('Share this bad boi!'),
540
+ poll_responses: poll_responses,
541
+ onClose: () => setActiveView('select_poll')
542
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null)));
543
+ };
544
+ export default CampaignPlay;
545
+ //# sourceMappingURL=CampaignPlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useState","ActivityIndicator","FlatList","Image","ScrollView","TouchableOpacity","View","Colors","PollCard","CampaignProgressBar","CampaignResult","PollSelectCard","PollApi","PollCampaignApi","PollCampaignHelpers","PollResponseApi","Button","Icons","Text","CampaignPlay","player_id","poll_campaign_id","onActiveViewChange","onRequestAuthenticate","onFinished","init_view","init_poll_id","campaign_data","setCampaignData","polls","my_responses","loading","setLoading","share_in_process","play_width","setPlayWidth","show_live","setShowLive","active_poll","setActivePoll","undefined","active_view","setActiveView","poll_campaign","filter","p","includes","status","sort","a","b","priority","parseInt","poll_id","playable_polls","active_polls","pending_polls","closed_polls","poll_responses","pr","map","toString","campaign_complete","isCampaignComplete","active_responded","find","active_index","findIndex","getCampaignDetailsFromServer","length","init_poll","pc","getPollCampaignById","ps_resp","getPollsByCampaignId","getMyCampaignResponses","handleNavPoll","poll","seconds_allowed","responded","handleSkip","renderPolls","data","createElement","Fragment","selected","item","poll_response","response_option","poll_options","po","poll_option_id","index","disabled","show_response","onSelect","alert","style","padding","alignSelf","size","color","brand","midnight","flex","backgroundColor","shades","white","onLayout","ev","width","nativeEvent","layout","shade600","flexDirection","source","uri","campaign_image","url","height","borderRadius","resizeMode","marginLeft","marginRight","justifyContent","weight","name","marginTop","total_responses","onPress","console","log","ShareIcon","stream","CloseIcon","utility","error","TVIcon","nativeID","overflow","alignItems","onPollSelect","success","textAlign","shade100","renderItem","slate","title","title_size","title_color","borderBottomLeftRadius","borderBottomRightRadius","icon_name","icon_side","incentive","gold","view","question_number","onShowAuthenticate","onResponse","response","r","poll_response_id","concat","total_questions","onSkip","onSeeResults","onCancel","onShare","onClose"],"sourceRoot":"../../../../src","sources":["Poll/components/CampaignPlay.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,iBAAiB,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAErG,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,SAASC,OAAO,EAAEC,eAAe,EAAEC,mBAAmB,EAAEC,eAAe,QAAQ,QAAQ;AACvF,SAASC,MAAM,EAAEC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB;AActD,MAAMC,YAAY,GAAGA,CAAC;EAAEC,SAAS;EAAEC,gBAAgB;EAAEC,kBAAkB;EAAEC,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I,EAAC;IAAE;EAAE,gBAChD1G,KAAA,CAAAqF,aAAA,CAACzE,cAAc;IACXiC,aAAa,EAAEA,aAAc;IAC7Bd,KAAK,EAAEA;IACP;IAAA;IACA2I,OAAO,EAAEA,CAAA,KAAMtC,OAAO,CAACC,GAAG,CAAC,qBAAqB,CAAE;IAClDzE,cAAc,EAAEA,cAAe;IAC/B+G,OAAO,EAAEA,CAAA,KAAM/H,aAAa,CAAC,aAAa;EAAE,CAC/C,CACC,CAAC,gBACV5C,KAAA,CAAAqF,aAAA,CAAArF,KAAA,CAAAsF,QAAA,MAAI,CACH,CAEJ,CAAC;AAGf,CAAC;AAED,eAAejE,YAAY","ignoreList":[]}
@@ -0,0 +1,110 @@
1
+ import React from 'react';
2
+ import { FlatList, TouchableOpacity, View } from "react-native";
3
+ import { useState } from "react";
4
+ import Colors from '../../constants/colors';
5
+ import { Icons, Text } from '../../Components';
6
+ const CampaignProgressBar = ({
7
+ poll_responses,
8
+ active_poll,
9
+ polls,
10
+ onPollSelect
11
+ }) => {
12
+ const [progress_width, setProgressWidth] = useState(0);
13
+ const getBarColor = pr => {
14
+ switch (pr.result_ind) {
15
+ case 'win':
16
+ return Colors.utility.success;
17
+ case 'lose':
18
+ return Colors.utility.error;
19
+ default:
20
+ return Colors.utility.warning;
21
+ }
22
+ };
23
+ const renderProgress = data => {
24
+ let width = progress_width / polls.length;
25
+ let color = Colors.shades.white;
26
+ let response = poll_responses.find(pr => pr.poll_id == data.item.poll_id);
27
+ if (response) {
28
+ color = getBarColor(response);
29
+ }
30
+ const active = active_poll == data.item.poll_id ? true : false;
31
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
32
+ onPress: () => onPollSelect(data.item),
33
+ style: {
34
+ margin: 2,
35
+ borderWidth: active ? 2 : 0,
36
+ borderColor: Colors.brand.midnight,
37
+ borderRadius: 4,
38
+ height: 20,
39
+ width: width - 4,
40
+ backgroundColor: color
41
+ }
42
+ });
43
+ };
44
+ const questions_answered = poll_responses.length;
45
+ const questions_unanswered = polls.length - questions_answered;
46
+ return /*#__PURE__*/React.createElement(View, {
47
+ style: {
48
+ flexDirection: 'row',
49
+ alignItems: 'center'
50
+ }
51
+ }, /*#__PURE__*/React.createElement(View, {
52
+ nativeID: "questions_answered",
53
+ style: {
54
+ flexDirection: 'row',
55
+ alignItems: 'center',
56
+ margin: 5,
57
+ borderRadius: 4,
58
+ backgroundColor: Colors.highlights.highlight400,
59
+ padding: 5
60
+ }
61
+ }, /*#__PURE__*/React.createElement(Icons.UserIcon, {
62
+ color: Colors.shades.white,
63
+ size: 12
64
+ }), /*#__PURE__*/React.createElement(Text, {
65
+ style: {
66
+ marginLeft: 5
67
+ },
68
+ size: 12,
69
+ color: Colors.shades.white,
70
+ weight: "semibold"
71
+ }, questions_answered)), /*#__PURE__*/React.createElement(View, {
72
+ nativeID: "progress_bar",
73
+ style: {
74
+ flex: 1
75
+ },
76
+ onLayout: ev => {
77
+ const {
78
+ width
79
+ } = ev.nativeEvent.layout;
80
+ setProgressWidth(width);
81
+ }
82
+ }, /*#__PURE__*/React.createElement(FlatList, {
83
+ data: polls,
84
+ horizontal: true,
85
+ showsHorizontalScrollIndicator: false,
86
+ renderItem: renderProgress
87
+ })), /*#__PURE__*/React.createElement(View, {
88
+ nativeID: "questions_answered",
89
+ style: {
90
+ flexDirection: 'row',
91
+ alignItems: 'center',
92
+ margin: 5,
93
+ borderRadius: 4,
94
+ backgroundColor: Colors.utility.warning,
95
+ padding: 5
96
+ }
97
+ }, /*#__PURE__*/React.createElement(Icons.ListIcon, {
98
+ color: Colors.shades.white,
99
+ size: 12
100
+ }), /*#__PURE__*/React.createElement(Text, {
101
+ style: {
102
+ marginLeft: 5
103
+ },
104
+ size: 12,
105
+ color: Colors.shades.white,
106
+ weight: "semibold"
107
+ }, questions_unanswered)));
108
+ };
109
+ export default CampaignProgressBar;
110
+ //# sourceMappingURL=CampaignProgressBar.js.map