@maestro_io/maestro-web-sdk 2.1.3 → 2.2.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 +1 -0
- package/dist/components/atoms/SvgIcon/Icon.d.ts +0 -2
- package/dist/components/core/PanelManager/PanelManager.d.ts +3 -0
- package/dist/components/core/ScrollableContainer/ScrollableContainer.d.ts +3 -1
- package/dist/external/spatial-navigation/spatialNavigation.d.ts +1 -1
- package/dist/helpers/url.d.ts +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/interfaces/IMaestroEvent.d.ts +27 -0
- package/dist/interfaces/IMaestroEventDelegate.d.ts +19 -6
- package/dist/interfaces/IMaestroManager.d.ts +8 -1
- package/dist/interfaces/IUserSettings.d.ts +36 -0
- package/dist/maestro-web-sdk.umd.js +3 -3
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/models/IPanel.d.ts +1 -2
- package/dist/modules/bets/view/BetsView.d.ts +4 -0
- package/dist/modules/bets/view/UserBets/BetsCard/BetsCard.d.ts +1 -0
- package/dist/modules/bets/view/UserBets/BetsCard/BetsCardEvent.d.ts +1 -0
- package/dist/modules/bets/view/UserBets/BetsCard/BetsCardFooter.d.ts +2 -1
- package/dist/modules/bets/view/UserBets/Boost/Boost.d.ts +2 -1
- package/dist/modules/bets/view/UserBets/Parlay/Parlay.d.ts +2 -1
- package/dist/modules/bets/view/UserBets/Straight/Straight.d.ts +2 -1
- package/dist/modules/bets/view/UserBets/Teaser/Teaser.d.ts +2 -1
- package/dist/modules/bets/view/components/Bet/Bet.d.ts +7 -0
- package/dist/modules/bets/view-model/BetsViewModel.d.ts +15 -0
- package/dist/modules/key-plays/interfaces/IKeyPlays.d.ts +1 -0
- package/dist/modules/key-plays/interfaces/IKeyPlaysResponse.d.ts +6 -6
- package/dist/modules/key-plays/view/KeyPlayCardView.d.ts +4 -1
- package/dist/modules/key-plays/view/KeyPlayErrorStateView.d.ts +2 -0
- package/dist/modules/key-plays/view-model/KeyPlaysViewModel.d.ts +5 -1
- package/dist/modules/stats/interfaces/IStats.d.ts +38 -12
- package/dist/modules/stats/mocks.d.ts +0 -80
- package/dist/modules/stats/utils/driveSummaryUtils.d.ts +18 -0
- package/dist/modules/stats/view/ActiveAthletes/ActiveAthletes.d.ts +6 -19
- package/dist/modules/stats/view/DriveSummary/DrivePlayCard.d.ts +26 -0
- package/dist/modules/stats/view/DriveSummary/DriveSummary.d.ts +24 -0
- package/dist/modules/stats/view/DriveSummary/index.d.ts +2 -0
- package/dist/modules/stats/view/GameLeaders/GameLeaders.d.ts +15 -4
- package/dist/modules/stats/view/MatchPredictor/MatchPredictorView.d.ts +13 -48
- package/dist/modules/stats/view/RecentGames/RecentGames.d.ts +10 -21
- package/dist/modules/stats/view/StatsItemView.d.ts +19 -0
- package/dist/modules/stats/view/StatsView.d.ts +3 -3
- package/dist/modules/stats/view/TeamStats/TeamStatsView.d.ts +2 -4
- package/dist/modules/stats/view/Teams/Teams.d.ts +10 -26
- package/dist/modules/stats/view/WinProbability/WinProbability.d.ts +10 -21
- package/dist/modules/stats/view-model/StatsViewModel.d.ts +149 -5
- package/dist/services/BetsService.d.ts +2 -2
- package/dist/services/NetworkManager/NetworkManager.d.ts +1 -3
- package/dist/services/NetworkManager/NetworkManagerFactory.d.ts +42 -0
- package/dist/services/NetworkManager/types.d.ts +77 -0
- package/dist/services/StatsService.d.ts +2 -2
- package/dist/services/UserSettingsManager.d.ts +63 -0
- package/dist/view-models/MaestroEventViewModel.d.ts +5 -0
- package/dist/view-models/PanelManagerViewModel.d.ts +24 -0
- package/dist/view-models/index.d.ts +4 -0
- package/package.json +1 -1
- package/dist/MaestroEventDelegate.js +0 -60
- package/dist/components/atoms/BaseButton/BaseButton.js +0 -11
- package/dist/components/atoms/BaseButton/index.js +0 -2
- package/dist/components/atoms/Image/index.js +0 -30
- package/dist/components/atoms/Rive/index.js +0 -53
- package/dist/components/atoms/SvgIcon/BetGeneralIcon.js +0 -9
- package/dist/components/atoms/SvgIcon/BetsIcon.js +0 -11
- package/dist/components/atoms/SvgIcon/BetsWarningIcon.js +0 -11
- package/dist/components/atoms/SvgIcon/CheckmarkIcon.js +0 -6
- package/dist/components/atoms/SvgIcon/CollapseIcon.js +0 -6
- package/dist/components/atoms/SvgIcon/ExpandIcon.js +0 -6
- package/dist/components/atoms/SvgIcon/FantasyIcon.d.ts +0 -6
- package/dist/components/atoms/SvgIcon/FantasyIcon.js +0 -8
- package/dist/components/atoms/SvgIcon/FlameIcon.js +0 -11
- package/dist/components/atoms/SvgIcon/Icon.js +0 -42
- package/dist/components/atoms/SvgIcon/KeyPlaysIcon.js +0 -10
- package/dist/components/atoms/SvgIcon/MobilePhoneIcon.js +0 -11
- package/dist/components/atoms/SvgIcon/PlayIcon.js +0 -8
- package/dist/components/atoms/SvgIcon/StatsIcon.js +0 -12
- package/dist/components/atoms/SvgIcon/TimesIcon.js +0 -6
- package/dist/components/atoms/SvgIcon/WarningIcon.js +0 -8
- package/dist/components/atoms/SvgIcon/index.js +0 -2
- package/dist/components/core/App/App.js +0 -41
- package/dist/components/core/App/index.js +0 -2
- package/dist/components/core/OverlayContainer.js +0 -58
- package/dist/components/core/PanelManager/PanelManager.js +0 -80
- package/dist/components/core/PanelManager/index.js +0 -2
- package/dist/components/core/ScrollableContainer/FocusableItem.js +0 -38
- package/dist/components/core/ScrollableContainer/ScrollableContainer.js +0 -166
- package/dist/components/core/ScrollableContainer/index.js +0 -2
- package/dist/components/molecules/ActionButton/ActionButton.js +0 -10
- package/dist/components/molecules/ActionButton/index.js +0 -2
- package/dist/components/molecules/Overlay/Overlay.js +0 -139
- package/dist/components/molecules/Overlay/index.js +0 -2
- package/dist/components/molecules/PanelNavButton/PanelNavButton.js +0 -40
- package/dist/components/molecules/PanelNavButton/index.js +0 -2
- package/dist/components/molecules/SegmentButton/SegmentButton.js +0 -10
- package/dist/components/molecules/SegmentButton/index.js +0 -2
- package/dist/components/molecules/WatchButton/WatchButton.js +0 -15
- package/dist/components/molecules/WatchButton/index.js +0 -2
- package/dist/components/organisms/PanelNavigation/PanelNavigation.js +0 -71
- package/dist/components/organisms/PanelNavigation/index.js +0 -2
- package/dist/components/organisms/SegmentController/SegmentController.js +0 -68
- package/dist/components/organisms/SegmentController/index.js +0 -2
- package/dist/external/AxiosNetworkClient.js +0 -83
- package/dist/external/LocalStorageCacheManager.js +0 -213
- package/dist/external/ReactRenderer.js +0 -86
- package/dist/external/mocks/MockExternalNetworkClient.js +0 -161
- package/dist/external/ports/cacheManager.js +0 -1
- package/dist/external/ports/networkClient.js +0 -1
- package/dist/external/ports/renderer.js +0 -1
- package/dist/external/spatial-navigation/index.js +0 -3
- package/dist/external/spatial-navigation/measureLayout.js +0 -30
- package/dist/external/spatial-navigation/spatialNavigation.js +0 -864
- package/dist/external/spatial-navigation/utils.js +0 -6
- package/dist/external/spatial-navigation/visualDebugger.js +0 -76
- package/dist/external/spatial-navigation/withFocusable.js +0 -245
- package/dist/helpers/Observable.js +0 -37
- package/dist/helpers/deliver-focus.d.ts +0 -5
- package/dist/helpers/deliver-focus.js +0 -12
- package/dist/index.js +0 -192
- package/dist/interfaces/IMaestroEvent.js +0 -6
- package/dist/interfaces/IMaestroEventDelegate.js +0 -1
- package/dist/interfaces/IMaestroManager.js +0 -1
- package/dist/models/IModel.js +0 -1
- package/dist/models/IPanel.js +0 -53
- package/dist/models/ITheme.js +0 -20
- package/dist/models/IWinningBet.js +0 -1
- package/dist/modules/bets/interfaces/IBets.js +0 -1
- package/dist/modules/bets/mocks.js +0 -572
- package/dist/modules/bets/view/BetsView.js +0 -116
- package/dist/modules/bets/view/HotProps/HotPropsView.js +0 -139
- package/dist/modules/bets/view/SixPack/SixPackView.js +0 -103
- package/dist/modules/bets/view/TabLoadFailureView.js +0 -12
- package/dist/modules/bets/view/UserBets/BetResult/BetResult.js +0 -6
- package/dist/modules/bets/view/UserBets/BetsCard/BetsCard.js +0 -122
- package/dist/modules/bets/view/UserBets/BetsCard/BetsCardEvent.js +0 -34
- package/dist/modules/bets/view/UserBets/BetsCard/BetsCardFooter.js +0 -22
- package/dist/modules/bets/view/UserBets/Boost/Boost.js +0 -6
- package/dist/modules/bets/view/UserBets/OutcomeBadge/OutcomeBadge.js +0 -9
- package/dist/modules/bets/view/UserBets/Parlay/Parlay.js +0 -13
- package/dist/modules/bets/view/UserBets/Straight/Straight.js +0 -6
- package/dist/modules/bets/view/UserBets/Teaser/Teaser.js +0 -13
- package/dist/modules/bets/view/UserBets/UserBetsView.js +0 -114
- package/dist/modules/bets/view/components/Bet/Bet.js +0 -32
- package/dist/modules/bets/view/components/BetPill/BetPill.js +0 -6
- package/dist/modules/bets/view/components/BetsCard/BetsCard.js +0 -15
- package/dist/modules/bets/view/components/BetsCard/BetsCardHeader.js +0 -20
- package/dist/modules/bets/view/components/GamblingDisclaimer/GamblingDisclaimer.js +0 -14
- package/dist/modules/bets/view/components/LocationWarning/LocationWarning.js +0 -16
- package/dist/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.js +0 -63
- package/dist/modules/bets/view/components/PromoCodeBanner/index.js +0 -1
- package/dist/modules/bets/view-model/BetsViewModel.js +0 -767
- package/dist/modules/key-plays/constants.js +0 -292
- package/dist/modules/key-plays/interfaces/IKeyPlays.js +0 -14
- package/dist/modules/key-plays/interfaces/IKeyPlaysResponse.js +0 -1
- package/dist/modules/key-plays/view/KeyPlayCardScoreTagView.js +0 -13
- package/dist/modules/key-plays/view/KeyPlayCardView.js +0 -120
- package/dist/modules/key-plays/view/KeyPlayErrorStateView.js +0 -58
- package/dist/modules/key-plays/view/KeyPlaysView.js +0 -166
- package/dist/modules/key-plays/view-model/KeyPlaysViewModel.js +0 -182
- package/dist/modules/stats/interfaces/IStats.js +0 -1
- package/dist/modules/stats/mocks.js +0 -686
- package/dist/modules/stats/utils/renderTeamStatistic.js +0 -16
- package/dist/modules/stats/utils.js +0 -62
- package/dist/modules/stats/view/ActiveAthletes/ActiveAthletes.js +0 -78
- package/dist/modules/stats/view/ActiveAthletes/CollapsedAthletes/CollapsedAthletes.js +0 -27
- package/dist/modules/stats/view/ActiveAthletes/ExpandedAthletes/ExpandedAthletes.js +0 -15
- package/dist/modules/stats/view/ActiveAthletes/index.js +0 -2
- package/dist/modules/stats/view/GameLeaders/GameLeaders.js +0 -9
- package/dist/modules/stats/view/GameLeaders/index.js +0 -2
- package/dist/modules/stats/view/MatchPredictor/DonutChart/DonutChart.js +0 -55
- package/dist/modules/stats/view/MatchPredictor/DonutChart/index.js +0 -1
- package/dist/modules/stats/view/MatchPredictor/MatchPredictorView.js +0 -66
- package/dist/modules/stats/view/MatchPredictor/index.js +0 -2
- package/dist/modules/stats/view/RecentGames/RecentGames.js +0 -22
- package/dist/modules/stats/view/RecentGames/index.js +0 -2
- package/dist/modules/stats/view/StatsQRCode/StatsQRCodeView.js +0 -38
- package/dist/modules/stats/view/StatsQRCode/index.js +0 -1
- package/dist/modules/stats/view/StatsView.js +0 -107
- package/dist/modules/stats/view/TeamStats/TeamStatsView.js +0 -69
- package/dist/modules/stats/view/TeamStats/index.js +0 -1
- package/dist/modules/stats/view/Teams/StatsCarousel.js +0 -14
- package/dist/modules/stats/view/Teams/StatsProgressBar.js +0 -18
- package/dist/modules/stats/view/Teams/Teams.js +0 -42
- package/dist/modules/stats/view/Teams/index.js +0 -2
- package/dist/modules/stats/view/WinProbability/WinProbability.js +0 -27
- package/dist/modules/stats/view/WinProbability/index.js +0 -2
- package/dist/modules/stats/view/components/AthletesStatistics/AthletesStatistics.js +0 -29
- package/dist/modules/stats/view/components/AthletesStatistics/StatisticTable.js +0 -12
- package/dist/modules/stats/view/components/AthletesStatistics/index.js +0 -2
- package/dist/modules/stats/view/index.js +0 -2
- package/dist/modules/stats/view-model/StatsViewModel.js +0 -90
- package/dist/services/BetsService.js +0 -102
- package/dist/services/NetworkManager/NetworkManager.js +0 -410
- package/dist/services/NetworkManager/errors.js +0 -45
- package/dist/services/StatsService.js +0 -68
- package/dist/services/ThemeManager/constants.js +0 -47
- package/dist/test-polyfills.js +0 -15
- package/dist/types/OverlayTypes.js +0 -4
- package/dist/view-models/MaestroEventViewModel.js +0 -168
- package/dist/view-models/OverlayViewModel.js +0 -222
- package/dist/view-models/PanelManagerViewModel.js +0 -80
- package/dist/view-models/ViewModel.js +0 -32
- package/dist/view-models/index.js +0 -59
package/dist/models/IPanel.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export declare const MaestroPanelType: {
|
|
2
2
|
readonly KEY_PLAYS: "keyPlays";
|
|
3
3
|
readonly STATS: "stats";
|
|
4
|
-
readonly FANTASY: "fantasy";
|
|
5
4
|
readonly BETS: "bets";
|
|
6
5
|
};
|
|
7
|
-
export type MaestroPanelType =
|
|
6
|
+
export type MaestroPanelType = typeof MaestroPanelType[keyof typeof MaestroPanelType];
|
|
8
7
|
export interface PanelTypeInfo {
|
|
9
8
|
id: MaestroPanelType;
|
|
10
9
|
name: string;
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import './BetsView.styles.css';
|
|
3
3
|
import { BetItem, BetsErrorState } from '../view-model/BetsViewModel';
|
|
4
|
+
import { Direction } from '@/external/spatial-navigation/utils';
|
|
4
5
|
interface BetsViewState {
|
|
5
6
|
container: HTMLDivElement | null;
|
|
6
7
|
betsItems: BetItem[];
|
|
7
8
|
isDataLoading: boolean;
|
|
8
9
|
errorState: BetsErrorState;
|
|
10
|
+
hideWagers: boolean;
|
|
9
11
|
}
|
|
10
12
|
declare class BetsView extends Component<{}, BetsViewState> {
|
|
11
13
|
private container;
|
|
12
14
|
private betsItemsUnsub;
|
|
13
15
|
private isDataLoadingUnsub;
|
|
14
16
|
private errorStateUnsub;
|
|
17
|
+
private hideWagersUnsub;
|
|
15
18
|
private vm;
|
|
16
19
|
constructor(props: {});
|
|
17
20
|
componentDidMount(): void;
|
|
18
21
|
componentWillUnmount(): void;
|
|
19
22
|
renderBetItem: (item: BetItem) => React.JSX.Element | null;
|
|
20
23
|
clearTabLoadFailure: () => void;
|
|
24
|
+
onArrowPress: (d: Direction) => void;
|
|
21
25
|
render(): React.JSX.Element;
|
|
22
26
|
}
|
|
23
27
|
export default BetsView;
|
|
@@ -7,6 +7,7 @@ export declare const EVENTS_COUNT_THRESHOLD = 3;
|
|
|
7
7
|
export type BaseBetCardProps = {
|
|
8
8
|
bet: IUserBet;
|
|
9
9
|
renderHeaderContent?: (props: WithFocusableProps) => React.ReactNode;
|
|
10
|
+
hideWagers?: boolean;
|
|
10
11
|
};
|
|
11
12
|
declare const _default: {
|
|
12
13
|
new (props?: (BaseBetCardProps & WithFocusableProps) | undefined, context?: any): {
|
|
@@ -10,6 +10,7 @@ type BetsCardEventProps = {
|
|
|
10
10
|
betType: string;
|
|
11
11
|
onBetArrowPress: (eventIndex: number, legIndex: number) => (direction: Direction, props: any, details: Details) => void;
|
|
12
12
|
onBetBackPress: () => void;
|
|
13
|
+
hideWagers?: boolean;
|
|
13
14
|
};
|
|
14
15
|
declare class BetsCardEvent extends React.Component<BetsCardEventProps> {
|
|
15
16
|
static contextTypes: {
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { IUserBet } from '@/modules/bets/interfaces/IBets';
|
|
3
3
|
type BetsCardFooterProps = {
|
|
4
4
|
bet: IUserBet;
|
|
5
|
+
hideWagers?: boolean;
|
|
5
6
|
};
|
|
6
|
-
declare const BetsCardFooter: (props: BetsCardFooterProps) => React.JSX.Element;
|
|
7
|
+
declare const BetsCardFooter: (props: BetsCardFooterProps) => React.JSX.Element | null;
|
|
7
8
|
export default BetsCardFooter;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { IUserBet } from '@/modules/bets/interfaces/IBets';
|
|
3
3
|
type BoostProps = {
|
|
4
4
|
bet: IUserBet;
|
|
5
|
+
hideWagers?: boolean;
|
|
5
6
|
};
|
|
6
|
-
declare const Boost: ({ bet }: BoostProps) => React.JSX.Element;
|
|
7
|
+
declare const Boost: ({ bet, hideWagers }: BoostProps) => React.JSX.Element;
|
|
7
8
|
export default Boost;
|
|
@@ -3,6 +3,7 @@ import './Parlay.styles.css';
|
|
|
3
3
|
import { IUserBet } from '@/modules/bets/interfaces/IBets';
|
|
4
4
|
type ParlayProps = {
|
|
5
5
|
bet: IUserBet;
|
|
6
|
+
hideWagers?: boolean;
|
|
6
7
|
};
|
|
7
|
-
declare const Parlay: ({ bet }: ParlayProps) => React.JSX.Element;
|
|
8
|
+
declare const Parlay: ({ bet, hideWagers }: ParlayProps) => React.JSX.Element;
|
|
8
9
|
export default Parlay;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { IUserBet } from '@/modules/bets/interfaces/IBets';
|
|
3
3
|
type StraightProps = {
|
|
4
4
|
bet: IUserBet;
|
|
5
|
+
hideWagers?: boolean;
|
|
5
6
|
};
|
|
6
|
-
declare const Straight: ({ bet }: StraightProps) => React.JSX.Element;
|
|
7
|
+
declare const Straight: ({ bet, hideWagers }: StraightProps) => React.JSX.Element;
|
|
7
8
|
export default Straight;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { IUserBet } from '@/modules/bets/interfaces/IBets';
|
|
3
3
|
type TeaserProps = {
|
|
4
4
|
bet: IUserBet;
|
|
5
|
+
hideWagers?: boolean;
|
|
5
6
|
};
|
|
6
|
-
declare const Teaser: ({ bet }: TeaserProps) => React.JSX.Element;
|
|
7
|
+
declare const Teaser: ({ bet, hideWagers }: TeaserProps) => React.JSX.Element;
|
|
7
8
|
export default Teaser;
|
|
@@ -6,6 +6,7 @@ import { IBetLeg } from '@/modules/bets/interfaces/IBets';
|
|
|
6
6
|
declare const _default: {
|
|
7
7
|
new (props?: ({
|
|
8
8
|
leg: IBetLeg;
|
|
9
|
+
hideWagers?: boolean | undefined;
|
|
9
10
|
} & WithFocusableProps) | undefined, context?: any): {
|
|
10
11
|
state: import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState;
|
|
11
12
|
navigation: import("../../../../../external/spatial-navigation/spatialNavigation").default;
|
|
@@ -28,15 +29,18 @@ declare const _default: {
|
|
|
28
29
|
componentWillUnmount(): void;
|
|
29
30
|
render(): React.ReactElement<{
|
|
30
31
|
leg: IBetLeg;
|
|
32
|
+
hideWagers?: boolean | undefined;
|
|
31
33
|
} & WithFocusableProps>;
|
|
32
34
|
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: {
|
|
33
35
|
leg: IBetLeg;
|
|
36
|
+
hideWagers?: boolean | undefined;
|
|
34
37
|
} & 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;
|
|
35
38
|
forceUpdate(callBack?: (() => any) | undefined): void;
|
|
36
39
|
props: Readonly<{
|
|
37
40
|
children?: React.ReactNode;
|
|
38
41
|
}> & Readonly<{
|
|
39
42
|
leg: IBetLeg;
|
|
43
|
+
hideWagers?: boolean | undefined;
|
|
40
44
|
} & WithFocusableProps>;
|
|
41
45
|
context: any;
|
|
42
46
|
refs: {
|
|
@@ -45,12 +49,15 @@ declare const _default: {
|
|
|
45
49
|
componentWillMount?(): void;
|
|
46
50
|
componentWillReceiveProps?(nextProps: Readonly<{
|
|
47
51
|
leg: IBetLeg;
|
|
52
|
+
hideWagers?: boolean | undefined;
|
|
48
53
|
} & WithFocusableProps>, nextContext: any): void;
|
|
49
54
|
shouldComponentUpdate?(nextProps: Readonly<{
|
|
50
55
|
leg: IBetLeg;
|
|
56
|
+
hideWagers?: boolean | undefined;
|
|
51
57
|
} & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): boolean;
|
|
52
58
|
componentWillUpdate?(nextProps: Readonly<{
|
|
53
59
|
leg: IBetLeg;
|
|
60
|
+
hideWagers?: boolean | undefined;
|
|
54
61
|
} & WithFocusableProps>, nextState: Readonly<import("../../../../../external/spatial-navigation/withFocusable").WithFocusableState>, nextContext: any): void;
|
|
55
62
|
};
|
|
56
63
|
contextTypes: {
|
|
@@ -74,16 +74,19 @@ export type SixPackBetItem = {
|
|
|
74
74
|
away: ITeam;
|
|
75
75
|
};
|
|
76
76
|
id: string;
|
|
77
|
+
hideWagers: boolean;
|
|
77
78
|
};
|
|
78
79
|
export type UserBetsBetItem = {
|
|
79
80
|
type: 'userBets';
|
|
80
81
|
data: IUserBets;
|
|
81
82
|
id: string;
|
|
83
|
+
hideWagers: boolean;
|
|
82
84
|
};
|
|
83
85
|
export type HotPropsBetItem = {
|
|
84
86
|
type: 'hotProps';
|
|
85
87
|
data: IHotProps;
|
|
86
88
|
id: string;
|
|
89
|
+
hideWagers: boolean;
|
|
87
90
|
};
|
|
88
91
|
export type BetItem = SixPackBetItem | UserBetsBetItem | PromoBetItem | HotPropsBetItem | LocationDisclaimerBetItem | GamblingMessageBetItem;
|
|
89
92
|
declare const BET_ERROR_STATE: {
|
|
@@ -101,6 +104,7 @@ export declare class BetsViewModel extends ViewModel {
|
|
|
101
104
|
isDataLoading: Observable<boolean>;
|
|
102
105
|
errorState: Observable<BetsErrorState>;
|
|
103
106
|
hasEverSuccessfullyLoaded: Observable<boolean>;
|
|
107
|
+
hideWagers: Observable<boolean>;
|
|
104
108
|
private eventId;
|
|
105
109
|
private delegate;
|
|
106
110
|
private betsService;
|
|
@@ -109,6 +113,8 @@ export declare class BetsViewModel extends ViewModel {
|
|
|
109
113
|
private lastNonPersonalizedResponseHash;
|
|
110
114
|
private lastPersonalizedResponseHash;
|
|
111
115
|
private useMockData;
|
|
116
|
+
private userSettingsManager;
|
|
117
|
+
private settingsSubscription;
|
|
112
118
|
initialized: boolean;
|
|
113
119
|
constructor(eventId: string, delegate: IMaestroEventDelegate, options?: {
|
|
114
120
|
pollingInterval?: number;
|
|
@@ -170,6 +176,15 @@ export declare class BetsViewModel extends ViewModel {
|
|
|
170
176
|
private fetchMockData;
|
|
171
177
|
simulateUseCase<T = any>(useCase: TestUseCase, _: T): void;
|
|
172
178
|
clearTabLoadFailure(): void;
|
|
179
|
+
/**
|
|
180
|
+
* Check if wagers should be hidden based on user settings
|
|
181
|
+
*/
|
|
182
|
+
shouldHideWagers(): boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Update hideWagers Observable from current settings (reactive approach)
|
|
185
|
+
*/
|
|
186
|
+
private updateHideWagersFromSettings;
|
|
187
|
+
private refreshBetItemsWithNewSettings;
|
|
173
188
|
}
|
|
174
189
|
declare global {
|
|
175
190
|
interface String {
|
|
@@ -29,12 +29,12 @@ interface MaestroKeyPlaysSection {
|
|
|
29
29
|
}
|
|
30
30
|
interface MaestroKeyPlay {
|
|
31
31
|
description: string;
|
|
32
|
-
team
|
|
33
|
-
wallClock
|
|
34
|
-
displayClock
|
|
35
|
-
shortPeriod
|
|
36
|
-
scoringPlay
|
|
37
|
-
athlete
|
|
32
|
+
team?: string;
|
|
33
|
+
wallClock?: string;
|
|
34
|
+
displayClock?: string;
|
|
35
|
+
shortPeriod?: string;
|
|
36
|
+
scoringPlay?: boolean;
|
|
37
|
+
athlete?: string;
|
|
38
38
|
thumbnail: string;
|
|
39
39
|
thumbnailType: string;
|
|
40
40
|
clipID: string;
|
|
@@ -10,17 +10,20 @@ type KeyPlayCardViewProps = IKeyPlay & {
|
|
|
10
10
|
};
|
|
11
11
|
type KeyPlaysCardViewState = {
|
|
12
12
|
failedClip: KeyPlayLoadFailureStatus | null;
|
|
13
|
+
imageLoaded: boolean;
|
|
13
14
|
};
|
|
14
15
|
export declare class KeyPlayCardView extends React.Component<KeyPlayCardViewProps & WithFocusableProps, KeyPlaysCardViewState> {
|
|
15
16
|
private failedClipListener;
|
|
16
17
|
private vm;
|
|
17
18
|
state: {
|
|
18
19
|
failedClip: null;
|
|
20
|
+
imageLoaded: boolean;
|
|
19
21
|
};
|
|
20
22
|
constructor(props: KeyPlayCardViewProps);
|
|
21
23
|
componentDidMount(): void;
|
|
22
24
|
componentWillUnmount(): void;
|
|
23
|
-
|
|
25
|
+
onLoad: () => void;
|
|
26
|
+
renderImage: () => React.JSX.Element | null;
|
|
24
27
|
render(): React.JSX.Element;
|
|
25
28
|
}
|
|
26
29
|
export default class KeyPlayCard extends React.Component<Omit<KeyPlayCardViewProps, 'setRef'> & WithFocusableProps> {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { KeyPlaysErrorState } from '../interfaces/IKeyPlays';
|
|
2
2
|
import './KeyPlayErrorStateView.styles.css';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { Direction } from '@/external/spatial-navigation/utils';
|
|
4
5
|
type Props = {
|
|
5
6
|
errorState: KeyPlaysErrorState;
|
|
6
7
|
onRetry: () => void;
|
|
7
8
|
};
|
|
8
9
|
declare class KeyPlayErrorStateView extends React.Component<Props, {}> {
|
|
10
|
+
onArrowPress: (d: Direction) => void;
|
|
9
11
|
render(): React.JSX.Element | null;
|
|
10
12
|
}
|
|
11
13
|
export default KeyPlayErrorStateView;
|
|
@@ -14,8 +14,12 @@ declare class KeyPlaysViewModel {
|
|
|
14
14
|
[key: string]: KeyPlayLoadFailureStatus;
|
|
15
15
|
}>;
|
|
16
16
|
items: Observable<KeyPlayItem[]>;
|
|
17
|
+
filteredItems: Observable<KeyPlayItem[]>;
|
|
18
|
+
onUpdatePlayerTimeCode(playerTimeCode: number | null): void;
|
|
19
|
+
private filterItemsByPlayerTimeCode;
|
|
20
|
+
private shouldShowKeyPlay;
|
|
17
21
|
isCurrentlyPlaying(index: number): boolean;
|
|
18
|
-
setKeyPlays(items: IMaestroKeyPlaysResponse | null): Promise<void>;
|
|
22
|
+
setKeyPlays(items: IMaestroKeyPlaysResponse | null, playerTimeCode: number | null): Promise<void>;
|
|
19
23
|
private cleanErrors;
|
|
20
24
|
playKeyPlay(atIndex: number): Promise<void>;
|
|
21
25
|
parseNetworkResponse(response: IMaestroKeyPlaysResponse): KeyPlayItem[];
|
|
@@ -67,8 +67,8 @@ interface LeaderTeam {
|
|
|
67
67
|
export interface Leader {
|
|
68
68
|
displayName: string;
|
|
69
69
|
name: string;
|
|
70
|
-
home
|
|
71
|
-
away
|
|
70
|
+
home?: LeaderTeam;
|
|
71
|
+
away?: LeaderTeam;
|
|
72
72
|
}
|
|
73
73
|
interface LineScore {
|
|
74
74
|
displayValue: string;
|
|
@@ -76,18 +76,18 @@ interface LineScore {
|
|
|
76
76
|
interface HeaderTeam {
|
|
77
77
|
$key: string;
|
|
78
78
|
score?: string;
|
|
79
|
-
linescores
|
|
79
|
+
linescores?: LineScore[];
|
|
80
80
|
}
|
|
81
81
|
export interface Header {
|
|
82
82
|
teams: HeaderTeam[];
|
|
83
|
-
linescoresHeader
|
|
83
|
+
linescoresHeader?: string[];
|
|
84
84
|
}
|
|
85
85
|
export interface PredictorTeam {
|
|
86
86
|
team: {
|
|
87
87
|
$key: string;
|
|
88
88
|
};
|
|
89
89
|
gameProjection: string;
|
|
90
|
-
teamChanceLoss
|
|
90
|
+
teamChanceLoss?: string;
|
|
91
91
|
}
|
|
92
92
|
export interface Predictor {
|
|
93
93
|
header: string;
|
|
@@ -129,25 +129,51 @@ export interface Meta {
|
|
|
129
129
|
syncUrl?: string;
|
|
130
130
|
}
|
|
131
131
|
export interface StatsPromotion {
|
|
132
|
-
|
|
132
|
+
backgroundImage?: string;
|
|
133
|
+
description?: string;
|
|
134
|
+
logoPng?: string;
|
|
135
|
+
logo?: string;
|
|
136
|
+
qrCode?: string;
|
|
137
|
+
title?: string;
|
|
138
|
+
}
|
|
139
|
+
export interface DrivePlay {
|
|
140
|
+
id: string;
|
|
141
|
+
clock: {
|
|
142
|
+
displayValue: string;
|
|
143
|
+
};
|
|
144
|
+
period: {
|
|
145
|
+
number: number;
|
|
146
|
+
};
|
|
147
|
+
type: {
|
|
148
|
+
text: string;
|
|
149
|
+
};
|
|
150
|
+
text: string;
|
|
151
|
+
start: {
|
|
152
|
+
downDistanceText: string;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
export interface Drive {
|
|
156
|
+
id: string;
|
|
157
|
+
team: {
|
|
158
|
+
$key: string;
|
|
159
|
+
};
|
|
133
160
|
description: string;
|
|
134
|
-
|
|
135
|
-
qrCode: string;
|
|
136
|
-
backgroundImage: string;
|
|
161
|
+
plays: DrivePlay[];
|
|
137
162
|
}
|
|
138
163
|
export interface StatsApiResponse {
|
|
139
164
|
entities: {
|
|
140
165
|
teams: EntityMap<Team>;
|
|
141
|
-
athletes
|
|
166
|
+
athletes?: EntityMap<Athlete>;
|
|
142
167
|
};
|
|
143
|
-
leaders
|
|
168
|
+
leaders?: Leader[];
|
|
144
169
|
header: Header;
|
|
145
170
|
predictor: Predictor;
|
|
146
|
-
winProbability
|
|
171
|
+
winProbability?: WinProbability;
|
|
147
172
|
gameState: string;
|
|
148
173
|
activeAthletes?: ActiveAthletes;
|
|
149
174
|
meta: Meta;
|
|
150
175
|
promotion?: StatsPromotion;
|
|
176
|
+
drives?: Drive[];
|
|
151
177
|
previousGames?: {
|
|
152
178
|
displayOrder: number;
|
|
153
179
|
team: {
|
|
@@ -1,82 +1,2 @@
|
|
|
1
1
|
import { StatsApiResponse } from './interfaces/IStats';
|
|
2
2
|
export declare const MOCK_STATS_API_PRE_GAME_RESPONSE: StatsApiResponse;
|
|
3
|
-
export declare const mockTeamWithStatistics: {
|
|
4
|
-
id: string;
|
|
5
|
-
uid: string;
|
|
6
|
-
abbreviation: string;
|
|
7
|
-
displayName: string;
|
|
8
|
-
color: string;
|
|
9
|
-
logo: string;
|
|
10
|
-
homeAway: string;
|
|
11
|
-
statistics: {
|
|
12
|
-
$key: string;
|
|
13
|
-
value: number;
|
|
14
|
-
displayValue: string;
|
|
15
|
-
displayName: string;
|
|
16
|
-
}[];
|
|
17
|
-
};
|
|
18
|
-
export declare const mockAwayTeamWithStatistics: {
|
|
19
|
-
id: string;
|
|
20
|
-
uid: string;
|
|
21
|
-
abbreviation: string;
|
|
22
|
-
displayName: string;
|
|
23
|
-
color: string;
|
|
24
|
-
logo: string;
|
|
25
|
-
homeAway: string;
|
|
26
|
-
statistics: {
|
|
27
|
-
$key: string;
|
|
28
|
-
value: number;
|
|
29
|
-
displayValue: string;
|
|
30
|
-
displayName: string;
|
|
31
|
-
}[];
|
|
32
|
-
};
|
|
33
|
-
export declare const mockStatsResponseWithTeamStats: {
|
|
34
|
-
entities: {
|
|
35
|
-
teams: {
|
|
36
|
-
'12': {
|
|
37
|
-
id: string;
|
|
38
|
-
uid: string;
|
|
39
|
-
abbreviation: string;
|
|
40
|
-
displayName: string;
|
|
41
|
-
color: string;
|
|
42
|
-
logo: string;
|
|
43
|
-
homeAway: string;
|
|
44
|
-
statistics: {
|
|
45
|
-
$key: string;
|
|
46
|
-
value: number;
|
|
47
|
-
displayValue: string;
|
|
48
|
-
displayName: string;
|
|
49
|
-
}[];
|
|
50
|
-
};
|
|
51
|
-
'21': {
|
|
52
|
-
id: string;
|
|
53
|
-
uid: string;
|
|
54
|
-
abbreviation: string;
|
|
55
|
-
displayName: string;
|
|
56
|
-
color: string;
|
|
57
|
-
logo: string;
|
|
58
|
-
homeAway: string;
|
|
59
|
-
statistics: {
|
|
60
|
-
$key: string;
|
|
61
|
-
value: number;
|
|
62
|
-
displayValue: string;
|
|
63
|
-
displayName: string;
|
|
64
|
-
}[];
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
athletes: {};
|
|
68
|
-
};
|
|
69
|
-
leaders: never[];
|
|
70
|
-
header: {
|
|
71
|
-
teams: never[];
|
|
72
|
-
linescoresHeader: never[];
|
|
73
|
-
};
|
|
74
|
-
predictor: null;
|
|
75
|
-
winProbability: null;
|
|
76
|
-
gameState: string;
|
|
77
|
-
meta: {
|
|
78
|
-
gp_topic: string;
|
|
79
|
-
picker_topic: string;
|
|
80
|
-
gameState: string;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DrivePlay } from '../interfaces/IStats';
|
|
2
|
+
/**
|
|
3
|
+
* Get ordinal suffix for a number (1st, 2nd, 3rd, 4th, etc.)
|
|
4
|
+
*/
|
|
5
|
+
export declare const getOrdinalSuffix: (number: number) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Parse drive description to get individual components
|
|
8
|
+
* Format: "11 PLAYS, 61 YARDS, 5:43"
|
|
9
|
+
*/
|
|
10
|
+
export declare const parseDriveDescription: (description: string) => {
|
|
11
|
+
plays: string;
|
|
12
|
+
yards: string;
|
|
13
|
+
time: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Format the marquee text for the last play
|
|
17
|
+
*/
|
|
18
|
+
export declare const formatLastPlayMarquee: (lastPlay: DrivePlay) => string;
|
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './ActiveAthletes.styles.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { AthletesStatisticsItem } from '../components/AthletesStatistics/AthletesStatistics';
|
|
6
|
-
export type ActiveAthletesItem = {
|
|
7
|
-
displayText: string;
|
|
8
|
-
awayTeam: {
|
|
9
|
-
id: string;
|
|
10
|
-
logo: string;
|
|
11
|
-
name: string;
|
|
12
|
-
};
|
|
13
|
-
homeTeam: {
|
|
14
|
-
id: string;
|
|
15
|
-
logo: string;
|
|
16
|
-
name: string;
|
|
17
|
-
};
|
|
18
|
-
athletes: AthletesStatisticsItem[];
|
|
19
|
-
};
|
|
3
|
+
import { Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
4
|
+
import { ActiveAthletesItem } from '../../view-model/StatsViewModel';
|
|
20
5
|
export type ActiveAthletesProps = {
|
|
21
6
|
item: ActiveAthletesItem;
|
|
7
|
+
onBecameFocused: (layout: Layout) => void;
|
|
22
8
|
};
|
|
23
|
-
declare class ActiveAthletes extends React.Component<
|
|
9
|
+
declare class ActiveAthletes extends React.Component<ActiveAthletesProps, {
|
|
24
10
|
expanded: boolean;
|
|
25
11
|
}> {
|
|
26
|
-
constructor(props:
|
|
12
|
+
constructor(props: ActiveAthletesProps);
|
|
27
13
|
onEnterPress(): void;
|
|
28
14
|
onAthletesStatisticsArrowPress: (index: number) => (d: Direction) => boolean;
|
|
29
15
|
get cardFocusKey(): string;
|
|
30
16
|
onAthletesStatisticsBackPress: () => void;
|
|
17
|
+
onArrowPress: (d: Direction) => void;
|
|
31
18
|
renderContent(): React.JSX.Element;
|
|
32
19
|
render(): React.JSX.Element;
|
|
33
20
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
3
|
+
import { DrivePlay } from '../../interfaces/IStats';
|
|
4
|
+
import { Layout, Direction } from '@/external/spatial-navigation/utils';
|
|
5
|
+
import './DrivePlayCard.styles.css';
|
|
6
|
+
type DrivePlayCardProps = {
|
|
7
|
+
play: DrivePlay;
|
|
8
|
+
isLastPlay?: boolean;
|
|
9
|
+
focusKey?: string;
|
|
10
|
+
focusable?: boolean;
|
|
11
|
+
onBackPress?: () => void;
|
|
12
|
+
onBecameFocused?: (layout: Layout) => void;
|
|
13
|
+
onArrowPress?: (direction: Direction, props: any) => boolean | void;
|
|
14
|
+
parentFocusKey?: string;
|
|
15
|
+
};
|
|
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>;
|
|
21
|
+
};
|
|
22
|
+
context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
|
|
23
|
+
onBecameFocused: (layout: Layout) => void;
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WithFocusableProps } from '@/external/spatial-navigation';
|
|
3
|
+
import { Layout } from '@/external/spatial-navigation/utils';
|
|
4
|
+
import './DriveSummary.styles.css';
|
|
5
|
+
import { DriveSummaryItem } from '../../view-model/StatsViewModel';
|
|
6
|
+
type DriveSummaryProps = {
|
|
7
|
+
item: DriveSummaryItem;
|
|
8
|
+
};
|
|
9
|
+
export default class DriveSummary extends React.Component<DriveSummaryProps & WithFocusableProps> {
|
|
10
|
+
static contextTypes: {
|
|
11
|
+
refsMap: React.Requireable<any>;
|
|
12
|
+
setRef: React.Requireable<any>;
|
|
13
|
+
scrollToFocusedElement: React.Requireable<any>;
|
|
14
|
+
};
|
|
15
|
+
context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
|
|
16
|
+
state: {
|
|
17
|
+
expanded: boolean;
|
|
18
|
+
};
|
|
19
|
+
onBecameFocused: (layout: Layout) => void;
|
|
20
|
+
handleEnterPress: (_props: any, _details: any) => void;
|
|
21
|
+
collapseCard: () => void;
|
|
22
|
+
render(): React.JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './GameLeaders.styles.css';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { GameLeadersStatsItem } from '../../view-model/StatsViewModel';
|
|
4
|
+
import { Direction, Layout } from '@/external/spatial-navigation/utils';
|
|
5
|
+
export type GameLeaderProps = {
|
|
6
|
+
item: GameLeadersStatsItem;
|
|
6
7
|
};
|
|
7
|
-
declare
|
|
8
|
+
declare class GameLeaders extends React.Component<GameLeaderProps> {
|
|
9
|
+
static contextTypes: {
|
|
10
|
+
refsMap: React.Requireable<any>;
|
|
11
|
+
setRef: React.Requireable<any>;
|
|
12
|
+
scrollToFocusedElement: React.Requireable<any>;
|
|
13
|
+
};
|
|
14
|
+
context: import("@/components/core/ScrollableContainer/ScrollableContainer").ScrollableContainerContextType;
|
|
15
|
+
onBecameFocused: (layout: Layout) => void;
|
|
16
|
+
onArrowPress: (d: Direction) => void;
|
|
17
|
+
render(): React.JSX.Element;
|
|
18
|
+
}
|
|
8
19
|
export default GameLeaders;
|