@maestro_io/maestro-web-sdk 3.3.1 → 4.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/f8820fca3a2a7957f753167da0884f9d.png +0 -0
- package/dist/maestro-web-sdk.esm.js +12 -12
- package/dist/maestro-web-sdk.esm.js.map +1 -1
- package/dist/maestro-web-sdk.umd.js +12 -12
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/package.json +91 -0
- package/dist/src/__mocks__/sentry.d.ts +4 -0
- package/dist/src/components/atoms/BaseButton/BaseButton.d.ts +1 -1
- package/dist/src/components/atoms/BaseButton/BaseButton.js +11 -0
- package/dist/src/components/atoms/BaseButton/index.js +2 -0
- package/dist/src/components/atoms/Image/index.d.ts +1 -1
- package/dist/src/components/atoms/Image/index.js +34 -0
- package/dist/src/components/atoms/Rive/index.d.ts +141 -11
- package/dist/src/components/atoms/Rive/index.js +53 -0
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.d.ts +1 -2
- package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.js +9 -0
- package/dist/src/components/atoms/SvgIcon/BetsIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/BetsIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.d.ts +1 -2
- package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.d.ts +1 -2
- package/dist/src/components/atoms/SvgIcon/CollapseIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.d.ts +1 -2
- package/dist/src/components/atoms/SvgIcon/ExpandIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/FantasyIcon.js +15 -0
- package/dist/src/components/atoms/SvgIcon/FlameIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/FlameIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/Icon.d.ts +5 -5
- package/dist/src/components/atoms/SvgIcon/Icon.js +44 -0
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.js +10 -0
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.js +11 -0
- package/dist/src/components/atoms/SvgIcon/PlayIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/PlayIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/ShopIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/ShopIcon.js +7 -0
- package/dist/src/components/atoms/SvgIcon/StatsIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/StatsIcon.js +12 -0
- package/dist/src/components/atoms/SvgIcon/TimesIcon.d.ts +1 -2
- package/dist/src/components/atoms/SvgIcon/TimesIcon.js +6 -0
- package/dist/src/components/atoms/SvgIcon/WarningIcon.d.ts +1 -1
- package/dist/src/components/atoms/SvgIcon/WarningIcon.js +8 -0
- package/dist/src/components/atoms/SvgIcon/index.js +2 -0
- package/dist/src/components/core/App/App.d.ts +1 -1
- package/dist/src/components/core/App/App.js +35 -0
- package/dist/src/components/core/App/index.js +2 -0
- package/dist/src/components/core/OverlayContainer.js +58 -0
- package/dist/src/components/core/PanelManager/PanelManager.d.ts +1 -1
- package/dist/src/components/core/PanelManager/PanelManager.js +86 -0
- package/dist/src/components/core/PanelManager/index.js +2 -0
- package/dist/src/components/core/ScrollableContainer/FocusableItem.js +38 -0
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.d.ts +8 -7
- package/dist/src/components/core/ScrollableContainer/ScrollableContainer.js +169 -0
- package/dist/src/components/core/ScrollableContainer/index.js +2 -0
- package/dist/src/components/molecules/ActionButton/ActionButton.d.ts +53 -7
- package/dist/src/components/molecules/ActionButton/ActionButton.js +10 -0
- package/dist/src/components/molecules/ActionButton/index.js +2 -0
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.d.ts +1 -1
- package/dist/src/components/molecules/HeadshotImage/HeadshotImage.js +50 -0
- package/dist/src/components/molecules/HeadshotImage/index.js +2 -0
- package/dist/src/components/molecules/Overlay/Overlay.d.ts +1 -1
- package/dist/src/components/molecules/Overlay/Overlay.js +139 -0
- package/dist/src/components/molecules/Overlay/index.js +2 -0
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.d.ts +53 -7
- package/dist/src/components/molecules/PanelNavButton/PanelNavButton.js +27 -0
- package/dist/src/components/molecules/PanelNavButton/index.js +2 -0
- package/dist/src/components/molecules/SegmentButton/SegmentButton.js +10 -0
- package/dist/src/components/molecules/SegmentButton/index.js +2 -0
- package/dist/src/components/molecules/TabLoadError/TabLoadError.d.ts +53 -7
- package/dist/src/components/molecules/TabLoadError/TabLoadError.js +14 -0
- package/dist/src/components/molecules/TabLoadError/index.js +2 -0
- package/dist/src/components/molecules/WatchButton/WatchButton.d.ts +1 -1
- package/dist/src/components/molecules/WatchButton/WatchButton.js +15 -0
- package/dist/src/components/molecules/WatchButton/index.js +2 -0
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.d.ts +1 -1
- package/dist/src/components/organisms/PanelNavigation/PanelNavigation.js +60 -0
- package/dist/src/components/organisms/PanelNavigation/index.js +2 -0
- package/dist/src/components/organisms/SegmentController/SegmentController.d.ts +5 -4
- package/dist/src/components/organisms/SegmentController/SegmentController.js +76 -0
- package/dist/src/components/organisms/SegmentController/index.js +2 -0
- package/dist/src/development/MaestroEventDelegate.js +109 -0
- package/dist/src/development/TimeSeek.d.ts +1 -1
- package/dist/src/development/TimeSeek.js +218 -0
- package/dist/src/development/development.js +36 -0
- package/dist/src/external/AxiosNetworkClient.js +110 -0
- package/dist/src/external/LocalStorageCacheManager.js +213 -0
- package/dist/src/external/ReactRenderer.js +65 -0
- package/dist/src/external/mocks/MockExternalNetworkClient.js +187 -0
- package/dist/src/external/ports/cacheManager.js +1 -0
- package/dist/src/external/ports/networkClient.js +1 -0
- package/dist/src/external/ports/renderer.d.ts +1 -2
- package/dist/src/external/ports/renderer.js +1 -0
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.d.ts +8 -0
- package/dist/src/external/spatial-navigation/__mocks__/withFocusable.js +7 -0
- package/dist/src/external/spatial-navigation/index.js +3 -0
- package/dist/src/external/spatial-navigation/measureLayout.js +30 -0
- package/dist/src/external/spatial-navigation/spatialNavigation.js +876 -0
- package/dist/src/external/spatial-navigation/utils.js +6 -0
- package/dist/src/external/spatial-navigation/visualDebugger.js +76 -0
- package/dist/src/external/spatial-navigation/withFocusable.d.ts +53 -7
- package/dist/src/external/spatial-navigation/withFocusable.js +245 -0
- package/dist/src/helpers/Observable.js +37 -0
- package/dist/src/helpers/strings.js +14 -0
- package/dist/src/helpers/url.js +12 -0
- package/dist/src/index.d.ts +5 -5
- package/dist/src/index.js +165 -0
- package/dist/src/interfaces/IMaestroEvent.js +18 -0
- package/dist/src/interfaces/IMaestroEventDelegate.js +1 -0
- package/dist/src/interfaces/IMaestroManager.js +1 -0
- package/dist/src/interfaces/IUserSettings.js +20 -0
- package/dist/src/models/IModel.js +1 -0
- package/dist/src/models/IPanel.js +40 -0
- package/dist/src/models/ITheme.js +20 -0
- package/dist/src/models/IWinningBet.js +1 -0
- package/dist/src/modules/bets/interfaces/IBets.js +1 -0
- package/dist/src/modules/bets/mocks.js +573 -0
- package/dist/src/modules/bets/types/BetsAnalyticsTypes.js +1 -0
- package/dist/src/modules/bets/view/BetsView.d.ts +3 -3
- package/dist/src/modules/bets/view/BetsView.js +143 -0
- package/dist/src/modules/bets/view/HotProps/HotPropsView.d.ts +53 -7
- package/dist/src/modules/bets/view/HotProps/HotPropsView.js +150 -0
- package/dist/src/modules/bets/view/SixPack/SixPackView.d.ts +5 -4
- package/dist/src/modules/bets/view/SixPack/SixPackView.js +110 -0
- package/dist/src/modules/bets/view/UserBets/BetResult/BetResult.d.ts +1 -1
- package/dist/src/modules/bets/view/UserBets/BetResult/BetResult.js +6 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCard.d.ts +53 -7
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCard.js +149 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +5 -4
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardEvent.js +34 -0
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardFooter.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardFooter.js +18 -0
- package/dist/src/modules/bets/view/UserBets/Boost/Boost.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/Boost/Boost.js +6 -0
- package/dist/src/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +9 -0
- package/dist/src/modules/bets/view/UserBets/Parlay/Parlay.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/Parlay/Parlay.js +13 -0
- package/dist/src/modules/bets/view/UserBets/Straight/Straight.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/Straight/Straight.js +6 -0
- package/dist/src/modules/bets/view/UserBets/Teaser/Teaser.d.ts +1 -2
- package/dist/src/modules/bets/view/UserBets/Teaser/Teaser.js +13 -0
- package/dist/src/modules/bets/view/UserBets/UserBetsView.d.ts +3 -3
- package/dist/src/modules/bets/view/UserBets/UserBetsView.js +107 -0
- package/dist/src/modules/bets/view/components/Bet/Bet.d.ts +99 -11
- package/dist/src/modules/bets/view/components/Bet/Bet.js +32 -0
- package/dist/src/modules/bets/view/components/BetPill/BetPill.d.ts +1 -1
- package/dist/src/modules/bets/view/components/BetPill/BetPill.js +6 -0
- package/dist/src/modules/bets/view/components/BetsCard/BetsCard.js +15 -0
- package/dist/src/modules/bets/view/components/BetsCard/BetsCardHeader.d.ts +1 -1
- package/dist/src/modules/bets/view/components/BetsCard/BetsCardHeader.js +20 -0
- package/dist/src/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.d.ts +1 -1
- package/dist/src/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +14 -0
- package/dist/src/modules/bets/view/components/LocationWarning/LocationWarning.d.ts +1 -1
- package/dist/src/modules/bets/view/components/LocationWarning/LocationWarning.js +16 -0
- package/dist/src/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +5 -4
- package/dist/src/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +78 -0
- package/dist/src/modules/bets/view/components/PromoCodeBanner/index.js +1 -0
- package/dist/src/modules/bets/view-model/BetsViewModel.js +974 -0
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.d.ts +1 -1
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.js +107 -0
- package/dist/src/modules/fantasy/components/ExpandedAthleteList/index.js +1 -0
- package/dist/src/modules/fantasy/components/LeagueCard/LeagueCard.d.ts +53 -7
- package/dist/src/modules/fantasy/components/LeagueCard/LeagueCard.js +20 -0
- package/dist/src/modules/fantasy/components/LeagueCard/index.js +2 -0
- package/dist/src/modules/fantasy/components/TopPlayerCard/TopPlayerCard.d.ts +53 -7
- package/dist/src/modules/fantasy/components/TopPlayerCard/TopPlayerCard.js +29 -0
- package/dist/src/modules/fantasy/components/TopPlayerCard/index.js +2 -0
- package/dist/src/modules/fantasy/mocks.js +3682 -0
- package/dist/src/modules/fantasy/types.js +6 -0
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.d.ts +1 -1
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.js +74 -0
- package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/index.js +2 -0
- package/dist/src/modules/fantasy/view/ErrorBoundary.d.ts +13 -0
- package/dist/src/modules/fantasy/view/FantasyItemView.d.ts +6 -5
- package/dist/src/modules/fantasy/view/FantasyItemView.js +74 -0
- package/dist/src/modules/fantasy/view/FantasyView.d.ts +3 -3
- package/dist/src/modules/fantasy/view/FantasyView.js +133 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/DraftDateCountdown.d.ts +1 -1
- package/dist/src/modules/fantasy/view/InactiveLeague/DraftDateCountdown.js +95 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/InactiveLeague.d.ts +53 -7
- package/dist/src/modules/fantasy/view/InactiveLeague/InactiveLeague.js +13 -0
- package/dist/src/modules/fantasy/view/InactiveLeague/index.js +2 -0
- package/dist/src/modules/fantasy/view/LoginView/LoginView.d.ts +53 -7
- package/dist/src/modules/fantasy/view/LoginView/LoginView.js +27 -0
- package/dist/src/modules/fantasy/view/LoginView/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.d.ts +53 -7
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.js +25 -0
- package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.d.ts +1 -1
- package/dist/src/modules/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.js +9 -0
- package/dist/src/modules/fantasy/view/MatchupPair/MatchupPair.d.ts +53 -7
- package/dist/src/modules/fantasy/view/MatchupPair/MatchupPair.js +118 -0
- package/dist/src/modules/fantasy/view/MatchupPair/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.d.ts +1 -1
- package/dist/src/modules/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.js +9 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/MatchupSingle.d.ts +53 -7
- package/dist/src/modules/fantasy/view/MatchupSingle/MatchupSingle.js +108 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.d.ts +53 -7
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.js +18 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/index.js +2 -0
- package/dist/src/modules/fantasy/view/MatchupSingle/index.js +2 -0
- package/dist/src/modules/fantasy/view/PromoView/PromoView.d.ts +53 -7
- package/dist/src/modules/fantasy/view/PromoView/PromoView.js +12 -0
- package/dist/src/modules/fantasy/view/PromoView/index.js +2 -0
- package/dist/src/modules/fantasy/view/index.js +2 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.FantasyPolling.js +132 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.LeagueManagerPolling.js +141 -0
- package/dist/src/modules/fantasy/view-model/FantasyViewModel.js +534 -0
- package/dist/src/modules/key-plays/constants.js +292 -0
- package/dist/src/modules/key-plays/interfaces/IKeyPlays.js +14 -0
- package/dist/src/modules/key-plays/interfaces/IKeyPlaysResponse.js +1 -0
- package/dist/src/modules/key-plays/view/KeyPlayCardScoreTagView.d.ts +1 -1
- package/dist/src/modules/key-plays/view/KeyPlayCardScoreTagView.js +16 -0
- package/dist/src/modules/key-plays/view/KeyPlayCardView.d.ts +7 -6
- package/dist/src/modules/key-plays/view/KeyPlayCardView.js +139 -0
- package/dist/src/modules/key-plays/view/KeyPlayErrorStateView.d.ts +1 -1
- package/dist/src/modules/key-plays/view/KeyPlayErrorStateView.js +65 -0
- package/dist/src/modules/key-plays/view/KeyPlaysView.d.ts +3 -3
- package/dist/src/modules/key-plays/view/KeyPlaysView.js +151 -0
- package/dist/src/modules/key-plays/view-model/KeyPlaysViewModel.js +247 -0
- package/dist/src/modules/shop/mocks.js +390 -0
- package/dist/src/modules/shop/types.js +7 -0
- package/dist/src/modules/shop/view/ProductDetailView/ProductDetailView.d.ts +1 -2
- package/dist/src/modules/shop/view/ProductDetailView/ProductDetailView.js +56 -0
- package/dist/src/modules/shop/view/ProductDetailView/index.js +2 -0
- package/dist/src/modules/shop/view/ShopView.d.ts +3 -3
- package/dist/src/modules/shop/view/ShopView.js +182 -0
- package/dist/src/modules/shop/view/components/BrowseCard/BrowseCard.d.ts +54 -8
- package/dist/src/modules/shop/view/components/BrowseCard/BrowseCard.js +23 -0
- package/dist/src/modules/shop/view/components/BrowseCard/index.js +2 -0
- package/dist/src/modules/shop/view/components/ProductSummaryCard/ProductSummaryCard.d.ts +53 -7
- package/dist/src/modules/shop/view/components/ProductSummaryCard/ProductSummaryCard.js +26 -0
- package/dist/src/modules/shop/view/components/ProductSummaryCard/index.js +1 -0
- package/dist/src/modules/shop/view/components/ShopPromoView/ShopPromoView.d.ts +1 -2
- package/dist/src/modules/shop/view/components/ShopPromoView/ShopPromoView.js +19 -0
- package/dist/src/modules/shop/view/components/ShopPromoView/index.js +1 -0
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.d.ts +6 -4
- package/dist/src/modules/shop/view/components/ShopSection/ShopSection.js +61 -0
- package/dist/src/modules/shop/view/components/ShopSection/ShopSectionItem.d.ts +18 -0
- package/dist/src/modules/shop/view/components/ShopSection/ShopSectionItem.js +22 -0
- package/dist/src/modules/shop/view/components/ShopSection/index.js +1 -0
- package/dist/src/modules/shop/view/index.js +2 -0
- package/dist/src/modules/shop/view-model/ShopViewModel.ShopPolling.js +111 -0
- package/dist/src/modules/shop/view-model/ShopViewModel.js +353 -0
- package/dist/src/modules/stats/interfaces/IStats.js +1 -0
- package/dist/src/modules/stats/mocks.js +746 -0
- package/dist/src/modules/stats/utils/driveSummaryUtils.js +48 -0
- package/dist/src/modules/stats/utils/renderTeamStatistic.d.ts +1 -2
- package/dist/src/modules/stats/utils/renderTeamStatistic.js +16 -0
- package/dist/src/modules/stats/utils.js +62 -0
- package/dist/src/modules/stats/view/ActiveAthletes/ActiveAthletes.d.ts +2 -2
- package/dist/src/modules/stats/view/ActiveAthletes/ActiveAthletes.js +98 -0
- package/dist/src/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.d.ts +1 -2
- package/dist/src/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.js +27 -0
- package/dist/src/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.d.ts +1 -1
- package/dist/src/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.js +89 -0
- package/dist/src/modules/stats/view/ActiveAthletes/index.js +2 -0
- package/dist/src/modules/stats/view/DriveSummary/DrivePlayCard.d.ts +53 -7
- package/dist/src/modules/stats/view/DriveSummary/DrivePlayCard.js +70 -0
- package/dist/src/modules/stats/view/DriveSummary/DriveSummary.d.ts +1 -1
- package/dist/src/modules/stats/view/DriveSummary/DriveSummary.js +87 -0
- package/dist/src/modules/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.d.ts +1 -1
- package/dist/src/modules/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.js +129 -0
- package/dist/src/modules/stats/view/DriveSummary/Header/DriveSummaryHeader.d.ts +1 -2
- package/dist/src/modules/stats/view/DriveSummary/Header/DriveSummaryHeader.js +26 -0
- package/dist/src/modules/stats/view/DriveSummary/MainStat/MainStat.d.ts +1 -2
- package/dist/src/modules/stats/view/DriveSummary/MainStat/MainStat.js +24 -0
- package/dist/src/modules/stats/view/DriveSummary/index.js +2 -0
- package/dist/src/modules/stats/view/GameLeaders/GameLeaders.d.ts +5 -4
- package/dist/src/modules/stats/view/GameLeaders/GameLeaders.js +48 -0
- package/dist/src/modules/stats/view/GameLeaders/index.js +2 -0
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/DonutChart.d.ts +2 -2
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/DonutChart.js +55 -0
- package/dist/src/modules/stats/view/MatchPredictor/DonutChart/index.js +1 -0
- package/dist/src/modules/stats/view/MatchPredictor/MatchPredictorView.d.ts +53 -7
- package/dist/src/modules/stats/view/MatchPredictor/MatchPredictorView.js +60 -0
- package/dist/src/modules/stats/view/MatchPredictor/index.js +2 -0
- package/dist/src/modules/stats/view/Penalties/Penalties.d.ts +1 -2
- package/dist/src/modules/stats/view/Penalties/Penalties.js +6 -0
- package/dist/src/modules/stats/view/Penalties/index.js +2 -0
- package/dist/src/modules/stats/view/RecentGames/RecentGames.d.ts +53 -7
- package/dist/src/modules/stats/view/RecentGames/RecentGames.js +23 -0
- package/dist/src/modules/stats/view/RecentGames/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.d.ts +1 -1
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.js +121 -0
- package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/ScoreItem.d.ts +53 -7
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/ScoreItem.js +62 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/ScoresSection.d.ts +1 -2
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/ScoresSection.js +23 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/index.js +2 -0
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.d.ts +2 -2
- package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.js +106 -0
- package/dist/src/modules/stats/view/ScoringSummary/index.js +2 -0
- package/dist/src/modules/stats/view/StatsItemView.d.ts +6 -5
- package/dist/src/modules/stats/view/StatsItemView.js +92 -0
- package/dist/src/modules/stats/view/StatsQRCode/StatsQRCodeView.d.ts +53 -7
- package/dist/src/modules/stats/view/StatsQRCode/StatsQRCodeView.js +36 -0
- package/dist/src/modules/stats/view/StatsQRCode/index.js +1 -0
- package/dist/src/modules/stats/view/StatsView.d.ts +3 -3
- package/dist/src/modules/stats/view/StatsView.js +137 -0
- package/dist/src/modules/stats/view/TeamStats/TeamStatsView.d.ts +53 -7
- package/dist/src/modules/stats/view/TeamStats/TeamStatsView.js +43 -0
- package/dist/src/modules/stats/view/TeamStats/index.js +1 -0
- package/dist/src/modules/stats/view/Teams/StatsCarousel.d.ts +2 -2
- package/dist/src/modules/stats/view/Teams/StatsCarousel.js +83 -0
- package/dist/src/modules/stats/view/Teams/StatsProgressBar.d.ts +1 -2
- package/dist/src/modules/stats/view/Teams/StatsProgressBar.js +19 -0
- package/dist/src/modules/stats/view/Teams/Teams.d.ts +53 -7
- package/dist/src/modules/stats/view/Teams/Teams.js +43 -0
- package/dist/src/modules/stats/view/Teams/index.js +2 -0
- package/dist/src/modules/stats/view/WinProbability/WinProbability.d.ts +53 -7
- package/dist/src/modules/stats/view/WinProbability/WinProbability.js +28 -0
- package/dist/src/modules/stats/view/WinProbability/index.js +2 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/AthletesStatistics.d.ts +53 -7
- package/dist/src/modules/stats/view/components/AthletesStatistics/AthletesStatistics.js +89 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/StatisticTable.d.ts +1 -2
- package/dist/src/modules/stats/view/components/AthletesStatistics/StatisticTable.js +12 -0
- package/dist/src/modules/stats/view/components/AthletesStatistics/index.js +2 -0
- package/dist/src/modules/stats/view/index.js +2 -0
- package/dist/src/modules/stats/view-model/StatsViewModel.js +966 -0
- package/dist/src/sentry.js +31 -0
- package/dist/src/services/AnalyticsService/AnalyticsService.d.ts +12 -7
- package/dist/src/services/AnalyticsService/AnalyticsService.js +402 -0
- package/dist/src/services/AnalyticsService/types.js +1 -0
- package/dist/src/services/BetsService.js +122 -0
- package/dist/src/services/FantasyService.js +92 -0
- package/dist/src/services/GlobalService/GlobalService.d.ts +9 -0
- package/dist/src/services/GlobalService/PageService.d.ts +9 -0
- package/dist/src/services/GlobalService/index.d.ts +2 -0
- package/dist/src/services/GlobalService/mocks.d.ts +2 -0
- package/dist/src/services/GlobalService/types.d.ts +11 -0
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.d.ts +1 -2
- package/dist/src/services/InsightsService/InsightsPayloadBuilder.js +386 -0
- package/dist/src/services/InsightsService/InsightsService.js +74 -0
- package/dist/src/services/NetworkManager/NetworkManager.js +457 -0
- package/dist/src/services/NetworkManager/NetworkManagerFactory.js +101 -0
- package/dist/src/services/NetworkManager/errors.js +45 -0
- package/dist/src/services/NetworkManager/types.js +10 -0
- package/dist/src/services/PageService/PageService.d.ts +9 -0
- package/dist/src/services/PageService/PageService.js +39 -0
- package/dist/src/services/PageService/index.d.ts +2 -0
- package/dist/src/services/PageService/index.js +2 -0
- package/dist/src/services/PageService/mocks.d.ts +2 -0
- package/dist/src/services/PageService/mocks.js +104 -0
- package/dist/src/services/PageService/types.d.ts +76 -0
- package/dist/src/services/PageService/types.js +1 -0
- package/dist/src/services/ShopService.js +46 -0
- package/dist/src/services/StaticService/PageService.d.ts +9 -0
- package/dist/src/services/StaticService/StaticService.d.ts +3 -1
- package/dist/src/services/StaticService/StaticService.js +59 -0
- package/dist/src/services/StaticService/index.js +2 -0
- package/dist/src/services/StaticService/mocks.js +104 -0
- package/dist/src/services/StaticService/types.js +1 -0
- package/dist/src/services/StatsService.js +136 -0
- package/dist/src/services/ThemeManager/constants.js +47 -0
- package/dist/src/services/UserSettingsManager.js +155 -0
- package/dist/src/test-polyfills.js +15 -0
- package/dist/src/types/OverlayTypes.js +4 -0
- package/dist/src/view-models/MaestroEventViewModel.d.ts +0 -2
- package/dist/src/view-models/MaestroEventViewModel.js +280 -0
- package/dist/src/view-models/OverlayViewModel.js +222 -0
- package/dist/src/view-models/PanelManagerViewModel.js +212 -0
- package/dist/src/view-models/ViewModel.js +32 -0
- package/package.json +13 -9
|
@@ -7,7 +7,7 @@ type RecentGamesProps = {
|
|
|
7
7
|
item: RecentGamesStatsItem;
|
|
8
8
|
};
|
|
9
9
|
declare const _default: {
|
|
10
|
-
new (props
|
|
10
|
+
new (props: (RecentGamesProps & WithFocusableProps) | Readonly<RecentGamesProps & WithFocusableProps>): {
|
|
11
11
|
state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
12
12
|
navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
|
|
13
13
|
getChildContext(): {
|
|
@@ -27,20 +27,65 @@ declare const _default: {
|
|
|
27
27
|
componentDidMount(): void;
|
|
28
28
|
componentDidUpdate(): void;
|
|
29
29
|
componentWillUnmount(): void;
|
|
30
|
-
render(): React.ReactElement<RecentGamesProps & WithFocusableProps
|
|
31
|
-
setState<K extends keyof import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>(state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | ((prevState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, props: RecentGamesProps & WithFocusableProps) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>, callback?: (() => any) | undefined): void;
|
|
32
|
-
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
33
|
-
props: Readonly<{
|
|
34
|
-
children?: React.ReactNode;
|
|
35
|
-
}> & Readonly<RecentGamesProps & WithFocusableProps>;
|
|
30
|
+
render(): React.ReactElement<RecentGamesProps & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
36
31
|
context: any;
|
|
32
|
+
setState<K extends keyof import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>(state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | ((prevState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, props: Readonly<RecentGamesProps & WithFocusableProps>) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
33
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
34
|
+
readonly props: Readonly<RecentGamesProps & WithFocusableProps> & Readonly<{
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}>;
|
|
37
37
|
refs: {
|
|
38
38
|
[key: string]: React.ReactInstance;
|
|
39
39
|
};
|
|
40
|
+
shouldComponentUpdate?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
41
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
42
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<RecentGamesProps & WithFocusableProps>, prevState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
40
43
|
componentWillMount?(): void;
|
|
44
|
+
UNSAFE_componentWillMount?(): void;
|
|
41
45
|
componentWillReceiveProps?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextContext: any): void;
|
|
46
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextContext: any): void;
|
|
47
|
+
componentWillUpdate?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
48
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
49
|
+
};
|
|
50
|
+
new (props: RecentGamesProps & WithFocusableProps, context: any): {
|
|
51
|
+
state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
52
|
+
navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
|
|
53
|
+
getChildContext(): {
|
|
54
|
+
parentFocusKey: string;
|
|
55
|
+
};
|
|
56
|
+
setFocus: (focusKey: string) => void;
|
|
57
|
+
navigateByDirection: (direction: import("../../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
58
|
+
stealFocus: () => void;
|
|
59
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
60
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
61
|
+
onEnterPressHandler: (details: import("../../../../external/spatial-navigation/utils").Details) => void;
|
|
62
|
+
onEnterReleaseHandler: () => void;
|
|
63
|
+
onBackPressHandler: (details: import("../../../../external/spatial-navigation/utils").Details) => void;
|
|
64
|
+
onArrowPressHandler: (direction: import("../../../../external/spatial-navigation/utils").Direction, details: import("../../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
65
|
+
onBecameFocusedHandler: (layout: import("../../../../external/spatial-navigation/utils").Layout, details: import("../../../../external/spatial-navigation/utils").Details) => void;
|
|
66
|
+
onBecameBlurredHandler: (layout: import("../../../../external/spatial-navigation/utils").Layout, details: import("../../../../external/spatial-navigation/utils").Details) => void;
|
|
67
|
+
componentDidMount(): void;
|
|
68
|
+
componentDidUpdate(): void;
|
|
69
|
+
componentWillUnmount(): void;
|
|
70
|
+
render(): React.ReactElement<RecentGamesProps & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
71
|
+
context: any;
|
|
72
|
+
setState<K extends keyof import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>(state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | ((prevState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, props: Readonly<RecentGamesProps & WithFocusableProps>) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
73
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
74
|
+
readonly props: Readonly<RecentGamesProps & WithFocusableProps> & Readonly<{
|
|
75
|
+
children?: React.ReactNode;
|
|
76
|
+
}>;
|
|
77
|
+
refs: {
|
|
78
|
+
[key: string]: React.ReactInstance;
|
|
79
|
+
};
|
|
42
80
|
shouldComponentUpdate?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
81
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
82
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<RecentGamesProps & WithFocusableProps>, prevState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
83
|
+
componentWillMount?(): void;
|
|
84
|
+
UNSAFE_componentWillMount?(): void;
|
|
85
|
+
componentWillReceiveProps?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextContext: any): void;
|
|
86
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextContext: any): void;
|
|
43
87
|
componentWillUpdate?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
88
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
44
89
|
};
|
|
45
90
|
contextTypes: {
|
|
46
91
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
@@ -48,5 +93,6 @@ declare const _default: {
|
|
|
48
93
|
childContextTypes: {
|
|
49
94
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
50
95
|
};
|
|
96
|
+
contextType?: React.Context<any> | undefined;
|
|
51
97
|
};
|
|
52
98
|
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { withFocusable, } from '@/external/spatial-navigation';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './RecentGames.styles.css';
|
|
4
|
+
import Image from '@/components/atoms/Image';
|
|
5
|
+
const RecentGames = (props) => {
|
|
6
|
+
const item = props.item;
|
|
7
|
+
return (React.createElement("section", { className: "recent-games focus-ring", "data-focused": props.focused },
|
|
8
|
+
React.createElement("h5", { className: "T05_ALT" }, "Recent Games"),
|
|
9
|
+
React.createElement("div", { className: "recent-games-teams" }, [item.awayTeam, item.homeTeam].map((team, index) => (React.createElement("div", { className: "team-container", key: team.name || team.logo || index },
|
|
10
|
+
React.createElement(Image, { src: team.logo, alt: team.name || '', crossOrigin: "anonymous" }),
|
|
11
|
+
React.createElement("span", { className: "T05_ALT" }, team.name))))),
|
|
12
|
+
React.createElement("div", { className: "recent-games-list-group" }, [item.awayTeam, item.homeTeam].map((team, index) => (React.createElement("div", { className: "recent-games-list", key: team.name || team.logo || index }, team.events.map((event) => (React.createElement("div", { className: "recent-game-item T10", key: event.teamLogo +
|
|
13
|
+
event.score +
|
|
14
|
+
event.gameResult +
|
|
15
|
+
event.homeAway },
|
|
16
|
+
React.createElement("div", { className: "recent-game-item-team" },
|
|
17
|
+
React.createElement("span", null, event.homeAway === 'home' ? 'VS' : '@'),
|
|
18
|
+
React.createElement(Image, { src: event.teamLogo, alt: `${team.name} event ${event.score}`, crossOrigin: "anonymous" })),
|
|
19
|
+
React.createElement("div", { className: "recent-game-item-result" },
|
|
20
|
+
React.createElement("span", { "data-result": event.gameResult }, event.gameResult),
|
|
21
|
+
event.score))))))))));
|
|
22
|
+
};
|
|
23
|
+
export default withFocusable()(RecentGames);
|
|
@@ -25,6 +25,6 @@ declare class ExpandedScores extends React.Component<Props> {
|
|
|
25
25
|
updateMaxHeight(sectionIndex: number, scoreFocusedIndex: number): void;
|
|
26
26
|
scrollToElement(focusedIndex: number): void;
|
|
27
27
|
onBecameFocused: (sectionIndex: number, scoreFocusedIndex: number) => () => void;
|
|
28
|
-
render():
|
|
28
|
+
render(): JSX.Element;
|
|
29
29
|
}
|
|
30
30
|
export default ExpandedScores;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ScoreItem from '../ScoreItem';
|
|
3
|
+
import './ExpandedScores.styles.css';
|
|
4
|
+
import { withFocusable, } from '@/external/spatial-navigation';
|
|
5
|
+
const NoScoresComponent = (props) => (React.createElement("div", { className: "no-scores T10 focus-ring", "data-focused": props.focused }, props.children));
|
|
6
|
+
const NoScores = withFocusable()(NoScoresComponent);
|
|
7
|
+
const SECTION_TITLE_HEIGHT = 60;
|
|
8
|
+
const MAX_SCORES_PER_SECTION = 10;
|
|
9
|
+
class ExpandedScores extends React.Component {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
Object.defineProperty(this, "refsArray", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: []
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(this, "titleRefsArray", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: []
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(this, "wrapperRef", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value: null
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(this, "state", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: {
|
|
35
|
+
maxHeight: '0',
|
|
36
|
+
scrolled: false,
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(this, "onBecameFocused", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
writable: true,
|
|
43
|
+
value: (sectionIndex, scoreFocusedIndex) => () => {
|
|
44
|
+
this.updateMaxHeight(sectionIndex, scoreFocusedIndex);
|
|
45
|
+
// set timeout to account for max-height animation transition
|
|
46
|
+
if (this.wrapperRef) {
|
|
47
|
+
const handleTransitionEnd = () => {
|
|
48
|
+
this.scrollToElement(scoreFocusedIndex);
|
|
49
|
+
this.wrapperRef?.removeEventListener('transitionend', handleTransitionEnd);
|
|
50
|
+
this.titleRefsArray.forEach((ref, i) => {
|
|
51
|
+
ref.dataset.sectionFocused = String(i === sectionIndex);
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
this.wrapperRef.addEventListener('transitionend', handleTransitionEnd);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
updateMaxHeight(sectionIndex, scoreFocusedIndex) {
|
|
60
|
+
const items = this.refsArray.slice(scoreFocusedIndex);
|
|
61
|
+
const itemsMaxHeight = items.reduce((prev, curr) => {
|
|
62
|
+
if (!curr) {
|
|
63
|
+
return prev;
|
|
64
|
+
}
|
|
65
|
+
return prev + curr.clientHeight;
|
|
66
|
+
}, 0);
|
|
67
|
+
const titles = this.titleRefsArray.slice(sectionIndex);
|
|
68
|
+
const titlesHeight = titles.reduce((prev, curr) => {
|
|
69
|
+
if (!curr) {
|
|
70
|
+
return prev;
|
|
71
|
+
}
|
|
72
|
+
return prev + curr.clientHeight;
|
|
73
|
+
}, 0);
|
|
74
|
+
const totalMaxHeight = itemsMaxHeight + titlesHeight;
|
|
75
|
+
this.setState({ maxHeight: `${totalMaxHeight}px` });
|
|
76
|
+
}
|
|
77
|
+
scrollToElement(focusedIndex) {
|
|
78
|
+
const element = this.refsArray[focusedIndex];
|
|
79
|
+
if (!element) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (this.wrapperRef) {
|
|
83
|
+
const wrapperRect = this.wrapperRef.getBoundingClientRect();
|
|
84
|
+
const elementRect = element.getBoundingClientRect();
|
|
85
|
+
const scrollTop = elementRect.top -
|
|
86
|
+
wrapperRect.top +
|
|
87
|
+
this.wrapperRef.scrollTop -
|
|
88
|
+
SECTION_TITLE_HEIGHT;
|
|
89
|
+
this.wrapperRef.scrollTo({
|
|
90
|
+
top: scrollTop,
|
|
91
|
+
behavior: 'smooth',
|
|
92
|
+
});
|
|
93
|
+
const hasScrolled = scrollTop > SECTION_TITLE_HEIGHT;
|
|
94
|
+
if (hasScrolled !== this.state.scrolled) {
|
|
95
|
+
this.setState({ scrolled: hasScrolled });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
render() {
|
|
100
|
+
const { onArrowPress, onBackPress, onEnterPress } = this.props;
|
|
101
|
+
return (React.createElement("div", { className: "expanded-scores", style: {
|
|
102
|
+
maxHeight: this.state.maxHeight,
|
|
103
|
+
}, ref: (ref) => {
|
|
104
|
+
this.wrapperRef = ref;
|
|
105
|
+
}, "data-scrolled": this.state.scrolled }, this.props.item.map((item, i) => (React.createElement("div", { key: item.title, className: "expanded-score" },
|
|
106
|
+
React.createElement("div", { className: "title T05_ALT", ref: (ref) => {
|
|
107
|
+
this.titleRefsArray[i] = ref;
|
|
108
|
+
} }, item.title),
|
|
109
|
+
!item.scores.length ? (React.createElement("div", { ref: (ref) => {
|
|
110
|
+
this.refsArray[i * MAX_SCORES_PER_SECTION] = ref;
|
|
111
|
+
}, className: "score-item-wrapper" },
|
|
112
|
+
React.createElement(NoScores, { focusKey: `expanded-${this.props.type}-${i}-0`, parentFocusKey: this.props.parentFocusKey, onBackPress: onBackPress, onEnterPress: onEnterPress, onBecameFocused: this.onBecameFocused(i, i * MAX_SCORES_PER_SECTION), onArrowPress: onArrowPress({ index: i, scoreIndex: 0 }) }, this.props.noScoresText))) : (item.scores.map((score, scoreIndex) => (React.createElement("div", { ref: (ref) => {
|
|
113
|
+
this.refsArray[scoreIndex + i * MAX_SCORES_PER_SECTION] = ref;
|
|
114
|
+
}, key: score.description, className: "score-item-wrapper" },
|
|
115
|
+
React.createElement(ScoreItem, { key: score.description, item: score, focusKey: `expanded-${this.props.type}-${i}-${scoreIndex}`, parentFocusKey: this.props.parentFocusKey, onArrowPress: onArrowPress({
|
|
116
|
+
index: i,
|
|
117
|
+
scoreIndex,
|
|
118
|
+
}), onBackPress: onBackPress, onBecameFocused: this.onBecameFocused(i, scoreIndex + i * MAX_SCORES_PER_SECTION), onEnterPress: onEnterPress }))))))))));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
export default ExpandedScores;
|
|
@@ -7,7 +7,7 @@ type Props = {
|
|
|
7
7
|
item: IScoreItem;
|
|
8
8
|
};
|
|
9
9
|
declare const _default: {
|
|
10
|
-
new (props
|
|
10
|
+
new (props: (Props & WithFocusableProps) | Readonly<Props & WithFocusableProps>): {
|
|
11
11
|
state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
12
12
|
navigation: import("../../../../../external/spatial-navigation/spatialNavigation").default;
|
|
13
13
|
getChildContext(): {
|
|
@@ -27,20 +27,65 @@ declare const _default: {
|
|
|
27
27
|
componentDidMount(): void;
|
|
28
28
|
componentDidUpdate(): void;
|
|
29
29
|
componentWillUnmount(): void;
|
|
30
|
-
render(): React.ReactElement<Props & WithFocusableProps
|
|
31
|
-
setState<K extends keyof import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>(state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState | ((prevState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, props: Props & WithFocusableProps) => import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>) | Pick<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>, callback?: (() => any) | undefined): void;
|
|
32
|
-
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
33
|
-
props: Readonly<{
|
|
34
|
-
children?: React.ReactNode;
|
|
35
|
-
}> & Readonly<Props & WithFocusableProps>;
|
|
30
|
+
render(): React.ReactElement<Props & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
36
31
|
context: any;
|
|
32
|
+
setState<K extends keyof import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>(state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState | ((prevState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, props: Readonly<Props & WithFocusableProps>) => import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
33
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
34
|
+
readonly props: Readonly<Props & WithFocusableProps> & Readonly<{
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}>;
|
|
37
37
|
refs: {
|
|
38
38
|
[key: string]: React.ReactInstance;
|
|
39
39
|
};
|
|
40
|
+
shouldComponentUpdate?(nextProps: Readonly<Props & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
41
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
42
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Props & WithFocusableProps>, prevState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
40
43
|
componentWillMount?(): void;
|
|
44
|
+
UNSAFE_componentWillMount?(): void;
|
|
41
45
|
componentWillReceiveProps?(nextProps: Readonly<Props & WithFocusableProps>, nextContext: any): void;
|
|
46
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props & WithFocusableProps>, nextContext: any): void;
|
|
47
|
+
componentWillUpdate?(nextProps: Readonly<Props & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
48
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
49
|
+
};
|
|
50
|
+
new (props: Props & WithFocusableProps, context: any): {
|
|
51
|
+
state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
52
|
+
navigation: import("../../../../../external/spatial-navigation/spatialNavigation").default;
|
|
53
|
+
getChildContext(): {
|
|
54
|
+
parentFocusKey: string;
|
|
55
|
+
};
|
|
56
|
+
setFocus: (focusKey: string) => void;
|
|
57
|
+
navigateByDirection: (direction: import("../../../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
58
|
+
stealFocus: () => void;
|
|
59
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
60
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
61
|
+
onEnterPressHandler: (details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
62
|
+
onEnterReleaseHandler: () => void;
|
|
63
|
+
onBackPressHandler: (details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
64
|
+
onArrowPressHandler: (direction: import("../../../../../external/spatial-navigation/utils").Direction, details: import("../../../../../external/spatial-navigation/utils").Details) => boolean | void;
|
|
65
|
+
onBecameFocusedHandler: (layout: import("../../../../../external/spatial-navigation/utils").Layout, details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
66
|
+
onBecameBlurredHandler: (layout: import("../../../../../external/spatial-navigation/utils").Layout, details: import("../../../../../external/spatial-navigation/utils").Details) => void;
|
|
67
|
+
componentDidMount(): void;
|
|
68
|
+
componentDidUpdate(): void;
|
|
69
|
+
componentWillUnmount(): void;
|
|
70
|
+
render(): React.ReactElement<Props & WithFocusableProps, string | React.JSXElementConstructor<any>>;
|
|
71
|
+
context: any;
|
|
72
|
+
setState<K extends keyof import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>(state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState | ((prevState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, props: Readonly<Props & WithFocusableProps>) => import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null) | Pick<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState, K> | null, callback?: (() => void) | undefined): void;
|
|
73
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
74
|
+
readonly props: Readonly<Props & WithFocusableProps> & Readonly<{
|
|
75
|
+
children?: React.ReactNode;
|
|
76
|
+
}>;
|
|
77
|
+
refs: {
|
|
78
|
+
[key: string]: React.ReactInstance;
|
|
79
|
+
};
|
|
42
80
|
shouldComponentUpdate?(nextProps: Readonly<Props & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
81
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
82
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Props & WithFocusableProps>, prevState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>): any;
|
|
83
|
+
componentWillMount?(): void;
|
|
84
|
+
UNSAFE_componentWillMount?(): void;
|
|
85
|
+
componentWillReceiveProps?(nextProps: Readonly<Props & WithFocusableProps>, nextContext: any): void;
|
|
86
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props & WithFocusableProps>, nextContext: any): void;
|
|
43
87
|
componentWillUpdate?(nextProps: Readonly<Props & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
88
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
44
89
|
};
|
|
45
90
|
contextTypes: {
|
|
46
91
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
@@ -48,5 +93,6 @@ declare const _default: {
|
|
|
48
93
|
childContextTypes: {
|
|
49
94
|
parentFocusKey: import("prop-types").Requireable<string>;
|
|
50
95
|
};
|
|
96
|
+
contextType?: React.Context<any> | undefined;
|
|
51
97
|
};
|
|
52
98
|
export default _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { withFocusable, } from '@/external/spatial-navigation';
|
|
3
|
+
import Image from '@/components/atoms/Image';
|
|
4
|
+
import './ScoreItem.styles.css';
|
|
5
|
+
import { BASE_64_KEY_PLAY_THUMBNAIL_FALLBACK } from '@/modules/key-plays/constants';
|
|
6
|
+
class ScoreItem extends React.Component {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
Object.defineProperty(this, "mounted", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(this, "onLoad", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true,
|
|
19
|
+
value: () => {
|
|
20
|
+
if (!this.mounted)
|
|
21
|
+
return;
|
|
22
|
+
this.setState({ imageLoaded: true });
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(this, "renderImage", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: () => {
|
|
30
|
+
return (React.createElement("div", { className: "image-wrapper" },
|
|
31
|
+
!this.state.imageLoaded && (React.createElement(Image, { src: BASE_64_KEY_PLAY_THUMBNAIL_FALLBACK, crossOrigin: "anonymous", alt: "Player Headshot Loading" })),
|
|
32
|
+
this.props.item.athleteThumbnail && (React.createElement(Image, { src: this.props.item.athleteThumbnail, crossOrigin: "anonymous", onLoad: this.onLoad, alt: "Athlete Thumbnail", style: {
|
|
33
|
+
display: this.state.imageLoaded ? 'block' : 'none',
|
|
34
|
+
} })),
|
|
35
|
+
React.createElement("div", { className: "athlete-position-badge T02" },
|
|
36
|
+
' ',
|
|
37
|
+
React.createElement("span", null, this.props.item.athletePosition))));
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
this.state = {
|
|
41
|
+
imageLoaded: false,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
componentWillUnmount() {
|
|
45
|
+
this.mounted = false;
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
return (React.createElement("div", { className: "score-item focus-ring", "data-focused": this.props.focused },
|
|
49
|
+
React.createElement("div", { className: "content-wrapper" },
|
|
50
|
+
this.renderImage(),
|
|
51
|
+
React.createElement("div", { className: "content-info T02" },
|
|
52
|
+
React.createElement("div", { className: "time" },
|
|
53
|
+
React.createElement("span", { className: "T10" }, this.props.item.clock),
|
|
54
|
+
React.createElement("div", null, this.props.item.teamName)),
|
|
55
|
+
React.createElement("div", { className: "description T05_ALT" },
|
|
56
|
+
React.createElement("span", null, this.props.item.athleteNumber),
|
|
57
|
+
React.createElement("span", { className: "name" }, this.props.item.athleteName),
|
|
58
|
+
React.createElement("span", null, this.props.item.athleteAssists)),
|
|
59
|
+
React.createElement("div", { className: "assist" }, this.props.item.description)))));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export default withFocusable()(ScoreItem);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IScoreSection } from '@/modules/stats/view-model/StatsViewModel';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import './ScoresSection.styles.css';
|
|
4
3
|
declare const ScoresSection: (props: IScoreSection & {
|
|
5
4
|
noScoresText: string;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => JSX.Element;
|
|
7
6
|
export default ScoresSection;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Image from '@/components/atoms/Image';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './ScoresSection.styles.css';
|
|
4
|
+
import { slugify } from '@/helpers/strings';
|
|
5
|
+
const ScoresSection = (props) => {
|
|
6
|
+
const renderItems = () => {
|
|
7
|
+
if (!props.scores.length) {
|
|
8
|
+
return React.createElement("div", { className: "T10 FONT_BOLD" }, props.noScoresText);
|
|
9
|
+
}
|
|
10
|
+
return props.scores.map((score) => (React.createElement("div", { key: slugify(score.description), className: "scoring-row FONT_BOLD" },
|
|
11
|
+
React.createElement("div", { className: "clock T10" }, score.clock),
|
|
12
|
+
React.createElement(Image, { src: score.teamLogo, className: score.teamName + '-logo', width: 48, height: 48 }),
|
|
13
|
+
React.createElement("div", { className: "athlete-info T05_ALT" },
|
|
14
|
+
React.createElement("div", { className: "athlete-number" }, score.athleteNumber),
|
|
15
|
+
React.createElement("div", { className: "athlete-name" }, score.athleteName),
|
|
16
|
+
React.createElement("div", { className: "athlete-assists" }, score.athleteAssists)))));
|
|
17
|
+
};
|
|
18
|
+
return (React.createElement("div", { key: props.title, className: "scoring-section" },
|
|
19
|
+
React.createElement("span", { className: "T05_ALT" }, props.title),
|
|
20
|
+
React.createElement("div", { className: "divider" }),
|
|
21
|
+
renderItems()));
|
|
22
|
+
};
|
|
23
|
+
export default ScoresSection;
|
|
@@ -20,7 +20,7 @@ declare class ScoringSummary extends React.Component<ScoringSummaryProps, {
|
|
|
20
20
|
get cardFocusKey(): string;
|
|
21
21
|
onExpandedScoreBackPress: () => void;
|
|
22
22
|
onArrowPress: (d: Direction) => void;
|
|
23
|
-
renderContent():
|
|
24
|
-
render():
|
|
23
|
+
renderContent(): JSX.Element | JSX.Element[];
|
|
24
|
+
render(): JSX.Element;
|
|
25
25
|
}
|
|
26
26
|
export default ScoringSummary;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Icon from '@/components/atoms/SvgIcon';
|
|
3
|
+
import { withFocusable, } from '@/external/spatial-navigation';
|
|
4
|
+
import SDK from '@/index';
|
|
5
|
+
import './ScoringSummary.styles.css';
|
|
6
|
+
import ScoresSection from './ScoresSection';
|
|
7
|
+
import ExpandedScores from './ExpandedScores';
|
|
8
|
+
import { slugify } from '@/helpers/strings';
|
|
9
|
+
class ScoringSummary extends React.Component {
|
|
10
|
+
constructor(props) {
|
|
11
|
+
super(props);
|
|
12
|
+
Object.defineProperty(this, "onExpandedScoreArrowPress", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: (props) => (d) => {
|
|
17
|
+
const { index, scoreIndex } = props;
|
|
18
|
+
if (d === 'left') {
|
|
19
|
+
SDK.getMaestroEventViewModel().deliverFocus();
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
if (d === 'up' && index === 0 && scoreIndex === 0) {
|
|
23
|
+
SDK.getMaestroEventViewModel().navigation.setFocus(this.cardFocusKey);
|
|
24
|
+
this.setState({
|
|
25
|
+
expanded: false,
|
|
26
|
+
});
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const scoreSection = this.props.item.sections[index];
|
|
30
|
+
const allScores = scoreSection ? scoreSection.scores : [];
|
|
31
|
+
const allScoresLength = !allScores.length ? 1 : allScores.length;
|
|
32
|
+
if (d === 'down' &&
|
|
33
|
+
scoreIndex === allScoresLength - 1 &&
|
|
34
|
+
index === this.props.item.sections.length - 1) {
|
|
35
|
+
this.setState({
|
|
36
|
+
expanded: false,
|
|
37
|
+
}, () => {
|
|
38
|
+
SDK.getMaestroEventViewModel().navigation.navigateByDirection('down');
|
|
39
|
+
});
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(this, "onExpandedScoreBackPress", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
configurable: true,
|
|
48
|
+
writable: true,
|
|
49
|
+
value: () => {
|
|
50
|
+
this.setState({
|
|
51
|
+
expanded: false,
|
|
52
|
+
}, () => {
|
|
53
|
+
SDK.getMaestroEventViewModel().navigation.setFocus(this.cardFocusKey);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(this, "onArrowPress", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
configurable: true,
|
|
60
|
+
writable: true,
|
|
61
|
+
value: (d) => {
|
|
62
|
+
if (d === 'left') {
|
|
63
|
+
SDK.getMaestroEventViewModel().deliverFocus();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
this.state = {
|
|
68
|
+
expanded: false,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
onEnterPress() {
|
|
72
|
+
const newValue = !this.state.expanded;
|
|
73
|
+
this.setState({
|
|
74
|
+
expanded: newValue,
|
|
75
|
+
}, () => {
|
|
76
|
+
if (newValue) {
|
|
77
|
+
SDK.getMaestroEventViewModel().navigation.setFocus(`expanded-${this.props.item.type}-0-0`);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
this.props.onEnterPress();
|
|
81
|
+
}
|
|
82
|
+
get cardFocusKey() {
|
|
83
|
+
return slugify(this.props.item.title);
|
|
84
|
+
}
|
|
85
|
+
renderContent() {
|
|
86
|
+
const noScoresText = this.props.noScoresText || 'No Goals Scored';
|
|
87
|
+
if (!this.state.expanded) {
|
|
88
|
+
return this.props.item.sections.map((section) => (React.createElement(ScoresSection, { key: section.title, scores: section.scores, title: section.title, noScoresText: noScoresText })));
|
|
89
|
+
}
|
|
90
|
+
return (React.createElement(ExpandedScores, { item: this.props.item.sections, type: this.props.item.type, noScoresText: noScoresText, onArrowPress: this.onExpandedScoreArrowPress, onBackPress: this.onExpandedScoreBackPress, onEnterPress: this.props.onEnterPress, parentFocusKey: this.cardFocusKey }));
|
|
91
|
+
}
|
|
92
|
+
render() {
|
|
93
|
+
return (React.createElement(FocusableWrapper, { displayText: this.props.item.title, onEnterPress: this.onEnterPress.bind(this), onBecameFocused: this.props.onBecameFocused, onArrowPress: this.onArrowPress, expanded: this.state.expanded, focusKey: this.cardFocusKey }, this.renderContent()));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const Wrapper = (props) => {
|
|
97
|
+
return (React.createElement("section", { className: "scoring-summary focus-ring", "data-focused": props.focused },
|
|
98
|
+
React.createElement("div", { className: "header" },
|
|
99
|
+
React.createElement("h5", { className: "T05_ALT" }, props.displayText),
|
|
100
|
+
React.createElement("div", { className: "icon-container", "data-focused": props.focused },
|
|
101
|
+
React.createElement(Icon, { iconName: props.expanded ? 'collapse' : 'expand', height: 48, width: 48 }))),
|
|
102
|
+
props.expanded && React.createElement("div", { className: "divider" }),
|
|
103
|
+
props.children));
|
|
104
|
+
};
|
|
105
|
+
const FocusableWrapper = withFocusable()(Wrapper);
|
|
106
|
+
export default ScoringSummary;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="prop-types" />
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { StatsItem } from '../view-model/StatsViewModel';
|
|
3
4
|
import { Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
@@ -7,15 +8,15 @@ type Props = {
|
|
|
7
8
|
};
|
|
8
9
|
declare class StatsItemView extends React.Component<Props> {
|
|
9
10
|
static contextTypes: {
|
|
10
|
-
refsMap:
|
|
11
|
-
setRef:
|
|
12
|
-
scrollToFocusedElement:
|
|
11
|
+
refsMap: import("prop-types").Requireable<(HTMLElement | null | undefined)[]>;
|
|
12
|
+
setRef: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
13
|
+
scrollToFocusedElement: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
13
14
|
};
|
|
14
15
|
context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
|
|
15
16
|
onBecameFocused: (layout: Layout) => void;
|
|
16
17
|
onArrowPress: (d: Direction) => void;
|
|
17
18
|
onEnterPress: (item: StatsItem) => () => void;
|
|
18
|
-
renderItem():
|
|
19
|
-
render():
|
|
19
|
+
renderItem(): JSX.Element | null;
|
|
20
|
+
render(): JSX.Element;
|
|
20
21
|
}
|
|
21
22
|
export default StatsItemView;
|