@maestro_io/maestro-web-sdk 3.3.1 → 4.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/dist/f8820fca3a2a7957f753167da0884f9d.png +0 -0
  2. package/dist/maestro-web-sdk.esm.js +12 -12
  3. package/dist/maestro-web-sdk.esm.js.map +1 -1
  4. package/dist/maestro-web-sdk.umd.js +12 -12
  5. package/dist/maestro-web-sdk.umd.js.map +1 -1
  6. package/dist/package.json +87 -0
  7. package/dist/src/__mocks__/sentry.d.ts +4 -0
  8. package/dist/src/components/atoms/BaseButton/BaseButton.js +11 -0
  9. package/dist/src/components/atoms/BaseButton/index.js +2 -0
  10. package/dist/src/components/atoms/Image/index.js +34 -0
  11. package/dist/src/components/atoms/Rive/index.js +53 -0
  12. package/dist/src/components/atoms/SvgIcon/BetGeneralIcon.js +9 -0
  13. package/dist/src/components/atoms/SvgIcon/BetsIcon.js +11 -0
  14. package/dist/src/components/atoms/SvgIcon/BetsWarningIcon.js +11 -0
  15. package/dist/src/components/atoms/SvgIcon/CheckmarkIcon.js +6 -0
  16. package/dist/src/components/atoms/SvgIcon/CollapseIcon.js +6 -0
  17. package/dist/src/components/atoms/SvgIcon/ExpandIcon.js +6 -0
  18. package/dist/src/components/atoms/SvgIcon/FantasyIcon.js +15 -0
  19. package/dist/src/components/atoms/SvgIcon/FlameIcon.js +11 -0
  20. package/dist/src/components/atoms/SvgIcon/Icon.js +44 -0
  21. package/dist/src/components/atoms/SvgIcon/KeyPlaysIcon.js +10 -0
  22. package/dist/src/components/atoms/SvgIcon/MobilePhoneIcon.js +11 -0
  23. package/dist/src/components/atoms/SvgIcon/PlayIcon.js +8 -0
  24. package/dist/src/components/atoms/SvgIcon/ShopIcon.js +7 -0
  25. package/dist/src/components/atoms/SvgIcon/StatsIcon.js +12 -0
  26. package/dist/src/components/atoms/SvgIcon/TimesIcon.js +6 -0
  27. package/dist/src/components/atoms/SvgIcon/WarningIcon.js +8 -0
  28. package/dist/src/components/atoms/SvgIcon/index.js +2 -0
  29. package/dist/src/components/core/App/App.js +35 -0
  30. package/dist/src/components/core/App/index.js +2 -0
  31. package/dist/src/components/core/OverlayContainer.js +58 -0
  32. package/dist/src/components/core/PanelManager/PanelManager.js +86 -0
  33. package/dist/src/components/core/PanelManager/index.js +2 -0
  34. package/dist/src/components/core/ScrollableContainer/FocusableItem.js +38 -0
  35. package/dist/src/components/core/ScrollableContainer/ScrollableContainer.js +168 -0
  36. package/dist/src/components/core/ScrollableContainer/index.js +2 -0
  37. package/dist/src/components/molecules/ActionButton/ActionButton.js +10 -0
  38. package/dist/src/components/molecules/ActionButton/index.js +2 -0
  39. package/dist/src/components/molecules/HeadshotImage/HeadshotImage.js +50 -0
  40. package/dist/src/components/molecules/HeadshotImage/index.js +2 -0
  41. package/dist/src/components/molecules/Overlay/Overlay.js +139 -0
  42. package/dist/src/components/molecules/Overlay/index.js +2 -0
  43. package/dist/src/components/molecules/PanelNavButton/PanelNavButton.js +27 -0
  44. package/dist/src/components/molecules/PanelNavButton/index.js +2 -0
  45. package/dist/src/components/molecules/SegmentButton/SegmentButton.js +10 -0
  46. package/dist/src/components/molecules/SegmentButton/index.js +2 -0
  47. package/dist/src/components/molecules/TabLoadError/TabLoadError.js +14 -0
  48. package/dist/src/components/molecules/TabLoadError/index.js +2 -0
  49. package/dist/src/components/molecules/WatchButton/WatchButton.js +15 -0
  50. package/dist/src/components/molecules/WatchButton/index.js +2 -0
  51. package/dist/src/components/organisms/PanelNavigation/PanelNavigation.js +60 -0
  52. package/dist/src/components/organisms/PanelNavigation/index.js +2 -0
  53. package/dist/src/components/organisms/SegmentController/SegmentController.js +76 -0
  54. package/dist/src/components/organisms/SegmentController/index.js +2 -0
  55. package/dist/src/development/MaestroEventDelegate.js +109 -0
  56. package/dist/src/development/TimeSeek.js +218 -0
  57. package/dist/src/development/development.js +33 -0
  58. package/dist/src/external/AxiosNetworkClient.js +110 -0
  59. package/dist/src/external/LocalStorageCacheManager.js +213 -0
  60. package/dist/src/external/ReactRenderer.js +53 -0
  61. package/dist/src/external/mocks/MockExternalNetworkClient.js +187 -0
  62. package/dist/src/external/ports/cacheManager.js +1 -0
  63. package/dist/src/external/ports/networkClient.js +1 -0
  64. package/dist/src/external/ports/renderer.d.ts +1 -2
  65. package/dist/src/external/ports/renderer.js +1 -0
  66. package/dist/src/external/spatial-navigation/__mocks__/withFocusable.d.ts +8 -0
  67. package/dist/src/external/spatial-navigation/__mocks__/withFocusable.js +7 -0
  68. package/dist/src/external/spatial-navigation/index.js +3 -0
  69. package/dist/src/external/spatial-navigation/measureLayout.js +30 -0
  70. package/dist/src/external/spatial-navigation/spatialNavigation.js +876 -0
  71. package/dist/src/external/spatial-navigation/utils.js +6 -0
  72. package/dist/src/external/spatial-navigation/visualDebugger.js +76 -0
  73. package/dist/src/external/spatial-navigation/withFocusable.js +245 -0
  74. package/dist/src/helpers/Observable.js +37 -0
  75. package/dist/src/helpers/strings.js +14 -0
  76. package/dist/src/helpers/url.js +12 -0
  77. package/dist/src/index.d.ts +5 -5
  78. package/dist/src/index.js +165 -0
  79. package/dist/src/interfaces/IMaestroEvent.d.ts +12 -0
  80. package/dist/src/interfaces/IMaestroEvent.js +18 -0
  81. package/dist/src/interfaces/IMaestroEventDelegate.js +1 -0
  82. package/dist/src/interfaces/IMaestroManager.js +1 -0
  83. package/dist/src/interfaces/IUserSettings.js +20 -0
  84. package/dist/src/models/IModel.js +1 -0
  85. package/dist/src/models/IPanel.js +40 -0
  86. package/dist/src/models/ITheme.js +20 -0
  87. package/dist/src/models/IWinningBet.js +1 -0
  88. package/dist/src/modules/bets/interfaces/IBets.js +1 -0
  89. package/dist/src/modules/bets/mocks.js +573 -0
  90. package/dist/src/modules/bets/types/BetsAnalyticsTypes.js +1 -0
  91. package/dist/src/modules/bets/view/BetsView.js +143 -0
  92. package/dist/src/modules/bets/view/HotProps/HotPropsView.js +150 -0
  93. package/dist/src/modules/bets/view/SixPack/SixPackView.js +110 -0
  94. package/dist/src/modules/bets/view/UserBets/BetResult/BetResult.js +6 -0
  95. package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCard.js +149 -0
  96. package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardEvent.js +34 -0
  97. package/dist/src/modules/bets/view/UserBets/BetsCard/BetsCardFooter.js +18 -0
  98. package/dist/src/modules/bets/view/UserBets/Boost/Boost.js +6 -0
  99. package/dist/src/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +9 -0
  100. package/dist/src/modules/bets/view/UserBets/Parlay/Parlay.js +13 -0
  101. package/dist/src/modules/bets/view/UserBets/Straight/Straight.js +6 -0
  102. package/dist/src/modules/bets/view/UserBets/Teaser/Teaser.js +13 -0
  103. package/dist/src/modules/bets/view/UserBets/UserBetsView.js +107 -0
  104. package/dist/src/modules/bets/view/components/Bet/Bet.js +32 -0
  105. package/dist/src/modules/bets/view/components/BetPill/BetPill.js +6 -0
  106. package/dist/src/modules/bets/view/components/BetsCard/BetsCard.js +15 -0
  107. package/dist/src/modules/bets/view/components/BetsCard/BetsCardHeader.js +20 -0
  108. package/dist/src/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +14 -0
  109. package/dist/src/modules/bets/view/components/LocationWarning/LocationWarning.js +16 -0
  110. package/dist/src/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +78 -0
  111. package/dist/src/modules/bets/view/components/PromoCodeBanner/index.js +1 -0
  112. package/dist/src/modules/bets/view-model/BetsViewModel.js +974 -0
  113. package/dist/src/modules/fantasy/components/ExpandedAthleteList/ExpandedAthletesList.js +107 -0
  114. package/dist/src/modules/fantasy/components/ExpandedAthleteList/index.js +1 -0
  115. package/dist/src/modules/fantasy/components/LeagueCard/LeagueCard.js +20 -0
  116. package/dist/src/modules/fantasy/components/LeagueCard/index.js +2 -0
  117. package/dist/src/modules/fantasy/components/TopPlayerCard/TopPlayerCard.js +29 -0
  118. package/dist/src/modules/fantasy/components/TopPlayerCard/index.js +2 -0
  119. package/dist/src/modules/fantasy/mocks.js +3682 -0
  120. package/dist/src/modules/fantasy/types.js +6 -0
  121. package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/ActiveAthletesMarquee.js +74 -0
  122. package/dist/src/modules/fantasy/view/ActiveAthletesMarquee/index.js +2 -0
  123. package/dist/src/modules/fantasy/view/ErrorBoundary.d.ts +13 -0
  124. package/dist/src/modules/fantasy/view/FantasyItemView.js +74 -0
  125. package/dist/src/modules/fantasy/view/FantasyView.js +133 -0
  126. package/dist/src/modules/fantasy/view/InactiveLeague/DraftDateCountdown.js +95 -0
  127. package/dist/src/modules/fantasy/view/InactiveLeague/InactiveLeague.js +13 -0
  128. package/dist/src/modules/fantasy/view/InactiveLeague/index.js +2 -0
  129. package/dist/src/modules/fantasy/view/LoginView/LoginView.js +27 -0
  130. package/dist/src/modules/fantasy/view/LoginView/index.js +2 -0
  131. package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/DoubleAthleteCard.js +25 -0
  132. package/dist/src/modules/fantasy/view/MatchupPair/DoubleAthleteCard/index.js +2 -0
  133. package/dist/src/modules/fantasy/view/MatchupPair/ExpandedDoubleAthleteCards.js +9 -0
  134. package/dist/src/modules/fantasy/view/MatchupPair/MatchupPair.js +118 -0
  135. package/dist/src/modules/fantasy/view/MatchupPair/index.js +2 -0
  136. package/dist/src/modules/fantasy/view/MatchupSingle/ExpandedSingleAthleteCards.js +9 -0
  137. package/dist/src/modules/fantasy/view/MatchupSingle/MatchupSingle.js +108 -0
  138. package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/SingleAthleteCard.js +18 -0
  139. package/dist/src/modules/fantasy/view/MatchupSingle/SingleAthleteCard/index.js +2 -0
  140. package/dist/src/modules/fantasy/view/MatchupSingle/index.js +2 -0
  141. package/dist/src/modules/fantasy/view/PromoView/PromoView.js +12 -0
  142. package/dist/src/modules/fantasy/view/PromoView/index.js +2 -0
  143. package/dist/src/modules/fantasy/view/index.js +2 -0
  144. package/dist/src/modules/fantasy/view-model/FantasyViewModel.FantasyPolling.js +132 -0
  145. package/dist/src/modules/fantasy/view-model/FantasyViewModel.LeagueManagerPolling.js +141 -0
  146. package/dist/src/modules/fantasy/view-model/FantasyViewModel.js +534 -0
  147. package/dist/src/modules/key-plays/constants.js +292 -0
  148. package/dist/src/modules/key-plays/interfaces/IKeyPlays.js +14 -0
  149. package/dist/src/modules/key-plays/interfaces/IKeyPlaysResponse.js +1 -0
  150. package/dist/src/modules/key-plays/view/KeyPlayCardScoreTagView.js +16 -0
  151. package/dist/src/modules/key-plays/view/KeyPlayCardView.js +144 -0
  152. package/dist/src/modules/key-plays/view/KeyPlayErrorStateView.js +65 -0
  153. package/dist/src/modules/key-plays/view/KeyPlaysView.js +151 -0
  154. package/dist/src/modules/key-plays/view-model/KeyPlaysViewModel.js +246 -0
  155. package/dist/src/modules/shop/mocks.js +390 -0
  156. package/dist/src/modules/shop/types.js +7 -0
  157. package/dist/src/modules/shop/view/ProductDetailView/ProductDetailView.js +56 -0
  158. package/dist/src/modules/shop/view/ProductDetailView/index.js +2 -0
  159. package/dist/src/modules/shop/view/ShopView.js +182 -0
  160. package/dist/src/modules/shop/view/components/BrowseCard/BrowseCard.js +23 -0
  161. package/dist/src/modules/shop/view/components/BrowseCard/index.js +2 -0
  162. package/dist/src/modules/shop/view/components/ProductSummaryCard/ProductSummaryCard.js +26 -0
  163. package/dist/src/modules/shop/view/components/ProductSummaryCard/index.js +1 -0
  164. package/dist/src/modules/shop/view/components/ShopPromoView/ShopPromoView.js +19 -0
  165. package/dist/src/modules/shop/view/components/ShopPromoView/index.js +1 -0
  166. package/dist/src/modules/shop/view/components/ShopSection/ShopSection.d.ts +1 -0
  167. package/dist/src/modules/shop/view/components/ShopSection/ShopSection.js +61 -0
  168. package/dist/src/modules/shop/view/components/ShopSection/ShopSectionItem.d.ts +18 -0
  169. package/dist/src/modules/shop/view/components/ShopSection/ShopSectionItem.js +22 -0
  170. package/dist/src/modules/shop/view/components/ShopSection/index.js +1 -0
  171. package/dist/src/modules/shop/view/index.js +2 -0
  172. package/dist/src/modules/shop/view-model/ShopViewModel.ShopPolling.js +111 -0
  173. package/dist/src/modules/shop/view-model/ShopViewModel.js +353 -0
  174. package/dist/src/modules/stats/interfaces/IStats.js +1 -0
  175. package/dist/src/modules/stats/mocks.js +746 -0
  176. package/dist/src/modules/stats/utils/driveSummaryUtils.js +48 -0
  177. package/dist/src/modules/stats/utils/renderTeamStatistic.js +16 -0
  178. package/dist/src/modules/stats/utils.js +62 -0
  179. package/dist/src/modules/stats/view/ActiveAthletes/ActiveAthletes.js +98 -0
  180. package/dist/src/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.js +27 -0
  181. package/dist/src/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.js +89 -0
  182. package/dist/src/modules/stats/view/ActiveAthletes/index.js +2 -0
  183. package/dist/src/modules/stats/view/DriveSummary/DrivePlayCard.js +70 -0
  184. package/dist/src/modules/stats/view/DriveSummary/DriveSummary.js +87 -0
  185. package/dist/src/modules/stats/view/DriveSummary/ExpandedItems/DriveSummaryExpanded.js +129 -0
  186. package/dist/src/modules/stats/view/DriveSummary/Header/DriveSummaryHeader.js +26 -0
  187. package/dist/src/modules/stats/view/DriveSummary/MainStat/MainStat.js +24 -0
  188. package/dist/src/modules/stats/view/DriveSummary/index.js +2 -0
  189. package/dist/src/modules/stats/view/GameLeaders/GameLeaders.js +48 -0
  190. package/dist/src/modules/stats/view/GameLeaders/index.js +2 -0
  191. package/dist/src/modules/stats/view/MatchPredictor/DonutChart/DonutChart.js +55 -0
  192. package/dist/src/modules/stats/view/MatchPredictor/DonutChart/index.js +1 -0
  193. package/dist/src/modules/stats/view/MatchPredictor/MatchPredictorView.js +60 -0
  194. package/dist/src/modules/stats/view/MatchPredictor/index.js +2 -0
  195. package/dist/src/modules/stats/view/Penalties/Penalties.js +6 -0
  196. package/dist/src/modules/stats/view/Penalties/index.js +2 -0
  197. package/dist/src/modules/stats/view/RecentGames/RecentGames.js +23 -0
  198. package/dist/src/modules/stats/view/RecentGames/index.js +2 -0
  199. package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/ExpandedScores.js +121 -0
  200. package/dist/src/modules/stats/view/ScoringSummary/ExpandedScores/index.js +2 -0
  201. package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/ScoreItem.js +62 -0
  202. package/dist/src/modules/stats/view/ScoringSummary/ScoreItem/index.js +2 -0
  203. package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/ScoresSection.js +23 -0
  204. package/dist/src/modules/stats/view/ScoringSummary/ScoresSection/index.js +2 -0
  205. package/dist/src/modules/stats/view/ScoringSummary/ScoringSummary.js +106 -0
  206. package/dist/src/modules/stats/view/ScoringSummary/index.js +2 -0
  207. package/dist/src/modules/stats/view/StatsItemView.js +92 -0
  208. package/dist/src/modules/stats/view/StatsQRCode/StatsQRCodeView.js +36 -0
  209. package/dist/src/modules/stats/view/StatsQRCode/index.js +1 -0
  210. package/dist/src/modules/stats/view/StatsView.js +137 -0
  211. package/dist/src/modules/stats/view/TeamStats/TeamStatsView.js +43 -0
  212. package/dist/src/modules/stats/view/TeamStats/index.js +1 -0
  213. package/dist/src/modules/stats/view/Teams/StatsCarousel.js +83 -0
  214. package/dist/src/modules/stats/view/Teams/StatsProgressBar.js +19 -0
  215. package/dist/src/modules/stats/view/Teams/Teams.js +27 -0
  216. package/dist/src/modules/stats/view/Teams/index.js +2 -0
  217. package/dist/src/modules/stats/view/WinProbability/WinProbability.js +28 -0
  218. package/dist/src/modules/stats/view/WinProbability/index.js +2 -0
  219. package/dist/src/modules/stats/view/components/AthletesStatistics/AthletesStatistics.js +89 -0
  220. package/dist/src/modules/stats/view/components/AthletesStatistics/StatisticTable.js +12 -0
  221. package/dist/src/modules/stats/view/components/AthletesStatistics/index.js +2 -0
  222. package/dist/src/modules/stats/view/index.js +2 -0
  223. package/dist/src/modules/stats/view-model/StatsViewModel.d.ts +5 -0
  224. package/dist/src/modules/stats/view-model/StatsViewModel.js +989 -0
  225. package/dist/src/sentry.js +31 -0
  226. package/dist/src/services/AnalyticsService/AnalyticsService.d.ts +12 -7
  227. package/dist/src/services/AnalyticsService/AnalyticsService.js +402 -0
  228. package/dist/src/services/AnalyticsService/types.js +1 -0
  229. package/dist/src/services/BetsService.js +122 -0
  230. package/dist/src/services/FantasyService.js +92 -0
  231. package/dist/src/services/GlobalService/GlobalService.d.ts +9 -0
  232. package/dist/src/services/GlobalService/PageService.d.ts +9 -0
  233. package/dist/src/services/GlobalService/index.d.ts +2 -0
  234. package/dist/src/services/GlobalService/mocks.d.ts +2 -0
  235. package/dist/src/services/GlobalService/types.d.ts +11 -0
  236. package/dist/src/services/InsightsService/InsightsPayloadBuilder.d.ts +1 -2
  237. package/dist/src/services/InsightsService/InsightsPayloadBuilder.js +386 -0
  238. package/dist/src/services/InsightsService/InsightsService.js +74 -0
  239. package/dist/src/services/NetworkManager/NetworkManager.js +457 -0
  240. package/dist/src/services/NetworkManager/NetworkManagerFactory.js +101 -0
  241. package/dist/src/services/NetworkManager/errors.js +45 -0
  242. package/dist/src/services/NetworkManager/types.js +10 -0
  243. package/dist/src/services/PageService/PageService.d.ts +9 -0
  244. package/dist/src/services/PageService/PageService.js +39 -0
  245. package/dist/src/services/PageService/index.d.ts +2 -0
  246. package/dist/src/services/PageService/index.js +2 -0
  247. package/dist/src/services/PageService/mocks.d.ts +2 -0
  248. package/dist/src/services/PageService/mocks.js +104 -0
  249. package/dist/src/services/PageService/types.d.ts +76 -0
  250. package/dist/src/services/PageService/types.js +1 -0
  251. package/dist/src/services/ShopService.js +46 -0
  252. package/dist/src/services/StaticService/PageService.d.ts +9 -0
  253. package/dist/src/services/StaticService/StaticService.d.ts +3 -1
  254. package/dist/src/services/StaticService/StaticService.js +59 -0
  255. package/dist/src/services/StaticService/index.js +2 -0
  256. package/dist/src/services/StaticService/mocks.js +104 -0
  257. package/dist/src/services/StaticService/types.js +1 -0
  258. package/dist/src/services/StatsService.d.ts +1 -0
  259. package/dist/src/services/StatsService.js +147 -0
  260. package/dist/src/services/ThemeManager/constants.js +47 -0
  261. package/dist/src/services/UserSettingsManager.js +155 -0
  262. package/dist/src/test-polyfills.js +15 -0
  263. package/dist/src/types/OverlayTypes.js +4 -0
  264. package/dist/src/view-models/MaestroEventViewModel.d.ts +1 -2
  265. package/dist/src/view-models/MaestroEventViewModel.js +307 -0
  266. package/dist/src/view-models/OverlayViewModel.js +222 -0
  267. package/dist/src/view-models/PanelManagerViewModel.js +212 -0
  268. package/dist/src/view-models/ViewModel.js +32 -0
  269. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import './MainStat.styles.css';
