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.
- package/lib/commonjs/ApiOverrides/index.js +18 -0
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- 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/Observer/api/index.js +3 -0
- package/lib/commonjs/Observer/api/index.js.map +1 -1
- package/lib/commonjs/Poll/api/index.js +240 -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/index.js +31 -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/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/Observer/api/index.js +3 -0
- package/lib/module/Observer/api/index.js.map +1 -1
- package/lib/module/Poll/api/index.js +234 -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/index.js +22 -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/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.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/Observer/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Poll/api/index.d.ts +61 -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/index.d.ts +7 -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/api/index.ts +2 -2
- package/src/Authenticator/api/types.d.ts +1 -25
- package/src/Authenticator/index.tsx +2 -1
- 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/Observer/api/index.ts +1 -0
- package/src/Poll/api/index.ts +178 -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/index.tsx +25 -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 +483 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _colors = _interopRequireDefault(require("../../constants/colors"));
|
|
10
|
+
var _Components = require("../../Components");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
const CampaignProgressBar = ({
|
|
15
|
+
poll_responses,
|
|
16
|
+
active_poll,
|
|
17
|
+
polls,
|
|
18
|
+
onPollSelect
|
|
19
|
+
}) => {
|
|
20
|
+
const [progress_width, setProgressWidth] = (0, _react.useState)(0);
|
|
21
|
+
const getBarColor = pr => {
|
|
22
|
+
switch (pr.result_ind) {
|
|
23
|
+
case 'win':
|
|
24
|
+
return _colors.default.utility.success;
|
|
25
|
+
case 'lose':
|
|
26
|
+
return _colors.default.utility.error;
|
|
27
|
+
default:
|
|
28
|
+
return _colors.default.utility.warning;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const renderProgress = data => {
|
|
32
|
+
let width = progress_width / polls.length;
|
|
33
|
+
let color = _colors.default.shades.white;
|
|
34
|
+
let response = poll_responses.find(pr => pr.poll_id == data.item.poll_id);
|
|
35
|
+
if (response) {
|
|
36
|
+
color = getBarColor(response);
|
|
37
|
+
}
|
|
38
|
+
const active = active_poll == data.item.poll_id ? true : false;
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
40
|
+
onPress: () => onPollSelect(data.item),
|
|
41
|
+
style: {
|
|
42
|
+
margin: 2,
|
|
43
|
+
borderWidth: active ? 2 : 0,
|
|
44
|
+
borderColor: _colors.default.brand.midnight,
|
|
45
|
+
borderRadius: 4,
|
|
46
|
+
height: 20,
|
|
47
|
+
width: width - 4,
|
|
48
|
+
backgroundColor: color
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const questions_answered = poll_responses.length;
|
|
53
|
+
const questions_unanswered = polls.length - questions_answered;
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
55
|
+
style: {
|
|
56
|
+
flexDirection: 'row',
|
|
57
|
+
alignItems: 'center'
|
|
58
|
+
}
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
60
|
+
nativeID: "questions_answered",
|
|
61
|
+
style: {
|
|
62
|
+
flexDirection: 'row',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
margin: 5,
|
|
65
|
+
borderRadius: 4,
|
|
66
|
+
backgroundColor: _colors.default.highlights.highlight400,
|
|
67
|
+
padding: 5
|
|
68
|
+
}
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.UserIcon, {
|
|
70
|
+
color: _colors.default.shades.white,
|
|
71
|
+
size: 12
|
|
72
|
+
}), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
73
|
+
style: {
|
|
74
|
+
marginLeft: 5
|
|
75
|
+
},
|
|
76
|
+
size: 12,
|
|
77
|
+
color: _colors.default.shades.white,
|
|
78
|
+
weight: "semibold"
|
|
79
|
+
}, questions_answered)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
80
|
+
nativeID: "progress_bar",
|
|
81
|
+
style: {
|
|
82
|
+
flex: 1
|
|
83
|
+
},
|
|
84
|
+
onLayout: ev => {
|
|
85
|
+
const {
|
|
86
|
+
width
|
|
87
|
+
} = ev.nativeEvent.layout;
|
|
88
|
+
setProgressWidth(width);
|
|
89
|
+
}
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
91
|
+
data: polls,
|
|
92
|
+
horizontal: true,
|
|
93
|
+
showsHorizontalScrollIndicator: false,
|
|
94
|
+
renderItem: renderProgress
|
|
95
|
+
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
96
|
+
nativeID: "questions_answered",
|
|
97
|
+
style: {
|
|
98
|
+
flexDirection: 'row',
|
|
99
|
+
alignItems: 'center',
|
|
100
|
+
margin: 5,
|
|
101
|
+
borderRadius: 4,
|
|
102
|
+
backgroundColor: _colors.default.utility.warning,
|
|
103
|
+
padding: 5
|
|
104
|
+
}
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.ListIcon, {
|
|
106
|
+
color: _colors.default.shades.white,
|
|
107
|
+
size: 12
|
|
108
|
+
}), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
109
|
+
style: {
|
|
110
|
+
marginLeft: 5
|
|
111
|
+
},
|
|
112
|
+
size: 12,
|
|
113
|
+
color: _colors.default.shades.white,
|
|
114
|
+
weight: "semibold"
|
|
115
|
+
}, questions_unanswered)));
|
|
116
|
+
};
|
|
117
|
+
var _default = exports.default = CampaignProgressBar;
|
|
118
|
+
//# sourceMappingURL=CampaignProgressBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_colors","_interopRequireDefault","_Components","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CampaignProgressBar","poll_responses","active_poll","polls","onPollSelect","progress_width","setProgressWidth","useState","getBarColor","pr","result_ind","Colors","utility","success","error","warning","renderProgress","data","width","length","color","shades","white","response","find","poll_id","item","active","createElement","TouchableOpacity","onPress","style","margin","borderWidth","borderColor","brand","midnight","borderRadius","height","backgroundColor","questions_answered","questions_unanswered","View","flexDirection","alignItems","nativeID","highlights","highlight400","padding","Icons","UserIcon","size","Text","marginLeft","weight","flex","onLayout","ev","nativeEvent","layout","FlatList","horizontal","showsHorizontalScrollIndicator","renderItem","ListIcon","_default","exports"],"sourceRoot":"../../../../src","sources":["Poll/components/CampaignProgressBar.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,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AA,GAEcmB,mBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _api = require("../api");
|
|
10
|
+
var _Components = require("../../Components");
|
|
11
|
+
var _colors = _interopRequireDefault(require("../../constants/colors"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
+
const CampaignResult = ({
|
|
16
|
+
poll_campaign,
|
|
17
|
+
polls,
|
|
18
|
+
poll_responses,
|
|
19
|
+
hide_back,
|
|
20
|
+
onClose,
|
|
21
|
+
onShare
|
|
22
|
+
}) => {
|
|
23
|
+
const [leaders_state, setLeadersState] = (0, _react.useState)({
|
|
24
|
+
loading: false,
|
|
25
|
+
offset: 0,
|
|
26
|
+
poll_campaign_leaders: [],
|
|
27
|
+
players: []
|
|
28
|
+
});
|
|
29
|
+
const [points_expanded, setPointsExpanded] = (0, _react.useState)(false);
|
|
30
|
+
const {
|
|
31
|
+
players,
|
|
32
|
+
poll_campaign_leaders
|
|
33
|
+
} = leaders_state;
|
|
34
|
+
(0, _react.useEffect)(() => {
|
|
35
|
+
getDataFromServer(poll_campaign.poll_campaign_id, 0);
|
|
36
|
+
}, [poll_campaign.poll_campaign_id]);
|
|
37
|
+
const getDataFromServer = async (poll_campaign_id, offset) => {
|
|
38
|
+
setLeadersState({
|
|
39
|
+
...leaders_state,
|
|
40
|
+
loading: true
|
|
41
|
+
});
|
|
42
|
+
const leaders = await _api.PollCampaignApi.getLeadersByCampaignId(poll_campaign_id, offset);
|
|
43
|
+
const player_ids = leaders.map(l => l.player_id);
|
|
44
|
+
const ps = await _api.PollCampaignApi.getPlayersByPlayerIds(player_ids);
|
|
45
|
+
setLeadersState({
|
|
46
|
+
loading: false,
|
|
47
|
+
poll_campaign_leaders: leaders,
|
|
48
|
+
players: ps,
|
|
49
|
+
offset
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const renderTrophy = place => {
|
|
53
|
+
switch (place) {
|
|
54
|
+
case 1:
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement(_Components.Icons.TrophyIcon, {
|
|
56
|
+
color: _colors.default.incentive.gold,
|
|
57
|
+
size: 16
|
|
58
|
+
});
|
|
59
|
+
case 2:
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_Components.Icons.TrophyIcon, {
|
|
61
|
+
color: _colors.default.incentive.silver,
|
|
62
|
+
size: 16
|
|
63
|
+
});
|
|
64
|
+
case 3:
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement(_Components.Icons.TrophyIcon, {
|
|
66
|
+
color: _colors.default.incentive.bronze,
|
|
67
|
+
size: 16
|
|
68
|
+
});
|
|
69
|
+
default:
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const renderLeaders = data => {
|
|
74
|
+
const player = players.find(p => p.player_id == data.item.player_id);
|
|
75
|
+
if (!player) {
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
77
|
+
}
|
|
78
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
79
|
+
style: {
|
|
80
|
+
flexDirection: 'row',
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
margin: 4,
|
|
83
|
+
padding: 10,
|
|
84
|
+
borderRadius: 22,
|
|
85
|
+
backgroundColor: _colors.default.shades.white
|
|
86
|
+
}
|
|
87
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
88
|
+
nativeID: "place",
|
|
89
|
+
style: {
|
|
90
|
+
margin: 5,
|
|
91
|
+
height: 20,
|
|
92
|
+
width: 20,
|
|
93
|
+
justifyContent: 'center',
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
borderRadius: 100,
|
|
96
|
+
borderWidth: 1,
|
|
97
|
+
borderColor: _colors.default.brand.slate
|
|
98
|
+
}
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
100
|
+
size: 10,
|
|
101
|
+
color: _colors.default.brand.midnight,
|
|
102
|
+
weight: "bold",
|
|
103
|
+
textAlign: "center"
|
|
104
|
+
}, data.index + 1)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
105
|
+
nativeID: "player",
|
|
106
|
+
style: {
|
|
107
|
+
flex: 1,
|
|
108
|
+
flexDirection: 'row',
|
|
109
|
+
alignItems: 'center'
|
|
110
|
+
}
|
|
111
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
112
|
+
nativeID: "profile_pic",
|
|
113
|
+
style: {
|
|
114
|
+
marginRight: 10
|
|
115
|
+
}
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
117
|
+
source: {
|
|
118
|
+
uri: player.profile_pic && player.profile_pic != '' ? player.profile_pic : 'https://res.cloudinary.com/hoabts6mc/image/upload/v1689262384/default-avatar_bbkn2t.png'
|
|
119
|
+
},
|
|
120
|
+
style: {
|
|
121
|
+
height: 40,
|
|
122
|
+
width: 40,
|
|
123
|
+
borderRadius: 100
|
|
124
|
+
},
|
|
125
|
+
resizeMode: "cover"
|
|
126
|
+
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
127
|
+
style: {
|
|
128
|
+
flex: 1
|
|
129
|
+
},
|
|
130
|
+
nativeID: "name"
|
|
131
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
132
|
+
size: 14,
|
|
133
|
+
color: _colors.default.brand.midnight,
|
|
134
|
+
weight: "bold"
|
|
135
|
+
}, player.username), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
136
|
+
style: {
|
|
137
|
+
marginTop: 3
|
|
138
|
+
},
|
|
139
|
+
size: 12,
|
|
140
|
+
color: _colors.default.brand.midnight,
|
|
141
|
+
weight: "regular"
|
|
142
|
+
}, data.item.winnings.toFixed(2), " Points")), /*#__PURE__*/_react.default.createElement(_reactNative.View, null, renderTrophy(data.index + 1))));
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
//const questions_answered = poll_responses.length
|
|
146
|
+
let correct_answers = poll_responses.filter(pr => pr.result_ind == 'win').length;
|
|
147
|
+
//let incorrect_answers = poll_responses.filter(pr => pr.result_ind == 'lose').length
|
|
148
|
+
let ungraded_answers = poll_responses.filter(pr => !pr.result_ind).length;
|
|
149
|
+
let points_earned = poll_responses.reduce((a, b) => a + b.winnings, 0);
|
|
150
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
151
|
+
style: {
|
|
152
|
+
flex: 1
|
|
153
|
+
}
|
|
154
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
155
|
+
style: {
|
|
156
|
+
flex: 1,
|
|
157
|
+
padding: 10,
|
|
158
|
+
marginBottom: 10
|
|
159
|
+
}
|
|
160
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
161
|
+
style: {
|
|
162
|
+
flexDirection: 'row',
|
|
163
|
+
padding: 10,
|
|
164
|
+
paddingRight: 15,
|
|
165
|
+
paddingLeft: 15,
|
|
166
|
+
borderRadius: 22,
|
|
167
|
+
justifyContent: 'center',
|
|
168
|
+
alignItems: 'center',
|
|
169
|
+
marginBottom: 10,
|
|
170
|
+
backgroundColor: _colors.default.incentive.gold
|
|
171
|
+
},
|
|
172
|
+
onPress: () => {
|
|
173
|
+
if (onShare) {
|
|
174
|
+
onShare();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.ShareSocialIcon, {
|
|
178
|
+
color: _colors.default.shades.white,
|
|
179
|
+
size: 14
|
|
180
|
+
}), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
181
|
+
style: {
|
|
182
|
+
marginLeft: 5
|
|
183
|
+
},
|
|
184
|
+
size: 14,
|
|
185
|
+
color: _colors.default.shades.white,
|
|
186
|
+
weight: "bold"
|
|
187
|
+
}, "Share your results for a chance at a prize!")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
188
|
+
nativeID: "my_results"
|
|
189
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
190
|
+
style: {
|
|
191
|
+
margin: 10
|
|
192
|
+
},
|
|
193
|
+
size: 16,
|
|
194
|
+
color: _colors.default.brand.midnight,
|
|
195
|
+
weight: "bold"
|
|
196
|
+
}, "My Results"), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
197
|
+
style: {
|
|
198
|
+
borderRadius: 22,
|
|
199
|
+
backgroundColor: _colors.default.shades.shade100,
|
|
200
|
+
padding: 20
|
|
201
|
+
}
|
|
202
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
203
|
+
nativeID: "completion",
|
|
204
|
+
style: {
|
|
205
|
+
flexDirection: 'row'
|
|
206
|
+
}
|
|
207
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
208
|
+
nativeID: "total_questions",
|
|
209
|
+
style: {
|
|
210
|
+
flex: 1
|
|
211
|
+
}
|
|
212
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
213
|
+
size: 12,
|
|
214
|
+
color: _colors.default.brand.slate,
|
|
215
|
+
weight: "semibold"
|
|
216
|
+
}, "TOTAL QUESTIONS"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
217
|
+
style: {
|
|
218
|
+
marginTop: 5
|
|
219
|
+
},
|
|
220
|
+
size: 16,
|
|
221
|
+
color: _colors.default.brand.midnight,
|
|
222
|
+
weight: "bold"
|
|
223
|
+
}, polls.length, " Questions")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
224
|
+
nativeID: "completion_pct",
|
|
225
|
+
style: {
|
|
226
|
+
flex: 1
|
|
227
|
+
}
|
|
228
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
229
|
+
size: 12,
|
|
230
|
+
color: _colors.default.brand.slate,
|
|
231
|
+
weight: "semibold"
|
|
232
|
+
}, "COMPLETION"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
233
|
+
style: {
|
|
234
|
+
marginTop: 5
|
|
235
|
+
},
|
|
236
|
+
size: 16,
|
|
237
|
+
color: _colors.default.brand.midnight,
|
|
238
|
+
weight: "bold"
|
|
239
|
+
}, ((polls.length - ungraded_answers) / polls.length * 100).toFixed(), "%"))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
240
|
+
nativeID: "performance",
|
|
241
|
+
style: {
|
|
242
|
+
flexDirection: 'row',
|
|
243
|
+
marginTop: 10
|
|
244
|
+
}
|
|
245
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
246
|
+
nativeID: "total_questions",
|
|
247
|
+
style: {
|
|
248
|
+
flex: 1
|
|
249
|
+
}
|
|
250
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
251
|
+
size: 12,
|
|
252
|
+
color: _colors.default.brand.slate,
|
|
253
|
+
weight: "semibold"
|
|
254
|
+
}, "SUCCESS RATE"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
255
|
+
style: {
|
|
256
|
+
marginTop: 5
|
|
257
|
+
},
|
|
258
|
+
size: 16,
|
|
259
|
+
color: _colors.default.brand.midnight,
|
|
260
|
+
weight: "bold"
|
|
261
|
+
}, (correct_answers / polls.length * 100).toFixed(), "%")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
262
|
+
nativeID: "completion_pct",
|
|
263
|
+
style: {
|
|
264
|
+
flex: 1
|
|
265
|
+
}
|
|
266
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
267
|
+
size: 12,
|
|
268
|
+
color: _colors.default.brand.slate,
|
|
269
|
+
weight: "semibold"
|
|
270
|
+
}, "POINTS EARNED"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
271
|
+
style: {
|
|
272
|
+
marginTop: 5
|
|
273
|
+
},
|
|
274
|
+
size: 16,
|
|
275
|
+
color: _colors.default.brand.midnight,
|
|
276
|
+
weight: "bold"
|
|
277
|
+
}, points_earned.toFixed(), " Points"))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
278
|
+
style: {
|
|
279
|
+
borderRadius: 22,
|
|
280
|
+
backgroundColor: _colors.default.highlights.highlight200Faded,
|
|
281
|
+
padding: 10,
|
|
282
|
+
marginTop: 10
|
|
283
|
+
}
|
|
284
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
285
|
+
style: {
|
|
286
|
+
flexDirection: 'row',
|
|
287
|
+
alignItems: 'center'
|
|
288
|
+
},
|
|
289
|
+
onPress: () => setPointsExpanded(!points_expanded)
|
|
290
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
291
|
+
style: {
|
|
292
|
+
flexDirection: 'row',
|
|
293
|
+
alignItems: 'center',
|
|
294
|
+
flex: 1
|
|
295
|
+
}
|
|
296
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Icons.AlertIcon, {
|
|
297
|
+
color: _colors.default.brand.midnight,
|
|
298
|
+
size: 14
|
|
299
|
+
}), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
300
|
+
style: {
|
|
301
|
+
marginLeft: 5
|
|
302
|
+
},
|
|
303
|
+
size: 14,
|
|
304
|
+
color: _colors.default.brand.midnight,
|
|
305
|
+
weight: "semibold"
|
|
306
|
+
}, "How are points calculated?")), /*#__PURE__*/_react.default.createElement(_Components.Icons.ChevronIcon, {
|
|
307
|
+
direction: points_expanded ? 'up' : 'down',
|
|
308
|
+
color: _colors.default.brand.midnight
|
|
309
|
+
})), points_expanded ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
310
|
+
size: 12,
|
|
311
|
+
color: _colors.default.brand.midnight,
|
|
312
|
+
style: {
|
|
313
|
+
marginTop: 10
|
|
314
|
+
},
|
|
315
|
+
weight: "regular"
|
|
316
|
+
}, "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."), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
317
|
+
size: 12,
|
|
318
|
+
color: _colors.default.brand.midnight,
|
|
319
|
+
style: {
|
|
320
|
+
marginTop: 5
|
|
321
|
+
},
|
|
322
|
+
weight: "regular"
|
|
323
|
+
}, "Therefore, points earned will not be updated until the question is closed!")) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null)))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
324
|
+
nativeID: "leader_header",
|
|
325
|
+
style: {
|
|
326
|
+
margin: 10,
|
|
327
|
+
flexDirection: 'row',
|
|
328
|
+
alignItems: 'center'
|
|
329
|
+
}
|
|
330
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
331
|
+
style: {
|
|
332
|
+
flex: 1
|
|
333
|
+
},
|
|
334
|
+
size: 16,
|
|
335
|
+
color: _colors.default.brand.midnight,
|
|
336
|
+
weight: "bold"
|
|
337
|
+
}, "Leaderboard"), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
338
|
+
style: {
|
|
339
|
+
borderRadius: 22,
|
|
340
|
+
padding: 10,
|
|
341
|
+
backgroundColor: _colors.default.accents.accent100
|
|
342
|
+
}
|
|
343
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
344
|
+
size: 14,
|
|
345
|
+
color: _colors.default.brand.midnight,
|
|
346
|
+
weight: "regular",
|
|
347
|
+
textAlign: "center"
|
|
348
|
+
}, poll_campaign.total_responders, " Participants"))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
349
|
+
nativeID: "leaderboard",
|
|
350
|
+
style: {
|
|
351
|
+
flex: 1,
|
|
352
|
+
borderTopRightRadius: 22,
|
|
353
|
+
borderTopLeftRadius: 22,
|
|
354
|
+
padding: 10,
|
|
355
|
+
backgroundColor: _colors.default.shades.shade100
|
|
356
|
+
}
|
|
357
|
+
}, poll_campaign.status == 'active' ? /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
358
|
+
size: 12,
|
|
359
|
+
color: _colors.default.utility.warning,
|
|
360
|
+
textAlign: "center"
|
|
361
|
+
}, "Points change as new responses come in") : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
362
|
+
data: poll_campaign_leaders,
|
|
363
|
+
renderItem: renderLeaders,
|
|
364
|
+
keyExtractor: item => item.player_id.toString()
|
|
365
|
+
}))), !hide_back ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
366
|
+
nativeID: "result_actions",
|
|
367
|
+
style: {
|
|
368
|
+
marginTop: 5,
|
|
369
|
+
padding: 10
|
|
370
|
+
}
|
|
371
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Button, {
|
|
372
|
+
title: "Go Back",
|
|
373
|
+
title_color: _colors.default.brand.electric,
|
|
374
|
+
borderWidth: 1,
|
|
375
|
+
padding: 14,
|
|
376
|
+
borderColor: _colors.default.brand.electric,
|
|
377
|
+
onPress: () => onClose(),
|
|
378
|
+
borderRadius: 22
|
|
379
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null));
|
|
380
|
+
};
|
|
381
|
+
var _default = exports.default = CampaignResult;
|
|
382
|
+
//# sourceMappingURL=CampaignResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_api","_Components","_colors","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CampaignResult","poll_campaign","polls","poll_responses","hide_back","onClose","onShare","leaders_state","setLeadersState","useState","loading","offset","poll_campaign_leaders","players","points_expanded","setPointsExpanded","useEffect","getDataFromServer","poll_campaign_id","leaders","PollCampaignApi","getLeadersByCampaignId","player_ids","map","l","player_id","ps","getPlayersByPlayerIds","renderTrophy","place","createElement","Icons","TrophyIcon","color","Colors","incentive","gold","size","silver","bronze","Fragment","renderLeaders","data","player","find","p","item","View","style","flexDirection","alignItems","margin","padding","borderRadius","backgroundColor","shades","white","nativeID","height","width","justifyContent","borderWidth","borderColor","brand","slate","Text","midnight","weight","textAlign","index","flex","marginRight","Image","source","uri","profile_pic","resizeMode","username","marginTop","winnings","toFixed","correct_answers","filter","pr","result_ind","length","ungraded_answers","points_earned","reduce","b","ScrollView","marginBottom","TouchableOpacity","paddingRight","paddingLeft","onPress","ShareSocialIcon","marginLeft","shade100","highlights","highlight200Faded","AlertIcon","ChevronIcon","direction","accents","accent100","total_responders","borderTopRightRadius","borderTopLeftRadius","status","utility","warning","FlatList","renderItem","keyExtractor","toString","Button","title","title_color","electric","_default","exports"],"sourceRoot":"../../../../src","sources":["Poll/components/CampaignResult.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA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,MAAA,CAAAU,OAAA,CAAAiD,aAAA,CAACxD,YAAA,CAAAyE,IAAI;IAACU,QAAQ,EAAC,gBAAgB;IAACT,KAAK,EAAE;MAAE8B,SAAS,EAAC,CAAC;MAAE1B,OAAO,EAAC;IAAG;EAAE,gBAC/DjF,MAAA,CAAAU,OAAA,CAAAiD,aAAA,CAACtD,WAAA,CAAA4I,MAAM;IACHC,KAAK,EAAC,SAAS;IACfC,WAAW,EAAEpF,eAAM,CAAC6B,KAAK,CAACwD,QAAS;IACnC1D,WAAW,EAAE,CAAE;IACfT,OAAO,EAAE,EAAG;IACZU,WAAW,EAAE5B,eAAM,CAAC6B,KAAK,CAACwD,QAAS;IACnCxB,OAAO,EAAEA,CAAA,KAAM1F,OAAO,CAAC,CAAE;IACzBgD,YAAY,EAAE;EAAG,CACpB,CACC,CAAC,gBACNlF,MAAA,CAAAU,OAAA,CAAAiD,aAAA,CAAA3D,MAAA,CAAAU,OAAA,CAAA2D,QAAA,MAAI,CACH,CAAC;AAEf,CAAC;AAAA,IAAAgF,QAAA,GAAAC,OAAA,CAAA5I,OAAA,GAEcmB,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _PollCampaignCard = _interopRequireDefault(require("./PollCampaignCard"));
|
|
10
|
+
var _api = require("../api");
|
|
11
|
+
var _Components = require("../../Components");
|
|
12
|
+
var _colors = _interopRequireDefault(require("../../constants/colors"));
|
|
13
|
+
var _momentMini = _interopRequireDefault(require("moment-mini"));
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
const CampaignSelector = ({
|
|
18
|
+
company_short_name,
|
|
19
|
+
onCampaignSelect
|
|
20
|
+
}) => {
|
|
21
|
+
const [data, setData] = (0, _react.useState)({
|
|
22
|
+
loading: false,
|
|
23
|
+
campaign_offset: 0,
|
|
24
|
+
poll_campaigns: []
|
|
25
|
+
});
|
|
26
|
+
const [selected_campaign, setSelectedCampaign] = (0, _react.useState)(undefined);
|
|
27
|
+
//Poll campaigns from redux store
|
|
28
|
+
const {
|
|
29
|
+
loading,
|
|
30
|
+
poll_campaigns
|
|
31
|
+
} = data;
|
|
32
|
+
(0, _react.useEffect)(() => {
|
|
33
|
+
getPollCampaignFromServer(company_short_name, 0);
|
|
34
|
+
}, [company_short_name]);
|
|
35
|
+
const getPollCampaignFromServer = async (code, offset) => {
|
|
36
|
+
setData({
|
|
37
|
+
...data,
|
|
38
|
+
loading: false
|
|
39
|
+
});
|
|
40
|
+
const pcs = await _api.PollCampaignApi.getPollCampaignsByCompanyCode(code, offset, 'active');
|
|
41
|
+
setData({
|
|
42
|
+
...data,
|
|
43
|
+
campaign_offset: offset,
|
|
44
|
+
poll_campaigns: pcs
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const renderPollCampaigns = data => {
|
|
48
|
+
const selected = selected_campaign?.poll_campaign_id == data.item.poll_campaign_id ? true : false;
|
|
49
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
50
|
+
style: {
|
|
51
|
+
margin: 10,
|
|
52
|
+
width: 125
|
|
53
|
+
}
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_PollCampaignCard.default, {
|
|
55
|
+
selected: selected,
|
|
56
|
+
poll_campaign: data.item,
|
|
57
|
+
onSelect: poll_campaign => {
|
|
58
|
+
if (selected) {
|
|
59
|
+
setSelectedCampaign(undefined);
|
|
60
|
+
} else {
|
|
61
|
+
setSelectedCampaign(poll_campaign);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
65
|
+
};
|
|
66
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
67
|
+
style: {
|
|
68
|
+
flex: 1,
|
|
69
|
+
backgroundColor: _colors.default.shades.white,
|
|
70
|
+
borderRadius: 22
|
|
71
|
+
}
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
73
|
+
style: {
|
|
74
|
+
flex: 1
|
|
75
|
+
}
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
77
|
+
style: {
|
|
78
|
+
padding: 10
|
|
79
|
+
},
|
|
80
|
+
textAlign: "center",
|
|
81
|
+
size: 24,
|
|
82
|
+
color: _colors.default.brand.midnight,
|
|
83
|
+
weight: "bold"
|
|
84
|
+
}, "Select One!"), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
85
|
+
nativeID: "poll_campaigns",
|
|
86
|
+
style: {
|
|
87
|
+
alignItems: 'center'
|
|
88
|
+
}
|
|
89
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
90
|
+
numColumns: 2,
|
|
91
|
+
data: poll_campaigns.sort((a, b) => (0, _momentMini.default)(b.create_datetime).unix() - (0, _momentMini.default)(a.create_datetime).unix()),
|
|
92
|
+
renderItem: renderPollCampaigns
|
|
93
|
+
}), loading ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
94
|
+
style: {
|
|
95
|
+
padding: 20
|
|
96
|
+
}
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
|
|
98
|
+
style: {
|
|
99
|
+
alignSelf: 'center'
|
|
100
|
+
},
|
|
101
|
+
size: "large",
|
|
102
|
+
color: _colors.default.brand.midnight
|
|
103
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
104
|
+
style: {
|
|
105
|
+
padding: 10,
|
|
106
|
+
borderRadius: 22
|
|
107
|
+
}
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Button, {
|
|
109
|
+
padding: 10,
|
|
110
|
+
disabled: selected_campaign ? false : true,
|
|
111
|
+
title: !selected_campaign ? 'Select Campaign' : `Lets Go!`,
|
|
112
|
+
title_color: _colors.default.shades.white,
|
|
113
|
+
backgroundColor: selected_campaign ? _colors.default.brand.midnight : _colors.default.brand.slate,
|
|
114
|
+
borderRadius: 22,
|
|
115
|
+
onPress: () => {
|
|
116
|
+
if (!selected_campaign) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
onCampaignSelect(selected_campaign);
|
|
120
|
+
}
|
|
121
|
+
})));
|
|
122
|
+
};
|
|
123
|
+
var _default = exports.default = CampaignSelector;
|
|
124
|
+
//# sourceMappingURL=CampaignSelector.js.map
|