@maestro_io/maestro-web-sdk 2.1.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/MaestroEventDelegate.d.ts +1 -0
  2. package/dist/components/atoms/Rive/index.d.ts +1 -0
  3. package/dist/components/atoms/SvgIcon/Icon.d.ts +0 -2
  4. package/dist/components/core/ScrollableContainer/ScrollableContainer.d.ts +3 -1
  5. package/dist/components/molecules/ActionButton/ActionButton.d.ts +1 -0
  6. package/dist/components/molecules/PanelNavButton/PanelNavButton.d.ts +1 -0
  7. package/dist/components/organisms/SegmentController/SegmentController.d.ts +2 -2
  8. package/dist/external/spatial-navigation/index.d.ts +2 -3
  9. package/dist/external/spatial-navigation/spatialNavigation.d.ts +3 -5
  10. package/dist/external/spatial-navigation/withFocusable.d.ts +1 -0
  11. package/dist/interfaces/IMaestroEvent.d.ts +14 -0
  12. package/dist/interfaces/IMaestroEventDelegate.d.ts +19 -6
  13. package/dist/maestro-web-sdk.umd.js +3 -3
  14. package/dist/maestro-web-sdk.umd.js.map +1 -1
  15. package/dist/models/IPanel.d.ts +1 -2
  16. package/dist/modules/bets/view/HotProps/HotPropsView.d.ts +7 -6
  17. package/dist/modules/bets/view/SixPack/SixPackView.d.ts +2 -2
  18. package/dist/modules/bets/view/TabLoadFailureView.d.ts +1 -0
  19. package/dist/modules/bets/view/UserBets/BetsCard/BetsCard.d.ts +7 -6
  20. package/dist/modules/bets/view/components/Bet/Bet.d.ts +1 -0
  21. package/dist/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +2 -2
  22. package/dist/modules/key-plays/view/KeyPlayCardView.d.ts +0 -4
  23. package/dist/modules/stats/interfaces/IStats.d.ts +44 -15
  24. package/dist/modules/stats/utils/driveSummaryUtils.d.ts +18 -0
  25. package/dist/modules/stats/utils/renderTeamStatistic.d.ts +21 -0
  26. package/dist/modules/stats/view/ActiveAthletes/ActiveAthletes.d.ts +21 -0
  27. package/dist/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.d.ts +5 -0
  28. package/dist/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.d.ts +10 -0
  29. package/dist/modules/stats/view/ActiveAthletes/index.d.ts +2 -0
  30. package/dist/modules/stats/view/DriveSummary/DrivePlayCard.d.ts +26 -0
  31. package/dist/modules/stats/view/DriveSummary/DriveSummary.d.ts +24 -0
  32. package/dist/modules/stats/view/DriveSummary/index.d.ts +2 -0
  33. package/dist/modules/stats/view/GameLeaders/GameLeaders.d.ts +15 -25
  34. package/dist/modules/stats/view/MatchPredictor/MatchPredictorView.d.ts +13 -47
  35. package/dist/modules/stats/view/RecentGames/RecentGames.d.ts +11 -21
  36. package/dist/modules/stats/view/StatsItemView.d.ts +19 -0
  37. package/dist/modules/stats/view/StatsQRCode/StatsQRCodeView.d.ts +1 -0
  38. package/dist/modules/stats/view/StatsView.d.ts +3 -3
  39. package/dist/modules/stats/view/TeamStats/TeamStatsView.d.ts +52 -0
  40. package/dist/modules/stats/view/TeamStats/index.d.ts +2 -0
  41. package/dist/modules/stats/view/Teams/Teams.d.ts +11 -26
  42. package/dist/modules/stats/view/WinProbability/WinProbability.d.ts +11 -21
  43. package/dist/modules/stats/view/components/AthletesStatistics/AthletesStatistics.d.ts +19 -3
  44. package/dist/modules/stats/view/components/AthletesStatistics/StatisticTable.d.ts +2 -8
  45. package/dist/modules/stats/view/index.d.ts +1 -0
  46. package/dist/modules/stats/view-model/StatsViewModel.d.ts +149 -5
  47. package/dist/services/StatsService.d.ts +36 -0
  48. package/dist/view-models/MaestroEventViewModel.d.ts +7 -0
  49. package/package.json +1 -1
  50. package/dist/MaestroEventDelegate.js +0 -60
  51. package/dist/components/atoms/BaseButton/BaseButton.js +0 -11
  52. package/dist/components/atoms/BaseButton/index.js +0 -2
  53. package/dist/components/atoms/Image/index.js +0 -30
  54. package/dist/components/atoms/Rive/index.js +0 -52
  55. package/dist/components/atoms/SvgIcon/BetGeneralIcon.js +0 -9
  56. package/dist/components/atoms/SvgIcon/BetsIcon.js +0 -11
  57. package/dist/components/atoms/SvgIcon/BetsWarningIcon.js +0 -11
  58. package/dist/components/atoms/SvgIcon/CheckmarkIcon.js +0 -6
  59. package/dist/components/atoms/SvgIcon/CollapseIcon.js +0 -6
  60. package/dist/components/atoms/SvgIcon/ExpandIcon.js +0 -6
  61. package/dist/components/atoms/SvgIcon/FantasyIcon.d.ts +0 -6
  62. package/dist/components/atoms/SvgIcon/FantasyIcon.js +0 -8
  63. package/dist/components/atoms/SvgIcon/FlameIcon.js +0 -11
  64. package/dist/components/atoms/SvgIcon/Icon.js +0 -42
  65. package/dist/components/atoms/SvgIcon/KeyPlaysIcon.js +0 -10
  66. package/dist/components/atoms/SvgIcon/MobilePhoneIcon.js +0 -11
  67. package/dist/components/atoms/SvgIcon/PlayIcon.js +0 -8
  68. package/dist/components/atoms/SvgIcon/StatsIcon.js +0 -12
  69. package/dist/components/atoms/SvgIcon/TimesIcon.js +0 -6
  70. package/dist/components/atoms/SvgIcon/WarningIcon.js +0 -8
  71. package/dist/components/atoms/SvgIcon/index.js +0 -2
  72. package/dist/components/core/App/App.js +0 -41
  73. package/dist/components/core/App/index.js +0 -2
  74. package/dist/components/core/OverlayContainer.js +0 -58
  75. package/dist/components/core/PanelManager/PanelManager.js +0 -80
  76. package/dist/components/core/PanelManager/index.js +0 -2
  77. package/dist/components/core/ScrollableContainer/FocusableItem.js +0 -38
  78. package/dist/components/core/ScrollableContainer/ScrollableContainer.js +0 -166
  79. package/dist/components/core/ScrollableContainer/index.js +0 -2
  80. package/dist/components/molecules/ActionButton/ActionButton.js +0 -10
  81. package/dist/components/molecules/ActionButton/index.js +0 -2
  82. package/dist/components/molecules/Overlay/Overlay.js +0 -139
  83. package/dist/components/molecules/Overlay/index.js +0 -2
  84. package/dist/components/molecules/PanelNavButton/PanelNavButton.js +0 -40
  85. package/dist/components/molecules/PanelNavButton/index.js +0 -2
  86. package/dist/components/molecules/SegmentButton/SegmentButton.js +0 -10
  87. package/dist/components/molecules/SegmentButton/index.js +0 -2
  88. package/dist/components/molecules/WatchButton/WatchButton.js +0 -15
  89. package/dist/components/molecules/WatchButton/index.js +0 -2
  90. package/dist/components/organisms/PanelNavigation/PanelNavigation.js +0 -72
  91. package/dist/components/organisms/PanelNavigation/index.js +0 -2
  92. package/dist/components/organisms/SegmentController/SegmentController.js +0 -69
  93. package/dist/components/organisms/SegmentController/index.js +0 -2
  94. package/dist/external/AxiosNetworkClient.js +0 -83
  95. package/dist/external/LocalStorageCacheManager.js +0 -213
  96. package/dist/external/ReactRenderer.js +0 -86
  97. package/dist/external/mocks/MockExternalNetworkClient.js +0 -161
  98. package/dist/external/ports/cacheManager.js +0 -1
  99. package/dist/external/ports/networkClient.js +0 -1
  100. package/dist/external/ports/renderer.js +0 -1
  101. package/dist/external/spatial-navigation/index.js +0 -4
  102. package/dist/external/spatial-navigation/measureLayout.js +0 -30
  103. package/dist/external/spatial-navigation/spatialNavigation.js +0 -875
  104. package/dist/external/spatial-navigation/utils.js +0 -6
  105. package/dist/external/spatial-navigation/visualDebugger.js +0 -76
  106. package/dist/external/spatial-navigation/withFocusable.js +0 -238
  107. package/dist/helpers/Observable.js +0 -37
  108. package/dist/helpers/deliver-focus.d.ts +0 -5
  109. package/dist/helpers/deliver-focus.js +0 -12
  110. package/dist/index.js +0 -192
  111. package/dist/interfaces/IMaestroEvent.js +0 -6
  112. package/dist/interfaces/IMaestroEventDelegate.js +0 -1
  113. package/dist/interfaces/IMaestroManager.js +0 -1
  114. package/dist/models/IModel.js +0 -1
  115. package/dist/models/IPanel.js +0 -53
  116. package/dist/models/ITheme.js +0 -20
  117. package/dist/models/IWinningBet.js +0 -1
  118. package/dist/modules/bets/interfaces/IBets.js +0 -1
  119. package/dist/modules/bets/mocks.js +0 -572
  120. package/dist/modules/bets/view/BetsView.js +0 -116
  121. package/dist/modules/bets/view/HotProps/HotPropsView.js +0 -139
  122. package/dist/modules/bets/view/SixPack/SixPackView.js +0 -103
  123. package/dist/modules/bets/view/TabLoadFailureView.js +0 -12
  124. package/dist/modules/bets/view/UserBets/BetResult/BetResult.js +0 -6
  125. package/dist/modules/bets/view/UserBets/BetsCard/BetsCard.js +0 -122
  126. package/dist/modules/bets/view/UserBets/BetsCard/BetsCardEvent.js +0 -34
  127. package/dist/modules/bets/view/UserBets/BetsCard/BetsCardFooter.js +0 -22
  128. package/dist/modules/bets/view/UserBets/Boost/Boost.js +0 -6
  129. package/dist/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +0 -9
  130. package/dist/modules/bets/view/UserBets/Parlay/Parlay.js +0 -13
  131. package/dist/modules/bets/view/UserBets/Straight/Straight.js +0 -6
  132. package/dist/modules/bets/view/UserBets/Teaser/Teaser.js +0 -13
  133. package/dist/modules/bets/view/UserBets/UserBetsView.js +0 -114
  134. package/dist/modules/bets/view/components/Bet/Bet.js +0 -32
  135. package/dist/modules/bets/view/components/BetPill/BetPill.js +0 -6
  136. package/dist/modules/bets/view/components/BetsCard/BetsCard.js +0 -15
  137. package/dist/modules/bets/view/components/BetsCard/BetsCardHeader.js +0 -20
  138. package/dist/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +0 -14
  139. package/dist/modules/bets/view/components/LocationWarning/LocationWarning.js +0 -16
  140. package/dist/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +0 -63
  141. package/dist/modules/bets/view/components/PromoCodeBanner/index.js +0 -1
  142. package/dist/modules/bets/view-model/BetsViewModel.js +0 -767
  143. package/dist/modules/key-plays/constants.js +0 -292
  144. package/dist/modules/key-plays/interfaces/IKeyPlays.js +0 -14
  145. package/dist/modules/key-plays/interfaces/IKeyPlaysResponse.js +0 -1
  146. package/dist/modules/key-plays/view/KeyPlayCardScoreTagView.js +0 -13
  147. package/dist/modules/key-plays/view/KeyPlayCardView.js +0 -142
  148. package/dist/modules/key-plays/view/KeyPlayErrorStateView.js +0 -58
  149. package/dist/modules/key-plays/view/KeyPlaysView.js +0 -167
  150. package/dist/modules/key-plays/view-model/KeyPlaysViewModel.js +0 -182
  151. package/dist/modules/stats/interfaces/IStats.js +0 -1
  152. package/dist/modules/stats/mocks.js +0 -546
  153. package/dist/modules/stats/utils.js +0 -62
  154. package/dist/modules/stats/view/GameLeaders/GameLeaders.js +0 -9
  155. package/dist/modules/stats/view/GameLeaders/index.js +0 -2
  156. package/dist/modules/stats/view/MatchPredictor/DonutChart/DonutChart.js +0 -55
  157. package/dist/modules/stats/view/MatchPredictor/DonutChart/index.js +0 -1
  158. package/dist/modules/stats/view/MatchPredictor/MatchPredictorView.js +0 -66
  159. package/dist/modules/stats/view/MatchPredictor/index.js +0 -2
  160. package/dist/modules/stats/view/RecentGames/RecentGames.js +0 -22
  161. package/dist/modules/stats/view/RecentGames/index.js +0 -2
  162. package/dist/modules/stats/view/StatsQRCode/StatsQRCodeView.js +0 -38
  163. package/dist/modules/stats/view/StatsQRCode/index.js +0 -1
  164. package/dist/modules/stats/view/StatsView.js +0 -87
  165. package/dist/modules/stats/view/Teams/StatsCarousel.js +0 -14
  166. package/dist/modules/stats/view/Teams/StatsProgressBar.js +0 -14
  167. package/dist/modules/stats/view/Teams/Teams.js +0 -35
  168. package/dist/modules/stats/view/Teams/index.js +0 -2
  169. package/dist/modules/stats/view/WinProbability/WinProbability.js +0 -27
  170. package/dist/modules/stats/view/WinProbability/index.js +0 -2
  171. package/dist/modules/stats/view/components/AthletesStatistics/AthletesStatistics.js +0 -28
  172. package/dist/modules/stats/view/components/AthletesStatistics/StatisticTable.js +0 -11
  173. package/dist/modules/stats/view/components/AthletesStatistics/index.js +0 -2
  174. package/dist/modules/stats/view/index.js +0 -1
  175. package/dist/modules/stats/view-model/StatsViewModel.js +0 -90
  176. package/dist/services/BetsService.js +0 -102
  177. package/dist/services/NetworkManager/NetworkManager.js +0 -410
  178. package/dist/services/NetworkManager/errors.js +0 -45
  179. package/dist/services/ThemeManager/constants.js +0 -47
  180. package/dist/test-polyfills.js +0 -15
  181. package/dist/types/OverlayTypes.js +0 -4
  182. package/dist/view-models/MaestroEventViewModel.js +0 -156
  183. package/dist/view-models/OverlayViewModel.js +0 -222
  184. package/dist/view-models/PanelManagerViewModel.js +0 -80
  185. package/dist/view-models/ViewModel.js +0 -32
  186. package/dist/view-models/index.js +0 -59
