@maestro_io/maestro-web-sdk 2.1.3 → 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 (171) hide show
  1. package/dist/MaestroEventDelegate.d.ts +1 -0
  2. package/dist/components/atoms/SvgIcon/Icon.d.ts +0 -2
  3. package/dist/components/core/ScrollableContainer/ScrollableContainer.d.ts +3 -1
  4. package/dist/external/spatial-navigation/spatialNavigation.d.ts +1 -1
  5. package/dist/interfaces/IMaestroEvent.d.ts +14 -0
  6. package/dist/interfaces/IMaestroEventDelegate.d.ts +19 -6
  7. package/dist/maestro-web-sdk.umd.js +3 -3
  8. package/dist/maestro-web-sdk.umd.js.map +1 -1
  9. package/dist/models/IPanel.d.ts +1 -2
  10. package/dist/modules/stats/interfaces/IStats.d.ts +38 -12
  11. package/dist/modules/stats/mocks.d.ts +0 -80
  12. package/dist/modules/stats/utils/driveSummaryUtils.d.ts +18 -0
  13. package/dist/modules/stats/view/ActiveAthletes/ActiveAthletes.d.ts +6 -19
  14. package/dist/modules/stats/view/DriveSummary/DrivePlayCard.d.ts +26 -0
  15. package/dist/modules/stats/view/DriveSummary/DriveSummary.d.ts +24 -0
  16. package/dist/modules/stats/view/DriveSummary/index.d.ts +2 -0
  17. package/dist/modules/stats/view/GameLeaders/GameLeaders.d.ts +15 -4
  18. package/dist/modules/stats/view/MatchPredictor/MatchPredictorView.d.ts +13 -48
  19. package/dist/modules/stats/view/RecentGames/RecentGames.d.ts +10 -21
  20. package/dist/modules/stats/view/StatsItemView.d.ts +19 -0
  21. package/dist/modules/stats/view/StatsView.d.ts +3 -3
  22. package/dist/modules/stats/view/TeamStats/TeamStatsView.d.ts +2 -4
  23. package/dist/modules/stats/view/Teams/Teams.d.ts +10 -26
  24. package/dist/modules/stats/view/WinProbability/WinProbability.d.ts +10 -21
  25. package/dist/modules/stats/view-model/StatsViewModel.d.ts +149 -5
  26. package/package.json +1 -1
  27. package/dist/MaestroEventDelegate.js +0 -60
  28. package/dist/components/atoms/BaseButton/BaseButton.js +0 -11
  29. package/dist/components/atoms/BaseButton/index.js +0 -2
  30. package/dist/components/atoms/Image/index.js +0 -30
  31. package/dist/components/atoms/Rive/index.js +0 -53
  32. package/dist/components/atoms/SvgIcon/BetGeneralIcon.js +0 -9
  33. package/dist/components/atoms/SvgIcon/BetsIcon.js +0 -11
  34. package/dist/components/atoms/SvgIcon/BetsWarningIcon.js +0 -11
  35. package/dist/components/atoms/SvgIcon/CheckmarkIcon.js +0 -6
  36. package/dist/components/atoms/SvgIcon/CollapseIcon.js +0 -6
  37. package/dist/components/atoms/SvgIcon/ExpandIcon.js +0 -6
  38. package/dist/components/atoms/SvgIcon/FantasyIcon.d.ts +0 -6
  39. package/dist/components/atoms/SvgIcon/FantasyIcon.js +0 -8
  40. package/dist/components/atoms/SvgIcon/FlameIcon.js +0 -11
  41. package/dist/components/atoms/SvgIcon/Icon.js +0 -42
  42. package/dist/components/atoms/SvgIcon/KeyPlaysIcon.js +0 -10
  43. package/dist/components/atoms/SvgIcon/MobilePhoneIcon.js +0 -11
  44. package/dist/components/atoms/SvgIcon/PlayIcon.js +0 -8
  45. package/dist/components/atoms/SvgIcon/StatsIcon.js +0 -12
  46. package/dist/components/atoms/SvgIcon/TimesIcon.js +0 -6
  47. package/dist/components/atoms/SvgIcon/WarningIcon.js +0 -8
  48. package/dist/components/atoms/SvgIcon/index.js +0 -2
  49. package/dist/components/core/App/App.js +0 -41
  50. package/dist/components/core/App/index.js +0 -2
  51. package/dist/components/core/OverlayContainer.js +0 -58
  52. package/dist/components/core/PanelManager/PanelManager.js +0 -80
  53. package/dist/components/core/PanelManager/index.js +0 -2
  54. package/dist/components/core/ScrollableContainer/FocusableItem.js +0 -38
  55. package/dist/components/core/ScrollableContainer/ScrollableContainer.js +0 -166
  56. package/dist/components/core/ScrollableContainer/index.js +0 -2
  57. package/dist/components/molecules/ActionButton/ActionButton.js +0 -10
  58. package/dist/components/molecules/ActionButton/index.js +0 -2
  59. package/dist/components/molecules/Overlay/Overlay.js +0 -139
  60. package/dist/components/molecules/Overlay/index.js +0 -2
  61. package/dist/components/molecules/PanelNavButton/PanelNavButton.js +0 -40
  62. package/dist/components/molecules/PanelNavButton/index.js +0 -2
  63. package/dist/components/molecules/SegmentButton/SegmentButton.js +0 -10
  64. package/dist/components/molecules/SegmentButton/index.js +0 -2
  65. package/dist/components/molecules/WatchButton/WatchButton.js +0 -15
  66. package/dist/components/molecules/WatchButton/index.js +0 -2
  67. package/dist/components/organisms/PanelNavigation/PanelNavigation.js +0 -71
  68. package/dist/components/organisms/PanelNavigation/index.js +0 -2
  69. package/dist/components/organisms/SegmentController/SegmentController.js +0 -68
  70. package/dist/components/organisms/SegmentController/index.js +0 -2
  71. package/dist/external/AxiosNetworkClient.js +0 -83
  72. package/dist/external/LocalStorageCacheManager.js +0 -213
  73. package/dist/external/ReactRenderer.js +0 -86
  74. package/dist/external/mocks/MockExternalNetworkClient.js +0 -161
  75. package/dist/external/ports/cacheManager.js +0 -1
  76. package/dist/external/ports/networkClient.js +0 -1
  77. package/dist/external/ports/renderer.js +0 -1
  78. package/dist/external/spatial-navigation/index.js +0 -3
  79. package/dist/external/spatial-navigation/measureLayout.js +0 -30
  80. package/dist/external/spatial-navigation/spatialNavigation.js +0 -864
  81. package/dist/external/spatial-navigation/utils.js +0 -6
  82. package/dist/external/spatial-navigation/visualDebugger.js +0 -76
  83. package/dist/external/spatial-navigation/withFocusable.js +0 -245
  84. package/dist/helpers/Observable.js +0 -37
  85. package/dist/helpers/deliver-focus.d.ts +0 -5
  86. package/dist/helpers/deliver-focus.js +0 -12
  87. package/dist/index.js +0 -192
  88. package/dist/interfaces/IMaestroEvent.js +0 -6
  89. package/dist/interfaces/IMaestroEventDelegate.js +0 -1
  90. package/dist/interfaces/IMaestroManager.js +0 -1
  91. package/dist/models/IModel.js +0 -1
  92. package/dist/models/IPanel.js +0 -53
  93. package/dist/models/ITheme.js +0 -20
  94. package/dist/models/IWinningBet.js +0 -1
  95. package/dist/modules/bets/interfaces/IBets.js +0 -1
  96. package/dist/modules/bets/mocks.js +0 -572
  97. package/dist/modules/bets/view/BetsView.js +0 -116
  98. package/dist/modules/bets/view/HotProps/HotPropsView.js +0 -139
  99. package/dist/modules/bets/view/SixPack/SixPackView.js +0 -103
  100. package/dist/modules/bets/view/TabLoadFailureView.js +0 -12
  101. package/dist/modules/bets/view/UserBets/BetResult/BetResult.js +0 -6
  102. package/dist/modules/bets/view/UserBets/BetsCard/BetsCard.js +0 -122
  103. package/dist/modules/bets/view/UserBets/BetsCard/BetsCardEvent.js +0 -34
  104. package/dist/modules/bets/view/UserBets/BetsCard/BetsCardFooter.js +0 -22
  105. package/dist/modules/bets/view/UserBets/Boost/Boost.js +0 -6
  106. package/dist/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +0 -9
  107. package/dist/modules/bets/view/UserBets/Parlay/Parlay.js +0 -13
  108. package/dist/modules/bets/view/UserBets/Straight/Straight.js +0 -6
  109. package/dist/modules/bets/view/UserBets/Teaser/Teaser.js +0 -13
  110. package/dist/modules/bets/view/UserBets/UserBetsView.js +0 -114
  111. package/dist/modules/bets/view/components/Bet/Bet.js +0 -32
  112. package/dist/modules/bets/view/components/BetPill/BetPill.js +0 -6
  113. package/dist/modules/bets/view/components/BetsCard/BetsCard.js +0 -15
  114. package/dist/modules/bets/view/components/BetsCard/BetsCardHeader.js +0 -20
  115. package/dist/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +0 -14
  116. package/dist/modules/bets/view/components/LocationWarning/LocationWarning.js +0 -16
  117. package/dist/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +0 -63
  118. package/dist/modules/bets/view/components/PromoCodeBanner/index.js +0 -1
  119. package/dist/modules/bets/view-model/BetsViewModel.js +0 -767
  120. package/dist/modules/key-plays/constants.js +0 -292
  121. package/dist/modules/key-plays/interfaces/IKeyPlays.js +0 -14
  122. package/dist/modules/key-plays/interfaces/IKeyPlaysResponse.js +0 -1
  123. package/dist/modules/key-plays/view/KeyPlayCardScoreTagView.js +0 -13
  124. package/dist/modules/key-plays/view/KeyPlayCardView.js +0 -120
  125. package/dist/modules/key-plays/view/KeyPlayErrorStateView.js +0 -58
  126. package/dist/modules/key-plays/view/KeyPlaysView.js +0 -166
  127. package/dist/modules/key-plays/view-model/KeyPlaysViewModel.js +0 -182
  128. package/dist/modules/stats/interfaces/IStats.js +0 -1
  129. package/dist/modules/stats/mocks.js +0 -686
  130. package/dist/modules/stats/utils/renderTeamStatistic.js +0 -16
  131. package/dist/modules/stats/utils.js +0 -62
  132. package/dist/modules/stats/view/ActiveAthletes/ActiveAthletes.js +0 -78
  133. package/dist/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.js +0 -27
  134. package/dist/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.js +0 -15
  135. package/dist/modules/stats/view/ActiveAthletes/index.js +0 -2
  136. package/dist/modules/stats/view/GameLeaders/GameLeaders.js +0 -9
  137. package/dist/modules/stats/view/GameLeaders/index.js +0 -2
  138. package/dist/modules/stats/view/MatchPredictor/DonutChart/DonutChart.js +0 -55
  139. package/dist/modules/stats/view/MatchPredictor/DonutChart/index.js +0 -1
  140. package/dist/modules/stats/view/MatchPredictor/MatchPredictorView.js +0 -66
  141. package/dist/modules/stats/view/MatchPredictor/index.js +0 -2
  142. package/dist/modules/stats/view/RecentGames/RecentGames.js +0 -22
  143. package/dist/modules/stats/view/RecentGames/index.js +0 -2
  144. package/dist/modules/stats/view/StatsQRCode/StatsQRCodeView.js +0 -38
  145. package/dist/modules/stats/view/StatsQRCode/index.js +0 -1
  146. package/dist/modules/stats/view/StatsView.js +0 -107
  147. package/dist/modules/stats/view/TeamStats/TeamStatsView.js +0 -69
  148. package/dist/modules/stats/view/TeamStats/index.js +0 -1
  149. package/dist/modules/stats/view/Teams/StatsCarousel.js +0 -14
  150. package/dist/modules/stats/view/Teams/StatsProgressBar.js +0 -18
  151. package/dist/modules/stats/view/Teams/Teams.js +0 -42
  152. package/dist/modules/stats/view/Teams/index.js +0 -2
  153. package/dist/modules/stats/view/WinProbability/WinProbability.js +0 -27
  154. package/dist/modules/stats/view/WinProbability/index.js +0 -2
  155. package/dist/modules/stats/view/components/AthletesStatistics/AthletesStatistics.js +0 -29
  156. package/dist/modules/stats/view/components/AthletesStatistics/StatisticTable.js +0 -12
  157. package/dist/modules/stats/view/components/AthletesStatistics/index.js +0 -2
  158. package/dist/modules/stats/view/index.js +0 -2
  159. package/dist/modules/stats/view-model/StatsViewModel.js +0 -90
  160. package/dist/services/BetsService.js +0 -102
  161. package/dist/services/NetworkManager/NetworkManager.js +0 -410
  162. package/dist/services/NetworkManager/errors.js +0 -45
  163. package/dist/services/StatsService.js +0 -68
  164. package/dist/services/ThemeManager/constants.js +0 -47
  165. package/dist/test-polyfills.js +0 -15
  166. package/dist/types/OverlayTypes.js +0 -4
  167. package/dist/view-models/MaestroEventViewModel.js +0 -168
  168. package/dist/view-models/OverlayViewModel.js +0 -222
  169. package/dist/view-models/PanelManagerViewModel.js +0 -80
  170. package/dist/view-models/ViewModel.js +0 -32
  171. package/dist/view-models/index.js +0 -59