3
+ const MainStat = (props) => {
4
+ const { playsQuantity, yards, time, lastPlayMarquee, focused } = props;
5
+ return (React.createElement("div", null,
6
+ React.createElement("div", { className: "drive-summary-stats-container" },
7
+ React.createElement("div", { className: "drive-summary-stat-left" },
8
+ React.createElement("div", { className: "drive-summary-stat-number T30 FONT_BOLD" }, playsQuantity),
9
+ React.createElement("div", { className: "drive-summary-stat-label T10" }, "PLAYS")),
10
+ React.createElement("div", { className: "drive-summary-stat-center" },
11
+ React.createElement("div", { className: "drive-summary-stat-number T30 FONT_BOLD" }, yards),
12
+ React.createElement("div", { className: "drive-summary-stat-label T10" }, "YARDS")),
13
+ React.createElement("div", { className: "drive-summary-stat-right" },
14
+ React.createElement("div", { className: "drive-summary-stat-number T30 FONT_BOLD" }, time))),
15
+ lastPlayMarquee && (React.createElement("div", { className: "drive-summary-marquee", "data-focused": focused },
16
+ React.createElement("div", { className: "drive-summary-marquee-background" }),
17
+ React.createElement("div", { className: "drive-summary-marquee-indicator" }),
18
+ React.createElement("table", { className: "drive-summary-marquee-content" },
19
+ React.createElement("tbody", null,
20
+ React.createElement("tr", null,
21
+ React.createElement("td", null,
22
+ React.createElement("div", { className: `drive-summary-marquee-text T01 ${focused ? 'drive-summary-marquee-text-animate' : ''}` }, lastPlayMarquee)))))))));
23
+ };
24
+ export default MainStat;
@@ -0,0 +1,2 @@
1
+ export { default } from './DriveSummary';
2
+ export { default as DrivePlayCard } from './DrivePlayCard';
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import './GameLeaders.styles.css';
3
+ import AthletesStatistics from '../components/AthletesStatistics';
4
+ import { DEFAULT_SCROLLABLE_CONTAINER_CONTEXT, SCROLLABLE_CONTEXT_TYPE, } from '@/components/core/ScrollableContainer/ScrollableContainer';
5
+ import SDK from '@/index';
6
+ class GameLeaders extends React.Component {
7
+ constructor() {
8
+ super(...arguments);
9
+ Object.defineProperty(this, "context", {
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true,
13
+ value: DEFAULT_SCROLLABLE_CONTAINER_CONTEXT
14
+ });
15
+ Object.defineProperty(this, "onBecameFocused", {
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true,
19
+ value: (layout) => {
20
+ this.context.scrollToFocusedElement(layout, {
21
+ offsetTop: 40,
22
+ });
23
+ }
24
+ });
25
+ Object.defineProperty(this, "onArrowPress", {
26
+ enumerable: true,
27
+ configurable: true,
28
+ writable: true,
29
+ value: (d) => {
30
+ if (d === 'left') {
31
+ SDK.getMaestroEventViewModel().deliverFocus();
32
+ }
33
+ }
34
+ });
35
+ }
36
+ render() {
37
+ return (React.createElement("section", { className: "game-leaders" },
38
+ React.createElement("h5", { className: "T05_ALT" }, this.props.item.displayText),
39
+ this.props.item.items.map((item, index) => (React.createElement(AthletesStatistics, { key: `${index}-${item.awayAthlete.id}`, item: item, focusKey: String(index), onBecameFocused: this.onBecameFocused, onArrowPress: this.onArrowPress, onEnterPress: this.props.onEnterPress })))));
40
+ }
41
+ }
42
+ Object.defineProperty(GameLeaders, "contextTypes", {
43
+ enumerable: true,
44
+ configurable: true,
45
+ writable: true,
46
+ value: SCROLLABLE_CONTEXT_TYPE
47
+ });
48
+ export default GameLeaders;
@@ -0,0 +1,2 @@
1
+ import GameLeaders from './GameLeaders';
2
+ export default GameLeaders;
@@ -0,0 +1,55 @@
1
+ import React, { Component } from 'react';
2
+ import { createArcPath, percentageToAngle } from '../../../utils';
3
+ class DonutChart extends Component {
4
+ constructor(props) {
5
+ super(props);
6
+ Object.defineProperty(this, "patternId", {
7
+ enumerable: true,
8
+ configurable: true,
9
+ writable: true,
10
+ value: void 0
11
+ });
12
+ this.patternId = `homeStripes-${Math.random().toString(36).substr(2, 9)}`;
13
+ }
14
+ render() {
15
+ const { awayPercentage, size = 280, strokeWidth = 32 } = this.props;
16
+ const radius = (size - strokeWidth) / 2;
17
+ const centerX = size / 2;
18
+ const centerY = size / 2;
19
+ // Calculate angles with equal gaps between sections
20
+ const awayAngle = percentageToAngle(awayPercentage);
21
+ const homeAngle = percentageToAngle(100 - awayPercentage);
22
+ const gapAngle = 3; // 3 degree gap between sections
23
+ const totalGaps = gapAngle * 2; // Two gaps total
24
+ // Adjust angles to account for gaps
25
+ const adjustedAwayAngle = (awayAngle * (360 - totalGaps)) / 360;
26
+ const adjustedHomeAngle = (homeAngle * (360 - totalGaps)) / 360;
27
+ const startAngle = 270; // Start from top
28
+ const awayEndAngle = startAngle + adjustedAwayAngle; // Away team section
29
+ const homeStartAngle = awayEndAngle + gapAngle; // Gap after away team
30
+ const homeEndAngle = homeStartAngle + adjustedHomeAngle; // Home team section
31
+ // Use consistent text-100 color for both teams
32
+ const chartColor = 'var(--sdk-text100)';
33
+ return (React.createElement("svg", { width: size, height: size, className: "donut-svg" },
34
+ React.createElement("defs", null,
35
+ React.createElement("pattern", { id: this.patternId, patternUnits: "userSpaceOnUse", width: "6", height: "6", patternTransform: "rotate(45)" },
36
+ React.createElement("rect", { width: "1", height: "6", fill: chartColor }),
37
+ React.createElement("rect", { x: "1", width: "2", height: "6", fill: "transparent" }),
38
+ React.createElement("rect", { x: "3", width: "1", height: "6", fill: chartColor }),
39
+ React.createElement("rect", { x: "4", width: "2", height: "6", fill: "transparent" }))),
40
+ React.createElement("path", { d: createArcPath(centerX, centerY, radius, startAngle, awayEndAngle), fill: "transparent", stroke: chartColor, strokeWidth: strokeWidth, strokeLinecap: "butt" }),
41
+ React.createElement("path", { d: createArcPath(centerX, centerY, radius, homeStartAngle, homeEndAngle), fill: "transparent", stroke: `url(#${this.patternId})`, strokeWidth: strokeWidth, strokeLinecap: "butt" }),
42
+ React.createElement("path", { d: createArcPath(centerX, centerY, radius, awayEndAngle, homeStartAngle), fill: "transparent", stroke: "var(--sdk-surface4)", strokeWidth: strokeWidth, strokeLinecap: "butt" }),
43
+ React.createElement("path", { d: createArcPath(centerX, centerY, radius, homeEndAngle, startAngle + 360), fill: "transparent", stroke: "var(--sdk-surface4)", strokeWidth: strokeWidth, strokeLinecap: "butt" })));
44
+ }
45
+ }
46
+ Object.defineProperty(DonutChart, "defaultProps", {
47
+ enumerable: true,
48
+ configurable: true,
49
+ writable: true,
50
+ value: {
51
+ size: 280,
52
+ strokeWidth: 32,
53
+ }
54
+ });
55
+ export default DonutChart;
@@ -0,0 +1 @@
1
+ export { default } from './DonutChart';
@@ -0,0 +1,60 @@
1
+ import React, { Component } from 'react';
2
+ import './MatchPredictorView.styles.css';
3
+ import { withFocusable, } from '@/external/spatial-navigation';
4
+ import DonutChart from './DonutChart/DonutChart';
5
+ import Image from '@/components/atoms/Image';
6
+ class MatchPredictorView extends Component {
7
+ constructor() {
8
+ super(...arguments);
9
+ Object.defineProperty(this, "state", {
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true,
13
+ value: {
14
+ shouldRenderPredictorImage: Boolean(this.props.item.imageUrl),
15
+ }
16
+ });
17
+ Object.defineProperty(this, "handleImageError", {
18
+ enumerable: true,
19
+ configurable: true,
20
+ writable: true,
21
+ value: () => {
22
+ this.setState({ shouldRenderPredictorImage: false });
23
+ }
24
+ });
25
+ }
26
+ render() {
27
+ const { item } = this.props;
28
+ const { shouldRenderPredictorImage } = this.state;
29
+ return (React.createElement("section", { className: "match-predictor-view focus-ring", "data-focused": this.props.focused },
30
+ React.createElement("div", { className: "match-predictor-header" },
31
+ React.createElement("h2", { className: "T05_ALT" }, item.header)),
32
+ React.createElement("div", { className: "match-predictor-percentages" },
33
+ React.createElement("div", { className: "team-percentage away-team" },
34
+ React.createElement("span", { className: "percentage-value T70" },
35
+ item.awayTeam.percentage,
36
+ "%"),
37
+ React.createElement("div", { className: "team-info" },
38
+ React.createElement("div", { className: "legend-item away" },
39
+ React.createElement("div", { className: "legend-pattern away-pattern" }),
40
+ React.createElement("span", { className: "T02" }, item.awayTeam.abbreviation)))),
41
+ React.createElement("div", { className: "team-percentage home-team" },
42
+ React.createElement("span", { className: "percentage-value T70" },
43
+ item.homeTeam.percentage,
44
+ "%"),
45
+ React.createElement("div", { className: "team-info" },
46
+ React.createElement("div", { className: "legend-item home" },
47
+ React.createElement("div", { className: "legend-pattern home-pattern" }),
48
+ React.createElement("span", { className: "T02" }, item.homeTeam.abbreviation))))),
49
+ React.createElement("div", { className: "donut-chart-container" }, shouldRenderPredictorImage && item.imageUrl ? (React.createElement("div", { className: "actual-chart" },
50
+ React.createElement(Image, { src: item.imageUrl, alt: "Match Predictor Chart", className: "predictor-chart-image", onError: this.handleImageError }))) : (React.createElement("div", { className: "svg-chart-fallback" },
51
+ React.createElement("div", { className: "svg-donut-container" },
52
+ React.createElement(DonutChart, { awayPercentage: item.awayTeam.percentage, homePercentage: item.homeTeam.percentage }),
53
+ React.createElement("div", { className: "donut-center" },
54
+ React.createElement("div", { className: "center-team-logos" },
55
+ React.createElement("div", { className: "center-logo away-center-logo" }, item.awayTeam.logo ? (React.createElement(Image, { src: item.awayTeam.logo, alt: item.awayTeam.displayName, className: "center-logo-image" })) : (React.createElement("span", { className: "center-logo-fallback T30" }, item.awayTeam.abbreviation))),
56
+ React.createElement("div", { className: "center-divider" }),
57
+ React.createElement("div", { className: "center-logo home-center-logo" }, item.homeTeam.logo ? (React.createElement(Image, { src: item.homeTeam.logo, alt: item.homeTeam.displayName, className: "center-logo-image" })) : (React.createElement("span", { className: "center-logo-fallback T30" }, item.homeTeam.abbreviation)))))))))));
58
+ }
59
+ }
60
+ export default withFocusable()(MatchPredictorView);
@@ -0,0 +1,2 @@
1
+ import MatchPredictorView from './MatchPredictorView';
2
+ export default MatchPredictorView;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import ScoringSummary from '../ScoringSummary';
3
+ const Penalties = (props) => {
4
+ return (React.createElement(ScoringSummary, { item: props.item, noScoresText: "No Penalties", onBecameFocused: props.onBecameFocused, onEnterPress: props.onEnterPress }));
5
+ };
6
+ export default Penalties;
@@ -0,0 +1,2 @@
1
+ import Penalties from './Penalties';
2
+ export default Penalties;
@@ -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);
@@ -0,0 +1,2 @@
1
+ import RecentGames from './RecentGames';
2
+ export default RecentGames;
@@ -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;
@@ -0,0 +1,2 @@
1
+ import ExpandedScores from './ExpandedScores';
2
+ export default ExpandedScores;
@@ -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);
@@ -0,0 +1,2 @@
1
+ import ScoreItem from './ScoreItem';
2
+ export default ScoreItem;
@@ -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;
@@ -0,0 +1,2 @@
1
+ import ScoresSection from './ScoresSection';
2
+ export default ScoresSection;
@@ -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;
@@ -0,0 +1,2 @@
1
+ import ScoringSummary from './ScoringSummary';
2
+ export default ScoringSummary;