@@ -1,10 +1,9 @@
1
1
  export declare const MaestroPanelType: {
2
2
  readonly KEY_PLAYS: "keyPlays";
3
3
  readonly STATS: "stats";
4
- readonly FANTASY: "fantasy";
5
4
  readonly BETS: "bets";
6
5
  };
7
- export type MaestroPanelType = (typeof MaestroPanelType)[keyof typeof MaestroPanelType];
6
+ export type MaestroPanelType = typeof MaestroPanelType[keyof typeof MaestroPanelType];
8
7
  export interface PanelTypeInfo {
9
8
  id: MaestroPanelType;
10
9
  name: string;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="prop-types" />
2
2
  import React from 'react';
3
3
  import { WithFocusableProps } from '@/external/spatial-navigation';
4
- import { Details, Direction, Layout } from '@/external/spatial-navigation/utils';
4
+ import { Direction, Layout } from '@/external/spatial-navigation/utils';
5
5
  import './HotPropsView.css';
6
6
  import { HotPropsBetItem } from '../../view-model/BetsViewModel';
7
7
  type HotPropsViewProps = {
@@ -11,6 +11,7 @@ type HotPropsViewProps = {
11
11
  declare const _default: {
12
12
  new (props?: (HotPropsViewProps & WithFocusableProps) | undefined, context?: any): {
13
13
  state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
14
+ navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
14
15
  getChildContext(): {
15
16
  parentFocusKey: string;
16
17
  };
@@ -19,12 +20,12 @@ declare const _default: {
19
20
  stealFocus: () => void;
20
21
  onUpdateFocus: (focused: boolean) => void;
21
22
  onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
22
- onEnterPressHandler: (details: Details) => void;
23
+ onEnterPressHandler: (details: import("@/external/spatial-navigation/utils").Details) => void;
23
24
  onEnterReleaseHandler: () => void;
24
- onBackPressHandler: (details: Details) => void;
25
- onArrowPressHandler: (direction: Direction, details: Details) => boolean | void;
26
- onBecameFocusedHandler: (layout: Layout, details: Details) => void;
27
- onBecameBlurredHandler: (layout: Layout, details: Details) => void;
25
+ onBackPressHandler: (details: import("@/external/spatial-navigation/utils").Details) => void;
26
+ onArrowPressHandler: (direction: Direction, details: import("@/external/spatial-navigation/utils").Details) => boolean | void;
27
+ onBecameFocusedHandler: (layout: Layout, details: import("@/external/spatial-navigation/utils").Details) => void;
28
+ onBecameBlurredHandler: (layout: Layout, details: import("@/external/spatial-navigation/utils").Details) => void;
28
29
  componentDidMount(): void;
29
30
  componentDidUpdate(): void;
30
31
  componentWillUnmount(): void;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './SixPackView.style.css';
3
3
  import { WithFocusableProps } from '@/external/spatial-navigation';
4
- import { Details, Direction, Layout } from '@/external/spatial-navigation/utils';
4
+ import { Direction, Layout } from '@/external/spatial-navigation/utils';
5
5
  import { SixPackBetItem } from '../../view-model/BetsViewModel';
6
6
  type Props = WithFocusableProps & {
7
7
  item: SixPackBetItem;
@@ -14,7 +14,7 @@ export default class FocusableSixPackViewWrapper extends React.Component<Props>
14
14
  };
15
15
  context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
16
16
  onBecameFocused: (layout: Layout) => void;
17
- onArrowPress: (d: Direction, _props: any, details: Details) => void;
17
+ onArrowPress: (d: Direction, _props: any) => void;
18
18
  render(): React.JSX.Element;
19
19
  }
20
20
  export {};
@@ -4,6 +4,7 @@ import { WithFocusableProps } from '@/external/spatial-navigation';
4
4
  declare const _default: {
5
5
  new (props?: (object & WithFocusableProps) | undefined, context?: any): {
6
6
  state: import("../../../external/spatial-navigation/withFocusable").WithFocusableState;
7
+ navigation: import("../../../external/spatial-navigation/spatialNavigation").default;
7
8
  getChildContext(): {
8
9
  parentFocusKey: string;
9
10
  };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="prop-types" />
2
2
  import React from 'react';
3
3
  import { WithFocusableProps } from '@/external/spatial-navigation';
4
- import { Details, Direction, Layout } from '@/external/spatial-navigation/utils';
4
+ import { Direction, Layout } from '@/external/spatial-navigation/utils';
5
5
  import { IUserBet } from '@/modules/bets/interfaces/IBets';
6
6
  export declare const EVENTS_COUNT_THRESHOLD = 3;
7
7
  export type BaseBetCardProps = {
@@ -11,6 +11,7 @@ export type BaseBetCardProps = {
11
11
  declare const _default: {
12
12
  new (props?: (BaseBetCardProps & WithFocusableProps) | undefined, context?: any): {
13
13
  state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState;
14
+ navigation: import("../../../../../external/spatial-navigation/spatialNavigation").default;
14
15
  getChildContext(): {
15
16
  parentFocusKey: string;
16
17
  };
@@ -19,12 +20,12 @@ declare const _default: {
19
20
  stealFocus: () => void;
20
21
  onUpdateFocus: (focused: boolean) => void;
21
22
  onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
22
- onEnterPressHandler: (details: Details) => void;
23
+ onEnterPressHandler: (details: import("@/external/spatial-navigation/utils").Details) => void;
23
24
  onEnterReleaseHandler: () => void;
24
- onBackPressHandler: (details: Details) => void;
25
- onArrowPressHandler: (direction: Direction, details: Details) => boolean | void;
26
- onBecameFocusedHandler: (layout: Layout, details: Details) => void;
27
- onBecameBlurredHandler: (layout: Layout, details: Details) => void;
25
+ onBackPressHandler: (details: import("@/external/spatial-navigation/utils").Details) => void;
26
+ onArrowPressHandler: (direction: Direction, details: import("@/external/spatial-navigation/utils").Details) => boolean | void;
27
+ onBecameFocusedHandler: (layout: Layout, details: import("@/external/spatial-navigation/utils").Details) => void;
28
+ onBecameBlurredHandler: (layout: Layout, details: import("@/external/spatial-navigation/utils").Details) => void;
28
29
  componentDidMount(): void;
29
30
  componentDidUpdate(): void;
30
31
  componentWillUnmount(): void;
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  leg: IBetLeg;
9
9
  } & WithFocusableProps) | undefined, context?: any): {
10
10
  state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState;
11
+ navigation: import("../../../../../external/spatial-navigation/spatialNavigation").default;
11
12
  getChildContext(): {
12
13
  parentFocusKey: string;
13
14
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './PromoCodeBanner.styles.css';
3
3
  import { WithFocusableProps } from '@/external/spatial-navigation';
4
- import { Details, Direction, Layout } from '@/external/spatial-navigation/utils';
4
+ import { Direction, Layout } from '@/external/spatial-navigation/utils';
5
5
  export interface PromoCodeBannerProps extends WithFocusableProps {
6
6
  title: string;
7
7
  description: string;
@@ -17,6 +17,6 @@ export default class FocusablePromoCodeBannerWrapper extends React.Component<Pro
17
17
  };
18
18
  context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
19
19
  onBecameFocused: (layout: Layout) => void;
20
- onArrowPress: (d: Direction, _props: any, details: Details) => void;
20
+ onArrowPress: (d: Direction, _props: any) => void;
21
21
  render(): React.JSX.Element;
22
22
  }
@@ -7,14 +7,12 @@ type KeyPlayCardViewProps = IKeyPlay & {
7
7
  isPlaying: boolean;
8
8
  playbackProgress: number | null;
9
9
  isScoring: boolean;
10
- setRef: (ref: HTMLDivElement | null) => void;
11
10
  };
12
11
  type KeyPlaysCardViewState = {
13
12
  failedClip: KeyPlayLoadFailureStatus | null;
14
13
  };
15
14
  export declare class KeyPlayCardView extends React.Component<KeyPlayCardViewProps & WithFocusableProps, KeyPlaysCardViewState> {
16
15
  private failedClipListener;
17
- private ref;
18
16
  private vm;
19
17
  state: {
20
18
  failedClip: null;
@@ -26,14 +24,12 @@ export declare class KeyPlayCardView extends React.Component<KeyPlayCardViewProp
26
24
  render(): React.JSX.Element;
27
25
  }
28
26
  export default class KeyPlayCard extends React.Component<Omit<KeyPlayCardViewProps, 'setRef'> & WithFocusableProps> {
29
- private ref;
30
27
  context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
31
28
  static contextTypes: {
32
29
  refsMap: React.Requireable<any>;
33
30
  setRef: React.Requireable<any>;
34
31
  scrollToFocusedElement: React.Requireable<any>;
35
32
  };
36
- setRef: (ref: HTMLDivElement | null) => void;
37
33
  handleLeftPressed: (d: Direction) => void;
38
34
  onBecameFocused: (layout: Layout) => void;
39
35
  render(): React.JSX.Element;
@@ -40,7 +40,7 @@ export interface Athlete {
40
40
  jersey: string;
41
41
  headshot: string;
42
42
  links: AthleteLink[];
43
- position: AthletePosition;
43
+ position?: AthletePosition;
44
44
  statistics?: {
45
45
  $key: string;
46
46
  value?: number;
@@ -50,7 +50,7 @@ export interface Athlete {
50
50
  export interface EntityMap<T> {
51
51
  [id: string]: T;
52
52
  }
53
- interface LeaderStatistic {
53
+ export interface LeaderStatistic {
54
54
  displayValue: string;
55
55
  abbreviation: string;
56
56
  }
@@ -67,8 +67,8 @@ interface LeaderTeam {
67
67
  export interface Leader {
68
68
  displayName: string;
69
69
  name: string;
70
- home: LeaderTeam;
71
- away: LeaderTeam;
70
+ home?: LeaderTeam;
71
+ away?: LeaderTeam;
72
72
  }
73
73
  interface LineScore {
74
74
  displayValue: string;
@@ -76,18 +76,18 @@ interface LineScore {
76
76
  interface HeaderTeam {
77
77
  $key: string;
78
78
  score?: string;
79
- linescores: LineScore[];
79
+ linescores?: LineScore[];
80
80
  }
81
81
  export interface Header {
82
82
  teams: HeaderTeam[];
83
- linescoresHeader: string[];
83
+ linescoresHeader?: string[];
84
84
  }
85
85
  export interface PredictorTeam {
86
86
  team: {
87
87
  $key: string;
88
88
  };
89
89
  gameProjection: string;
90
- teamChanceLoss: string;
90
+ teamChanceLoss?: string;
91
91
  }
92
92
  export interface Predictor {
93
93
  header: string;
@@ -110,7 +110,10 @@ interface ActiveAthletesTeam {
110
110
  team: {
111
111
  $key: string;
112
112
  };
113
- athletes: unknown[];
113
+ athletes: {
114
+ $key: string;
115
+ statLine: string;
116
+ }[];
114
117
  }
115
118
  export interface ActiveAthletes {
116
119
  displayText: string;
@@ -126,25 +129,51 @@ export interface Meta {
126
129
  syncUrl?: string;
127
130
  }
128
131
  export interface StatsPromotion {
129
- title: string;
132
+ backgroundImage?: string;
133
+ description?: string;
134
+ logoPng?: string;
135
+ logo?: string;
136
+ qrCode?: string;
137
+ title?: string;
138
+ }
139
+ export interface DrivePlay {
140
+ id: string;
141
+ clock: {
142
+ displayValue: string;
143
+ };
144
+ period: {
145
+ number: number;
146
+ };
147
+ type: {
148
+ text: string;
149
+ };
150
+ text: string;
151
+ start: {
152
+ downDistanceText: string;
153
+ };
154
+ }
155
+ export interface Drive {
156
+ id: string;
157
+ team: {
158
+ $key: string;
159
+ };
130
160
  description: string;
131
- logo: string;
132
- qrCode: string;
133
- backgroundImage: string;
161
+ plays: DrivePlay[];
134
162
  }
135
163
  export interface StatsApiResponse {
136
164
  entities: {
137
165
  teams: EntityMap<Team>;
138
- athletes: EntityMap<Athlete>;
166
+ athletes?: EntityMap<Athlete>;
139
167
  };
140
- leaders: Leader[];
168
+ leaders?: Leader[];
141
169
  header: Header;
142
170
  predictor: Predictor;
143
- winProbability: WinProbability;
171
+ winProbability?: WinProbability;
144
172
  gameState: string;
145
173
  activeAthletes?: ActiveAthletes;
146
174
  meta: Meta;
147
175
  promotion?: StatsPromotion;
176
+ drives?: Drive[];
148
177
  previousGames?: {
149
178
  displayOrder: number;
150
179
  team: {
@@ -0,0 +1,18 @@
1
+ import { DrivePlay } from '../interfaces/IStats';
2
+ /**
3
+ * Get ordinal suffix for a number (1st, 2nd, 3rd, 4th, etc.)
4
+ */
5
+ export declare const getOrdinalSuffix: (number: number) => string;
6
+ /**
7
+ * Parse drive description to get individual components
8
+ * Format: "11 PLAYS, 61 YARDS, 5:43"
9
+ */
10
+ export declare const parseDriveDescription: (description: string) => {
11
+ plays: string;
12
+ yards: string;
13
+ time: string;
14
+ };
15
+ /**
16
+ * Format the marquee text for the last play
17
+ */
18
+ export declare const formatLastPlayMarquee: (lastPlay: DrivePlay) => string;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ export interface TeamStatisticProps {
3
+ statisticName: string;
4
+ firstDisplayValue: string | number;
5
+ secondDisplayValue: string | number;
6
+ awayProgressValue: number;
7
+ homeProgressValue: number;
8
+ key?: string | number;
9
+ classNames?: {
10
+ container?: string;
11
+ header?: string;
12
+ firstValue?: string;
13
+ secondValue?: string;
14
+ statisticName?: string;
15
+ };
16
+ }
17
+ /**
18
+ * Shared utility to render a team statistic with consistent structure
19
+ * This eliminates code duplication between Teams and TeamStatsView components
20
+ */
21
+ export declare const renderTeamStatistic: (props: TeamStatisticProps) => React.JSX.Element;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import './ActiveAthletes.styles.css';
3
+ import { Direction, Layout } from '@/external/spatial-navigation/utils';
4
+ import { ActiveAthletesItem } from '../../view-model/StatsViewModel';
5
+ export type ActiveAthletesProps = {
6
+ item: ActiveAthletesItem;
7
+ onBecameFocused: (layout: Layout) => void;
8
+ };
9
+ declare class ActiveAthletes extends React.Component<ActiveAthletesProps, {
10
+ expanded: boolean;
11
+ }> {
12
+ constructor(props: ActiveAthletesProps);
13
+ onEnterPress(): void;
14
+ onAthletesStatisticsArrowPress: (index: number) => (d: Direction) => boolean;
15
+ get cardFocusKey(): string;
16
+ onAthletesStatisticsBackPress: () => void;
17
+ onArrowPress: (d: Direction) => void;
18
+ renderContent(): React.JSX.Element;
19
+ render(): React.JSX.Element;
20
+ }
21
+ export default ActiveAthletes;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './CollapsedAthletes.styles.css';
3
+ import { ActiveAthletesProps } from '../ActiveAthletes';
4
+ declare const CollapsedAthletes: (props: ActiveAthletesProps) => React.JSX.Element;
5
+ export default CollapsedAthletes;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import './ExpandedAthletes.styles.css';
3
+ import { ActiveAthletesProps } from '../ActiveAthletes';
4
+ import { Direction } from '@/external/spatial-navigation/utils';
5
+ type Props = {
6
+ onArrowPress: (index: number) => (direction: Direction) => void;
7
+ onBackPress: () => void;
8
+ } & ActiveAthletesProps;
9
+ declare const ExpandedAthletes: (props: Props) => React.JSX.Element;
10
+ export default ExpandedAthletes;
@@ -0,0 +1,2 @@
1
+ import ActiveAthletes from './ActiveAthletes';
2
+ export default ActiveAthletes;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { WithFocusableProps } from '@/external/spatial-navigation';
3
+ import { DrivePlay } from '../../interfaces/IStats';
4
+ import { Layout, Direction } from '@/external/spatial-navigation/utils';
5
+ import './DrivePlayCard.styles.css';
6
+ type DrivePlayCardProps = {
7
+ play: DrivePlay;
8
+ isLastPlay?: boolean;
9
+ focusKey?: string;
10
+ focusable?: boolean;
11
+ onBackPress?: () => void;
12
+ onBecameFocused?: (layout: Layout) => void;
13
+ onArrowPress?: (direction: Direction, props: any) => boolean | void;
14
+ parentFocusKey?: string;
15
+ };
16
+ export default class DrivePlayCard extends React.Component<DrivePlayCardProps & WithFocusableProps> {
17
+ static contextTypes: {
18
+ refsMap: React.Requireable<any>;
19
+ setRef: React.Requireable<any>;
20
+ scrollToFocusedElement: React.Requireable<any>;
21
+ };
22
+ context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
23
+ onBecameFocused: (layout: Layout) => void;
24
+ render(): React.JSX.Element;
25
+ }
26
+ export {};
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { WithFocusableProps } from '@/external/spatial-navigation';
3
+ import { Layout } from '@/external/spatial-navigation/utils';
4
+ import './DriveSummary.styles.css';
5
+ import { DriveSummaryItem } from '../../view-model/StatsViewModel';
6
+ type DriveSummaryProps = {
7
+ item: DriveSummaryItem;
8
+ };
9
+ export default class DriveSummary extends React.Component<DriveSummaryProps & WithFocusableProps> {
10
+ static contextTypes: {
11
+ refsMap: React.Requireable<any>;
12
+ setRef: React.Requireable<any>;
13
+ scrollToFocusedElement: React.Requireable<any>;
14
+ };
15
+ context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
16
+ state: {
17
+ expanded: boolean;
18
+ };
19
+ onBecameFocused: (layout: Layout) => void;
20
+ handleEnterPress: (_props: any, _details: any) => void;
21
+ collapseCard: () => void;
22
+ render(): React.JSX.Element;
23
+ }
24
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default } from './DriveSummary';
2
+ export { default as DrivePlayCard } from './DrivePlayCard';
@@ -1,29 +1,19 @@
1
1
  import React from 'react';
2
2
  import './GameLeaders.styles.css';
3
- type Athlete = {
4
- id: string;
5
- displayName: string;
6
- headshot: string;
7
- position: string;
8
- shortName: string;
9
- jersey: string;
10
- mainStatistic?: {
11
- displayValue: string;
12
- abbreviation: string;
13
- };
14
- };
15
- export type LeaderStatsItem = {
16
- displayName: string;
17
- awayAthlete: Athlete;
18
- homeAthlete: Athlete;
19
- statistics?: {
20
- homeAthleteValue: string;
21
- awayAthleteValue: string;
22
- abbreviation: string;
23
- }[];
3
+ import { GameLeadersStatsItem } from '../../view-model/StatsViewModel';
4
+ import { Direction, Layout } from '@/external/spatial-navigation/utils';
5
+ export type GameLeaderProps = {
6
+ item: GameLeadersStatsItem;
24
7
  };
25
- export type GameLeadersStatsItem = {
26
- items: LeaderStatsItem[];
27
- };
28
- declare const GameLeaders: (props: GameLeadersStatsItem) => React.JSX.Element;
8
+ declare class GameLeaders extends React.Component<GameLeaderProps> {
9
+ static contextTypes: {
10
+ refsMap: React.Requireable<any>;
11
+ setRef: React.Requireable<any>;
12
+ scrollToFocusedElement: React.Requireable<any>;
13
+ };
14
+ context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
15
+ onBecameFocused: (layout: Layout) => void;
16
+ onArrowPress: (d: Direction) => void;
17
+ render(): React.JSX.Element;
18
+ }
29
19
  export default GameLeaders;
@@ -1,52 +1,18 @@
1
- /// <reference types="prop-types" />
2
- import React from 'react';
1
+ import React, { Component } from 'react';
3
2
  import './MatchPredictorView.styles.css';
4
3
  import { WithFocusableProps } from '@/external/spatial-navigation';
5
- import { Predictor, EntityMap, Team } from '../../interfaces/IStats';
4
+ import { Layout } from '@/external/spatial-navigation/utils';
5
+ import { StatsMatchPredictorItem } from '../../view-model/StatsViewModel';
6
6
  export interface MatchPredictorProps {
7
- predictor: Predictor;
8
- teams: EntityMap<Team>;
7
+ item: StatsMatchPredictorItem;
9
8
  }
10
- declare const _default: {
11
- new (props?: (MatchPredictorProps & WithFocusableProps) | undefined, context?: any): {
12
- state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
13
- getChildContext(): {
14
- parentFocusKey: string;
15
- };
16
- setFocus: (focusKey: string) => void;
17
- navigateByDirection: (direction: import("../../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
18
- stealFocus: () => void;
19
- onUpdateFocus: (focused: boolean) => void;
20
- onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
21
- onEnterPressHandler: (details: import("../../../../external/spatial-navigation/utils").Details) => void;
22
- onEnterReleaseHandler: () => void;
23
- onBackPressHandler: (details: import("../../../../external/spatial-navigation/utils").Details) => void;
24
- onArrowPressHandler: (direction: import("../../../../external/spatial-navigation/utils").Direction, details: import("../../../../external/spatial-navigation/utils").Details) => boolean | void;
25
- onBecameFocusedHandler: (layout: import("../../../../external/spatial-navigation/utils").Layout, details: import("../../../../external/spatial-navigation/utils").Details) => void;
26
- onBecameBlurredHandler: (layout: import("../../../../external/spatial-navigation/utils").Layout, details: import("../../../../external/spatial-navigation/utils").Details) => void;
27
- componentDidMount(): void;
28
- componentDidUpdate(): void;
29
- componentWillUnmount(): void;
30
- render(): React.ReactElement<MatchPredictorProps & 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: MatchPredictorProps & 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<MatchPredictorProps & WithFocusableProps>;
36
- context: any;
37
- refs: {
38
- [key: string]: React.ReactInstance;
39
- };
40
- componentWillMount?(): void;
41
- componentWillReceiveProps?(nextProps: Readonly<MatchPredictorProps & WithFocusableProps>, nextContext: any): void;
42
- shouldComponentUpdate?(nextProps: Readonly<MatchPredictorProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
43
- componentWillUpdate?(nextProps: Readonly<MatchPredictorProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
9
+ export default class MatchPredictorView extends Component<MatchPredictorProps & WithFocusableProps> {
10
+ static contextTypes: {
11
+ refsMap: React.Requireable<any>;
12
+ setRef: React.Requireable<any>;
13
+ scrollToFocusedElement: React.Requireable<any>;
44
14
  };
45
- contextTypes: {
46
- parentFocusKey: import("prop-types").Requireable<string>;
47
- };
48
- childContextTypes: {
49
- parentFocusKey: import("prop-types").Requireable<string>;
50
- };
51
- };
52
- export default _default;
15
+ context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
16
+ onBecameFocused: (layout: Layout) => void;
17
+ render(): React.JSX.Element;
18
+ }
@@ -2,24 +2,14 @@
2
2
  import { WithFocusableProps } from '@/external/spatial-navigation';
3
3
  import React from 'react';
4
4
  import './RecentGames.styles.css';
5
- type PreviousGame = {
6
- score: string;
7
- gameResult: string;
8
- teamLogo: string;
9
- homeAway: string;
10
- };
11
- type Team = {
12
- logo: string;
13
- name?: string;
14
- events: PreviousGame[];
15
- };
16
- export type RecentGamesStatsItem = {
17
- awayTeam: Team;
18
- homeTeam: Team;
5
+ import { RecentGamesStatsItem } from '../../view-model/StatsViewModel';
6
+ type RecentGamesProps = {
7
+ item: RecentGamesStatsItem;
19
8
  };
20
9
  declare const _default: {
21
- new (props?: (RecentGamesStatsItem & WithFocusableProps) | undefined, context?: any): {
10
+ new (props?: (RecentGamesProps & WithFocusableProps) | undefined, context?: any): {
22
11
  state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
12
+ navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
23
13
  getChildContext(): {
24
14
  parentFocusKey: string;
25
15
  };
@@ -37,20 +27,20 @@ declare const _default: {
37
27
  componentDidMount(): void;
38
28
  componentDidUpdate(): void;
39
29
  componentWillUnmount(): void;
40
- render(): React.ReactElement<RecentGamesStatsItem & WithFocusableProps>;
41
- 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: RecentGamesStatsItem & 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;
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;
42
32
  forceUpdate(callBack?: (() => any) | undefined): void;
43
33
  props: Readonly<{
44
34
  children?: React.ReactNode;
45
- }> & Readonly<RecentGamesStatsItem & WithFocusableProps>;
35
+ }> & Readonly<RecentGamesProps & WithFocusableProps>;
46
36
  context: any;
47
37
  refs: {
48
38
  [key: string]: React.ReactInstance;
49
39
  };
50
40
  componentWillMount?(): void;
51
- componentWillReceiveProps?(nextProps: Readonly<RecentGamesStatsItem & WithFocusableProps>, nextContext: any): void;
52
- shouldComponentUpdate?(nextProps: Readonly<RecentGamesStatsItem & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
53
- componentWillUpdate?(nextProps: Readonly<RecentGamesStatsItem & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
41
+ componentWillReceiveProps?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextContext: any): void;
42
+ shouldComponentUpdate?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
43
+ componentWillUpdate?(nextProps: Readonly<RecentGamesProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
54
44
  };
55
45
  contextTypes: {
56
46
  parentFocusKey: import("prop-types").Requireable<string>;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { StatsItem } from '../view-model/StatsViewModel';
3
+ import { Direction, Layout } from '@/external/spatial-navigation/utils';
4
+ type Props = {
5
+ item: StatsItem;
6
+ };
7
+ declare class StatsItemView extends React.Component<Props> {
8
+ static contextTypes: {
9
+ refsMap: React.Requireable<any>;
10
+ setRef: React.Requireable<any>;
11
+ scrollToFocusedElement: React.Requireable<any>;
12
+ };
13
+ context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
14
+ onBecameFocused: (layout: Layout) => void;
15
+ onArrowPress: (d: Direction) => void;
16
+ renderItem(): React.JSX.Element | null;
17
+ render(): React.JSX.Element;
18
+ }
19
+ export default StatsItemView;
@@ -9,6 +9,7 @@ export interface StatsQRCodeViewProps extends WithFocusableProps {
9
9
  declare const _default: {
10
10
  new (props?: (StatsQRCodeViewProps & WithFocusableProps) | undefined, context?: any): {
11
11
  state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
12
+ navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
12
13
  getChildContext(): {
13
14
  parentFocusKey: string;
14
15
  };