@@ -1,686 +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
- };
547
- export const mockTeamWithStatistics = {
548
- id: '12',
549
- uid: 's:20~l:28~t:12',
550
- abbreviation: 'KC',
551
- displayName: 'Kansas City Chiefs',
552
- color: 'e31837',
553
- logo: 'https://a.espncdn.com/i/teamlogos/nfl/500/kc.png',
554
- homeAway: 'home',
555
- statistics: [
556
- {
557
- $key: 'totalYards',
558
- value: 340,
559
- displayValue: '340',
560
- displayName: 'Total Yards',
561
- },
562
- {
563
- $key: 'turnovers',
564
- value: 0,
565
- displayValue: '0',
566
- displayName: 'Turnovers',
567
- },
568
- {
569
- $key: 'firstDowns',
570
- value: 21,
571
- displayValue: '21',
572
- displayName: '1st Downs',
573
- },
574
- {
575
- $key: 'possession',
576
- value: 24.22,
577
- displayValue: '24:13',
578
- displayName: 'Possession',
579
- },
580
- {
581
- $key: 'thirdDownEfficiency',
582
- value: 0.5,
583
- displayValue: '4-8',
584
- displayName: '3rd Down Efficiency',
585
- },
586
- {
587
- $key: 'fourthDownEfficiency',
588
- value: 0,
589
- displayValue: '0-0',
590
- displayName: '4th Down Efficiency',
591
- },
592
- {
593
- $key: 'redZone',
594
- value: 0.8,
595
- displayValue: '4-5',
596
- displayName: 'Red Zone',
597
- },
598
- {
599
- $key: 'yardsPerPlay',
600
- value: 5.8,
601
- displayValue: '5.8',
602
- displayName: 'Yards Per Play',
603
- },
604
- ],
605
- };
606
- export const mockAwayTeamWithStatistics = {
607
- id: '21',
608
- uid: 's:20~l:28~t:21',
609
- abbreviation: 'PHI',
610
- displayName: 'Philadelphia Eagles',
611
- color: '004C54',
612
- logo: 'https://a.espncdn.com/i/teamlogos/nfl/500/phi.png',
613
- homeAway: 'away',
614
- statistics: [
615
- {
616
- $key: 'totalYards',
617
- value: 417,
618
- displayValue: '417',
619
- displayName: 'Total Yards',
620
- },
621
- {
622
- $key: 'turnovers',
623
- value: 1,
624
- displayValue: '1',
625
- displayName: 'Turnovers',
626
- },
627
- {
628
- $key: 'firstDowns',
629
- value: 25,
630
- displayValue: '25',
631
- displayName: '1st Downs',
632
- },
633
- {
634
- $key: 'possession',
635
- value: 35.78,
636
- displayValue: '35:47',
637
- displayName: 'Possession',
638
- },
639
- {
640
- $key: 'thirdDownEfficiency',
641
- value: 0.727,
642
- displayValue: '8-11',
643
- displayName: '3rd Down Efficiency',
644
- },
645
- {
646
- $key: 'fourthDownEfficiency',
647
- value: 1.0,
648
- displayValue: '2-2',
649
- displayName: '4th Down Efficiency',
650
- },
651
- {
652
- $key: 'redZone',
653
- value: 0.6,
654
- displayValue: '3-5',
655
- displayName: 'Red Zone',
656
- },
657
- {
658
- $key: 'yardsPerPlay',
659
- value: 6.4,
660
- displayValue: '6.4',
661
- displayName: 'Yards Per Play',
662
- },
663
- ],
664
- };
665
- export const mockStatsResponseWithTeamStats = {
666
- entities: {
667
- teams: {
668
- '12': mockTeamWithStatistics,
669
- '21': mockAwayTeamWithStatistics,
670
- },
671
- athletes: {},
672
- },
673
- leaders: [],
674
- header: {
675
- teams: [],
676
- linescoresHeader: [],
677
- },
678
- predictor: null,
679
- winProbability: null,
680
- gameState: 'pre',
681
- meta: {
682
- gp_topic: 'test',
683
- picker_topic: 'test',
684
- gameState: 'pre',
685
- },
686
- };
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import StatsProgressBar from '../view/Teams/StatsProgressBar';
3
- /**
4
- * Shared utility to render a team statistic with consistent structure
5
- * This eliminates code duplication between Teams and TeamStatsView components
6
- */
7
- export const renderTeamStatistic = (props) => {
8
- const { statisticName, firstDisplayValue, secondDisplayValue, awayProgressValue, homeProgressValue, key, classNames = {}, } = props;
9
- const { container = 'team-stat-item', header = 'stat-header', firstValue = 'stat-value away-value', secondValue = 'stat-value home-value', statisticName: statisticNameClass = 'stat-name', } = classNames;
10
- return (React.createElement("div", { key: key, className: container },
11
- React.createElement("div", { className: header },
12
- React.createElement("span", { className: firstValue }, firstDisplayValue),
13
- React.createElement("span", { className: statisticNameClass }, statisticName),
14
- React.createElement("span", { className: secondValue }, secondDisplayValue)),
15
- React.createElement(StatsProgressBar, { awayTeamValue: awayProgressValue, homeTeamValue: homeProgressValue })));
16
- };