@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,546 +0,0 @@
1
- export const MOCK_STATS_API_PRE_GAME_RESPONSE = {
2
- entities: {
3
- teams: {
4
- '30': {
5
- id: '30',
6
- uid: 's:40~l:41~t:30',
7
- abbreviation: 'USC',
8
- displayName: 'USC Trojans',
9
- logo: 'https://a.espncdn.com/i/teamlogos/ncaa/500/30.png',
10
- },
11
- '127': {
12
- id: '127',
13
- uid: 's:40~l:41~t:127',
14
- abbreviation: 'MSU',
15
- displayName: 'Michigan State Spartans',
16
- logo: 'https://a.espncdn.com/i/teamlogos/ncaa/500/127.png',
17
- },
18
- '130': {
19
- id: '130',
20
- uid: 's:40~l:41~t:130',
21
- slug: 'michigan-wolverines',
22
- location: 'Michigan',
23
- name: 'Wolverines',
24
- abbreviation: 'MICH',
25
- displayName: 'Michigan Wolverines',
26
- shortDisplayName: 'Michigan',
27
- color: '00274c',
28
- alternateColor: 'ffcb05',
29
- logo: 'https://a.espncdn.com/i/teamlogos/ncaa/500/130.png',
30
- statistics: [
31
- {
32
- $key: 'fieldGoalPct',
33
- value: 46.8,
34
- displayValue: '46.8',
35
- displayName: 'Field Goal %',
36
- },
37
- {
38
- $key: 'threePointFieldGoalPct',
39
- value: 33.2,
40
- displayValue: '33.2',
41
- displayName: 'Three Point %',
42
- },
43
- ],
44
- homeAway: 'home',
45
- record: '22-6',
46
- displayOrder: 2,
47
- },
48
- '158': {
49
- id: '158',
50
- uid: 's:40~l:41~t:158',
51
- abbreviation: 'NEB',
52
- displayName: 'Nebraska Cornhuskers',
53
- logo: 'https://a.espncdn.com/i/teamlogos/ncaa/500/158.png',
54
- },
55
- '164': {
56
- id: '164',
57
- uid: 's:40~l:41~t:164',
58
- slug: 'rutgers-scarlet-knights',
59
- location: 'Rutgers',
60
- name: 'Scarlet Knights',
61
- abbreviation: 'RUTG',
62
- displayName: 'Rutgers Scarlet Knights',
63
- shortDisplayName: 'Rutgers',
64
- color: 'd21034',
65
- alternateColor: 'ffffff',
66
- logo: 'https://a.espncdn.com/i/teamlogos/ncaa/500/164.png',
67
- statistics: [
68
- {
69
- $key: 'fieldGoalPct',
70
- value: 44.6,
71
- displayValue: '44.6',
72
- displayName: 'Field Goal %',
73
- },
74
- {
75
- $key: 'threePointFieldGoalPct',
76
- value: 32.9,
77
- displayValue: '32.9',
78
- displayName: 'Three Point %',
79
- },
80
- ],
81
- homeAway: 'away',
82
- record: '14-15',
83
- displayOrder: 1,
84
- },
85
- '194': {
86
- id: '194',
87
- uid: 's:40~l:41~t:194',
88
- abbreviation: 'OSU',
89
- displayName: 'Ohio State Buckeyes',
90
- logo: 'https://a.espncdn.com/i/teamlogos/ncaa/500/194.png',
91
- },
92
- '264': {
93
- id: '264',
94
- uid: 's:40~l:41~t:264',
95
- abbreviation: 'WASH',
96
- displayName: 'Washington Huskies',
97
- logo: 'https://a.espncdn.com/i/teamlogos/ncaa/500/264.png',
98
- },
99
- '2294': {
100
- id: '2294',
101
- uid: 's:40~l:41~t:2294',
102
- abbreviation: 'IOWA',
103
- displayName: 'Iowa Hawkeyes',
104
- logo: 'https://a.espncdn.com/i/teamlogos/ncaa/500/2294.png',
105
- },
106
- '2483': {
107
- id: '2483',
108
- uid: 's:40~l:41~t:2483',
109
- abbreviation: 'ORE',
110
- displayName: 'Oregon Ducks',
111
- logo: 'https://a.espncdn.com/i/teamlogos/ncaa/500/2483.png',
112
- },
113
- '2509': {
114
- id: '2509',
115
- uid: 's:40~l:41~t:2509',
116
- abbreviation: 'PUR',
117
- displayName: 'Purdue Boilermakers',
118
- logo: 'https://a.espncdn.com/i/teamlogos/ncaa/500/2509.png',
119
- },
120
- },
121
- athletes: {
122
- '4700818': {
123
- id: '4700818',
124
- uid: 's:40~l:41~a:4700818',
125
- guid: 'f7762d8f-8e45-3fea-9b4e-b4c251c16fd9',
126
- displayName: 'Vladislav Goldin',
127
- shortName: 'V. Goldin',
128
- jersey: '50',
129
- headshot: 'https://stitcher.espn.com/ctv/sports/basketball/leagues/mens-college-basketball/athletes/4700818.jpg?w=184&h=144',
130
- links: [
131
- {
132
- rel: ['playercard', 'desktop', 'athlete'],
133
- href: 'https://www.espnqa.com/mens-college-basketball/player/_/id/4700818/vladislav-goldin',
134
- text: 'Player Card',
135
- },
136
- ],
137
- position: {
138
- abbreviation: 'C',
139
- },
140
- },
141
- '4837356': {
142
- id: '4837356',
143
- uid: 's:40~l:41~a:4837356',
144
- guid: '39844ff0-5e66-371c-a947-49d93983944a',
145
- displayName: 'Tre Donaldson',
146
- shortName: 'T. Donaldson',
147
- jersey: '3',
148
- headshot: 'https://stitcher.espn.com/ctv/sports/basketball/leagues/mens-college-basketball/athletes/4837356.jpg?w=184&h=144',
149
- links: [
150
- {
151
- rel: ['playercard', 'desktop', 'athlete'],
152
- href: 'https://www.espnqa.com/mens-college-basketball/player/_/id/4837356/tre-donaldson',
153
- text: 'Player Card',
154
- },
155
- ],
156
- position: {
157
- abbreviation: 'G',
158
- },
159
- },
160
- '4873138': {
161
- id: '4873138',
162
- uid: 's:40~l:41~a:4873138',
163
- guid: '51ddca1a-e632-38f9-a875-b8858a2884de',
164
- displayName: 'Ace Bailey',
165
- shortName: 'A. Bailey',
166
- jersey: '4',
167
- headshot: 'https://stitcher.espn.com/ctv/sports/basketball/leagues/mens-college-basketball/athletes/4873138.jpg?w=184&h=144',
168
- links: [
169
- {
170
- rel: ['playercard', 'desktop', 'athlete'],
171
- href: 'https://www.espnqa.com/mens-college-basketball/player/_/id/4873138/ace-bailey',
172
- text: 'Player Card',
173
- },
174
- ],
175
- position: {
176
- abbreviation: 'G',
177
- },
178
- },
179
- '5037871': {
180
- id: '5037871',
181
- uid: 's:40~l:41~a:5037871',
182
- guid: 'd8fd1989-052d-3e45-91f2-6fda54fa5c8e',
183
- displayName: 'Dylan Harper',
184
- shortName: 'D. Harper',
185
- jersey: '2',
186
- headshot: 'https://stitcher.espn.com/ctv/sports/basketball/leagues/mens-college-basketball/athletes/5037871.jpg?w=184&h=144',
187
- links: [
188
- {
189
- rel: ['playercard', 'desktop', 'athlete'],
190
- href: 'https://www.espnqa.com/mens-college-basketball/player/_/id/5037871/dylan-harper',
191
- text: 'Player Card',
192
- },
193
- ],
194
- position: {
195
- abbreviation: 'G',
196
- },
197
- },
198
- '5107173': {
199
- id: '5107173',
200
- uid: 's:40~l:41~a:5107173',
201
- guid: 'ac3b948f-3ad6-335a-9ac2-8c7c166b0ba4',
202
- displayName: 'Danny Wolf',
203
- shortName: 'D. Wolf',
204
- jersey: '1',
205
- headshot: 'https://stitcher.espn.com/ctv/sports/basketball/leagues/mens-college-basketball/athletes/5107173.jpg?w=184&h=144',
206
- links: [
207
- {
208
- rel: ['playercard', 'desktop', 'athlete'],
209
- href: 'https://www.espnqa.com/mens-college-basketball/player/_/id/5107173/danny-wolf',
210
- text: 'Player Card',
211
- },
212
- ],
213
- position: {
214
- abbreviation: 'C',
215
- },
216
- },
217
- },
218
- },
219
- leaders: [
220
- {
221
- displayName: 'Points',
222
- name: 'pointsPerGame',
223
- home: {
224
- team: {
225
- $key: '130',
226
- },
227
- athlete: {
228
- $key: '4700818',
229
- statistics: [
230
- {
231
- displayValue: '16.6',
232
- abbreviation: 'PTS',
233
- },
234
- {
235
- displayValue: '60.7',
236
- abbreviation: 'FG%',
237
- },
238
- {
239
- displayValue: '73.1',
240
- abbreviation: 'FT%',
241
- },
242
- ],
243
- },
244
- },
245
- away: {
246
- team: {
247
- $key: '164',
248
- },
249
- athlete: {
250
- $key: '5037871',
251
- statistics: [
252
- {
253
- displayValue: '19.4',
254
- abbreviation: 'PTS',
255
- },
256
- {
257
- displayValue: '48.4',
258
- abbreviation: 'FG%',
259
- },
260
- {
261
- displayValue: '75.0',
262
- abbreviation: 'FT%',
263
- },
264
- ],
265
- },
266
- },
267
- },
268
- {
269
- displayName: 'Assists',
270
- name: 'assistsPerGame',
271
- home: {
272
- team: {
273
- $key: '130',
274
- },
275
- athlete: {
276
- $key: '4837356',
277
- statistics: [
278
- {
279
- displayValue: '4.1',
280
- abbreviation: 'AST',
281
- },
282
- {
283
- displayValue: '2.2',
284
- abbreviation: 'TO',
285
- },
286
- {
287
- displayValue: '31.1',
288
- abbreviation: 'MIN',
289
- },
290
- ],
291
- },
292
- },
293
- away: {
294
- team: {
295
- $key: '164',
296
- },
297
- athlete: {
298
- $key: '5037871',
299
- statistics: [
300
- {
301
- displayValue: '4.0',
302
- abbreviation: 'AST',
303
- },
304
- {
305
- displayValue: '2.4',
306
- abbreviation: 'TO',
307
- },
308
- {
309
- displayValue: '32.6',
310
- abbreviation: 'MIN',
311
- },
312
- ],
313
- },
314
- },
315
- },
316
- {
317
- displayName: 'Rebounds',
318
- name: 'reboundsPerGame',
319
- home: {
320
- team: {
321
- $key: '130',
322
- },
323
- athlete: {
324
- $key: '5107173',
325
- statistics: [
326
- {
327
- displayValue: '9.7',
328
- abbreviation: 'REB',
329
- },
330
- {
331
- displayValue: '7.4',
332
- abbreviation: 'DR',
333
- },
334
- {
335
- displayValue: '2.3',
336
- abbreviation: 'OR',
337
- },
338
- ],
339
- },
340
- },
341
- away: {
342
- team: {
343
- $key: '164',
344
- },
345
- athlete: {
346
- $key: '4873138',
347
- statistics: [
348
- {
349
- displayValue: '7.2',
350
- abbreviation: 'REB',
351
- },
352
- {
353
- displayValue: '5.1',
354
- abbreviation: 'DR',
355
- },
356
- {
357
- displayValue: '2.1',
358
- abbreviation: 'OR',
359
- },
360
- ],
361
- },
362
- },
363
- },
364
- ],
365
- header: {
366
- teams: [
367
- {
368
- $key: '130',
369
- linescores: [
370
- {
371
- displayValue: '49',
372
- },
373
- {
374
- displayValue: '35',
375
- },
376
- {
377
- displayValue: '84',
378
- },
379
- ],
380
- },
381
- {
382
- $key: '164',
383
- linescores: [
384
- {
385
- displayValue: '57',
386
- },
387
- {
388
- displayValue: '25',
389
- },
390
- {
391
- displayValue: '82',
392
- },
393
- ],
394
- },
395
- ],
396
- linescoresHeader: ['1', '2', 'T'],
397
- },
398
- predictor: {
399
- header: 'Match Predictor',
400
- imageUrl: 'https://platform.espnqa.com/lrd/matchuppredictor/401721458',
401
- homeTeam: {
402
- team: {
403
- $key: '130',
404
- },
405
- gameProjection: '83.8',
406
- teamChanceLoss: '16.2',
407
- },
408
- awayTeam: {
409
- team: {
410
- $key: '164',
411
- },
412
- gameProjection: '16.2',
413
- teamChanceLoss: '83.8',
414
- },
415
- },
416
- winProbability: {
417
- imageUrl: 'https://platform.espnqa.com/lrd/winprobability/401721458/401721458112682435',
418
- homeTeam: {
419
- team: {
420
- $key: '130',
421
- },
422
- winPercentage: '9.7',
423
- },
424
- awayTeam: {
425
- team: {
426
- $key: '164',
427
- },
428
- winPercentage: '90.3',
429
- },
430
- },
431
- previousGames: [
432
- {
433
- displayOrder: 2,
434
- team: {
435
- $key: '130',
436
- },
437
- events: [
438
- {
439
- team: {
440
- $key: '2509',
441
- homeAway: 'away',
442
- },
443
- score: '75-73',
444
- gameResult: 'W',
445
- },
446
- {
447
- team: {
448
- $key: '194',
449
- homeAway: 'home',
450
- },
451
- score: '86-83',
452
- gameResult: 'W',
453
- },
454
- {
455
- team: {
456
- $key: '127',
457
- homeAway: 'away',
458
- },
459
- score: '75-62',
460
- gameResult: 'L',
461
- },
462
- {
463
- team: {
464
- $key: '158',
465
- homeAway: 'home',
466
- },
467
- score: '49-46',
468
- gameResult: 'W',
469
- },
470
- {
471
- team: {
472
- $key: '164',
473
- homeAway: 'away',
474
- },
475
- score: '84-82',
476
- gameResult: 'W',
477
- },
478
- ],
479
- },
480
- {
481
- displayOrder: 1,
482
- team: {
483
- $key: '164',
484
- },
485
- events: [
486
- {
487
- team: {
488
- $key: '2294',
489
- homeAway: 'away',
490
- },
491
- score: '84-73',
492
- gameResult: 'L',
493
- },
494
- {
495
- team: {
496
- $key: '2483',
497
- homeAway: 'home',
498
- },
499
- score: '75-57',
500
- gameResult: 'L',
501
- },
502
- {
503
- team: {
504
- $key: '264',
505
- homeAway: 'home',
506
- },
507
- score: '89-85 OT',
508
- gameResult: 'W',
509
- },
510
- {
511
- team: {
512
- $key: '30',
513
- homeAway: 'away',
514
- },
515
- score: '95-85',
516
- gameResult: 'W',
517
- },
518
- {
519
- team: {
520
- $key: '130',
521
- homeAway: 'home',
522
- },
523
- score: '84-82',
524
- gameResult: 'L',
525
- },
526
- ],
527
- },
528
- ],
529
- gameState: 'pre',
530
- promotion: {
531
- title: 'Serving Sports Fans. Anytime.',
532
- description: 'Open the ESPN app on a mobile device to checkout more stats!',
533
- logo: 'https://www.espn.com/redesign/assets/img/ictv/logo_qr/1x/logo_qr_espn.png',
534
- qrCode: 'https://stitcher.espn.com/qr-code/.png?url=sportscenter%3A%2F%2Fx-callback-url%2FshowGame%3FsportName%3Dfootball%26leagueAbbrev%3Dnfl%26gameId%3D401671789&width=200&height=200',
535
- backgroundImage: 'https://www.espn.com/redesign/assets/img/ictv/bkg_qr_espn.jpg',
536
- },
537
- activeAthletes: {
538
- displayText: 'On the Court',
539
- teams: [],
540
- },
541
- meta: {
542
- gp_topic: 'gp-basketball-mens-college-basketball-401721458',
543
- picker_topic: 'picker-basketball-mens-college-basketball',
544
- gameState: 'pre',
545
- },
546
- };
@@ -1,62 +0,0 @@
1
- /**
2
- * Utility functions for stats module
3
- */
4
- /**
5
- * Convert polar coordinates to cartesian coordinates
6
- * @param centerX - Center X coordinate
7
- * @param centerY - Center Y coordinate
8
- * @param radius - Radius from center
9
- * @param angleInDegrees - Angle in degrees (0 degrees is at the top)
10
- * @returns Point with x,y coordinates
11
- */
12
- export const polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
13
- const angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0;
14
- return {
15
- x: centerX + radius * Math.cos(angleInRadians),
16
- y: centerY + radius * Math.sin(angleInRadians),
17
- };
18
- };
19
- /**
20
- * Create an SVG arc path string
21
- * @param centerX - Center X coordinate
22
- * @param centerY - Center Y coordinate
23
- * @param radius - Arc radius
24
- * @param startAngle - Start angle in degrees
25
- * @param endAngle - End angle in degrees
26
- * @returns SVG path string for the arc
27
- */
28
- export const createArcPath = (centerX, centerY, radius, startAngle, endAngle) => {
29
- const start = polarToCartesian(centerX, centerY, radius, endAngle);
30
- const end = polarToCartesian(centerX, centerY, radius, startAngle);
31
- const largeArcFlag = endAngle - startAngle <= 180 ? '0' : '1';
32
- return [
33
- 'M',
34
- start.x,
35
- start.y,
36
- 'A',
37
- radius,
38
- radius,
39
- 0,
40
- largeArcFlag,
41
- 0,
42
- end.x,
43
- end.y,
44
- ].join(' ');
45
- };
46
- /**
47
- * Convert percentage to angle in degrees
48
- * @param percentage - Percentage value (0-100)
49
- * @returns Angle in degrees (0-360)
50
- */
51
- export const percentageToAngle = (percentage) => {
52
- return (percentage / 100) * 360;
53
- };
54
- /**
55
- * Get team color with fallback
56
- * @param teamColor - Team color from API (without #)
57
- * @param fallbackColor - Fallback color (with #)
58
- * @returns Color string with # prefix
59
- */
60
- export const getTeamColor = (teamColor, fallbackColor = '#666666') => {
61
- return teamColor ? `#${teamColor}` : fallbackColor;
62
- };
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import './GameLeaders.styles.css';
3
- import AthletesStatistics from '../components/AthletesStatistics';
4
- const GameLeaders = (props) => {
5
- return (React.createElement("section", { className: "game-leaders" },
6
- React.createElement("h5", { className: "T05_ALT" }, "Game Leaders"),
7
- props.items.map((item, index) => (React.createElement(AthletesStatistics, { key: item.displayName, item: item, focusKey: String(index) })))));
8
- };
9
- export default GameLeaders;
@@ -1,2 +0,0 @@
1
- import GameLeaders from './GameLeaders';
2
- export default GameLeaders;
@@ -1,55 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export { default } from './DonutChart';