@maestro_io/maestro-web-sdk 4.0.0-beta.2 → 4.0.0-beta.3
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.
- package/dist/maestro-web-sdk.esm.js +2 -2
- package/dist/maestro-web-sdk.esm.js.map +1 -1
- package/dist/maestro-web-sdk.umd.js +2 -2
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/src/modules/key-plays/constants.js +3 -1
- package/dist/src/modules/key-plays/view/KeyPlayCardView.js +3 -8
- package/dist/src/modules/stats/view/Teams/Teams.js +17 -1
- package/package.json +1 -1
|
@@ -267,7 +267,9 @@ export const KEY_PLAYS_RESPONSE_MOCK_DATA = {
|
|
|
267
267
|
wallClock: '2024-01-01T05:41:48Z',
|
|
268
268
|
displayClock: '0:28',
|
|
269
269
|
shortPeriod: 'Q4',
|
|
270
|
-
scoringPlay:
|
|
270
|
+
scoringPlay: true,
|
|
271
|
+
awayScore: '34',
|
|
272
|
+
homeScore: '34',
|
|
271
273
|
athlete: '4889929',
|
|
272
274
|
thumbnail: 'https://stitcher.espn.com/ctv/sports/football/leagues/college-football/athletes/4889929.jpg?w=184&h=144',
|
|
273
275
|
thumbnailType: 'headshot',
|
|
@@ -5,6 +5,7 @@ import SDK from '@/index';
|
|
|
5
5
|
import Icon from '@/components/atoms/SvgIcon';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { withFocusable, } from '@/external/spatial-navigation';
|
|
8
|
+
import ScoreCard from './KeyPlayCardScoreTagView';
|
|
8
9
|
import FocusableItem from '@/components/core/ScrollableContainer/FocusableItem';
|
|
9
10
|
import { DEFAULT_SCROLLABLE_CONTAINER_CONTEXT, SCROLLABLE_CONTEXT_TYPE, } from '@/components/core/ScrollableContainer/ScrollableContainer';
|
|
10
11
|
export class KeyPlayCardView extends React.Component {
|
|
@@ -77,14 +78,7 @@ export class KeyPlayCardView extends React.Component {
|
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
render() {
|
|
80
|
-
const { clipID, description, isPlaying, playbackProgress,
|
|
81
|
-
// isScoring,
|
|
82
|
-
focused,
|
|
83
|
-
// awayTeamScore,
|
|
84
|
-
// homeTeamScore,
|
|
85
|
-
// homeTeamName,
|
|
86
|
-
// awayTeamName,
|
|
87
|
-
} = this.props;
|
|
81
|
+
const { clipID, description, isPlaying, playbackProgress, isScoring, focused, awayTeamScore, homeTeamScore, homeTeamName, awayTeamName, } = this.props;
|
|
88
82
|
const { failedClip } = this.state;
|
|
89
83
|
return (React.createElement("div", { className: "key-play-card focus-ring", id: clipID, "data-focused": focused },
|
|
90
84
|
React.createElement("div", { className: "key-play-card-content" },
|
|
@@ -93,6 +87,7 @@ export class KeyPlayCardView extends React.Component {
|
|
|
93
87
|
React.createElement("div", { className: "text-content T05_ALT" },
|
|
94
88
|
React.createElement("div", { className: "multi-line" }, description))),
|
|
95
89
|
isPlaying && playbackProgress !== null && (React.createElement("progress", { value: playbackProgress, max: "1" })),
|
|
90
|
+
isScoring && (React.createElement(ScoreCard, { awayTeamScore: awayTeamScore, homeTeamScore: homeTeamScore, homeTeamName: homeTeamName, awayTeamName: awayTeamName })),
|
|
96
91
|
failedClip === 'recentFailure' && (React.createElement("div", { className: "error-state" },
|
|
97
92
|
React.createElement("div", { className: "error-state-inner" },
|
|
98
93
|
React.createElement("div", { className: "error-state-text" },
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import './TeamsView.styles.css';
|
|
3
3
|
import Image from '@/components/atoms/Image';
|
|
4
4
|
import { withFocusable, } from '@/external/spatial-navigation';
|
|
5
|
+
import { CarouselSlider, StatsCarousel } from './StatsCarousel';
|
|
6
|
+
import { renderTeamStatistic } from '../../utils/renderTeamStatistic';
|
|
5
7
|
const Teams = (props) => {
|
|
6
8
|
const item = props.item;
|
|
7
9
|
const teams = [item.awayTeam, item.homeTeam];
|
|
@@ -22,6 +24,20 @@ const Teams = (props) => {
|
|
|
22
24
|
item.linescoresHeader.map((header) => (React.createElement("th", { key: header, className: "T10" }, header))))),
|
|
23
25
|
React.createElement("tbody", null, teams.map((team) => (React.createElement("tr", { key: team.id },
|
|
24
26
|
React.createElement("td", { className: "T30 FONT_BOLD" }, team.name),
|
|
25
|
-
team.linescores.map((lineScore, index) => (React.createElement("td", { key: `${lineScore}-${index}`, className: "T10" }, lineScore))))))))
|
|
27
|
+
team.linescores.map((lineScore, index) => (React.createElement("td", { key: `${lineScore}-${index}`, className: "T10" }, lineScore)))))))),
|
|
28
|
+
item.statistics && item.statistics.length > 0 && (React.createElement(StatsCarousel, { itemsLength: item.statistics.length }, item.statistics.map((statistic) => (React.createElement(CarouselSlider, { itemsLength: item.statistics.length, key: statistic.displayName }, renderTeamStatistic({
|
|
29
|
+
statisticName: statistic.displayName,
|
|
30
|
+
firstDisplayValue: statistic.awayTeamDisplayValue,
|
|
31
|
+
secondDisplayValue: statistic.homeTeamDisplayValue,
|
|
32
|
+
awayProgressValue: statistic.awayTeamValue,
|
|
33
|
+
homeProgressValue: statistic.homeTeamValue,
|
|
34
|
+
classNames: {
|
|
35
|
+
container: 'score-statistics',
|
|
36
|
+
header: 'score-statistics-header',
|
|
37
|
+
firstValue: 'T30 FONT_BOLD',
|
|
38
|
+
secondValue: 'T30 FONT_BOLD',
|
|
39
|
+
statisticName: 'statistic-name T02',
|
|
40
|
+
},
|
|
41
|
+
}))))))))));
|
|
26
42
|
};
|
|
27
43
|
export default withFocusable()(Teams);
|