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.
- package/lib/commonjs/ApiOverrides/index.js +18 -0
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- package/lib/commonjs/Authenticator/Components/AuthStrategyIdentifier.js +113 -0
- package/lib/commonjs/Authenticator/Components/AuthStrategyIdentifier.js.map +1 -0
- package/lib/commonjs/Authenticator/Components/StrategyForm.js +238 -71
- package/lib/commonjs/Authenticator/Components/StrategyForm.js.map +1 -1
- package/lib/commonjs/Authenticator/index.js +7 -4
- package/lib/commonjs/Authenticator/index.js.map +1 -1
- package/lib/commonjs/Checkout/api/index.js.map +1 -1
- package/lib/commonjs/Checkout/index.js.map +1 -1
- package/lib/commonjs/Competition/api/index.js +655 -0
- package/lib/commonjs/Competition/api/index.js.map +1 -0
- package/lib/commonjs/Competition/components/AthleteMarketCard.js +168 -0
- package/lib/commonjs/Competition/components/AthleteMarketCard.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionCard.js +180 -0
- package/lib/commonjs/Competition/components/CompetitionCard.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionInfoCard.js +264 -0
- package/lib/commonjs/Competition/components/CompetitionInfoCard.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionLeaderboard.js +281 -0
- package/lib/commonjs/Competition/components/CompetitionLeaderboard.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionPlay.js +1269 -0
- package/lib/commonjs/Competition/components/CompetitionPlay.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionSeasonCard.js +111 -0
- package/lib/commonjs/Competition/components/CompetitionSeasonCard.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionSelector.js +122 -0
- package/lib/commonjs/Competition/components/CompetitionSelector.js.map +1 -0
- package/lib/commonjs/Competition/components/CompetitionTypeCard.js +380 -0
- package/lib/commonjs/Competition/components/CompetitionTypeCard.js.map +1 -0
- package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js +237 -0
- package/lib/commonjs/Competition/components/EnterCompetitionPrompt.js.map +1 -0
- package/lib/commonjs/Competition/components/LeaderPicks.js +322 -0
- package/lib/commonjs/Competition/components/LeaderPicks.js.map +1 -0
- package/lib/commonjs/Competition/components/ManageSeasonForm.js +605 -0
- package/lib/commonjs/Competition/components/ManageSeasonForm.js.map +1 -0
- package/lib/commonjs/Competition/components/MarketsCard.js +148 -0
- package/lib/commonjs/Competition/components/MarketsCard.js.map +1 -0
- package/lib/commonjs/Competition/components/MatchMarketCard.js +199 -0
- package/lib/commonjs/Competition/components/MatchMarketCard.js.map +1 -0
- package/lib/commonjs/Competition/components/NavOutPrompt.js +159 -0
- package/lib/commonjs/Competition/components/NavOutPrompt.js.map +1 -0
- package/lib/commonjs/Competition/components/SeasonInfoModal.js +400 -0
- package/lib/commonjs/Competition/components/SeasonInfoModal.js.map +1 -0
- package/lib/commonjs/Competition/components/TeamEventCard.js +217 -0
- package/lib/commonjs/Competition/components/TeamEventCard.js.map +1 -0
- package/lib/commonjs/Competition/components/WagerPickForm.js +278 -0
- package/lib/commonjs/Competition/components/WagerPickForm.js.map +1 -0
- package/lib/commonjs/Competition/index.js +42 -0
- package/lib/commonjs/Competition/index.js.map +1 -0
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Components/Jerseys.js +713 -0
- package/lib/commonjs/Components/Jerseys.js.map +1 -0
- package/lib/commonjs/Components/LinearDiagnal.js +1 -1
- package/lib/commonjs/Components/LinearDiagnal.js.map +1 -1
- package/lib/commonjs/Components/Switch.js +81 -0
- package/lib/commonjs/Components/Switch.js.map +1 -0
- package/lib/commonjs/Components/index.js +14 -0
- package/lib/commonjs/Components/index.js.map +1 -1
- package/lib/commonjs/Poll/api/index.js +277 -0
- package/lib/commonjs/Poll/api/index.js.map +1 -0
- package/lib/commonjs/Poll/components/CampaignPlay.js +553 -0
- package/lib/commonjs/Poll/components/CampaignPlay.js.map +1 -0
- package/lib/commonjs/Poll/components/CampaignProgressBar.js +118 -0
- package/lib/commonjs/Poll/components/CampaignProgressBar.js.map +1 -0
- package/lib/commonjs/Poll/components/CampaignResult.js +382 -0
- package/lib/commonjs/Poll/components/CampaignResult.js.map +1 -0
- package/lib/commonjs/Poll/components/CampaignSelector.js +124 -0
- package/lib/commonjs/Poll/components/CampaignSelector.js.map +1 -0
- package/lib/commonjs/Poll/components/PollCampaignCard.js +66 -0
- package/lib/commonjs/Poll/components/PollCampaignCard.js.map +1 -0
- package/lib/commonjs/Poll/components/PollCard.js +480 -0
- package/lib/commonjs/Poll/components/PollCard.js.map +1 -0
- package/lib/commonjs/Poll/components/PollOptionCard.js +158 -0
- package/lib/commonjs/Poll/components/PollOptionCard.js.map +1 -0
- package/lib/commonjs/Poll/components/PollSelectCard.js +189 -0
- package/lib/commonjs/Poll/components/PollSelectCard.js.map +1 -0
- package/lib/commonjs/Poll/components/ResponseTimer.js +48 -0
- package/lib/commonjs/Poll/components/ResponseTimer.js.map +1 -0
- package/lib/commonjs/Poll/components/WidgetHeader.js +83 -0
- package/lib/commonjs/Poll/components/WidgetHeader.js.map +1 -0
- package/lib/commonjs/Poll/flashmarket/index.js +354 -0
- package/lib/commonjs/Poll/flashmarket/index.js.map +1 -0
- package/lib/commonjs/Poll/index.js +46 -0
- package/lib/commonjs/Poll/index.js.map +1 -0
- package/lib/commonjs/ProfileManager/Components/BasicInfoManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/BasicStatus.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/CodeRedeem.js +3 -1
- package/lib/commonjs/ProfileManager/Components/CodeRedeem.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/DOBManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/EmailManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/PasswordManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/PhoneManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfileWelcome.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfileWizard.js +5 -0
- package/lib/commonjs/ProfileManager/Components/ProfileWizard.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/commonjs/ProfileManager/index.js +2 -0
- package/lib/commonjs/ProfileManager/index.js.map +1 -1
- package/lib/commonjs/Wallet/api/index.js +4 -1
- package/lib/commonjs/Wallet/api/index.js.map +1 -1
- package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletSettings.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -1
- package/lib/commonjs/Wallet/index.js.map +1 -1
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/ApiOverrides/index.js +18 -0
- package/lib/module/ApiOverrides/index.js.map +1 -1
- package/lib/module/Authenticator/Components/AuthStrategyIdentifier.js +106 -0
- package/lib/module/Authenticator/Components/AuthStrategyIdentifier.js.map +1 -0
- package/lib/module/Authenticator/Components/StrategyForm.js +239 -72
- package/lib/module/Authenticator/Components/StrategyForm.js.map +1 -1
- package/lib/module/Authenticator/index.js +7 -4
- package/lib/module/Authenticator/index.js.map +1 -1
- package/lib/module/Checkout/api/index.js.map +1 -1
- package/lib/module/Checkout/index.js.map +1 -1
- package/lib/module/Competition/api/index.js +649 -0
- package/lib/module/Competition/api/index.js.map +1 -0
- package/lib/module/Competition/components/AthleteMarketCard.js +161 -0
- package/lib/module/Competition/components/AthleteMarketCard.js.map +1 -0
- package/lib/module/Competition/components/CompetitionCard.js +173 -0
- package/lib/module/Competition/components/CompetitionCard.js.map +1 -0
- package/lib/module/Competition/components/CompetitionInfoCard.js +257 -0
- package/lib/module/Competition/components/CompetitionInfoCard.js.map +1 -0
- package/lib/module/Competition/components/CompetitionLeaderboard.js +272 -0
- package/lib/module/Competition/components/CompetitionLeaderboard.js.map +1 -0
- package/lib/module/Competition/components/CompetitionPlay.js +1260 -0
- package/lib/module/Competition/components/CompetitionPlay.js.map +1 -0
- package/lib/module/Competition/components/CompetitionSeasonCard.js +104 -0
- package/lib/module/Competition/components/CompetitionSeasonCard.js.map +1 -0
- package/lib/module/Competition/components/CompetitionSelector.js +113 -0
- package/lib/module/Competition/components/CompetitionSelector.js.map +1 -0
- package/lib/module/Competition/components/CompetitionTypeCard.js +371 -0
- package/lib/module/Competition/components/CompetitionTypeCard.js.map +1 -0
- package/lib/module/Competition/components/EnterCompetitionPrompt.js +228 -0
- package/lib/module/Competition/components/EnterCompetitionPrompt.js.map +1 -0
- package/lib/module/Competition/components/LeaderPicks.js +313 -0
- package/lib/module/Competition/components/LeaderPicks.js.map +1 -0
- package/lib/module/Competition/components/ManageSeasonForm.js +596 -0
- package/lib/module/Competition/components/ManageSeasonForm.js.map +1 -0
- package/lib/module/Competition/components/MarketsCard.js +139 -0
- package/lib/module/Competition/components/MarketsCard.js.map +1 -0
- package/lib/module/Competition/components/MatchMarketCard.js +192 -0
- package/lib/module/Competition/components/MatchMarketCard.js.map +1 -0
- package/lib/module/Competition/components/NavOutPrompt.js +152 -0
- package/lib/module/Competition/components/NavOutPrompt.js.map +1 -0
- package/lib/module/Competition/components/SeasonInfoModal.js +391 -0
- package/lib/module/Competition/components/SeasonInfoModal.js.map +1 -0
- package/lib/module/Competition/components/TeamEventCard.js +210 -0
- package/lib/module/Competition/components/TeamEventCard.js.map +1 -0
- package/lib/module/Competition/components/WagerPickForm.js +269 -0
- package/lib/module/Competition/components/WagerPickForm.js.map +1 -0
- package/lib/module/Competition/index.js +33 -0
- package/lib/module/Competition/index.js.map +1 -0
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Components/Jerseys.js +705 -0
- package/lib/module/Components/Jerseys.js.map +1 -0
- package/lib/module/Components/LinearDiagnal.js +2 -3
- package/lib/module/Components/LinearDiagnal.js.map +1 -1
- package/lib/module/Components/Switch.js +74 -0
- package/lib/module/Components/Switch.js.map +1 -0
- package/lib/module/Components/index.js +3 -1
- package/lib/module/Components/index.js.map +1 -1
- package/lib/module/Poll/api/index.js +271 -0
- package/lib/module/Poll/api/index.js.map +1 -0
- package/lib/module/Poll/components/CampaignPlay.js +545 -0
- package/lib/module/Poll/components/CampaignPlay.js.map +1 -0
- package/lib/module/Poll/components/CampaignProgressBar.js +110 -0
- package/lib/module/Poll/components/CampaignProgressBar.js.map +1 -0
- package/lib/module/Poll/components/CampaignResult.js +374 -0
- package/lib/module/Poll/components/CampaignResult.js.map +1 -0
- package/lib/module/Poll/components/CampaignSelector.js +115 -0
- package/lib/module/Poll/components/CampaignSelector.js.map +1 -0
- package/lib/module/Poll/components/PollCampaignCard.js +59 -0
- package/lib/module/Poll/components/PollCampaignCard.js.map +1 -0
- package/lib/module/Poll/components/PollCard.js +472 -0
- package/lib/module/Poll/components/PollCard.js.map +1 -0
- package/lib/module/Poll/components/PollOptionCard.js +149 -0
- package/lib/module/Poll/components/PollOptionCard.js.map +1 -0
- package/lib/module/Poll/components/PollSelectCard.js +182 -0
- package/lib/module/Poll/components/PollSelectCard.js.map +1 -0
- package/lib/module/Poll/components/ResponseTimer.js +39 -0
- package/lib/module/Poll/components/ResponseTimer.js.map +1 -0
- package/lib/module/Poll/components/WidgetHeader.js +76 -0
- package/lib/module/Poll/components/WidgetHeader.js.map +1 -0
- package/lib/module/Poll/flashmarket/index.js +345 -0
- package/lib/module/Poll/flashmarket/index.js.map +1 -0
- package/lib/module/Poll/index.js +37 -0
- package/lib/module/Poll/index.js.map +1 -0
- package/lib/module/ProfileManager/Components/BasicInfoManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/BasicStatus.js.map +1 -1
- package/lib/module/ProfileManager/Components/CodeRedeem.js +3 -1
- package/lib/module/ProfileManager/Components/CodeRedeem.js.map +1 -1
- package/lib/module/ProfileManager/Components/DOBManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/EmailManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/PasswordManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/PhoneManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfilePicManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfileWelcome.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfileWizard.js +5 -0
- package/lib/module/ProfileManager/Components/ProfileWizard.js.map +1 -1
- package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/module/ProfileManager/index.js +2 -0
- package/lib/module/ProfileManager/index.js.map +1 -1
- package/lib/module/Wallet/api/index.js +4 -1
- package/lib/module/Wallet/api/index.js.map +1 -1
- package/lib/module/Wallet/components/ACHAddCard.js.map +1 -1
- package/lib/module/Wallet/components/AddressManager.js.map +1 -1
- package/lib/module/Wallet/components/DepositCard.js.map +1 -1
- package/lib/module/Wallet/components/FundAccountCard.js.map +1 -1
- package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -1
- package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/module/Wallet/components/MyBalance.js.map +1 -1
- package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -1
- package/lib/module/Wallet/components/WalletSettings.js.map +1 -1
- package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/module/Wallet/components/WithdrawCard.js.map +1 -1
- package/lib/module/Wallet/index.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/ApiOverrides/index.d.ts +1 -0
- package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/src/Authenticator/Components/AuthStrategyIdentifier.d.ts +11 -0
- package/lib/typescript/src/Authenticator/Components/AuthStrategyIdentifier.d.ts.map +1 -0
- package/lib/typescript/src/Authenticator/Components/StrategyForm.d.ts +4 -1
- package/lib/typescript/src/Authenticator/Components/StrategyForm.d.ts.map +1 -1
- package/lib/typescript/src/Authenticator/api/index.d.ts +2 -2
- package/lib/typescript/src/Authenticator/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Authenticator/index.d.ts +2 -1
- package/lib/typescript/src/Authenticator/index.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/api/index.d.ts +1 -2
- package/lib/typescript/src/Checkout/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/src/Competition/api/index.d.ts +128 -0
- package/lib/typescript/src/Competition/api/index.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts +19 -0
- package/lib/typescript/src/Competition/components/AthleteMarketCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionCard.d.ts +12 -0
- package/lib/typescript/src/Competition/components/CompetitionCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts +16 -0
- package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts +14 -0
- package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts +20 -0
- package/lib/typescript/src/Competition/components/CompetitionPlay.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts +10 -0
- package/lib/typescript/src/Competition/components/CompetitionSeasonCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts +11 -0
- package/lib/typescript/src/Competition/components/CompetitionSelector.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts +14 -0
- package/lib/typescript/src/Competition/components/CompetitionTypeCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts +16 -0
- package/lib/typescript/src/Competition/components/EnterCompetitionPrompt.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/LeaderPicks.d.ts +22 -0
- package/lib/typescript/src/Competition/components/LeaderPicks.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts +10 -0
- package/lib/typescript/src/Competition/components/ManageSeasonForm.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/MarketsCard.d.ts +15 -0
- package/lib/typescript/src/Competition/components/MarketsCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts +21 -0
- package/lib/typescript/src/Competition/components/MatchMarketCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts +23 -0
- package/lib/typescript/src/Competition/components/NavOutPrompt.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts +14 -0
- package/lib/typescript/src/Competition/components/SeasonInfoModal.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/TeamEventCard.d.ts +17 -0
- package/lib/typescript/src/Competition/components/TeamEventCard.d.ts.map +1 -0
- package/lib/typescript/src/Competition/components/WagerPickForm.d.ts +15 -0
- package/lib/typescript/src/Competition/components/WagerPickForm.d.ts.map +1 -0
- package/lib/typescript/src/Competition/index.d.ts +11 -0
- package/lib/typescript/src/Competition/index.d.ts.map +1 -0
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/Components/Jerseys.d.ts +16 -0
- package/lib/typescript/src/Components/Jerseys.d.ts.map +1 -0
- package/lib/typescript/src/Components/LinearDiagnal.d.ts.map +1 -1
- package/lib/typescript/src/Components/Switch.d.ts +9 -0
- package/lib/typescript/src/Components/Switch.d.ts.map +1 -0
- package/lib/typescript/src/Components/index.d.ts +3 -1
- package/lib/typescript/src/Components/index.d.ts.map +1 -1
- package/lib/typescript/src/Poll/api/index.d.ts +65 -0
- package/lib/typescript/src/Poll/api/index.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/CampaignPlay.d.ts +14 -0
- package/lib/typescript/src/Poll/components/CampaignPlay.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts +12 -0
- package/lib/typescript/src/Poll/components/CampaignProgressBar.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/CampaignResult.d.ts +13 -0
- package/lib/typescript/src/Poll/components/CampaignResult.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/CampaignSelector.d.ts +9 -0
- package/lib/typescript/src/Poll/components/CampaignSelector.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts +10 -0
- package/lib/typescript/src/Poll/components/PollCampaignCard.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/PollCard.d.ts +16 -0
- package/lib/typescript/src/Poll/components/PollCard.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/PollOptionCard.d.ts +14 -0
- package/lib/typescript/src/Poll/components/PollOptionCard.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/PollSelectCard.d.ts +16 -0
- package/lib/typescript/src/Poll/components/PollSelectCard.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/ResponseTimer.d.ts +9 -0
- package/lib/typescript/src/Poll/components/ResponseTimer.d.ts.map +1 -0
- package/lib/typescript/src/Poll/components/WidgetHeader.d.ts +13 -0
- package/lib/typescript/src/Poll/components/WidgetHeader.d.ts.map +1 -0
- package/lib/typescript/src/Poll/flashmarket/index.d.ts +10 -0
- package/lib/typescript/src/Poll/flashmarket/index.d.ts.map +1 -0
- package/lib/typescript/src/Poll/index.d.ts +13 -0
- package/lib/typescript/src/Poll/index.d.ts.map +1 -0
- package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts +1 -2
- package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts +9 -2
- package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts +1 -2
- package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts +10 -3
- package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts +2 -2
- package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts +1 -2
- package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/api/index.d.ts +2 -2
- package/lib/typescript/src/ProfileManager/api/index.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/index.d.ts +9 -2
- package/lib/typescript/src/ProfileManager/index.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/api/index.d.ts +2 -3
- package/lib/typescript/src/Wallet/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AddressManager.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/DepositCard.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/MyBalance.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletSettings.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/WalletSettings.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts +1 -2
- package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/index.d.ts +1 -2
- package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ApiOverrides/index.ts +19 -0
- package/src/Authenticator/Components/AuthStrategyIdentifier.tsx +72 -0
- package/src/Authenticator/Components/StrategyForm.tsx +208 -53
- package/src/Authenticator/api/index.ts +2 -2
- package/src/Authenticator/api/types.d.ts +3 -26
- package/src/Authenticator/index.tsx +10 -4
- package/src/Checkout/api/index.tsx +1 -2
- package/src/Checkout/index.tsx +1 -2
- package/src/Competition/api/index.ts +568 -0
- package/src/Competition/components/AthleteMarketCard.tsx +116 -0
- package/src/Competition/components/CompetitionCard.tsx +82 -0
- package/src/Competition/components/CompetitionInfoCard.tsx +149 -0
- package/src/Competition/components/CompetitionLeaderboard.tsx +183 -0
- package/src/Competition/components/CompetitionPlay.tsx +936 -0
- package/src/Competition/components/CompetitionSeasonCard.tsx +48 -0
- package/src/Competition/components/CompetitionSelector.tsx +91 -0
- package/src/Competition/components/CompetitionTypeCard.tsx +211 -0
- package/src/Competition/components/EnterCompetitionPrompt.tsx +127 -0
- package/src/Competition/components/LeaderPicks.tsx +214 -0
- package/src/Competition/components/ManageSeasonForm.tsx +271 -0
- package/src/Competition/components/MarketsCard.tsx +108 -0
- package/src/Competition/components/MatchMarketCard.tsx +126 -0
- package/src/Competition/components/NavOutPrompt.tsx +87 -0
- package/src/Competition/components/SeasonInfoModal.tsx +212 -0
- package/src/Competition/components/TeamEventCard.tsx +136 -0
- package/src/Competition/components/WagerPickForm.tsx +114 -0
- package/src/Competition/index.tsx +36 -0
- package/src/Components/Icons.tsx +0 -2
- package/src/Components/Jerseys.tsx +268 -0
- package/src/Components/LinearDiagnal.tsx +2 -3
- package/src/Components/Switch.tsx +55 -0
- package/src/Components/index.tsx +5 -1
- package/src/Poll/api/index.ts +212 -0
- package/src/Poll/components/CampaignPlay.tsx +407 -0
- package/src/Poll/components/CampaignProgressBar.tsx +70 -0
- package/src/Poll/components/CampaignResult.tsx +180 -0
- package/src/Poll/components/CampaignSelector.tsx +96 -0
- package/src/Poll/components/PollCampaignCard.tsx +35 -0
- package/src/Poll/components/PollCard.tsx +335 -0
- package/src/Poll/components/PollOptionCard.tsx +110 -0
- package/src/Poll/components/PollSelectCard.tsx +106 -0
- package/src/Poll/components/ResponseTimer.tsx +37 -0
- package/src/Poll/components/WidgetHeader.tsx +46 -0
- package/src/Poll/flashmarket/index.tsx +231 -0
- package/src/Poll/index.tsx +45 -0
- package/src/ProfileManager/Components/BasicInfoManager.tsx +1 -1
- package/src/ProfileManager/Components/BasicStatus.tsx +1 -2
- package/src/ProfileManager/Components/CodeRedeem.tsx +10 -3
- package/src/ProfileManager/Components/DOBManager.tsx +1 -1
- package/src/ProfileManager/Components/EmailManager.tsx +1 -1
- package/src/ProfileManager/Components/PasswordManager.tsx +2 -1
- package/src/ProfileManager/Components/PhoneManager.tsx +1 -1
- package/src/ProfileManager/Components/ProfilePicManager.tsx +1 -1
- package/src/ProfileManager/Components/ProfileWelcome.tsx +1 -2
- package/src/ProfileManager/Components/ProfileWizard.tsx +14 -3
- package/src/ProfileManager/Components/SettingsManager.tsx +2 -2
- package/src/ProfileManager/Components/VouchCard.tsx +1 -2
- package/src/ProfileManager/api/index.ts +2 -2
- package/src/ProfileManager/api/types.d.ts +0 -35
- package/src/ProfileManager/index.tsx +11 -3
- package/src/Wallet/api/index.ts +6 -4
- package/src/Wallet/components/ACHAddCard.tsx +1 -2
- package/src/Wallet/components/AddressManager.tsx +1 -2
- package/src/Wallet/components/DepositCard.tsx +1 -2
- package/src/Wallet/components/FundAccountCard.tsx +1 -2
- package/src/Wallet/components/ManageAccountCard.tsx +1 -2
- package/src/Wallet/components/ManualACHAdd.tsx +1 -2
- package/src/Wallet/components/ManualCardAdd.tsx +1 -2
- package/src/Wallet/components/MyBalance.tsx +1 -2
- package/src/Wallet/components/WalletActionSelector.tsx +1 -2
- package/src/Wallet/components/WalletSettings.tsx +1 -2
- package/src/Wallet/components/WalletSetup.tsx +1 -2
- package/src/Wallet/components/WithdrawCard.tsx +1 -2
- package/src/Wallet/index.tsx +1 -2
- package/src/index.tsx +5 -2
- 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
|