@maestro_io/maestro-web-sdk 3.3.1 → 4.0.0-beta.2
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/dist/f8820fca3a2a7957f753167da0884f9d.png +0 -0
- package/dist/maestro-web-sdk.esm.js +12 -12
- package/dist/maestro-web-sdk.esm.js.map +1 -1
- package/dist/maestro-web-sdk.umd.js +12 -12
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/package.json +87 -0
- package/dist/src/__mocks__/sentry.d.ts +4 -0
- package/dist/src/components/atoms/BaseButton/BaseButton.js +11 -0
- package/dist/src/components/atoms/BaseButton/index.js +2 -0
- package/dist/src/components/atoms/Image/index.js +34 -0
- package/dist/src/components/atoms/Rive/index.js +53 -0
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.js +9 -0
- package/dist/src/components/atoms/SvgIcon/BetsIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.js +15 -0
- package/dist/src/components/atoms/SvgIcon/FlameIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/Icon.js +44 -0
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.js +10 -0
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/PlayIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/ShopIcon.js +7 -0
- package/dist/src/components/atoms/SvgIcon/StatsIcon.js +12 -0
- package/dist/src/components/atoms/SvgIcon/TimesIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/WarningIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/index.js +2 -0
- package/dist/src/components/core/App/App.js +35 -0
- package/dist/src/components/core/App/index.js +2 -0
- package/dist/src/components/core/OverlayContainer.js +58 -0
- package/dist/src/components/core/PanelManager/PanelManager.js +86 -0
- package/dist/src/components/core/PanelManager/index.js +2 -0
- package/dist/src/components/core/ScrollableContainer/FocusableItem.js +38 -0
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.js +168 -0
- package/dist/src/components/core/ScrollableContainer/index.js +2 -0
- package/dist/src/components/molecules/ActionButton/ActionButton.js +10 -0
- package/dist/src/components/molecules/ActionButton/index.js +2 -0
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.js +50 -0
- package/dist/src/components/molecules/HeadshotImage/index.js +2 -0
- package/dist/src/components/molecules/Overlay/Overlay.js +139 -0
- package/dist/src/components/molecules/Overlay/index.js +2 -0
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.js +27 -0
- package/dist/src/components/molecules/PanelNavButton/index.js +2 -0
- package/dist/src/components/molecules/SegmentButton/SegmentButton.js +10 -0
- package/dist/src/components/molecules/SegmentButton/index.js +2 -0
- package/dist/src/components/molecules/TabLoadError/TabLoadError.js +14 -0
- package/dist/src/components/molecules/TabLoadError/index.js +2 -0
- package/dist/src/components/molecules/WatchButton/WatchButton.js +15 -0
- package/dist/src/components/molecules/WatchButton/index.js +2 -0
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.js +60 -0
- package/dist/src/components/organisms/PanelNavigation/index.js +2 -0
- package/dist/src/components/organisms/SegmentController/SegmentController.js +76 -0
- package/dist/src/components/organisms/SegmentController/index.js +2 -0
- package/dist/src/development/MaestroEventDelegate.js +109 -0
- package/dist/src/development/TimeSeek.js +218 -0
- package/dist/src/development/development.js +33 -0
- package/dist/src/external/AxiosNetworkClient.js +110 -0
- package/dist/src/external/LocalStorageCacheManager.js +213 -0
- package/dist/src/external/ReactRenderer.js +53 -0
- package/dist/src/external/mocks/MockExternalNetworkClient.js +187 -0
- package/dist/src/external/ports/cacheManager.js +1 -0
- package/dist/src/external/ports/networkClient.js +1 -0
- package/dist/src/external/ports/renderer.d.ts +1 -2
- package/dist/src/external/ports/renderer.js +1 -0
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.d.ts +8 -0
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.js +7 -0
- package/dist/src/external/spatial-navigation/index.js +3 -0
- package/dist/src/external/spatial-navigation/measureLayout.js +30 -0
- package/dist/src/external/spatial-navigation/spatialNavigation.js +876 -0
- package/dist/src/external/spatial-navigation/utils.js +6 -0
- package/dist/src/external/spatial-navigation/visualDebugger.js +76 -0
- package/dist/src/external/spatial-navigation/withFocusable.js +245 -0
- package/dist/src/helpers/Observable.js +37 -0
- package/dist/src/helpers/strings.js +14 -0
- package/dist/src/helpers/url.js +12 -0
- package/dist/src/index.d.ts +5 -5
- package/dist/src/index.js +165 -0
- package/dist/src/interfaces/IMaestroEvent.d.ts +12 -0
- package/dist/src/interfaces/IMaestroEvent.js +18 -0
- package/dist/src/interfaces/IMaestroEventDelegate.js +1 -0
- package/dist/src/interfaces/IMaestroManager.js +1 -0
- package/dist/src/interfaces/IUserSettings.js +20 -0
- package/dist/src/models/IModel.js +1 -0
- package/dist/src/models/IPanel.js +40 -0
- package/dist/src/models/ITheme.js +20 -0
- package/dist/src/models/IWinningBet.js +1 -0
- package/dist/src/modules/bets/interfaces/IBets.js +1 -0
- package/dist/src/modules/bets/mocks.js +573 -0
- package/dist/src/modules/bets/types/BetsAnalyticsTypes.js +1 -0
- package/dist/src/modules/bets/view/BetsView.js +143 -0
- package/dist/src/modules/bets/view/HotProps/HotPropsView.js +150 -0
- package/dist/src/modules/bets/view/SixPack/SixPackView.js +110 -0
- package/dist/src/modules/bets/view/UserBets/BetResult/BetResult.js +6 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCard.js +149 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardEvent.js +34 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardFooter.js +18 -0
- package/dist/src/modules/bets/view/UserBets/Boost/Boost.js +6 -0
- package/dist/src/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +9 -0
- package/dist/src/modules/bets/view/UserBets/Parlay/Parlay.js +13 -0
- package/dist/src/modules/bets/view/UserBets/Straight/Straight.js +6 -0
- package/dist/src/modules/bets/view/UserBets/Teaser/Teaser.js +13 -0
- package/dist/src/modules/bets/view/UserBets/UserBetsView.js +107 -0
- package/dist/src/modules/bets/view/components/Bet/Bet.js +32 -0
- package/dist/src/modules/bets/view/components/BetPill/BetPill.js +6 -0
- package/dist/src/modules/bets/view/components/BetsCard/BetsCard.js +15 -0
- package/dist/src/modules/bets/view/components/BetsCard/BetsCardHeader.js +20 -0
- package/dist/src/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +14 -0
- package/dist/src/modules/bets/view/components/LocationWarning/LocationWarning.js +16 -0
- package/dist/src/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +78 -0
- package/dist/src/modules/bets/view/components/PromoCodeBanner/index.js +1 -0
- package/dist/src/modules/bets/view-model/BetsViewModel.js +974 -0
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.js +107 -0
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/index.js +1 -0
- package/dist/src/modules/fantasy/components/LeagueCard/LeagueCard.js +20 -0
- package/dist/src/modules/fantasy/components/LeagueCard/index.js +2 -0
- package/dist/src/modules/fantasy/components/TopPlayerCard/TopPlayerCard.js +29 -0
- package/dist/src/modules/fantasy/components/TopPlayerCard/index.js +2 -0
- package/dist/src/modules/fantasy/mocks.js +3682 -0
- package/dist/src/modules/fantasy/types.js +6 -0
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.js +74 -0
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/index.js +2 -0
- package/dist/src/modules/fantasy/view/ErrorBoundary.d.ts +13 -0
- package/dist/src/modules/fantasy/view/FantasyItemView.js +74 -0
- package/dist/src/modules/fantasy/view/FantasyView.js +133 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/DraftDateCountdown.js +95 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/InactiveLeague.js +13 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/index.js +2 -0
- package/dist/src/modules/fantasy/view/LoginView/LoginView.js +27 -0
- package/dist/src/modules/fantasy/view/LoginView/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.js +25 -0
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.js +9 -0
- package/dist/src/modules/fantasy/view/MatchupPair/MatchupPair.js +118 -0
- package/dist/src/modules/fantasy/view/MatchupPair/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.js +9 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/MatchupSingle.js +108 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.js +18 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/index.js +2 -0
- package/dist/src/modules/fantasy/view/PromoView/PromoView.js +12 -0
- package/dist/src/modules/fantasy/view/PromoView/index.js +2 -0
- package/dist/src/modules/fantasy/view/index.js +2 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.FantasyPolling.js +132 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.LeagueManagerPolling.js +141 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.js +534 -0
- package/dist/src/modules/key-plays/constants.js +292 -0
- package/dist/src/modules/key-plays/interfaces/IKeyPlays.js +14 -0
- package/dist/src/modules/key-plays/interfaces/IKeyPlaysResponse.js +1 -0
- package/dist/src/modules/key-plays/view/KeyPlayCardScoreTagView.js +16 -0
- package/dist/src/modules/key-plays/view/KeyPlayCardView.js +144 -0
- package/dist/src/modules/key-plays/view/KeyPlayErrorStateView.js +65 -0
- package/dist/src/modules/key-plays/view/KeyPlaysView.js +151 -0
- package/dist/src/modules/key-plays/view-model/KeyPlaysViewModel.js +246 -0
- package/dist/src/modules/shop/mocks.js +390 -0
- package/dist/src/modules/shop/types.js +7 -0
- package/dist/src/modules/shop/view/ProductDetailView/ProductDetailView.js +56 -0
- package/dist/src/modules/shop/view/ProductDetailView/index.js +2 -0
- package/dist/src/modules/shop/view/ShopView.js +182 -0
- package/dist/src/modules/shop/view/components/BrowseCard/BrowseCard.js +23 -0
- package/dist/src/modules/shop/view/components/BrowseCard/index.js +2 -0
- package/dist/src/modules/shop/view/components/ProductSummaryCard/ProductSummaryCard.js +26 -0
- package/dist/src/modules/shop/view/components/ProductSummaryCard/index.js +1 -0
- package/dist/src/modules/shop/view/components/ShopPromoView/ShopPromoView.js +19 -0
- package/dist/src/modules/shop/view/components/ShopPromoView/index.js +1 -0
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.d.ts +1 -0
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.js +61 -0
- package/dist/src/modules/shop/view/components/ShopSection/ShopSectionItem.d.ts +18 -0
- package/dist/src/modules/shop/view/components/ShopSection/ShopSectionItem.js +22 -0
- package/dist/src/modules/shop/view/components/ShopSection/index.js +1 -0
- package/dist/src/modules/shop/view/index.js +2 -0
- package/dist/src/modules/shop/view-model/ShopViewModel.ShopPolling.js +111 -0
- package/dist/src/modules/shop/view-model/ShopViewModel.js +353 -0
- package/dist/src/modules/stats/interfaces/IStats.js +1 -0
- package/dist/src/modules/stats/mocks.js +746 -0
- package/dist/src/modules/stats/utils/driveSummaryUtils.js +48 -0
- package/dist/src/modules/stats/utils/renderTeamStatistic.js +16 -0
- package/dist/src/modules/stats/utils.js +62 -0
- package/dist/src/modules/stats/view/ActiveAthletes/ActiveAthletes.js +98 -0
- package/dist/src/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.js +27 -0
- package/dist/src/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.js +89 -0
- package/dist/src/modules/stats/view/ActiveAthletes/index.js +2 -0
- package/dist/src/modules/stats/view/DriveSummary/DrivePlayCard.js +70 -0
- package/dist/src/modules/stats/view/DriveSummary/DriveSummary.js +87 -0
- package/dist/src/modules/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.js +129 -0
- package/dist/src/modules/stats/view/DriveSummary/Header/DriveSummaryHeader.js +26 -0
- package/dist/src/modules/stats/view/DriveSummary/MainStat/MainStat.js +24 -0
- package/dist/src/modules/stats/view/DriveSummary/index.js +2 -0
- package/dist/src/modules/stats/view/GameLeaders/GameLeaders.js +48 -0
- package/dist/src/modules/stats/view/GameLeaders/index.js +2 -0
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/DonutChart.js +55 -0
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/index.js +1 -0
- package/dist/src/modules/stats/view/MatchPredictor/MatchPredictorView.js +60 -0
- package/dist/src/modules/stats/view/MatchPredictor/index.js +2 -0
- package/dist/src/modules/stats/view/Penalties/Penalties.js +6 -0
- package/dist/src/modules/stats/view/Penalties/index.js +2 -0
- package/dist/src/modules/stats/view/RecentGames/RecentGames.js +23 -0
- package/dist/src/modules/stats/view/RecentGames/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.js +121 -0
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/ScoreItem.js +62 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/ScoresSection.js +23 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.js +106 -0
- package/dist/src/modules/stats/view/ScoringSummary/index.js +2 -0
- package/dist/src/modules/stats/view/StatsItemView.js +92 -0
- package/dist/src/modules/stats/view/StatsQRCode/StatsQRCodeView.js +36 -0
- package/dist/src/modules/stats/view/StatsQRCode/index.js +1 -0
- package/dist/src/modules/stats/view/StatsView.js +137 -0
- package/dist/src/modules/stats/view/TeamStats/TeamStatsView.js +43 -0
- package/dist/src/modules/stats/view/TeamStats/index.js +1 -0
- package/dist/src/modules/stats/view/Teams/StatsCarousel.js +83 -0
- package/dist/src/modules/stats/view/Teams/StatsProgressBar.js +19 -0
- package/dist/src/modules/stats/view/Teams/Teams.js +27 -0
- package/dist/src/modules/stats/view/Teams/index.js +2 -0
- package/dist/src/modules/stats/view/WinProbability/WinProbability.js +28 -0
- package/dist/src/modules/stats/view/WinProbability/index.js +2 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/AthletesStatistics.js +89 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/StatisticTable.js +12 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/index.js +2 -0
- package/dist/src/modules/stats/view/index.js +2 -0
- package/dist/src/modules/stats/view-model/StatsViewModel.d.ts +5 -0
- package/dist/src/modules/stats/view-model/StatsViewModel.js +989 -0
- package/dist/src/sentry.js +31 -0
- package/dist/src/services/AnalyticsService/AnalyticsService.d.ts +12 -7
- package/dist/src/services/AnalyticsService/AnalyticsService.js +402 -0
- package/dist/src/services/AnalyticsService/types.js +1 -0
- package/dist/src/services/BetsService.js +122 -0
- package/dist/src/services/FantasyService.js +92 -0
- package/dist/src/services/GlobalService/GlobalService.d.ts +9 -0
- package/dist/src/services/GlobalService/PageService.d.ts +9 -0
- package/dist/src/services/GlobalService/index.d.ts +2 -0
- package/dist/src/services/GlobalService/mocks.d.ts +2 -0
- package/dist/src/services/GlobalService/types.d.ts +11 -0
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.d.ts +1 -2
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.js +386 -0
- package/dist/src/services/InsightsService/InsightsService.js +74 -0
- package/dist/src/services/NetworkManager/NetworkManager.js +457 -0
- package/dist/src/services/NetworkManager/NetworkManagerFactory.js +101 -0
- package/dist/src/services/NetworkManager/errors.js +45 -0
- package/dist/src/services/NetworkManager/types.js +10 -0
- package/dist/src/services/PageService/PageService.d.ts +9 -0
- package/dist/src/services/PageService/PageService.js +39 -0
- package/dist/src/services/PageService/index.d.ts +2 -0
- package/dist/src/services/PageService/index.js +2 -0
- package/dist/src/services/PageService/mocks.d.ts +2 -0
- package/dist/src/services/PageService/mocks.js +104 -0
- package/dist/src/services/PageService/types.d.ts +76 -0
- package/dist/src/services/PageService/types.js +1 -0
- package/dist/src/services/ShopService.js +46 -0
- package/dist/src/services/StaticService/PageService.d.ts +9 -0
- package/dist/src/services/StaticService/StaticService.d.ts +3 -1
- package/dist/src/services/StaticService/StaticService.js +59 -0
- package/dist/src/services/StaticService/index.js +2 -0
- package/dist/src/services/StaticService/mocks.js +104 -0
- package/dist/src/services/StaticService/types.js +1 -0
- package/dist/src/services/StatsService.d.ts +1 -0
- package/dist/src/services/StatsService.js +147 -0
- package/dist/src/services/ThemeManager/constants.js +47 -0
- package/dist/src/services/UserSettingsManager.js +155 -0
- package/dist/src/test-polyfills.js +15 -0
- package/dist/src/types/OverlayTypes.js +4 -0
- package/dist/src/view-models/MaestroEventViewModel.d.ts +1 -2
- package/dist/src/view-models/MaestroEventViewModel.js +307 -0
- package/dist/src/view-models/OverlayViewModel.js +222 -0
- package/dist/src/view-models/PanelManagerViewModel.js +212 -0
- package/dist/src/view-models/ViewModel.js +32 -0
- package/package.json +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import SegmentController from '@/components/organisms/SegmentController/SegmentController';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './UserBetsView.styles.css';
|
|
4
|
+
import Parlay from './Parlay/Parlay';
|
|
5
|
+
import Boost from './Boost/Boost';
|
|
6
|
+
import Straight from './Straight/Straight';
|
|
7
|
+
import Teaser from './Teaser/Teaser';
|
|
8
|
+
class UserBetsView extends React.Component {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
Object.defineProperty(this, "state", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: {
|
|
16
|
+
activeSegment: this.props.item.data.defaultTab,
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "setSegment", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: (segment) => {
|
|
24
|
+
return () => {
|
|
25
|
+
if (this.state.activeSegment !== segment) {
|
|
26
|
+
this.setState({ activeSegment: segment });
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(this, "segmentItems", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true,
|
|
34
|
+
writable: true,
|
|
35
|
+
value: [
|
|
36
|
+
{
|
|
37
|
+
title: 'Live',
|
|
38
|
+
type: 'live',
|
|
39
|
+
onEnter: this.setSegment('live'),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: 'Settled',
|
|
43
|
+
type: 'settled',
|
|
44
|
+
onEnter: this.setSegment('settled'),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: 'Upcoming',
|
|
48
|
+
type: 'upcoming',
|
|
49
|
+
onEnter: this.setSegment('upcoming'),
|
|
50
|
+
},
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(this, "renderBet", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
configurable: true,
|
|
56
|
+
writable: true,
|
|
57
|
+
value: (bet) => {
|
|
58
|
+
const { hideWagers } = this.props.item;
|
|
59
|
+
switch (bet.type) {
|
|
60
|
+
case 'PARLAY':
|
|
61
|
+
return React.createElement(Parlay, { key: bet.id, bet: bet, hideWagers: hideWagers });
|
|
62
|
+
case 'BOOST':
|
|
63
|
+
return React.createElement(Boost, { key: bet.id, bet: bet, hideWagers: hideWagers });
|
|
64
|
+
case 'STRAIGHT':
|
|
65
|
+
return React.createElement(Straight, { key: bet.id, bet: bet, hideWagers: hideWagers });
|
|
66
|
+
case 'TEASER':
|
|
67
|
+
return React.createElement(Teaser, { key: bet.id, bet: bet, hideWagers: hideWagers });
|
|
68
|
+
default:
|
|
69
|
+
console.warn('unknown type', bet.type);
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(this, "renderBets", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
configurable: true,
|
|
77
|
+
writable: true,
|
|
78
|
+
value: () => {
|
|
79
|
+
if (this.bets?.length) {
|
|
80
|
+
return this.bets.map((bet) => this.renderBet(bet));
|
|
81
|
+
}
|
|
82
|
+
return (React.createElement("div", { className: "no-user-bets T05_ALT" },
|
|
83
|
+
"No ",
|
|
84
|
+
this.state.activeSegment,
|
|
85
|
+
" Bets"));
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
get bets() {
|
|
90
|
+
switch (this.state.activeSegment) {
|
|
91
|
+
case 'live':
|
|
92
|
+
return this.props.item.data.bets.live;
|
|
93
|
+
case 'settled':
|
|
94
|
+
return this.props.item.data.bets.settled;
|
|
95
|
+
case 'upcoming':
|
|
96
|
+
return this.props.item.data.bets.upcoming;
|
|
97
|
+
default:
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
render() {
|
|
102
|
+
return (React.createElement("section", { className: "my-bets-view" },
|
|
103
|
+
React.createElement(SegmentController, { items: this.segmentItems }),
|
|
104
|
+
this.renderBets()));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export default UserBetsView;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Bet.styles.css';
|
|
3
|
+
import { withFocusable, } from '@/external/spatial-navigation';
|
|
4
|
+
import Image from '@/components/atoms/Image';
|
|
5
|
+
import FocusableItem from '@/components/core/ScrollableContainer/FocusableItem';
|
|
6
|
+
class Bet extends React.Component {
|
|
7
|
+
render() {
|
|
8
|
+
const accruedValue = this.props.leg.points
|
|
9
|
+
? Number(this.props.leg.points)
|
|
10
|
+
: 0;
|
|
11
|
+
return (React.createElement(FocusableItem, null,
|
|
12
|
+
React.createElement("div", { className: "single-bet focus-ring focus-opacity", "data-focusable": this.props.focusable, "data-focused": this.props.focused },
|
|
13
|
+
this.props.leg.iconDark && (React.createElement(Image, { crossOrigin: "anonymous", src: this.props.leg.iconDark, alt: "Bet Icon" })),
|
|
14
|
+
React.createElement("div", { className: "single-bet-main-content T02" },
|
|
15
|
+
React.createElement("div", { className: "single-bet-info" },
|
|
16
|
+
React.createElement("div", null,
|
|
17
|
+
React.createElement("div", { className: "T05_ALT" }, this.props.leg.selectionText),
|
|
18
|
+
React.createElement("span", { className: "single-bet-info-description" }, this.props.leg.marketText)),
|
|
19
|
+
!this.props.hideWagers && (React.createElement("div", { className: "single-bet-odds T01" }, this.props.leg.odds))),
|
|
20
|
+
this.props.leg.accrued && (React.createElement("div", { className: "single-bet-accrued" },
|
|
21
|
+
React.createElement("div", { className: "single-bet-accrued-goal" },
|
|
22
|
+
accruedValue,
|
|
23
|
+
React.createElement("span", null,
|
|
24
|
+
"/",
|
|
25
|
+
this.props.leg.accrued.goal),
|
|
26
|
+
React.createElement("div", null,
|
|
27
|
+
Math.round((accruedValue / this.props.leg.accrued.goal) * 100),
|
|
28
|
+
"%")),
|
|
29
|
+
React.createElement("progress", { "data-complete": accruedValue === this.props.leg.accrued.goal, value: accruedValue, max: this.props.leg.accrued.goal })))))));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export default withFocusable()(Bet);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './BetsCard.styles.css';
|
|
3
|
+
import { withFocusable, } from '@/external/spatial-navigation';
|
|
4
|
+
import FocusableItem from '@/components/core/ScrollableContainer/FocusableItem';
|
|
5
|
+
class BetsCard extends React.Component {
|
|
6
|
+
render() {
|
|
7
|
+
return (React.createElement(FocusableItem, null,
|
|
8
|
+
React.createElement("div", { className: "bets-card focus-ring", "data-focused": this.props.focused },
|
|
9
|
+
this.props.header(this.props),
|
|
10
|
+
React.createElement("div", { className: "bets-card-divider" }),
|
|
11
|
+
this.props.children,
|
|
12
|
+
this.props.footer(this.props))));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export default withFocusable()(BetsCard);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Icon from '@/components/atoms/SvgIcon';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import OutcomeBadge from '../../UserBets/OutcomeBadge/OutcomeBadge';
|
|
4
|
+
import Image from '@/components/atoms/Image';
|
|
5
|
+
const BetsCardHeader = (props) => {
|
|
6
|
+
const outcome = props.overrideOutcome !== 'NOT_SET' ? props.overrideOutcome : props.outcome;
|
|
7
|
+
return (React.createElement("div", { className: "bets-card-header T05_ALT" },
|
|
8
|
+
props.renderIcon
|
|
9
|
+
? props.renderIcon()
|
|
10
|
+
: props.iconUrl && (React.createElement(Image, { crossOrigin: "anonymous", src: props.iconUrl, alt: `${props.betType} Icon`, width: 28, height: 22 })),
|
|
11
|
+
React.createElement("div", { className: "T05_ALT" }, props.betType.toLocaleLowerCase()),
|
|
12
|
+
React.createElement("span", { className: "T02" }, props.children),
|
|
13
|
+
React.createElement("div", { className: "bets-card-status-container" },
|
|
14
|
+
outcome && outcome !== 'PENDING' && React.createElement(OutcomeBadge, { outcome: outcome }),
|
|
15
|
+
props.legCountThreshold &&
|
|
16
|
+
props.legCount &&
|
|
17
|
+
props.legCount > props.legCountThreshold && (React.createElement("div", { className: "icon-container", "data-focused": props.betCardProps.focused },
|
|
18
|
+
React.createElement(Icon, { iconName: props.cardExpanded ? 'collapse' : 'expand', width: 48, height: 48 }))))));
|
|
19
|
+
};
|
|
20
|
+
export default BetsCardHeader;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Icon from '@/components/atoms/SvgIcon/Icon';
|
|
3
|
+
import './GamblingDisclaimer.styles.css';
|
|
4
|
+
import FocusableItem from '@/components/core/ScrollableContainer/FocusableItem';
|
|
5
|
+
const FALLBACK_DISCLAIMER_TEXT = 'Odds by ESPN BET; 21+. Gambling Problem? Call 1-800-GAMBLER';
|
|
6
|
+
class GamblingDisclaimer extends React.Component {
|
|
7
|
+
render() {
|
|
8
|
+
return (React.createElement(FocusableItem, null,
|
|
9
|
+
React.createElement("div", { className: "gambling-disclaimer" },
|
|
10
|
+
React.createElement(Icon, { iconName: "mobilePhone", width: 32, height: 32 }),
|
|
11
|
+
React.createElement("div", { className: "gambling-disclaimer-text T02" }, this.props.text || FALLBACK_DISCLAIMER_TEXT))));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export default GamblingDisclaimer;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Icon from '@/components/atoms/SvgIcon/Icon';
|
|
3
|
+
import './LocationWarning.styles.css';
|
|
4
|
+
import FocusableItem from '@/components/core/ScrollableContainer/FocusableItem';
|
|
5
|
+
const FALLBACK_WARNING_TEXT = 'You are in a location outside of our operating area. Visit about.espnbet.com for more detail.';
|
|
6
|
+
class LocationWarning extends React.Component {
|
|
7
|
+
render() {
|
|
8
|
+
const { disclaimerText } = this.props;
|
|
9
|
+
const displayText = disclaimerText || FALLBACK_WARNING_TEXT;
|
|
10
|
+
return (React.createElement(FocusableItem, null,
|
|
11
|
+
React.createElement("div", { className: "location-warning" },
|
|
12
|
+
React.createElement(Icon, { iconName: "betsWarning", width: 32, height: 32 }),
|
|
13
|
+
React.createElement("div", { className: "location-warning-text T02" }, displayText))));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export default LocationWarning;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './PromoCodeBanner.styles.css';
|
|
3
|
+
import { withFocusable, } from '@/external/spatial-navigation';
|
|
4
|
+
import FocusableItem from '@/components/core/ScrollableContainer/FocusableItem';
|
|
5
|
+
import { DEFAULT_SCROLLABLE_CONTAINER_CONTEXT, SCROLLABLE_CONTEXT_TYPE, } from '@/components/core/ScrollableContainer/ScrollableContainer';
|
|
6
|
+
import SDK from '@/index';
|
|
7
|
+
class PromoCodeBanner extends React.Component {
|
|
8
|
+
render() {
|
|
9
|
+
const { title, description, logo, qrCode, backgroundImage, focused, } = this.props;
|
|
10
|
+
return (React.createElement(FocusableItem, null,
|
|
11
|
+
React.createElement("div", { className: "promo-code-banner focus-ring", "data-focused": focused, style: {
|
|
12
|
+
backgroundImage: `url(${backgroundImage})`,
|
|
13
|
+
} },
|
|
14
|
+
React.createElement("div", { className: "promo-content" },
|
|
15
|
+
React.createElement("div", { className: "promo-logo-container" },
|
|
16
|
+
React.createElement("img", { src: logo, alt: "ESPN Bet Logo", className: "promo-logo" })),
|
|
17
|
+
React.createElement("div", { className: "promo-tagline T20" }, title)),
|
|
18
|
+
React.createElement("div", { className: "promo-action-area" },
|
|
19
|
+
React.createElement("div", { className: "qr-code-container" },
|
|
20
|
+
React.createElement("img", { src: qrCode, alt: "QR Code", className: "qr-code" })),
|
|
21
|
+
React.createElement("div", { className: "promo-description T20" }, description)))));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const FocusablePromoCodeBanner = withFocusable()(PromoCodeBanner);
|
|
25
|
+
export default class FocusablePromoCodeBannerWrapper extends React.Component {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
Object.defineProperty(this, "context", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
configurable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
value: DEFAULT_SCROLLABLE_CONTAINER_CONTEXT
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(this, "onBecameFocused", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: (layout) => {
|
|
39
|
+
this.context.scrollToFocusedElement(layout);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(this, "onArrowPress", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true,
|
|
46
|
+
value: (d, _props) => {
|
|
47
|
+
if (d === 'left') {
|
|
48
|
+
SDK.getMaestroEventViewModel().deliverFocus();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(this, "onEnterPress", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
configurable: true,
|
|
55
|
+
writable: true,
|
|
56
|
+
value: () => {
|
|
57
|
+
// Track card click for promo
|
|
58
|
+
this.viewModel.trackCardClick('promo');
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
get viewModel() {
|
|
63
|
+
const vm = SDK.getMaestroEventViewModel().betsViewModel;
|
|
64
|
+
if (!vm) {
|
|
65
|
+
throw new Error('BetsViewModel is not initialized');
|
|
66
|
+
}
|
|
67
|
+
return vm;
|
|
68
|
+
}
|
|
69
|
+
render() {
|
|
70
|
+
return (React.createElement(FocusablePromoCodeBanner, { ...this.props, onBecameFocused: this.onBecameFocused, onArrowPress: this.onArrowPress, onEnterPress: this.onEnterPress }));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
Object.defineProperty(FocusablePromoCodeBannerWrapper, "contextTypes", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
configurable: true,
|
|
76
|
+
writable: true,
|
|
77
|
+
value: SCROLLABLE_CONTEXT_TYPE
|
|
78
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BetItemPromoCode } from './PromoCodeBanner';
|