@maestro_io/maestro-web-sdk 1.0.0 → 2.0.1
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/MaestroEventDelegate.d.ts +9 -0
- package/dist/components/atoms/BaseButton/BaseButton.d.ts +9 -0
- package/dist/components/atoms/BaseButton/index.d.ts +2 -0
- package/dist/components/atoms/Image/index.d.ts +9 -0
- package/dist/components/atoms/SvgIcon/BetsIcon.d.ts +7 -0
- package/dist/components/atoms/SvgIcon/FantasyIcon.d.ts +6 -0
- package/dist/components/atoms/SvgIcon/Icon.d.ts +28 -0
- package/dist/components/atoms/SvgIcon/KeyPlaysIcon.d.ts +6 -0
- package/dist/components/atoms/SvgIcon/PlayIcon.d.ts +6 -0
- package/dist/components/atoms/SvgIcon/StatsIcon.d.ts +6 -0
- package/dist/components/atoms/SvgIcon/WarningIcon.d.ts +6 -0
- package/dist/components/atoms/SvgIcon/index.d.ts +2 -0
- package/dist/components/core/App/App.d.ts +10 -0
- package/dist/components/core/App/index.d.ts +2 -0
- package/dist/components/core/PanelManager/PanelManager.d.ts +14 -0
- package/dist/components/core/PanelManager/index.d.ts +2 -0
- package/dist/components/molecules/ActionButton/ActionButton.d.ts +50 -0
- package/dist/components/molecules/ActionButton/index.d.ts +2 -0
- package/dist/components/molecules/PanelNavButton/PanelNavButton.d.ts +107 -0
- package/dist/components/molecules/PanelNavButton/index.d.ts +2 -0
- package/dist/components/molecules/ScrollableGradient/ScrollableGradient.d.ts +11 -0
- package/dist/components/molecules/ScrollableGradient/index.d.ts +2 -0
- package/dist/components/molecules/SegmentButton/SegmentButton.d.ts +10 -0
- package/dist/components/molecules/SegmentButton/index.d.ts +2 -0
- package/dist/components/molecules/WatchButton/WatchButton.d.ts +10 -0
- package/dist/components/molecules/WatchButton/index.d.ts +2 -0
- package/dist/components/organisms/PanelNavigation/PanelNavigation.d.ts +15 -0
- package/dist/components/organisms/PanelNavigation/index.d.ts +2 -0
- package/dist/components/organisms/SegmentController/SegmentController.d.ts +14 -0
- package/dist/components/organisms/SegmentController/index.d.ts +2 -0
- package/dist/external/AxiosNetworkClient.d.ts +15 -0
- package/dist/external/LocalStorageCacheManager.d.ts +10 -0
- package/dist/external/ReactRenderer.d.ts +26 -0
- package/dist/external/ports/cacheManager.d.ts +15 -0
- package/dist/external/ports/networkClient.d.ts +5 -0
- package/dist/external/ports/renderer.d.ts +9 -0
- package/dist/external/spatial-navigation/index.d.ts +5 -0
- package/dist/external/spatial-navigation/measureLayout.d.ts +2 -0
- package/dist/external/spatial-navigation/spatialNavigation.d.ts +166 -0
- package/dist/external/spatial-navigation/utils.d.ts +15 -0
- package/dist/external/spatial-navigation/visualDebugger.d.ts +17 -0
- package/dist/external/spatial-navigation/withFocusable.d.ts +81 -0
- package/dist/helpers/Observable.d.ts +12 -0
- package/dist/helpers/deliver-focus.d.ts +5 -0
- package/dist/helpers/withRemoteControl.d.ts +47 -0
- package/dist/index.d.ts +60 -382
- package/dist/interfaces/IMaestroEvent.d.ts +62 -0
- package/dist/interfaces/IMaestroEventDelegate.d.ts +18 -0
- package/dist/interfaces/IMaestroManager.d.ts +82 -0
- package/dist/maestro-web-sdk.umd.js +2 -3
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/models/IModel.d.ts +7 -0
- package/dist/models/IPanel.d.ts +20 -0
- package/dist/models/ITheme.d.ts +77 -0
- package/dist/modules/key-plays/constants.d.ts +3 -0
- package/dist/modules/key-plays/interfaces/IKeyPlays.d.ts +31 -0
- package/dist/modules/key-plays/interfaces/IKeyPlaysResponse.d.ts +44 -0
- package/dist/modules/key-plays/view/KeyPlayCardScoreTagView.d.ts +9 -0
- package/dist/modules/key-plays/view/KeyPlayCardView.d.ts +115 -0
- package/dist/modules/key-plays/view/KeyPlayErrorStateView.d.ts +11 -0
- package/dist/modules/key-plays/view/KeyPlaysView.d.ts +53 -0
- package/dist/modules/key-plays/view-model/KeyPlaysViewModel.d.ts +29 -0
- package/dist/services/NetworkManager.d.ts +13 -0
- package/dist/services/ThemeManager/constants.d.ts +2 -0
- package/dist/view-models/MaestroEventViewModel.d.ts +37 -0
- package/dist/view-models/PanelManagerViewModel.d.ts +18 -0
- package/dist/view-models/ViewModel.d.ts +12 -0
- package/dist/view-models/index.d.ts +17 -0
- package/package.json +64 -36
- package/dist/BetsIcon-UrnN4lvP.js +0 -22
- package/dist/BetsIcon-UrnN4lvP.js.map +0 -1
- package/dist/FantasyIcon-DmloKsq_.js +0 -24
- package/dist/FantasyIcon-DmloKsq_.js.map +0 -1
- package/dist/KeyPlayErrorStateView-Dk89rtUq.js +0 -112
- package/dist/KeyPlayErrorStateView-Dk89rtUq.js.map +0 -1
- package/dist/KeyPlaysIcon-Br9gu_Zu.js +0 -24
- package/dist/KeyPlaysIcon-Br9gu_Zu.js.map +0 -1
- package/dist/KeyPlaysView-Br-88ytG.js +0 -174
- package/dist/KeyPlaysView-Br-88ytG.js.map +0 -1
- package/dist/PlayIcon-CNKWNaLP.js +0 -24
- package/dist/PlayIcon-CNKWNaLP.js.map +0 -1
- package/dist/StatsIcon-Ds4hriWX.js +0 -25
- package/dist/StatsIcon-Ds4hriWX.js.map +0 -1
- package/dist/WarningIcon-BuzZKL26.js +0 -24
- package/dist/WarningIcon-BuzZKL26.js.map +0 -1
- package/dist/index-BaSckwps.js +0 -2998
- package/dist/index-BaSckwps.js.map +0 -1
- package/dist/index-DXErYNZH.js +0 -151
- package/dist/index-DXErYNZH.js.map +0 -1
- package/dist/index-q5GKgbOd.js +0 -56
- package/dist/index-q5GKgbOd.js.map +0 -1
- package/dist/maestro-web-sdk.esm.js +0 -6
- package/dist/maestro-web-sdk.esm.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const MaestroPanelType: {
|
|
2
|
+
readonly KEY_PLAYS: "keyPlays";
|
|
3
|
+
readonly STATS: "stats";
|
|
4
|
+
readonly FANTASY: "fantasy";
|
|
5
|
+
readonly BETS: "bets";
|
|
6
|
+
};
|
|
7
|
+
export type MaestroPanelType = (typeof MaestroPanelType)[keyof typeof MaestroPanelType];
|
|
8
|
+
export interface PanelTypeInfo {
|
|
9
|
+
id: MaestroPanelType;
|
|
10
|
+
name: string;
|
|
11
|
+
imageNamePrefix: string;
|
|
12
|
+
usesSectionHeaders: boolean;
|
|
13
|
+
iconName: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const PANEL_TYPE_INFO: Record<MaestroPanelType, PanelTypeInfo>;
|
|
16
|
+
export declare const getPanelName: (panelType: MaestroPanelType) => string;
|
|
17
|
+
export declare const getImageNamePrefix: (panelType: MaestroPanelType) => string;
|
|
18
|
+
export declare const usesSectionHeaders: (panelType: MaestroPanelType) => boolean;
|
|
19
|
+
export declare const getIconName: (panelType: MaestroPanelType) => string;
|
|
20
|
+
export declare const getAllPanelTypes: () => MaestroPanelType[];
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import IModel from './IModel';
|
|
2
|
+
type ObjectValues<T> = T[keyof T];
|
|
3
|
+
export default interface ITheme extends IModel {
|
|
4
|
+
button: IThemeButton;
|
|
5
|
+
channelOfflineThumbnail?: string;
|
|
6
|
+
colors: IThemeColors;
|
|
7
|
+
creator: string;
|
|
8
|
+
desktopBackground?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
logo?: string;
|
|
11
|
+
mobileBackground?: string;
|
|
12
|
+
mode?: ThemeModes;
|
|
13
|
+
name: string;
|
|
14
|
+
owner: string;
|
|
15
|
+
siteId?: string;
|
|
16
|
+
type: ThemeTypes;
|
|
17
|
+
typography: IThemeTypography;
|
|
18
|
+
}
|
|
19
|
+
export interface IThemeColors {
|
|
20
|
+
accentPrimary: string;
|
|
21
|
+
accentSecondary: string;
|
|
22
|
+
accentTertiary: string;
|
|
23
|
+
alertConfirmation: string;
|
|
24
|
+
alertError: string;
|
|
25
|
+
alertWarning: string;
|
|
26
|
+
highlightPrimary: string;
|
|
27
|
+
highlightSecondary: string;
|
|
28
|
+
highlightTertiary: string;
|
|
29
|
+
surface1: string;
|
|
30
|
+
surface2: string;
|
|
31
|
+
surface3: string;
|
|
32
|
+
surface4: string;
|
|
33
|
+
surface5: string;
|
|
34
|
+
surface6: string;
|
|
35
|
+
text100: string;
|
|
36
|
+
text200: string;
|
|
37
|
+
text300: string;
|
|
38
|
+
text400: string;
|
|
39
|
+
text500: string;
|
|
40
|
+
}
|
|
41
|
+
export interface IThemeButton {
|
|
42
|
+
borderRadius: BorderRadius;
|
|
43
|
+
textCapitalization: TextCapitalization;
|
|
44
|
+
}
|
|
45
|
+
export interface IThemeTypography {
|
|
46
|
+
body: string;
|
|
47
|
+
headline: string;
|
|
48
|
+
}
|
|
49
|
+
export interface IClassicThemeOptions {
|
|
50
|
+
accentPrimary: string;
|
|
51
|
+
accentSecondary: string;
|
|
52
|
+
}
|
|
53
|
+
export declare const BORDER_RADIUS: {
|
|
54
|
+
readonly rounded: "rounded";
|
|
55
|
+
readonly square: "square";
|
|
56
|
+
readonly pill: "pill";
|
|
57
|
+
};
|
|
58
|
+
export type BorderRadius = ObjectValues<typeof BORDER_RADIUS>;
|
|
59
|
+
export declare const TEXT_CAPITALIZATION: {
|
|
60
|
+
readonly lowercase: "lowercase";
|
|
61
|
+
readonly original: "original";
|
|
62
|
+
readonly uppercase: "uppercase";
|
|
63
|
+
};
|
|
64
|
+
export type TextCapitalization = ObjectValues<typeof TEXT_CAPITALIZATION>;
|
|
65
|
+
export declare const THEME_TYPES: {
|
|
66
|
+
readonly ADMIN: "admin";
|
|
67
|
+
readonly ADVANCED: "advanced";
|
|
68
|
+
readonly CLASSIC: "classic";
|
|
69
|
+
readonly CUSTOM: "custom";
|
|
70
|
+
};
|
|
71
|
+
export type ThemeTypes = ObjectValues<typeof THEME_TYPES>;
|
|
72
|
+
export declare const THEME_MODES: {
|
|
73
|
+
readonly DARK: "dark";
|
|
74
|
+
readonly LIGHT: "light";
|
|
75
|
+
};
|
|
76
|
+
export type ThemeModes = ObjectValues<typeof THEME_MODES>;
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import IMaestroKeyPlaysResponse from './interfaces/IKeyPlaysResponse';
|
|
2
|
+
export declare const KEY_PLAYS_RESPONSE_MOCK_DATA: IMaestroKeyPlaysResponse;
|
|
3
|
+
export declare const BASE_64_KEY_PLAY_THUMBNAIL_FALLBACK = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCACQALgDAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+O4tkcn0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HUq6MAysrDDKynIZWBIIIIIODxQB8k/ETwuPDGuH7MpGmakr3ViAPlhw/+kWYPf7O7IU/6YSwhizbyZenoUn/XyOA3/j3/AM/5/KkPRAD/2Q==";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export default interface IKeyPlay {
|
|
2
|
+
id: string;
|
|
3
|
+
description: string;
|
|
4
|
+
homeTeamName: string;
|
|
5
|
+
awayTeamName: string;
|
|
6
|
+
homeTeamScore?: number;
|
|
7
|
+
awayTeamScore?: number;
|
|
8
|
+
clipID: string;
|
|
9
|
+
teamImageUrl?: string;
|
|
10
|
+
playerImageUrl?: string;
|
|
11
|
+
thumbnailImageUrl?: string;
|
|
12
|
+
section?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const KEY_PLAYS_LOAD_FAILURE_STATUS: {
|
|
15
|
+
readonly noFailure: "noFailure";
|
|
16
|
+
readonly recentFailure: "recentFailure";
|
|
17
|
+
readonly nonRecentFailure: "nonRecentFailure";
|
|
18
|
+
};
|
|
19
|
+
type KeyPlayLoadFailureStatus = (typeof KEY_PLAYS_LOAD_FAILURE_STATUS)[keyof typeof KEY_PLAYS_LOAD_FAILURE_STATUS];
|
|
20
|
+
export declare const KEY_PLAYS_ERROR_STATE: {
|
|
21
|
+
readonly unsupportedEvent: "unsupportedEvent";
|
|
22
|
+
readonly unpopulatedEvent: "unpopulatedEvent";
|
|
23
|
+
readonly tabLoadFailure: "tabLoadFailure";
|
|
24
|
+
};
|
|
25
|
+
type KeyPlaysErrorState = (typeof KEY_PLAYS_ERROR_STATE)[keyof typeof KEY_PLAYS_ERROR_STATE];
|
|
26
|
+
export declare const KEY_PLAYS_PANEL_SCROLL_VIEW_ITEM_TYPE: {
|
|
27
|
+
readonly keyPlay: "keyPlay";
|
|
28
|
+
readonly sectionHeader: "sectionHeader";
|
|
29
|
+
};
|
|
30
|
+
type KeyPlaysPanelScrollViewItemType = (typeof KEY_PLAYS_PANEL_SCROLL_VIEW_ITEM_TYPE)[keyof typeof KEY_PLAYS_PANEL_SCROLL_VIEW_ITEM_TYPE];
|
|
31
|
+
export { type KeyPlaysPanelScrollViewItemType, type KeyPlayLoadFailureStatus, type KeyPlaysErrorState, };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
type TeamId = string;
|
|
2
|
+
type AthleteId = string;
|
|
3
|
+
export default interface IMaestroKeyPlaysResponse {
|
|
4
|
+
entities: {
|
|
5
|
+
team: Record<TeamId, IMaestroKeyPlaysTeam>;
|
|
6
|
+
athlete: Record<AthleteId, MaestroKeyPlaysAthlete>;
|
|
7
|
+
};
|
|
8
|
+
sections: MaestroKeyPlaysSection[];
|
|
9
|
+
}
|
|
10
|
+
interface IMaestroKeyPlaysTeam {
|
|
11
|
+
id: string;
|
|
12
|
+
displayName: string;
|
|
13
|
+
shortName: string;
|
|
14
|
+
color: string;
|
|
15
|
+
alternateColor: string;
|
|
16
|
+
homeAway: string;
|
|
17
|
+
displayOrder: string;
|
|
18
|
+
logoRef: string;
|
|
19
|
+
logoDarkRef: string;
|
|
20
|
+
}
|
|
21
|
+
interface MaestroKeyPlaysAthlete {
|
|
22
|
+
id: string;
|
|
23
|
+
shortName: string;
|
|
24
|
+
headshot: string;
|
|
25
|
+
}
|
|
26
|
+
interface MaestroKeyPlaysSection {
|
|
27
|
+
title: string;
|
|
28
|
+
items: MaestroKeyPlay[];
|
|
29
|
+
}
|
|
30
|
+
interface MaestroKeyPlay {
|
|
31
|
+
description: string;
|
|
32
|
+
team: string;
|
|
33
|
+
wallClock: string;
|
|
34
|
+
displayClock: string;
|
|
35
|
+
shortPeriod: string;
|
|
36
|
+
scoringPlay: boolean;
|
|
37
|
+
athlete: string;
|
|
38
|
+
thumbnail: string;
|
|
39
|
+
thumbnailType: string;
|
|
40
|
+
clipID: string;
|
|
41
|
+
awayScore?: string;
|
|
42
|
+
homeScore?: string;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/// <reference types="prop-types" />
|
|
2
|
+
import IKeyPlay from '../interfaces/IKeyPlays';
|
|
3
|
+
import './KeyPlayCardView.styles.css';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
6
|
+
import { RemoteControlProps } from '@/helpers/withRemoteControl';
|
|
7
|
+
type KeyPlayCardViewProps = IKeyPlay & {
|
|
8
|
+
isPlaying: boolean;
|
|
9
|
+
playbackProgress: number | null;
|
|
10
|
+
isScoring: boolean;
|
|
11
|
+
setFocus?: (focusKey: string) => void;
|
|
12
|
+
focused?: boolean;
|
|
13
|
+
setRef: (ref: HTMLDivElement | null) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare class KeyPlayCard extends React.Component<KeyPlayCardViewProps & WithFocusableProps & RemoteControlProps> {
|
|
16
|
+
private ref;
|
|
17
|
+
setRef: (ref: HTMLDivElement | null) => void;
|
|
18
|
+
handleLeftPressed: () => void;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: {
|
|
22
|
+
new (props?: (IKeyPlay & {
|
|
23
|
+
isPlaying: boolean;
|
|
24
|
+
playbackProgress: number | null;
|
|
25
|
+
isScoring: boolean;
|
|
26
|
+
setFocus?: ((focusKey: string) => void) | undefined;
|
|
27
|
+
focused?: boolean | undefined;
|
|
28
|
+
setRef: (ref: HTMLDivElement | null) => void;
|
|
29
|
+
} & WithFocusableProps & RemoteControlProps) | undefined, context?: any): {
|
|
30
|
+
state: import("../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
31
|
+
getChildContext(): {
|
|
32
|
+
parentFocusKey: string;
|
|
33
|
+
};
|
|
34
|
+
setFocus: (focusKey: string) => void;
|
|
35
|
+
navigateByDirection: (direction: import("../../../external/spatial-navigation/utils").Direction, details?: Record<string, any>) => void;
|
|
36
|
+
stealFocus: () => void;
|
|
37
|
+
onUpdateFocus: (focused: boolean) => void;
|
|
38
|
+
onUpdateHasFocusedChild: (hasFocusedChild: boolean) => void;
|
|
39
|
+
onEnterPressHandler: (details: {
|
|
40
|
+
pressedKeys: Record<string, number>;
|
|
41
|
+
}) => void;
|
|
42
|
+
onEnterReleaseHandler: () => void;
|
|
43
|
+
onArrowPressHandler: (direction: import("../../../external/spatial-navigation/utils").Direction, details: {
|
|
44
|
+
pressedKeys: Record<string, number>;
|
|
45
|
+
}) => boolean | void;
|
|
46
|
+
onBecameFocusedHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: any) => void;
|
|
47
|
+
onBecameBlurredHandler: (layout: import("../../../external/spatial-navigation/utils").Layout, details: any) => void;
|
|
48
|
+
componentDidMount(): void;
|
|
49
|
+
componentDidUpdate(): void;
|
|
50
|
+
componentWillUnmount(): void;
|
|
51
|
+
render(): React.ReactElement<IKeyPlay & {
|
|
52
|
+
isPlaying: boolean;
|
|
53
|
+
playbackProgress: number | null;
|
|
54
|
+
isScoring: boolean;
|
|
55
|
+
setFocus?: ((focusKey: string) => void) | undefined;
|
|
56
|
+
focused?: boolean | undefined;
|
|
57
|
+
setRef: (ref: HTMLDivElement | null) => void;
|
|
58
|
+
} & WithFocusableProps & RemoteControlProps>;
|
|
59
|
+
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: IKeyPlay & {
|
|
60
|
+
isPlaying: boolean;
|
|
61
|
+
playbackProgress: number | null;
|
|
62
|
+
isScoring: boolean;
|
|
63
|
+
setFocus?: ((focusKey: string) => void) | undefined;
|
|
64
|
+
focused?: boolean | undefined;
|
|
65
|
+
setRef: (ref: HTMLDivElement | null) => void;
|
|
66
|
+
} & WithFocusableProps & RemoteControlProps) => 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;
|
|
67
|
+
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
68
|
+
props: Readonly<{
|
|
69
|
+
children?: React.ReactNode;
|
|
70
|
+
}> & Readonly<IKeyPlay & {
|
|
71
|
+
isPlaying: boolean;
|
|
72
|
+
playbackProgress: number | null;
|
|
73
|
+
isScoring: boolean;
|
|
74
|
+
setFocus?: ((focusKey: string) => void) | undefined;
|
|
75
|
+
focused?: boolean | undefined;
|
|
76
|
+
setRef: (ref: HTMLDivElement | null) => void;
|
|
77
|
+
} & WithFocusableProps & RemoteControlProps>;
|
|
78
|
+
context: any;
|
|
79
|
+
refs: {
|
|
80
|
+
[key: string]: React.ReactInstance;
|
|
81
|
+
};
|
|
82
|
+
componentWillMount?(): void;
|
|
83
|
+
componentWillReceiveProps?(nextProps: Readonly<IKeyPlay & {
|
|
84
|
+
isPlaying: boolean;
|
|
85
|
+
playbackProgress: number | null;
|
|
86
|
+
isScoring: boolean;
|
|
87
|
+
setFocus?: ((focusKey: string) => void) | undefined;
|
|
88
|
+
focused?: boolean | undefined;
|
|
89
|
+
setRef: (ref: HTMLDivElement | null) => void;
|
|
90
|
+
} & WithFocusableProps & RemoteControlProps>, nextContext: any): void;
|
|
91
|
+
shouldComponentUpdate?(nextProps: Readonly<IKeyPlay & {
|
|
92
|
+
isPlaying: boolean;
|
|
93
|
+
playbackProgress: number | null;
|
|
94
|
+
isScoring: boolean;
|
|
95
|
+
setFocus?: ((focusKey: string) => void) | undefined;
|
|
96
|
+
focused?: boolean | undefined;
|
|
97
|
+
setRef: (ref: HTMLDivElement | null) => void;
|
|
98
|
+
} & WithFocusableProps & RemoteControlProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
99
|
+
componentWillUpdate?(nextProps: Readonly<IKeyPlay & {
|
|
100
|
+
isPlaying: boolean;
|
|
101
|
+
playbackProgress: number | null;
|
|
102
|
+
isScoring: boolean;
|
|
103
|
+
setFocus?: ((focusKey: string) => void) | undefined;
|
|
104
|
+
focused?: boolean | undefined;
|
|
105
|
+
setRef: (ref: HTMLDivElement | null) => void;
|
|
106
|
+
} & WithFocusableProps & RemoteControlProps>, nextState: Readonly<import("../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
107
|
+
};
|
|
108
|
+
contextTypes: {
|
|
109
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
110
|
+
};
|
|
111
|
+
childContextTypes: {
|
|
112
|
+
parentFocusKey: import("prop-types").Requireable<string>;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { KeyPlaysErrorState } from '../interfaces/IKeyPlays';
|
|
2
|
+
import './KeyPlayErrorStateView.styles.css';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
type Props = {
|
|
5
|
+
errorState: KeyPlaysErrorState;
|
|
6
|
+
onRetry: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare class KeyPlayErrorStateView extends React.Component<Props, {}> {
|
|
9
|
+
render(): React.JSX.Element | null;
|
|
10
|
+
}
|
|
11
|
+
export default KeyPlayErrorStateView;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import './KeyPlaysView.styles.css';
|
|
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
|
+
}
|
|
20
|
+
interface IKeyPlaysState {
|
|
21
|
+
scrolled: boolean;
|
|
22
|
+
playbackProgress: number | null;
|
|
23
|
+
playbackIndex: number | null;
|
|
24
|
+
items: IKeyPlaySection[];
|
|
25
|
+
}
|
|
26
|
+
export declare class KeyPlays extends Component<{}, IKeyPlaysState> {
|
|
27
|
+
private container;
|
|
28
|
+
private refsMap;
|
|
29
|
+
private playbackProgressUnsub;
|
|
30
|
+
private playbackIndexUnsub;
|
|
31
|
+
private itemsUnsub;
|
|
32
|
+
private vm;
|
|
33
|
+
constructor(props: {});
|
|
34
|
+
componentDidMount(): void;
|
|
35
|
+
componentWillUnmount(): void;
|
|
36
|
+
private handlePlayClip;
|
|
37
|
+
private handleItemFocus;
|
|
38
|
+
private setRef;
|
|
39
|
+
render(): React.JSX.Element;
|
|
40
|
+
}
|
|
41
|
+
interface KeyPlaysWithErrorStateState {
|
|
42
|
+
errorState: KeyPlaysErrorState;
|
|
43
|
+
}
|
|
44
|
+
export default class KeyPlaysWithErrorState extends Component<{}, KeyPlaysWithErrorStateState> {
|
|
45
|
+
private errorStateUnsub;
|
|
46
|
+
private vm;
|
|
47
|
+
constructor(props: {});
|
|
48
|
+
componentDidMount(): void;
|
|
49
|
+
componentWillUnmount(): void;
|
|
50
|
+
private handleRetry;
|
|
51
|
+
render(): React.JSX.Element;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import IMaestroKeyPlaysResponse from '../interfaces/IKeyPlaysResponse';
|
|
2
|
+
import IKeyPlay, { KeyPlayLoadFailureStatus, KeyPlaysErrorState } from '../interfaces/IKeyPlays';
|
|
3
|
+
import { Observable } from '@/helpers/Observable';
|
|
4
|
+
type KeyPlayItem = {
|
|
5
|
+
title: string;
|
|
6
|
+
items: IKeyPlay[];
|
|
7
|
+
};
|
|
8
|
+
declare class KeyPlaysViewModel {
|
|
9
|
+
currentlyPlayingClipIndex: Observable<number | null>;
|
|
10
|
+
lastPlayedClipIndex: Observable<number | null>;
|
|
11
|
+
currentClipPlaybackProgress: Observable<number | null>;
|
|
12
|
+
errorState: Observable<KeyPlaysErrorState | null>;
|
|
13
|
+
failedClips: Observable<{
|
|
14
|
+
[key: string]: KeyPlayLoadFailureStatus;
|
|
15
|
+
}>;
|
|
16
|
+
items: Observable<KeyPlayItem[]>;
|
|
17
|
+
isCurrentlyPlaying(index: number): boolean;
|
|
18
|
+
setKeyPlays(items: IMaestroKeyPlaysResponse | null): Promise<void>;
|
|
19
|
+
private cleanErrors;
|
|
20
|
+
playKeyPlay(atIndex: number): Promise<void>;
|
|
21
|
+
parseNetworkResponse(response: IMaestroKeyPlaysResponse): KeyPlayItem[];
|
|
22
|
+
get allItems(): IKeyPlay[];
|
|
23
|
+
clipID(forKeyPlayAtIndex: number): string | undefined;
|
|
24
|
+
handleKeyPlayLoadFailure(forKeyPlayAtIndex: number): void;
|
|
25
|
+
loadFailureStatus(forKeyPlayAtIndex: number): KeyPlayLoadFailureStatus;
|
|
26
|
+
clearLoadFailureStatus(forKeyPlayAtIndex: number): void;
|
|
27
|
+
userRequestedNewKeyPlaysData(): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
export default KeyPlaysViewModel;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare class NetworkManager {
|
|
2
|
+
private static instance;
|
|
3
|
+
private cacheManager;
|
|
4
|
+
private client;
|
|
5
|
+
private constructor();
|
|
6
|
+
static getInstance(): NetworkManager;
|
|
7
|
+
setAuthentication(token: string | null, apiKey: string | null): void;
|
|
8
|
+
private handleError;
|
|
9
|
+
get<TResponseData = any>(endpoint: string, params?: Record<string, unknown>): Promise<TResponseData>;
|
|
10
|
+
post<TRequestData = any, TResponseData = any>(endpoint: string, data: TRequestData): Promise<TResponseData>;
|
|
11
|
+
}
|
|
12
|
+
declare const networkManager: NetworkManager;
|
|
13
|
+
export default networkManager;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import IMaestroEventDelegate from '../interfaces/IMaestroEventDelegate';
|
|
2
|
+
import IMaestroEvent from '../interfaces/IMaestroEvent';
|
|
3
|
+
import { Observable } from '../helpers/Observable';
|
|
4
|
+
import { ViewModel } from './ViewModel';
|
|
5
|
+
import KeyPlaysViewModel from '../modules/key-plays/view-model/KeyPlaysViewModel';
|
|
6
|
+
import IMaestroKeyPlaysResponse from '../modules/key-plays/interfaces/IKeyPlaysResponse';
|
|
7
|
+
export declare class MaestroEventViewModel extends ViewModel implements IMaestroEvent {
|
|
8
|
+
private _eventId;
|
|
9
|
+
private _title;
|
|
10
|
+
private _isLive;
|
|
11
|
+
private _isShowingPanel;
|
|
12
|
+
delegate: IMaestroEventDelegate;
|
|
13
|
+
keyPlaysViewModel: KeyPlaysViewModel;
|
|
14
|
+
constructor(eventId: string | undefined, delegate: IMaestroEventDelegate);
|
|
15
|
+
deinit(): void;
|
|
16
|
+
updateKeyPlaysData(data: IMaestroKeyPlaysResponse | null): Promise<void>;
|
|
17
|
+
startFocusManagement(): Promise<void>;
|
|
18
|
+
didStartPlayingClip(index: number): void;
|
|
19
|
+
didStopPlayingClip(index: number): void;
|
|
20
|
+
didFailToPlayClip(index: number): void;
|
|
21
|
+
didUpdatePlaybackProgressOfClip(index: number, to: number): void;
|
|
22
|
+
didShowPanel(): Promise<void>;
|
|
23
|
+
didHidePanel(): Promise<void>;
|
|
24
|
+
didShowOverlay(): Promise<void>;
|
|
25
|
+
didHideOverlay(): Promise<void>;
|
|
26
|
+
currentEventDoesNotSupportKeyPlays(): void;
|
|
27
|
+
getCurrentEventID(): string;
|
|
28
|
+
getCurrentlyPlayingClipIndex(): number | null;
|
|
29
|
+
getLastPlayedClipIndex(): number | null;
|
|
30
|
+
getCurrentClipPlaybackProgress(): number | null;
|
|
31
|
+
getKeyPlaysCount(): number;
|
|
32
|
+
get eventId(): Observable<string>;
|
|
33
|
+
get title(): Observable<string>;
|
|
34
|
+
get isLive(): Observable<boolean>;
|
|
35
|
+
get isShowingPanel(): boolean;
|
|
36
|
+
set isShowingPanel(value: boolean);
|
|
37
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Observable } from '../helpers/Observable';
|
|
2
|
+
import { MaestroPanelType } from '../models/IPanel';
|
|
3
|
+
export declare class PanelManagerViewModel {
|
|
4
|
+
private _panels;
|
|
5
|
+
private _currentPanel;
|
|
6
|
+
private _newlyFocusedPanel;
|
|
7
|
+
get panels(): MaestroPanelType[];
|
|
8
|
+
get panelsObservable(): Observable<MaestroPanelType[]>;
|
|
9
|
+
get currentPanel(): MaestroPanelType;
|
|
10
|
+
set currentPanel(value: MaestroPanelType);
|
|
11
|
+
get currentPanelObservable(): Observable<MaestroPanelType>;
|
|
12
|
+
get newlyFocusedPanel(): MaestroPanelType | null;
|
|
13
|
+
set newlyFocusedPanel(value: MaestroPanelType | null);
|
|
14
|
+
getIndex(forPanelType: MaestroPanelType): number | null;
|
|
15
|
+
getPanelType(atIndex: number): MaestroPanelType | null;
|
|
16
|
+
get panelTypeToLeft(): MaestroPanelType | null;
|
|
17
|
+
get panelTypeToRight(): MaestroPanelType | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Observable } from '../helpers/Observable';
|
|
2
|
+
/**
|
|
3
|
+
* Base view model that implements reactive properties
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class ViewModel {
|
|
6
|
+
private _isLoading;
|
|
7
|
+
private _error;
|
|
8
|
+
get isLoading(): Observable<boolean>;
|
|
9
|
+
get error(): Observable<string | null>;
|
|
10
|
+
protected setLoading(loading: boolean): void;
|
|
11
|
+
protected setError(error: string | null): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MaestroEventViewModel } from './MaestroEventViewModel';
|
|
2
|
+
import { PanelManagerViewModel } from './PanelManagerViewModel';
|
|
3
|
+
import IMaestroEventDelegate from '../interfaces/IMaestroEventDelegate';
|
|
4
|
+
import KeyPlaysViewModel from '../modules/key-plays/view-model/KeyPlaysViewModel';
|
|
5
|
+
/**
|
|
6
|
+
* Aggregates all View Models
|
|
7
|
+
*/
|
|
8
|
+
export declare class MaestroViewModels {
|
|
9
|
+
readonly eventViewModel: MaestroEventViewModel;
|
|
10
|
+
readonly panelManagerViewModel: PanelManagerViewModel;
|
|
11
|
+
readonly keyPlaysViewModel: KeyPlaysViewModel;
|
|
12
|
+
constructor(eventViewModel: MaestroEventViewModel);
|
|
13
|
+
/**
|
|
14
|
+
* Creates view models from an event ID
|
|
15
|
+
*/
|
|
16
|
+
static fromEventId(eventId: string, delegate: IMaestroEventDelegate): Promise<MaestroViewModels | null>;
|
|
17
|
+
}
|