@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,9 +1,9 @@
|
|
|
1
|
-
import { Observable } from '
|
|
2
|
-
import { ViewModel } from '
|
|
1
|
+
import { Observable } from '../../../../helpers/Observable';
|
|
2
|
+
import { ViewModel } from '../../../../view-models/ViewModel';
|
|
3
3
|
import { MOCK_STATS_API_PRE_GAME_RESPONSE } from '../mocks';
|
|
4
|
-
import
|
|
4
|
+
import { isTabbedStatisticsArray, isTeamStatistic, isHockeyScoringSummary, isMlbScoringSummary, } from '../interfaces/IStats';
|
|
5
|
+
import StatsService from '../services/StatsService';
|
|
5
6
|
import { formatLastPlayMarquee, parseDriveDescription, } from '../utils/driveSummaryUtils';
|
|
6
|
-
import AnalyticsService from '@/services/AnalyticsService/AnalyticsService';
|
|
7
7
|
import { setImageDimensions } from '@/helpers/url';
|
|
8
8
|
import SDK from '@/index';
|
|
9
9
|
import { captureException } from '@/sentry';
|
|
@@ -22,15 +22,17 @@ const STATS_ITEM_TYPE_CARD_MAP = {
|
|
|
22
22
|
gameLeaders: 'leaders',
|
|
23
23
|
headerTeam: 'header',
|
|
24
24
|
matchPredictor: 'predictor',
|
|
25
|
+
playerSeasonStats: 'playerStats',
|
|
25
26
|
promotion: 'promotion',
|
|
26
27
|
recentGames: 'previousGames',
|
|
27
28
|
scoringSummary: 'scoringSummary',
|
|
28
29
|
teamStats: 'entities',
|
|
29
30
|
winProbability: 'winProbability',
|
|
31
|
+
careerMatchup: 'careerMatchup',
|
|
30
32
|
penalties: 'penaltySummary',
|
|
31
33
|
};
|
|
32
34
|
export class StatsViewModel extends ViewModel {
|
|
33
|
-
constructor(eventId, delegate, options = {}) {
|
|
35
|
+
constructor(eventId, delegate, analyticsService, options = {}) {
|
|
34
36
|
super();
|
|
35
37
|
Object.defineProperty(this, "isDataLoading", {
|
|
36
38
|
enumerable: true,
|
|
@@ -140,7 +142,7 @@ export class StatsViewModel extends ViewModel {
|
|
|
140
142
|
this.eventId = eventId;
|
|
141
143
|
this.useMockData = options.useMockData || false;
|
|
142
144
|
this.statsService = new StatsService(delegate);
|
|
143
|
-
this.analyticsService =
|
|
145
|
+
this.analyticsService = analyticsService;
|
|
144
146
|
}
|
|
145
147
|
/**
|
|
146
148
|
* Sets panel-specific data configuration
|
|
@@ -369,22 +371,39 @@ export class StatsViewModel extends ViewModel {
|
|
|
369
371
|
if (matchPredictor) {
|
|
370
372
|
statsItems.push(matchPredictor);
|
|
371
373
|
}
|
|
372
|
-
const
|
|
373
|
-
if (
|
|
374
|
-
statsItems.push(
|
|
374
|
+
const careerMatchup = this.parseCareerMatchup(data);
|
|
375
|
+
if (careerMatchup) {
|
|
376
|
+
statsItems.push(careerMatchup);
|
|
375
377
|
}
|
|
376
|
-
const
|
|
377
|
-
if (
|
|
378
|
-
statsItems.push(
|
|
378
|
+
const playerSeasonStats = this.parsePlayerSeasonStats(data);
|
|
379
|
+
if (playerSeasonStats) {
|
|
380
|
+
statsItems.push(playerSeasonStats);
|
|
379
381
|
}
|
|
380
382
|
const scoringSummary = this.parseScoringSummary(data);
|
|
381
383
|
if (scoringSummary) {
|
|
382
384
|
statsItems.push(scoringSummary);
|
|
383
385
|
}
|
|
386
|
+
const winProbability = this.parseWinProbability(data);
|
|
387
|
+
if (winProbability) {
|
|
388
|
+
statsItems.push(winProbability);
|
|
389
|
+
}
|
|
390
|
+
// Team Stats (prefer season stats when available; fallback to game stats)
|
|
391
|
+
const teamStats = this.parseTeamSeasonStatistics(data) || this.parseTeamsStatistics(data);
|
|
392
|
+
if (teamStats) {
|
|
393
|
+
statsItems.push(teamStats);
|
|
394
|
+
}
|
|
395
|
+
const driveSummary = this.parseDriveSummary(data);
|
|
396
|
+
if (driveSummary.length > 0) {
|
|
397
|
+
statsItems.push(...driveSummary);
|
|
398
|
+
}
|
|
384
399
|
const penalties = this.parsePenalties(data);
|
|
385
400
|
if (penalties) {
|
|
386
401
|
statsItems.push(penalties);
|
|
387
402
|
}
|
|
403
|
+
const activeAthletes = this.parseActiveAthletes(data);
|
|
404
|
+
if (activeAthletes) {
|
|
405
|
+
statsItems.push(activeAthletes);
|
|
406
|
+
}
|
|
388
407
|
const gameLeaders = this.parseGameLeaders(data);
|
|
389
408
|
if (gameLeaders) {
|
|
390
409
|
statsItems.push(gameLeaders);
|
|
@@ -393,14 +412,6 @@ export class StatsViewModel extends ViewModel {
|
|
|
393
412
|
if (recentGames) {
|
|
394
413
|
statsItems.push(recentGames);
|
|
395
414
|
}
|
|
396
|
-
const winProbability = this.parseWinProbability(data);
|
|
397
|
-
if (winProbability) {
|
|
398
|
-
statsItems.push(winProbability);
|
|
399
|
-
}
|
|
400
|
-
const teamsStatistics = this.parseTeamsStatistics(data);
|
|
401
|
-
if (teamsStatistics) {
|
|
402
|
-
statsItems.push(teamsStatistics);
|
|
403
|
-
}
|
|
404
415
|
const promotion = this.parsePromotion(data);
|
|
405
416
|
if (promotion) {
|
|
406
417
|
statsItems.push(promotion);
|
|
@@ -462,16 +473,22 @@ export class StatsViewModel extends ViewModel {
|
|
|
462
473
|
for (let i = 0; i < awayTeam.statistics.length; i++) {
|
|
463
474
|
const awayStat = awayTeam.statistics[i];
|
|
464
475
|
const homeStat = homeTeam.statistics[i];
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
476
|
+
if (isTeamStatistic(awayStat) && isTeamStatistic(homeStat)) {
|
|
477
|
+
statistics.push({
|
|
478
|
+
awayTeamDisplayValue: awayStat?.displayValue || '0',
|
|
479
|
+
displayName: awayStat.displayName || '',
|
|
480
|
+
homeTeamDisplayValue: homeStat?.displayValue || '0',
|
|
481
|
+
awayTeamValue: awayStat?.value || 0,
|
|
482
|
+
homeTeamValue: homeStat?.value || 0,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
if (!statistics.length) {
|
|
487
|
+
return null;
|
|
472
488
|
}
|
|
473
489
|
return {
|
|
474
490
|
type: 'teamStats',
|
|
491
|
+
title: 'Team Stats',
|
|
475
492
|
awayTeam: {
|
|
476
493
|
logo: awayTeam.logo,
|
|
477
494
|
displayName: awayTeam.displayName || '',
|
|
@@ -487,6 +504,78 @@ export class StatsViewModel extends ViewModel {
|
|
|
487
504
|
statistics,
|
|
488
505
|
};
|
|
489
506
|
}
|
|
507
|
+
parseTeamSeasonStatistics(data) {
|
|
508
|
+
const teams = data.entities?.teams || {};
|
|
509
|
+
if (!Object.keys(teams).length ||
|
|
510
|
+
!data.statTeams ||
|
|
511
|
+
!data.statTeams.title ||
|
|
512
|
+
!data.statTeams.sections?.length ||
|
|
513
|
+
!data.statTeams.teams?.length) {
|
|
514
|
+
return null;
|
|
515
|
+
}
|
|
516
|
+
const awayTeamKey = data.statTeams.teams[0]?.$key;
|
|
517
|
+
const homeTeamKey = data.statTeams.teams[1]?.$key;
|
|
518
|
+
if (!awayTeamKey || !homeTeamKey) {
|
|
519
|
+
return null;
|
|
520
|
+
}
|
|
521
|
+
const awayTeam = teams[awayTeamKey];
|
|
522
|
+
const homeTeam = teams[homeTeamKey];
|
|
523
|
+
if (!homeTeam || !awayTeam) {
|
|
524
|
+
return null;
|
|
525
|
+
}
|
|
526
|
+
const tabbedStatistics = {};
|
|
527
|
+
data.statTeams.sections.forEach((section) => {
|
|
528
|
+
if (!!section.$key && !!section.title) {
|
|
529
|
+
const sectionKeyStatistics = [];
|
|
530
|
+
if (isTabbedStatisticsArray(homeTeam.statistics) &&
|
|
531
|
+
isTabbedStatisticsArray(awayTeam.statistics)) {
|
|
532
|
+
const homeSectionStats = homeTeam.statistics.find((st) => st.$key === section.$key);
|
|
533
|
+
const awaySectionStats = awayTeam.statistics.find((st) => st.$key === section.$key);
|
|
534
|
+
if (homeSectionStats &&
|
|
535
|
+
awaySectionStats &&
|
|
536
|
+
awaySectionStats.stats?.length &&
|
|
537
|
+
homeSectionStats.stats?.length) {
|
|
538
|
+
for (let i = 0; i < awaySectionStats.stats.length; i++) {
|
|
539
|
+
const awayStat = awaySectionStats.stats[i];
|
|
540
|
+
const homeStat = homeSectionStats.stats[i];
|
|
541
|
+
sectionKeyStatistics.push({
|
|
542
|
+
awayTeamDisplayValue: awayStat?.displayValue || '0',
|
|
543
|
+
displayName: awayStat.displayName || '',
|
|
544
|
+
homeTeamDisplayValue: homeStat?.displayValue || '0',
|
|
545
|
+
awayTeamValue: awayStat?.displayValue
|
|
546
|
+
? Number(awayStat.displayValue)
|
|
547
|
+
: 0,
|
|
548
|
+
homeTeamValue: homeStat?.displayValue
|
|
549
|
+
? Number(homeStat.displayValue)
|
|
550
|
+
: 0,
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
tabbedStatistics[section.$key] = {
|
|
554
|
+
title: section.title,
|
|
555
|
+
entries: sectionKeyStatistics,
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
return {
|
|
562
|
+
type: 'teamStats',
|
|
563
|
+
title: data.statTeams.title,
|
|
564
|
+
awayTeam: {
|
|
565
|
+
abbreviation: awayTeam.abbreviation,
|
|
566
|
+
displayName: awayTeam.displayName || '',
|
|
567
|
+
color: awayTeam.color || '',
|
|
568
|
+
logo: awayTeam.logo,
|
|
569
|
+
},
|
|
570
|
+
homeTeam: {
|
|
571
|
+
abbreviation: homeTeam.abbreviation,
|
|
572
|
+
displayName: homeTeam.displayName || '',
|
|
573
|
+
color: homeTeam.color || '',
|
|
574
|
+
logo: homeTeam.logo,
|
|
575
|
+
},
|
|
576
|
+
tabbedStatistics,
|
|
577
|
+
};
|
|
578
|
+
}
|
|
490
579
|
parseMatchPredictor(data) {
|
|
491
580
|
const teams = data.entities?.teams;
|
|
492
581
|
const predictor = data.predictor;
|
|
@@ -534,31 +623,137 @@ export class StatsViewModel extends ViewModel {
|
|
|
534
623
|
backgroundImage: promotion.backgroundImage || '',
|
|
535
624
|
};
|
|
536
625
|
}
|
|
626
|
+
parseCareerMatchup(response) {
|
|
627
|
+
const careerMatchup = response.careerMatchup;
|
|
628
|
+
const athletes = response.entities?.athletes;
|
|
629
|
+
if (!careerMatchup || !careerMatchup.sections) {
|
|
630
|
+
return null;
|
|
631
|
+
}
|
|
632
|
+
const toText = (value) => {
|
|
633
|
+
if (typeof value === 'string')
|
|
634
|
+
return value;
|
|
635
|
+
if (value && typeof value === 'object') {
|
|
636
|
+
const maybeDisplayName = value
|
|
637
|
+
.displayName;
|
|
638
|
+
if (typeof maybeDisplayName === 'string')
|
|
639
|
+
return maybeDisplayName;
|
|
640
|
+
}
|
|
641
|
+
return '';
|
|
642
|
+
};
|
|
643
|
+
const sections = careerMatchup.sections
|
|
644
|
+
.filter((section) => !!section)
|
|
645
|
+
.map((section) => {
|
|
646
|
+
const items = (section.items || [])
|
|
647
|
+
.filter((item) => !!item)
|
|
648
|
+
.map((item) => {
|
|
649
|
+
const athleteKey = item.athlete?.$key;
|
|
650
|
+
const athlete = athletes && athleteKey ? athletes[athleteKey] : undefined;
|
|
651
|
+
// Determine if this item should be highlighted (e.g. warning color)
|
|
652
|
+
// This abstraction allows the View to be sport-agnostic.
|
|
653
|
+
// Currently only "On Deck" in MLB triggers this.
|
|
654
|
+
const statusText = toText(item.status);
|
|
655
|
+
const isHighlighted = statusText === 'On Deck';
|
|
656
|
+
return {
|
|
657
|
+
status: statusText,
|
|
658
|
+
type: toText(item.type) || '',
|
|
659
|
+
displayName: toText(item.displayName) || '',
|
|
660
|
+
athlete,
|
|
661
|
+
isHighlighted,
|
|
662
|
+
};
|
|
663
|
+
});
|
|
664
|
+
const statistics = (section.statistics || [])
|
|
665
|
+
.filter((stat) => !!stat)
|
|
666
|
+
.map((stat) => ({
|
|
667
|
+
abbreviation: stat.abbreviation || '',
|
|
668
|
+
displayValue: stat.displayValue || '',
|
|
669
|
+
}));
|
|
670
|
+
return {
|
|
671
|
+
items,
|
|
672
|
+
statistics,
|
|
673
|
+
};
|
|
674
|
+
});
|
|
675
|
+
return {
|
|
676
|
+
type: 'careerMatchup',
|
|
677
|
+
title: careerMatchup.title || '',
|
|
678
|
+
sections,
|
|
679
|
+
};
|
|
680
|
+
}
|
|
537
681
|
parseHeaderTeams(response) {
|
|
682
|
+
return (this.parseHeaderTeamsFromTeamHeader(response) ||
|
|
683
|
+
this.parseHeaderTeamsFromHeader(response));
|
|
684
|
+
}
|
|
685
|
+
parseHeaderTeamsFromHeader(response) {
|
|
686
|
+
const headerTeams = response.header?.teams ||
|
|
687
|
+
[];
|
|
688
|
+
if (headerTeams.length === 0) {
|
|
689
|
+
return null;
|
|
690
|
+
}
|
|
691
|
+
return this.buildHeaderTeamsItem({
|
|
692
|
+
response,
|
|
693
|
+
headerTeams,
|
|
694
|
+
linescoresHeader: response.header?.linescoresHeader || [],
|
|
695
|
+
linescoresRowHeader: undefined,
|
|
696
|
+
isLiveFromHeaderSource: false,
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
parseHeaderTeamsFromTeamHeader(response) {
|
|
700
|
+
const headerTeams = response.header?.teams ||
|
|
701
|
+
[];
|
|
702
|
+
const teamHeaderTeams = response.teamHeader?.teams || [];
|
|
703
|
+
if (teamHeaderTeams.length === 0) {
|
|
704
|
+
return null;
|
|
705
|
+
}
|
|
706
|
+
const teamHeaderHasLinescores = teamHeaderTeams.some((t) => Array.isArray(t.linescores) && t.linescores.length > 0);
|
|
707
|
+
const teamHeaderHasLinescoresHeader = (response.teamHeader?.linescoresHeader?.length || 0) > 0;
|
|
708
|
+
if (!teamHeaderHasLinescores &&
|
|
709
|
+
!teamHeaderHasLinescoresHeader &&
|
|
710
|
+
headerTeams.length > 0) {
|
|
711
|
+
return null;
|
|
712
|
+
}
|
|
713
|
+
const linescoresRowHeader = response.teamHeader?.style?.linescores?.rowHeader === 'teamLogo'
|
|
714
|
+
? 'teamLogo'
|
|
715
|
+
: undefined;
|
|
716
|
+
return this.buildHeaderTeamsItem({
|
|
717
|
+
response,
|
|
718
|
+
headerTeams: teamHeaderTeams,
|
|
719
|
+
linescoresHeader: response.teamHeader?.linescoresHeader || [],
|
|
720
|
+
linescoresRowHeader,
|
|
721
|
+
isLiveFromHeaderSource: teamHeaderHasLinescores || teamHeaderHasLinescoresHeader,
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
buildHeaderTeamsItem(params) {
|
|
725
|
+
const { response, headerTeams, linescoresHeader: rawLinescoresHeader, linescoresRowHeader, isLiveFromHeaderSource, } = params;
|
|
538
726
|
const teams = response.entities?.teams;
|
|
539
|
-
if (!teams ||
|
|
727
|
+
if (!teams || headerTeams.length === 0) {
|
|
540
728
|
return null;
|
|
541
729
|
}
|
|
542
|
-
const homeTeamHeader =
|
|
730
|
+
const homeTeamHeader = headerTeams.find((t) => {
|
|
543
731
|
const team = teams[t.$key];
|
|
544
732
|
return team && team.homeAway === 'home';
|
|
545
733
|
});
|
|
546
|
-
const awayTeamHeader =
|
|
734
|
+
const awayTeamHeader = headerTeams.find((t) => {
|
|
547
735
|
const team = teams[t.$key];
|
|
548
736
|
return team && team.homeAway === 'away';
|
|
549
737
|
});
|
|
550
|
-
|
|
738
|
+
// If home/away isn't provided, fall back to list order.
|
|
739
|
+
const fallbackAwayTeamHeader = headerTeams[0];
|
|
740
|
+
const fallbackHomeTeamHeader = headerTeams[1];
|
|
741
|
+
const resolvedHomeTeamHeader = homeTeamHeader || fallbackHomeTeamHeader;
|
|
742
|
+
const resolvedAwayTeamHeader = awayTeamHeader || fallbackAwayTeamHeader;
|
|
743
|
+
if (!resolvedHomeTeamHeader || !resolvedAwayTeamHeader) {
|
|
551
744
|
return null;
|
|
552
745
|
}
|
|
553
|
-
const homeTeam = teams[
|
|
554
|
-
const awayTeam = teams[
|
|
746
|
+
const homeTeam = teams[resolvedHomeTeamHeader.$key];
|
|
747
|
+
const awayTeam = teams[resolvedAwayTeamHeader.$key];
|
|
555
748
|
if (!homeTeam || !awayTeam) {
|
|
556
749
|
return null;
|
|
557
750
|
}
|
|
558
751
|
const statistics = [];
|
|
559
752
|
const statisticsSet = new Set();
|
|
560
|
-
const
|
|
561
|
-
const
|
|
753
|
+
const rawAwayStats = awayTeam.statistics || [];
|
|
754
|
+
const rawHomeStats = homeTeam.statistics || [];
|
|
755
|
+
const awayStatistics = rawAwayStats.filter(isTeamStatistic);
|
|
756
|
+
const homeStatistics = rawHomeStats.filter(isTeamStatistic);
|
|
562
757
|
[...awayStatistics, ...homeStatistics].forEach((st) => {
|
|
563
758
|
statisticsSet.add(st.$key);
|
|
564
759
|
});
|
|
@@ -566,6 +761,9 @@ export class StatsViewModel extends ViewModel {
|
|
|
566
761
|
statisticsSet.forEach((statKey) => {
|
|
567
762
|
const awayStat = awayStatistics.find((st) => st.$key === statKey);
|
|
568
763
|
const homeStat = homeStatistics.find((st) => st.$key === statKey);
|
|
764
|
+
if (!awayStat || !homeStat) {
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
569
767
|
statistics.push({
|
|
570
768
|
displayName: awayStat?.displayName || homeStat?.displayName || '',
|
|
571
769
|
awayTeamValue: awayStat?.value || 0,
|
|
@@ -574,32 +772,77 @@ export class StatsViewModel extends ViewModel {
|
|
|
574
772
|
homeTeamDisplayValue: homeStat?.displayValue || '0',
|
|
575
773
|
});
|
|
576
774
|
});
|
|
775
|
+
const buildLinescores = (t) => {
|
|
776
|
+
if (t.linescores && t.linescores.length > 0) {
|
|
777
|
+
return t.linescores.map((l) => l.displayValue);
|
|
778
|
+
}
|
|
779
|
+
if (typeof t.score === 'string' && t.score.length > 0) {
|
|
780
|
+
return [t.score];
|
|
781
|
+
}
|
|
782
|
+
return [];
|
|
783
|
+
};
|
|
784
|
+
const maybeDetails = (t) => {
|
|
785
|
+
if (Array.isArray(t.details) && t.details.filter(Boolean).length > 0) {
|
|
786
|
+
return t.details.filter(Boolean);
|
|
787
|
+
}
|
|
788
|
+
return undefined;
|
|
789
|
+
};
|
|
790
|
+
const awayDetails = maybeDetails(resolvedAwayTeamHeader);
|
|
791
|
+
const homeDetails = maybeDetails(resolvedHomeTeamHeader);
|
|
792
|
+
let linescoresHeader = rawLinescoresHeader;
|
|
793
|
+
let awayTeamLinescores = buildLinescores(resolvedAwayTeamHeader);
|
|
794
|
+
let homeTeamLinescores = buildLinescores(resolvedHomeTeamHeader);
|
|
795
|
+
// If more than 9 innings are present, show only the last 9 innings plus R, H, E
|
|
796
|
+
const hasLinescoresAndHeader = linescoresHeader.length > 0 &&
|
|
797
|
+
(awayTeamLinescores.length > 0 || homeTeamLinescores.length > 0);
|
|
798
|
+
if (hasLinescoresAndHeader && linescoresRowHeader === 'teamLogo') {
|
|
799
|
+
const lastThreeHeaders = linescoresHeader.slice(-3);
|
|
800
|
+
const isMlbFormat = lastThreeHeaders.includes('R') ||
|
|
801
|
+
lastThreeHeaders.includes('H') ||
|
|
802
|
+
lastThreeHeaders.includes('E');
|
|
803
|
+
if (isMlbFormat && linescoresHeader.length > 12) {
|
|
804
|
+
// More than 9 innings + 3 stats (R, H, E)
|
|
805
|
+
const statsCount = 3; // R, H, E
|
|
806
|
+
const inningsCount = linescoresHeader.length - statsCount;
|
|
807
|
+
const maxInningsToShow = 9;
|
|
808
|
+
if (inningsCount > maxInningsToShow) {
|
|
809
|
+
const inningsToRemove = inningsCount - maxInningsToShow;
|
|
810
|
+
// Slice header to keep last 9 innings + stats (R, H, E)
|
|
811
|
+
linescoresHeader = linescoresHeader.slice(inningsToRemove);
|
|
812
|
+
// Apply same slicing to team linescores
|
|
813
|
+
awayTeamLinescores = awayTeamLinescores.slice(inningsToRemove);
|
|
814
|
+
homeTeamLinescores = homeTeamLinescores.slice(inningsToRemove);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
const isLive = response.gameState === 'in' ||
|
|
819
|
+
response.gameState === 'post' ||
|
|
820
|
+
isLiveFromHeaderSource;
|
|
577
821
|
return {
|
|
578
822
|
type: 'headerTeam',
|
|
579
|
-
linescoresHeader
|
|
580
|
-
|
|
823
|
+
linescoresHeader,
|
|
824
|
+
linescoresRowHeader,
|
|
825
|
+
isLive,
|
|
581
826
|
statistics,
|
|
582
827
|
awayTeam: {
|
|
583
828
|
abbreviation: awayTeam.abbreviation,
|
|
584
829
|
color: awayTeam.color,
|
|
585
830
|
id: awayTeam.id,
|
|
586
|
-
linescores:
|
|
587
|
-
awayTeamHeader.score || '0',
|
|
588
|
-
],
|
|
831
|
+
linescores: awayTeamLinescores,
|
|
589
832
|
logo: awayTeam.logo,
|
|
590
833
|
name: awayTeam.name,
|
|
591
834
|
record: awayTeam.record,
|
|
835
|
+
...(awayDetails ? { details: awayDetails } : {}),
|
|
592
836
|
},
|
|
593
837
|
homeTeam: {
|
|
594
838
|
abbreviation: homeTeam.abbreviation,
|
|
595
839
|
color: homeTeam.color,
|
|
596
840
|
id: homeTeam.id,
|
|
597
|
-
linescores:
|
|
598
|
-
homeTeamHeader.score || '0',
|
|
599
|
-
],
|
|
841
|
+
linescores: homeTeamLinescores,
|
|
600
842
|
logo: homeTeam.logo,
|
|
601
843
|
name: homeTeam.name,
|
|
602
844
|
record: homeTeam.record,
|
|
845
|
+
...(homeDetails ? { details: homeDetails } : {}),
|
|
603
846
|
},
|
|
604
847
|
};
|
|
605
848
|
}
|
|
@@ -891,47 +1134,143 @@ export class StatsViewModel extends ViewModel {
|
|
|
891
1134
|
}
|
|
892
1135
|
const teams = data.entities?.teams;
|
|
893
1136
|
const athletes = data.entities?.athletes;
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
const [athleteNumber, ...athleteNameWithAssists] = item.title.split(' ');
|
|
901
|
-
let athleteAssists = '';
|
|
902
|
-
let athleteName = '';
|
|
903
|
-
if (athleteNameWithAssists.length > 0) {
|
|
904
|
-
athleteAssists =
|
|
905
|
-
athleteNameWithAssists[athleteNameWithAssists.length - 1];
|
|
906
|
-
athleteName = athleteNameWithAssists.slice(0, -1).join(' ');
|
|
1137
|
+
// Handle MLB Scoring Summary
|
|
1138
|
+
if (isMlbScoringSummary(scoringSummary)) {
|
|
1139
|
+
const sections = [];
|
|
1140
|
+
for (const section of scoringSummary.sections) {
|
|
1141
|
+
if (!section.title || !section.items?.length) {
|
|
1142
|
+
continue;
|
|
907
1143
|
}
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
1144
|
+
const items = [];
|
|
1145
|
+
for (const item of section.items) {
|
|
1146
|
+
if (!item?.team?.$key || !item?.athlete?.$key) {
|
|
1147
|
+
continue;
|
|
1148
|
+
}
|
|
1149
|
+
const team = teams?.[item.team.$key];
|
|
1150
|
+
const athlete = athletes?.[item.athlete.$key];
|
|
1151
|
+
const athleteNumber = `#${athlete?.jersey || ''}`;
|
|
1152
|
+
const athleteName = athlete?.shortName || '';
|
|
1153
|
+
if (!team || !athlete) {
|
|
1154
|
+
continue;
|
|
1155
|
+
}
|
|
1156
|
+
const textParts = [];
|
|
1157
|
+
if (athleteNumber) {
|
|
1158
|
+
textParts.push({
|
|
1159
|
+
featured: false,
|
|
1160
|
+
title: athleteNumber,
|
|
1161
|
+
});
|
|
1162
|
+
}
|
|
1163
|
+
if (athleteName) {
|
|
1164
|
+
textParts.push({
|
|
1165
|
+
featured: true,
|
|
1166
|
+
title: athleteName,
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
items.push({
|
|
1170
|
+
teamLogo: team?.logo || '',
|
|
1171
|
+
teamName: team?.abbreviation,
|
|
1172
|
+
headshot: athlete?.headshot
|
|
1173
|
+
? setImageDimensions(athlete.headshot, 200, 144)
|
|
1174
|
+
: undefined,
|
|
1175
|
+
athleteShortName: athlete?.shortName || '',
|
|
1176
|
+
athleteJersey: athlete?.jersey || '',
|
|
1177
|
+
athletePosition: athlete?.position?.abbreviation || '',
|
|
1178
|
+
text: item?.text || '',
|
|
1179
|
+
shortText: textParts,
|
|
1180
|
+
header: (item?.header || []).map((h, index) => ({
|
|
1181
|
+
featured: h.featured ?? false,
|
|
1182
|
+
title: `${h.title ?? ''}${index === 0 ? ',' : ''}`,
|
|
1183
|
+
})),
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
if (items.length > 0) {
|
|
1187
|
+
sections.push({
|
|
1188
|
+
title: section.title,
|
|
1189
|
+
items,
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
if (sections.length === 0) {
|
|
1194
|
+
return null;
|
|
1195
|
+
}
|
|
922
1196
|
return {
|
|
923
|
-
|
|
924
|
-
|
|
1197
|
+
type: 'scoringSummary',
|
|
1198
|
+
tag: 'mlb',
|
|
1199
|
+
title: scoringSummary.title || 'Scoring Summary',
|
|
1200
|
+
sections,
|
|
925
1201
|
};
|
|
926
|
-
});
|
|
927
|
-
if (!sections.length || sections.every((s) => s.scores.length === 0)) {
|
|
928
|
-
return null;
|
|
929
1202
|
}
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
sections
|
|
934
|
-
|
|
1203
|
+
// Handle Hockey Scoring Summary - transform to unified format
|
|
1204
|
+
else if (isHockeyScoringSummary(scoringSummary)) {
|
|
1205
|
+
const hockeySummary = scoringSummary;
|
|
1206
|
+
const sections = [];
|
|
1207
|
+
for (const section of hockeySummary.sections || []) {
|
|
1208
|
+
const items = [];
|
|
1209
|
+
for (const item of section.items || []) {
|
|
1210
|
+
if (!item?.team?.$key || !item?.athlete?.$key || !item?.title) {
|
|
1211
|
+
continue;
|
|
1212
|
+
}
|
|
1213
|
+
const team = item.team && item.team.$key ? teams?.[item.team.$key] : undefined;
|
|
1214
|
+
const atheleteKey = item.athlete?.$key || '';
|
|
1215
|
+
const athlete = athletes?.[atheleteKey];
|
|
1216
|
+
const itemTitle = item.title || '';
|
|
1217
|
+
const [athleteNumber, ...athleteNameWithAssists] = itemTitle.split(' ');
|
|
1218
|
+
let athleteAssists = '';
|
|
1219
|
+
let athleteName = '';
|
|
1220
|
+
if (athleteNameWithAssists.length > 0) {
|
|
1221
|
+
athleteAssists =
|
|
1222
|
+
athleteNameWithAssists[athleteNameWithAssists.length - 1];
|
|
1223
|
+
athleteName = athleteNameWithAssists.slice(0, -1).join(' ');
|
|
1224
|
+
}
|
|
1225
|
+
const header = [];
|
|
1226
|
+
if (item.clock) {
|
|
1227
|
+
header.push({ featured: true, title: item.clock });
|
|
1228
|
+
}
|
|
1229
|
+
if (team?.abbreviation) {
|
|
1230
|
+
header.push({ featured: false, title: team.abbreviation });
|
|
1231
|
+
}
|
|
1232
|
+
const textParts = [];
|
|
1233
|
+
if (athleteNumber) {
|
|
1234
|
+
textParts.push({ featured: false, title: athleteNumber });
|
|
1235
|
+
}
|
|
1236
|
+
if (athleteName) {
|
|
1237
|
+
textParts.push({ featured: true, title: athleteName });
|
|
1238
|
+
}
|
|
1239
|
+
if (athleteAssists) {
|
|
1240
|
+
textParts.push({ featured: false, title: athleteAssists });
|
|
1241
|
+
}
|
|
1242
|
+
items.push({
|
|
1243
|
+
teamLogo: team?.logo || '',
|
|
1244
|
+
teamName: team?.abbreviation || '',
|
|
1245
|
+
header,
|
|
1246
|
+
text: item?.description || '',
|
|
1247
|
+
shortText: textParts,
|
|
1248
|
+
headshot: athlete?.headshot
|
|
1249
|
+
? setImageDimensions(athlete.headshot, 200, 144)
|
|
1250
|
+
: undefined,
|
|
1251
|
+
athleteShortName: athleteName,
|
|
1252
|
+
athletePosition: athlete?.position?.abbreviation || '',
|
|
1253
|
+
athleteJersey: athleteNumber,
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
if (items.length > 0) {
|
|
1257
|
+
sections.push({
|
|
1258
|
+
title: section?.title || '',
|
|
1259
|
+
items,
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
if (sections.length === 0) {
|
|
1264
|
+
return null;
|
|
1265
|
+
}
|
|
1266
|
+
return {
|
|
1267
|
+
type: 'scoringSummary',
|
|
1268
|
+
tag: 'hockey',
|
|
1269
|
+
title: hockeySummary.title || 'Scoring Summary',
|
|
1270
|
+
sections,
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
return null;
|
|
935
1274
|
}
|
|
936
1275
|
parsePenalties(data) {
|
|
937
1276
|
const penalties = data.penaltySummary;
|
|
@@ -941,49 +1280,137 @@ export class StatsViewModel extends ViewModel {
|
|
|
941
1280
|
const teams = data.entities?.teams;
|
|
942
1281
|
const athletes = data.entities?.athletes;
|
|
943
1282
|
const sections = penalties.sections.map((section) => {
|
|
944
|
-
const
|
|
1283
|
+
const items = section.items
|
|
945
1284
|
.filter((item) => item?.team?.$key && item?.athlete?.$key)
|
|
946
1285
|
.map((item) => {
|
|
947
1286
|
const team = teams?.[item.team.$key];
|
|
948
1287
|
const athlete = athletes?.[item.athlete.$key];
|
|
949
1288
|
const [athleteNumber, ...athleteName] = item.title.split(' ');
|
|
1289
|
+
const athleteDisplayName = (athleteName ?? []).join(' ') || '';
|
|
1290
|
+
const textParts = [];
|
|
1291
|
+
if (athleteNumber) {
|
|
1292
|
+
textParts.push({
|
|
1293
|
+
featured: false,
|
|
1294
|
+
title: athleteNumber,
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1297
|
+
if (athleteDisplayName) {
|
|
1298
|
+
textParts.push({
|
|
1299
|
+
featured: true,
|
|
1300
|
+
title: athleteDisplayName,
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
950
1303
|
return {
|
|
951
|
-
teamLogo: team?.logo,
|
|
952
|
-
teamName: team?.abbreviation,
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1304
|
+
teamLogo: team?.logo || '',
|
|
1305
|
+
teamName: team?.abbreviation || '',
|
|
1306
|
+
header: [{ title: item.clock || '', featured: false }],
|
|
1307
|
+
text: item.description || '',
|
|
1308
|
+
shortText: textParts,
|
|
1309
|
+
headshot: athlete?.headshot
|
|
957
1310
|
? setImageDimensions(athlete.headshot, 200, 144)
|
|
958
1311
|
: undefined,
|
|
959
|
-
|
|
960
|
-
|
|
1312
|
+
athleteShortName: athleteName.join(' '),
|
|
1313
|
+
athletePosition: athlete?.position?.abbreviation || '',
|
|
1314
|
+
athleteJersey: athleteNumber || '',
|
|
961
1315
|
};
|
|
962
1316
|
});
|
|
963
1317
|
return {
|
|
964
1318
|
title: section.title,
|
|
965
|
-
|
|
1319
|
+
items,
|
|
966
1320
|
};
|
|
967
1321
|
});
|
|
968
|
-
if (!sections.length || sections.every((s) => s.
|
|
1322
|
+
if (!sections.length || sections.every((s) => s.items.length === 0)) {
|
|
969
1323
|
return null;
|
|
970
1324
|
}
|
|
971
1325
|
return {
|
|
972
1326
|
type: 'penalties',
|
|
1327
|
+
tag: 'penalties',
|
|
973
1328
|
title: penalties.title,
|
|
974
1329
|
sections,
|
|
975
1330
|
};
|
|
976
1331
|
}
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
if (
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1332
|
+
parsePlayerSeasonStats(data) {
|
|
1333
|
+
const playerStats = data.playerStats;
|
|
1334
|
+
const teams = data.entities?.teams;
|
|
1335
|
+
const athletes = data.entities?.athletes;
|
|
1336
|
+
if (!playerStats?.teams?.length || !teams) {
|
|
1337
|
+
return null;
|
|
1338
|
+
}
|
|
1339
|
+
const parsedTeams = [];
|
|
1340
|
+
for (const playerStatsTeam of playerStats.teams) {
|
|
1341
|
+
if (!playerStatsTeam.$key) {
|
|
1342
|
+
continue;
|
|
1343
|
+
}
|
|
1344
|
+
const team = teams[playerStatsTeam.$key];
|
|
1345
|
+
if (!team) {
|
|
1346
|
+
continue;
|
|
1347
|
+
}
|
|
1348
|
+
const sections = [];
|
|
1349
|
+
for (const section of playerStatsTeam.sections || []) {
|
|
1350
|
+
if (!section.title || !section.items?.length) {
|
|
1351
|
+
continue;
|
|
1352
|
+
}
|
|
1353
|
+
const items = [];
|
|
1354
|
+
for (const item of section.items) {
|
|
1355
|
+
if (!item.title) {
|
|
1356
|
+
continue;
|
|
1357
|
+
}
|
|
1358
|
+
const athleteKey = item.athlete?.$key;
|
|
1359
|
+
const athlete = athleteKey
|
|
1360
|
+
? athletes?.[athleteKey]
|
|
1361
|
+
: undefined;
|
|
1362
|
+
const statistics = item.athlete?.statistics || [];
|
|
1363
|
+
const featuredStat = statistics.find((s) => s.featured);
|
|
1364
|
+
items.push({
|
|
1365
|
+
title: item.title,
|
|
1366
|
+
headshot: athlete?.headshot
|
|
1367
|
+
? setImageDimensions(athlete.headshot, 256, 144)
|
|
1368
|
+
: '',
|
|
1369
|
+
position: athlete?.position?.abbreviation || '',
|
|
1370
|
+
jersey: athlete?.jersey || '',
|
|
1371
|
+
featuredStat: featuredStat
|
|
1372
|
+
? {
|
|
1373
|
+
displayValue: featuredStat.displayValue || '',
|
|
1374
|
+
label: featuredStat.label || '',
|
|
1375
|
+
}
|
|
1376
|
+
: null,
|
|
1377
|
+
statistics: statistics
|
|
1378
|
+
.filter((s) => !s.featured)
|
|
1379
|
+
.map((s) => ({
|
|
1380
|
+
displayValue: s.displayValue || '',
|
|
1381
|
+
label: s.label || '',
|
|
1382
|
+
})),
|
|
1383
|
+
playerStatus: item?.status
|
|
1384
|
+
? {
|
|
1385
|
+
displayName: item.status.displayName ?? '',
|
|
1386
|
+
type: item.status.type ?? '',
|
|
1387
|
+
}
|
|
1388
|
+
: null,
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
if (items.length > 0) {
|
|
1392
|
+
sections.push({
|
|
1393
|
+
title: section.title,
|
|
1394
|
+
items,
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
if (sections.length > 0) {
|
|
1399
|
+
parsedTeams.push({
|
|
1400
|
+
teamKey: playerStatsTeam.$key,
|
|
1401
|
+
shortDisplayName: team.shortDisplayName || team.displayName || '',
|
|
1402
|
+
color: team.color || '',
|
|
1403
|
+
sections,
|
|
1404
|
+
});
|
|
1405
|
+
}
|
|
986
1406
|
}
|
|
1407
|
+
if (parsedTeams.length === 0) {
|
|
1408
|
+
return null;
|
|
1409
|
+
}
|
|
1410
|
+
return {
|
|
1411
|
+
type: 'playerSeasonStats',
|
|
1412
|
+
teams: parsedTeams,
|
|
1413
|
+
};
|
|
987
1414
|
}
|
|
988
1415
|
}
|
|
989
1416
|
export default StatsViewModel;
|