@maestro_io/maestro-web-sdk 2.2.8 → 2.2.9

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.
@@ -1,9 +1,9 @@
1
1
  type TeamId = string;
2
2
  type AthleteId = string;
3
3
  export default interface IMaestroKeyPlaysResponse {
4
- entities: {
5
- team: Record<TeamId, IMaestroKeyPlaysTeam>;
6
- athlete: Record<AthleteId, MaestroKeyPlaysAthlete>;
4
+ entities?: {
5
+ team?: Record<TeamId, IMaestroKeyPlaysTeam>;
6
+ athlete?: Record<AthleteId, MaestroKeyPlaysAthlete>;
7
7
  };
8
8
  sections: MaestroKeyPlaysSection[];
9
9
  }
@@ -24,7 +24,7 @@ interface MaestroKeyPlaysAthlete {
24
24
  headshot: string;
25
25
  }
26
26
  interface MaestroKeyPlaysSection {
27
- title: string;
27
+ title?: string;
28
28
  items: MaestroKeyPlay[];
29
29
  }
30
30
  interface MaestroKeyPlay {
@@ -5,5 +5,5 @@ export default class ScoreCard extends React.Component<{
5
5
  homeTeamName: string;
6
6
  awayTeamName: string;
7
7
  }, {}> {
8
- render(): React.JSX.Element;
8
+ render(): React.JSX.Element | null;
9
9
  }
@@ -15,10 +15,6 @@ type KeyPlaysCardViewState = {
15
15
  export declare class KeyPlayCardView extends React.Component<KeyPlayCardViewProps & WithFocusableProps, KeyPlaysCardViewState> {
16
16
  private failedClipListener;
17
17
  private vm;
18
- state: {
19
- failedClip: null;
20
- imageLoaded: boolean;
21
- };
22
18
  constructor(props: KeyPlayCardViewProps);
23
19
  componentDidMount(): void;
24
20
  componentWillUnmount(): void;
@@ -1,26 +1,11 @@
1
1
  import React, { Component } from 'react';
2
2
  import './KeyPlaysView.styles.css';
3
3
  import { KeyPlaysErrorState } from '../interfaces/IKeyPlays';
4
- interface IKeyPlayItem {
5
- id: string;
6
- clipID: string;
7
- awayTeamScore?: number;
8
- homeTeamScore?: number;
9
- awayTeamName: string;
10
- homeTeamName: string;
11
- description: string;
12
- playerImageUrl: string;
13
- teamImageUrl: string;
14
- thumbnailImageUrl: string;
15
- }
16
- interface IKeyPlaySection {
17
- title: string;
18
- items: IKeyPlayItem[];
19
- }
4
+ import { KeyPlayItem } from '../view-model/KeyPlaysViewModel';
20
5
  interface IKeyPlaysState {
21
6
  playbackProgress: number | null;
22
7
  playbackIndex: number | null;
23
- items: IKeyPlaySection[];
8
+ items: KeyPlayItem[];
24
9
  scrollableContainer: HTMLDivElement | null;
25
10
  }
26
11
  export declare class KeyPlays extends Component<{}, IKeyPlaysState> {
@@ -2,8 +2,8 @@ import IMaestroKeyPlaysResponse from '../interfaces/IKeyPlaysResponse';
2
2
  import IKeyPlay, { KeyPlayLoadFailureStatus, KeyPlaysErrorState } from '../interfaces/IKeyPlays';
3
3
  import { Observable } from '@/helpers/Observable';
4
4
  import AnalyticsService from '@/services/AnalyticsService/AnalyticsService';
5
- type KeyPlayItem = {
6
- title: string;
5
+ export type KeyPlayItem = {
6
+ title?: string;
7
7
  items: IKeyPlay[];
8
8
  };
9
9
  declare class KeyPlaysViewModel {
@@ -1,3 +1,4 @@
1
+ /// <reference types="prop-types" />
1
2
  import React from 'react';
2
3
  import { WithFocusableProps } from '@/external/spatial-navigation';
3
4
  import { DrivePlay } from '../../interfaces/IStats';
@@ -13,14 +14,47 @@ type DrivePlayCardProps = {
13
14
  onArrowPress?: (direction: Direction, props: any) => boolean | void;
14
15
  parentFocusKey?: string;
15
16
  };
16
- export default class DrivePlayCard extends React.Component<DrivePlayCardProps & WithFocusableProps> {
17
- static contextTypes: {
18
- refsMap: React.Requireable<any>;
19
- setRef: React.Requireable<any>;
20
- scrollToFocusedElement: React.Requireable<any>;
17
+ declare const _default: {
18
+ new (props?: (DrivePlayCardProps & WithFocusableProps) | undefined, context?: any): {
19
+ state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
20
+ navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
21
+ getChildContext(): {
22
+ parentFocusKey: string;
23
+ };
24
+ setFocus: (focusKey: string) => void;
25
+ navigateByDirection: (direction: Direction, details?: Record<string, any>) => void;
26
+ stealFocus: () => void;
27
+ onUpdateFocus: (focused: boolean) => void;
28
+ onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
29
+ onEnterPressHandler: (details: import("@/external/spatial-navigation/utils").Details) => void;
30
+ onEnterReleaseHandler: () => void;
31
+ onBackPressHandler: (details: import("@/external/spatial-navigation/utils").Details) => void;
32
+ onArrowPressHandler: (direction: Direction, details: import("@/external/spatial-navigation/utils").Details) => boolean | void;
33
+ onBecameFocusedHandler: (layout: Layout, details: import("@/external/spatial-navigation/utils").Details) => void;
34
+ onBecameBlurredHandler: (layout: Layout, details: import("@/external/spatial-navigation/utils").Details) => void;
35
+ componentDidMount(): void;
36
+ componentDidUpdate(): void;
37
+ componentWillUnmount(): void;
38
+ render(): React.ReactElement<DrivePlayCardProps & WithFocusableProps>;
39
+ setState<K extends keyof import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>(state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | ((prevState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, props: DrivePlayCardProps & WithFocusableProps) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>, callback?: (() => any) | undefined): void;
40
+ forceUpdate(callBack?: (() => any) | undefined): void;
41
+ props: Readonly<{
42
+ children?: React.ReactNode;
43
+ }> & Readonly<DrivePlayCardProps & WithFocusableProps>;
44
+ context: any;
45
+ refs: {
46
+ [key: string]: React.ReactInstance;
47
+ };
48
+ componentWillMount?(): void;
49
+ componentWillReceiveProps?(nextProps: Readonly<DrivePlayCardProps & WithFocusableProps>, nextContext: any): void;
50
+ shouldComponentUpdate?(nextProps: Readonly<DrivePlayCardProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
51
+ componentWillUpdate?(nextProps: Readonly<DrivePlayCardProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
21
52
  };
22
- context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
23
- onBecameFocused: (layout: Layout) => void;
24
- render(): React.JSX.Element;
25
- }
26
- export {};
53
+ contextTypes: {
54
+ parentFocusKey: import("prop-types").Requireable<string>;
55
+ };
56
+ childContextTypes: {
57
+ parentFocusKey: import("prop-types").Requireable<string>;
58
+ };
59
+ };
60
+ export default _default;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { WithFocusableProps } from '@/external/spatial-navigation';
3
- import { Layout } from '@/external/spatial-navigation/utils';
4
3
  import './DriveSummary.styles.css';
5
4
  import { DriveSummaryItem } from '../../view-model/StatsViewModel';
6
5
  type DriveSummaryProps = {
@@ -8,16 +7,9 @@ type DriveSummaryProps = {
8
7
  onItemEnterPress: () => void;
9
8
  };
10
9
  export default class DriveSummary extends React.Component<DriveSummaryProps & WithFocusableProps> {
11
- static contextTypes: {
12
- refsMap: React.Requireable<any>;
13
- setRef: React.Requireable<any>;
14
- scrollToFocusedElement: React.Requireable<any>;
15
- };
16
- context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
17
10
  state: {
18
11
  expanded: boolean;
19
12
  };
20
- onBecameFocused: (layout: Layout) => void;
21
13
  handleEnterPress: (_props: any, _details: any) => void;
22
14
  collapseCard: () => void;
23
15
  render(): React.JSX.Element;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { DrivePlay } from '../../../interfaces/IStats';
3
+ import { Direction } from '@/external/spatial-navigation/utils';
4
+ import './DriveSummaryExpanded.styles.css';
5
+ type Props = {
6
+ plays: DrivePlay[];
7
+ id: string;
8
+ parentFocusKey?: string;
9
+ collapseCard: () => void;
10
+ onItemEnterPress: () => void;
11
+ };
12
+ declare class DriveSummaryExpanded extends React.Component<Props> {
13
+ refsArray: HTMLDivElement[];
14
+ transitionEndListenerAttached: boolean;
15
+ transitionEndHandler: (() => void) | null;
16
+ wrapperRef: HTMLDivElement | null;
17
+ state: {
18
+ maxHeight: string;
19
+ focusedIndex: number;
20
+ };
21
+ onPlayArrowPress: (index: number) => (direction: Direction, _props: any) => false | undefined;
22
+ updateMaxHeight(focusedIndex: number): void;
23
+ scrollToElement(focusedIndex: number): void;
24
+ onBecameFocused: (focusedIndex: number) => () => void;
25
+ render(): React.JSX.Element;
26
+ }
27
+ export default DriveSummaryExpanded;
@@ -0,0 +1,13 @@
1
+ import './DriveSummaryHeader.styles.css';
2
+ import React from 'react';
3
+ type Props = {
4
+ team: {
5
+ displayName: string;
6
+ logo?: string;
7
+ };
8
+ expanded: boolean;
9
+ focused: boolean;
10
+ hasPlays: boolean;
11
+ };
12
+ declare const DriveSummaryHeader: (props: Props) => React.JSX.Element;
13
+ export default DriveSummaryHeader;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import './MainStat.styles.css';
3
+ type Props = {
4
+ playsQuantity: string;
5
+ yards: string;
6
+ time: string;
7
+ lastPlayMarquee?: string;
8
+ focused: boolean;
9
+ };
10
+ declare const MainStat: (props: Props) => React.JSX.Element;
11
+ export default MainStat;
@@ -1,18 +1,52 @@
1
- import React, { Component } from 'react';
1
+ /// <reference types="prop-types" />
2
+ import React from 'react';
2
3
  import './MatchPredictorView.styles.css';
3
4
  import { WithFocusableProps } from '@/external/spatial-navigation';
4
- import { Layout } from '@/external/spatial-navigation/utils';
5
5
  import { StatsMatchPredictorItem } from '../../view-model/StatsViewModel';
6
6
  export interface MatchPredictorProps {
7
7
  item: StatsMatchPredictorItem;
8
8
  }
9
- export default class MatchPredictorView extends Component<MatchPredictorProps & WithFocusableProps> {
10
- static contextTypes: {
11
- refsMap: React.Requireable<any>;
12
- setRef: React.Requireable<any>;
13
- scrollToFocusedElement: React.Requireable<any>;
9
+ declare const _default: {
10
+ new (props?: (MatchPredictorProps & WithFocusableProps) | undefined, context?: any): {
11
+ state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState;
12
+ navigation: import("../../../../external/spatial-navigation/spatialNavigation").default;
13
+ getChildContext(): {
14
+ parentFocusKey: string;
15
+ };
16
+ setFocus: (focusKey: string) => void;
17
+ navigateByDirection: (direction: import("../../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
18
+ stealFocus: () => void;
19
+ onUpdateFocus: (focused: boolean) => void;
20
+ onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
21
+ onEnterPressHandler: (details: import("../../../../external/spatial-navigation/utils").Details) => void;
22
+ onEnterReleaseHandler: () => void;
23
+ onBackPressHandler: (details: import("../../../../external/spatial-navigation/utils").Details) => void;
24
+ onArrowPressHandler: (direction: import("../../../../external/spatial-navigation/utils").Direction, details: import("../../../../external/spatial-navigation/utils").Details) => boolean | void;
25
+ onBecameFocusedHandler: (layout: import("../../../../external/spatial-navigation/utils").Layout, details: import("../../../../external/spatial-navigation/utils").Details) => void;
26
+ onBecameBlurredHandler: (layout: import("../../../../external/spatial-navigation/utils").Layout, details: import("../../../../external/spatial-navigation/utils").Details) => void;
27
+ componentDidMount(): void;
28
+ componentDidUpdate(): void;
29
+ componentWillUnmount(): void;
30
+ render(): React.ReactElement<MatchPredictorProps & WithFocusableProps>;
31
+ setState<K extends keyof import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>(state: import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | ((prevState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, props: MatchPredictorProps & WithFocusableProps) => import("../../../../external/spatial-navigation/withFocusable").WithFocusableState | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>) | Pick<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState, K>, callback?: (() => any) | undefined): void;
32
+ forceUpdate(callBack?: (() => any) | undefined): void;
33
+ props: Readonly<{
34
+ children?: React.ReactNode;
35
+ }> & Readonly<MatchPredictorProps & WithFocusableProps>;
36
+ context: any;
37
+ refs: {
38
+ [key: string]: React.ReactInstance;
39
+ };
40
+ componentWillMount?(): void;
41
+ componentWillReceiveProps?(nextProps: Readonly<MatchPredictorProps & WithFocusableProps>, nextContext: any): void;
42
+ shouldComponentUpdate?(nextProps: Readonly<MatchPredictorProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
43
+ componentWillUpdate?(nextProps: Readonly<MatchPredictorProps & WithFocusableProps>, nextState: Readonly<import("../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
14
44
  };
15
- context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
16
- onBecameFocused: (layout: Layout) => void;
17
- render(): React.JSX.Element;
18
- }
45
+ contextTypes: {
46
+ parentFocusKey: import("prop-types").Requireable<string>;
47
+ };
48
+ childContextTypes: {
49
+ parentFocusKey: import("prop-types").Requireable<string>;
50
+ };
51
+ };
52
+ export default _default;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maestro_io/maestro-web-sdk",
3
3
  "private": false,
4
- "version": "2.2.8",
4
+ "version": "2.2.9",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "main": "dist/maestro-web-sdk.umd.js",