@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
package/dist/src/sentry.js
CHANGED
|
@@ -1,31 +1,51 @@
|
|
|
1
|
-
import { BrowserClient, defaultStackParser, defaultIntegrations, makeFetchTransport, } from '@sentry/browser';
|
|
2
1
|
import pkg from '../package.json';
|
|
3
2
|
const DEV_DOMAINS = [/bbd-web-sdk\.us-central1-dev\.gcp\.maestro\.io/];
|
|
3
|
+
// BrowserClient type is inferred from dynamic import
|
|
4
4
|
let sentryClient = null;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
let pendingErrors = [];
|
|
6
|
+
let isInitializing = false;
|
|
7
|
+
const initSentry = async () => {
|
|
8
|
+
if (sentryClient || isInitializing)
|
|
7
9
|
return;
|
|
10
|
+
if (process.env.NODE_ENV === 'test')
|
|
11
|
+
return;
|
|
12
|
+
isInitializing = true;
|
|
13
|
+
try {
|
|
14
|
+
const { BrowserClient, defaultStackParser, defaultIntegrations, makeFetchTransport, } = await import('@sentry/browser');
|
|
15
|
+
const isDev = DEV_DOMAINS.find((domain) => domain.test(window.location.href)) !== null;
|
|
16
|
+
sentryClient = new BrowserClient({
|
|
17
|
+
dsn: 'https://91444a71cbaefc62e8dc813f22bad3bf@o4506894189330432.ingest.us.sentry.io/4509946717470720',
|
|
18
|
+
transport: makeFetchTransport,
|
|
19
|
+
stackParser: defaultStackParser,
|
|
20
|
+
integrations: defaultIntegrations.filter((integration) => {
|
|
21
|
+
// filter integrations that use the global variable
|
|
22
|
+
return !['BrowserApiErrors', 'Breadcrumbs', 'GlobalHandlers'].includes(integration.name);
|
|
23
|
+
}),
|
|
24
|
+
tracesSampleRate: isDev ? 1 : 0.1,
|
|
25
|
+
release: pkg.version,
|
|
26
|
+
environment: isDev ? 'development' : 'production',
|
|
27
|
+
enabled: !/localhost/.test(window.location.href),
|
|
28
|
+
});
|
|
29
|
+
// Flush pending errors
|
|
30
|
+
pendingErrors.forEach(({ error, extra }) => {
|
|
31
|
+
sentryClient?.captureException(error, extra);
|
|
32
|
+
});
|
|
33
|
+
pendingErrors = [];
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
console.error('[maestro-web-sdk] Failed to load Sentry:', e);
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
isInitializing = false;
|
|
8
40
|
}
|
|
9
|
-
const isDev = DEV_DOMAINS.find((domain) => domain.test(window.location.href)) !== null;
|
|
10
|
-
sentryClient = new BrowserClient({
|
|
11
|
-
dsn: 'https://91444a71cbaefc62e8dc813f22bad3bf@o4506894189330432.ingest.us.sentry.io/4509946717470720',
|
|
12
|
-
transport: makeFetchTransport,
|
|
13
|
-
stackParser: defaultStackParser,
|
|
14
|
-
integrations: defaultIntegrations.filter((integration) => {
|
|
15
|
-
// filter integrations that use the global variable
|
|
16
|
-
return !['BrowserApiErrors', 'Breadcrumbs', 'GlobalHandlers'].includes(integration.name);
|
|
17
|
-
}),
|
|
18
|
-
tracesSampleRate: isDev ? 1 : 0.1,
|
|
19
|
-
release: pkg.version,
|
|
20
|
-
environment: isDev ? 'development' : 'production',
|
|
21
|
-
enabled: !/localhost/.test(window.location.href),
|
|
22
|
-
});
|
|
23
41
|
};
|
|
24
42
|
export const captureException = (error, extra) => {
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
if (sentryClient) {
|
|
44
|
+
sentryClient.captureException(error, extra);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
pendingErrors.push({ error, extra });
|
|
48
|
+
initSentry(); // Trigger lazy init
|
|
28
49
|
}
|
|
29
|
-
sentryClient.captureException(error, extra);
|
|
30
50
|
};
|
|
31
51
|
export default initSentry;
|
|
@@ -2,6 +2,7 @@ import InsightsPayloadBuilder from '../InsightsService/InsightsPayloadBuilder';
|
|
|
2
2
|
import InsightsService from '../InsightsService/InsightsService';
|
|
3
3
|
import { PageConfig } from '../StaticService/types';
|
|
4
4
|
import { BaseMetadata } from './types';
|
|
5
|
+
import { MaestroPanelType } from '@/models/IPanel';
|
|
5
6
|
type KeyPlaysClickedAction = {
|
|
6
7
|
type: 'espnKeyPlays';
|
|
7
8
|
name: 'key_play_clicked';
|
|
@@ -67,10 +68,10 @@ declare class AnalyticsService {
|
|
|
67
68
|
constructor();
|
|
68
69
|
private trackAction;
|
|
69
70
|
private trackImpression;
|
|
70
|
-
panelView(panelType:
|
|
71
|
+
panelView(panelType: MaestroPanelType, metadata?: Record<string, any>): Promise<void>;
|
|
71
72
|
panelClick({ type, metadata, name }: PanelClickPayload): Promise<void>;
|
|
72
73
|
getBaseMetadataFromPageConfig(pageConfig: PageConfig | null): BaseMetadata;
|
|
73
|
-
getPanelDataFromPageConfig(type:
|
|
74
|
+
getPanelDataFromPageConfig(type: MaestroPanelType, pageConfig: PageConfig | null): PanelData;
|
|
74
75
|
SDKSessionStart(): Promise<void>;
|
|
75
76
|
pageSessionStart(): Promise<void>;
|
|
76
77
|
pageSessionEnd(): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import SDK from '../..';
|
|
2
1
|
import InsightsPayloadBuilder from '../InsightsService/InsightsPayloadBuilder';
|
|
2
|
+
import SDK from '../..';
|
|
3
3
|
import InsightsService from '../InsightsService/InsightsService';
|
|
4
4
|
import { version } from '../../../package.json';
|
|
5
5
|
import { captureException } from '@/sentry';
|
|
@@ -247,6 +247,7 @@ class AnalyticsService {
|
|
|
247
247
|
page_session: this.pageSessionId,
|
|
248
248
|
},
|
|
249
249
|
});
|
|
250
|
+
console.log('AnalyticsService: pageSessionEnd', eventInsightsData);
|
|
250
251
|
await this.insightsService.action(eventInsightsData);
|
|
251
252
|
}
|
|
252
253
|
catch (err) {
|
|
@@ -310,6 +311,7 @@ class AnalyticsService {
|
|
|
310
311
|
pinchback_session: this.pinchBackSessionId,
|
|
311
312
|
},
|
|
312
313
|
});
|
|
314
|
+
console.log('AnalyticsService: pinchBackSessionEnd', eventInsightsData);
|
|
313
315
|
await this.insightsService.action(eventInsightsData);
|
|
314
316
|
}
|
|
315
317
|
catch (err) {
|
|
@@ -149,7 +149,7 @@ export default class InsightsPayloadBuilder {
|
|
|
149
149
|
* @description Site slug.
|
|
150
150
|
* @example site.slug
|
|
151
151
|
*/
|
|
152
|
-
si_s: string;
|
|
152
|
+
si_s: string | undefined;
|
|
153
153
|
/**
|
|
154
154
|
* @description Session ID, which can be used to track the session across requests. You might wanna keep this fixed for the session you're in using a local storage or something related.
|
|
155
155
|
*/
|
|
@@ -326,8 +326,7 @@ export default class InsightsPayloadBuilder {
|
|
|
326
326
|
* @description Site slug.
|
|
327
327
|
* @example site.slug
|
|
328
328
|
*/
|
|
329
|
-
|
|
330
|
-
si_s: 'espn',
|
|
329
|
+
si_s: this.pageConfig?.site.slug,
|
|
331
330
|
};
|
|
332
331
|
}
|
|
333
332
|
getUserInsights() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import AxiosNetworkClient from '@/external/AxiosNetworkClient';
|
|
2
|
-
import SDK from '@/index';
|
|
3
2
|
import { captureException } from '@/sentry';
|
|
3
|
+
import SDK from '@/index';
|
|
4
4
|
const INSIGHTS_BASE_URL = 'https://insights.maestro.io';
|
|
5
5
|
export default class InsightsService {
|
|
6
6
|
constructor() {
|
|
@@ -33,6 +33,11 @@ declare class NetworkManager {
|
|
|
33
33
|
* Set authentication for Maestro APIs
|
|
34
34
|
*/
|
|
35
35
|
setAuthentication(token: string | null, apiKey: string | null): void;
|
|
36
|
+
/**
|
|
37
|
+
* Execute a request with optional caching
|
|
38
|
+
* Extracts duplicated cache logic from request methods
|
|
39
|
+
*/
|
|
40
|
+
private withCache;
|
|
36
41
|
/**
|
|
37
42
|
* Handle errors from network requests
|
|
38
43
|
*/
|
|
@@ -67,6 +72,7 @@ declare class NetworkManager {
|
|
|
67
72
|
}): Promise<T>;
|
|
68
73
|
/**
|
|
69
74
|
* Make a request to an external API and return both data and headers
|
|
75
|
+
* Note: Only data is cached, headers are not persisted
|
|
70
76
|
*/
|
|
71
77
|
externalApiRequestWithHeaders<T = any>({ endpoint, method, params, data, headers, useCache, skipResponseBodyDeserialization, }: {
|
|
72
78
|
endpoint: string;
|
|
@@ -89,6 +89,28 @@ class NetworkManager {
|
|
|
89
89
|
setAuthentication(token, apiKey) {
|
|
90
90
|
this.maestroClient.setAuthentication(token, apiKey);
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Execute a request with optional caching
|
|
94
|
+
* Extracts duplicated cache logic from request methods
|
|
95
|
+
*/
|
|
96
|
+
async withCache(cacheParams, useCache, fetchFn) {
|
|
97
|
+
const cacheKey = this.cacheManager.produceCacheKey(JSON.stringify({
|
|
98
|
+
endpoint: cacheParams.endpoint,
|
|
99
|
+
params: cacheParams.params,
|
|
100
|
+
data: null,
|
|
101
|
+
}));
|
|
102
|
+
if (useCache) {
|
|
103
|
+
const cachedData = this.cacheManager.getCache(cacheKey);
|
|
104
|
+
if (cachedData) {
|
|
105
|
+
return cachedData;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const response = await fetchFn();
|
|
109
|
+
if (useCache) {
|
|
110
|
+
this.cacheManager.setCache(cacheKey, response);
|
|
111
|
+
}
|
|
112
|
+
return response;
|
|
113
|
+
}
|
|
92
114
|
/**
|
|
93
115
|
* Handle errors from network requests
|
|
94
116
|
*/
|
|
@@ -134,19 +156,8 @@ class NetworkManager {
|
|
|
134
156
|
requestHeaders['Authorization'] = `Bearer ${maestroDefaultHeaders.jwt}`;
|
|
135
157
|
requestHeaders['Content-type'] = 'application/json';
|
|
136
158
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const cacheKey = this.cacheManager.produceCacheKey(JSON.stringify({
|
|
140
|
-
endpoint,
|
|
141
|
-
params,
|
|
142
|
-
data: null,
|
|
143
|
-
}));
|
|
144
|
-
const cachedData = this.cacheManager.getCache(cacheKey);
|
|
145
|
-
if (cachedData) {
|
|
146
|
-
return cachedData;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
try {
|
|
159
|
+
const shouldCache = method === HttpMethod.GET && useCache;
|
|
160
|
+
const fetchFn = async () => {
|
|
150
161
|
let response;
|
|
151
162
|
if (method === HttpMethod.GET) {
|
|
152
163
|
response = await this.maestroClient.get(endpoint, params, requestHeaders);
|
|
@@ -157,20 +168,13 @@ class NetworkManager {
|
|
|
157
168
|
else {
|
|
158
169
|
throw new Error(`Method ${method} not implemented`);
|
|
159
170
|
}
|
|
160
|
-
// Handle empty response if needed
|
|
161
171
|
if (skipResponseBodyDeserialization && !response) {
|
|
162
172
|
response = {};
|
|
163
173
|
}
|
|
164
|
-
// Cache the response for GET requests
|
|
165
|
-
if (method === HttpMethod.GET && useCache) {
|
|
166
|
-
const cacheKey = this.cacheManager.produceCacheKey(JSON.stringify({
|
|
167
|
-
endpoint,
|
|
168
|
-
params,
|
|
169
|
-
data: null,
|
|
170
|
-
}));
|
|
171
|
-
this.cacheManager.setCache(cacheKey, response);
|
|
172
|
-
}
|
|
173
174
|
return response;
|
|
175
|
+
};
|
|
176
|
+
try {
|
|
177
|
+
return await this.withCache({ endpoint, params }, shouldCache, fetchFn);
|
|
174
178
|
}
|
|
175
179
|
catch (error) {
|
|
176
180
|
return this.handleError(error);
|
|
@@ -180,19 +184,8 @@ class NetworkManager {
|
|
|
180
184
|
* Make a request to an external API
|
|
181
185
|
*/
|
|
182
186
|
async externalApiRequest({ endpoint, method = HttpMethod.GET, params = {}, data = null, headers = {}, useCache = false, skipResponseBodyDeserialization = false, }) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
const cacheKey = this.cacheManager.produceCacheKey(JSON.stringify({
|
|
186
|
-
endpoint,
|
|
187
|
-
params,
|
|
188
|
-
data: null,
|
|
189
|
-
}));
|
|
190
|
-
const cachedData = this.cacheManager.getCache(cacheKey);
|
|
191
|
-
if (cachedData) {
|
|
192
|
-
return cachedData;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
try {
|
|
187
|
+
const shouldCache = method === HttpMethod.GET && useCache;
|
|
188
|
+
const fetchFn = async () => {
|
|
196
189
|
let response;
|
|
197
190
|
if (method === HttpMethod.GET) {
|
|
198
191
|
response = await this.externalClient.get(endpoint, params, headers);
|
|
@@ -203,20 +196,13 @@ class NetworkManager {
|
|
|
203
196
|
else {
|
|
204
197
|
throw new Error(`Method ${method} not implemented`);
|
|
205
198
|
}
|
|
206
|
-
// Handle empty response if needed
|
|
207
199
|
if (skipResponseBodyDeserialization && !response) {
|
|
208
200
|
response = {};
|
|
209
201
|
}
|
|
210
|
-
// Cache the response for GET requests
|
|
211
|
-
if (method === HttpMethod.GET && useCache) {
|
|
212
|
-
const cacheKey = this.cacheManager.produceCacheKey(JSON.stringify({
|
|
213
|
-
endpoint,
|
|
214
|
-
params,
|
|
215
|
-
data: null,
|
|
216
|
-
}));
|
|
217
|
-
this.cacheManager.setCache(cacheKey, response);
|
|
218
|
-
}
|
|
219
202
|
return response;
|
|
203
|
+
};
|
|
204
|
+
try {
|
|
205
|
+
return await this.withCache({ endpoint, params }, shouldCache, fetchFn);
|
|
220
206
|
}
|
|
221
207
|
catch (error) {
|
|
222
208
|
return this.handleError(error);
|
|
@@ -224,18 +210,15 @@ class NetworkManager {
|
|
|
224
210
|
}
|
|
225
211
|
/**
|
|
226
212
|
* Make a request to an external API and return both data and headers
|
|
213
|
+
* Note: Only data is cached, headers are not persisted
|
|
227
214
|
*/
|
|
228
215
|
async externalApiRequestWithHeaders({ endpoint, method = HttpMethod.GET, params = {}, data = null, headers = {}, useCache = false, skipResponseBodyDeserialization = false, }) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
params,
|
|
234
|
-
data: null,
|
|
235
|
-
}));
|
|
216
|
+
const shouldCache = method === HttpMethod.GET && useCache;
|
|
217
|
+
const cacheKey = this.cacheManager.produceCacheKey(JSON.stringify({ endpoint, params, data: null }));
|
|
218
|
+
// Check cache - return cached data with empty headers
|
|
219
|
+
if (shouldCache) {
|
|
236
220
|
const cachedData = this.cacheManager.getCache(cacheKey);
|
|
237
221
|
if (cachedData) {
|
|
238
|
-
// Return cached data with empty headers since we don't cache headers
|
|
239
222
|
return { data: cachedData, headers: {} };
|
|
240
223
|
}
|
|
241
224
|
}
|
|
@@ -250,17 +233,11 @@ class NetworkManager {
|
|
|
250
233
|
else {
|
|
251
234
|
throw new Error(`Method ${method} not implemented`);
|
|
252
235
|
}
|
|
253
|
-
// Handle empty response if needed
|
|
254
236
|
if (skipResponseBodyDeserialization && !response.data) {
|
|
255
237
|
response.data = {};
|
|
256
238
|
}
|
|
257
|
-
// Cache
|
|
258
|
-
if (
|
|
259
|
-
const cacheKey = this.cacheManager.produceCacheKey(JSON.stringify({
|
|
260
|
-
endpoint,
|
|
261
|
-
params,
|
|
262
|
-
data: null,
|
|
263
|
-
}));
|
|
239
|
+
// Cache only data, not headers
|
|
240
|
+
if (shouldCache) {
|
|
264
241
|
this.cacheManager.setCache(cacheKey, response.data);
|
|
265
242
|
}
|
|
266
243
|
return response;
|
|
@@ -1,99 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Service types for different NetworkManager contexts
|
|
3
|
-
*/
|
|
4
|
-
export declare const ServiceType: {
|
|
5
|
-
readonly STATS: "stats";
|
|
6
|
-
readonly BETS: "bets";
|
|
7
|
-
readonly MAESTRO: "maestro";
|
|
8
|
-
readonly FANTASY: "fantasy";
|
|
9
|
-
readonly SHOP: "shop";
|
|
10
|
-
};
|
|
11
|
-
export type ServiceType = typeof ServiceType[keyof typeof ServiceType];
|
|
12
|
-
/**
|
|
13
|
-
* Configuration for creating service-specific NetworkManager instances
|
|
14
|
-
*/
|
|
15
|
-
export interface ServiceNetworkManagerConfig {
|
|
16
|
-
serviceType: ServiceType;
|
|
17
|
-
externalBaseURL: string;
|
|
18
|
-
defaultCacheDuration?: number;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Base interface for all NetworkManager instances
|
|
22
|
-
*/
|
|
23
|
-
export interface IServiceNetworkManager {
|
|
24
|
-
readonly serviceType: ServiceType;
|
|
25
|
-
readonly externalBaseURL: string;
|
|
26
|
-
externalApiRequest<T = any>(options: {
|
|
27
|
-
endpoint: string;
|
|
28
|
-
method?: string;
|
|
29
|
-
params?: Record<string, any>;
|
|
30
|
-
headers?: Record<string, string>;
|
|
31
|
-
data?: any;
|
|
32
|
-
useCache?: boolean;
|
|
33
|
-
skipResponseBodyDeserialization?: boolean;
|
|
34
|
-
}): Promise<T>;
|
|
35
|
-
externalApiRequestWithHeaders<T = any>(options: {
|
|
36
|
-
endpoint: string;
|
|
37
|
-
method?: string;
|
|
38
|
-
params?: Record<string, any>;
|
|
39
|
-
headers?: Record<string, string>;
|
|
40
|
-
data?: any;
|
|
41
|
-
useCache?: boolean;
|
|
42
|
-
skipResponseBodyDeserialization?: boolean;
|
|
43
|
-
}): Promise<ResponseWithHeaders<T>>;
|
|
44
|
-
pollExternalApiRequest<T = any>(options: {
|
|
45
|
-
endpoint: string;
|
|
46
|
-
interval: number;
|
|
47
|
-
method?: string;
|
|
48
|
-
params?: Record<string, any>;
|
|
49
|
-
headers?: Record<string, string>;
|
|
50
|
-
data?: any;
|
|
51
|
-
onData: (data: T) => void;
|
|
52
|
-
onError?: (error: Error) => void;
|
|
53
|
-
}): {
|
|
54
|
-
stop: () => void;
|
|
55
|
-
};
|
|
56
|
-
pollExternalApiRequestWithHeaders<T = any>(options: {
|
|
57
|
-
endpoint: string;
|
|
58
|
-
interval: number;
|
|
59
|
-
method?: string;
|
|
60
|
-
params?: Record<string, any>;
|
|
61
|
-
headers?: Record<string, string>;
|
|
62
|
-
data?: any;
|
|
63
|
-
onData: (data: ResponseWithHeaders<T>) => void;
|
|
64
|
-
onError?: (error: Error) => void;
|
|
65
|
-
}): {
|
|
66
|
-
stop: () => void;
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Stats service NetworkManager interface
|
|
71
|
-
*/
|
|
72
|
-
export interface IStatsNetworkManager extends IServiceNetworkManager {
|
|
73
|
-
serviceType: 'stats';
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Bets service NetworkManager interface
|
|
77
|
-
*/
|
|
78
|
-
export interface IBetsNetworkManager extends IServiceNetworkManager {
|
|
79
|
-
serviceType: 'bets';
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Maestro service NetworkManager interface
|
|
83
|
-
*/
|
|
84
|
-
export interface IMaestroNetworkManager extends IServiceNetworkManager {
|
|
85
|
-
serviceType: 'maestro';
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Union type for all service NetworkManager types
|
|
89
|
-
*/
|
|
90
|
-
export type ServiceNetworkManager = IStatsNetworkManager | IBetsNetworkManager | IMaestroNetworkManager;
|
|
91
|
-
/**
|
|
92
|
-
* Factory configuration for different service types
|
|
93
|
-
*/
|
|
94
|
-
export interface NetworkManagerFactoryConfig {
|
|
95
|
-
defaultCacheDuration?: number;
|
|
96
|
-
}
|
|
97
1
|
/**
|
|
98
2
|
* Interface for responses that include both data and headers
|
|
99
3
|
*/
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { Observable } from '../../helpers/Observable';
|
|
2
2
|
import { GlobalConfig, PageConfig } from './types';
|
|
3
|
+
type FetchPageConfigParams = {
|
|
4
|
+
siteId: string;
|
|
5
|
+
metadataValue?: string;
|
|
6
|
+
pageId?: string;
|
|
7
|
+
};
|
|
3
8
|
export default class StaticService {
|
|
4
9
|
configObservable: Observable<PageConfig | null>;
|
|
5
10
|
private client;
|
|
6
|
-
constructor();
|
|
7
|
-
|
|
11
|
+
constructor(siteId: string);
|
|
12
|
+
private fetchPageConfigByMetadata;
|
|
13
|
+
fetchPageConfig({ siteId, metadataValue, pageId }: FetchPageConfigParams): Promise<PageConfig | null>;
|
|
14
|
+
private fetchPageConfigById;
|
|
8
15
|
static isPanelAvailable(pageConfig: PageConfig | null, panelType: string): boolean | undefined;
|
|
9
16
|
pollGlobalConfig(onData: (data: GlobalConfig) => void): {
|
|
10
17
|
stop: () => void;
|
|
11
18
|
};
|
|
12
19
|
}
|
|
20
|
+
export {};
|
|
@@ -2,8 +2,11 @@ import { Observable } from '../../helpers/Observable';
|
|
|
2
2
|
import AxiosNetworkClient from '@/external/AxiosNetworkClient';
|
|
3
3
|
import { captureException } from '@/sentry';
|
|
4
4
|
import NetworkManager from '../NetworkManager/NetworkManager';
|
|
5
|
+
const SITE_ID_STATIC_BASE_URL_MAP = {
|
|
6
|
+
'664b9c57d59a7a431542d814': 'https://static-prod.us-central1-espn-prod.gcp.maestro.io',
|
|
7
|
+
};
|
|
5
8
|
export default class StaticService {
|
|
6
|
-
constructor() {
|
|
9
|
+
constructor(siteId) {
|
|
7
10
|
Object.defineProperty(this, "configObservable", {
|
|
8
11
|
enumerable: true,
|
|
9
12
|
configurable: true,
|
|
@@ -16,24 +19,46 @@ export default class StaticService {
|
|
|
16
19
|
writable: true,
|
|
17
20
|
value: void 0
|
|
18
21
|
});
|
|
22
|
+
const baseURL = SITE_ID_STATIC_BASE_URL_MAP[siteId] || 'https://static.gcp.maestro.io';
|
|
19
23
|
this.client = new NetworkManager({
|
|
20
24
|
externalNetworkClient: new AxiosNetworkClient({
|
|
21
25
|
backoff: 2,
|
|
22
|
-
baseURL
|
|
26
|
+
baseURL,
|
|
23
27
|
delay: 1000,
|
|
24
28
|
retries: 5,
|
|
25
29
|
}),
|
|
26
30
|
});
|
|
27
31
|
}
|
|
28
|
-
|
|
32
|
+
async fetchPageConfigByMetadata(siteId, metadataValue) {
|
|
29
33
|
try {
|
|
30
|
-
return this.client.externalApiRequest({
|
|
31
|
-
endpoint: `/pages/sites/${siteId}/metadata/${
|
|
34
|
+
return await this.client.externalApiRequest({
|
|
35
|
+
endpoint: `/pages/sites/${siteId}/metadata/${metadataValue}.json`,
|
|
32
36
|
});
|
|
33
37
|
}
|
|
34
38
|
catch (err) {
|
|
35
|
-
captureException(err, { siteId,
|
|
36
|
-
console.error(`Failed to fetch page configuration for site ${siteId} and
|
|
39
|
+
captureException(err, { siteId, metadataValue });
|
|
40
|
+
console.error(`Failed to fetch page configuration for site ${siteId} and metadata value: ${metadataValue}:`, err instanceof Error ? err.message : String(err));
|
|
41
|
+
return Promise.resolve(null);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
fetchPageConfig({ siteId, metadataValue, pageId }) {
|
|
45
|
+
if (pageId) {
|
|
46
|
+
return this.fetchPageConfigById(siteId, pageId);
|
|
47
|
+
}
|
|
48
|
+
else if (metadataValue) {
|
|
49
|
+
return this.fetchPageConfigByMetadata(siteId, metadataValue);
|
|
50
|
+
}
|
|
51
|
+
return Promise.resolve(null);
|
|
52
|
+
}
|
|
53
|
+
async fetchPageConfigById(siteId, pageId) {
|
|
54
|
+
try {
|
|
55
|
+
return await this.client.externalApiRequest({
|
|
56
|
+
endpoint: `/pages/sites/${siteId}/pages/${pageId}.json`,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
captureException(err, { siteId, pageId });
|
|
61
|
+
console.error(`Failed to fetch page configuration for site ${siteId} and page ID: ${pageId}:`, err instanceof Error ? err.message : String(err));
|
|
37
62
|
return Promise.resolve(null);
|
|
38
63
|
}
|
|
39
64
|
}
|