@maestro_io/maestro-web-sdk 4.0.2 → 5.1.0
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/1.maestro-web-sdk.esm.js +1 -1
- package/dist/1.maestro-web-sdk.esm.js.map +1 -1
- package/dist/10.maestro-web-sdk.esm.js +1 -1
- package/dist/10.maestro-web-sdk.esm.js.map +1 -1
- package/dist/11.maestro-web-sdk.esm.js +1 -1
- package/dist/11.maestro-web-sdk.esm.js.map +1 -1
- package/dist/12.maestro-web-sdk.esm.js +1 -1
- package/dist/12.maestro-web-sdk.esm.js.map +1 -1
- package/dist/13.maestro-web-sdk.esm.js +1 -1
- package/dist/13.maestro-web-sdk.esm.js.map +1 -1
- package/dist/14.maestro-web-sdk.esm.js +1 -1
- package/dist/14.maestro-web-sdk.esm.js.map +1 -1
- package/dist/15.maestro-web-sdk.esm.js +1 -1
- package/dist/15.maestro-web-sdk.esm.js.map +1 -1
- package/dist/16.maestro-web-sdk.esm.js +1 -1
- package/dist/16.maestro-web-sdk.esm.js.map +1 -1
- package/dist/17.maestro-web-sdk.esm.js +1 -1
- package/dist/17.maestro-web-sdk.esm.js.map +1 -1
- package/dist/18.maestro-web-sdk.esm.js +1 -1
- package/dist/18.maestro-web-sdk.esm.js.map +1 -1
- package/dist/19.maestro-web-sdk.esm.js +1 -1
- package/dist/19.maestro-web-sdk.esm.js.map +1 -1
- package/dist/2.maestro-web-sdk.esm.js +1 -1
- package/dist/2.maestro-web-sdk.esm.js.map +1 -1
- package/dist/20.maestro-web-sdk.esm.js +1 -1
- package/dist/20.maestro-web-sdk.esm.js.map +1 -1
- package/dist/21.maestro-web-sdk.esm.js +1 -1
- package/dist/21.maestro-web-sdk.esm.js.map +1 -1
- package/dist/22.maestro-web-sdk.esm.js +1 -1
- package/dist/22.maestro-web-sdk.esm.js.map +1 -1
- package/dist/23.maestro-web-sdk.esm.js +1 -1
- package/dist/23.maestro-web-sdk.esm.js.map +1 -1
- package/dist/24.maestro-web-sdk.esm.js +1 -1
- package/dist/24.maestro-web-sdk.esm.js.map +1 -1
- package/dist/25.maestro-web-sdk.esm.js +2 -0
- package/dist/25.maestro-web-sdk.esm.js.map +1 -0
- package/dist/26.maestro-web-sdk.esm.js +2 -0
- package/dist/26.maestro-web-sdk.esm.js.map +1 -0
- package/dist/27.maestro-web-sdk.esm.js +2 -0
- package/dist/27.maestro-web-sdk.esm.js.map +1 -0
- package/dist/28.maestro-web-sdk.esm.js +2 -0
- package/dist/28.maestro-web-sdk.esm.js.map +1 -0
- package/dist/29.maestro-web-sdk.esm.js +2 -0
- package/dist/29.maestro-web-sdk.esm.js.map +1 -0
- package/dist/3.maestro-web-sdk.esm.js +1 -1
- package/dist/3.maestro-web-sdk.esm.js.map +1 -1
- package/dist/30.maestro-web-sdk.esm.js +2 -0
- package/dist/30.maestro-web-sdk.esm.js.map +1 -0
- package/dist/31.maestro-web-sdk.esm.js +2 -0
- package/dist/31.maestro-web-sdk.esm.js.map +1 -0
- package/dist/32.maestro-web-sdk.esm.js +2 -0
- package/dist/32.maestro-web-sdk.esm.js.map +1 -0
- package/dist/33.maestro-web-sdk.esm.js +2 -0
- package/dist/33.maestro-web-sdk.esm.js.map +1 -0
- package/dist/34.maestro-web-sdk.esm.js +2 -0
- package/dist/34.maestro-web-sdk.esm.js.map +1 -0
- package/dist/35.maestro-web-sdk.esm.js +2 -0
- package/dist/35.maestro-web-sdk.esm.js.map +1 -0
- package/dist/36.maestro-web-sdk.esm.js +2 -0
- package/dist/36.maestro-web-sdk.esm.js.map +1 -0
- package/dist/37.maestro-web-sdk.esm.js +2 -0
- package/dist/37.maestro-web-sdk.esm.js.map +1 -0
- package/dist/38.maestro-web-sdk.esm.js +2 -0
- package/dist/38.maestro-web-sdk.esm.js.map +1 -0
- package/dist/4.maestro-web-sdk.esm.js +1 -1
- package/dist/4.maestro-web-sdk.esm.js.map +1 -1
- package/dist/5.maestro-web-sdk.esm.js +1 -1
- package/dist/5.maestro-web-sdk.esm.js.map +1 -1
- package/dist/6.maestro-web-sdk.esm.js +1 -1
- package/dist/6.maestro-web-sdk.esm.js.map +1 -1
- package/dist/7.maestro-web-sdk.esm.js +1 -1
- package/dist/7.maestro-web-sdk.esm.js.map +1 -1
- package/dist/8.maestro-web-sdk.esm.js +1 -1
- package/dist/8.maestro-web-sdk.esm.js.map +1 -1
- package/dist/9.maestro-web-sdk.esm.js +1 -1
- package/dist/9.maestro-web-sdk.esm.js.map +1 -1
- package/dist/index.d.ts +233 -1144
- package/dist/maestro-web-sdk.esm.js +3 -32
- package/dist/maestro-web-sdk.esm.js.map +1 -1
- package/dist/maestro-web-sdk.umd.js +3 -32
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/package.json +7 -5
- package/dist/src/components/atoms/Rive/index.d.ts +4 -2
- package/dist/src/components/atoms/SvgIcon/BuilderIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/BuilderIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/FoxKeyPlaysIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/FoxKeyPlaysIcon.js +7 -0
- package/dist/src/components/atoms/SvgIcon/FoxMultiViewIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/FoxMultiViewIcon.js +10 -0
- package/dist/src/components/atoms/SvgIcon/FoxStatsIcon.d.ts +3 -0
- package/dist/src/components/atoms/SvgIcon/FoxStatsIcon.js +7 -0
- package/dist/src/components/atoms/SvgIcon/Icon.d.ts +1 -25
- package/dist/src/components/atoms/SvgIcon/Icon.js +46 -22
- package/dist/src/components/core/PanelManager/PanelManager.js +28 -12
- package/dist/src/components/core/ScrollableContainer/FocusableItem.d.ts +7 -2
- package/dist/src/components/core/ScrollableContainer/FocusableItem.js +19 -33
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.d.ts +10 -34
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.js +89 -147
- package/dist/src/components/core/ScrollableContainer/index.d.ts +4 -0
- package/dist/src/components/core/ScrollableContainer/index.js +3 -0
- package/dist/src/components/core/ScrollableContainer/useScrollableContainer.d.ts +14 -0
- package/dist/src/components/core/ScrollableContainer/useScrollableContainer.js +22 -0
- package/dist/src/components/molecules/ActionButton/ActionButton.d.ts +4 -2
- package/dist/src/components/molecules/ActionButton/ActionButton.js +6 -1
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.js +1 -1
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.d.ts +4 -2
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.js +1 -1
- package/dist/src/components/molecules/TabLoadError/TabLoadError.d.ts +4 -2
- package/dist/src/components/organisms/SegmentController/SegmentController.d.ts +1 -19
- package/dist/src/components/organisms/SegmentController/SegmentController.js +31 -72
- package/dist/src/development/MaestroEventDelegate.js +1 -1
- package/dist/src/development/development.js +4 -1
- package/dist/src/external/ReactRenderer.js +5 -4
- package/dist/src/external/spatial-navigation/spatialNavigation.d.ts +13 -8
- package/dist/src/external/spatial-navigation/spatialNavigation.js +73 -5
- package/dist/src/external/spatial-navigation/utils.d.ts +2 -0
- package/dist/src/external/spatial-navigation/withFocusable.d.ts +10 -2
- package/dist/src/external/spatial-navigation/withFocusable.js +12 -3
- package/dist/src/hooks/useMaxHeightToBottom.d.ts +11 -0
- package/dist/src/hooks/useMaxHeightToBottom.js +48 -0
- package/dist/src/index.d.ts +10 -11
- package/dist/src/index.js +51 -19
- package/dist/src/interfaces/IMaestroEvent.d.ts +1 -19
- package/dist/src/interfaces/IMaestroEvent.js +0 -17
- package/dist/src/interfaces/IMaestroManager.d.ts +39 -3
- package/dist/src/models/IPanel.d.ts +10 -6
- package/dist/src/models/IPanel.js +10 -38
- package/dist/src/modules/espn/bets/interfaces/IBetsViewModel.d.ts +5 -0
- package/dist/src/{services → modules/espn/bets/services}/BetsService.d.ts +3 -3
- package/dist/src/{services → modules/espn/bets/services}/BetsService.js +4 -3
- package/dist/src/modules/{bets → espn/bets}/view/BetsView.d.ts +4 -2
- package/dist/src/modules/{bets → espn/bets}/view/BetsView.js +38 -12
- package/dist/src/modules/{bets → espn/bets}/view/HotProps/HotPropsView.d.ts +21 -18
- package/dist/src/modules/{bets → espn/bets}/view/HotProps/HotPropsView.js +17 -34
- package/dist/src/modules/espn/bets/view/SixPack/SixPackView.d.ts +9 -0
- package/dist/src/modules/{bets → espn/bets}/view/SixPack/SixPackView.js +19 -52
- package/dist/src/modules/{bets → espn/bets}/view/UserBets/BetsCard/BetsCard.d.ts +22 -19
- package/dist/src/modules/{bets → espn/bets}/view/UserBets/BetsCard/BetsCard.js +16 -25
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +16 -0
- package/dist/src/modules/espn/bets/view/UserBets/BetsCard/BetsCardEvent.js +8 -0
- package/dist/src/modules/{bets → espn/bets}/view/UserBets/BetsCard/BetsCardFooter.d.ts +1 -1
- package/dist/src/modules/{bets → espn/bets}/view/UserBets/BetsCard/BetsCardFooter.js +1 -1
- package/dist/src/modules/{bets → espn/bets}/view/UserBets/Boost/Boost.d.ts +1 -1
- package/dist/src/modules/{bets → espn/bets}/view/UserBets/Parlay/Parlay.d.ts +1 -1
- package/dist/src/modules/{bets → espn/bets}/view/UserBets/Straight/Straight.d.ts +1 -1
- package/dist/src/modules/{bets → espn/bets}/view/UserBets/Teaser/Teaser.d.ts +1 -1
- package/dist/src/modules/espn/bets/view/components/Bet/Bet.d.ts +10 -0
- package/dist/src/modules/{bets → espn/bets}/view/components/Bet/Bet.js +12 -3
- package/dist/src/modules/{bets → espn/bets}/view/components/BetsCard/BetsCard.d.ts +2 -2
- package/dist/src/modules/espn/bets/view/components/BetsCard/BetsCard.js +24 -0
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.d.ts +7 -0
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +31 -0
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/index.d.ts +1 -0
- package/dist/src/modules/espn/bets/view/components/GamblingDisclaimer/index.js +1 -0
- package/dist/src/modules/espn/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +5 -0
- package/dist/src/modules/espn/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +45 -0
- package/dist/src/modules/{bets → espn/bets}/view-model/BetsViewModel.d.ts +4 -5
- package/dist/src/modules/{bets → espn/bets}/view-model/BetsViewModel.js +6 -33
- package/dist/src/modules/espn/fantasy/components/LeagueCard/LeagueCard.d.ts +104 -0
- package/dist/src/modules/espn/fantasy/components/TopPlayerCard/TopPlayerCard.d.ts +101 -0
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/TournamentOverflowQR.d.ts +103 -0
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/TournamentOverflowQR.js +94 -0
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/index.d.ts +1 -0
- package/dist/src/modules/espn/fantasy/components/TournamentOverflowQR/index.js +1 -0
- package/dist/src/{services → modules/espn/fantasy/services}/FantasyService.d.ts +27 -4
- package/dist/src/modules/espn/fantasy/services/FantasyService.js +124 -0
- package/dist/src/modules/{fantasy → espn/fantasy}/types.d.ts +118 -0
- package/dist/src/modules/{fantasy → espn/fantasy}/types.js +3 -0
- package/dist/src/modules/espn/fantasy/view/FantasyHeaderView.d.ts +8 -0
- package/dist/src/modules/espn/fantasy/view/FantasyHeaderView.js +8 -0
- package/dist/src/modules/espn/fantasy/view/FantasyItemView.d.ts +8 -0
- package/dist/src/modules/espn/fantasy/view/FantasyItemView.js +48 -0
- package/dist/src/modules/{fantasy → espn/fantasy}/view/FantasyView.d.ts +7 -0
- package/dist/src/modules/{fantasy → espn/fantasy}/view/FantasyView.js +86 -7
- package/dist/src/modules/espn/fantasy/view/InactiveLeague/InactiveLeague.d.ts +100 -0
- package/dist/src/modules/espn/fantasy/view/LoginView/LoginView.d.ts +96 -0
- package/dist/src/modules/espn/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.d.ts +97 -0
- package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupPair/MatchupPair.d.ts +18 -16
- package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupSingle/MatchupSingle.d.ts +18 -16
- package/dist/src/modules/espn/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.d.ts +97 -0
- package/dist/src/modules/{fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.d.ts → espn/fantasy/view/PromoView/PromoView.d.ts} +30 -25
- package/dist/src/modules/{fantasy → espn/fantasy}/view/PromoView/PromoView.js +2 -2
- package/dist/src/modules/espn/fantasy/view/TournamentBracketCard/TournamentBracketCard.d.ts +101 -0
- package/dist/src/modules/{fantasy → espn/fantasy}/view/TournamentBracketCard/TournamentBracketCard.js +10 -6
- package/dist/src/modules/{fantasy → espn/fantasy}/view-model/FantasyViewModel.FantasyPolling.d.ts +1 -1
- package/dist/src/modules/{fantasy → espn/fantasy}/view-model/FantasyViewModel.LeagueManagerPolling.d.ts +1 -1
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.TournamentPolling.d.ts +32 -0
- package/dist/src/modules/espn/fantasy/view-model/FantasyViewModel.TournamentPolling.js +140 -0
- package/dist/src/modules/{fantasy → espn/fantasy}/view-model/FantasyViewModel.d.ts +22 -3
- package/dist/src/modules/{fantasy → espn/fantasy}/view-model/FantasyViewModel.js +310 -46
- package/dist/src/modules/espn/key-plays/interfaces/IKeyPlaysViewModel.d.ts +17 -0
- package/dist/src/modules/{key-plays → espn/key-plays}/view/KeyPlayCardView.d.ts +2 -14
- package/dist/src/modules/{key-plays → espn/key-plays}/view/KeyPlayCardView.js +18 -42
- package/dist/src/modules/{key-plays → espn/key-plays}/view/KeyPlayErrorStateView.js +13 -13
- package/dist/src/modules/{key-plays → espn/key-plays}/view/KeyPlaysView.d.ts +2 -0
- package/dist/src/modules/{key-plays → espn/key-plays}/view/KeyPlaysView.js +33 -5
- package/dist/src/modules/{key-plays → espn/key-plays}/view-model/KeyPlaysViewModel.d.ts +1 -1
- package/dist/src/modules/{key-plays → espn/key-plays}/view-model/KeyPlaysViewModel.js +2 -3
- package/dist/src/{services → modules/espn/shop/services}/ShopService.d.ts +3 -3
- package/dist/src/{services → modules/espn/shop/services}/ShopService.js +2 -4
- package/dist/src/modules/{shop → espn/shop}/types.d.ts +3 -0
- package/dist/src/modules/{shop → espn/shop}/view/ProductDetailView/ProductDetailView.d.ts +1 -0
- package/dist/src/modules/{shop → espn/shop}/view/ShopView.d.ts +3 -0
- package/dist/src/modules/{shop → espn/shop}/view/ShopView.js +45 -4
- package/dist/src/modules/espn/shop/view/components/BrowseCard/BrowseCard.d.ts +103 -0
- package/dist/src/modules/{shop → espn/shop}/view/components/BrowseCard/BrowseCard.js +1 -1
- package/dist/src/modules/{shop → espn/shop}/view/components/ProductSummaryCard/ProductSummaryCard.d.ts +18 -16
- package/dist/src/modules/{shop → espn/shop}/view/components/ShopPromoView/ShopPromoView.js +2 -2
- package/dist/src/modules/espn/shop/view/components/ShopSection/ShopSection.d.ts +12 -0
- package/dist/src/modules/espn/shop/view/components/ShopSection/ShopSection.js +34 -0
- package/dist/src/modules/{shop → espn/shop}/view-model/ShopViewModel.ShopPolling.d.ts +1 -1
- package/dist/src/modules/{shop → espn/shop}/view-model/ShopViewModel.d.ts +4 -8
- package/dist/src/modules/{shop → espn/shop}/view-model/ShopViewModel.js +5 -39
- package/dist/src/modules/{stats/utils/renderTeamStatistic.d.ts → espn/stats/components/TeamStatistic.d.ts} +2 -6
- package/dist/src/modules/{stats/utils/renderTeamStatistic.js → espn/stats/components/TeamStatistic.js} +4 -7
- package/dist/src/modules/{stats → espn/stats}/interfaces/IStats.d.ts +124 -20
- package/dist/src/modules/espn/stats/interfaces/IStats.js +46 -0
- package/dist/src/modules/espn/stats/interfaces/IStatsViewModel.d.ts +7 -0
- package/dist/src/modules/espn/stats/interfaces/IStatsViewModel.js +1 -0
- package/dist/src/{services → modules/espn/stats/services}/StatsService.d.ts +3 -3
- package/dist/src/{services → modules/espn/stats/services}/StatsService.js +5 -4
- package/dist/src/modules/{stats → espn/stats}/utils/playerStatusUtils.js +1 -0
- package/dist/src/modules/espn/stats/view/CareerMatchup/CareerMatchup.d.ts +101 -0
- package/dist/src/modules/{stats → espn/stats}/view/CareerMatchup/CareerMatchup.js +6 -6
- package/dist/src/modules/espn/stats/view/DriveSummary/DrivePlayCard.d.ts +105 -0
- package/dist/src/modules/espn/stats/view/DriveSummary/DrivePlayCard.js +32 -0
- package/dist/src/modules/{stats → espn/stats}/view/DriveSummary/DriveSummary.d.ts +2 -9
- package/dist/src/modules/espn/stats/view/DriveSummary/DriveSummary.js +40 -0
- package/dist/src/modules/espn/stats/view/GameLeaders/GameLeaders.d.ts +9 -0
- package/dist/src/modules/espn/stats/view/GameLeaders/GameLeaders.js +22 -0
- package/dist/src/modules/{stats → espn/stats}/view/MatchPredictor/DonutChart/DonutChart.js +2 -2
- package/dist/src/modules/{fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.d.ts → espn/stats/view/MatchPredictor/MatchPredictorView.d.ts} +30 -25
- package/dist/src/modules/{stats → espn/stats}/view/Penalties/Penalties.js +1 -1
- package/dist/src/modules/{stats → espn/stats}/view/PlayerSeasonStats/ExpandedPlayerStats.js +11 -8
- package/dist/src/modules/{stats/view/ScoringSummary/ScoreItem/ScoreItem.d.ts → espn/stats/view/PlayerSeasonStats/PlayerSeasonStatsCard.d.ts} +6 -5
- package/dist/src/modules/{stats → espn/stats}/view/PlayerSeasonStats/PlayerSeasonStatsCard.js +2 -2
- package/dist/src/modules/{stats → espn/stats}/view/PlayerSeasonStats/PlayerSeasonStatsMinified.js +1 -1
- package/dist/src/modules/{stats → espn/stats}/view/PlayerSeasonStats/PlayerSeasonStatsView.js +1 -1
- package/dist/src/modules/{stats/view/components/AthletesStatistics/AthletesStatistics.d.ts → espn/stats/view/RecentGames/RecentGames.d.ts} +29 -42
- package/dist/src/modules/{stats → espn/stats}/view/ScoringSummary/ExpandedScores/ExpandedScores.d.ts +1 -1
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/ExpandedSummary.d.ts +100 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/ExpandedSummary.js +24 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/index.d.ts +2 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ExpandedScores/index.js +2 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoreItem/ScoreItem.d.ts +100 -0
- package/dist/src/modules/{stats → espn/stats}/view/ScoringSummary/ScoreItem/ScoreItem.js +1 -1
- package/dist/src/modules/{stats → espn/stats}/view/ScoringSummary/ScoresSection/ScoresSection.d.ts +1 -1
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoringSummary.d.ts +12 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/ScoringSummary.js +167 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/index.d.ts +1 -0
- package/dist/src/modules/espn/stats/view/ScoringSummary/index.js +1 -0
- package/dist/src/modules/espn/stats/view/StatsItemView.d.ts +8 -0
- package/dist/src/modules/espn/stats/view/StatsItemView.js +66 -0
- package/dist/src/modules/espn/stats/view/StatsQRCode/StatsQRCodeView.d.ts +100 -0
- package/dist/src/modules/{stats → espn/stats}/view/StatsView.d.ts +2 -0
- package/dist/src/modules/{stats → espn/stats}/view/StatsView.js +31 -4
- package/dist/src/modules/{stats → espn/stats}/view/TeamStats/TeamStatsView.d.ts +29 -26
- package/dist/src/modules/espn/stats/view/TeamStats/TeamStatsView.js +77 -0
- package/dist/src/modules/espn/stats/view/Teams/Teams.d.ts +100 -0
- package/dist/src/modules/{stats → espn/stats}/view/Teams/Teams.js +15 -19
- package/dist/src/modules/espn/stats/view/WinProbability/WinProbability.d.ts +100 -0
- package/dist/src/modules/{stats → espn/stats}/view/WinProbability/WinProbability.js +1 -1
- package/dist/src/modules/espn/stats/view/components/AthletesStatistics/AthletesStatistics.d.ts +115 -0
- package/dist/src/modules/{stats → espn/stats}/view/components/AthletesStatistics/AthletesStatistics.js +1 -1
- package/dist/src/modules/{stats → espn/stats}/view-model/StatsViewModel.d.ts +101 -20
- package/dist/src/modules/{stats → espn/stats}/view-model/StatsViewModel.js +527 -100
- package/dist/src/modules/fox/key-plays/view/FoxKeyPlays.d.ts +2 -0
- package/dist/src/modules/fox/key-plays/view/FoxKeyPlays.js +5 -0
- package/dist/src/modules/fox/multi-view/view/FoxMultiView.d.ts +2 -0
- package/dist/src/modules/fox/multi-view/view/FoxMultiView.js +5 -0
- package/dist/src/modules/fox/stats/view/FoxStatsView.d.ts +2 -0
- package/dist/src/modules/fox/stats/view/FoxStatsView.js +5 -0
- package/dist/src/modules/maestro/builder/components/BuilderSection/BuilderSection.d.ts +11 -0
- package/dist/src/modules/maestro/builder/components/BuilderSection/BuilderSection.js +52 -0
- package/dist/src/modules/maestro/builder/components/BuilderSection/index.d.ts +2 -0
- package/dist/src/modules/maestro/builder/components/BuilderSection/index.js +2 -0
- package/dist/src/modules/maestro/builder/components/ExpandableCard/ExpandableCard.d.ts +110 -0
- package/dist/src/modules/maestro/builder/components/ExpandableCard/ExpandableCard.js +37 -0
- package/dist/src/modules/maestro/builder/components/ExpandableCard/index.d.ts +2 -0
- package/dist/src/modules/maestro/builder/components/ExpandableCard/index.js +2 -0
- package/dist/src/modules/{shop/view/components/BrowseCard/BrowseCard.d.ts → maestro/builder/components/SimpleCard/SimpleCard.d.ts} +32 -29
- package/dist/src/modules/maestro/builder/components/SimpleCard/SimpleCard.js +12 -0
- package/dist/src/modules/maestro/builder/components/SimpleCard/index.d.ts +2 -0
- package/dist/src/modules/maestro/builder/components/SimpleCard/index.js +2 -0
- package/dist/src/modules/maestro/builder/index.d.ts +7 -0
- package/dist/src/modules/maestro/builder/index.js +7 -0
- package/dist/src/modules/maestro/builder/mocks/mockBuilderPanel.d.ts +149 -0
- package/dist/src/modules/maestro/builder/mocks/mockBuilderPanel.js +240 -0
- package/dist/src/modules/maestro/builder/types.d.ts +52 -0
- package/dist/src/modules/maestro/builder/types.js +1 -0
- package/dist/src/modules/maestro/builder/view/BuilderPanelView.d.ts +4 -0
- package/dist/src/modules/maestro/builder/view/BuilderPanelView.js +52 -0
- package/dist/src/modules/maestro/builder/view-model/BuilderPanelViewModel.d.ts +40 -0
- package/dist/src/modules/maestro/builder/view-model/BuilderPanelViewModel.js +229 -0
- package/dist/src/modules/maestro/builder/view-model/index.d.ts +1 -0
- package/dist/src/modules/maestro/builder/view-model/index.js +1 -0
- package/dist/src/sentry.d.ts +1 -1
- package/dist/src/sentry.js +41 -21
- package/dist/src/services/AnalyticsService/AnalyticsService.d.ts +3 -2
- package/dist/src/services/AnalyticsService/AnalyticsService.js +3 -1
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.d.ts +1 -1
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.js +1 -2
- package/dist/src/services/InsightsService/InsightsService.js +1 -1
- package/dist/src/services/NetworkManager/NetworkManager.d.ts +6 -0
- package/dist/src/services/NetworkManager/NetworkManager.js +39 -62
- package/dist/src/services/NetworkManager/types.d.ts +0 -96
- package/dist/src/services/NetworkManager/types.js +1 -10
- package/dist/src/services/StaticService/StaticService.d.ts +10 -2
- package/dist/src/services/StaticService/StaticService.js +32 -7
- package/dist/src/services/StaticService/mocks.d.ts +1 -0
- package/dist/src/services/StaticService/mocks.js +114 -99
- package/dist/src/services/StaticService/types.d.ts +3 -1
- package/dist/src/services/UserSettingsManager.js +9 -6
- package/dist/src/view-models/MaestroEventViewModel.d.ts +47 -16
- package/dist/src/view-models/MaestroEventViewModel.js +124 -58
- package/dist/src/view-models/PanelManagerViewModel.d.ts +4 -1
- package/dist/src/view-models/PanelManagerViewModel.js +41 -58
- package/package.json +7 -5
- package/dist/1.maestro-web-sdk.umd.js +0 -2
- package/dist/1.maestro-web-sdk.umd.js.map +0 -1
- package/dist/10.maestro-web-sdk.umd.js +0 -2
- package/dist/10.maestro-web-sdk.umd.js.map +0 -1
- package/dist/11.maestro-web-sdk.umd.js +0 -2
- package/dist/11.maestro-web-sdk.umd.js.map +0 -1
- package/dist/12.maestro-web-sdk.umd.js +0 -2
- package/dist/12.maestro-web-sdk.umd.js.map +0 -1
- package/dist/13.maestro-web-sdk.umd.js +0 -2
- package/dist/13.maestro-web-sdk.umd.js.map +0 -1
- package/dist/14.maestro-web-sdk.umd.js +0 -2
- package/dist/14.maestro-web-sdk.umd.js.map +0 -1
- package/dist/15.maestro-web-sdk.umd.js +0 -2
- package/dist/15.maestro-web-sdk.umd.js.map +0 -1
- package/dist/16.maestro-web-sdk.umd.js +0 -2
- package/dist/16.maestro-web-sdk.umd.js.map +0 -1
- package/dist/17.maestro-web-sdk.umd.js +0 -2
- package/dist/17.maestro-web-sdk.umd.js.map +0 -1
- package/dist/18.maestro-web-sdk.umd.js +0 -2
- package/dist/18.maestro-web-sdk.umd.js.map +0 -1
- package/dist/19.maestro-web-sdk.umd.js +0 -2
- package/dist/19.maestro-web-sdk.umd.js.map +0 -1
- package/dist/2.maestro-web-sdk.umd.js +0 -2
- package/dist/2.maestro-web-sdk.umd.js.map +0 -1
- package/dist/20.maestro-web-sdk.umd.js +0 -2
- package/dist/20.maestro-web-sdk.umd.js.map +0 -1
- package/dist/21.maestro-web-sdk.umd.js +0 -2
- package/dist/21.maestro-web-sdk.umd.js.map +0 -1
- package/dist/22.maestro-web-sdk.umd.js +0 -2
- package/dist/22.maestro-web-sdk.umd.js.map +0 -1
- package/dist/23.maestro-web-sdk.umd.js +0 -2
- package/dist/23.maestro-web-sdk.umd.js.map +0 -1
- package/dist/24.maestro-web-sdk.umd.js +0 -2
- package/dist/24.maestro-web-sdk.umd.js.map +0 -1
- package/dist/3.maestro-web-sdk.umd.js +0 -2
- package/dist/3.maestro-web-sdk.umd.js.map +0 -1
- package/dist/4.maestro-web-sdk.umd.js +0 -2
- package/dist/4.maestro-web-sdk.umd.js.map +0 -1
- package/dist/5.maestro-web-sdk.umd.js +0 -2
- package/dist/5.maestro-web-sdk.umd.js.map +0 -1
- package/dist/6.maestro-web-sdk.umd.js +0 -2
- package/dist/6.maestro-web-sdk.umd.js.map +0 -1
- package/dist/7.maestro-web-sdk.umd.js +0 -2
- package/dist/7.maestro-web-sdk.umd.js.map +0 -1
- package/dist/8.maestro-web-sdk.umd.js +0 -2
- package/dist/8.maestro-web-sdk.umd.js.map +0 -1
- package/dist/9.maestro-web-sdk.umd.js +0 -2
- package/dist/9.maestro-web-sdk.umd.js.map +0 -1
- package/dist/bundle-report.html +0 -53
- package/dist/src/components/molecules/Overlay/Overlay.d.ts +0 -34
- package/dist/src/components/molecules/Overlay/Overlay.js +0 -139
- package/dist/src/components/molecules/Overlay/index.d.ts +0 -2
- package/dist/src/components/molecules/Overlay/index.js +0 -2
- package/dist/src/models/IWinningBet.d.ts +0 -7
- package/dist/src/modules/bets/view/SixPack/SixPackView.d.ts +0 -23
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +0 -26
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardEvent.js +0 -34
- package/dist/src/modules/bets/view/components/Bet/Bet.d.ts +0 -158
- package/dist/src/modules/bets/view/components/BetsCard/BetsCard.js +0 -15
- package/dist/src/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.d.ts +0 -8
- package/dist/src/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +0 -14
- package/dist/src/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +0 -18
- package/dist/src/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +0 -78
- package/dist/src/modules/fantasy/components/LeagueCard/LeagueCard.d.ts +0 -102
- package/dist/src/modules/fantasy/components/TopPlayerCard/TopPlayerCard.d.ts +0 -99
- package/dist/src/modules/fantasy/view/FantasyItemView.d.ts +0 -22
- package/dist/src/modules/fantasy/view/FantasyItemView.js +0 -74
- package/dist/src/modules/fantasy/view/InactiveLeague/InactiveLeague.d.ts +0 -98
- package/dist/src/modules/fantasy/view/LoginView/LoginView.d.ts +0 -94
- package/dist/src/modules/fantasy/view/PromoView/PromoView.d.ts +0 -98
- package/dist/src/modules/fantasy/view/TournamentBracketCard/TournamentBracketCard.d.ts +0 -99
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.d.ts +0 -23
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.js +0 -61
- package/dist/src/modules/stats/view/CareerMatchup/CareerMatchup.d.ts +0 -100
- package/dist/src/modules/stats/view/DriveSummary/DrivePlayCard.d.ts +0 -106
- package/dist/src/modules/stats/view/DriveSummary/DrivePlayCard.js +0 -70
- package/dist/src/modules/stats/view/DriveSummary/DriveSummary.js +0 -87
- package/dist/src/modules/stats/view/GameLeaders/GameLeaders.d.ts +0 -21
- package/dist/src/modules/stats/view/GameLeaders/GameLeaders.js +0 -48
- package/dist/src/modules/stats/view/MatchPredictor/MatchPredictorView.d.ts +0 -98
- package/dist/src/modules/stats/view/PlayerSeasonStats/PlayerSeasonStatsCard.d.ts +0 -97
- package/dist/src/modules/stats/view/RecentGames/RecentGames.d.ts +0 -98
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/index.d.ts +0 -2
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/index.js +0 -2
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.d.ts +0 -29
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.js +0 -125
- package/dist/src/modules/stats/view/ScoringSummary/index.d.ts +0 -2
- package/dist/src/modules/stats/view/ScoringSummary/index.js +0 -2
- package/dist/src/modules/stats/view/StatsItemView.d.ts +0 -22
- package/dist/src/modules/stats/view/StatsItemView.js +0 -92
- package/dist/src/modules/stats/view/StatsQRCode/StatsQRCodeView.d.ts +0 -98
- package/dist/src/modules/stats/view/TeamStats/TeamStatsView.js +0 -43
- package/dist/src/modules/stats/view/Teams/Teams.d.ts +0 -98
- package/dist/src/modules/stats/view/WinProbability/WinProbability.d.ts +0 -98
- package/dist/src/services/FantasyService.js +0 -92
- package/dist/src/services/NetworkManager/NetworkManagerFactory.d.ts +0 -42
- package/dist/src/services/NetworkManager/NetworkManagerFactory.js +0 -101
- package/dist/src/types/OverlayTypes.d.ts +0 -43
- package/dist/src/types/OverlayTypes.js +0 -4
- package/dist/src/view-models/OverlayViewModel.d.ts +0 -33
- package/dist/src/view-models/OverlayViewModel.js +0 -222
- /package/dist/src/modules/{bets → espn/bets}/interfaces/IBets.d.ts +0 -0
- /package/dist/src/modules/{bets → espn/bets}/interfaces/IBets.js +0 -0
- /package/dist/src/{models/IWinningBet.js → modules/espn/bets/interfaces/IBetsViewModel.js} +0 -0
- /package/dist/src/modules/{bets → espn/bets}/mocks.d.ts +0 -0
- /package/dist/src/modules/{bets → espn/bets}/mocks.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/types/BetsAnalyticsTypes.d.ts +0 -0
- /package/dist/src/modules/{bets → espn/bets}/types/BetsAnalyticsTypes.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/UserBets/BetResult/BetResult.d.ts +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/UserBets/BetResult/BetResult.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/UserBets/Boost/Boost.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/UserBets/OutcomeBadge/OutcomeBadge.d.ts +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/UserBets/OutcomeBadge/OutcomeBadge.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/UserBets/Parlay/Parlay.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/UserBets/Straight/Straight.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/UserBets/Teaser/Teaser.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/UserBets/UserBetsView.d.ts +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/UserBets/UserBetsView.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/components/BetPill/BetPill.d.ts +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/components/BetPill/BetPill.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/components/BetsCard/BetsCardHeader.d.ts +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/components/BetsCard/BetsCardHeader.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/components/LocationWarning/LocationWarning.d.ts +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/components/LocationWarning/LocationWarning.js +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/components/PromoCodeBanner/index.d.ts +0 -0
- /package/dist/src/modules/{bets → espn/bets}/view/components/PromoCodeBanner/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/components/ExpandedAthleteList/ExpandedAthletesList.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/components/ExpandedAthleteList/ExpandedAthletesList.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/components/ExpandedAthleteList/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/components/ExpandedAthleteList/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/components/LeagueCard/LeagueCard.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/components/LeagueCard/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/components/LeagueCard/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/components/TopPlayerCard/TopPlayerCard.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/components/TopPlayerCard/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/components/TopPlayerCard/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/mocks.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/mocks.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/ActiveAthletesMarquee/ActiveAthletesMarquee.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/ActiveAthletesMarquee/ActiveAthletesMarquee.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/ActiveAthletesMarquee/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/ActiveAthletesMarquee/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/InactiveLeague/DraftDateCountdown.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/InactiveLeague/DraftDateCountdown.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/InactiveLeague/InactiveLeague.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/InactiveLeague/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/InactiveLeague/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/LoginView/LoginView.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/LoginView/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/LoginView/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupPair/DoubleAthleteCard/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupPair/DoubleAthleteCard/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupPair/ExpandedDoubleAthleteCards.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupPair/ExpandedDoubleAthleteCards.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupPair/MatchupPair.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupPair/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupPair/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupSingle/ExpandedSingleAthleteCards.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupSingle/ExpandedSingleAthleteCards.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupSingle/MatchupSingle.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupSingle/SingleAthleteCard/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupSingle/SingleAthleteCard/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupSingle/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/MatchupSingle/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/PromoView/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/PromoView/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/TournamentBracketCard/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/TournamentBracketCard/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/index.d.ts +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view/index.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view-model/FantasyViewModel.FantasyPolling.js +0 -0
- /package/dist/src/modules/{fantasy → espn/fantasy}/view-model/FantasyViewModel.LeagueManagerPolling.js +0 -0
- /package/dist/src/modules/{key-plays → espn/key-plays}/constants.d.ts +0 -0
- /package/dist/src/modules/{key-plays → espn/key-plays}/constants.js +0 -0
- /package/dist/src/modules/{key-plays → espn/key-plays}/interfaces/IKeyPlays.d.ts +0 -0
- /package/dist/src/modules/{key-plays → espn/key-plays}/interfaces/IKeyPlays.js +0 -0
- /package/dist/src/modules/{key-plays → espn/key-plays}/interfaces/IKeyPlaysResponse.d.ts +0 -0
- /package/dist/src/modules/{key-plays → espn/key-plays}/interfaces/IKeyPlaysResponse.js +0 -0
- /package/dist/src/modules/{stats/interfaces/IStats.js → espn/key-plays/interfaces/IKeyPlaysViewModel.js} +0 -0
- /package/dist/src/modules/{key-plays → espn/key-plays}/view/KeyPlayCardScoreTagView.d.ts +0 -0
- /package/dist/src/modules/{key-plays → espn/key-plays}/view/KeyPlayCardScoreTagView.js +0 -0
- /package/dist/src/modules/{key-plays → espn/key-plays}/view/KeyPlayErrorStateView.d.ts +0 -0
- /package/dist/src/modules/{shop → espn/shop}/mocks.d.ts +0 -0
- /package/dist/src/modules/{shop → espn/shop}/mocks.js +0 -0
- /package/dist/src/modules/{shop → espn/shop}/types.js +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/ProductDetailView/ProductDetailView.js +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/ProductDetailView/index.d.ts +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/ProductDetailView/index.js +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/components/BrowseCard/index.d.ts +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/components/BrowseCard/index.js +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/components/ProductSummaryCard/ProductSummaryCard.js +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/components/ProductSummaryCard/index.d.ts +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/components/ProductSummaryCard/index.js +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/components/ShopPromoView/ShopPromoView.d.ts +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/components/ShopPromoView/index.d.ts +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/components/ShopPromoView/index.js +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/components/ShopSection/index.d.ts +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/components/ShopSection/index.js +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/index.d.ts +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view/index.js +0 -0
- /package/dist/src/modules/{shop → espn/shop}/view-model/ShopViewModel.ShopPolling.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/mocks.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/mocks.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/utils/driveSummaryUtils.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/utils/driveSummaryUtils.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/utils/playerStatusUtils.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/utils.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/utils.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ActiveAthletes/ActiveAthletes.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ActiveAthletes/ActiveAthletes.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ActiveAthletes/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ActiveAthletes/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/CareerMatchup/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/CareerMatchup/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/DriveSummary/Header/DriveSummaryHeader.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/DriveSummary/Header/DriveSummaryHeader.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/DriveSummary/MainStat/MainStat.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/DriveSummary/MainStat/MainStat.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/DriveSummary/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/DriveSummary/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/GameLeaders/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/GameLeaders/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/MatchPredictor/DonutChart/DonutChart.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/MatchPredictor/DonutChart/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/MatchPredictor/DonutChart/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/MatchPredictor/MatchPredictorView.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/MatchPredictor/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/MatchPredictor/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/Penalties/Penalties.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/Penalties/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/Penalties/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/PlayerSeasonStats/ExpandedPlayerStats.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/PlayerSeasonStats/PlayerSeasonStatsMinified.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/PlayerSeasonStats/PlayerSeasonStatsView.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/PlayerSeasonStats/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/PlayerSeasonStats/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/RecentGames/RecentGames.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/RecentGames/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/RecentGames/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ScoringSummary/ExpandedScores/ExpandedScores.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ScoringSummary/ScoreItem/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ScoringSummary/ScoreItem/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ScoringSummary/ScoresSection/ScoresSection.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ScoringSummary/ScoresSection/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/ScoringSummary/ScoresSection/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/StatsQRCode/StatsQRCodeView.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/StatsQRCode/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/StatsQRCode/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/TeamStats/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/TeamStats/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/Teams/StatsCarousel.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/Teams/StatsCarousel.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/Teams/StatsProgressBar.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/Teams/StatsProgressBar.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/Teams/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/Teams/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/WinProbability/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/WinProbability/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/components/AthletesStatistics/StatisticTable.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/components/AthletesStatistics/StatisticTable.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/components/AthletesStatistics/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/components/AthletesStatistics/index.js +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/index.d.ts +0 -0
- /package/dist/src/modules/{stats → espn/stats}/view/index.js +0 -0
- /package/dist/src/modules/{hello-world → maestro/hello-world}/HelloWorldImage.d.ts +0 -0
- /package/dist/src/modules/{hello-world → maestro/hello-world}/HelloWorldImage.js +0 -0
- /package/dist/src/modules/{hello-world → maestro/hello-world}/HelloWorldView.d.ts +0 -0
- /package/dist/src/modules/{hello-world → maestro/hello-world}/HelloWorldView.js +0 -0
- /package/dist/src/modules/{hello-world → maestro/hello-world}/index.d.ts +0 -0
- /package/dist/src/modules/{hello-world → maestro/hello-world}/index.js +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Observable } from '@/helpers/Observable';
|
|
2
|
-
import AnalyticsService from '@/services/AnalyticsService/AnalyticsService';
|
|
3
2
|
import { captureException } from '@/sentry';
|
|
4
|
-
import
|
|
3
|
+
import SDK from '@/index';
|
|
4
|
+
import FantasyService from '@/modules/espn/fantasy/services/FantasyService';
|
|
5
5
|
import { isLeagueManagerHeadToHeadResponse, isLeagueManagerRotoResponse, } from '../types';
|
|
6
6
|
import FantasyPolling from './FantasyViewModel.FantasyPolling';
|
|
7
7
|
import LeagueManagerPolling from './FantasyViewModel.LeagueManagerPolling';
|
|
8
|
+
import TournamentPolling from './FantasyViewModel.TournamentPolling';
|
|
8
9
|
import { slugify, stringHashCode } from '@/helpers/strings';
|
|
9
10
|
import { MOCK_FANTASY_RESPONSE } from '../mocks';
|
|
10
11
|
const FANTASY_ERROR_STATE = {
|
|
@@ -12,7 +13,7 @@ const FANTASY_ERROR_STATE = {
|
|
|
12
13
|
TAB_LOAD_FAILURE: 'tabLoadFailure',
|
|
13
14
|
};
|
|
14
15
|
export class FantasyViewModel {
|
|
15
|
-
constructor(eventId, delegate, options = {}) {
|
|
16
|
+
constructor(eventId, delegate, analyticsService, options = {}) {
|
|
16
17
|
// Observable properties
|
|
17
18
|
Object.defineProperty(this, "fantasyItems", {
|
|
18
19
|
enumerable: true,
|
|
@@ -32,6 +33,12 @@ export class FantasyViewModel {
|
|
|
32
33
|
writable: true,
|
|
33
34
|
value: new Observable(false)
|
|
34
35
|
});
|
|
36
|
+
Object.defineProperty(this, "isLoadingTc", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: new Observable(false)
|
|
41
|
+
});
|
|
35
42
|
// Properties
|
|
36
43
|
Object.defineProperty(this, "eventId", {
|
|
37
44
|
enumerable: true,
|
|
@@ -69,6 +76,12 @@ export class FantasyViewModel {
|
|
|
69
76
|
writable: true,
|
|
70
77
|
value: void 0
|
|
71
78
|
});
|
|
79
|
+
Object.defineProperty(this, "tournamentPolling", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
configurable: true,
|
|
82
|
+
writable: true,
|
|
83
|
+
value: void 0
|
|
84
|
+
});
|
|
72
85
|
Object.defineProperty(this, "errorState", {
|
|
73
86
|
enumerable: true,
|
|
74
87
|
configurable: true,
|
|
@@ -93,13 +106,44 @@ export class FantasyViewModel {
|
|
|
93
106
|
writable: true,
|
|
94
107
|
value: false
|
|
95
108
|
});
|
|
109
|
+
Object.defineProperty(this, "_promoData", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
configurable: true,
|
|
112
|
+
writable: true,
|
|
113
|
+
value: null
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(this, "_fantasyLeagues", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
configurable: true,
|
|
118
|
+
writable: true,
|
|
119
|
+
value: []
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(this, "_tournamentChallenges", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
configurable: true,
|
|
124
|
+
writable: true,
|
|
125
|
+
value: []
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(this, "_promoItem", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
configurable: true,
|
|
130
|
+
writable: true,
|
|
131
|
+
value: null
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(this, "_tcProcessingCount", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
configurable: true,
|
|
136
|
+
writable: true,
|
|
137
|
+
value: 0
|
|
138
|
+
});
|
|
96
139
|
this.useMockData = options.useMockData || false;
|
|
97
140
|
this.eventId = eventId;
|
|
98
141
|
this.delegate = delegate;
|
|
99
|
-
this.analyticsService =
|
|
142
|
+
this.analyticsService = analyticsService;
|
|
100
143
|
this.fantasyService = new FantasyService();
|
|
101
144
|
this.fantasyPolling = new FantasyPolling(this.fantasyService);
|
|
102
145
|
this.leagueManagerPolling = new LeagueManagerPolling(this.fantasyService);
|
|
146
|
+
this.tournamentPolling = new TournamentPolling(this.fantasyService);
|
|
103
147
|
}
|
|
104
148
|
/**
|
|
105
149
|
* Initialize the ViewModel and start data fetching
|
|
@@ -162,8 +206,13 @@ export class FantasyViewModel {
|
|
|
162
206
|
this.fantasyPolling.stop();
|
|
163
207
|
this.fantasyPolling.removeLastResponseHash();
|
|
164
208
|
this.leagueManagerPolling.stopAll();
|
|
209
|
+
this.tournamentPolling.stopAll();
|
|
165
210
|
this.leagueSortOrder.clear();
|
|
166
211
|
this.itemToLeagueKey.clear();
|
|
212
|
+
this._fantasyLeagues = [];
|
|
213
|
+
this._tournamentChallenges = [];
|
|
214
|
+
this._tcProcessingCount = 0;
|
|
215
|
+
this.isLoadingTc.value = false;
|
|
167
216
|
}
|
|
168
217
|
/**
|
|
169
218
|
* Track panel view event
|
|
@@ -183,28 +232,63 @@ export class FantasyViewModel {
|
|
|
183
232
|
try {
|
|
184
233
|
const token = (await this.delegate.getUserToken()) || '';
|
|
185
234
|
this.leagueManagerPolling.stopAll();
|
|
235
|
+
this.tournamentPolling.stopAll();
|
|
236
|
+
// Check hide_pickems flag from panel config
|
|
237
|
+
const config = SDK.getPageConfig();
|
|
238
|
+
const panel = config?.panels?.find((p) => p.panel_type === 'espnFantasy');
|
|
239
|
+
const hidePickems = panel?.renderer?.block_data?.hide_pickems || false;
|
|
240
|
+
const hasChallenges = (data.fantasyData?.challengeInformation || []).length > 0;
|
|
186
241
|
const noData = (data.fantasyData?.totalChallengeEntries || 0) +
|
|
187
242
|
(data.fantasyData?.totalFantasyLeagues || 0) ===
|
|
188
243
|
0;
|
|
189
|
-
if (noData || (data.preferences || []).length === 0) {
|
|
190
|
-
const promo = await this.fantasyService.getPromo();
|
|
191
|
-
this.append({
|
|
192
|
-
id: 'promo',
|
|
193
|
-
type: 'promo',
|
|
194
|
-
background: promo.fantasy.promotion.background,
|
|
195
|
-
description: promo.fantasy.promotion.description,
|
|
196
|
-
logo: promo.fantasy.promotion.logo,
|
|
197
|
-
qrCode: promo.fantasy.promotion.qrCode,
|
|
198
|
-
title: promo.fantasy.promotion.title,
|
|
199
|
-
});
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
else if (this.fantasyItems.value.find((i) => i.type === 'promo')) {
|
|
203
|
-
this.fantasyItems.value = [];
|
|
204
|
-
}
|
|
205
244
|
// Clear and rebuild the sort order map based on preferences array order
|
|
206
245
|
this.leagueSortOrder.clear();
|
|
207
246
|
this.itemToLeagueKey.clear();
|
|
247
|
+
// Clear internal lists on full refresh
|
|
248
|
+
this._fantasyLeagues = [];
|
|
249
|
+
this._tournamentChallenges = [];
|
|
250
|
+
if (!hidePickems && hasChallenges) {
|
|
251
|
+
this.isLoadingTc.value = true;
|
|
252
|
+
data.fantasyData?.challengeInformation?.forEach((challenge) => {
|
|
253
|
+
if (challenge.gameType === 'BRACKET') {
|
|
254
|
+
this._tcProcessingCount++;
|
|
255
|
+
const key = `tc-${challenge.id}-${token}`;
|
|
256
|
+
this.tournamentPolling.refresh(key, {
|
|
257
|
+
challengeId: String(challenge.id),
|
|
258
|
+
competitionId: this.eventId,
|
|
259
|
+
token,
|
|
260
|
+
}, (data) => {
|
|
261
|
+
this.parseTournamentChallenge(data);
|
|
262
|
+
this._tcProcessingCount--;
|
|
263
|
+
if (this._tcProcessingCount === 0) {
|
|
264
|
+
this.isLoadingTc.value = false;
|
|
265
|
+
this.rebuildFantasyItems();
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
// If no BRACKET challenges were found, set isLoadingTc back to false
|
|
271
|
+
if (this._tcProcessingCount === 0) {
|
|
272
|
+
this.isLoadingTc.value = false;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
this.isLoadingTc.value = false;
|
|
277
|
+
}
|
|
278
|
+
if (noData || (data.preferences || []).length === 0) {
|
|
279
|
+
const promo = await this.getPromoData();
|
|
280
|
+
if (promo) {
|
|
281
|
+
this._promoItem = {
|
|
282
|
+
id: 'promo',
|
|
283
|
+
type: 'promo',
|
|
284
|
+
background: promo.fantasy.promotion.background,
|
|
285
|
+
description: promo.fantasy.promotion.description,
|
|
286
|
+
logo: promo.fantasy.promotion.logo,
|
|
287
|
+
qrCode: promo.fantasy.promotion.qrCode,
|
|
288
|
+
title: promo.fantasy.promotion.title,
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
}
|
|
208
292
|
for (let i = 0; i < (data.preferences || []).length; i++) {
|
|
209
293
|
const pref = data.preferences[i];
|
|
210
294
|
const entry = pref.metaData?.entry || {};
|
|
@@ -250,6 +334,8 @@ export class FantasyViewModel {
|
|
|
250
334
|
// Mark successful load
|
|
251
335
|
this.hasEverSuccessfullyLoaded.value = true;
|
|
252
336
|
this.errorState.value = 'none';
|
|
337
|
+
// Initial rebuild even if empty, to ensure state is clean
|
|
338
|
+
this.rebuildFantasyItems();
|
|
253
339
|
}
|
|
254
340
|
catch (error) {
|
|
255
341
|
captureException(error, {
|
|
@@ -334,39 +420,106 @@ export class FantasyViewModel {
|
|
|
334
420
|
if (!item) {
|
|
335
421
|
return;
|
|
336
422
|
}
|
|
337
|
-
if (item.type === 'notLoggedIn'
|
|
423
|
+
if (item.type === 'notLoggedIn') {
|
|
338
424
|
this.fantasyItems.value = [item];
|
|
339
425
|
return;
|
|
340
426
|
}
|
|
341
|
-
|
|
427
|
+
if (item.type === 'promo') {
|
|
428
|
+
this._promoItem = item;
|
|
429
|
+
}
|
|
430
|
+
// Store the league key for this item if provided
|
|
342
431
|
if (leagueKey) {
|
|
343
432
|
this.itemToLeagueKey.set(item.id, leagueKey);
|
|
344
433
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
434
|
+
if (item.type === 'matchup-pair' ||
|
|
435
|
+
item.type === 'matchup-single' ||
|
|
436
|
+
item.type === 'inactiveLeague') {
|
|
437
|
+
const existingItemIndex = this._fantasyLeagues.findIndex((i) => i.id === item.id);
|
|
438
|
+
if (existingItemIndex !== -1) {
|
|
439
|
+
this._fantasyLeagues[existingItemIndex] = item;
|
|
440
|
+
}
|
|
441
|
+
else {
|
|
442
|
+
this._fantasyLeagues.push(item);
|
|
443
|
+
}
|
|
444
|
+
// Sort items inside the group
|
|
445
|
+
this._fantasyLeagues.sort((a, b) => {
|
|
446
|
+
const keyA = this.itemToLeagueKey.get(a.id);
|
|
447
|
+
const keyB = this.itemToLeagueKey.get(b.id);
|
|
448
|
+
const orderA = keyA !== undefined
|
|
449
|
+
? this.leagueSortOrder.get(keyA) ?? Number.MAX_SAFE_INTEGER
|
|
450
|
+
: Number.MAX_SAFE_INTEGER;
|
|
451
|
+
const orderB = keyB !== undefined
|
|
452
|
+
? this.leagueSortOrder.get(keyB) ?? Number.MAX_SAFE_INTEGER
|
|
453
|
+
: Number.MAX_SAFE_INTEGER;
|
|
454
|
+
return orderA - orderB;
|
|
455
|
+
});
|
|
353
456
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
457
|
+
const existingGroupIndex = this._tournamentChallenges.findIndex((g) => g.id === leagueKey);
|
|
458
|
+
if (item.type === 'fantasy-header') {
|
|
459
|
+
if (existingGroupIndex !== -1) {
|
|
460
|
+
this._tournamentChallenges[existingGroupIndex].header = item;
|
|
461
|
+
}
|
|
462
|
+
else if (leagueKey) {
|
|
463
|
+
this._tournamentChallenges.push({
|
|
464
|
+
type: 'fantasy-group',
|
|
465
|
+
id: leagueKey,
|
|
466
|
+
header: item,
|
|
467
|
+
items: [],
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
else if (item.type === 'tournament-bracket-card' ||
|
|
472
|
+
item.type === 'tournament-overflow-qr') {
|
|
473
|
+
if (existingGroupIndex !== -1) {
|
|
474
|
+
const group = this._tournamentChallenges[existingGroupIndex];
|
|
475
|
+
const existingItemIndex = group.items.findIndex((i) => i.id === item.id);
|
|
476
|
+
if (existingItemIndex !== -1) {
|
|
477
|
+
group.items[existingItemIndex] = item;
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
group.items.push(item);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
else if (leagueKey) {
|
|
484
|
+
this._tournamentChallenges.push({
|
|
485
|
+
type: 'fantasy-group',
|
|
486
|
+
id: leagueKey,
|
|
487
|
+
header: {
|
|
488
|
+
type: 'fantasy-header',
|
|
489
|
+
id: `${leagueKey}-header`,
|
|
490
|
+
title: '',
|
|
491
|
+
},
|
|
492
|
+
items: [item],
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
this.rebuildFantasyItems();
|
|
497
|
+
}
|
|
498
|
+
rebuildFantasyItems() {
|
|
499
|
+
const items = [];
|
|
500
|
+
if (this._tournamentChallenges.length > 0) {
|
|
501
|
+
items.push(...this._tournamentChallenges);
|
|
502
|
+
}
|
|
503
|
+
if (this._fantasyLeagues.length > 0) {
|
|
504
|
+
items.push({
|
|
505
|
+
type: 'fantasy-group',
|
|
506
|
+
id: 'header-fantasy-leagues-group',
|
|
507
|
+
header: {
|
|
508
|
+
type: 'fantasy-header',
|
|
509
|
+
id: 'header-fantasy-leagues',
|
|
510
|
+
title: 'Fantasy Leagues',
|
|
511
|
+
},
|
|
512
|
+
items: this._fantasyLeagues,
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
if (this._promoItem &&
|
|
516
|
+
this._tournamentChallenges.length === 0 &&
|
|
517
|
+
this._fantasyLeagues.length === 0 &&
|
|
518
|
+
items.length === 0 &&
|
|
519
|
+
!this.isLoadingTc.value) {
|
|
520
|
+
items.push(this._promoItem);
|
|
521
|
+
}
|
|
522
|
+
this.fantasyItems.value = items;
|
|
370
523
|
}
|
|
371
524
|
parseHeadToHead(data, preference) {
|
|
372
525
|
if (!data.matchups?.length ||
|
|
@@ -514,6 +667,105 @@ export class FantasyViewModel {
|
|
|
514
667
|
draftDate: draftDateNum,
|
|
515
668
|
};
|
|
516
669
|
}
|
|
670
|
+
async getPromoData() {
|
|
671
|
+
if (this._promoData) {
|
|
672
|
+
return this._promoData;
|
|
673
|
+
}
|
|
674
|
+
try {
|
|
675
|
+
this._promoData = await this.fantasyService.getPromo();
|
|
676
|
+
return this._promoData;
|
|
677
|
+
}
|
|
678
|
+
catch (error) {
|
|
679
|
+
captureException(error, {
|
|
680
|
+
context: 'FantasyViewModel.getPromoData',
|
|
681
|
+
});
|
|
682
|
+
return null;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
async parseTournamentChallenge(data) {
|
|
686
|
+
if (!data.id) {
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
let validEntries = data.entries?.filter((entry) => entry.id) || [];
|
|
690
|
+
if (validEntries.length === 0) {
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
const header = {
|
|
694
|
+
type: 'fantasy-header',
|
|
695
|
+
id: `${data.id}-header`,
|
|
696
|
+
title: data.name || 'Tournament Challenge',
|
|
697
|
+
};
|
|
698
|
+
this.append(header, data.id);
|
|
699
|
+
const existingGroupIndex = this._tournamentChallenges.findIndex((g) => g.id === data.id);
|
|
700
|
+
if (existingGroupIndex !== -1) {
|
|
701
|
+
this._tournamentChallenges[existingGroupIndex].items = [];
|
|
702
|
+
}
|
|
703
|
+
const totalEntries = validEntries.length;
|
|
704
|
+
const entriesToShow = validEntries.slice(0, 5);
|
|
705
|
+
for (const entry of entriesToShow) {
|
|
706
|
+
let userPickName;
|
|
707
|
+
if (data.propositions && entry.picks) {
|
|
708
|
+
for (const pick of entry.picks) {
|
|
709
|
+
if (!pick.propositionId || !pick.outcomeId)
|
|
710
|
+
continue;
|
|
711
|
+
const proposition = data.propositions.find((p) => p.id === pick.propositionId);
|
|
712
|
+
if (proposition && proposition.outcomes) {
|
|
713
|
+
const outcome = proposition.outcomes.find((o) => o.id === pick.outcomeId);
|
|
714
|
+
if (outcome && outcome.name) {
|
|
715
|
+
userPickName = outcome.name;
|
|
716
|
+
break;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
const card = {
|
|
722
|
+
type: 'tournament-bracket-card',
|
|
723
|
+
id: entry.id,
|
|
724
|
+
name: entry.name || '',
|
|
725
|
+
rank: entry.rank || 0,
|
|
726
|
+
score: entry.score || 0,
|
|
727
|
+
percentile: Math.round((entry.percentile || 0) * 100),
|
|
728
|
+
entryStatusIcon: entry.entryStatusIcon || '',
|
|
729
|
+
finalPick: entry.finalPick
|
|
730
|
+
? {
|
|
731
|
+
propositionId: entry.finalPick.propositionId,
|
|
732
|
+
outcomeId: entry.finalPick.outcomeId,
|
|
733
|
+
primaryLogo: entry.finalPick.outcomePicked?.primaryLogo,
|
|
734
|
+
secondaryLogo: entry.finalPick.outcomePicked
|
|
735
|
+
?.secondaryLogo,
|
|
736
|
+
result: entry.finalPick.result,
|
|
737
|
+
}
|
|
738
|
+
: { propositionId: '', outcomeId: '' },
|
|
739
|
+
isComplete: entry.isComplete || false,
|
|
740
|
+
picks: entry.picks,
|
|
741
|
+
tournamentId: data.id,
|
|
742
|
+
tournamentAbbrev: data.abbrev || '',
|
|
743
|
+
tournamentLogo: data.logo || '',
|
|
744
|
+
propositions: data.propositions,
|
|
745
|
+
userPickName,
|
|
746
|
+
};
|
|
747
|
+
this.append(card, data.id);
|
|
748
|
+
}
|
|
749
|
+
if (totalEntries > 5 && data.state === 'LIVE') {
|
|
750
|
+
const promoData = await this.getPromoData();
|
|
751
|
+
const isLocked = data.locked === true;
|
|
752
|
+
const qrCodeVariant = isLocked ? 'tc-live' : 'tc-pre';
|
|
753
|
+
const promoVariant = promoData?.[qrCodeVariant];
|
|
754
|
+
if (promoVariant) {
|
|
755
|
+
const overflowQR = {
|
|
756
|
+
type: 'tournament-overflow-qr',
|
|
757
|
+
id: `${data.id}-overflow`,
|
|
758
|
+
background: promoVariant.promotion.background,
|
|
759
|
+
logo: promoVariant.promotion.logo,
|
|
760
|
+
qrCode: promoVariant.promotion.qrCode,
|
|
761
|
+
title: promoVariant.promotion.title,
|
|
762
|
+
description: promoVariant.promotion.description,
|
|
763
|
+
tournamentId: data.id,
|
|
764
|
+
};
|
|
765
|
+
this.append(overflowQR, data.id);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
517
769
|
/**
|
|
518
770
|
* Fetch mock data for testing
|
|
519
771
|
*/
|
|
@@ -530,5 +782,17 @@ export class FantasyViewModel {
|
|
|
530
782
|
this.fetchData();
|
|
531
783
|
}, 100);
|
|
532
784
|
}
|
|
785
|
+
setDataToPanel(data) {
|
|
786
|
+
if (data.leagueManagerOverrideBaseUrl) {
|
|
787
|
+
this.fantasyService.leagueManagerOverrideBaseUrl =
|
|
788
|
+
data.leagueManagerOverrideBaseUrl;
|
|
789
|
+
}
|
|
790
|
+
if (data.fantasyOverrideBaseUrl) {
|
|
791
|
+
this.fantasyService.fantasyOverrideBaseUrl = data.fantasyOverrideBaseUrl;
|
|
792
|
+
}
|
|
793
|
+
if (data.gambitOverrideBaseUrl) {
|
|
794
|
+
this.fantasyService.gambitOverrideBaseUrl = data.gambitOverrideBaseUrl;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
533
797
|
}
|
|
534
798
|
export default FantasyViewModel;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Observable } from '@/helpers/Observable';
|
|
2
|
+
import IKeyPlay, { KeyPlaysErrorState, KeyPlayLoadFailureStatus } from './IKeyPlays';
|
|
3
|
+
import IMaestroKeyPlaysResponse from './IKeyPlaysResponse';
|
|
4
|
+
export interface IKeyPlaysViewModel {
|
|
5
|
+
currentlyPlayingClipIndex: Observable<number | null>;
|
|
6
|
+
lastPlayedClipIndex: Observable<number | null>;
|
|
7
|
+
currentClipPlaybackProgress: Observable<number | null>;
|
|
8
|
+
errorState: Observable<KeyPlaysErrorState | null>;
|
|
9
|
+
failedClips: Observable<{
|
|
10
|
+
[key: string]: KeyPlayLoadFailureStatus;
|
|
11
|
+
}>;
|
|
12
|
+
allItems: IKeyPlay[];
|
|
13
|
+
onUpdatePlayerTimeCode(playerTimeCode: number | null): void;
|
|
14
|
+
setKeyPlays(items: IMaestroKeyPlaysResponse | null, playerTimeCode: number | null): Promise<void>;
|
|
15
|
+
handleKeyPlayLoadFailure(forKeyPlayAtIndex: number): void;
|
|
16
|
+
clearLoadFailureStatus(forKeyPlayAtIndex: number): void;
|
|
17
|
+
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/// <reference types="prop-types" />
|
|
2
1
|
import IKeyPlay, { KeyPlayLoadFailureStatus } from '../interfaces/IKeyPlays';
|
|
3
2
|
import './KeyPlayCardView.styles.css';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
6
5
|
import KeyPlaysViewModel from '../view-model/KeyPlaysViewModel';
|
|
7
|
-
import { Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
8
6
|
type KeyPlayCardViewProps = IKeyPlay & {
|
|
9
7
|
isPlaying: boolean;
|
|
10
8
|
playbackProgress: number | null;
|
|
@@ -25,15 +23,5 @@ export declare class KeyPlayCardView extends React.Component<KeyPlayCardViewProp
|
|
|
25
23
|
renderImage: () => JSX.Element | null;
|
|
26
24
|
render(): JSX.Element;
|
|
27
25
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
static contextTypes: {
|
|
31
|
-
refsMap: import("prop-types").Requireable<(HTMLElement | null | undefined)[]>;
|
|
32
|
-
setRef: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
33
|
-
scrollToFocusedElement: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
34
|
-
};
|
|
35
|
-
handleLeftPressed: (d: Direction) => void;
|
|
36
|
-
onBecameFocused: (layout: Layout) => void;
|
|
37
|
-
render(): JSX.Element;
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
26
|
+
declare const KeyPlayCard: React.FC<Omit<KeyPlayCardViewProps, 'setRef'> & WithFocusableProps>;
|
|
27
|
+
export default KeyPlayCard;
|
|
@@ -3,11 +3,11 @@ import { BASE_64_KEY_PLAY_THUMBNAIL_FALLBACK } from '../constants';
|
|
|
3
3
|
import './KeyPlayCardView.styles.css';
|
|
4
4
|
import SDK from '@/index';
|
|
5
5
|
import Icon from '@/components/atoms/SvgIcon';
|
|
6
|
-
import React from 'react';
|
|
6
|
+
import React, { useCallback } from 'react';
|
|
7
7
|
import { withFocusable, } from '@/external/spatial-navigation';
|
|
8
8
|
import ScoreCard from './KeyPlayCardScoreTagView';
|
|
9
9
|
import FocusableItem from '@/components/core/ScrollableContainer/FocusableItem';
|
|
10
|
-
import {
|
|
10
|
+
import { useScrollableContainer } from '@/components/core/ScrollableContainer';
|
|
11
11
|
export class KeyPlayCardView extends React.Component {
|
|
12
12
|
constructor(props) {
|
|
13
13
|
super(props);
|
|
@@ -55,7 +55,8 @@ export class KeyPlayCardView extends React.Component {
|
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
-
this.vm = SDK.getMaestroEventViewModel()
|
|
58
|
+
this.vm = SDK.getMaestroEventViewModel()
|
|
59
|
+
.keyPlaysViewModel;
|
|
59
60
|
this.state = {
|
|
60
61
|
failedClip: this.viewModel.failedClips.value[props.clipID] || null,
|
|
61
62
|
imageLoaded: false,
|
|
@@ -98,42 +99,17 @@ export class KeyPlayCardView extends React.Component {
|
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
const FocusableKeyPlayCard = withFocusable()(KeyPlayCardView);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if (d === 'left') {
|
|
116
|
-
SDK.getMaestroEventViewModel().deliverFocus();
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
Object.defineProperty(this, "onBecameFocused", {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
configurable: true,
|
|
123
|
-
writable: true,
|
|
124
|
-
value: (layout) => {
|
|
125
|
-
this.context.scrollToFocusedElement(layout);
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
render() {
|
|
130
|
-
return (React.createElement(FocusableItem, null,
|
|
131
|
-
React.createElement(FocusableKeyPlayCard, { ...this.props, onArrowPress: this.handleLeftPressed, onBecameFocused: this.onBecameFocused })));
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
Object.defineProperty(KeyPlayCard, "contextTypes", {
|
|
135
|
-
enumerable: true,
|
|
136
|
-
configurable: true,
|
|
137
|
-
writable: true,
|
|
138
|
-
value: SCROLLABLE_CONTEXT_TYPE
|
|
139
|
-
});
|
|
102
|
+
const KeyPlayCard = (props) => {
|
|
103
|
+
const { scrollToFocusedElement } = useScrollableContainer();
|
|
104
|
+
const handleLeftPressed = useCallback((d) => {
|
|
105
|
+
if (d === 'left') {
|
|
106
|
+
SDK.getMaestroEventViewModel().deliverFocus();
|
|
107
|
+
}
|
|
108
|
+
}, []);
|
|
109
|
+
const onBecameFocused = useCallback((layout) => {
|
|
110
|
+
scrollToFocusedElement(layout);
|
|
111
|
+
}, [scrollToFocusedElement]);
|
|
112
|
+
return (React.createElement(FocusableItem, null,
|
|
113
|
+
React.createElement(FocusableKeyPlayCard, { ...props, onArrowPress: handleLeftPressed, onBecameFocused: onBecameFocused })));
|
|
114
|
+
};
|
|
115
|
+
export default KeyPlayCard;
|
|
@@ -2,19 +2,19 @@ import './KeyPlayErrorStateView.styles.css';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import SDK from '@/index';
|
|
4
4
|
import TabLoadErrorView from '@/components/molecules/TabLoadError';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
React.createElement("
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
5
|
+
import { useMaxHeightToBottom } from '@/hooks/useMaxHeightToBottom';
|
|
6
|
+
const UnpopulatedEvent = () => {
|
|
7
|
+
const maxHeightRef = useMaxHeightToBottom();
|
|
8
|
+
return (React.createElement("div", { ref: maxHeightRef, className: "sdk--key-play-error-state-unpopulatedEvent" },
|
|
9
|
+
React.createElement("div", { className: "main-content" },
|
|
10
|
+
React.createElement("h3", { className: "T70" }, "Good things come to those who wait!"),
|
|
11
|
+
React.createElement("p", { className: "T20" }, "When a key play occurs we will serve them up for you here.")),
|
|
12
|
+
React.createElement("div", { className: "unpopulatedEvent-examples" }, Array.from({ length: 4 }).map((_, i) => (React.createElement("div", { key: i, className: "example" },
|
|
13
|
+
React.createElement("div", { className: "image" }),
|
|
14
|
+
React.createElement("div", { className: "content" },
|
|
15
|
+
React.createElement("div", { className: "headline" }),
|
|
16
|
+
React.createElement("div", { className: "body" }))))))));
|
|
17
|
+
};
|
|
18
18
|
class UnsupportedEvent extends React.Component {
|
|
19
19
|
render() {
|
|
20
20
|
return (React.createElement("div", { className: "sdk--key-play-error-state-unsupportedEvent" },
|
|
@@ -13,12 +13,14 @@ export declare class KeyPlays extends Component<{}, IKeyPlaysState> {
|
|
|
13
13
|
private playbackProgressUnsub;
|
|
14
14
|
private playbackIndexUnsub;
|
|
15
15
|
private itemsUnsub;
|
|
16
|
+
private maxHeightCleanup;
|
|
16
17
|
private vm;
|
|
17
18
|
constructor(props: {});
|
|
18
19
|
get viewModel(): KeyPlaysViewModel;
|
|
19
20
|
componentDidMount(): void;
|
|
20
21
|
componentWillUnmount(): void;
|
|
21
22
|
private handlePlayClip;
|
|
23
|
+
setContainerRef: (e: HTMLDivElement | null) => void;
|
|
22
24
|
render(): JSX.Element;
|
|
23
25
|
}
|
|
24
26
|
interface KeyPlaysWithErrorStateState {
|