@maestro_io/maestro-web-sdk 2.1.1 → 2.1.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 (171) hide show
  1. package/dist/MaestroEventDelegate.js +60 -0
  2. package/dist/components/atoms/BaseButton/BaseButton.js +11 -0
  3. package/dist/components/atoms/BaseButton/index.js +2 -0
  4. package/dist/components/atoms/Image/index.js +30 -0
  5. package/dist/components/atoms/Rive/index.js +52 -0
  6. package/dist/components/atoms/SvgIcon/BetGeneralIcon.js +9 -0
  7. package/dist/components/atoms/SvgIcon/BetsIcon.js +11 -0
  8. package/dist/components/atoms/SvgIcon/BetsWarningIcon.js +11 -0
  9. package/dist/components/atoms/SvgIcon/CheckmarkIcon.js +6 -0
  10. package/dist/components/atoms/SvgIcon/CollapseIcon.js +6 -0
  11. package/dist/components/atoms/SvgIcon/ExpandIcon.js +6 -0
  12. package/dist/components/atoms/SvgIcon/FantasyIcon.js +8 -0
  13. package/dist/components/atoms/SvgIcon/FlameIcon.js +11 -0
  14. package/dist/components/atoms/SvgIcon/Icon.js +42 -0
  15. package/dist/components/atoms/SvgIcon/KeyPlaysIcon.js +10 -0
  16. package/dist/components/atoms/SvgIcon/MobilePhoneIcon.js +11 -0
  17. package/dist/components/atoms/SvgIcon/PlayIcon.js +8 -0
  18. package/dist/components/atoms/SvgIcon/StatsIcon.js +12 -0
  19. package/dist/components/atoms/SvgIcon/TimesIcon.js +6 -0
  20. package/dist/components/atoms/SvgIcon/WarningIcon.js +8 -0
  21. package/dist/components/atoms/SvgIcon/index.js +2 -0
  22. package/dist/components/core/App/App.js +41 -0
  23. package/dist/components/core/App/index.js +2 -0
  24. package/dist/components/core/OverlayContainer.js +58 -0
  25. package/dist/components/core/PanelManager/PanelManager.js +80 -0
  26. package/dist/components/core/PanelManager/index.js +2 -0
  27. package/dist/components/core/ScrollableContainer/FocusableItem.js +38 -0
  28. package/dist/components/core/ScrollableContainer/ScrollableContainer.js +166 -0
  29. package/dist/components/core/ScrollableContainer/index.js +2 -0
  30. package/dist/components/molecules/ActionButton/ActionButton.js +10 -0
  31. package/dist/components/molecules/ActionButton/index.js +2 -0
  32. package/dist/components/molecules/Overlay/Overlay.js +139 -0
  33. package/dist/components/molecules/Overlay/index.js +2 -0
  34. package/dist/components/molecules/PanelNavButton/PanelNavButton.js +40 -0
  35. package/dist/components/molecules/PanelNavButton/index.js +2 -0
  36. package/dist/components/molecules/SegmentButton/SegmentButton.js +10 -0
  37. package/dist/components/molecules/SegmentButton/index.js +2 -0
  38. package/dist/components/molecules/WatchButton/WatchButton.js +15 -0
  39. package/dist/components/molecules/WatchButton/index.js +2 -0
  40. package/dist/components/organisms/PanelNavigation/PanelNavigation.js +72 -0
  41. package/dist/components/organisms/PanelNavigation/index.js +2 -0
  42. package/dist/components/organisms/SegmentController/SegmentController.js +69 -0
  43. package/dist/components/organisms/SegmentController/index.d.ts +1 -1
  44. package/dist/components/organisms/SegmentController/index.js +2 -0
  45. package/dist/external/AxiosNetworkClient.js +83 -0
  46. package/dist/external/LocalStorageCacheManager.js +213 -0
  47. package/dist/external/ReactRenderer.d.ts +2 -2
  48. package/dist/external/ReactRenderer.js +86 -0
  49. package/dist/external/mocks/MockExternalNetworkClient.js +161 -0
  50. package/dist/external/ports/cacheManager.js +1 -0
  51. package/dist/external/ports/networkClient.js +1 -0
  52. package/dist/external/ports/renderer.js +1 -0
  53. package/dist/external/spatial-navigation/index.d.ts +1 -1
  54. package/dist/external/spatial-navigation/index.js +4 -0
  55. package/dist/external/spatial-navigation/measureLayout.js +30 -0
  56. package/dist/external/spatial-navigation/spatialNavigation.js +875 -0
  57. package/dist/external/spatial-navigation/utils.js +6 -0
  58. package/dist/external/spatial-navigation/visualDebugger.js +76 -0
  59. package/dist/external/spatial-navigation/withFocusable.js +238 -0
  60. package/dist/helpers/Observable.js +37 -0
  61. package/dist/helpers/deliver-focus.js +12 -0
  62. package/dist/index.d.ts +4 -4
  63. package/dist/index.js +192 -0
  64. package/dist/interfaces/IMaestroEvent.js +6 -0
  65. package/dist/interfaces/IMaestroEventDelegate.js +1 -0
  66. package/dist/interfaces/IMaestroManager.js +1 -0
  67. package/dist/maestro-web-sdk.umd.js +3 -3
  68. package/dist/maestro-web-sdk.umd.js.map +1 -1
  69. package/dist/models/IModel.js +1 -0
  70. package/dist/models/IPanel.js +53 -0
  71. package/dist/models/ITheme.js +20 -0
  72. package/dist/models/IWinningBet.js +1 -0
  73. package/dist/modules/bets/interfaces/IBets.js +1 -0
  74. package/dist/modules/bets/mocks.js +572 -0
  75. package/dist/modules/bets/view/BetsView.js +116 -0
  76. package/dist/modules/bets/view/HotProps/HotPropsView.js +139 -0
  77. package/dist/modules/bets/view/SixPack/SixPackView.js +103 -0
  78. package/dist/modules/bets/view/TabLoadFailureView.js +12 -0
  79. package/dist/modules/bets/view/UserBets/BetResult/BetResult.js +6 -0
  80. package/dist/modules/bets/view/UserBets/BetsCard/BetsCard.js +122 -0
  81. package/dist/modules/bets/view/UserBets/BetsCard/BetsCardEvent.js +34 -0
  82. package/dist/modules/bets/view/UserBets/BetsCard/BetsCardFooter.js +22 -0
  83. package/dist/modules/bets/view/UserBets/Boost/Boost.js +6 -0
  84. package/dist/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +9 -0
  85. package/dist/modules/bets/view/UserBets/Parlay/Parlay.js +13 -0
  86. package/dist/modules/bets/view/UserBets/Straight/Straight.js +6 -0
  87. package/dist/modules/bets/view/UserBets/Teaser/Teaser.js +13 -0
  88. package/dist/modules/bets/view/UserBets/UserBetsView.js +114 -0
  89. package/dist/modules/bets/view/components/Bet/Bet.js +32 -0
  90. package/dist/modules/bets/view/components/BetPill/BetPill.js +6 -0
  91. package/dist/modules/bets/view/components/BetsCard/BetsCard.js +15 -0
  92. package/dist/modules/bets/view/components/BetsCard/BetsCardHeader.js +20 -0
  93. package/dist/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +14 -0
  94. package/dist/modules/bets/view/components/LocationWarning/LocationWarning.js +16 -0
  95. package/dist/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +63 -0
  96. package/dist/modules/bets/view/components/PromoCodeBanner/index.d.ts +1 -1
  97. package/dist/modules/bets/view/components/PromoCodeBanner/index.js +1 -0
  98. package/dist/modules/bets/view-model/BetsViewModel.js +767 -0
  99. package/dist/modules/key-plays/constants.js +292 -0
  100. package/dist/modules/key-plays/interfaces/IKeyPlays.d.ts +4 -4
  101. package/dist/modules/key-plays/interfaces/IKeyPlays.js +14 -0
  102. package/dist/modules/key-plays/interfaces/IKeyPlaysResponse.js +1 -0
  103. package/dist/modules/key-plays/view/KeyPlayCardScoreTagView.js +13 -0
  104. package/dist/modules/key-plays/view/KeyPlayCardView.js +142 -0
  105. package/dist/modules/key-plays/view/KeyPlayErrorStateView.js +58 -0
  106. package/dist/modules/key-plays/view/KeyPlaysView.js +167 -0
  107. package/dist/modules/key-plays/view-model/KeyPlaysViewModel.js +182 -0
  108. package/dist/modules/stats/interfaces/IStats.d.ts +163 -0
  109. package/dist/modules/stats/interfaces/IStats.js +1 -0
  110. package/dist/modules/stats/mocks.d.ts +2 -0
  111. package/dist/modules/stats/mocks.js +546 -0
  112. package/dist/modules/stats/utils.d.ts +39 -0
  113. package/dist/modules/stats/utils.js +62 -0
  114. package/dist/modules/stats/view/GameLeaders/GameLeaders.d.ts +29 -0
  115. package/dist/modules/stats/view/GameLeaders/GameLeaders.js +9 -0
  116. package/dist/modules/stats/view/GameLeaders/index.d.ts +2 -0
  117. package/dist/modules/stats/view/GameLeaders/index.js +2 -0
  118. package/dist/modules/stats/view/MatchPredictor/DonutChart/DonutChart.d.ts +17 -0
  119. package/dist/modules/stats/view/MatchPredictor/DonutChart/DonutChart.js +55 -0
  120. package/dist/modules/stats/view/MatchPredictor/DonutChart/index.d.ts +2 -0
  121. package/dist/modules/stats/view/MatchPredictor/DonutChart/index.js +1 -0
  122. package/dist/modules/stats/view/MatchPredictor/MatchPredictorView.d.ts +52 -0
  123. package/dist/modules/stats/view/MatchPredictor/MatchPredictorView.js +66 -0
  124. package/dist/modules/stats/view/MatchPredictor/index.d.ts +3 -0
  125. package/dist/modules/stats/view/MatchPredictor/index.js +2 -0
  126. package/dist/modules/stats/view/RecentGames/RecentGames.d.ts +62 -0
  127. package/dist/modules/stats/view/RecentGames/RecentGames.js +22 -0
  128. package/dist/modules/stats/view/RecentGames/index.d.ts +2 -0
  129. package/dist/modules/stats/view/RecentGames/index.js +2 -0
  130. package/dist/modules/stats/view/StatsQRCode/StatsQRCodeView.d.ts +51 -0
  131. package/dist/modules/stats/view/StatsQRCode/StatsQRCodeView.js +38 -0
  132. package/dist/modules/stats/view/StatsQRCode/index.d.ts +2 -0
  133. package/dist/modules/stats/view/StatsQRCode/index.js +1 -0
  134. package/dist/modules/stats/view/StatsView.d.ts +20 -0
  135. package/dist/modules/stats/view/StatsView.js +87 -0
  136. package/dist/modules/stats/view/Teams/StatsCarousel.d.ts +8 -0
  137. package/dist/modules/stats/view/Teams/StatsCarousel.js +14 -0
  138. package/dist/modules/stats/view/Teams/StatsProgressBar.d.ts +7 -0
  139. package/dist/modules/stats/view/Teams/StatsProgressBar.js +14 -0
  140. package/dist/modules/stats/view/Teams/Teams.d.ts +67 -0
  141. package/dist/modules/stats/view/Teams/Teams.js +35 -0
  142. package/dist/modules/stats/view/Teams/index.d.ts +2 -0
  143. package/dist/modules/stats/view/Teams/index.js +2 -0
  144. package/dist/modules/stats/view/WinProbability/WinProbability.d.ts +62 -0
  145. package/dist/modules/stats/view/WinProbability/WinProbability.js +27 -0
  146. package/dist/modules/stats/view/WinProbability/index.d.ts +2 -0
  147. package/dist/modules/stats/view/WinProbability/index.js +2 -0
  148. package/dist/modules/stats/view/components/AthletesStatistics/AthletesStatistics.d.ts +51 -0
  149. package/dist/modules/stats/view/components/AthletesStatistics/AthletesStatistics.js +28 -0
  150. package/dist/modules/stats/view/components/AthletesStatistics/StatisticTable.d.ts +10 -0
  151. package/dist/modules/stats/view/components/AthletesStatistics/StatisticTable.js +11 -0
  152. package/dist/modules/stats/view/components/AthletesStatistics/index.d.ts +2 -0
  153. package/dist/modules/stats/view/components/AthletesStatistics/index.js +2 -0
  154. package/dist/modules/stats/view/index.d.ts +1 -0
  155. package/dist/modules/stats/view/index.js +1 -0
  156. package/dist/modules/stats/view-model/StatsViewModel.d.ts +31 -0
  157. package/dist/modules/stats/view-model/StatsViewModel.js +90 -0
  158. package/dist/services/BetsService.js +102 -0
  159. package/dist/services/NetworkManager/NetworkManager.js +410 -0
  160. package/dist/services/NetworkManager/errors.js +45 -0
  161. package/dist/services/ThemeManager/constants.js +47 -0
  162. package/dist/test-polyfills.d.ts +1 -0
  163. package/dist/test-polyfills.js +15 -0
  164. package/dist/types/OverlayTypes.js +4 -0
  165. package/dist/view-models/MaestroEventViewModel.d.ts +2 -0
  166. package/dist/view-models/MaestroEventViewModel.js +156 -0
  167. package/dist/view-models/OverlayViewModel.js +222 -0
  168. package/dist/view-models/PanelManagerViewModel.js +80 -0
  169. package/dist/view-models/ViewModel.js +32 -0
  170. package/dist/view-models/index.js +59 -0
  171. package/package.json +1 -1
