be-components 0.7.3 → 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/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/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/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/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,655 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PlayerPicksApi = exports.IN_PROGRESS_STATUSES = exports.FINALIZED_STATUSES = exports.CompetitionSeasonApi = exports.CompetitionResultApi = exports.CompetitionPlayerApi = exports.CompetitionMatchApi = exports.CompetitionHelpers = exports.CompetitionApi = void 0;
|
|
7
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
8
|
+
var _ApiOverrides = require("../../ApiOverrides");
|
|
9
|
+
var _momentMini = _interopRequireDefault(require("moment-mini"));
|
|
10
|
+
var _colors = _interopRequireDefault(require("../../constants/colors"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
let AUTH_SVC_API = '';
|
|
13
|
+
let TP_SVC_API = '';
|
|
14
|
+
let EVENT_SVC_API = '';
|
|
15
|
+
let MK_SVC_API = '';
|
|
16
|
+
const CompetitionSeasonApi = exports.CompetitionSeasonApi = {
|
|
17
|
+
createCompetitionSeason: async competition_season => {
|
|
18
|
+
const resp = await _axios.default.post(`${TP_SVC_API}/v1/competitions/season/create`, {
|
|
19
|
+
competition_season
|
|
20
|
+
});
|
|
21
|
+
return resp.data.competition_season;
|
|
22
|
+
},
|
|
23
|
+
updateCompetitionSeason: async competition_season => {
|
|
24
|
+
const resp = await _axios.default.post(`${TP_SVC_API}/v1/competitions/season/update`, {
|
|
25
|
+
competition_season
|
|
26
|
+
});
|
|
27
|
+
return resp.data.competition_season;
|
|
28
|
+
},
|
|
29
|
+
getCompetitionSeasonTemplates: async league_id => {
|
|
30
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/seasons/templates?league_id=${league_id}`);
|
|
31
|
+
return resp.data.competition_seasons;
|
|
32
|
+
},
|
|
33
|
+
getCompetitionSeasonsByAdminId: async status => {
|
|
34
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/seasons/me?status=${status}`);
|
|
35
|
+
return resp.data.competition_seasons;
|
|
36
|
+
},
|
|
37
|
+
getCompetitionSeasonById: async competition_season_id => {
|
|
38
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/seasons/season/${competition_season_id}`);
|
|
39
|
+
return resp.data.competition_season;
|
|
40
|
+
},
|
|
41
|
+
getLeaderboardBySeasonId: async competition_season_id => {
|
|
42
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/leaderboard/season/${competition_season_id}`);
|
|
43
|
+
return resp.data.season_leaderboard;
|
|
44
|
+
},
|
|
45
|
+
getSponsoredCompetitionSeasons: async sponsor_id => {
|
|
46
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/seasons/sponsored/${sponsor_id}`);
|
|
47
|
+
return resp.data.competition_seasons;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const CompetitionApi = exports.CompetitionApi = {
|
|
51
|
+
setEnvironment: () => {
|
|
52
|
+
const endpoints = _ApiOverrides.APIOverrides.getEndpoints();
|
|
53
|
+
TP_SVC_API = endpoints['TP_SVC_API'];
|
|
54
|
+
EVENT_SVC_API = endpoints['EVENT_SVC_API'];
|
|
55
|
+
MK_SVC_API = endpoints['MK_SVC_API'];
|
|
56
|
+
AUTH_SVC_API = endpoints['AUTH_SVC_API'];
|
|
57
|
+
},
|
|
58
|
+
getPlayersByPlayerIds: async player_ids => {
|
|
59
|
+
const resp = await _axios.default.post(`${AUTH_SVC_API}/v1/players/bulk/get`, {
|
|
60
|
+
player_ids
|
|
61
|
+
});
|
|
62
|
+
return resp.data.players;
|
|
63
|
+
},
|
|
64
|
+
getLeagues: async () => {
|
|
65
|
+
const resp = await _axios.default.get(`${EVENT_SVC_API}/v1/leagues?status=active`);
|
|
66
|
+
return resp.data.leagues;
|
|
67
|
+
},
|
|
68
|
+
getMarkets: async () => {
|
|
69
|
+
const resp = await _axios.default.get(`${MK_SVC_API}/v1/markets/all`);
|
|
70
|
+
return resp.data.markets;
|
|
71
|
+
},
|
|
72
|
+
getLeagueById: async league_id => {
|
|
73
|
+
const resp = await _axios.default.get(`${EVENT_SVC_API}/v1/leagues/league/${league_id}`);
|
|
74
|
+
return resp.data.league;
|
|
75
|
+
},
|
|
76
|
+
getCompetitionsByCompanyId: async (company_id, offset, status) => {
|
|
77
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/company/${company_id}?offset=${offset}&status=${status}`);
|
|
78
|
+
return resp.data.competitions;
|
|
79
|
+
},
|
|
80
|
+
getCompetitionById: async competition_id => {
|
|
81
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/competition/${competition_id}`);
|
|
82
|
+
return resp.data.competition;
|
|
83
|
+
},
|
|
84
|
+
getCompetitionMatchesByCompetitionId: async competition_id => {
|
|
85
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/matches/${competition_id}`);
|
|
86
|
+
return {
|
|
87
|
+
competition_matches: resp.data.competition_matches,
|
|
88
|
+
competition_match_markets: resp.data.competition_match_markets
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
getEnteredCompetitions: async () => {
|
|
92
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/entered`);
|
|
93
|
+
return resp.data;
|
|
94
|
+
},
|
|
95
|
+
getCompetitionsBySeasonId: async competition_season_id => {
|
|
96
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/season/${competition_season_id}`);
|
|
97
|
+
return resp.data.competitions;
|
|
98
|
+
},
|
|
99
|
+
createCompetition: async draft_competition => {
|
|
100
|
+
const resp = await _axios.default.post(`${TP_SVC_API}/v1/competitions/competition/create`, {
|
|
101
|
+
draft_competition
|
|
102
|
+
});
|
|
103
|
+
return resp.data;
|
|
104
|
+
},
|
|
105
|
+
editCompetition: async draft_competition => {
|
|
106
|
+
const resp = await _axios.default.post(`${TP_SVC_API}/v1/competitions/competition/edit`, {
|
|
107
|
+
draft_competition
|
|
108
|
+
});
|
|
109
|
+
return resp.data;
|
|
110
|
+
},
|
|
111
|
+
getPublicCompetitions: async offset => {
|
|
112
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/all?offset=${offset}&status=scheduled`);
|
|
113
|
+
return resp.data.competitions;
|
|
114
|
+
},
|
|
115
|
+
getActiveSponsoredCompetitions: async sponsor_id => {
|
|
116
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/sponsored/${sponsor_id}`);
|
|
117
|
+
return resp.data.competitions;
|
|
118
|
+
},
|
|
119
|
+
getCompetitionOptions: async () => {
|
|
120
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/options`);
|
|
121
|
+
return resp.data;
|
|
122
|
+
},
|
|
123
|
+
getMyDetails: async () => {
|
|
124
|
+
const resp = await _axios.default.get(`${AUTH_SVC_API}/v1/players/player/me`);
|
|
125
|
+
return resp.data.player;
|
|
126
|
+
},
|
|
127
|
+
getMyReferralCode: async () => {
|
|
128
|
+
const resp = await _axios.default.get(`${AUTH_SVC_API}/v1/promos/referral/me`);
|
|
129
|
+
return resp.data;
|
|
130
|
+
},
|
|
131
|
+
getMyBalance: async () => {
|
|
132
|
+
const resp = await _axios.default.get(`${AUTH_SVC_API}/v1/players/player/balance/me`);
|
|
133
|
+
return resp.data.player_balance;
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const CompetitionMatchApi = exports.CompetitionMatchApi = {
|
|
137
|
+
getCompetitionMatchesByCompetitionId: async (competition_id, status) => {
|
|
138
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/matches/${competition_id}?status=${status}`);
|
|
139
|
+
return resp.data;
|
|
140
|
+
},
|
|
141
|
+
getEventsByEventIds: async event_ids => {
|
|
142
|
+
const resp = await _axios.default.post(`${EVENT_SVC_API}/v1/events/bulk/get`, {
|
|
143
|
+
attribute: 'event_id',
|
|
144
|
+
values: event_ids
|
|
145
|
+
});
|
|
146
|
+
return resp.data.events;
|
|
147
|
+
},
|
|
148
|
+
getMatchesByMatchIds: async match_ids => {
|
|
149
|
+
const resp = await _axios.default.post(`${EVENT_SVC_API}/v1/matches/bulk/get`, {
|
|
150
|
+
attribute: 'match_id',
|
|
151
|
+
values: match_ids
|
|
152
|
+
});
|
|
153
|
+
return resp.data.matches;
|
|
154
|
+
},
|
|
155
|
+
getAthletesByIds: async athlete_ids => {
|
|
156
|
+
const resp = await _axios.default.post(`${EVENT_SVC_API}/v1/athletes/bulk/get`, {
|
|
157
|
+
attribute: 'athlete_id',
|
|
158
|
+
values: athlete_ids
|
|
159
|
+
});
|
|
160
|
+
return resp.data.athletes;
|
|
161
|
+
},
|
|
162
|
+
getTournamentsByTournamentIds: async tournament_ids => {
|
|
163
|
+
const resp = await _axios.default.post(`${EVENT_SVC_API}/v1/tournaments/bulk/get`, {
|
|
164
|
+
attribute: 'event_id',
|
|
165
|
+
values: tournament_ids
|
|
166
|
+
});
|
|
167
|
+
return resp.data.tournaments;
|
|
168
|
+
},
|
|
169
|
+
getTeamsByIds: async team_ids => {
|
|
170
|
+
const resp = await _axios.default.post(`${EVENT_SVC_API}/v1/teams/bulk/get`, {
|
|
171
|
+
attribute: 'team_id',
|
|
172
|
+
values: team_ids
|
|
173
|
+
});
|
|
174
|
+
return resp.data.teams;
|
|
175
|
+
},
|
|
176
|
+
getExoticsByIds: async exotic_ids => {
|
|
177
|
+
const resp = await _axios.default.post(`${EVENT_SVC_API}/v1/exotics/bulk/get`, {
|
|
178
|
+
attribute: 'exotic_id',
|
|
179
|
+
values: exotic_ids
|
|
180
|
+
});
|
|
181
|
+
return resp.data.athletes;
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
const CompetitionPlayerApi = exports.CompetitionPlayerApi = {
|
|
185
|
+
getCompetitionPlayersByCompetition: async (competition_id, offset, status) => {
|
|
186
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/competitions/players/${competition_id}?offset=${offset}&status=${status}`);
|
|
187
|
+
return resp.data.competition_players;
|
|
188
|
+
},
|
|
189
|
+
joinCompetition: async competition_player => {
|
|
190
|
+
const resp = await _axios.default.post(`${TP_SVC_API}/v1/competitions/player/join`, {
|
|
191
|
+
competition_player
|
|
192
|
+
});
|
|
193
|
+
return resp.data;
|
|
194
|
+
},
|
|
195
|
+
leaveCompetition: async competition_player => {
|
|
196
|
+
const resp = await _axios.default.post(`${TP_SVC_API}/v1/competitions/player/leave`, {
|
|
197
|
+
competition_player
|
|
198
|
+
});
|
|
199
|
+
return resp.data;
|
|
200
|
+
},
|
|
201
|
+
rejectCompetition: async competition_player => {
|
|
202
|
+
const resp = await _axios.default.post(`${TP_SVC_API}/v1/competitions/player/leave`, {
|
|
203
|
+
competition_player
|
|
204
|
+
});
|
|
205
|
+
return resp.data.competition_player;
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const PlayerPicksApi = exports.PlayerPicksApi = {
|
|
209
|
+
getPlayerPicksByCompetition: async (competition_id, player_id, offset) => {
|
|
210
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/picks/competition/${competition_id}?player_id=${player_id}&offset=${offset}`);
|
|
211
|
+
return resp.data.player_picks;
|
|
212
|
+
},
|
|
213
|
+
createPlayerPick: async player_pick => {
|
|
214
|
+
const resp = await _axios.default.post(`${TP_SVC_API}/v1/picks/pick/create`, {
|
|
215
|
+
player_pick
|
|
216
|
+
});
|
|
217
|
+
return resp.data;
|
|
218
|
+
},
|
|
219
|
+
removePlayerPick: async player_pick_id => {
|
|
220
|
+
const resp = await _axios.default.post(`${TP_SVC_API}/v1/picks/pick/remove`, {
|
|
221
|
+
player_pick_id
|
|
222
|
+
});
|
|
223
|
+
return resp.data;
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
const CompetitionResultApi = exports.CompetitionResultApi = {
|
|
227
|
+
getResultsByCompetition: async (competition_id, offset, player_id_override) => {
|
|
228
|
+
const resp = await _axios.default.get(`${TP_SVC_API}/v1/results/competition/${competition_id}?offset=${offset}&player_id=${player_id_override}`);
|
|
229
|
+
return resp.data;
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
const FINALIZED_STATUSES = exports.FINALIZED_STATUSES = ['closed', 'complete', 'cancelled', 'unnecessary', 'postponed', 'suspended'];
|
|
233
|
+
const IN_PROGRESS_STATUSES = exports.IN_PROGRESS_STATUSES = ['inprogress', 'halftime', 'intermission'];
|
|
234
|
+
const CompetitionHelpers = exports.CompetitionHelpers = {
|
|
235
|
+
getReferralDescription: promo => {
|
|
236
|
+
switch (promo.type) {
|
|
237
|
+
case 'promo_code':
|
|
238
|
+
return `Get ${promo.amount} promo bucks after you verify your account`;
|
|
239
|
+
case 'promo_sweepstakes':
|
|
240
|
+
return `Have a chance at UP TO 500 promo bucks after you verify your account`;
|
|
241
|
+
case 'referral_code':
|
|
242
|
+
return `Get ${promo.amount} promo bucks after you verify your account. Your referrer will get the same after you make your first deposit`;
|
|
243
|
+
case 'referral_sweepstakes':
|
|
244
|
+
return `Have a chance at UP TO 500 promo bucks after you verify your account. Your referrer will get the same after you make your first deposit`;
|
|
245
|
+
default:
|
|
246
|
+
return '';
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
getEmptyCompetitionSeason: () => {
|
|
250
|
+
return {
|
|
251
|
+
competition_season_id: '',
|
|
252
|
+
season_name: '',
|
|
253
|
+
season_description: '',
|
|
254
|
+
image: {
|
|
255
|
+
url: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1635988385/be_notify_icon_nqplfc.png'
|
|
256
|
+
},
|
|
257
|
+
payout_allocation: 0,
|
|
258
|
+
payout_amt: 0,
|
|
259
|
+
allow_late_buy_in: false,
|
|
260
|
+
single_buy_in: true,
|
|
261
|
+
competition_result_type_id: '1',
|
|
262
|
+
admin_id: '',
|
|
263
|
+
status: 'active',
|
|
264
|
+
scheduled_datetime: (0, _momentMini.default)().add(10, 'days'),
|
|
265
|
+
create_datetime: '',
|
|
266
|
+
last_update_datetime: '',
|
|
267
|
+
market_type: 'FOR_MONEY'
|
|
268
|
+
};
|
|
269
|
+
},
|
|
270
|
+
formatPlace: place => {
|
|
271
|
+
switch (place) {
|
|
272
|
+
case 1:
|
|
273
|
+
return '1st';
|
|
274
|
+
case 2:
|
|
275
|
+
return '2nd';
|
|
276
|
+
case 3:
|
|
277
|
+
return '3rd';
|
|
278
|
+
case 4:
|
|
279
|
+
return '4th';
|
|
280
|
+
case 5:
|
|
281
|
+
return '5th';
|
|
282
|
+
case 6:
|
|
283
|
+
return '6th';
|
|
284
|
+
case 7:
|
|
285
|
+
return '7th';
|
|
286
|
+
case 8:
|
|
287
|
+
return '8th';
|
|
288
|
+
case 9:
|
|
289
|
+
return '9th';
|
|
290
|
+
default:
|
|
291
|
+
return `${place}`;
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
isSeasonValid: s => {
|
|
295
|
+
if (!s.season_name) {
|
|
296
|
+
return false;
|
|
297
|
+
}
|
|
298
|
+
if (!s.season_description) {
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
if (!s.competition_result_type_id) {
|
|
302
|
+
return false;
|
|
303
|
+
}
|
|
304
|
+
return true;
|
|
305
|
+
},
|
|
306
|
+
getEmptyCompetition: () => {
|
|
307
|
+
return {
|
|
308
|
+
competition_id: '',
|
|
309
|
+
auth_strategy_id: '',
|
|
310
|
+
competition_name: '',
|
|
311
|
+
competition_description: '',
|
|
312
|
+
buy_in: 0,
|
|
313
|
+
admin_id: '',
|
|
314
|
+
image: {
|
|
315
|
+
url: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1635988385/be_notify_icon_nqplfc.png'
|
|
316
|
+
},
|
|
317
|
+
ticket_revenue: 0,
|
|
318
|
+
tickets_sold: 0,
|
|
319
|
+
available_tickets: 10,
|
|
320
|
+
market_ids: [],
|
|
321
|
+
market_type: 'FOR_MONEY',
|
|
322
|
+
status: 'scheduled',
|
|
323
|
+
create_datetime: '',
|
|
324
|
+
last_update_datetime: '',
|
|
325
|
+
competition_type_id: '1',
|
|
326
|
+
competition_result_type_id: '1',
|
|
327
|
+
scheduled_datetime: '',
|
|
328
|
+
entered: false,
|
|
329
|
+
max_pick_count: 0,
|
|
330
|
+
leagues: [],
|
|
331
|
+
invite_only: false,
|
|
332
|
+
length_type: 'event',
|
|
333
|
+
competition_code: '',
|
|
334
|
+
initial_balance: 1000,
|
|
335
|
+
end_datetime: (0, _momentMini.default)().add(1, 'week')
|
|
336
|
+
};
|
|
337
|
+
},
|
|
338
|
+
getClosestDay: schedule_range => {
|
|
339
|
+
if (schedule_range.length == 0) {
|
|
340
|
+
return (0, _momentMini.default)().format('YYYY/MM/DD');
|
|
341
|
+
}
|
|
342
|
+
let closest;
|
|
343
|
+
let exact_day = schedule_range.find(d => d == (0, _momentMini.default)().format('YYYY/MM/DD'));
|
|
344
|
+
if (exact_day) {
|
|
345
|
+
return exact_day;
|
|
346
|
+
}
|
|
347
|
+
schedule_range.map(d => {
|
|
348
|
+
if (!closest) {
|
|
349
|
+
closest = (0, _momentMini.default)(d);
|
|
350
|
+
}
|
|
351
|
+
if ((0, _momentMini.default)(d).isBefore((0, _momentMini.default)())) {
|
|
352
|
+
return;
|
|
353
|
+
} //Day is in the past
|
|
354
|
+
let new_range = (0, _momentMini.default)(d).diff((0, _momentMini.default)(), 'days');
|
|
355
|
+
let closest_range = closest.diff((0, _momentMini.default)(), 'days');
|
|
356
|
+
if (Math.abs(new_range) < Math.abs(closest_range)) {
|
|
357
|
+
closest = (0, _momentMini.default)(d);
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
return closest.format('YYYY/MM/DD');
|
|
361
|
+
},
|
|
362
|
+
getEventCompMatchFromEvent: (event_id, event_type) => {
|
|
363
|
+
return {
|
|
364
|
+
competition_id: '',
|
|
365
|
+
competition_match_id: '',
|
|
366
|
+
event_id,
|
|
367
|
+
event_type,
|
|
368
|
+
status: 'inprogress',
|
|
369
|
+
create_datetime: '',
|
|
370
|
+
last_update_datetime: '',
|
|
371
|
+
match_type: 'event'
|
|
372
|
+
};
|
|
373
|
+
},
|
|
374
|
+
getMatchMarketsFromEventAndTrades: (event_id, trades, markets) => {
|
|
375
|
+
let cmm = [];
|
|
376
|
+
markets.map(m => {
|
|
377
|
+
let tst = trades.find(t => t.market_id == m.market_id && t.side == m.trade_side);
|
|
378
|
+
let ntst = trades.find(t => t.market_id == m.market_id && t.side != m.trade_side);
|
|
379
|
+
if (!tst || !ntst) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
let tscmm = {
|
|
383
|
+
competition_match_id: '',
|
|
384
|
+
competition_match_market_id: '',
|
|
385
|
+
var_1: tst.var_1,
|
|
386
|
+
odds: tst.odds,
|
|
387
|
+
event_id,
|
|
388
|
+
event_type: 'team',
|
|
389
|
+
probability: tst.probability,
|
|
390
|
+
side: tst.side,
|
|
391
|
+
side_id: tst.side_id,
|
|
392
|
+
market_id: tst.market_id,
|
|
393
|
+
status: 'active',
|
|
394
|
+
create_datetime: '',
|
|
395
|
+
last_update_datetime: ''
|
|
396
|
+
};
|
|
397
|
+
cmm.push(tscmm);
|
|
398
|
+
let ntscmm = {
|
|
399
|
+
competition_match_id: '',
|
|
400
|
+
competition_match_market_id: '',
|
|
401
|
+
var_1: ntst.var_1,
|
|
402
|
+
odds: ntst.odds,
|
|
403
|
+
event_id,
|
|
404
|
+
event_type: 'team',
|
|
405
|
+
probability: ntst.probability,
|
|
406
|
+
side: ntst.side,
|
|
407
|
+
side_id: ntst.side_id,
|
|
408
|
+
market_id: ntst.market_id,
|
|
409
|
+
status: 'active',
|
|
410
|
+
create_datetime: '',
|
|
411
|
+
last_update_datetime: ''
|
|
412
|
+
};
|
|
413
|
+
cmm.push(ntscmm);
|
|
414
|
+
});
|
|
415
|
+
return cmm;
|
|
416
|
+
},
|
|
417
|
+
getStartTimeOptions: (draft_competition, events) => {
|
|
418
|
+
if (events.length == 0) {
|
|
419
|
+
return [];
|
|
420
|
+
}
|
|
421
|
+
let available_picks = draft_competition.competition_match_markets.length / 2 + draft_competition.additional_markets.length;
|
|
422
|
+
let included_events = events.filter(e => draft_competition.competition_matches.map(cm => cm.event_id.toString()).includes(e.event_id.toString()));
|
|
423
|
+
let additional_market_events = events.filter(e => draft_competition.additional_markets.map(m => m.event_id.toString()).includes(e.event_id.toString()));
|
|
424
|
+
included_events = included_events.concat(additional_market_events).sort((a, b) => (0, _momentMini.default)(a.scheduled_datetime).unix() - (0, _momentMini.default)(b.scheduled_datetime).unix());
|
|
425
|
+
let start_time_options = [];
|
|
426
|
+
let earliest_event = included_events[0];
|
|
427
|
+
if (!earliest_event) {
|
|
428
|
+
return [];
|
|
429
|
+
}
|
|
430
|
+
start_time_options.push({
|
|
431
|
+
start_time: earliest_event.scheduled_datetime,
|
|
432
|
+
label: `Start time of the earliest game`
|
|
433
|
+
});
|
|
434
|
+
if (available_picks === draft_competition.competition.max_pick_count) {
|
|
435
|
+
return start_time_options;
|
|
436
|
+
}
|
|
437
|
+
let diff = available_picks - draft_competition.competition.max_pick_count;
|
|
438
|
+
let picks_per_event = available_picks / included_events.length;
|
|
439
|
+
let event_to_back = diff / picks_per_event;
|
|
440
|
+
earliest_event = included_events[Math.ceil(event_to_back)];
|
|
441
|
+
if (!earliest_event) {
|
|
442
|
+
return start_time_options;
|
|
443
|
+
}
|
|
444
|
+
start_time_options.push({
|
|
445
|
+
label: 'Latest start time possible based on max picks',
|
|
446
|
+
start_time: earliest_event.scheduled_datetime
|
|
447
|
+
});
|
|
448
|
+
return start_time_options;
|
|
449
|
+
},
|
|
450
|
+
getEmptyCreateCompetition: () => {
|
|
451
|
+
return {
|
|
452
|
+
competition: {
|
|
453
|
+
competition_id: '',
|
|
454
|
+
auth_strategy_id: '',
|
|
455
|
+
competition_name: '',
|
|
456
|
+
competition_description: '',
|
|
457
|
+
buy_in: 0,
|
|
458
|
+
admin_id: '',
|
|
459
|
+
ticket_revenue: 0,
|
|
460
|
+
tickets_sold: 0,
|
|
461
|
+
available_tickets: 10,
|
|
462
|
+
market_ids: [],
|
|
463
|
+
market_type: 'FOR_MONEY',
|
|
464
|
+
status: 'scheduled',
|
|
465
|
+
create_datetime: '',
|
|
466
|
+
last_update_datetime: '',
|
|
467
|
+
competition_type_id: '',
|
|
468
|
+
competition_result_type_id: '',
|
|
469
|
+
scheduled_datetime: '',
|
|
470
|
+
entered: false,
|
|
471
|
+
max_pick_count: 0,
|
|
472
|
+
leagues: [],
|
|
473
|
+
invite_only: false,
|
|
474
|
+
length_type: 'event',
|
|
475
|
+
competition_code: '',
|
|
476
|
+
initial_balance: 1000,
|
|
477
|
+
end_datetime: ''
|
|
478
|
+
},
|
|
479
|
+
competition_match_markets: [],
|
|
480
|
+
competition_matches: [],
|
|
481
|
+
competition_players: [],
|
|
482
|
+
additional_markets: []
|
|
483
|
+
};
|
|
484
|
+
},
|
|
485
|
+
getCompColors: competition_type => {
|
|
486
|
+
switch (competition_type) {
|
|
487
|
+
case 'pick':
|
|
488
|
+
return {
|
|
489
|
+
backgroundColor: 'rgba(26,205,106,0.1)',
|
|
490
|
+
borderColor: _colors.default.highlights.highlight400
|
|
491
|
+
};
|
|
492
|
+
case 'wager':
|
|
493
|
+
return {
|
|
494
|
+
backgroundColor: 'rgba(59,26,205,0.1)',
|
|
495
|
+
borderColor: _colors.default.highlights.highlight100
|
|
496
|
+
};
|
|
497
|
+
default:
|
|
498
|
+
return {
|
|
499
|
+
backgroundColor: _colors.default.brand.slate,
|
|
500
|
+
borderColor: _colors.default.shades.black
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
getOddsLabel: odds => {
|
|
505
|
+
if (odds > 0) {
|
|
506
|
+
return `+${odds.toFixed()}`;
|
|
507
|
+
}
|
|
508
|
+
return odds.toFixed();
|
|
509
|
+
},
|
|
510
|
+
getVar1Label: (var_1, market) => {
|
|
511
|
+
if (market.type == 'Spread') {
|
|
512
|
+
if (var_1 > 0) {
|
|
513
|
+
return `+${var_1}`;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
return var_1.toString();
|
|
517
|
+
},
|
|
518
|
+
getUniqueDivisions: events => {
|
|
519
|
+
let away_divisions = events.map(e => e.away?.division ? e.away.division : '');
|
|
520
|
+
let home_divisions = events.map(e => e.home?.division ? e.home.division : '');
|
|
521
|
+
if (!away_divisions || !home_divisions) {
|
|
522
|
+
return [];
|
|
523
|
+
}
|
|
524
|
+
let divisions = away_divisions.concat(home_divisions);
|
|
525
|
+
let options = [...new Set(divisions.map(d => d))].sort((a, b) => a > b ? 1 : -1);
|
|
526
|
+
let ranks = events.find(e => e.away?.rank || e.home?.rank);
|
|
527
|
+
if (ranks) {
|
|
528
|
+
options = ['Top25'].concat(options);
|
|
529
|
+
}
|
|
530
|
+
return options;
|
|
531
|
+
},
|
|
532
|
+
getUniqueSubDivisions: events => {
|
|
533
|
+
let away_divisions = events.map(e => e.away?.sub_division ? e.away.sub_division : '');
|
|
534
|
+
let home_divisions = events.map(e => e.home?.sub_division ? e.home.sub_division : '');
|
|
535
|
+
return [...new Set(away_divisions.concat(home_divisions).map(d => d))].sort((a, b) => a > b ? 1 : -1);
|
|
536
|
+
},
|
|
537
|
+
createPickFromMatchMarket: (competition_id, mm) => {
|
|
538
|
+
return {
|
|
539
|
+
player_id: '',
|
|
540
|
+
player_pick_id: '',
|
|
541
|
+
side: mm.side,
|
|
542
|
+
side_id: mm.side_id,
|
|
543
|
+
status: 'inprogress',
|
|
544
|
+
competition_id,
|
|
545
|
+
competition_match_id: mm.competition_match_id,
|
|
546
|
+
market_id: mm.market_id,
|
|
547
|
+
odds: mm.odds,
|
|
548
|
+
var_1: mm.var_1,
|
|
549
|
+
probability: mm.probability,
|
|
550
|
+
create_datetime: '',
|
|
551
|
+
last_update_datetime: '',
|
|
552
|
+
stake: 0,
|
|
553
|
+
potential_winnings: 0,
|
|
554
|
+
winnings: 0,
|
|
555
|
+
pick_title: ''
|
|
556
|
+
};
|
|
557
|
+
},
|
|
558
|
+
getCompetitionPlayer: competition_id => {
|
|
559
|
+
return {
|
|
560
|
+
competition_id,
|
|
561
|
+
competition_player_id: '',
|
|
562
|
+
status: 'active',
|
|
563
|
+
create_datetime: '',
|
|
564
|
+
last_update_datetime: '',
|
|
565
|
+
player_id: '',
|
|
566
|
+
wager_based_balance: 1000,
|
|
567
|
+
accepted_ind: false
|
|
568
|
+
};
|
|
569
|
+
},
|
|
570
|
+
getCompTypeColor: competition_type => {
|
|
571
|
+
switch (competition_type?.type) {
|
|
572
|
+
case 'pick':
|
|
573
|
+
return _colors.default.highlights.highlight400;
|
|
574
|
+
case 'wager':
|
|
575
|
+
return _colors.default.highlights.highlight100;
|
|
576
|
+
default:
|
|
577
|
+
return _colors.default.brand.midnight;
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
calcPotentialWinnings: (amt, odds) => {
|
|
581
|
+
if (odds > 0) {
|
|
582
|
+
var earningsMultiplyer = odds / 100 + 1;
|
|
583
|
+
return earningsMultiplyer * amt;
|
|
584
|
+
} else {
|
|
585
|
+
var earningsMultiplyer = 100 / Math.abs(odds) + 1;
|
|
586
|
+
return earningsMultiplyer * amt;
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
getPickTitleForTeamEvent: (pick, market, event, athlete) => {
|
|
590
|
+
let market_side = market.side_options.find(o => o.side == pick.side);
|
|
591
|
+
if (!market_side) {
|
|
592
|
+
return pick.side;
|
|
593
|
+
}
|
|
594
|
+
var re = /({.*?})/;
|
|
595
|
+
let parsed_text = market_side.parseable_title.split(re);
|
|
596
|
+
let new_title = '';
|
|
597
|
+
parsed_text.map(t => {
|
|
598
|
+
if (t === '') {
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
if (t[0] !== '{') {
|
|
602
|
+
return new_title += t;
|
|
603
|
+
}
|
|
604
|
+
let variable = t.slice(1);
|
|
605
|
+
variable = variable.slice(0, variable.length - 1);
|
|
606
|
+
switch (variable) {
|
|
607
|
+
case 'team':
|
|
608
|
+
let team = event[pick.side];
|
|
609
|
+
return new_title += team.market_name;
|
|
610
|
+
case 'var_1':
|
|
611
|
+
return new_title += CompetitionHelpers.getVar1Label(pick.var_1, market);
|
|
612
|
+
case 'athlete':
|
|
613
|
+
return new_title += `${athlete?.first_name} ${athlete?.last_name}`;
|
|
614
|
+
case 'stat':
|
|
615
|
+
return new_title += market.stat_label ?? market.stat;
|
|
616
|
+
default:
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
return new_title;
|
|
621
|
+
},
|
|
622
|
+
getPickTitleForMatch: (pick, market, athlete, team) => {
|
|
623
|
+
let market_side = market.side_options.find(o => o.side == pick.side);
|
|
624
|
+
if (!market_side) {
|
|
625
|
+
return pick.side;
|
|
626
|
+
}
|
|
627
|
+
var re = /({.*?})/;
|
|
628
|
+
let parsed_text = market_side.parseable_title.split(re);
|
|
629
|
+
let new_title = '';
|
|
630
|
+
parsed_text.map(t => {
|
|
631
|
+
if (t === '') {
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
if (t[0] !== '{') {
|
|
635
|
+
return new_title += t;
|
|
636
|
+
}
|
|
637
|
+
let variable = t.slice(1);
|
|
638
|
+
variable = variable.slice(0, variable.length - 1);
|
|
639
|
+
switch (variable) {
|
|
640
|
+
case 'team':
|
|
641
|
+
return new_title += `${team?.market_name} ${team?.name}`;
|
|
642
|
+
case 'var_1':
|
|
643
|
+
return new_title += CompetitionHelpers.getVar1Label(pick.var_1, market);
|
|
644
|
+
case 'athlete':
|
|
645
|
+
return new_title += athlete?.abbr_name;
|
|
646
|
+
case 'stat':
|
|
647
|
+
return new_title += market.stat;
|
|
648
|
+
default:
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
return new_title;
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
//# sourceMappingURL=index.js.map
|