@@ -0,0 +1,546 @@
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
+ };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Utility functions for stats module
3
+ */
4
+ export interface Point {
5
+ x: number;
6
+ y: number;
7
+ }
8
+ /**
9
+ * Convert polar coordinates to cartesian coordinates
10
+ * @param centerX - Center X coordinate
11
+ * @param centerY - Center Y coordinate
12
+ * @param radius - Radius from center
13
+ * @param angleInDegrees - Angle in degrees (0 degrees is at the top)
14
+ * @returns Point with x,y coordinates
15
+ */
16
+ export declare const polarToCartesian: (centerX: number, centerY: number, radius: number, angleInDegrees: number) => Point;
17
+ /**
18
+ * Create an SVG arc path string
19
+ * @param centerX - Center X coordinate
20
+ * @param centerY - Center Y coordinate
21
+ * @param radius - Arc radius
22
+ * @param startAngle - Start angle in degrees
23
+ * @param endAngle - End angle in degrees
24
+ * @returns SVG path string for the arc
25
+ */
26
+ export declare const createArcPath: (centerX: number, centerY: number, radius: number, startAngle: number, endAngle: number) => string;
27
+ /**
28
+ * Convert percentage to angle in degrees
29
+ * @param percentage - Percentage value (0-100)
30
+ * @returns Angle in degrees (0-360)
31
+ */
32
+ export declare const percentageToAngle: (percentage: number) => number;
33
+ /**
34
+ * Get team color with fallback
35
+ * @param teamColor - Team color from API (without #)
36
+ * @param fallbackColor - Fallback color (with #)
37
+ * @returns Color string with # prefix
38
+ */
39
+ export declare const getTeamColor: (teamColor?: string, fallbackColor?: string) => string;
@@ -0,0 +1,62 @@
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
+ };
@@ -0,0 +1,29 @@
1
+ import React from 'react';
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
+ }[];
24
+ };
25
+ export type GameLeadersStatsItem = {
26
+ items: LeaderStatsItem[];
27
+ };
28
+ declare const GameLeaders: (props: GameLeadersStatsItem) => React.JSX.Element;
29
+ export default GameLeaders;
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,2 @@
1
+ import GameLeaders from './GameLeaders';
2
+ export default GameLeaders;
@@ -0,0 +1,2 @@
1
+ import GameLeaders from './GameLeaders';
2
+ export default GameLeaders;